repo
stringlengths
7
55
path
stringlengths
4
127
func_name
stringlengths
1
88
original_string
stringlengths
75
19.8k
language
stringclasses
1 value
code
stringlengths
75
19.8k
code_tokens
list
docstring
stringlengths
3
17.3k
docstring_tokens
list
sha
stringlengths
40
40
url
stringlengths
87
242
partition
stringclasses
1 value
HewlettPackard/python-hpOneView
hpOneView/resources/networking/logical_interconnects.py
LogicalInterconnects.update_ethernet_settings
def update_ethernet_settings(self, configuration, force=False, timeout=-1): """ Updates the Ethernet interconnect settings for the logical interconnect. Args: configuration: Ethernet interconnect settings. force: If set to true, the operation completes despite any probl...
python
def update_ethernet_settings(self, configuration, force=False, timeout=-1): """ Updates the Ethernet interconnect settings for the logical interconnect. Args: configuration: Ethernet interconnect settings. force: If set to true, the operation completes despite any probl...
[ "def", "update_ethernet_settings", "(", "self", ",", "configuration", ",", "force", "=", "False", ",", "timeout", "=", "-", "1", ")", ":", "uri", "=", "\"{}/ethernetSettings\"", ".", "format", "(", "self", ".", "data", "[", "\"uri\"", "]", ")", "return", ...
Updates the Ethernet interconnect settings for the logical interconnect. Args: configuration: Ethernet interconnect settings. force: If set to true, the operation completes despite any problems with network connectivity or errors on the resource itself. The default is f...
[ "Updates", "the", "Ethernet", "interconnect", "settings", "for", "the", "logical", "interconnect", "." ]
3c6219723ef25e6e0c83d44a89007f89bc325b89
https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/networking/logical_interconnects.py#L153-L168
train
HewlettPackard/python-hpOneView
hpOneView/resources/networking/logical_interconnects.py
LogicalInterconnects.update_internal_networks
def update_internal_networks(self, network_uri_list, force=False, timeout=-1): """ Updates internal networks on the logical interconnect. Args: network_uri_list: List of Ethernet network uris. force: If set to true, the operation completes despite any problems with netwo...
python
def update_internal_networks(self, network_uri_list, force=False, timeout=-1): """ Updates internal networks on the logical interconnect. Args: network_uri_list: List of Ethernet network uris. force: If set to true, the operation completes despite any problems with netwo...
[ "def", "update_internal_networks", "(", "self", ",", "network_uri_list", ",", "force", "=", "False", ",", "timeout", "=", "-", "1", ")", ":", "uri", "=", "\"{}/internalNetworks\"", ".", "format", "(", "self", ".", "data", "[", "\"uri\"", "]", ")", "return"...
Updates internal networks on the logical interconnect. Args: network_uri_list: List of Ethernet network uris. force: If set to true, the operation completes despite any problems with network connectivity or errors on the resource itself. The default is false. ...
[ "Updates", "internal", "networks", "on", "the", "logical", "interconnect", "." ]
3c6219723ef25e6e0c83d44a89007f89bc325b89
https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/networking/logical_interconnects.py#L171-L186
train
HewlettPackard/python-hpOneView
hpOneView/resources/networking/logical_interconnects.py
LogicalInterconnects.update_configuration
def update_configuration(self, timeout=-1): """ Asynchronously applies or re-applies the logical interconnect configuration to all managed interconnects. Args: timeout: Timeout in seconds. Wait for task completion by default. The timeout does not abort the operation ...
python
def update_configuration(self, timeout=-1): """ Asynchronously applies or re-applies the logical interconnect configuration to all managed interconnects. Args: timeout: Timeout in seconds. Wait for task completion by default. The timeout does not abort the operation ...
[ "def", "update_configuration", "(", "self", ",", "timeout", "=", "-", "1", ")", ":", "uri", "=", "\"{}/configuration\"", ".", "format", "(", "self", ".", "data", "[", "\"uri\"", "]", ")", "return", "self", ".", "_helper", ".", "update", "(", "None", ",...
Asynchronously applies or re-applies the logical interconnect configuration to all managed interconnects. Args: timeout: Timeout in seconds. Wait for task completion by default. The timeout does not abort the operation in OneView; it just stops waiting for its completion. R...
[ "Asynchronously", "applies", "or", "re", "-", "applies", "the", "logical", "interconnect", "configuration", "to", "all", "managed", "interconnects", "." ]
3c6219723ef25e6e0c83d44a89007f89bc325b89
https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/networking/logical_interconnects.py#L232-L244
train
HewlettPackard/python-hpOneView
hpOneView/resources/networking/logical_interconnects.py
LogicalInterconnects.get_snmp_configuration
def get_snmp_configuration(self): """ Gets the SNMP configuration for a logical interconnect. Returns: dict: SNMP configuration. """ uri = "{}{}".format(self.data["uri"], self.SNMP_CONFIGURATION_PATH) return self._helper.do_get(uri)
python
def get_snmp_configuration(self): """ Gets the SNMP configuration for a logical interconnect. Returns: dict: SNMP configuration. """ uri = "{}{}".format(self.data["uri"], self.SNMP_CONFIGURATION_PATH) return self._helper.do_get(uri)
[ "def", "get_snmp_configuration", "(", "self", ")", ":", "uri", "=", "\"{}{}\"", ".", "format", "(", "self", ".", "data", "[", "\"uri\"", "]", ",", "self", ".", "SNMP_CONFIGURATION_PATH", ")", "return", "self", ".", "_helper", ".", "do_get", "(", "uri", "...
Gets the SNMP configuration for a logical interconnect. Returns: dict: SNMP configuration.
[ "Gets", "the", "SNMP", "configuration", "for", "a", "logical", "interconnect", "." ]
3c6219723ef25e6e0c83d44a89007f89bc325b89
https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/networking/logical_interconnects.py#L247-L255
train
HewlettPackard/python-hpOneView
hpOneView/resources/networking/logical_interconnects.py
LogicalInterconnects.update_snmp_configuration
def update_snmp_configuration(self, configuration, timeout=-1): """ Updates the SNMP configuration of a logical interconnect. Changes to the SNMP configuration are asynchronously applied to all managed interconnects. Args: configuration: snmp configuration. Returns:...
python
def update_snmp_configuration(self, configuration, timeout=-1): """ Updates the SNMP configuration of a logical interconnect. Changes to the SNMP configuration are asynchronously applied to all managed interconnects. Args: configuration: snmp configuration. Returns:...
[ "def", "update_snmp_configuration", "(", "self", ",", "configuration", ",", "timeout", "=", "-", "1", ")", ":", "data", "=", "configuration", ".", "copy", "(", ")", "if", "'type'", "not", "in", "data", ":", "data", "[", "'type'", "]", "=", "'snmp-configu...
Updates the SNMP configuration of a logical interconnect. Changes to the SNMP configuration are asynchronously applied to all managed interconnects. Args: configuration: snmp configuration. Returns: dict: The Logical Interconnect.
[ "Updates", "the", "SNMP", "configuration", "of", "a", "logical", "interconnect", ".", "Changes", "to", "the", "SNMP", "configuration", "are", "asynchronously", "applied", "to", "all", "managed", "interconnects", "." ]
3c6219723ef25e6e0c83d44a89007f89bc325b89
https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/networking/logical_interconnects.py#L258-L274
train
HewlettPackard/python-hpOneView
hpOneView/resources/networking/logical_interconnects.py
LogicalInterconnects.get_unassigned_ports
def get_unassigned_ports(self): """ Gets the collection ports from the member interconnects which are eligible for assignment to an anlyzer port Returns: dict: Collection of ports """ uri = "{}/unassignedPortsForPortMonitor".format(self.data["uri"]) r...
python
def get_unassigned_ports(self): """ Gets the collection ports from the member interconnects which are eligible for assignment to an anlyzer port Returns: dict: Collection of ports """ uri = "{}/unassignedPortsForPortMonitor".format(self.data["uri"]) r...
[ "def", "get_unassigned_ports", "(", "self", ")", ":", "uri", "=", "\"{}/unassignedPortsForPortMonitor\"", ".", "format", "(", "self", ".", "data", "[", "\"uri\"", "]", ")", "response", "=", "self", ".", "_helper", ".", "do_get", "(", "uri", ")", "return", ...
Gets the collection ports from the member interconnects which are eligible for assignment to an anlyzer port Returns: dict: Collection of ports
[ "Gets", "the", "collection", "ports", "from", "the", "member", "interconnects", "which", "are", "eligible", "for", "assignment", "to", "an", "anlyzer", "port" ]
3c6219723ef25e6e0c83d44a89007f89bc325b89
https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/networking/logical_interconnects.py#L277-L288
train
HewlettPackard/python-hpOneView
hpOneView/resources/networking/logical_interconnects.py
LogicalInterconnects.get_port_monitor
def get_port_monitor(self): """ Gets the port monitor configuration of a logical interconnect. Returns: dict: The Logical Interconnect. """ uri = "{}{}".format(self.data["uri"], self.PORT_MONITOR_PATH) return self._helper.do_get(uri)
python
def get_port_monitor(self): """ Gets the port monitor configuration of a logical interconnect. Returns: dict: The Logical Interconnect. """ uri = "{}{}".format(self.data["uri"], self.PORT_MONITOR_PATH) return self._helper.do_get(uri)
[ "def", "get_port_monitor", "(", "self", ")", ":", "uri", "=", "\"{}{}\"", ".", "format", "(", "self", ".", "data", "[", "\"uri\"", "]", ",", "self", ".", "PORT_MONITOR_PATH", ")", "return", "self", ".", "_helper", ".", "do_get", "(", "uri", ")" ]
Gets the port monitor configuration of a logical interconnect. Returns: dict: The Logical Interconnect.
[ "Gets", "the", "port", "monitor", "configuration", "of", "a", "logical", "interconnect", "." ]
3c6219723ef25e6e0c83d44a89007f89bc325b89
https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/networking/logical_interconnects.py#L306-L314
train
HewlettPackard/python-hpOneView
hpOneView/resources/networking/logical_interconnects.py
LogicalInterconnects.update_port_monitor
def update_port_monitor(self, resource, timeout=-1): """ Updates the port monitor configuration of a logical interconnect. Args: resource: Port monitor configuration. Returns: dict: Port monitor configuration. """ data = resource.copy() i...
python
def update_port_monitor(self, resource, timeout=-1): """ Updates the port monitor configuration of a logical interconnect. Args: resource: Port monitor configuration. Returns: dict: Port monitor configuration. """ data = resource.copy() i...
[ "def", "update_port_monitor", "(", "self", ",", "resource", ",", "timeout", "=", "-", "1", ")", ":", "data", "=", "resource", ".", "copy", "(", ")", "if", "'type'", "not", "in", "data", ":", "data", "[", "'type'", "]", "=", "'port-monitor'", "uri", "...
Updates the port monitor configuration of a logical interconnect. Args: resource: Port monitor configuration. Returns: dict: Port monitor configuration.
[ "Updates", "the", "port", "monitor", "configuration", "of", "a", "logical", "interconnect", "." ]
3c6219723ef25e6e0c83d44a89007f89bc325b89
https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/networking/logical_interconnects.py#L317-L332
train
HewlettPackard/python-hpOneView
hpOneView/resources/networking/logical_interconnects.py
LogicalInterconnects.create_interconnect
def create_interconnect(self, location_entries, timeout=-1): """ Creates an interconnect at the given location. Warning: It does not create the LOGICAL INTERCONNECT itself. It will fail if no interconnect is already present on the specified position. Args: ...
python
def create_interconnect(self, location_entries, timeout=-1): """ Creates an interconnect at the given location. Warning: It does not create the LOGICAL INTERCONNECT itself. It will fail if no interconnect is already present on the specified position. Args: ...
[ "def", "create_interconnect", "(", "self", ",", "location_entries", ",", "timeout", "=", "-", "1", ")", ":", "return", "self", ".", "_helper", ".", "create", "(", "location_entries", ",", "uri", "=", "self", ".", "locations_uri", ",", "timeout", "=", "time...
Creates an interconnect at the given location. Warning: It does not create the LOGICAL INTERCONNECT itself. It will fail if no interconnect is already present on the specified position. Args: location_entries (dict): Dictionary with location entries. tim...
[ "Creates", "an", "interconnect", "at", "the", "given", "location", "." ]
3c6219723ef25e6e0c83d44a89007f89bc325b89
https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/networking/logical_interconnects.py#L334-L351
train
HewlettPackard/python-hpOneView
hpOneView/resources/networking/logical_interconnects.py
LogicalInterconnects.delete_interconnect
def delete_interconnect(self, enclosure_uri, bay, timeout=-1): """ Deletes an interconnect from a location. Warning: This won't delete the LOGICAL INTERCONNECT itself and might cause inconsistency between the enclosure and Logical Interconnect Group. Args: ...
python
def delete_interconnect(self, enclosure_uri, bay, timeout=-1): """ Deletes an interconnect from a location. Warning: This won't delete the LOGICAL INTERCONNECT itself and might cause inconsistency between the enclosure and Logical Interconnect Group. Args: ...
[ "def", "delete_interconnect", "(", "self", ",", "enclosure_uri", ",", "bay", ",", "timeout", "=", "-", "1", ")", ":", "uri", "=", "\"{path}?location=Enclosure:{enclosure_uri},Bay:{bay}\"", ".", "format", "(", "path", "=", "self", ".", "LOCATIONS_PATH", ",", "enc...
Deletes an interconnect from a location. Warning: This won't delete the LOGICAL INTERCONNECT itself and might cause inconsistency between the enclosure and Logical Interconnect Group. Args: enclosure_uri: URI of the Enclosure bay: Bay timeout...
[ "Deletes", "an", "interconnect", "from", "a", "location", "." ]
3c6219723ef25e6e0c83d44a89007f89bc325b89
https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/networking/logical_interconnects.py#L353-L374
train
HewlettPackard/python-hpOneView
hpOneView/resources/networking/logical_interconnects.py
LogicalInterconnects.get_firmware
def get_firmware(self): """ Gets the installed firmware for a logical interconnect. Returns: dict: LIFirmware. """ firmware_uri = self._helper.build_subresource_uri(self.data["uri"], subresource_path=self.FIRMWARE_PATH) return self._helper.do_get(firmware_uri...
python
def get_firmware(self): """ Gets the installed firmware for a logical interconnect. Returns: dict: LIFirmware. """ firmware_uri = self._helper.build_subresource_uri(self.data["uri"], subresource_path=self.FIRMWARE_PATH) return self._helper.do_get(firmware_uri...
[ "def", "get_firmware", "(", "self", ")", ":", "firmware_uri", "=", "self", ".", "_helper", ".", "build_subresource_uri", "(", "self", ".", "data", "[", "\"uri\"", "]", ",", "subresource_path", "=", "self", ".", "FIRMWARE_PATH", ")", "return", "self", ".", ...
Gets the installed firmware for a logical interconnect. Returns: dict: LIFirmware.
[ "Gets", "the", "installed", "firmware", "for", "a", "logical", "interconnect", "." ]
3c6219723ef25e6e0c83d44a89007f89bc325b89
https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/networking/logical_interconnects.py#L377-L385
train
HewlettPackard/python-hpOneView
hpOneView/resources/networking/logical_interconnects.py
LogicalInterconnects.get_forwarding_information_base
def get_forwarding_information_base(self, filter=''): """ Gets the forwarding information base data for a logical interconnect. A maximum of 100 entries is returned. Optional filtering criteria might be specified. Args: filter (list or str): Filtering criteri...
python
def get_forwarding_information_base(self, filter=''): """ Gets the forwarding information base data for a logical interconnect. A maximum of 100 entries is returned. Optional filtering criteria might be specified. Args: filter (list or str): Filtering criteri...
[ "def", "get_forwarding_information_base", "(", "self", ",", "filter", "=", "''", ")", ":", "uri", "=", "\"{}{}\"", ".", "format", "(", "self", ".", "data", "[", "\"uri\"", "]", ",", "self", ".", "FORWARDING_INFORMATION_PATH", ")", "return", "self", ".", "_...
Gets the forwarding information base data for a logical interconnect. A maximum of 100 entries is returned. Optional filtering criteria might be specified. Args: filter (list or str): Filtering criteria may be specified using supported attributes: interconnectUri, macAddress...
[ "Gets", "the", "forwarding", "information", "base", "data", "for", "a", "logical", "interconnect", ".", "A", "maximum", "of", "100", "entries", "is", "returned", ".", "Optional", "filtering", "criteria", "might", "be", "specified", "." ]
3c6219723ef25e6e0c83d44a89007f89bc325b89
https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/networking/logical_interconnects.py#L404-L420
train
HewlettPackard/python-hpOneView
hpOneView/resources/networking/logical_interconnects.py
LogicalInterconnects.create_forwarding_information_base
def create_forwarding_information_base(self, timeout=-1): """ Generates the forwarding information base dump file for a logical interconnect. Args: timeout: Timeout in seconds. Wait for task completion by default. The timeout does not abort the operation in ...
python
def create_forwarding_information_base(self, timeout=-1): """ Generates the forwarding information base dump file for a logical interconnect. Args: timeout: Timeout in seconds. Wait for task completion by default. The timeout does not abort the operation in ...
[ "def", "create_forwarding_information_base", "(", "self", ",", "timeout", "=", "-", "1", ")", ":", "uri", "=", "\"{}{}\"", ".", "format", "(", "self", ".", "data", "[", "\"uri\"", "]", ",", "self", ".", "FORWARDING_INFORMATION_PATH", ")", "return", "self", ...
Generates the forwarding information base dump file for a logical interconnect. Args: timeout: Timeout in seconds. Wait for task completion by default. The timeout does not abort the operation in OneView, just stops waiting for its completion. Returns: Inter...
[ "Generates", "the", "forwarding", "information", "base", "dump", "file", "for", "a", "logical", "interconnect", "." ]
3c6219723ef25e6e0c83d44a89007f89bc325b89
https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/networking/logical_interconnects.py#L423-L435
train
HewlettPackard/python-hpOneView
hpOneView/resources/networking/logical_interconnects.py
LogicalInterconnects.get_qos_aggregated_configuration
def get_qos_aggregated_configuration(self): """ Gets the QoS aggregated configuration for the logical interconnect. Returns: dict: QoS Configuration. """ uri = "{}{}".format(self.data["uri"], self.QOS_AGGREGATED_CONFIGURATION) return self._helper.do_get(uri)
python
def get_qos_aggregated_configuration(self): """ Gets the QoS aggregated configuration for the logical interconnect. Returns: dict: QoS Configuration. """ uri = "{}{}".format(self.data["uri"], self.QOS_AGGREGATED_CONFIGURATION) return self._helper.do_get(uri)
[ "def", "get_qos_aggregated_configuration", "(", "self", ")", ":", "uri", "=", "\"{}{}\"", ".", "format", "(", "self", ".", "data", "[", "\"uri\"", "]", ",", "self", ".", "QOS_AGGREGATED_CONFIGURATION", ")", "return", "self", ".", "_helper", ".", "do_get", "(...
Gets the QoS aggregated configuration for the logical interconnect. Returns: dict: QoS Configuration.
[ "Gets", "the", "QoS", "aggregated", "configuration", "for", "the", "logical", "interconnect", "." ]
3c6219723ef25e6e0c83d44a89007f89bc325b89
https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/networking/logical_interconnects.py#L438-L446
train
HewlettPackard/python-hpOneView
hpOneView/resources/networking/logical_interconnects.py
LogicalInterconnects.update_qos_aggregated_configuration
def update_qos_aggregated_configuration(self, qos_configuration, timeout=-1): """ Updates the QoS aggregated configuration for the logical interconnect. Args: qos_configuration: QOS configuration. timeout: Timeout in seconds. Wait for task...
python
def update_qos_aggregated_configuration(self, qos_configuration, timeout=-1): """ Updates the QoS aggregated configuration for the logical interconnect. Args: qos_configuration: QOS configuration. timeout: Timeout in seconds. Wait for task...
[ "def", "update_qos_aggregated_configuration", "(", "self", ",", "qos_configuration", ",", "timeout", "=", "-", "1", ")", ":", "uri", "=", "\"{}{}\"", ".", "format", "(", "self", ".", "data", "[", "\"uri\"", "]", ",", "self", ".", "QOS_AGGREGATED_CONFIGURATION"...
Updates the QoS aggregated configuration for the logical interconnect. Args: qos_configuration: QOS configuration. timeout: Timeout in seconds. Wait for task completion by default. The timeout does not abort the operation in OneView, just ...
[ "Updates", "the", "QoS", "aggregated", "configuration", "for", "the", "logical", "interconnect", "." ]
3c6219723ef25e6e0c83d44a89007f89bc325b89
https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/networking/logical_interconnects.py#L449-L464
train
HewlettPackard/python-hpOneView
hpOneView/resources/networking/logical_interconnects.py
LogicalInterconnects.update_telemetry_configurations
def update_telemetry_configurations(self, configuration, timeout=-1): """ Updates the telemetry configuration of a logical interconnect. Changes to the telemetry configuration are asynchronously applied to all managed interconnects. Args: configuration: The t...
python
def update_telemetry_configurations(self, configuration, timeout=-1): """ Updates the telemetry configuration of a logical interconnect. Changes to the telemetry configuration are asynchronously applied to all managed interconnects. Args: configuration: The t...
[ "def", "update_telemetry_configurations", "(", "self", ",", "configuration", ",", "timeout", "=", "-", "1", ")", ":", "telemetry_conf_uri", "=", "self", ".", "_get_telemetry_configuration_uri", "(", ")", "default_values", "=", "self", ".", "_get_default_values", "("...
Updates the telemetry configuration of a logical interconnect. Changes to the telemetry configuration are asynchronously applied to all managed interconnects. Args: configuration: The telemetry configuration for the logical interconnect. timeout: ...
[ "Updates", "the", "telemetry", "configuration", "of", "a", "logical", "interconnect", ".", "Changes", "to", "the", "telemetry", "configuration", "are", "asynchronously", "applied", "to", "all", "managed", "interconnects", "." ]
3c6219723ef25e6e0c83d44a89007f89bc325b89
https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/networking/logical_interconnects.py#L485-L504
train
HewlettPackard/python-hpOneView
hpOneView/resources/networking/logical_interconnects.py
LogicalInterconnects.get_ethernet_settings
def get_ethernet_settings(self): """ Gets the Ethernet interconnect settings for the Logical Interconnect. Returns: dict: Ethernet Interconnect Settings """ uri = "{}/ethernetSettings".format(self.data["uri"]) return self._helper.do_get(uri)
python
def get_ethernet_settings(self): """ Gets the Ethernet interconnect settings for the Logical Interconnect. Returns: dict: Ethernet Interconnect Settings """ uri = "{}/ethernetSettings".format(self.data["uri"]) return self._helper.do_get(uri)
[ "def", "get_ethernet_settings", "(", "self", ")", ":", "uri", "=", "\"{}/ethernetSettings\"", ".", "format", "(", "self", ".", "data", "[", "\"uri\"", "]", ")", "return", "self", ".", "_helper", ".", "do_get", "(", "uri", ")" ]
Gets the Ethernet interconnect settings for the Logical Interconnect. Returns: dict: Ethernet Interconnect Settings
[ "Gets", "the", "Ethernet", "interconnect", "settings", "for", "the", "Logical", "Interconnect", "." ]
3c6219723ef25e6e0c83d44a89007f89bc325b89
https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/networking/logical_interconnects.py#L507-L515
train
HewlettPackard/python-hpOneView
hpOneView/image_streamer/resources/os_volumes.py
OsVolumes.download_archive
def download_archive(self, name, file_path): """ Download archived logs of the OS Volume. Args: name: Name of the OS Volume. file_path (str): Destination file path. Returns: bool: Indicates if the resource was successfully downloaded. """ ...
python
def download_archive(self, name, file_path): """ Download archived logs of the OS Volume. Args: name: Name of the OS Volume. file_path (str): Destination file path. Returns: bool: Indicates if the resource was successfully downloaded. """ ...
[ "def", "download_archive", "(", "self", ",", "name", ",", "file_path", ")", ":", "uri", "=", "self", ".", "URI", "+", "\"/archive/\"", "+", "name", "return", "self", ".", "_client", ".", "download", "(", "uri", ",", "file_path", ")" ]
Download archived logs of the OS Volume. Args: name: Name of the OS Volume. file_path (str): Destination file path. Returns: bool: Indicates if the resource was successfully downloaded.
[ "Download", "archived", "logs", "of", "the", "OS", "Volume", "." ]
3c6219723ef25e6e0c83d44a89007f89bc325b89
https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/image_streamer/resources/os_volumes.py#L110-L122
train
HewlettPackard/python-hpOneView
hpOneView/image_streamer/resources/os_volumes.py
OsVolumes.get_storage
def get_storage(self, id_or_uri): """ Get storage details of an OS Volume. Args: id_or_uri: ID or URI of the OS Volume. Returns: dict: Storage details """ uri = self.URI + "/{}/storage".format(extract_id_from_uri(id_or_uri)) return self._...
python
def get_storage(self, id_or_uri): """ Get storage details of an OS Volume. Args: id_or_uri: ID or URI of the OS Volume. Returns: dict: Storage details """ uri = self.URI + "/{}/storage".format(extract_id_from_uri(id_or_uri)) return self._...
[ "def", "get_storage", "(", "self", ",", "id_or_uri", ")", ":", "uri", "=", "self", ".", "URI", "+", "\"/{}/storage\"", ".", "format", "(", "extract_id_from_uri", "(", "id_or_uri", ")", ")", "return", "self", ".", "_client", ".", "get", "(", "uri", ")" ]
Get storage details of an OS Volume. Args: id_or_uri: ID or URI of the OS Volume. Returns: dict: Storage details
[ "Get", "storage", "details", "of", "an", "OS", "Volume", "." ]
3c6219723ef25e6e0c83d44a89007f89bc325b89
https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/image_streamer/resources/os_volumes.py#L124-L135
train
HewlettPackard/python-hpOneView
hpOneView/resources/facilities/racks.py
Racks.get_device_topology
def get_device_topology(self, id_or_uri): """ Retrieves the topology information for the rack resource specified by ID or URI. Args: id_or_uri: Can be either the resource ID or the resource URI. Return: dict: Device topology. """ uri = self._clie...
python
def get_device_topology(self, id_or_uri): """ Retrieves the topology information for the rack resource specified by ID or URI. Args: id_or_uri: Can be either the resource ID or the resource URI. Return: dict: Device topology. """ uri = self._clie...
[ "def", "get_device_topology", "(", "self", ",", "id_or_uri", ")", ":", "uri", "=", "self", ".", "_client", ".", "build_uri", "(", "id_or_uri", ")", "+", "\"/deviceTopology\"", "return", "self", ".", "_client", ".", "get", "(", "uri", ")" ]
Retrieves the topology information for the rack resource specified by ID or URI. Args: id_or_uri: Can be either the resource ID or the resource URI. Return: dict: Device topology.
[ "Retrieves", "the", "topology", "information", "for", "the", "rack", "resource", "specified", "by", "ID", "or", "URI", "." ]
3c6219723ef25e6e0c83d44a89007f89bc325b89
https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/facilities/racks.py#L91-L102
train
HewlettPackard/python-hpOneView
hpOneView/resources/fc_sans/managed_sans.py
ManagedSANs.get_by_name
def get_by_name(self, name): """ Gets a Managed SAN by name. Args: name: Name of the Managed SAN Returns: dict: Managed SAN. """ managed_sans = self.get_all() result = [x for x in managed_sans if x['name'] == name] resource = res...
python
def get_by_name(self, name): """ Gets a Managed SAN by name. Args: name: Name of the Managed SAN Returns: dict: Managed SAN. """ managed_sans = self.get_all() result = [x for x in managed_sans if x['name'] == name] resource = res...
[ "def", "get_by_name", "(", "self", ",", "name", ")", ":", "managed_sans", "=", "self", ".", "get_all", "(", ")", "result", "=", "[", "x", "for", "x", "in", "managed_sans", "if", "x", "[", "'name'", "]", "==", "name", "]", "resource", "=", "result", ...
Gets a Managed SAN by name. Args: name: Name of the Managed SAN Returns: dict: Managed SAN.
[ "Gets", "a", "Managed", "SAN", "by", "name", "." ]
3c6219723ef25e6e0c83d44a89007f89bc325b89
https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/fc_sans/managed_sans.py#L71-L88
train
HewlettPackard/python-hpOneView
hpOneView/resources/fc_sans/managed_sans.py
ManagedSANs.get_endpoints
def get_endpoints(self, start=0, count=-1, filter='', sort=''): """ Gets a list of endpoints in a SAN. Args: start: The first item to return, using 0-based indexing. If not specified, the default is 0 - start with the first available item. ...
python
def get_endpoints(self, start=0, count=-1, filter='', sort=''): """ Gets a list of endpoints in a SAN. Args: start: The first item to return, using 0-based indexing. If not specified, the default is 0 - start with the first available item. ...
[ "def", "get_endpoints", "(", "self", ",", "start", "=", "0", ",", "count", "=", "-", "1", ",", "filter", "=", "''", ",", "sort", "=", "''", ")", ":", "uri", "=", "\"{}/endpoints/\"", ".", "format", "(", "self", ".", "data", "[", "\"uri\"", "]", "...
Gets a list of endpoints in a SAN. Args: start: The first item to return, using 0-based indexing. If not specified, the default is 0 - start with the first available item. count: The number of resources to return. A count of -1 requests al...
[ "Gets", "a", "list", "of", "endpoints", "in", "a", "SAN", "." ]
3c6219723ef25e6e0c83d44a89007f89bc325b89
https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/fc_sans/managed_sans.py#L99-L122
train
HewlettPackard/python-hpOneView
hpOneView/resources/fc_sans/managed_sans.py
ManagedSANs.create_endpoints_csv_file
def create_endpoints_csv_file(self, timeout=-1): """ Creates an endpoints CSV file for a SAN. Args: timeout: Timeout in seconds. Wait for task completion by default. The timeout does not abort the operation in OneView, just stops waiting for its compl...
python
def create_endpoints_csv_file(self, timeout=-1): """ Creates an endpoints CSV file for a SAN. Args: timeout: Timeout in seconds. Wait for task completion by default. The timeout does not abort the operation in OneView, just stops waiting for its compl...
[ "def", "create_endpoints_csv_file", "(", "self", ",", "timeout", "=", "-", "1", ")", ":", "uri", "=", "\"{}/endpoints/\"", ".", "format", "(", "self", ".", "data", "[", "\"uri\"", "]", ")", "return", "self", ".", "_helper", ".", "do_post", "(", "uri", ...
Creates an endpoints CSV file for a SAN. Args: timeout: Timeout in seconds. Wait for task completion by default. The timeout does not abort the operation in OneView, just stops waiting for its completion. Returns: dict: Endpoint CSV File Response...
[ "Creates", "an", "endpoints", "CSV", "file", "for", "a", "SAN", "." ]
3c6219723ef25e6e0c83d44a89007f89bc325b89
https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/fc_sans/managed_sans.py#L125-L138
train
HewlettPackard/python-hpOneView
hpOneView/resources/fc_sans/managed_sans.py
ManagedSANs.create_issues_report
def create_issues_report(self, timeout=-1): """ Creates an unexpected zoning report for a SAN. Args: timeout: Timeout in seconds. Wait for task completion by default. The timeout does not abort the operation in OneView, just stops waiting for its comp...
python
def create_issues_report(self, timeout=-1): """ Creates an unexpected zoning report for a SAN. Args: timeout: Timeout in seconds. Wait for task completion by default. The timeout does not abort the operation in OneView, just stops waiting for its comp...
[ "def", "create_issues_report", "(", "self", ",", "timeout", "=", "-", "1", ")", ":", "uri", "=", "\"{}/issues/\"", ".", "format", "(", "self", ".", "data", "[", "\"uri\"", "]", ")", "return", "self", ".", "_helper", ".", "create_report", "(", "uri", ",...
Creates an unexpected zoning report for a SAN. Args: timeout: Timeout in seconds. Wait for task completion by default. The timeout does not abort the operation in OneView, just stops waiting for its completion. Returns: list: A list of FCIssueRes...
[ "Creates", "an", "unexpected", "zoning", "report", "for", "a", "SAN", "." ]
3c6219723ef25e6e0c83d44a89007f89bc325b89
https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/fc_sans/managed_sans.py#L141-L154
train
HewlettPackard/python-hpOneView
hpOneView/resources/settings/appliance_device_snmp_v1_trap_destinations.py
ApplianceDeviceSNMPv1TrapDestinations.create
def create(self, resource, id=None, timeout=-1): """ Adds the specified trap forwarding destination. The trap destination associated with the specified id will be created if trap destination with that id does not exists. The id can only be an integer greater than 0. Args: ...
python
def create(self, resource, id=None, timeout=-1): """ Adds the specified trap forwarding destination. The trap destination associated with the specified id will be created if trap destination with that id does not exists. The id can only be an integer greater than 0. Args: ...
[ "def", "create", "(", "self", ",", "resource", ",", "id", "=", "None", ",", "timeout", "=", "-", "1", ")", ":", "if", "not", "id", ":", "available_id", "=", "self", ".", "__get_first_available_id", "(", ")", "uri", "=", "'%s/%s'", "%", "(", "self", ...
Adds the specified trap forwarding destination. The trap destination associated with the specified id will be created if trap destination with that id does not exists. The id can only be an integer greater than 0. Args: resource (dict): Object to create. timeout: ...
[ "Adds", "the", "specified", "trap", "forwarding", "destination", ".", "The", "trap", "destination", "associated", "with", "the", "specified", "id", "will", "be", "created", "if", "trap", "destination", "with", "that", "id", "does", "not", "exists", ".", "The",...
3c6219723ef25e6e0c83d44a89007f89bc325b89
https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/settings/appliance_device_snmp_v1_trap_destinations.py#L46-L67
train
HewlettPackard/python-hpOneView
hpOneView/resources/settings/appliance_device_snmp_v1_trap_destinations.py
ApplianceDeviceSNMPv1TrapDestinations.__findFirstMissing
def __findFirstMissing(self, array, start, end): """ Find the smallest elements missing in a sorted array. Returns: int: The smallest element missing. """ if (start > end): return end + 1 if (start != array[start]): return start ...
python
def __findFirstMissing(self, array, start, end): """ Find the smallest elements missing in a sorted array. Returns: int: The smallest element missing. """ if (start > end): return end + 1 if (start != array[start]): return start ...
[ "def", "__findFirstMissing", "(", "self", ",", "array", ",", "start", ",", "end", ")", ":", "if", "(", "start", ">", "end", ")", ":", "return", "end", "+", "1", "if", "(", "start", "!=", "array", "[", "start", "]", ")", ":", "return", "start", "m...
Find the smallest elements missing in a sorted array. Returns: int: The smallest element missing.
[ "Find", "the", "smallest", "elements", "missing", "in", "a", "sorted", "array", "." ]
3c6219723ef25e6e0c83d44a89007f89bc325b89
https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/settings/appliance_device_snmp_v1_trap_destinations.py#L69-L87
train
HewlettPackard/python-hpOneView
hpOneView/resources/settings/appliance_device_snmp_v1_trap_destinations.py
ApplianceDeviceSNMPv1TrapDestinations.__get_first_available_id
def __get_first_available_id(self): """ Private method to get the first available id. The id can only be an integer greater than 0. Returns: int: The first available id """ traps = self.get_all() if traps: used_ids = [0] for tr...
python
def __get_first_available_id(self): """ Private method to get the first available id. The id can only be an integer greater than 0. Returns: int: The first available id """ traps = self.get_all() if traps: used_ids = [0] for tr...
[ "def", "__get_first_available_id", "(", "self", ")", ":", "traps", "=", "self", ".", "get_all", "(", ")", "if", "traps", ":", "used_ids", "=", "[", "0", "]", "for", "trap", "in", "traps", ":", "used_uris", "=", "trap", ".", "get", "(", "'uri'", ")", ...
Private method to get the first available id. The id can only be an integer greater than 0. Returns: int: The first available id
[ "Private", "method", "to", "get", "the", "first", "available", "id", ".", "The", "id", "can", "only", "be", "an", "integer", "greater", "than", "0", "." ]
3c6219723ef25e6e0c83d44a89007f89bc325b89
https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/settings/appliance_device_snmp_v1_trap_destinations.py#L89-L106
train
HewlettPackard/python-hpOneView
hpOneView/resources/servers/id_pools_ipv4_ranges.py
IdPoolsIpv4Ranges.update
def update(self, information, timeout=-1): """ Edit an IPv4 Range. Args: information (dict): Information to update. timeout: Timeout in seconds. Wait for task completion by default. The timeout does not abort the operation in OneView; it just stops waitin...
python
def update(self, information, timeout=-1): """ Edit an IPv4 Range. Args: information (dict): Information to update. timeout: Timeout in seconds. Wait for task completion by default. The timeout does not abort the operation in OneView; it just stops waitin...
[ "def", "update", "(", "self", ",", "information", ",", "timeout", "=", "-", "1", ")", ":", "return", "self", ".", "_client", ".", "update", "(", "information", ",", "timeout", "=", "timeout", ")" ]
Edit an IPv4 Range. Args: information (dict): Information to update. timeout: Timeout in seconds. Wait for task completion by default. The timeout does not abort the operation in OneView; it just stops waiting for its completion. Returns: dict: Updat...
[ "Edit", "an", "IPv4", "Range", "." ]
3c6219723ef25e6e0c83d44a89007f89bc325b89
https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/servers/id_pools_ipv4_ranges.py#L92-L105
train
HewlettPackard/python-hpOneView
hpOneView/resources/task_monitor.py
TaskMonitor.wait_for_task
def wait_for_task(self, task, timeout=-1): """ Wait for task execution and return associated resource. Args: task: task dict timeout: timeout in seconds Returns: Associated resource when creating or updating; True when deleting. """ s...
python
def wait_for_task(self, task, timeout=-1): """ Wait for task execution and return associated resource. Args: task: task dict timeout: timeout in seconds Returns: Associated resource when creating or updating; True when deleting. """ s...
[ "def", "wait_for_task", "(", "self", ",", "task", ",", "timeout", "=", "-", "1", ")", ":", "self", ".", "__wait_task_completion", "(", "task", ",", "timeout", ")", "task", "=", "self", ".", "get", "(", "task", ")", "logger", ".", "debug", "(", "\"Wai...
Wait for task execution and return associated resource. Args: task: task dict timeout: timeout in seconds Returns: Associated resource when creating or updating; True when deleting.
[ "Wait", "for", "task", "execution", "and", "return", "associated", "resource", "." ]
3c6219723ef25e6e0c83d44a89007f89bc325b89
https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/task_monitor.py#L70-L90
train
HewlettPackard/python-hpOneView
hpOneView/resources/task_monitor.py
TaskMonitor.get_completed_task
def get_completed_task(self, task, timeout=-1): """ Waits until the task is completed and returns the task resource. Args: task: TaskResource timeout: Timeout in seconds Returns: dict: TaskResource """ self.__wait_task_completion(task...
python
def get_completed_task(self, task, timeout=-1): """ Waits until the task is completed and returns the task resource. Args: task: TaskResource timeout: Timeout in seconds Returns: dict: TaskResource """ self.__wait_task_completion(task...
[ "def", "get_completed_task", "(", "self", ",", "task", ",", "timeout", "=", "-", "1", ")", ":", "self", ".", "__wait_task_completion", "(", "task", ",", "timeout", ")", "return", "self", ".", "get", "(", "task", ")" ]
Waits until the task is completed and returns the task resource. Args: task: TaskResource timeout: Timeout in seconds Returns: dict: TaskResource
[ "Waits", "until", "the", "task", "is", "completed", "and", "returns", "the", "task", "resource", "." ]
3c6219723ef25e6e0c83d44a89007f89bc325b89
https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/task_monitor.py#L92-L105
train
HewlettPackard/python-hpOneView
hpOneView/resources/task_monitor.py
TaskMonitor.get_associated_resource
def get_associated_resource(self, task): """ Retrieve a resource associated with a task. Args: task: task dict Returns: tuple: task (updated), the entity found (dict) """ if not task: raise HPOneViewUnknownType(MSG_INVALID_TASK) ...
python
def get_associated_resource(self, task): """ Retrieve a resource associated with a task. Args: task: task dict Returns: tuple: task (updated), the entity found (dict) """ if not task: raise HPOneViewUnknownType(MSG_INVALID_TASK) ...
[ "def", "get_associated_resource", "(", "self", ",", "task", ")", ":", "if", "not", "task", ":", "raise", "HPOneViewUnknownType", "(", "MSG_INVALID_TASK", ")", "if", "task", "[", "'category'", "]", "!=", "'tasks'", "and", "task", "[", "'category'", "]", "!=",...
Retrieve a resource associated with a task. Args: task: task dict Returns: tuple: task (updated), the entity found (dict)
[ "Retrieve", "a", "resource", "associated", "with", "a", "task", "." ]
3c6219723ef25e6e0c83d44a89007f89bc325b89
https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/task_monitor.py#L225-L261
train
HewlettPackard/python-hpOneView
hpOneView/resources/settings/backups.py
Backups.update_config
def update_config(self, config, timeout=-1): """ Updates the remote server configuration and the automatic backup schedule for backup. Args: config (dict): Object to update. timeout: Timeout in seconds. Wait for task completion by default. The timeout doe...
python
def update_config(self, config, timeout=-1): """ Updates the remote server configuration and the automatic backup schedule for backup. Args: config (dict): Object to update. timeout: Timeout in seconds. Wait for task completion by default. The timeout doe...
[ "def", "update_config", "(", "self", ",", "config", ",", "timeout", "=", "-", "1", ")", ":", "return", "self", ".", "_client", ".", "update", "(", "config", ",", "uri", "=", "self", ".", "URI", "+", "\"/config\"", ",", "timeout", "=", "timeout", ")" ...
Updates the remote server configuration and the automatic backup schedule for backup. Args: config (dict): Object to update. timeout: Timeout in seconds. Wait for task completion by default. The timeout does not abort the operation in OneView, just stop w...
[ "Updates", "the", "remote", "server", "configuration", "and", "the", "automatic", "backup", "schedule", "for", "backup", "." ]
3c6219723ef25e6e0c83d44a89007f89bc325b89
https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/settings/backups.py#L125-L139
train
HewlettPackard/python-hpOneView
hpOneView/resources/settings/backups.py
Backups.update_remote_archive
def update_remote_archive(self, save_uri, timeout=-1): """ Saves a backup of the appliance to a previously-configured remote location. Args: save_uri (dict): The URI for saving the backup to a previously configured location. timeout: Timeout in seconds. W...
python
def update_remote_archive(self, save_uri, timeout=-1): """ Saves a backup of the appliance to a previously-configured remote location. Args: save_uri (dict): The URI for saving the backup to a previously configured location. timeout: Timeout in seconds. W...
[ "def", "update_remote_archive", "(", "self", ",", "save_uri", ",", "timeout", "=", "-", "1", ")", ":", "return", "self", ".", "_client", ".", "update_with_zero_body", "(", "uri", "=", "save_uri", ",", "timeout", "=", "timeout", ")" ]
Saves a backup of the appliance to a previously-configured remote location. Args: save_uri (dict): The URI for saving the backup to a previously configured location. timeout: Timeout in seconds. Wait for task completion by default. The timeout does not abort the operatio...
[ "Saves", "a", "backup", "of", "the", "appliance", "to", "a", "previously", "-", "configured", "remote", "location", "." ]
3c6219723ef25e6e0c83d44a89007f89bc325b89
https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/settings/backups.py#L141-L155
train
HewlettPackard/python-hpOneView
hpOneView/resources/networking/uplink_sets.py
UplinkSets.get_ethernet_networks
def get_ethernet_networks(self): """ Gets a list of associated ethernet networks of an uplink set. Args: id_or_uri: Can be either the uplink set id or the uplink set uri. Returns: list: Associated ethernet networks. """ network_uris = self.data.g...
python
def get_ethernet_networks(self): """ Gets a list of associated ethernet networks of an uplink set. Args: id_or_uri: Can be either the uplink set id or the uplink set uri. Returns: list: Associated ethernet networks. """ network_uris = self.data.g...
[ "def", "get_ethernet_networks", "(", "self", ")", ":", "network_uris", "=", "self", ".", "data", ".", "get", "(", "'networkUris'", ")", "networks", "=", "[", "]", "if", "network_uris", ":", "for", "uri", "in", "network_uris", ":", "networks", ".", "append"...
Gets a list of associated ethernet networks of an uplink set. Args: id_or_uri: Can be either the uplink set id or the uplink set uri. Returns: list: Associated ethernet networks.
[ "Gets", "a", "list", "of", "associated", "ethernet", "networks", "of", "an", "uplink", "set", "." ]
3c6219723ef25e6e0c83d44a89007f89bc325b89
https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/networking/uplink_sets.py#L60-L75
train
HewlettPackard/python-hpOneView
hpOneView/resources/networking/uplink_sets.py
UplinkSets.__set_ethernet_uris
def __set_ethernet_uris(self, ethernet_names, operation="add"): """Updates network uris.""" if not isinstance(ethernet_names, list): ethernet_names = [ethernet_names] associated_enets = self.data.get('networkUris', []) ethernet_uris = [] for i, enet in enumerate(eth...
python
def __set_ethernet_uris(self, ethernet_names, operation="add"): """Updates network uris.""" if not isinstance(ethernet_names, list): ethernet_names = [ethernet_names] associated_enets = self.data.get('networkUris', []) ethernet_uris = [] for i, enet in enumerate(eth...
[ "def", "__set_ethernet_uris", "(", "self", ",", "ethernet_names", ",", "operation", "=", "\"add\"", ")", ":", "if", "not", "isinstance", "(", "ethernet_names", ",", "list", ")", ":", "ethernet_names", "=", "[", "ethernet_names", "]", "associated_enets", "=", "...
Updates network uris.
[ "Updates", "network", "uris", "." ]
3c6219723ef25e6e0c83d44a89007f89bc325b89
https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/networking/uplink_sets.py#L110-L134
train
HewlettPackard/python-hpOneView
hpOneView/resources/networking/logical_interconnect_groups.py
LogicalInterconnectGroups.get_settings
def get_settings(self): """ Gets the interconnect settings for a logical interconnect group. Returns: dict: Interconnect Settings. """ uri = "{}/settings".format(self.data["uri"]) return self._helper.do_get(uri)
python
def get_settings(self): """ Gets the interconnect settings for a logical interconnect group. Returns: dict: Interconnect Settings. """ uri = "{}/settings".format(self.data["uri"]) return self._helper.do_get(uri)
[ "def", "get_settings", "(", "self", ")", ":", "uri", "=", "\"{}/settings\"", ".", "format", "(", "self", ".", "data", "[", "\"uri\"", "]", ")", "return", "self", ".", "_helper", ".", "do_get", "(", "uri", ")" ]
Gets the interconnect settings for a logical interconnect group. Returns: dict: Interconnect Settings.
[ "Gets", "the", "interconnect", "settings", "for", "a", "logical", "interconnect", "group", "." ]
3c6219723ef25e6e0c83d44a89007f89bc325b89
https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/networking/logical_interconnect_groups.py#L93-L101
train
HewlettPackard/python-hpOneView
hpOneView/resources/settings/firmware_bundles.py
FirmwareBundles.upload
def upload(self, file_path, timeout=-1): """ Upload an SPP ISO image file or a hotfix file to the appliance. The API supports upload of one hotfix at a time into the system. For the successful upload of a hotfix, ensure its original name and extension are not altered. Args: ...
python
def upload(self, file_path, timeout=-1): """ Upload an SPP ISO image file or a hotfix file to the appliance. The API supports upload of one hotfix at a time into the system. For the successful upload of a hotfix, ensure its original name and extension are not altered. Args: ...
[ "def", "upload", "(", "self", ",", "file_path", ",", "timeout", "=", "-", "1", ")", ":", "return", "self", ".", "_client", ".", "upload", "(", "file_path", ",", "timeout", "=", "timeout", ")" ]
Upload an SPP ISO image file or a hotfix file to the appliance. The API supports upload of one hotfix at a time into the system. For the successful upload of a hotfix, ensure its original name and extension are not altered. Args: file_path: Full path to firmware. timeout...
[ "Upload", "an", "SPP", "ISO", "image", "file", "or", "a", "hotfix", "file", "to", "the", "appliance", ".", "The", "API", "supports", "upload", "of", "one", "hotfix", "at", "a", "time", "into", "the", "system", ".", "For", "the", "successful", "upload", ...
3c6219723ef25e6e0c83d44a89007f89bc325b89
https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/settings/firmware_bundles.py#L48-L62
train
HewlettPackard/python-hpOneView
hpOneView/resources/search/index_resources.py
IndexResources.get
def get(self, uri): """ Gets an index resource by URI. Args: uri: The resource URI. Returns: dict: The index resource. """ uri = self.URI + uri return self._client.get(uri)
python
def get(self, uri): """ Gets an index resource by URI. Args: uri: The resource URI. Returns: dict: The index resource. """ uri = self.URI + uri return self._client.get(uri)
[ "def", "get", "(", "self", ",", "uri", ")", ":", "uri", "=", "self", ".", "URI", "+", "uri", "return", "self", ".", "_client", ".", "get", "(", "uri", ")" ]
Gets an index resource by URI. Args: uri: The resource URI. Returns: dict: The index resource.
[ "Gets", "an", "index", "resource", "by", "URI", "." ]
3c6219723ef25e6e0c83d44a89007f89bc325b89
https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/search/index_resources.py#L104-L115
train
HewlettPackard/python-hpOneView
hpOneView/resources/storage/storage_pools.py
StoragePools.get_reachable_storage_pools
def get_reachable_storage_pools(self, start=0, count=-1, filter='', query='', sort='', networks=None, scope_exclusions=None, scope_uris=''): """ Gets the storage pools that are connected on the specified networks based on the storage system port's expected net...
python
def get_reachable_storage_pools(self, start=0, count=-1, filter='', query='', sort='', networks=None, scope_exclusions=None, scope_uris=''): """ Gets the storage pools that are connected on the specified networks based on the storage system port's expected net...
[ "def", "get_reachable_storage_pools", "(", "self", ",", "start", "=", "0", ",", "count", "=", "-", "1", ",", "filter", "=", "''", ",", "query", "=", "''", ",", "sort", "=", "''", ",", "networks", "=", "None", ",", "scope_exclusions", "=", "None", ","...
Gets the storage pools that are connected on the specified networks based on the storage system port's expected network connectivity. Args: start: The first item to return, using 0-based indexing. If not specified, the default is 0 - start with the first available item. ...
[ "Gets", "the", "storage", "pools", "that", "are", "connected", "on", "the", "specified", "networks", "based", "on", "the", "storage", "system", "port", "s", "expected", "network", "connectivity", "." ]
3c6219723ef25e6e0c83d44a89007f89bc325b89
https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/storage/storage_pools.py#L138-L181
train
HewlettPackard/python-hpOneView
hpOneView/resources/security/certificate_rabbitmq.py
CertificateRabbitMQ.generate
def generate(self, information, timeout=-1): """ Generates a self signed certificate or an internal CA signed certificate for RabbitMQ clients. Args: information (dict): Information to generate the certificate for RabbitMQ clients. timeout: Timeout in sec...
python
def generate(self, information, timeout=-1): """ Generates a self signed certificate or an internal CA signed certificate for RabbitMQ clients. Args: information (dict): Information to generate the certificate for RabbitMQ clients. timeout: Timeout in sec...
[ "def", "generate", "(", "self", ",", "information", ",", "timeout", "=", "-", "1", ")", ":", "return", "self", ".", "_client", ".", "create", "(", "information", ",", "timeout", "=", "timeout", ")" ]
Generates a self signed certificate or an internal CA signed certificate for RabbitMQ clients. Args: information (dict): Information to generate the certificate for RabbitMQ clients. timeout: Timeout in seconds. Wait for task completion by default. The timeout does not a...
[ "Generates", "a", "self", "signed", "certificate", "or", "an", "internal", "CA", "signed", "certificate", "for", "RabbitMQ", "clients", "." ]
3c6219723ef25e6e0c83d44a89007f89bc325b89
https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/security/certificate_rabbitmq.py#L44-L57
train
HewlettPackard/python-hpOneView
hpOneView/resources/security/certificate_rabbitmq.py
CertificateRabbitMQ.get_key_pair
def get_key_pair(self, alias_name): """ Retrieves the public and private key pair associated with the specified alias name. Args: alias_name: Key pair associated with the RabbitMQ Returns: dict: RabbitMQ certificate """ uri = self.URI + "/keypair...
python
def get_key_pair(self, alias_name): """ Retrieves the public and private key pair associated with the specified alias name. Args: alias_name: Key pair associated with the RabbitMQ Returns: dict: RabbitMQ certificate """ uri = self.URI + "/keypair...
[ "def", "get_key_pair", "(", "self", ",", "alias_name", ")", ":", "uri", "=", "self", ".", "URI", "+", "\"/keypair/\"", "+", "alias_name", "return", "self", ".", "_client", ".", "get", "(", "uri", ")" ]
Retrieves the public and private key pair associated with the specified alias name. Args: alias_name: Key pair associated with the RabbitMQ Returns: dict: RabbitMQ certificate
[ "Retrieves", "the", "public", "and", "private", "key", "pair", "associated", "with", "the", "specified", "alias", "name", "." ]
3c6219723ef25e6e0c83d44a89007f89bc325b89
https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/security/certificate_rabbitmq.py#L71-L82
train
HewlettPackard/python-hpOneView
hpOneView/resources/security/certificate_rabbitmq.py
CertificateRabbitMQ.get_keys
def get_keys(self, alias_name, key_format): """ Retrieves the contents of PKCS12 file in the format specified. This PKCS12 formatted file contains both the certificate as well as the key file data. Valid key formats are Base64 and PKCS12. Args: alias_name: Key pair a...
python
def get_keys(self, alias_name, key_format): """ Retrieves the contents of PKCS12 file in the format specified. This PKCS12 formatted file contains both the certificate as well as the key file data. Valid key formats are Base64 and PKCS12. Args: alias_name: Key pair a...
[ "def", "get_keys", "(", "self", ",", "alias_name", ",", "key_format", ")", ":", "uri", "=", "self", ".", "URI", "+", "\"/keys/\"", "+", "alias_name", "+", "\"?format=\"", "+", "key_format", "return", "self", ".", "_client", ".", "get", "(", "uri", ")" ]
Retrieves the contents of PKCS12 file in the format specified. This PKCS12 formatted file contains both the certificate as well as the key file data. Valid key formats are Base64 and PKCS12. Args: alias_name: Key pair associated with the RabbitMQ key_format: Valid key fo...
[ "Retrieves", "the", "contents", "of", "PKCS12", "file", "in", "the", "format", "specified", ".", "This", "PKCS12", "formatted", "file", "contains", "both", "the", "certificate", "as", "well", "as", "the", "key", "file", "data", ".", "Valid", "key", "formats"...
3c6219723ef25e6e0c83d44a89007f89bc325b89
https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/security/certificate_rabbitmq.py#L84-L97
train
HewlettPackard/python-hpOneView
hpOneView/resources/servers/id_pools.py
IdPools.validate_id_pool
def validate_id_pool(self, id_or_uri, ids_pools): """ Validates an ID pool. Args: id_or_uri: ID or URI of range. ids_pools (list): List of Id Pools. Returns: dict: A dict containing a list with IDs. """ ...
python
def validate_id_pool(self, id_or_uri, ids_pools): """ Validates an ID pool. Args: id_or_uri: ID or URI of range. ids_pools (list): List of Id Pools. Returns: dict: A dict containing a list with IDs. """ ...
[ "def", "validate_id_pool", "(", "self", ",", "id_or_uri", ",", "ids_pools", ")", ":", "uri", "=", "self", ".", "_client", ".", "build_uri", "(", "id_or_uri", ")", "+", "\"/validate?idList=\"", "+", "\"&idList=\"", ".", "join", "(", "ids_pools", ")", "return"...
Validates an ID pool. Args: id_or_uri: ID or URI of range. ids_pools (list): List of Id Pools. Returns: dict: A dict containing a list with IDs.
[ "Validates", "an", "ID", "pool", "." ]
3c6219723ef25e6e0c83d44a89007f89bc325b89
https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/servers/id_pools.py#L73-L87
train
HewlettPackard/python-hpOneView
hpOneView/resources/servers/id_pools.py
IdPools.generate
def generate(self, id_or_uri): """ Generates and returns a random range. Args: id_or_uri: ID or URI of range. Returns: dict: A dict containing a list with IDs. """ uri = self._client.build_uri(id_or_uri) + "/generate" retu...
python
def generate(self, id_or_uri): """ Generates and returns a random range. Args: id_or_uri: ID or URI of range. Returns: dict: A dict containing a list with IDs. """ uri = self._client.build_uri(id_or_uri) + "/generate" retu...
[ "def", "generate", "(", "self", ",", "id_or_uri", ")", ":", "uri", "=", "self", ".", "_client", ".", "build_uri", "(", "id_or_uri", ")", "+", "\"/generate\"", "return", "self", ".", "_client", ".", "get", "(", "uri", ")" ]
Generates and returns a random range. Args: id_or_uri: ID or URI of range. Returns: dict: A dict containing a list with IDs.
[ "Generates", "and", "returns", "a", "random", "range", "." ]
3c6219723ef25e6e0c83d44a89007f89bc325b89
https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/servers/id_pools.py#L169-L181
train
HewlettPackard/python-hpOneView
hpOneView/resources/storage/storage_volume_templates.py
StorageVolumeTemplates.get_connectable_volume_templates
def get_connectable_volume_templates(self, start=0, count=-1, filter='', query='', sort=''): """ Gets the storage volume templates that are available on the specified networks based on the storage system port's expected network connectivity. If there are no storage volume templates that meet the...
python
def get_connectable_volume_templates(self, start=0, count=-1, filter='', query='', sort=''): """ Gets the storage volume templates that are available on the specified networks based on the storage system port's expected network connectivity. If there are no storage volume templates that meet the...
[ "def", "get_connectable_volume_templates", "(", "self", ",", "start", "=", "0", ",", "count", "=", "-", "1", ",", "filter", "=", "''", ",", "query", "=", "''", ",", "sort", "=", "''", ")", ":", "uri", "=", "self", ".", "URI", "+", "\"/connectable-vol...
Gets the storage volume templates that are available on the specified networks based on the storage system port's expected network connectivity. If there are no storage volume templates that meet the specified connectivity criteria, an empty collection will be returned. Returns: lis...
[ "Gets", "the", "storage", "volume", "templates", "that", "are", "available", "on", "the", "specified", "networks", "based", "on", "the", "storage", "system", "port", "s", "expected", "network", "connectivity", ".", "If", "there", "are", "no", "storage", "volum...
3c6219723ef25e6e0c83d44a89007f89bc325b89
https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/storage/storage_volume_templates.py#L107-L120
train
HewlettPackard/python-hpOneView
hpOneView/resources/storage/storage_volume_templates.py
StorageVolumeTemplates.get_reachable_volume_templates
def get_reachable_volume_templates(self, start=0, count=-1, filter='', query='', sort='', networks=None, scope_uris='', private_allowed_only=False): """ Gets the storage templates that are connected on the specified networks based on the storage system port...
python
def get_reachable_volume_templates(self, start=0, count=-1, filter='', query='', sort='', networks=None, scope_uris='', private_allowed_only=False): """ Gets the storage templates that are connected on the specified networks based on the storage system port...
[ "def", "get_reachable_volume_templates", "(", "self", ",", "start", "=", "0", ",", "count", "=", "-", "1", ",", "filter", "=", "''", ",", "query", "=", "''", ",", "sort", "=", "''", ",", "networks", "=", "None", ",", "scope_uris", "=", "''", ",", "...
Gets the storage templates that are connected on the specified networks based on the storage system port's expected network connectivity. Returns: list: Storage volume templates.
[ "Gets", "the", "storage", "templates", "that", "are", "connected", "on", "the", "specified", "networks", "based", "on", "the", "storage", "system", "port", "s", "expected", "network", "connectivity", "." ]
3c6219723ef25e6e0c83d44a89007f89bc325b89
https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/storage/storage_volume_templates.py#L122-L137
train
HewlettPackard/python-hpOneView
hpOneView/resources/storage/storage_volume_templates.py
StorageVolumeTemplates.get_compatible_systems
def get_compatible_systems(self, id_or_uri): """ Retrieves a collection of all storage systems that is applicable to this storage volume template. Args: id_or_uri: Can be either the power device id or the uri Returns: list: Storage systems. ...
python
def get_compatible_systems(self, id_or_uri): """ Retrieves a collection of all storage systems that is applicable to this storage volume template. Args: id_or_uri: Can be either the power device id or the uri Returns: list: Storage systems. ...
[ "def", "get_compatible_systems", "(", "self", ",", "id_or_uri", ")", ":", "uri", "=", "self", ".", "_client", ".", "build_uri", "(", "id_or_uri", ")", "+", "\"/compatible-systems\"", "return", "self", ".", "_client", ".", "get", "(", "uri", ")" ]
Retrieves a collection of all storage systems that is applicable to this storage volume template. Args: id_or_uri: Can be either the power device id or the uri Returns: list: Storage systems.
[ "Retrieves", "a", "collection", "of", "all", "storage", "systems", "that", "is", "applicable", "to", "this", "storage", "volume", "template", "." ]
3c6219723ef25e6e0c83d44a89007f89bc325b89
https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/storage/storage_volume_templates.py#L139-L151
train
HewlettPackard/python-hpOneView
hpOneView/resources/storage/volumes.py
Volumes.add_from_existing
def add_from_existing(self, resource, timeout=-1): """ Adds a volume that already exists in the Storage system Args: resource (dict): Object to create. timeout: Timeout in seconds. Wait for task completion by default. The timeout does not ...
python
def add_from_existing(self, resource, timeout=-1): """ Adds a volume that already exists in the Storage system Args: resource (dict): Object to create. timeout: Timeout in seconds. Wait for task completion by default. The timeout does not ...
[ "def", "add_from_existing", "(", "self", ",", "resource", ",", "timeout", "=", "-", "1", ")", ":", "uri", "=", "self", ".", "URI", "+", "\"/from-existing\"", "return", "self", ".", "_client", ".", "create", "(", "resource", ",", "uri", "=", "uri", ",",...
Adds a volume that already exists in the Storage system Args: resource (dict): Object to create. timeout: Timeout in seconds. Wait for task completion by default. The timeout does not abort the operation in OneView, just stop waiting for i...
[ "Adds", "a", "volume", "that", "already", "exists", "in", "the", "Storage", "system" ]
3c6219723ef25e6e0c83d44a89007f89bc325b89
https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/storage/volumes.py#L136-L151
train
HewlettPackard/python-hpOneView
hpOneView/resources/storage/volumes.py
Volumes.create_from_snapshot
def create_from_snapshot(self, data, timeout=-1): """ Creates a new volume on the storage system from a snapshot of a volume. A volume template must also be specified when creating a volume from a snapshot. The global setting "StorageVolumeTemplateRequired" controls whether or n...
python
def create_from_snapshot(self, data, timeout=-1): """ Creates a new volume on the storage system from a snapshot of a volume. A volume template must also be specified when creating a volume from a snapshot. The global setting "StorageVolumeTemplateRequired" controls whether or n...
[ "def", "create_from_snapshot", "(", "self", ",", "data", ",", "timeout", "=", "-", "1", ")", ":", "uri", "=", "self", ".", "URI", "+", "\"/from-snapshot\"", "return", "self", ".", "_client", ".", "create", "(", "data", ",", "uri", "=", "uri", ",", "t...
Creates a new volume on the storage system from a snapshot of a volume. A volume template must also be specified when creating a volume from a snapshot. The global setting "StorageVolumeTemplateRequired" controls whether or not root volume templates can be used to provision volumes. The...
[ "Creates", "a", "new", "volume", "on", "the", "storage", "system", "from", "a", "snapshot", "of", "a", "volume", ".", "A", "volume", "template", "must", "also", "be", "specified", "when", "creating", "a", "volume", "from", "a", "snapshot", "." ]
3c6219723ef25e6e0c83d44a89007f89bc325b89
https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/storage/volumes.py#L153-L175
train
HewlettPackard/python-hpOneView
hpOneView/resources/storage/volumes.py
Volumes.delete
def delete(self, resource, force=False, export_only=None, suppress_device_updates=None, timeout=-1): """ Deletes a managed volume. Args: resource (dict): Object to delete. force: If set to true, the operation completes despite any problem...
python
def delete(self, resource, force=False, export_only=None, suppress_device_updates=None, timeout=-1): """ Deletes a managed volume. Args: resource (dict): Object to delete. force: If set to true, the operation completes despite any problem...
[ "def", "delete", "(", "self", ",", "resource", ",", "force", "=", "False", ",", "export_only", "=", "None", ",", "suppress_device_updates", "=", "None", ",", "timeout", "=", "-", "1", ")", ":", "custom_headers", "=", "{", "'If-Match'", ":", "'*'", "}", ...
Deletes a managed volume. Args: resource (dict): Object to delete. force: If set to true, the operation completes despite any problems with network connectivity or errors on the resource itself. The default is false. timeout:...
[ "Deletes", "a", "managed", "volume", "." ]
3c6219723ef25e6e0c83d44a89007f89bc325b89
https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/storage/volumes.py#L197-L231
train
HewlettPackard/python-hpOneView
hpOneView/resources/storage/volumes.py
Volumes.get_snapshots
def get_snapshots(self, volume_id_or_uri, start=0, count=-1, filter='', sort=''): """ Gets all snapshots of a volume. Returns a list of snapshots based on optional sorting and filtering, and constrained by start and count parameters. Args: volume_id_or_uri: C...
python
def get_snapshots(self, volume_id_or_uri, start=0, count=-1, filter='', sort=''): """ Gets all snapshots of a volume. Returns a list of snapshots based on optional sorting and filtering, and constrained by start and count parameters. Args: volume_id_or_uri: C...
[ "def", "get_snapshots", "(", "self", ",", "volume_id_or_uri", ",", "start", "=", "0", ",", "count", "=", "-", "1", ",", "filter", "=", "''", ",", "sort", "=", "''", ")", ":", "uri", "=", "self", ".", "__build_volume_snapshot_uri", "(", "volume_id_or_uri"...
Gets all snapshots of a volume. Returns a list of snapshots based on optional sorting and filtering, and constrained by start and count parameters. Args: volume_id_or_uri: Can be either the volume id or the volume uri. start: The first item to ret...
[ "Gets", "all", "snapshots", "of", "a", "volume", ".", "Returns", "a", "list", "of", "snapshots", "based", "on", "optional", "sorting", "and", "filtering", "and", "constrained", "by", "start", "and", "count", "parameters", "." ]
3c6219723ef25e6e0c83d44a89007f89bc325b89
https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/storage/volumes.py#L242-L268
train
HewlettPackard/python-hpOneView
hpOneView/resources/storage/volumes.py
Volumes.create_snapshot
def create_snapshot(self, volume_id_or_uri, snapshot, timeout=-1): """ Creates a snapshot for the specified volume. Args: volume_id_or_uri: Can be either the volume ID or the volume URI. snapshot (dict): Object to create. timeo...
python
def create_snapshot(self, volume_id_or_uri, snapshot, timeout=-1): """ Creates a snapshot for the specified volume. Args: volume_id_or_uri: Can be either the volume ID or the volume URI. snapshot (dict): Object to create. timeo...
[ "def", "create_snapshot", "(", "self", ",", "volume_id_or_uri", ",", "snapshot", ",", "timeout", "=", "-", "1", ")", ":", "uri", "=", "self", ".", "__build_volume_snapshot_uri", "(", "volume_id_or_uri", ")", "return", "self", ".", "_client", ".", "create", "...
Creates a snapshot for the specified volume. Args: volume_id_or_uri: Can be either the volume ID or the volume URI. snapshot (dict): Object to create. timeout: Timeout in seconds. Wait for task completion by default. The timeou...
[ "Creates", "a", "snapshot", "for", "the", "specified", "volume", "." ]
3c6219723ef25e6e0c83d44a89007f89bc325b89
https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/storage/volumes.py#L270-L288
train
HewlettPackard/python-hpOneView
hpOneView/resources/storage/volumes.py
Volumes.get_snapshot
def get_snapshot(self, snapshot_id_or_uri, volume_id_or_uri=None): """ Gets a snapshot of a volume. Args: volume_id_or_uri: Can be either the volume ID or the volume URI. It is optional if it is passed a snapshot URI, but required if it passed a snaps...
python
def get_snapshot(self, snapshot_id_or_uri, volume_id_or_uri=None): """ Gets a snapshot of a volume. Args: volume_id_or_uri: Can be either the volume ID or the volume URI. It is optional if it is passed a snapshot URI, but required if it passed a snaps...
[ "def", "get_snapshot", "(", "self", ",", "snapshot_id_or_uri", ",", "volume_id_or_uri", "=", "None", ")", ":", "uri", "=", "self", ".", "__build_volume_snapshot_uri", "(", "volume_id_or_uri", ",", "snapshot_id_or_uri", ")", "return", "self", ".", "_client", ".", ...
Gets a snapshot of a volume. Args: volume_id_or_uri: Can be either the volume ID or the volume URI. It is optional if it is passed a snapshot URI, but required if it passed a snapshot ID. snapshot_id_or_uri: Can be either the snapshot ID o...
[ "Gets", "a", "snapshot", "of", "a", "volume", "." ]
3c6219723ef25e6e0c83d44a89007f89bc325b89
https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/storage/volumes.py#L290-L305
train
HewlettPackard/python-hpOneView
hpOneView/resources/storage/volumes.py
Volumes.get_snapshot_by
def get_snapshot_by(self, volume_id_or_uri, field, value): """ Gets all snapshots that match the filter. The search is case-insensitive. Args: volume_id_or_uri: Can be either the volume id or the volume uri. field: Field name to filter. value: Value ...
python
def get_snapshot_by(self, volume_id_or_uri, field, value): """ Gets all snapshots that match the filter. The search is case-insensitive. Args: volume_id_or_uri: Can be either the volume id or the volume uri. field: Field name to filter. value: Value ...
[ "def", "get_snapshot_by", "(", "self", ",", "volume_id_or_uri", ",", "field", ",", "value", ")", ":", "uri", "=", "self", ".", "__build_volume_snapshot_uri", "(", "volume_id_or_uri", ")", "return", "self", ".", "_client", ".", "get_by", "(", "field", ",", "v...
Gets all snapshots that match the filter. The search is case-insensitive. Args: volume_id_or_uri: Can be either the volume id or the volume uri. field: Field name to filter. value: Value to filter. Returns: list: Snapshots
[ "Gets", "all", "snapshots", "that", "match", "the", "filter", "." ]
3c6219723ef25e6e0c83d44a89007f89bc325b89
https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/storage/volumes.py#L327-L342
train
HewlettPackard/python-hpOneView
hpOneView/resources/storage/volumes.py
Volumes.get_extra_managed_storage_volume_paths
def get_extra_managed_storage_volume_paths(self, start=0, count=-1, filter='', sort=''): """ Gets the list of extra managed storage volume paths. Args: start: The first item to return, using 0-based indexing. If not specified, the default is 0 - start...
python
def get_extra_managed_storage_volume_paths(self, start=0, count=-1, filter='', sort=''): """ Gets the list of extra managed storage volume paths. Args: start: The first item to return, using 0-based indexing. If not specified, the default is 0 - start...
[ "def", "get_extra_managed_storage_volume_paths", "(", "self", ",", "start", "=", "0", ",", "count", "=", "-", "1", ",", "filter", "=", "''", ",", "sort", "=", "''", ")", ":", "uri", "=", "self", ".", "URI", "+", "'/repair?alertFixType=ExtraManagedStorageVolu...
Gets the list of extra managed storage volume paths. Args: start: The first item to return, using 0-based indexing. If not specified, the default is 0 - start with the first available item. count: The number of resources to return. A count...
[ "Gets", "the", "list", "of", "extra", "managed", "storage", "volume", "paths", "." ]
3c6219723ef25e6e0c83d44a89007f89bc325b89
https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/storage/volumes.py#L344-L367
train
HewlettPackard/python-hpOneView
hpOneView/resources/storage/volumes.py
Volumes.repair
def repair(self, volume_id_or_uri, timeout=-1): """ Removes extra presentations from a specified volume on the storage system. Args: volume_id_or_uri: Can be either the volume id or the volume uri. timeout: Timeout in seconds. Wait for tas...
python
def repair(self, volume_id_or_uri, timeout=-1): """ Removes extra presentations from a specified volume on the storage system. Args: volume_id_or_uri: Can be either the volume id or the volume uri. timeout: Timeout in seconds. Wait for tas...
[ "def", "repair", "(", "self", ",", "volume_id_or_uri", ",", "timeout", "=", "-", "1", ")", ":", "data", "=", "{", "\"type\"", ":", "\"ExtraManagedStorageVolumePaths\"", ",", "\"resourceUri\"", ":", "self", ".", "_client", ".", "build_uri", "(", "volume_id_or_u...
Removes extra presentations from a specified volume on the storage system. Args: volume_id_or_uri: Can be either the volume id or the volume uri. timeout: Timeout in seconds. Wait for task completion by default. The timeout does not abort the operation in...
[ "Removes", "extra", "presentations", "from", "a", "specified", "volume", "on", "the", "storage", "system", "." ]
3c6219723ef25e6e0c83d44a89007f89bc325b89
https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/storage/volumes.py#L369-L389
train
HewlettPackard/python-hpOneView
hpOneView/resources/storage/volumes.py
Volumes.get_attachable_volumes
def get_attachable_volumes(self, start=0, count=-1, filter='', query='', sort='', scope_uris='', connections=''): """ Gets the volumes that are connected on the specified networks based on the storage system port's expected network connectivity. A volume is attachable if it satisfies ei...
python
def get_attachable_volumes(self, start=0, count=-1, filter='', query='', sort='', scope_uris='', connections=''): """ Gets the volumes that are connected on the specified networks based on the storage system port's expected network connectivity. A volume is attachable if it satisfies ei...
[ "def", "get_attachable_volumes", "(", "self", ",", "start", "=", "0", ",", "count", "=", "-", "1", ",", "filter", "=", "''", ",", "query", "=", "''", ",", "sort", "=", "''", ",", "scope_uris", "=", "''", ",", "connections", "=", "''", ")", ":", "...
Gets the volumes that are connected on the specified networks based on the storage system port's expected network connectivity. A volume is attachable if it satisfies either of the following conditions: * The volume is shareable. * The volume not shareable and not attached. ...
[ "Gets", "the", "volumes", "that", "are", "connected", "on", "the", "specified", "networks", "based", "on", "the", "storage", "system", "port", "s", "expected", "network", "connectivity", "." ]
3c6219723ef25e6e0c83d44a89007f89bc325b89
https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/storage/volumes.py#L391-L429
train
HewlettPackard/python-hpOneView
hpOneView/resources/servers/enclosures.py
Enclosures.update_configuration
def update_configuration(self, timeout=-1): """ Reapplies the appliance's configuration on the enclosure. This includes running the same configure steps that were performed as part of the enclosure add. Args: timeout: Timeout in seconds. Wait for task completion by default. ...
python
def update_configuration(self, timeout=-1): """ Reapplies the appliance's configuration on the enclosure. This includes running the same configure steps that were performed as part of the enclosure add. Args: timeout: Timeout in seconds. Wait for task completion by default. ...
[ "def", "update_configuration", "(", "self", ",", "timeout", "=", "-", "1", ")", ":", "uri", "=", "\"{}/configuration\"", ".", "format", "(", "self", ".", "data", "[", "'uri'", "]", ")", "return", "self", ".", "update_with_zero_body", "(", "uri", "=", "ur...
Reapplies the appliance's configuration on the enclosure. This includes running the same configure steps that were performed as part of the enclosure add. Args: timeout: Timeout in seconds. Wait for task completion by default. The timeout does not abort the operation in OneV...
[ "Reapplies", "the", "appliance", "s", "configuration", "on", "the", "enclosure", ".", "This", "includes", "running", "the", "same", "configure", "steps", "that", "were", "performed", "as", "part", "of", "the", "enclosure", "add", "." ]
3c6219723ef25e6e0c83d44a89007f89bc325b89
https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/servers/enclosures.py#L106-L119
train
HewlettPackard/python-hpOneView
hpOneView/resources/servers/enclosures.py
Enclosures.get_by_hostname
def get_by_hostname(self, hostname): """Get enclosure by it's hostname""" def filter_by_hostname(hostname, enclosure): is_primary_ip = ('activeOaPreferredIP' in enclosure and enclosure['activeOaPreferredIP'] == hostname) is_standby_ip = ('standbyOaPreferredIP' in enclosure and en...
python
def get_by_hostname(self, hostname): """Get enclosure by it's hostname""" def filter_by_hostname(hostname, enclosure): is_primary_ip = ('activeOaPreferredIP' in enclosure and enclosure['activeOaPreferredIP'] == hostname) is_standby_ip = ('standbyOaPreferredIP' in enclosure and en...
[ "def", "get_by_hostname", "(", "self", ",", "hostname", ")", ":", "def", "filter_by_hostname", "(", "hostname", ",", "enclosure", ")", ":", "is_primary_ip", "=", "(", "'activeOaPreferredIP'", "in", "enclosure", "and", "enclosure", "[", "'activeOaPreferredIP'", "]"...
Get enclosure by it's hostname
[ "Get", "enclosure", "by", "it", "s", "hostname" ]
3c6219723ef25e6e0c83d44a89007f89bc325b89
https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/servers/enclosures.py#L121-L136
train
HewlettPackard/python-hpOneView
hpOneView/resources/servers/enclosures.py
Enclosures.update_environmental_configuration
def update_environmental_configuration(self, configuration, timeout=-1): """ Sets the calibrated max power of an unmanaged or unsupported enclosure. Args: configuration: Configuration timeout: Timeout in seconds. Wait for task completion by default. The timeout does not ...
python
def update_environmental_configuration(self, configuration, timeout=-1): """ Sets the calibrated max power of an unmanaged or unsupported enclosure. Args: configuration: Configuration timeout: Timeout in seconds. Wait for task completion by default. The timeout does not ...
[ "def", "update_environmental_configuration", "(", "self", ",", "configuration", ",", "timeout", "=", "-", "1", ")", ":", "uri", "=", "'{}/environmentalConfiguration'", ".", "format", "(", "self", ".", "data", "[", "'uri'", "]", ")", "return", "self", ".", "_...
Sets the calibrated max power of an unmanaged or unsupported enclosure. Args: configuration: Configuration timeout: Timeout in seconds. Wait for task completion by default. The timeout does not abort the operation in OneView; it just stops waiting for its completion. ...
[ "Sets", "the", "calibrated", "max", "power", "of", "an", "unmanaged", "or", "unsupported", "enclosure", "." ]
3c6219723ef25e6e0c83d44a89007f89bc325b89
https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/servers/enclosures.py#L151-L164
train
HewlettPackard/python-hpOneView
hpOneView/resources/servers/enclosures.py
Enclosures.import_certificate
def import_certificate(self, certificate_data, bay_number=None): """ Imports a signed server certificate into the enclosure. Args: certificate_data: Dictionary with Signed certificate and type. bay_number: OA to which the signed certificate will be imported. Ret...
python
def import_certificate(self, certificate_data, bay_number=None): """ Imports a signed server certificate into the enclosure. Args: certificate_data: Dictionary with Signed certificate and type. bay_number: OA to which the signed certificate will be imported. Ret...
[ "def", "import_certificate", "(", "self", ",", "certificate_data", ",", "bay_number", "=", "None", ")", ":", "uri", "=", "\"{}/https/certificaterequest\"", ".", "format", "(", "self", ".", "data", "[", "'uri'", "]", ")", "if", "bay_number", ":", "uri", "+=",...
Imports a signed server certificate into the enclosure. Args: certificate_data: Dictionary with Signed certificate and type. bay_number: OA to which the signed certificate will be imported. Returns: Enclosure.
[ "Imports", "a", "signed", "server", "certificate", "into", "the", "enclosure", "." ]
3c6219723ef25e6e0c83d44a89007f89bc325b89
https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/servers/enclosures.py#L251-L268
train
HewlettPackard/python-hpOneView
hpOneView/resources/security/certificate_authority.py
CertificateAuthority.delete
def delete(self, alias_name, timeout=-1): """ Revokes a certificate signed by the internal CA. If client certificate to be revoked is RabbitMQ_readonly, then the internal CA root certificate, RabbitMQ client certificate and RabbitMQ server certificate will be regenerated. This will inval...
python
def delete(self, alias_name, timeout=-1): """ Revokes a certificate signed by the internal CA. If client certificate to be revoked is RabbitMQ_readonly, then the internal CA root certificate, RabbitMQ client certificate and RabbitMQ server certificate will be regenerated. This will inval...
[ "def", "delete", "(", "self", ",", "alias_name", ",", "timeout", "=", "-", "1", ")", ":", "uri", "=", "self", ".", "URI", "+", "\"/\"", "+", "alias_name", "return", "self", ".", "_client", ".", "delete", "(", "uri", ",", "timeout", "=", "timeout", ...
Revokes a certificate signed by the internal CA. If client certificate to be revoked is RabbitMQ_readonly, then the internal CA root certificate, RabbitMQ client certificate and RabbitMQ server certificate will be regenerated. This will invalidate the previous version of RabbitMQ client certificate and ...
[ "Revokes", "a", "certificate", "signed", "by", "the", "internal", "CA", ".", "If", "client", "certificate", "to", "be", "revoked", "is", "RabbitMQ_readonly", "then", "the", "internal", "CA", "root", "certificate", "RabbitMQ", "client", "certificate", "and", "Rab...
3c6219723ef25e6e0c83d44a89007f89bc325b89
https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/security/certificate_authority.py#L67-L81
train
HewlettPackard/python-hpOneView
hpOneView/resources/settings/scopes.py
Scopes.get_by_name
def get_by_name(self, name): """ Gets a Scope by name. Args: name: Name of the Scope Returns: dict: Scope. """ scopes = self._client.get_all() result = [x for x in scopes if x['name'] == name] return result[0] if result else None
python
def get_by_name(self, name): """ Gets a Scope by name. Args: name: Name of the Scope Returns: dict: Scope. """ scopes = self._client.get_all() result = [x for x in scopes if x['name'] == name] return result[0] if result else None
[ "def", "get_by_name", "(", "self", ",", "name", ")", ":", "scopes", "=", "self", ".", "_client", ".", "get_all", "(", ")", "result", "=", "[", "x", "for", "x", "in", "scopes", "if", "x", "[", "'name'", "]", "==", "name", "]", "return", "result", ...
Gets a Scope by name. Args: name: Name of the Scope Returns: dict: Scope.
[ "Gets", "a", "Scope", "by", "name", "." ]
3c6219723ef25e6e0c83d44a89007f89bc325b89
https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/settings/scopes.py#L95-L107
train
HewlettPackard/python-hpOneView
hpOneView/resources/settings/scopes.py
Scopes.create
def create(self, resource, timeout=-1): """ Creates a scope. Args: resource (dict): Object to create. timeout: Timeout in seconds. Wait for task completion by default. The timeout does not abort the operation in OneView, just stop waiting ...
python
def create(self, resource, timeout=-1): """ Creates a scope. Args: resource (dict): Object to create. timeout: Timeout in seconds. Wait for task completion by default. The timeout does not abort the operation in OneView, just stop waiting ...
[ "def", "create", "(", "self", ",", "resource", ",", "timeout", "=", "-", "1", ")", ":", "return", "self", ".", "_client", ".", "create", "(", "resource", ",", "timeout", "=", "timeout", ",", "default_values", "=", "self", ".", "DEFAULT_VALUES", ")" ]
Creates a scope. Args: resource (dict): Object to create. timeout: Timeout in seconds. Wait for task completion by default. The timeout does not abort the operation in OneView, just stop waiting for its completion. Returns: dict: Crea...
[ "Creates", "a", "scope", "." ]
3c6219723ef25e6e0c83d44a89007f89bc325b89
https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/settings/scopes.py#L109-L123
train
HewlettPackard/python-hpOneView
hpOneView/resources/settings/scopes.py
Scopes.delete
def delete(self, resource, timeout=-1): """ Deletes a Scope. Args: resource: dict object to delete timeout: Timeout in seconds. Wait for task completion by default. The timeout does not abort the operation in OneView; it just stops waiting...
python
def delete(self, resource, timeout=-1): """ Deletes a Scope. Args: resource: dict object to delete timeout: Timeout in seconds. Wait for task completion by default. The timeout does not abort the operation in OneView; it just stops waiting...
[ "def", "delete", "(", "self", ",", "resource", ",", "timeout", "=", "-", "1", ")", ":", "if", "type", "(", "resource", ")", "is", "dict", ":", "headers", "=", "{", "'If-Match'", ":", "resource", ".", "get", "(", "'eTag'", ",", "'*'", ")", "}", "e...
Deletes a Scope. Args: resource: dict object to delete timeout: Timeout in seconds. Wait for task completion by default. The timeout does not abort the operation in OneView; it just stops waiting for its completion. Returns: bool: Ind...
[ "Deletes", "a", "Scope", "." ]
3c6219723ef25e6e0c83d44a89007f89bc325b89
https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/settings/scopes.py#L143-L161
train
HewlettPackard/python-hpOneView
hpOneView/resources/settings/scopes.py
Scopes.update_resource_assignments
def update_resource_assignments(self, id_or_uri, resource_assignments, timeout=-1): """ Modifies scope membership by adding or removing resource assignments. Args: id_or_uri: Can be either the resource ID or the resource URI. resource_assignments (dict): ...
python
def update_resource_assignments(self, id_or_uri, resource_assignments, timeout=-1): """ Modifies scope membership by adding or removing resource assignments. Args: id_or_uri: Can be either the resource ID or the resource URI. resource_assignments (dict): ...
[ "def", "update_resource_assignments", "(", "self", ",", "id_or_uri", ",", "resource_assignments", ",", "timeout", "=", "-", "1", ")", ":", "uri", "=", "self", ".", "_client", ".", "build_uri", "(", "id_or_uri", ")", "+", "\"/resource-assignments\"", "headers", ...
Modifies scope membership by adding or removing resource assignments. Args: id_or_uri: Can be either the resource ID or the resource URI. resource_assignments (dict): A dict object with a list of resource URIs to be added and a list of resource URIs to be removed. ...
[ "Modifies", "scope", "membership", "by", "adding", "or", "removing", "resource", "assignments", "." ]
3c6219723ef25e6e0c83d44a89007f89bc325b89
https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/settings/scopes.py#L163-L181
train
HewlettPackard/python-hpOneView
hpOneView/image_streamer/image_streamer_client.py
ImageStreamerClient.golden_images
def golden_images(self): """ Gets the Golden Images API client. Returns: GoldenImages: """ if not self.__golden_images: self.__golden_images = GoldenImages(self.__connection) return self.__golden_images
python
def golden_images(self): """ Gets the Golden Images API client. Returns: GoldenImages: """ if not self.__golden_images: self.__golden_images = GoldenImages(self.__connection) return self.__golden_images
[ "def", "golden_images", "(", "self", ")", ":", "if", "not", "self", ".", "__golden_images", ":", "self", ".", "__golden_images", "=", "GoldenImages", "(", "self", ".", "__connection", ")", "return", "self", ".", "__golden_images" ]
Gets the Golden Images API client. Returns: GoldenImages:
[ "Gets", "the", "Golden", "Images", "API", "client", "." ]
3c6219723ef25e6e0c83d44a89007f89bc325b89
https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/image_streamer/image_streamer_client.py#L69-L78
train
HewlettPackard/python-hpOneView
hpOneView/image_streamer/image_streamer_client.py
ImageStreamerClient.plan_scripts
def plan_scripts(self): """ Gets the Plan Scripts API client. Returns: PlanScripts: """ if not self.__plan_scripts: self.__plan_scripts = PlanScripts(self.__connection) return self.__plan_scripts
python
def plan_scripts(self): """ Gets the Plan Scripts API client. Returns: PlanScripts: """ if not self.__plan_scripts: self.__plan_scripts = PlanScripts(self.__connection) return self.__plan_scripts
[ "def", "plan_scripts", "(", "self", ")", ":", "if", "not", "self", ".", "__plan_scripts", ":", "self", ".", "__plan_scripts", "=", "PlanScripts", "(", "self", ".", "__connection", ")", "return", "self", ".", "__plan_scripts" ]
Gets the Plan Scripts API client. Returns: PlanScripts:
[ "Gets", "the", "Plan", "Scripts", "API", "client", "." ]
3c6219723ef25e6e0c83d44a89007f89bc325b89
https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/image_streamer/image_streamer_client.py#L81-L90
train
HewlettPackard/python-hpOneView
hpOneView/image_streamer/image_streamer_client.py
ImageStreamerClient.build_plans
def build_plans(self): """ Gets the Build Plans API client. Returns: BuildPlans: """ if not self.__build_plans: self.__build_plans = BuildPlans(self.__connection) return self.__build_plans
python
def build_plans(self): """ Gets the Build Plans API client. Returns: BuildPlans: """ if not self.__build_plans: self.__build_plans = BuildPlans(self.__connection) return self.__build_plans
[ "def", "build_plans", "(", "self", ")", ":", "if", "not", "self", ".", "__build_plans", ":", "self", ".", "__build_plans", "=", "BuildPlans", "(", "self", ".", "__connection", ")", "return", "self", ".", "__build_plans" ]
Gets the Build Plans API client. Returns: BuildPlans:
[ "Gets", "the", "Build", "Plans", "API", "client", "." ]
3c6219723ef25e6e0c83d44a89007f89bc325b89
https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/image_streamer/image_streamer_client.py#L93-L102
train
HewlettPackard/python-hpOneView
hpOneView/image_streamer/image_streamer_client.py
ImageStreamerClient.os_volumes
def os_volumes(self): """ Gets the OS Volumes API client. Returns: OsVolumes: """ if not self.__os_volumes: self.__os_volumes = OsVolumes(self.__connection) return self.__os_volumes
python
def os_volumes(self): """ Gets the OS Volumes API client. Returns: OsVolumes: """ if not self.__os_volumes: self.__os_volumes = OsVolumes(self.__connection) return self.__os_volumes
[ "def", "os_volumes", "(", "self", ")", ":", "if", "not", "self", ".", "__os_volumes", ":", "self", ".", "__os_volumes", "=", "OsVolumes", "(", "self", ".", "__connection", ")", "return", "self", ".", "__os_volumes" ]
Gets the OS Volumes API client. Returns: OsVolumes:
[ "Gets", "the", "OS", "Volumes", "API", "client", "." ]
3c6219723ef25e6e0c83d44a89007f89bc325b89
https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/image_streamer/image_streamer_client.py#L105-L114
train
HewlettPackard/python-hpOneView
hpOneView/image_streamer/image_streamer_client.py
ImageStreamerClient.deployment_plans
def deployment_plans(self): """ Gets the Deployment Plans API client. Returns: DeploymentPlans: """ if not self.__deployment_plans: self.__deployment_plans = DeploymentPlans(self.__connection) return self.__deployment_plans
python
def deployment_plans(self): """ Gets the Deployment Plans API client. Returns: DeploymentPlans: """ if not self.__deployment_plans: self.__deployment_plans = DeploymentPlans(self.__connection) return self.__deployment_plans
[ "def", "deployment_plans", "(", "self", ")", ":", "if", "not", "self", ".", "__deployment_plans", ":", "self", ".", "__deployment_plans", "=", "DeploymentPlans", "(", "self", ".", "__connection", ")", "return", "self", ".", "__deployment_plans" ]
Gets the Deployment Plans API client. Returns: DeploymentPlans:
[ "Gets", "the", "Deployment", "Plans", "API", "client", "." ]
3c6219723ef25e6e0c83d44a89007f89bc325b89
https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/image_streamer/image_streamer_client.py#L117-L126
train
HewlettPackard/python-hpOneView
hpOneView/image_streamer/image_streamer_client.py
ImageStreamerClient.artifact_bundles
def artifact_bundles(self): """ Gets the Artifact Bundles API client. Returns: ArtifactBundles: """ if not self.__artifact_bundles: self.__artifact_bundles = ArtifactBundles(self.__connection) return self.__artifact_bundles
python
def artifact_bundles(self): """ Gets the Artifact Bundles API client. Returns: ArtifactBundles: """ if not self.__artifact_bundles: self.__artifact_bundles = ArtifactBundles(self.__connection) return self.__artifact_bundles
[ "def", "artifact_bundles", "(", "self", ")", ":", "if", "not", "self", ".", "__artifact_bundles", ":", "self", ".", "__artifact_bundles", "=", "ArtifactBundles", "(", "self", ".", "__connection", ")", "return", "self", ".", "__artifact_bundles" ]
Gets the Artifact Bundles API client. Returns: ArtifactBundles:
[ "Gets", "the", "Artifact", "Bundles", "API", "client", "." ]
3c6219723ef25e6e0c83d44a89007f89bc325b89
https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/image_streamer/image_streamer_client.py#L129-L138
train
HewlettPackard/python-hpOneView
hpOneView/image_streamer/image_streamer_client.py
ImageStreamerClient.deployment_groups
def deployment_groups(self): """ Gets the Deployment Groups API client. Returns: DeploymentGroups: """ if not self.__deployment_groups: self.__deployment_groups = DeploymentGroups(self.__connection) return self.__deployment_groups
python
def deployment_groups(self): """ Gets the Deployment Groups API client. Returns: DeploymentGroups: """ if not self.__deployment_groups: self.__deployment_groups = DeploymentGroups(self.__connection) return self.__deployment_groups
[ "def", "deployment_groups", "(", "self", ")", ":", "if", "not", "self", ".", "__deployment_groups", ":", "self", ".", "__deployment_groups", "=", "DeploymentGroups", "(", "self", ".", "__connection", ")", "return", "self", ".", "__deployment_groups" ]
Gets the Deployment Groups API client. Returns: DeploymentGroups:
[ "Gets", "the", "Deployment", "Groups", "API", "client", "." ]
3c6219723ef25e6e0c83d44a89007f89bc325b89
https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/image_streamer/image_streamer_client.py#L141-L150
train
HewlettPackard/python-hpOneView
hpOneView/image_streamer/resources/golden_images.py
GoldenImages.create
def create(self, resource, timeout=-1): """ Creates a Golden Image resource from the deployed OS Volume as per the attributes specified. Args: resource (dict): Object to create. timeout: Timeout in seconds. Waits for task completion by default. The timeou...
python
def create(self, resource, timeout=-1): """ Creates a Golden Image resource from the deployed OS Volume as per the attributes specified. Args: resource (dict): Object to create. timeout: Timeout in seconds. Waits for task completion by default. The timeou...
[ "def", "create", "(", "self", ",", "resource", ",", "timeout", "=", "-", "1", ")", ":", "data", "=", "self", ".", "__default_values", ".", "copy", "(", ")", "data", ".", "update", "(", "resource", ")", "return", "self", ".", "_client", ".", "create",...
Creates a Golden Image resource from the deployed OS Volume as per the attributes specified. Args: resource (dict): Object to create. timeout: Timeout in seconds. Waits for task completion by default. The timeout does not abort the operation in OneView, i...
[ "Creates", "a", "Golden", "Image", "resource", "from", "the", "deployed", "OS", "Volume", "as", "per", "the", "attributes", "specified", "." ]
3c6219723ef25e6e0c83d44a89007f89bc325b89
https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/image_streamer/resources/golden_images.py#L73-L88
train
HewlettPackard/python-hpOneView
hpOneView/image_streamer/resources/golden_images.py
GoldenImages.upload
def upload(self, file_path, golden_image_info): """ Adds a Golden Image resource from the file that is uploaded from a local drive. Only the .zip format file can be used for the upload. Args: file_path (str): File name to upload. golden_image_info (dict): Golden ...
python
def upload(self, file_path, golden_image_info): """ Adds a Golden Image resource from the file that is uploaded from a local drive. Only the .zip format file can be used for the upload. Args: file_path (str): File name to upload. golden_image_info (dict): Golden ...
[ "def", "upload", "(", "self", ",", "file_path", ",", "golden_image_info", ")", ":", "uri", "=", "\"{0}?name={1}&description={2}\"", ".", "format", "(", "self", ".", "URI", ",", "quote", "(", "golden_image_info", ".", "get", "(", "'name'", ",", "''", ")", "...
Adds a Golden Image resource from the file that is uploaded from a local drive. Only the .zip format file can be used for the upload. Args: file_path (str): File name to upload. golden_image_info (dict): Golden Image information. Returns: dict: Golden Image.
[ "Adds", "a", "Golden", "Image", "resource", "from", "the", "file", "that", "is", "uploaded", "from", "a", "local", "drive", ".", "Only", "the", ".", "zip", "format", "file", "can", "be", "used", "for", "the", "upload", "." ]
3c6219723ef25e6e0c83d44a89007f89bc325b89
https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/image_streamer/resources/golden_images.py#L90-L106
train
HewlettPackard/python-hpOneView
hpOneView/image_streamer/resources/golden_images.py
GoldenImages.download_archive
def download_archive(self, id_or_uri, file_path): """ Download the details of the Golden Image capture logs, which has been archived based on the specific attribute ID. Args: id_or_uri: ID or URI of the Golden Image. file_path (str): File name to save the archive...
python
def download_archive(self, id_or_uri, file_path): """ Download the details of the Golden Image capture logs, which has been archived based on the specific attribute ID. Args: id_or_uri: ID or URI of the Golden Image. file_path (str): File name to save the archive...
[ "def", "download_archive", "(", "self", ",", "id_or_uri", ",", "file_path", ")", ":", "uri", "=", "self", ".", "URI", "+", "\"/archive/\"", "+", "extract_id_from_uri", "(", "id_or_uri", ")", "return", "self", ".", "_client", ".", "download", "(", "uri", ",...
Download the details of the Golden Image capture logs, which has been archived based on the specific attribute ID. Args: id_or_uri: ID or URI of the Golden Image. file_path (str): File name to save the archive. Returns: bool: Success.
[ "Download", "the", "details", "of", "the", "Golden", "Image", "capture", "logs", "which", "has", "been", "archived", "based", "on", "the", "specific", "attribute", "ID", "." ]
3c6219723ef25e6e0c83d44a89007f89bc325b89
https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/image_streamer/resources/golden_images.py#L108-L121
train
HewlettPackard/python-hpOneView
hpOneView/resources/activity/alerts.py
Alerts.update
def update(self, resource, id_or_uri=None, timeout=-1): """ Updates the specified alert resource. Args: resource (dict): Object to update. timeout: Timeout in seconds. Wait for task completion by default. The timeout does not abort the operation in OneVie...
python
def update(self, resource, id_or_uri=None, timeout=-1): """ Updates the specified alert resource. Args: resource (dict): Object to update. timeout: Timeout in seconds. Wait for task completion by default. The timeout does not abort the operation in OneVie...
[ "def", "update", "(", "self", ",", "resource", ",", "id_or_uri", "=", "None", ",", "timeout", "=", "-", "1", ")", ":", "uri", "=", "resource", ".", "pop", "(", "'uri'", ",", "None", ")", "if", "not", "uri", ":", "if", "not", "id_or_uri", ":", "ra...
Updates the specified alert resource. Args: resource (dict): Object to update. timeout: Timeout in seconds. Wait for task completion by default. The timeout does not abort the operation in OneView; it just stops waiting for its completion. Returns: d...
[ "Updates", "the", "specified", "alert", "resource", "." ]
3c6219723ef25e6e0c83d44a89007f89bc325b89
https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/activity/alerts.py#L135-L152
train
HewlettPackard/python-hpOneView
hpOneView/resources/activity/alerts.py
Alerts.delete_alert_change_log
def delete_alert_change_log(self, id_or_uri): """ Deletes alert change log by alert ID or URI. Args: id_or_uri: alert ID or URI. """ uri = self.URI + "/AlertChangeLog/" + extract_id_from_uri(id_or_uri) resource = { "uri": uri } sel...
python
def delete_alert_change_log(self, id_or_uri): """ Deletes alert change log by alert ID or URI. Args: id_or_uri: alert ID or URI. """ uri = self.URI + "/AlertChangeLog/" + extract_id_from_uri(id_or_uri) resource = { "uri": uri } sel...
[ "def", "delete_alert_change_log", "(", "self", ",", "id_or_uri", ")", ":", "uri", "=", "self", ".", "URI", "+", "\"/AlertChangeLog/\"", "+", "extract_id_from_uri", "(", "id_or_uri", ")", "resource", "=", "{", "\"uri\"", ":", "uri", "}", "self", ".", "_client...
Deletes alert change log by alert ID or URI. Args: id_or_uri: alert ID or URI.
[ "Deletes", "alert", "change", "log", "by", "alert", "ID", "or", "URI", "." ]
3c6219723ef25e6e0c83d44a89007f89bc325b89
https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/activity/alerts.py#L154-L165
train
HewlettPackard/python-hpOneView
hpOneView/resources/servers/server_hardware.py
ServerHardware.add_multiple_servers
def add_multiple_servers(self, information, timeout=-1): """ Adds multiple rack-mount servers for management by the appliance. This API initiates the asynchronous addition of supported server models. Note: Servers in an enclosure are added by adding the enclosure resource. This is ...
python
def add_multiple_servers(self, information, timeout=-1): """ Adds multiple rack-mount servers for management by the appliance. This API initiates the asynchronous addition of supported server models. Note: Servers in an enclosure are added by adding the enclosure resource. This is ...
[ "def", "add_multiple_servers", "(", "self", ",", "information", ",", "timeout", "=", "-", "1", ")", ":", "uri", "=", "\"{}/discovery\"", ".", "format", "(", "self", ".", "URI", ")", "return", "self", ".", "create", "(", "information", ",", "uri", "=", ...
Adds multiple rack-mount servers for management by the appliance. This API initiates the asynchronous addition of supported server models. Note: Servers in an enclosure are added by adding the enclosure resource. This is only supported on appliances that support rack-mounted servers. T...
[ "Adds", "multiple", "rack", "-", "mount", "servers", "for", "management", "by", "the", "appliance", ".", "This", "API", "initiates", "the", "asynchronous", "addition", "of", "supported", "server", "models", "." ]
3c6219723ef25e6e0c83d44a89007f89bc325b89
https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/servers/server_hardware.py#L68-L87
train
HewlettPackard/python-hpOneView
hpOneView/resources/servers/server_hardware.py
ServerHardware.get_firmware
def get_firmware(self): """ Get the firmware inventory of a server. Note: This method is available for API version 300 or later. Returns: dict: Server Hardware firmware. """ uri = "{}/firmware".format(self.data["uri"]) return self._helper...
python
def get_firmware(self): """ Get the firmware inventory of a server. Note: This method is available for API version 300 or later. Returns: dict: Server Hardware firmware. """ uri = "{}/firmware".format(self.data["uri"]) return self._helper...
[ "def", "get_firmware", "(", "self", ")", ":", "uri", "=", "\"{}/firmware\"", ".", "format", "(", "self", ".", "data", "[", "\"uri\"", "]", ")", "return", "self", ".", "_helper", ".", "do_get", "(", "uri", ")" ]
Get the firmware inventory of a server. Note: This method is available for API version 300 or later. Returns: dict: Server Hardware firmware.
[ "Get", "the", "firmware", "inventory", "of", "a", "server", "." ]
3c6219723ef25e6e0c83d44a89007f89bc325b89
https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/servers/server_hardware.py#L199-L210
train
HewlettPackard/python-hpOneView
hpOneView/resources/servers/server_hardware.py
ServerHardware.update_mp_firware_version
def update_mp_firware_version(self, timeout=-1): """ Updates the iLO firmware on a physical server to a minimum ILO firmware version required by OneView to manage the server. Args: timeout: Timeout in seconds. Wait for task completion by default. The timeout ...
python
def update_mp_firware_version(self, timeout=-1): """ Updates the iLO firmware on a physical server to a minimum ILO firmware version required by OneView to manage the server. Args: timeout: Timeout in seconds. Wait for task completion by default. The timeout ...
[ "def", "update_mp_firware_version", "(", "self", ",", "timeout", "=", "-", "1", ")", ":", "uri", "=", "\"{}/mpFirmwareVersion\"", ".", "format", "(", "self", ".", "data", "[", "\"uri\"", "]", ")", "return", "self", ".", "_helper", ".", "do_put", "(", "ur...
Updates the iLO firmware on a physical server to a minimum ILO firmware version required by OneView to manage the server. Args: timeout: Timeout in seconds. Wait for task completion by default. The timeout does not abort the operation in OneView; it just stop...
[ "Updates", "the", "iLO", "firmware", "on", "a", "physical", "server", "to", "a", "minimum", "ILO", "firmware", "version", "required", "by", "OneView", "to", "manage", "the", "server", "." ]
3c6219723ef25e6e0c83d44a89007f89bc325b89
https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/servers/server_hardware.py#L233-L246
train
HewlettPackard/python-hpOneView
hpOneView/resources/servers/server_hardware.py
ServerHardware.get_physical_server_hardware
def get_physical_server_hardware(self): """ Information describing an 'SDX' partition including a list of physical server blades represented by a server hardware. Used with SDX enclosures only. Returns: Resource """ uri = "{}/physicalServerHardware".format(se...
python
def get_physical_server_hardware(self): """ Information describing an 'SDX' partition including a list of physical server blades represented by a server hardware. Used with SDX enclosures only. Returns: Resource """ uri = "{}/physicalServerHardware".format(se...
[ "def", "get_physical_server_hardware", "(", "self", ")", ":", "uri", "=", "\"{}/physicalServerHardware\"", ".", "format", "(", "self", ".", "data", "[", "\"uri\"", "]", ")", "return", "self", ".", "_helper", ".", "do_get", "(", "uri", ")" ]
Information describing an 'SDX' partition including a list of physical server blades represented by a server hardware. Used with SDX enclosures only. Returns: Resource
[ "Information", "describing", "an", "SDX", "partition", "including", "a", "list", "of", "physical", "server", "blades", "represented", "by", "a", "server", "hardware", ".", "Used", "with", "SDX", "enclosures", "only", "." ]
3c6219723ef25e6e0c83d44a89007f89bc325b89
https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/servers/server_hardware.py#L302-L311
train
HewlettPackard/python-hpOneView
hpOneView/resources/networking/logical_switches.py
LogicalSwitches.update
def update(self, resource, timeout=-1): """ Updates a Logical Switch. Args: resource (dict): Object to update. timeout: Timeout in seconds. Wait for task completion by default. The timeout does not abort the operation in OneView, just stop...
python
def update(self, resource, timeout=-1): """ Updates a Logical Switch. Args: resource (dict): Object to update. timeout: Timeout in seconds. Wait for task completion by default. The timeout does not abort the operation in OneView, just stop...
[ "def", "update", "(", "self", ",", "resource", ",", "timeout", "=", "-", "1", ")", ":", "self", ".", "__set_default_values", "(", "resource", ")", "uri", "=", "self", ".", "_client", ".", "build_uri", "(", "resource", "[", "'logicalSwitch'", "]", "[", ...
Updates a Logical Switch. Args: resource (dict): Object to update. timeout: Timeout in seconds. Wait for task completion by default. The timeout does not abort the operation in OneView, just stop waiting for its completion. Returns: d...
[ "Updates", "a", "Logical", "Switch", "." ]
3c6219723ef25e6e0c83d44a89007f89bc325b89
https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/networking/logical_switches.py#L130-L145
train
HewlettPackard/python-hpOneView
hpOneView/resources/networking/logical_switches.py
LogicalSwitches.refresh
def refresh(self, id_or_uri, timeout=-1): """ The Refresh action reclaims the top-of-rack switches in a logical switch. Args: id_or_uri: Can be either the Logical Switch ID or URI timeout: Timeout in seconds. Wait for task completion by de...
python
def refresh(self, id_or_uri, timeout=-1): """ The Refresh action reclaims the top-of-rack switches in a logical switch. Args: id_or_uri: Can be either the Logical Switch ID or URI timeout: Timeout in seconds. Wait for task completion by de...
[ "def", "refresh", "(", "self", ",", "id_or_uri", ",", "timeout", "=", "-", "1", ")", ":", "uri", "=", "self", ".", "_client", ".", "build_uri", "(", "id_or_uri", ")", "+", "\"/refresh\"", "return", "self", ".", "_client", ".", "update_with_zero_body", "(...
The Refresh action reclaims the top-of-rack switches in a logical switch. Args: id_or_uri: Can be either the Logical Switch ID or URI timeout: Timeout in seconds. Wait for task completion by default. The timeout does not abort the operation ...
[ "The", "Refresh", "action", "reclaims", "the", "top", "-", "of", "-", "rack", "switches", "in", "a", "logical", "switch", "." ]
3c6219723ef25e6e0c83d44a89007f89bc325b89
https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/networking/logical_switches.py#L162-L177
train
HewlettPackard/python-hpOneView
hpOneView/resources/networking/logical_switches.py
LogicalSwitches.patch
def patch(self, id_or_uri, operation, path, value, timeout=-1): """ Uses the PATCH to update a resource for a given logical switch group. Only one operation can be performed in each PATCH call. Args: id_or_uri: Can be either the resource ID or the resource URI. ...
python
def patch(self, id_or_uri, operation, path, value, timeout=-1): """ Uses the PATCH to update a resource for a given logical switch group. Only one operation can be performed in each PATCH call. Args: id_or_uri: Can be either the resource ID or the resource URI. ...
[ "def", "patch", "(", "self", ",", "id_or_uri", ",", "operation", ",", "path", ",", "value", ",", "timeout", "=", "-", "1", ")", ":", "return", "self", ".", "_client", ".", "patch", "(", "id_or_uri", ",", "operation", ",", "path", ",", "value", ",", ...
Uses the PATCH to update a resource for a given logical switch group. Only one operation can be performed in each PATCH call. Args: id_or_uri: Can be either the resource ID or the resource URI. operation: Patch operation path: Path value: Value ...
[ "Uses", "the", "PATCH", "to", "update", "a", "resource", "for", "a", "given", "logical", "switch", "group", "." ]
3c6219723ef25e6e0c83d44a89007f89bc325b89
https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/networking/logical_switches.py#L179-L196
train
HewlettPackard/python-hpOneView
hpOneView/resources/servers/migratable_vc_domains.py
MigratableVcDomains.migrate
def migrate(self, id_or_uri, timeout=-1): """ Initiates a migration of an enclosure specified by the ID or URI of a migration report. Args: id_or_uri: ID or URI of the migration report. timeout: Timeout in seconds. Waits for task completion by default. The timeout does...
python
def migrate(self, id_or_uri, timeout=-1): """ Initiates a migration of an enclosure specified by the ID or URI of a migration report. Args: id_or_uri: ID or URI of the migration report. timeout: Timeout in seconds. Waits for task completion by default. The timeout does...
[ "def", "migrate", "(", "self", ",", "id_or_uri", ",", "timeout", "=", "-", "1", ")", ":", "migrationInformation", "=", "{", "'migrationState'", ":", "'Migrated'", ",", "'type'", ":", "'migratable-vc-domains'", ",", "'category'", ":", "'migratable-vc-domains'", "...
Initiates a migration of an enclosure specified by the ID or URI of a migration report. Args: id_or_uri: ID or URI of the migration report. timeout: Timeout in seconds. Waits for task completion by default. The timeout does not abort the task in OneView; just stops wai...
[ "Initiates", "a", "migration", "of", "an", "enclosure", "specified", "by", "the", "ID", "or", "URI", "of", "a", "migration", "report", "." ]
3c6219723ef25e6e0c83d44a89007f89bc325b89
https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/servers/migratable_vc_domains.py#L95-L118
train
HewlettPackard/python-hpOneView
hpOneView/resources/search/labels.py
Labels.get_by_resource
def get_by_resource(self, resource_uri): """ Gets all the labels for the specified resource Args: resource_uri: The resource URI Returns: dict: Resource Labels """ uri = self.URI + self.RESOURCES_PATH + '/' + resource_uri return self._cli...
python
def get_by_resource(self, resource_uri): """ Gets all the labels for the specified resource Args: resource_uri: The resource URI Returns: dict: Resource Labels """ uri = self.URI + self.RESOURCES_PATH + '/' + resource_uri return self._cli...
[ "def", "get_by_resource", "(", "self", ",", "resource_uri", ")", ":", "uri", "=", "self", ".", "URI", "+", "self", ".", "RESOURCES_PATH", "+", "'/'", "+", "resource_uri", "return", "self", ".", "_client", ".", "get", "(", "id_or_uri", "=", "uri", ")" ]
Gets all the labels for the specified resource Args: resource_uri: The resource URI Returns: dict: Resource Labels
[ "Gets", "all", "the", "labels", "for", "the", "specified", "resource" ]
3c6219723ef25e6e0c83d44a89007f89bc325b89
https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/search/labels.py#L87-L98
train
HewlettPackard/python-hpOneView
hpOneView/resources/search/labels.py
Labels.create
def create(self, resource): """ Set all the labels for a resource. Args: resource: The object containing the resource URI and a list of labels Returns: dict: Resource Labels """ uri = self.URI + self.RESOURCES_PATH return self._client.cre...
python
def create(self, resource): """ Set all the labels for a resource. Args: resource: The object containing the resource URI and a list of labels Returns: dict: Resource Labels """ uri = self.URI + self.RESOURCES_PATH return self._client.cre...
[ "def", "create", "(", "self", ",", "resource", ")", ":", "uri", "=", "self", ".", "URI", "+", "self", ".", "RESOURCES_PATH", "return", "self", ".", "_client", ".", "create", "(", "resource", "=", "resource", ",", "uri", "=", "uri", ")" ]
Set all the labels for a resource. Args: resource: The object containing the resource URI and a list of labels Returns: dict: Resource Labels
[ "Set", "all", "the", "labels", "for", "a", "resource", "." ]
3c6219723ef25e6e0c83d44a89007f89bc325b89
https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/search/labels.py#L100-L111
train
HewlettPackard/python-hpOneView
hpOneView/resources/search/labels.py
Labels.delete
def delete(self, resource, timeout=-1): """ Delete all the labels for a resource. Args: resource (dict): Object to delete. timeout: Timeout in seconds. Wait for task completion by default. The timeout does not abort the operation in OneVie...
python
def delete(self, resource, timeout=-1): """ Delete all the labels for a resource. Args: resource (dict): Object to delete. timeout: Timeout in seconds. Wait for task completion by default. The timeout does not abort the operation in OneVie...
[ "def", "delete", "(", "self", ",", "resource", ",", "timeout", "=", "-", "1", ")", ":", "self", ".", "_client", ".", "delete", "(", "resource", "=", "resource", ",", "timeout", "=", "timeout", ")" ]
Delete all the labels for a resource. Args: resource (dict): Object to delete. timeout: Timeout in seconds. Wait for task completion by default. The timeout does not abort the operation in OneView, just stop waiting for its completion.
[ "Delete", "all", "the", "labels", "for", "a", "resource", "." ]
3c6219723ef25e6e0c83d44a89007f89bc325b89
https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/search/labels.py#L125-L135
train
HewlettPackard/python-hpOneView
hpOneView/resources/security/users.py
Users.update
def update(self, resource, timeout=-1): """ Updates a User. Args: resource (dict): Object to update. timeout: Timeout in seconds. Wait for task completion by default. The timeout does not abort the operation in OneView, just stop waiting f...
python
def update(self, resource, timeout=-1): """ Updates a User. Args: resource (dict): Object to update. timeout: Timeout in seconds. Wait for task completion by default. The timeout does not abort the operation in OneView, just stop waiting f...
[ "def", "update", "(", "self", ",", "resource", ",", "timeout", "=", "-", "1", ")", ":", "return", "self", ".", "_client", ".", "update", "(", "resource", ",", "timeout", "=", "timeout", ",", "default_values", "=", "self", ".", "DEFAULT_VALUES", ",", "u...
Updates a User. Args: resource (dict): Object to update. timeout: Timeout in seconds. Wait for task completion by default. The timeout does not abort the operation in OneView, just stop waiting for its completion. Returns: dict: Updat...
[ "Updates", "a", "User", "." ]
3c6219723ef25e6e0c83d44a89007f89bc325b89
https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/security/users.py#L116-L130
train
HewlettPackard/python-hpOneView
hpOneView/resources/security/users.py
Users.get_by
def get_by(self, field, value): """ Gets all Users that match the filter. The search is case-insensitive. Args: field: Field name to filter. Accepted values: 'name', 'userName', 'role' value: Value to filter. Returns: list: A list of Users. ...
python
def get_by(self, field, value): """ Gets all Users that match the filter. The search is case-insensitive. Args: field: Field name to filter. Accepted values: 'name', 'userName', 'role' value: Value to filter. Returns: list: A list of Users. ...
[ "def", "get_by", "(", "self", ",", "field", ",", "value", ")", ":", "if", "field", "==", "'userName'", "or", "field", "==", "'name'", ":", "return", "self", ".", "_client", ".", "get", "(", "self", ".", "URI", "+", "'/'", "+", "value", ")", "elif",...
Gets all Users that match the filter. The search is case-insensitive. Args: field: Field name to filter. Accepted values: 'name', 'userName', 'role' value: Value to filter. Returns: list: A list of Users.
[ "Gets", "all", "Users", "that", "match", "the", "filter", "." ]
3c6219723ef25e6e0c83d44a89007f89bc325b89
https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/security/users.py#L132-L151
train
HewlettPackard/python-hpOneView
hpOneView/resources/security/users.py
Users.validate_user_name
def validate_user_name(self, user_name, timeout=-1): """ Verifies if a userName is already in use. Args: user_name: The userName to be verified. timeout: Timeout in seconds. Wait for task completion by default. The timeout does not abort t...
python
def validate_user_name(self, user_name, timeout=-1): """ Verifies if a userName is already in use. Args: user_name: The userName to be verified. timeout: Timeout in seconds. Wait for task completion by default. The timeout does not abort t...
[ "def", "validate_user_name", "(", "self", ",", "user_name", ",", "timeout", "=", "-", "1", ")", ":", "uri", "=", "self", ".", "URI", "+", "'/validateLoginName/'", "+", "user_name", "return", "self", ".", "_client", ".", "create_with_zero_body", "(", "uri", ...
Verifies if a userName is already in use. Args: user_name: The userName to be verified. timeout: Timeout in seconds. Wait for task completion by default. The timeout does not abort the operation in OneView, just stops waiting for its compl...
[ "Verifies", "if", "a", "userName", "is", "already", "in", "use", "." ]
3c6219723ef25e6e0c83d44a89007f89bc325b89
https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/security/users.py#L153-L167
train
HewlettPackard/python-hpOneView
hpOneView/resources/security/users.py
Users.validate_full_name
def validate_full_name(self, full_name, timeout=-1): """ Verifies if a fullName is already in use. Args: full_name: The fullName to be verified. timeout: Timeout in seconds. Wait for task completion by default. The timeout does not abort t...
python
def validate_full_name(self, full_name, timeout=-1): """ Verifies if a fullName is already in use. Args: full_name: The fullName to be verified. timeout: Timeout in seconds. Wait for task completion by default. The timeout does not abort t...
[ "def", "validate_full_name", "(", "self", ",", "full_name", ",", "timeout", "=", "-", "1", ")", ":", "uri", "=", "self", ".", "URI", "+", "'/validateUserName/'", "+", "full_name", "return", "self", ".", "_client", ".", "create_with_zero_body", "(", "uri", ...
Verifies if a fullName is already in use. Args: full_name: The fullName to be verified. timeout: Timeout in seconds. Wait for task completion by default. The timeout does not abort the operation in OneView, just stops waiting for its compl...
[ "Verifies", "if", "a", "fullName", "is", "already", "in", "use", "." ]
3c6219723ef25e6e0c83d44a89007f89bc325b89
https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/security/users.py#L169-L183
train
HewlettPackard/python-hpOneView
hpOneView/resources/facilities/power_devices.py
PowerDevices.add_ipdu
def add_ipdu(self, information, timeout=-1): """ Add an HP iPDU and bring all components under management by discovery of its management module. Bring the management module under exclusive management by the appliance, configure any management or data collection settings, and create a pri...
python
def add_ipdu(self, information, timeout=-1): """ Add an HP iPDU and bring all components under management by discovery of its management module. Bring the management module under exclusive management by the appliance, configure any management or data collection settings, and create a pri...
[ "def", "add_ipdu", "(", "self", ",", "information", ",", "timeout", "=", "-", "1", ")", ":", "uri", "=", "self", ".", "URI", "+", "\"/discover\"", "return", "self", ".", "_client", ".", "create", "(", "information", ",", "uri", "=", "uri", ",", "time...
Add an HP iPDU and bring all components under management by discovery of its management module. Bring the management module under exclusive management by the appliance, configure any management or data collection settings, and create a private set of administrative credentials to enable ongoing communic...
[ "Add", "an", "HP", "iPDU", "and", "bring", "all", "components", "under", "management", "by", "discovery", "of", "its", "management", "module", ".", "Bring", "the", "management", "module", "under", "exclusive", "management", "by", "the", "appliance", "configure",...
3c6219723ef25e6e0c83d44a89007f89bc325b89
https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/facilities/power_devices.py#L126-L142
train
HewlettPackard/python-hpOneView
hpOneView/resources/facilities/power_devices.py
PowerDevices.update_power_state
def update_power_state(self, id_or_uri, power_state): """ Sets the power state of the specified power delivery device. The device must be an HP Intelligent Outlet. Args: id_or_uri: Can be either the power device id or the uri power_state: ...
python
def update_power_state(self, id_or_uri, power_state): """ Sets the power state of the specified power delivery device. The device must be an HP Intelligent Outlet. Args: id_or_uri: Can be either the power device id or the uri power_state: ...
[ "def", "update_power_state", "(", "self", ",", "id_or_uri", ",", "power_state", ")", ":", "uri", "=", "self", ".", "_client", ".", "build_uri", "(", "id_or_uri", ")", "+", "\"/powerState\"", "return", "self", ".", "_client", ".", "update", "(", "power_state"...
Sets the power state of the specified power delivery device. The device must be an HP Intelligent Outlet. Args: id_or_uri: Can be either the power device id or the uri power_state: {"powerState":"On|Off"} Returns: str: The power state
[ "Sets", "the", "power", "state", "of", "the", "specified", "power", "delivery", "device", ".", "The", "device", "must", "be", "an", "HP", "Intelligent", "Outlet", "." ]
3c6219723ef25e6e0c83d44a89007f89bc325b89
https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/facilities/power_devices.py#L176-L190
train
HewlettPackard/python-hpOneView
hpOneView/resources/facilities/power_devices.py
PowerDevices.update_refresh_state
def update_refresh_state(self, id_or_uri, refresh_state_data): """ Refreshes a given intelligent power delivery device. Args: id_or_uri: Can be either the power device id or the uri refresh_state_data: Power device refresh request ...
python
def update_refresh_state(self, id_or_uri, refresh_state_data): """ Refreshes a given intelligent power delivery device. Args: id_or_uri: Can be either the power device id or the uri refresh_state_data: Power device refresh request ...
[ "def", "update_refresh_state", "(", "self", ",", "id_or_uri", ",", "refresh_state_data", ")", ":", "uri", "=", "self", ".", "_client", ".", "build_uri", "(", "id_or_uri", ")", "+", "\"/refreshState\"", "return", "self", ".", "_client", ".", "update", "(", "r...
Refreshes a given intelligent power delivery device. Args: id_or_uri: Can be either the power device id or the uri refresh_state_data: Power device refresh request Returns: str: The power state
[ "Refreshes", "a", "given", "intelligent", "power", "delivery", "device", "." ]
3c6219723ef25e6e0c83d44a89007f89bc325b89
https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/facilities/power_devices.py#L192-L206
train
HewlettPackard/python-hpOneView
hpOneView/resources/facilities/power_devices.py
PowerDevices.get_utilization
def get_utilization(self, id_or_uri, fields=None, filter=None, refresh=False, view=None): """ Retrieves historical utilization data for the specified metrics and time span. The device must be a component of an HPE iPDU. Args: id_or_uri: The power device id or...
python
def get_utilization(self, id_or_uri, fields=None, filter=None, refresh=False, view=None): """ Retrieves historical utilization data for the specified metrics and time span. The device must be a component of an HPE iPDU. Args: id_or_uri: The power device id or...
[ "def", "get_utilization", "(", "self", ",", "id_or_uri", ",", "fields", "=", "None", ",", "filter", "=", "None", ",", "refresh", "=", "False", ",", "view", "=", "None", ")", ":", "return", "self", ".", "_client", ".", "get_utilization", "(", "id_or_uri",...
Retrieves historical utilization data for the specified metrics and time span. The device must be a component of an HPE iPDU. Args: id_or_uri: The power device id or the resource uri fields: Name of the metric(s) to be retrieved in the format METR...
[ "Retrieves", "historical", "utilization", "data", "for", "the", "specified", "metrics", "and", "time", "span", ".", "The", "device", "must", "be", "a", "component", "of", "an", "HPE", "iPDU", "." ]
3c6219723ef25e6e0c83d44a89007f89bc325b89
https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/facilities/power_devices.py#L261-L333
train
HewlettPackard/python-hpOneView
hpOneView/image_streamer/resources/plan_scripts.py
PlanScripts.retrieve_differences
def retrieve_differences(self, id_or_uri, content, timeout=-1): """ Retrieves the modified contents of the selected Plan Script according to the provided content object, as per the selected attributes. Args: id_or_uri: ID or URI of the Plan Script. content (str):...
python
def retrieve_differences(self, id_or_uri, content, timeout=-1): """ Retrieves the modified contents of the selected Plan Script according to the provided content object, as per the selected attributes. Args: id_or_uri: ID or URI of the Plan Script. content (str):...
[ "def", "retrieve_differences", "(", "self", ",", "id_or_uri", ",", "content", ",", "timeout", "=", "-", "1", ")", ":", "uri", "=", "self", ".", "URI", "+", "\"/differences/\"", "+", "extract_id_from_uri", "(", "id_or_uri", ")", "return", "self", ".", "_cli...
Retrieves the modified contents of the selected Plan Script according to the provided content object, as per the selected attributes. Args: id_or_uri: ID or URI of the Plan Script. content (str): Plan Script content. timeout: Timeout in seconds. Waits...
[ "Retrieves", "the", "modified", "contents", "of", "the", "selected", "Plan", "Script", "according", "to", "the", "provided", "content", "object", "as", "per", "the", "selected", "attributes", "." ]
3c6219723ef25e6e0c83d44a89007f89bc325b89
https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/image_streamer/resources/plan_scripts.py#L154-L170
train
HewlettPackard/python-hpOneView
hpOneView/image_streamer/resources/plan_scripts.py
PlanScripts.get_usedby_and_readonly
def get_usedby_and_readonly(self, id): """ Gets the build plans details os teh selected plan script as per the selected attributes. Args: id: ID of the Plan Script. Returns: array of build plans """ uri = self.URI + "/" + id + "/usedby/readonly" ...
python
def get_usedby_and_readonly(self, id): """ Gets the build plans details os teh selected plan script as per the selected attributes. Args: id: ID of the Plan Script. Returns: array of build plans """ uri = self.URI + "/" + id + "/usedby/readonly" ...
[ "def", "get_usedby_and_readonly", "(", "self", ",", "id", ")", ":", "uri", "=", "self", ".", "URI", "+", "\"/\"", "+", "id", "+", "\"/usedby/readonly\"", "return", "self", ".", "_client", ".", "get", "(", "uri", ")" ]
Gets the build plans details os teh selected plan script as per the selected attributes. Args: id: ID of the Plan Script. Returns: array of build plans
[ "Gets", "the", "build", "plans", "details", "os", "teh", "selected", "plan", "script", "as", "per", "the", "selected", "attributes", "." ]
3c6219723ef25e6e0c83d44a89007f89bc325b89
https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/image_streamer/resources/plan_scripts.py#L172-L183
train
HewlettPackard/python-hpOneView
hpOneView/image_streamer/resources/deployment_plans.py
DeploymentPlans.get_osdp
def get_osdp(self, id_or_uri): """ Retrieves facts about Server Profiles and Server Profile Templates that are using Deployment Plan based on the ID or URI provided. Args: id_or_uri: ID or URI of the Deployment Plan. Returns: dict: Server Profiles and Server Pro...
python
def get_osdp(self, id_or_uri): """ Retrieves facts about Server Profiles and Server Profile Templates that are using Deployment Plan based on the ID or URI provided. Args: id_or_uri: ID or URI of the Deployment Plan. Returns: dict: Server Profiles and Server Pro...
[ "def", "get_osdp", "(", "self", ",", "id_or_uri", ")", ":", "uri", "=", "self", ".", "_client", ".", "build_subresource_uri", "(", "resource_id_or_uri", "=", "id_or_uri", ",", "subresource_path", "=", "\"osdp\"", ")", "return", "self", ".", "_client", ".", "...
Retrieves facts about Server Profiles and Server Profile Templates that are using Deployment Plan based on the ID or URI provided. Args: id_or_uri: ID or URI of the Deployment Plan. Returns: dict: Server Profiles and Server Profile Templates
[ "Retrieves", "facts", "about", "Server", "Profiles", "and", "Server", "Profile", "Templates", "that", "are", "using", "Deployment", "Plan", "based", "on", "the", "ID", "or", "URI", "provided", "." ]
3c6219723ef25e6e0c83d44a89007f89bc325b89
https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/image_streamer/resources/deployment_plans.py#L131-L142
train