Merge "Add description for vendor passthru methods"
This commit is contained in:
commit
70b992ca57
@ -704,7 +704,11 @@ class BaseAgentVendor(AgentDeployMixin, base.VendorInterface):
|
||||
% version)
|
||||
|
||||
@METRICS.timer('BaseAgentVendor.heartbeat')
|
||||
@base.passthru(['POST'])
|
||||
@base.passthru(['POST'],
|
||||
description=_("Used by ramdisk agent to check in with the "
|
||||
"ironic-conductor service. Required argument:"
|
||||
" 'agent_url' - the API URL of the agent, in "
|
||||
"the form http://<agent_host>:<agent_port>."))
|
||||
@task_manager.require_exclusive_lock
|
||||
def heartbeat(self, task, **kwargs):
|
||||
"""Method for agent to periodically check in.
|
||||
@ -728,7 +732,12 @@ class BaseAgentVendor(AgentDeployMixin, base.VendorInterface):
|
||||
super(BaseAgentVendor, self).heartbeat(task, callback_url)
|
||||
|
||||
@METRICS.timer('BaseAgentVendor.lookup')
|
||||
@base.driver_passthru(['POST'], async=False)
|
||||
@base.driver_passthru(['POST'], async=False,
|
||||
description=_("This should only be called by a "
|
||||
"ramdisk agent, the first time the "
|
||||
"agent checks in. It finds the Node "
|
||||
"associated with the ramdisk and "
|
||||
"returns the Node object."))
|
||||
def lookup(self, context, **kwargs):
|
||||
"""Find a matching node for the agent.
|
||||
|
||||
|
@ -44,7 +44,9 @@ class DracVendorPassthru(base.VendorInterface):
|
||||
"""
|
||||
return drac_common.parse_driver_info(task.node)
|
||||
|
||||
@base.passthru(['GET'], async=False)
|
||||
@base.passthru(['GET'], async=False,
|
||||
description=_("Returns a dictionary containing the BIOS "
|
||||
"settings from a node."))
|
||||
def get_bios_config(self, task, **kwargs):
|
||||
"""Get the BIOS configuration.
|
||||
|
||||
@ -63,7 +65,14 @@ class DracVendorPassthru(base.VendorInterface):
|
||||
|
||||
return bios_attrs
|
||||
|
||||
@base.passthru(['POST'], async=False)
|
||||
@base.passthru(['POST'], async=False,
|
||||
description=_("Change the BIOS configuration on a node. "
|
||||
"Required argument : a dictionary of "
|
||||
"{'AttributeName': 'NewValue'}. Returns "
|
||||
"a dictionary containing the "
|
||||
"'commit_required' key with a Boolean value "
|
||||
"indicating whether commit_bios_config() "
|
||||
"needs to be called to make the changes."))
|
||||
@task_manager.require_exclusive_lock
|
||||
def set_bios_config(self, task, **kwargs):
|
||||
"""Change BIOS settings.
|
||||
@ -79,7 +88,17 @@ class DracVendorPassthru(base.VendorInterface):
|
||||
"""
|
||||
return drac_bios.set_config(task, **kwargs)
|
||||
|
||||
@base.passthru(['POST'], async=False)
|
||||
@base.passthru(['POST'], async=False,
|
||||
description=_("Commit a BIOS configuration job submitted "
|
||||
"through set_bios_config(). Required "
|
||||
"argument: 'reboot' - indicates whether a "
|
||||
"reboot job should be automatically created "
|
||||
"with the config job. Returns a dictionary "
|
||||
"containing the 'job_id' key with the ID of "
|
||||
"the newly created config job, and the "
|
||||
"'reboot_required' key indicating whether "
|
||||
"the node needs to be rebooted to start the "
|
||||
"config job."))
|
||||
@task_manager.require_exclusive_lock
|
||||
def commit_bios_config(self, task, reboot=False, **kwargs):
|
||||
"""Commit a BIOS configuration job.
|
||||
@ -100,7 +119,9 @@ class DracVendorPassthru(base.VendorInterface):
|
||||
job_id = drac_bios.commit_config(task, reboot=reboot)
|
||||
return {'job_id': job_id, 'reboot_required': not reboot}
|
||||
|
||||
@base.passthru(['DELETE'], async=False)
|
||||
@base.passthru(['DELETE'], async=False,
|
||||
description=_("Abandon a BIOS configuration job previously "
|
||||
"submitted through set_bios_config()."))
|
||||
@task_manager.require_exclusive_lock
|
||||
def abandon_bios_config(self, task, **kwargs):
|
||||
"""Abandon a BIOS configuration job.
|
||||
|
@ -110,7 +110,11 @@ class VendorPassthru(iscsi_deploy.VendorPassthru):
|
||||
task.context, {'image_source': kwargs.get('boot_iso_href')}, [])
|
||||
|
||||
@METRICS.timer('IloVendorPassthru.boot_into_iso')
|
||||
@base.passthru(['POST'])
|
||||
@base.passthru(['POST'],
|
||||
description=_("Attaches an ISO image and reboots the node. "
|
||||
"Required argument: 'boot_iso_href' - href "
|
||||
"of the image to be booted. This can be a "
|
||||
"Glance UUID or an HTTP(S) URL."))
|
||||
@task_manager.require_exclusive_lock
|
||||
def boot_into_iso(self, task, **kwargs):
|
||||
"""Attaches an ISO image in glance and reboots bare metal.
|
||||
|
@ -658,7 +658,10 @@ class VendorPassthru(base.VendorInterface):
|
||||
_parse_driver_info(task.node)
|
||||
|
||||
@METRICS.timer('VendorPassthru.send_raw')
|
||||
@base.passthru(['POST'])
|
||||
@base.passthru(['POST'],
|
||||
description=_("Send raw bytes to the BMC. Required "
|
||||
"argument: 'raw_bytes' - a string of raw "
|
||||
"bytes (e.g. '0x00 0x01')."))
|
||||
@task_manager.require_exclusive_lock
|
||||
def send_raw(self, task, http_method, raw_bytes):
|
||||
"""Send raw bytes to the BMC. Bytes should be a string of bytes.
|
||||
@ -675,7 +678,10 @@ class VendorPassthru(base.VendorInterface):
|
||||
_send_raw(driver_info, raw_bytes)
|
||||
|
||||
@METRICS.timer('VendorPassthru.bmc_reset')
|
||||
@base.passthru(['POST'])
|
||||
@base.passthru(['POST'],
|
||||
description=_("Reset the BMC. Required argument: 'warm' "
|
||||
"(Boolean) - for warm (True) or cold (False) "
|
||||
"reset."))
|
||||
@task_manager.require_exclusive_lock
|
||||
def bmc_reset(self, task, http_method, warm=True):
|
||||
"""Reset BMC via IPMI command.
|
||||
|
@ -1042,7 +1042,10 @@ class VendorPassthru(base.VendorInterface):
|
||||
_constructor_checks(driver=self.__class__.__name__)
|
||||
|
||||
@METRICS.timer('VendorPassthru.send_raw')
|
||||
@base.passthru(['POST'])
|
||||
@base.passthru(['POST'],
|
||||
description=_("Send raw bytes to the BMC. Required "
|
||||
"argument: 'raw_bytes' - a string of raw "
|
||||
"bytes (e.g. '0x00 0x01')."))
|
||||
@task_manager.require_exclusive_lock
|
||||
def send_raw(self, task, http_method, raw_bytes):
|
||||
"""Send raw bytes to the BMC. Bytes should be a string of bytes.
|
||||
@ -1058,7 +1061,10 @@ class VendorPassthru(base.VendorInterface):
|
||||
send_raw(task, raw_bytes)
|
||||
|
||||
@METRICS.timer('VendorPassthru.bmc_reset')
|
||||
@base.passthru(['POST'])
|
||||
@base.passthru(['POST'],
|
||||
description=_("Reset the BMC. Required argument: 'warm' "
|
||||
"(Boolean) - for warm (True) or cold (False) "
|
||||
"reset."))
|
||||
@task_manager.require_exclusive_lock
|
||||
def bmc_reset(self, task, http_method, warm=True):
|
||||
"""Reset BMC with IPMI command 'bmc reset (warm|cold)'.
|
||||
|
@ -434,7 +434,10 @@ class VendorPassthru(base.VendorInterface):
|
||||
def validate(self, task, method, **kwargs):
|
||||
_parse_driver_info(task.node)
|
||||
|
||||
@base.passthru(['POST'])
|
||||
@base.passthru(['POST'],
|
||||
description=_("Set an untagged VLAN ID for NIC 0 of node. "
|
||||
"Required argument: 'vlan_id' - ID of "
|
||||
"untagged VLAN."))
|
||||
def set_node_vlan_id(self, task, **kwargs):
|
||||
"""Sets an untagged vlan id for NIC 0 of node.
|
||||
|
||||
@ -463,7 +466,13 @@ class VendorPassthru(base.VendorInterface):
|
||||
node.properties = properties
|
||||
node.save()
|
||||
|
||||
@base.passthru(['POST'])
|
||||
@base.passthru(['POST'],
|
||||
description=_("Attach volume to node. Arguments: "
|
||||
"1. 'volume_id' - ID of pre-provisioned "
|
||||
"volume. This is optional. If not specified, "
|
||||
"a volume is created in SeaMicro storage "
|
||||
"pool. 2. 'volume_size' - size of new volume "
|
||||
"(if volume_id is not specified)."))
|
||||
def attach_volume(self, task, **kwargs):
|
||||
"""Attach a volume to a node.
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user