ComputeDriver.get_info not limited to inst name
Change I54b32a5020b0dbc21ba7156ed38ed188c483086b switched get_info to take an Instance object rather than just a name string, but left behind the docstring header indicating that the lookup should be done by name (not ID!). This change set updates the docstring in the base class, and in the handful of overrides whose docstrings appear to be derived therefrom. Change-Id: Id018cea8ba633252b1af22556d4161abf468a8be
This commit is contained in:
parent
78c69f61ab
commit
da21ab35d9
@ -149,11 +149,10 @@ class ComputeDriver(object):
|
||||
pass
|
||||
|
||||
def get_info(self, instance):
|
||||
"""Get the current status of an instance, by name (not ID!)
|
||||
"""Get the current status of an instance.
|
||||
|
||||
:param instance: nova.objects.instance.Instance object
|
||||
|
||||
Returns a InstanceInfo object
|
||||
:returns: An InstanceInfo object
|
||||
"""
|
||||
# TODO(Vek): Need to pass context in for access to auth_token
|
||||
raise NotImplementedError()
|
||||
|
@ -4956,12 +4956,14 @@ class LibvirtDriver(driver.ComputeDriver):
|
||||
return xml
|
||||
|
||||
def get_info(self, instance):
|
||||
"""Retrieve information from libvirt for a specific instance name.
|
||||
"""Retrieve information from libvirt for a specific instance.
|
||||
|
||||
If a libvirt error is encountered during lookup, we might raise a
|
||||
NotFound exception or Error exception depending on how severe the
|
||||
libvirt error is.
|
||||
|
||||
:param instance: nova.objects.instance.Instance object
|
||||
:returns: An InstanceInfo object
|
||||
"""
|
||||
guest = self._host.get_guest(instance)
|
||||
# Kind of ugly but we need to pass host to get_info as for a
|
||||
|
@ -89,11 +89,10 @@ class PowerVMDriver(driver.ComputeDriver):
|
||||
'name': instance.name}, instance=instance)
|
||||
|
||||
def get_info(self, instance):
|
||||
"""Get the current status of an instance, by name (not ID!)
|
||||
"""Get the current status of an instance.
|
||||
|
||||
:param instance: nova.objects.instance.Instance object
|
||||
|
||||
Returns a InstanceInfo object containing:
|
||||
:returns: An InstanceInfo object containing:
|
||||
|
||||
:state: the running state, one of the power_state codes
|
||||
:max_mem_kb: (int) the maximum memory in KBytes allowed
|
||||
|
Loading…
Reference in New Issue
Block a user