Revision c0a146a1 lib/rapi/rlib2.py

b/lib/rapi/rlib2.py
1122 1122
    return baserlib.SubmitJob([op])
1123 1123

  
1124 1124

  
1125
class R_2_instances_name_failover(baserlib.R_Generic):
1126
  """/2/instances/[instance_name]/failover resource.
1127

  
1128
  """
1129
  def PUT(self):
1130
    """Does a failover of an instance.
1131

  
1132
    @return: a job id
1133

  
1134
    """
1135
    baserlib.CheckType(self.request_body, dict, "Body contents")
1136

  
1137
    op = baserlib.FillOpcode(opcodes.OpInstanceFailover, self.request_body, {
1138
      "instance_name": self.items[0],
1139
      })
1140

  
1141
    return baserlib.SubmitJob([op])
1142

  
1143

  
1125 1144
def _ParseRenameInstanceRequest(name, data):
1126 1145
  """Parses a request for renaming an instance.
1127 1146

  

Also available in: Unified diff