def detach_scsi_lun(self, req): cmd = jsonobject.loads(req[http.REQUEST_BODY]) rsp = AgentRsp() vm = vm_plugin.get_vm_by_uuid(cmd.vmInstanceUuid) vm.detach_data_volume(cmd.volume) return jsonobject.dumps(rsp)
def detach_scsi_lun(self, req): cmd = jsonobject.loads(req[http.REQUEST_BODY]) rsp = AgentRsp() vm = vm_plugin.get_vm_by_uuid(cmd.vmInstanceUuid) vm.detach_data_volume(cmd.volume) return jsonobject.dumps(rsp)
def attach_scsi_lun(self, req): cmd = jsonobject.loads(req[http.REQUEST_BODY]) rsp = AgentRsp() lvm.unpriv_sgio() if not cmd.multipath and "mpath" in cmd.volume.installPath: cmd.volume.installPath = self.get_slave_path(cmd.volume.installPath) vm = vm_plugin.get_vm_by_uuid(cmd.vmInstanceUuid) vm.attach_data_volume(cmd.volume, cmd.addons) return jsonobject.dumps(rsp)
def attach_scsi_lun(self, req): cmd = jsonobject.loads(req[http.REQUEST_BODY]) rsp = AgentRsp() lvm.unpriv_sgio() if not cmd.multipath and "mpath" in cmd.volume.installPath: cmd.volume.installPath = self.get_slave_path(cmd.volume.installPath) vm = vm_plugin.get_vm_by_uuid(cmd.vmInstanceUuid) vm.attach_data_volume(cmd.volume, cmd.addons) return jsonobject.dumps(rsp)