Code
stringlengths
103
85.9k
Summary
listlengths
0
94
Please provide a description of the function:def get_reachable_storage_pools(self, start=0, count=-1, filter='', query='', sort='', networks=None, scope_exclusions=None, scope_uris=''): uri = self.URI + "/reachable-storage-pools" if networks: ele...
[ "\n Gets the storage pools that are connected on the specified networks\n based on the storage system port's expected network connectivity.\n\n Args:\n start: The first item to return, using 0-based indexing. If not specified,\n the default is 0 - start with the first ...
Please provide a description of the function:def generate(self, information, timeout=-1): return self._client.create(information, timeout=timeout)
[ "\n Generates a self signed certificate or an internal CA signed certificate for RabbitMQ clients.\n\n Args:\n information (dict): Information to generate the certificate for RabbitMQ clients.\n timeout:\n Timeout in seconds. Wait for task completion by default. Th...
Please provide a description of the function:def get_key_pair(self, alias_name): uri = self.URI + "/keypair/" + alias_name return self._client.get(uri)
[ "\n Retrieves the public and private key pair associated with the specified alias name.\n\n Args:\n alias_name: Key pair associated with the RabbitMQ\n\n Returns:\n dict: RabbitMQ certificate\n " ]
Please provide a description of the function:def get_keys(self, alias_name, key_format): uri = self.URI + "/keys/" + alias_name + "?format=" + key_format return self._client.get(uri)
[ "\n Retrieves the contents of PKCS12 file in the format specified.\n This PKCS12 formatted file contains both the certificate as well as the key file data.\n Valid key formats are Base64 and PKCS12.\n\n Args:\n alias_name: Key pair associated with the RabbitMQ\n key...
Please provide a description of the function: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 self._client.get(uri)
[ "\n Validates an ID pool.\n\n Args:\n id_or_uri:\n ID or URI of range.\n ids_pools (list):\n List of Id Pools.\n\n Returns:\n dict: A dict containing a list with IDs.\n " ]
Please provide a description of the function:def generate(self, id_or_uri): uri = self._client.build_uri(id_or_uri) + "/generate" return self._client.get(uri)
[ "\n Generates and returns a random range.\n\n Args:\n id_or_uri:\n ID or URI of range.\n\n Returns:\n dict: A dict containing a list with IDs.\n " ]
Please provide a description of the function:def get_connectable_volume_templates(self, start=0, count=-1, filter='', query='', sort=''): uri = self.URI + "/connectable-volume-templates" get_uri = self._client.build_query_uri(start=start, count=count, filter=filter, ...
[ "\n Gets the storage volume templates that are available on the specified networks based on the storage system\n port's expected network connectivity. If there are no storage volume templates that meet the specified\n connectivity criteria, an empty collection will be returned.\n\n Retur...
Please provide a description of the function:def get_reachable_volume_templates(self, start=0, count=-1, filter='', query='', sort='', networks=None, scope_uris='', private_allowed_only=False): uri = self.URI + "/reachable-volume-templates" uri += "?netwo...
[ "\n Gets the storage templates that are connected on the specified networks based on the storage system\n port's expected network connectivity.\n\n Returns:\n list: Storage volume templates.\n " ]
Please provide a description of the function:def get_compatible_systems(self, id_or_uri): uri = self._client.build_uri(id_or_uri) + "/compatible-systems" return self._client.get(uri)
[ "\n Retrieves a collection of all storage systems that is applicable to this storage volume template.\n\n Args:\n id_or_uri:\n Can be either the power device id or the uri\n\n Returns:\n list: Storage systems.\n " ]
Please provide a description of the function:def add_from_existing(self, resource, timeout=-1): uri = self.URI + "/from-existing" return self._client.create(resource, uri=uri, timeout=timeout)
[ "\n Adds a volume that already exists in the Storage system\n\n Args:\n resource (dict):\n Object to create.\n timeout:\n Timeout in seconds. Wait for task completion by default. The timeout does not abort the operation\n in OneView, j...
Please provide a description of the function:def create_from_snapshot(self, data, timeout=-1): uri = self.URI + "/from-snapshot" return self._client.create(data, uri=uri, timeout=timeout)
[ "\n Creates a new volume on the storage system from a snapshot of a volume.\n A volume template must also be specified when creating a volume from a snapshot.\n\n The global setting \"StorageVolumeTemplateRequired\" controls whether or\n not root volume templates can be used to provision...
Please provide a description of the function:def delete(self, resource, force=False, export_only=None, suppress_device_updates=None, timeout=-1): custom_headers = {'If-Match': '*'} if 'uri' in resource: uri = resource['uri'] else: uri = self._client.build_uri(res...
[ "\n Deletes a managed volume.\n\n Args:\n resource (dict):\n Object to delete.\n force:\n If set to true, the operation completes despite any problems with\n network connectivity or errors on the resource itself. The default is false...
Please provide a description of the function:def get_snapshots(self, volume_id_or_uri, start=0, count=-1, filter='', sort=''): uri = self.__build_volume_snapshot_uri(volume_id_or_uri) return self._client.get_all(start, count, filter=filter, sort=sort, uri=uri)
[ "\n Gets all snapshots of a volume. Returns a list of snapshots based on optional sorting and filtering, and\n constrained by start and count parameters.\n\n Args:\n volume_id_or_uri:\n Can be either the volume id or the volume uri.\n start:\n ...
Please provide a description of the function: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(snapshot, uri=uri, timeout=timeout, default_values=self.DEFAULT_VALUES_SNAPSHOT)
[ "\n Creates a snapshot for the specified volume.\n\n Args:\n volume_id_or_uri:\n Can be either the volume ID or the volume URI.\n snapshot (dict):\n Object to create.\n timeout:\n Timeout in seconds. Wait for task completion...
Please provide a description of the function: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.get(uri)
[ "\n Gets a snapshot of a volume.\n\n Args:\n volume_id_or_uri:\n Can be either the volume ID or the volume URI. It is optional if it is passed a snapshot URI,\n but required if it passed a snapshot ID.\n snapshot_id_or_uri:\n Can be ei...
Please provide a description of the function: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, value, uri=uri)
[ "\n Gets all snapshots that match the filter.\n\n The search is case-insensitive.\n\n Args:\n volume_id_or_uri: Can be either the volume id or the volume uri.\n field: Field name to filter.\n value: Value to filter.\n\n Returns:\n list: Snapsho...
Please provide a description of the function:def get_extra_managed_storage_volume_paths(self, start=0, count=-1, filter='', sort=''): uri = self.URI + '/repair?alertFixType=ExtraManagedStorageVolumePaths' return self._client.get_all(start, count, filter=filter, sort=sort, uri=uri)
[ "\n Gets the list of extra managed storage volume paths.\n\n Args:\n start:\n The first item to return, using 0-based indexing.\n If not specified, the default is 0 - start with the first available item.\n count:\n The number of resour...
Please provide a description of the function:def repair(self, volume_id_or_uri, timeout=-1): data = { "type": "ExtraManagedStorageVolumePaths", "resourceUri": self._client.build_uri(volume_id_or_uri) } custom_headers = {'Accept-Language': 'en_US'} uri = s...
[ "\n Removes extra presentations from a specified volume on the storage system.\n\n Args:\n volume_id_or_uri:\n Can be either the volume id or the volume uri.\n timeout:\n Timeout in seconds. Wait for task completion by default. The timeout does not a...
Please provide a description of the function:def get_attachable_volumes(self, start=0, count=-1, filter='', query='', sort='', scope_uris='', connections=''): uri = self.URI + '/attachable-volumes' if connections: uri += str('?' + 'connections=' + connections.__str__()) retu...
[ "\n Gets the volumes that are connected on the specified networks based on the storage system port's expected\n network connectivity.\n\n A volume is attachable if it satisfies either of the following conditions:\n * The volume is shareable.\n * The volume not shareable an...
Please provide a description of the function:def add(self, information, timeout=-1): return self.create(data=information, timeout=timeout)
[ "\n C7000:\n Takes information about an enclosure (for example: IP address, username, password) and uses\n it to claim/configure the enclosure and add its components to the appliance.\n\n Synergy:\n Adds a remote enclosure and all the enclosures linked to that enclosur...
Please provide a description of the function:def update_configuration(self, timeout=-1): uri = "{}/configuration".format(self.data['uri']) return self.update_with_zero_body(uri=uri, timeout=timeout)
[ "\n Reapplies the appliance's configuration on the enclosure. This includes running the same configure steps\n that were performed as part of the enclosure add.\n\n Args:\n timeout: Timeout in seconds. Wait for task completion by default. The timeout does not abort the operation\n ...
Please provide a description of the function:def get_by_hostname(self, hostname): def filter_by_hostname(hostname, enclosure): is_primary_ip = ('activeOaPreferredIP' in enclosure and enclosure['activeOaPreferredIP'] == hostname) is_standby_ip = ('standbyOaPreferredIP' in enclosu...
[ "Get enclosure by it's hostname" ]
Please provide a description of the function:def get_environmental_configuration(self): uri = '{}/environmentalConfiguration'.format(self.data['uri']) return self._helper.do_get(uri)
[ "\n Gets the settings that describe the environmental configuration (supported feature set, calibrated minimum &\n maximum power, location & dimensions, ...) of the enclosure resource.\n\n Returns:\n Settings that describe the environmental configuration.\n " ]
Please provide a description of the function:def update_environmental_configuration(self, configuration, timeout=-1): uri = '{}/environmentalConfiguration'.format(self.data['uri']) return self._helper.do_put(uri, configuration, timeout, None)
[ "\n Sets the calibrated max power of an unmanaged or unsupported enclosure.\n\n Args:\n configuration: Configuration\n timeout: Timeout in seconds. Wait for task completion by default. The timeout does not abort the operation\n in OneView; it just stops waiting for...
Please provide a description of the function:def get_sso(self, role): uri = "{}/sso?role={}".format(self.data['uri'], role) return self._helper.do_get(uri)
[ "\n Builds the SSO (Single Sign-On) URL parameters for the specified enclosure. This allows the user to\n log in to the enclosure without providing credentials. This API is currently only supported by C7000 enclosures.\n\n Args:\n role: Role\n\n Returns:\n SSO (Sing...
Please provide a description of the function:def generate_csr(self, csr_data, bay_number=None): uri = "{}/https/certificaterequest".format(self.data['uri']) if bay_number: uri += "?bayNumber=%d" % (bay_number) headers = {'Content-Type': 'application/json'} return ...
[ "\n Creates a Certificate Signing Request (CSR) for an enclosure.\n\n Args:\n csr_data: Dictionary with csr details.\n bay_number: OA from which the CSR should be generated.\n\n Returns:\n Enclosure.\n " ]
Please provide a description of the function:def get_csr(self, bay_number=None): uri = "{}/https/certificaterequest".format(self.data['uri']) if bay_number: uri += "?bayNumber=%d" % (bay_number) return self._helper.do_get(uri)
[ "\n Get an enclosure's Certificate Signing Request (CSR) that was generated by previous POST to the same URI.\n\n Args:\n bay_number: OA to retrieve the previously generated CSR.\n\n Returns:\n dict\n " ]
Please provide a description of the function:def import_certificate(self, certificate_data, bay_number=None): uri = "{}/https/certificaterequest".format(self.data['uri']) if bay_number: uri += "?bayNumber=%d" % (bay_number) headers = {'Content-Type': 'application/json'} ...
[ "\n Imports a signed server certificate into the enclosure.\n\n Args:\n certificate_data: Dictionary with Signed certificate and type.\n bay_number: OA to which the signed certificate will be imported.\n\n Returns:\n Enclosure.\n " ]
Please provide a description of the function:def delete(self, alias_name, timeout=-1): uri = self.URI + "/" + alias_name return self._client.delete(uri, timeout=timeout)
[ "\n Revokes a certificate signed by the internal CA. If client certificate to be revoked is RabbitMQ_readonly,\n then the internal CA root certificate, RabbitMQ client certificate and RabbitMQ server certificate will be\n regenerated. This will invalidate the previous version of RabbitMQ client...
Please provide a description of the function:def get_by_name(self, name): scopes = self._client.get_all() result = [x for x in scopes if x['name'] == name] return result[0] if result else None
[ "\n Gets a Scope by name.\n\n Args:\n name: Name of the Scope\n\n Returns:\n dict: Scope.\n " ]
Please provide a description of the function:def create(self, resource, timeout=-1): return self._client.create(resource, timeout=timeout, default_values=self.DEFAULT_VALUES)
[ "\n Creates a scope.\n\n Args:\n resource (dict): Object to create.\n timeout:\n Timeout in seconds. Wait for task completion by default. The timeout does not abort the operation\n in OneView, just stop waiting for its completion.\n\n Returns:...
Please provide a description of the function:def delete(self, resource, timeout=-1): if type(resource) is dict: headers = {'If-Match': resource.get('eTag', '*')} else: headers = {'If-Match': '*'} return self._client.delete(resource, timeout=timeout, custom_header...
[ "\n Deletes a Scope.\n\n Args:\n resource: dict object to delete\n timeout:\n Timeout in seconds. Wait for task completion by default. The timeout does not abort the operation\n in OneView; it just stops waiting for its completion.\n\n Returns...
Please provide a description of the function:def update_resource_assignments(self, id_or_uri, resource_assignments, timeout=-1): uri = self._client.build_uri(id_or_uri) + "/resource-assignments" headers = {'Content-Type': 'application/json'} return self._client.patch_request(uri, reso...
[ "\n Modifies scope membership by adding or removing resource assignments.\n\n Args:\n id_or_uri: Can be either the resource ID or the resource URI.\n resource_assignments (dict):\n A dict object with a list of resource URIs to be added and a list of resource URIs t...
Please provide a description of the function:def golden_images(self): if not self.__golden_images: self.__golden_images = GoldenImages(self.__connection) return self.__golden_images
[ "\n Gets the Golden Images API client.\n\n Returns:\n GoldenImages:\n " ]
Please provide a description of the function:def plan_scripts(self): if not self.__plan_scripts: self.__plan_scripts = PlanScripts(self.__connection) return self.__plan_scripts
[ "\n Gets the Plan Scripts API client.\n\n Returns:\n PlanScripts:\n " ]
Please provide a description of the function:def build_plans(self): if not self.__build_plans: self.__build_plans = BuildPlans(self.__connection) return self.__build_plans
[ "\n Gets the Build Plans API client.\n\n Returns:\n BuildPlans:\n " ]
Please provide a description of the function:def os_volumes(self): if not self.__os_volumes: self.__os_volumes = OsVolumes(self.__connection) return self.__os_volumes
[ "\n Gets the OS Volumes API client.\n\n Returns:\n OsVolumes:\n " ]
Please provide a description of the function:def deployment_plans(self): if not self.__deployment_plans: self.__deployment_plans = DeploymentPlans(self.__connection) return self.__deployment_plans
[ "\n Gets the Deployment Plans API client.\n\n Returns:\n DeploymentPlans:\n " ]
Please provide a description of the function:def artifact_bundles(self): if not self.__artifact_bundles: self.__artifact_bundles = ArtifactBundles(self.__connection) return self.__artifact_bundles
[ "\n Gets the Artifact Bundles API client.\n\n Returns:\n ArtifactBundles:\n " ]
Please provide a description of the function:def deployment_groups(self): if not self.__deployment_groups: self.__deployment_groups = DeploymentGroups(self.__connection) return self.__deployment_groups
[ "\n Gets the Deployment Groups API client.\n\n Returns:\n DeploymentGroups:\n " ]
Please provide a description of the function:def create(self, resource, timeout=-1): data = self.__default_values.copy() data.update(resource) return self._client.create(data, timeout=timeout)
[ "\n Creates a Golden Image resource from the deployed OS Volume as per the attributes specified.\n\n Args:\n resource (dict): Object to create.\n timeout:\n Timeout in seconds. Waits for task completion by default. The timeout does not abort the operation\n ...
Please provide a description of the function:def upload(self, file_path, golden_image_info): uri = "{0}?name={1}&description={2}".format(self.URI, quote(golden_image_info.get('name', '')), quote(gold...
[ "\n Adds a Golden Image resource from the file that is uploaded from a local drive. Only the .zip format file can\n be used for the upload.\n\n Args:\n file_path (str): File name to upload.\n golden_image_info (dict): Golden Image information.\n\n Returns:\n ...
Please provide a description of the function: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, file_path)
[ "\n Download the details of the Golden Image capture logs, which has been archived based on the specific attribute\n ID.\n\n Args:\n id_or_uri: ID or URI of the Golden Image.\n file_path (str): File name to save the archive.\n\n Returns:\n bool: Success.\...
Please provide a description of the function:def update(self, resource, id_or_uri=None, timeout=-1): uri = resource.pop('uri', None) if not uri: if not id_or_uri: raise ValueError("URI was not provided") uri = self._client.build_uri(id_or_uri) ret...
[ "\n Updates the specified alert resource.\n\n Args:\n resource (dict): Object to update.\n timeout: Timeout in seconds. Wait for task completion by default. The timeout does not abort the operation\n in OneView; it just stops waiting for its completion.\n\n ...
Please provide a description of the function: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.delete(resource)
[ "\n Deletes alert change log by alert ID or URI.\n\n Args:\n id_or_uri: alert ID or URI.\n " ]
Please provide a description of the function:def add_multiple_servers(self, information, timeout=-1): uri = "{}/discovery".format(self.URI) return self.create(information, uri=uri, timeout=timeout)
[ "\n Adds multiple rack-mount servers for management by the appliance. This API initiates the asynchronous addition of\n supported server models.\n\n Note: Servers in an enclosure are added by adding the enclosure resource. This is\n only supported on appliances that support rack-mounted ...
Please provide a description of the function:def remove(self, force=False, timeout=-1): return self.delete(force=force, timeout=timeout)
[ "\n Removes the rackserver with the specified URI.\n Note: This operation is only supported on appliances that support rack-mounted servers.\n\n Args:\n force (bool):\n If set to true, the operation completes despite any problems with\n network connectiv...
Please provide a description of the function:def get_bios(self): uri = "{}/bios".format(self.data["uri"]) return self._helper.do_get(uri)
[ "\n Gets the list of BIOS/UEFI values currently set on the physical server.\n\n Returns:\n dict: Dictionary of BIOS/UEFI values.\n " ]
Please provide a description of the function:def get_ilo_sso_url(self, ip=None): uri = "{}/iloSsoUrl".format(self.data["uri"]) if ip: uri = "{}?ip={}".format(uri, ip) return self._helper.do_get(uri)
[ "\n Retrieves the URL to launch a Single Sign-On (SSO) session for the iLO web interface. If the server hardware is\n unsupported, the resulting URL will not use SSO and the iLO web interface will prompt for credentials.\n This is not supported on G7/iLO3 or earlier servers.\n\n Args:\n ...
Please provide a description of the function:def get_all_firmwares(self, filter='', start=0, count=-1, query='', sort=''): uri = self.URI + "/*/firmware" return self._helper.get_all(start, count, filter, query, sort, '', '', uri)
[ "\n Gets a list of firmware inventory across all servers. To filter the returned data, specify a filter\n expression to select a particular server model, component name, and/or component firmware version.\n\n Note:\n This method is available for API version 300 or later.\n\n A...
Please provide a description of the function:def get_firmware(self): uri = "{}/firmware".format(self.data["uri"]) return self._helper.do_get(uri)
[ "\n Get the firmware inventory of a server.\n\n Note:\n This method is available for API version 300 or later.\n\n Returns:\n dict: Server Hardware firmware.\n " ]
Please provide a description of the function:def get_java_remote_console_url(self, ip=None): uri = "{}/javaRemoteConsoleUrl".format(self.data["uri"]) if ip: uri = "{}?ip={}".format(uri, ip) return self._helper.do_get(uri)
[ "\n Generates a Single Sign-On (SSO) session for the iLO Java Applet console and returns the URL to launch it.\n If the server hardware is unmanaged or unsupported, the resulting URL will not use SSO and the iLO Java Applet\n will prompt for credentials. This is not supported on G7/iLO3 or earl...
Please provide a description of the function:def update_mp_firware_version(self, timeout=-1): uri = "{}/mpFirmwareVersion".format(self.data["uri"]) return self._helper.do_put(uri, None, timeout, None)
[ "\n Updates the iLO firmware on a physical server to a minimum ILO firmware version required by OneView to\n manage the server.\n\n Args:\n timeout:\n Timeout in seconds. Wait for task completion by default. The timeout does not abort the operation\n in ...
Please provide a description of the function:def get_remote_console_url(self, ip=None): uri = "{}/remoteConsoleUrl".format(self.data["uri"]) if ip: uri = "{}?ip={}".format(uri, ip) return self._helper.do_get(uri)
[ "\n Generates a Single Sign-On (SSO) session for the iLO Integrated Remote Console Application (IRC) and returns the\n URL to launch it. If the server hardware is unmanaged or unsupported, the resulting URL will not use SSO and the\n IRC application will prompt for credentials. Use of this URL ...
Please provide a description of the function:def get_physical_server_hardware(self): uri = "{}/physicalServerHardware".format(self.data["uri"]) return self._helper.do_get(uri)
[ "\n Information describing an 'SDX' partition including a list of physical server blades represented by a server\n hardware. Used with SDX enclosures only.\n\n Returns:\n Resource\n " ]
Please provide a description of the function:def update(self, resource, timeout=-1): self.__set_default_values(resource) uri = self._client.build_uri(resource['logicalSwitch']['uri']) return self._client.update(resource, uri=uri, timeout=timeout)
[ "\n Updates a Logical Switch.\n\n Args:\n resource (dict): Object to update.\n timeout:\n Timeout in seconds. Wait for task completion by default. The timeout does not abort the operation\n in OneView, just stop waiting for its completion.\n\n ...
Please provide a description of the function:def refresh(self, id_or_uri, timeout=-1): uri = self._client.build_uri(id_or_uri) + "/refresh" return self._client.update_with_zero_body(uri, timeout=timeout)
[ "\n The Refresh action reclaims the top-of-rack switches in a logical switch.\n\n Args:\n id_or_uri:\n Can be either the Logical Switch ID or URI\n timeout:\n Timeout in seconds. Wait for task completion by default. The timeout does not abort the ope...
Please provide a description of the function:def patch(self, id_or_uri, operation, path, value, timeout=-1): return self._client.patch(id_or_uri, operation, path, value, timeout=timeout)
[ "\n Uses the PATCH to update a resource for a given logical switch group.\n\n Only one operation can be performed in each PATCH call.\n\n Args:\n id_or_uri: Can be either the resource ID or the resource URI.\n operation: Patch operation\n path: Path\n ...
Please provide a description of the function:def migrate(self, id_or_uri, timeout=-1): # create the special payload to tell the VC Migration Manager to migrate the VC domain migrationInformation = { 'migrationState': 'Migrated', 'type': 'migratable-vc-domains', ...
[ "\n Initiates a migration of an enclosure specified by the ID or URI of a migration report.\n\n Args:\n id_or_uri: ID or URI of the migration report.\n timeout: Timeout in seconds. Waits for task completion by default. The timeout does not abort the task in\n One...
Please provide a description of the function:def get_by_resource(self, resource_uri): uri = self.URI + self.RESOURCES_PATH + '/' + resource_uri return self._client.get(id_or_uri=uri)
[ "\n Gets all the labels for the specified resource\n\n Args:\n resource_uri: The resource URI\n\n Returns:\n dict: Resource Labels\n " ]
Please provide a description of the function:def create(self, resource): uri = self.URI + self.RESOURCES_PATH return self._client.create(resource=resource, uri=uri)
[ "\n Set all the labels for a resource.\n\n Args:\n resource: The object containing the resource URI and a list of labels\n\n Returns:\n dict: Resource Labels\n " ]
Please provide a description of the function:def delete(self, resource, timeout=-1): self._client.delete(resource=resource, timeout=timeout)
[ "\n Delete all the labels for a resource.\n\n Args:\n resource (dict): Object to delete.\n timeout:\n Timeout in seconds. Wait for task completion by default. The timeout does not abort the operation\n in OneView, just stop waiting for its completion...
Please provide a description of the function:def update(self, resource, timeout=-1): return self._client.update(resource, timeout=timeout, default_values=self.DEFAULT_VALUES, uri=self.URI)
[ "\n Updates a User.\n\n Args:\n resource (dict): Object to update.\n timeout:\n Timeout in seconds. Wait for task completion by default. The timeout does not abort the operation\n in OneView, just stop waiting for its completion.\n\n Returns:\...
Please provide a description of the function:def get_by(self, field, value): if field == 'userName' or field == 'name': return self._client.get(self.URI + '/' + value) elif field == 'role': value = value.replace(" ", "%20") return self._client.get(self.URI + ...
[ "\n Gets all Users that match the filter.\n\n The search is case-insensitive.\n\n Args:\n field: Field name to filter. Accepted values: 'name', 'userName', 'role'\n value: Value to filter.\n\n Returns:\n list: A list of Users.\n " ]
Please provide a description of the function:def validate_user_name(self, user_name, timeout=-1): uri = self.URI + '/validateLoginName/' + user_name return self._client.create_with_zero_body(uri=uri, timeout=timeout)
[ "\n Verifies if a userName is already in use.\n\n Args:\n user_name:\n The userName to be verified.\n timeout:\n Timeout in seconds. Wait for task completion by default. The timeout does not abort the operation in\n OneView, just stops...
Please provide a description of the function:def validate_full_name(self, full_name, timeout=-1): uri = self.URI + '/validateUserName/' + full_name return self._client.create_with_zero_body(uri=uri, timeout=timeout)
[ "\n Verifies if a fullName is already in use.\n\n Args:\n full_name:\n The fullName to be verified.\n timeout:\n Timeout in seconds. Wait for task completion by default. The timeout does not abort the operation in\n OneView, just stops...
Please provide a description of the function:def add_ipdu(self, information, timeout=-1): uri = self.URI + "/discover" return self._client.create(information, uri=uri, timeout=timeout)
[ "\n Add an HP iPDU and bring all components under management by discovery of its management module. Bring the\n management module under exclusive management by the appliance, configure any management or data collection\n settings, and create a private set of administrative credentials to enable...
Please provide a description of the function:def get_power_state(self, id_or_uri): uri = self._client.build_uri(id_or_uri) + "/powerState" return self._client.get(uri)
[ "\n Gets the power state (on, off or unknown) of the specified power delivery device that supports power control.\n The device must be an HP Intelligent Outlet.\n\n Args:\n id_or_uri:\n Can be either the power device id or the uri\n\n Returns:\n str: ...
Please provide a description of the function: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, uri)
[ "\n Sets the power state of the specified power delivery device. The device must be an HP Intelligent Outlet.\n\n Args:\n id_or_uri:\n Can be either the power device id or the uri\n power_state:\n {\"powerState\":\"On|Off\"}\n\n Returns:\n ...
Please provide a description of the function:def update_refresh_state(self, id_or_uri, refresh_state_data): uri = self._client.build_uri(id_or_uri) + "/refreshState" return self._client.update(refresh_state_data, uri=uri)
[ "\n Refreshes a given intelligent power delivery device.\n\n Args:\n id_or_uri:\n Can be either the power device id or the uri\n refresh_state_data:\n Power device refresh request\n\n Returns:\n str: The power state\n " ]
Please provide a description of the function:def remove_synchronous(self, resource, force=False, timeout=-1): uri = self._client.build_uri(resource['uri']) + "/synchronous" remove_resource = {'uri': uri} return self._client.delete(remove_resource, force=force, timeout=timeout)
[ "\n Deletes the resource specified by {id} synchronously.\n\n Args:\n resource: dict object to remove\n force:\n If set to true, the operation completes despite any problems with\n network connectivity or errors on the resource itself. The default ...
Please provide a description of the function:def get_uid_state(self, id_or_uri): uri = self._client.build_uri(id_or_uri) + "/uidState" return self._client.get(uri)
[ "\n Retrieves the unit identification (UID) state (on, off, unknown) of the specified power outlet or extension bar\n resource. The device must be an HP iPDU component with a locator light (HP Intelligent Load Segment,\n HP AC Module, HP Intelligent Outlet Bar, or HP Intelligent Outlet).\n\n ...
Please provide a description of the function:def update_uid_state(self, id_or_uri, refresh_state_data): uri = self._client.build_uri(id_or_uri) + "/uidState" return self._client.update(refresh_state_data, uri)
[ "\n Sets the unit identification (UID) light state of the specified power delivery device. The device must be an\n HP iPDU component with a locator light (HP Intelligent Load Segment, HP AC Module, HP Intelligent Outlet Bar,\n or HP Intelligent Outlet)\n\n Args:\n id_or_uri:\n...
Please provide a description of the function:def get_utilization(self, id_or_uri, fields=None, filter=None, refresh=False, view=None): return self._client.get_utilization(id_or_uri, fields, filter, refresh, view)
[ "\n Retrieves historical utilization data for the specified metrics and time span. The device must be a component\n of an HPE iPDU.\n\n Args:\n id_or_uri:\n The power device id or the resource uri\n fields:\n Name of the metric(s) to be retrie...
Please provide a description of the function:def retrieve_differences(self, id_or_uri, content, timeout=-1): uri = self.URI + "/differences/" + extract_id_from_uri(id_or_uri) return self._client.create(content, uri=uri, timeout=timeout)
[ "\n Retrieves the modified contents of the selected Plan Script according to the provided content object, as per\n the selected attributes.\n\n Args:\n id_or_uri: ID or URI of the Plan Script.\n content (str): Plan Script content.\n timeout:\n Tim...
Please provide a description of the function:def get_usedby_and_readonly(self, id): uri = self.URI + "/" + id + "/usedby/readonly" return self._client.get(uri)
[ "\n Gets the build plans details os teh selected plan script as per the selected attributes.\n\n Args:\n id: ID of the Plan Script.\n\n Returns:\n array of build plans\n " ]
Please provide a description of the function: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.get(uri)
[ "\n Retrieves facts about Server Profiles and Server Profile Templates that are using Deployment Plan based on the ID or URI provided.\n\n Args:\n id_or_uri: ID or URI of the Deployment Plan.\n\n Returns:\n dict: Server Profiles and Server Profile Templates\n " ]
Please provide a description of the function:def update(self, data=None, timeout=-1, force=''): uri = self.data['uri'] resource = deepcopy(self.data) resource.update(data) # Removes related fields to serverHardware in case of unassign if resource.get('serverHardwareUri...
[ "Updates server profile template.\n\n Args:\n data: Data to update the resource.\n timeout: Timeout in seconds. Wait for task completion by default. The timeout does not abort the operation\n in OneView; it just stops waiting for its completion.\n force: Force ...
Please provide a description of the function:def delete_all(self, filter, timeout=-1, force=False): return self._helper.delete_all(filter=filter, force=force, timeout=timeout)
[ "\n Deletes all Server Profile objects from the appliance that match the provided filter.\n Filters are supported only for the following profile attributes: name, description, serialnumber, uuid,\n mactype, wwntype, serialnumbertype, status, and state.\n\n\n Examples:\n >>> s...
Please provide a description of the function:def get_compliance_preview(self): uri = '{}/compliance-preview'.format(self.data["uri"]) return self._helper.do_get(uri)
[ "\n Gets the preview of manual and automatic updates required to make the server profile\n consistent with its template.\n\n Returns:\n dict: Server profile compliance preview.\n " ]
Please provide a description of the function:def get_profile_ports(self, **kwargs): uri = self._helper.build_uri_with_query_string(kwargs, '/profile-ports') return self._helper.do_get(uri)
[ "\n Retrieves the port model associated with a server or server hardware type and enclosure group.\n\n Args:\n enclosureGroupUri (str):\n The URI of the enclosure group associated with the resource.\n serverHardwareTypeUri (str):\n The URI of the ser...
Please provide a description of the function:def get_messages(self): uri = '{}/messages'.format(self.data["uri"]) return self._helper.do_get(uri)
[ "\n Retrieves the error or status messages associated with the specified profile.\n\n Returns:\n dict: Server Profile Health.\n " ]
Please provide a description of the function:def get_available_networks(self, **kwargs): uri = self._helper.build_uri_with_query_string(kwargs, '/available-networks') return self._helper.do_get(uri)
[ "\n Retrieves the list of Ethernet networks, Fiber Channel networks, and network sets that are available to a\n server profile, along with their respective ports.\n\n Args:\n enclosureGroupUri (str): The URI of the enclosure group associated with the resource.\n functionType...
Please provide a description of the function:def get_available_servers(self, **kwargs): uri = self._helper.build_uri_with_query_string(kwargs, '/available-servers') return self._helper.do_get(uri)
[ "\n Retrieves the list of available servers.\n\n Args:\n enclosureGroupUri (str): The URI of the enclosure group associated with the resource.\n serverHardwareTypeUri (str): The URI of the server hardware type associated with the resource.\n profileUri (str): The URI of t...
Please provide a description of the function:def get_available_storage_system(self, **kwargs): uri = self._helper.build_uri_with_query_string(kwargs, '/available-storage-system') return self._helper.do_get(uri)
[ "\n Retrieves a specific storage system and its associated volumes available to the server profile based\n on the given server hardware type and enclosure group.\n\n Args:\n enclosureGroupUri (str):\n The URI of the enclosure group associated with the resource.\n ...
Please provide a description of the function:def get_available_storage_systems(self, start=0, count=-1, filter='', sort='', **kwargs): uri = self._helper.build_uri_with_query_string(kwargs, '/available-storage-systems') return self._helper.get_all(start=start, count=count, filter=filter, sort=s...
[ "\n Retrieves the list of the storage systems and their associated volumes available to the server profile\n based on the given server hardware type and enclosure group.\n\n Args:\n count:\n The number of resources to return. A count of -1 requests all items. The actual ...
Please provide a description of the function:def get_available_targets(self, **kwargs): uri = self._helper.build_uri_with_query_string(kwargs, '/available-targets') return self._helper.do_get(uri)
[ "\n Retrieves a list of the target servers and empty device bays that are available for assignment to the server\n profile.\n\n Args:\n enclosureGroupUri (str): The URI of the enclosure group associated with the resource.\n serverHardwareTypeUri (str): The URI of the server ...
Please provide a description of the function:def get_new_profile_template(self): uri = '{}/new-profile-template'.format(self.data["uri"]) return self._helper.do_get(uri)
[ "\n Retrieves the profile template for a given server profile.\n\n Returns:\n dict: Server profile template.\n " ]
Please provide a description of the function:def update_script(self, script_body): uri = "{}/script".format(self.data['uri']) return self._helper.update(script_body, uri=uri)
[ "\n Updates the configuration script of the enclosure-group with the specified URI.\n\n Args:\n id_or_uri: Resource id or resource uri.\n script_body: Configuration script.\n\n Returns:\n dict: Updated enclosure group.\n " ]
Please provide a description of the function:def remove_extra_presentations(self, resource, timeout=-1): uri = self.URI + "/repair" custom_headers = {'Accept-Language': 'en_US'} return self._client.create(resource, uri=uri, timeout=timeout, custom_headers=custom_headers)
[ "\n Removes extra presentations from a specified server profile.\n\n Args:\n resource (dict):\n Object to create\n timeout:\n Timeout in seconds. Wait for task completion by default. The timeout does not abort the operation\n in OneVie...
Please provide a description of the function:def get_paths(self, id_or_uri, path_id_or_uri=''): if path_id_or_uri: uri = self._client.build_uri(path_id_or_uri) if "/paths" not in uri: uri = self._client.build_uri( id_or_uri) + "/paths" + "/" +...
[ "\n Gets all paths or a specific attachment path for the specified volume attachment.\n\n Args:\n id_or_uri: Can be either the volume attachment id or the volume attachment uri.\n path_id_or_uri: Can be either the path id or the path uri.\n\n Returns:\n dict: Pa...
Please provide a description of the function:def get_backup(self, id_or_uri): uri = self.BACKUPS_PATH + '/' + extract_id_from_uri(id_or_uri) return self._client.get(id_or_uri=uri)
[ "\n Get the details for the backup from an Artifact Bundle.\n\n Args:\n id_or_uri: ID or URI of the Artifact Bundle.\n\n Returns:\n Dict: Backup for an Artifacts Bundle.\n " ]
Please provide a description of the function:def download_archive_artifact_bundle(self, id_or_uri, file_path): uri = self.BACKUP_ARCHIVE_PATH + '/' + extract_id_from_uri(id_or_uri) return self._client.download(uri, file_path)
[ "\n Downloads an archive for the Artifact Bundle.\n\n Args:\n id_or_uri: ID or URI of the Artifact Bundle.\n file_path(str): Destination file path.\n\n Returns:\n bool: Successfully downloaded.\n " ]
Please provide a description of the function:def download_artifact_bundle(self, id_or_uri, file_path): uri = self.DOWNLOAD_PATH + '/' + extract_id_from_uri(id_or_uri) return self._client.download(uri, file_path)
[ "\n Download the Artifact Bundle.\n\n Args:\n id_or_uri: ID or URI of the Artifact Bundle.\n file_path(str): Destination file path.\n\n Returns:\n bool: Successfully downloaded.\n " ]
Please provide a description of the function:def create_backup(self, resource, timeout=-1): return self._client.create(resource, uri=self.BACKUPS_PATH, timeout=timeout)
[ "\n Creates a backup bundle with all the artifacts present on the appliance. At any given point only one backup\n bundle will exist on the appliance.\n\n Args:\n resource (dict): Deployment Group to create the backup.\n timeout:\n Timeout in seconds. Waits f...
Please provide a description of the function:def upload_backup_bundle_from_file(self, file_path, deployment_groups_id_or_uri): deployment_groups_uri = deployment_groups_id_or_uri if self.DEPLOYMENT_GROUPS_URI not in deployment_groups_id_or_uri: deployment_groups_uri = self.DEPLOYME...
[ "\n Restore an Artifact Bundle from a backup file.\n\n Args:\n file_path (str): The File Path to restore the Artifact Bundle.\n deployment_groups_id_or_uri: ID or URI of the Deployment Groups.\n\n Returns:\n dict: Deployment group.\n " ]
Please provide a description of the function:def update(self, resource, timeout=-1): return self._client.update(resource, timeout=timeout, default_values=self.DEFAULT_VALUES)
[ "\n Updates only name for the Artifact Bundle.\n\n Args:\n resource (dict): Object to update.\n timeout:\n Timeout in seconds. Waits for task completion by default. The timeout does not abort the operation\n in OneView, it just stops waiting for its ...
Please provide a description of the function:def extract_bundle(self, resource, timeout=-1): return self._client.update(resource, timeout=timeout, custom_headers={"Content-Type": "text/plain"})
[ "\n Extracts the existing bundle on the appliance and creates all the artifacts.\n\n Args:\n resource (dict): Artifact Bundle to extract.\n timeout:\n Timeout in seconds. Waits for task completion by default. The timeout does not abort the operation in\n ...
Please provide a description of the function:def extract_backup_bundle(self, resource, timeout=-1): return self._client.update(resource, uri=self.BACKUP_ARCHIVE_PATH, timeout=timeout)
[ "\n Extracts the existing backup bundle on the appliance and creates all the artifacts.\n\n Args:\n resource (dict): Deployment Group to extract.\n timeout:\n Timeout in seconds. Waits for task completion by default. The timeout does not abort the operation in\n ...
Please provide a description of the function:def stop_artifact_creation(self, id_or_uri, task_uri): data = { "taskUri": task_uri } uri = self.URI + '/' + extract_id_from_uri(id_or_uri) + self.STOP_CREATION_PATH return self._client.update(data, uri=uri)
[ "\n Stops creation of the selected Artifact Bundle.\n\n Args:\n id_or_uri: ID or URI of the Artifact Bundle.\n task_uri: Task URI associated with the Artifact Bundle.\n\n Returns:\n string:\n " ]