Пример #1
0
    def instance_activate(self, req=None, instanceHostMap=None, processData=None, **kw):
        instance, host = BaseComputeDriver.get_instance_host_from_map(self, instanceHostMap)

        progress = Progress(req)
        client = self._get_docker_client(host)
        if instance is not None:
            instance.processData = processData

        with lock(instance):
            if self._is_instance_active(instance, host):
                self._record_state(client, instance)
                return self._reply(req, self._get_response_data(req, instanceHostMap))

            self._do_instance_activate(instance, host, progress)

            data = self._get_response_data(req, instanceHostMap)

            return self._reply(req, data)
Пример #2
0
    def instance_activate(self,
                          req=None,
                          instanceHostMap=None,
                          processData=None,
                          **kw):
        instance, host = \
            BaseComputeDriver.get_instance_host_from_map(self, instanceHostMap)

        progress = Progress(req)
        client = docker_client()
        if instance is not None:
            instance.processData = processData

        with lock(instance):
            if self._is_instance_active(instance, host):
                self._record_state(client, instance)
                return self._reply(
                    req, self._get_response_data(req, instanceHostMap))

            self._do_instance_activate(instance, host, progress)

            data = self._get_response_data(req, instanceHostMap)

            return self._reply(req, data)
Пример #3
0
 def __init__(self):
     self._default_type = None
     self._checked_default_type = False
     KindBasedMixin.__init__(self, kind='libvirt')
     BaseComputeDriver.__init__(self)
Пример #4
0
 def __init__(self):
     KindBasedMixin.__init__(self, kind='docker')
     BaseComputeDriver.__init__(self)
     self.host_info = HostInfo(docker_client())
     self.system_images = self.get_agent_images(docker_client())
Пример #5
0
 def __init__(self):
     KindBasedMixin.__init__(self, kind='docker')
     BaseComputeDriver.__init__(self)
     self.host_info = HostInfo(docker_client())
     self.system_images = self.get_agent_images(docker_client())
Пример #6
0
 def __init__(self):
     KindBasedMixin.__init__(self, kind='docker')
     BaseComputeDriver.__init__(self)
Пример #7
0
 def __init__(self):
     self._default_type = None
     self._checked_default_type = False
     KindBasedMixin.__init__(self, kind='libvirt')
     BaseComputeDriver.__init__(self)
Пример #8
0
 def __init__(self):
     KindBasedMixin.__init__(self, kind='docker')
     BaseComputeDriver.__init__(self)
Пример #9
0
 def __init__(self):
     KindBasedMixin.__init__(self, kind='docker')
     BaseComputeDriver.__init__(self)
     self.host_info = HostInfo()