id
int32
0
252k
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
18,600
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
18,601
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
18,602
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
18,603
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
18,604
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
18,605
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
18,606
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
18,607
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
18,608
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
18,609
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
18,610
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
18,611
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
18,612
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
18,613
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
18,614
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
18,615
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
18,616
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
18,617
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
18,618
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
18,619
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
18,620
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
18,621
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
18,622
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
18,623
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
18,624
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
18,625
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
18,626
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
18,627
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", ")", ":", "# create the special payload to tell the VC Migration Manager to migrate the VC domain", "migrationInformation", "=", "{", "'migrationState'", ":", "'Migrated'", ",", "'type'", ":",...
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
18,628
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
18,629
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
18,630
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
18,631
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
18,632
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
18,633
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
18,634
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
18,635
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
18,636
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
18,637
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
18,638
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
18,639
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
18,640
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
18,641
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
18,642
HewlettPackard/python-hpOneView
hpOneView/resources/servers/server_profiles.py
ServerProfiles.get_compliance_preview
def get_compliance_preview(self): """ Gets the preview of manual and automatic updates required to make the server profile consistent with its template. Returns: dict: Server profile compliance preview. """ uri = '{}/compliance-preview'.format(self.data["uri"...
python
def get_compliance_preview(self): """ Gets the preview of manual and automatic updates required to make the server profile consistent with its template. Returns: dict: Server profile compliance preview. """ uri = '{}/compliance-preview'.format(self.data["uri"...
[ "def", "get_compliance_preview", "(", "self", ")", ":", "uri", "=", "'{}/compliance-preview'", ".", "format", "(", "self", ".", "data", "[", "\"uri\"", "]", ")", "return", "self", ".", "_helper", ".", "do_get", "(", "uri", ")" ]
Gets the preview of manual and automatic updates required to make the server profile consistent with its template. Returns: dict: Server profile compliance preview.
[ "Gets", "the", "preview", "of", "manual", "and", "automatic", "updates", "required", "to", "make", "the", "server", "profile", "consistent", "with", "its", "template", "." ]
3c6219723ef25e6e0c83d44a89007f89bc325b89
https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/servers/server_profiles.py#L138-L147
18,643
HewlettPackard/python-hpOneView
hpOneView/resources/servers/server_profiles.py
ServerProfiles.get_profile_ports
def get_profile_ports(self, **kwargs): """ Retrieves the port model associated with a server or server hardware type and enclosure group. Args: enclosureGroupUri (str): The URI of the enclosure group associated with the resource. serverHardwareTypeUri (st...
python
def get_profile_ports(self, **kwargs): """ Retrieves the port model associated with a server or server hardware type and enclosure group. Args: enclosureGroupUri (str): The URI of the enclosure group associated with the resource. serverHardwareTypeUri (st...
[ "def", "get_profile_ports", "(", "self", ",", "*", "*", "kwargs", ")", ":", "uri", "=", "self", ".", "_helper", ".", "build_uri_with_query_string", "(", "kwargs", ",", "'/profile-ports'", ")", "return", "self", ".", "_helper", ".", "do_get", "(", "uri", ")...
Retrieves the port model associated with a server or server hardware type and enclosure group. Args: enclosureGroupUri (str): The URI of the enclosure group associated with the resource. serverHardwareTypeUri (str): The URI of the server hardware type ass...
[ "Retrieves", "the", "port", "model", "associated", "with", "a", "server", "or", "server", "hardware", "type", "and", "enclosure", "group", "." ]
3c6219723ef25e6e0c83d44a89007f89bc325b89
https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/servers/server_profiles.py#L149-L165
18,644
HewlettPackard/python-hpOneView
hpOneView/resources/servers/server_profiles.py
ServerProfiles.get_messages
def get_messages(self): """ Retrieves the error or status messages associated with the specified profile. Returns: dict: Server Profile Health. """ uri = '{}/messages'.format(self.data["uri"]) return self._helper.do_get(uri)
python
def get_messages(self): """ Retrieves the error or status messages associated with the specified profile. Returns: dict: Server Profile Health. """ uri = '{}/messages'.format(self.data["uri"]) return self._helper.do_get(uri)
[ "def", "get_messages", "(", "self", ")", ":", "uri", "=", "'{}/messages'", ".", "format", "(", "self", ".", "data", "[", "\"uri\"", "]", ")", "return", "self", ".", "_helper", ".", "do_get", "(", "uri", ")" ]
Retrieves the error or status messages associated with the specified profile. Returns: dict: Server Profile Health.
[ "Retrieves", "the", "error", "or", "status", "messages", "associated", "with", "the", "specified", "profile", "." ]
3c6219723ef25e6e0c83d44a89007f89bc325b89
https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/servers/server_profiles.py#L168-L176
18,645
HewlettPackard/python-hpOneView
hpOneView/resources/servers/server_profiles.py
ServerProfiles.get_available_networks
def get_available_networks(self, **kwargs): """ Retrieves the list of Ethernet networks, Fiber Channel networks, and network sets that are available to a server profile, along with their respective ports. Args: enclosureGroupUri (str): The URI of the enclosure group associate...
python
def get_available_networks(self, **kwargs): """ Retrieves the list of Ethernet networks, Fiber Channel networks, and network sets that are available to a server profile, along with their respective ports. Args: enclosureGroupUri (str): The URI of the enclosure group associate...
[ "def", "get_available_networks", "(", "self", ",", "*", "*", "kwargs", ")", ":", "uri", "=", "self", ".", "_helper", ".", "build_uri_with_query_string", "(", "kwargs", ",", "'/available-networks'", ")", "return", "self", ".", "_helper", ".", "do_get", "(", "...
Retrieves the list of Ethernet networks, Fiber Channel networks, and network sets that are available to a server profile, along with their respective ports. Args: enclosureGroupUri (str): The URI of the enclosure group associated with the resource. functionType (str): The Function...
[ "Retrieves", "the", "list", "of", "Ethernet", "networks", "Fiber", "Channel", "networks", "and", "network", "sets", "that", "are", "available", "to", "a", "server", "profile", "along", "with", "their", "respective", "ports", "." ]
3c6219723ef25e6e0c83d44a89007f89bc325b89
https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/servers/server_profiles.py#L205-L233
18,646
HewlettPackard/python-hpOneView
hpOneView/resources/servers/server_profiles.py
ServerProfiles.get_available_servers
def get_available_servers(self, **kwargs): """ Retrieves the list of available servers. Args: enclosureGroupUri (str): The URI of the enclosure group associated with the resource. serverHardwareTypeUri (str): The URI of the server hardware type associated with the resource...
python
def get_available_servers(self, **kwargs): """ Retrieves the list of available servers. Args: enclosureGroupUri (str): The URI of the enclosure group associated with the resource. serverHardwareTypeUri (str): The URI of the server hardware type associated with the resource...
[ "def", "get_available_servers", "(", "self", ",", "*", "*", "kwargs", ")", ":", "uri", "=", "self", ".", "_helper", ".", "build_uri_with_query_string", "(", "kwargs", ",", "'/available-servers'", ")", "return", "self", ".", "_helper", ".", "do_get", "(", "ur...
Retrieves the list of available servers. Args: enclosureGroupUri (str): The URI of the enclosure group associated with the resource. serverHardwareTypeUri (str): The URI of the server hardware type associated with the resource. profileUri (str): The URI of the server profile re...
[ "Retrieves", "the", "list", "of", "available", "servers", "." ]
3c6219723ef25e6e0c83d44a89007f89bc325b89
https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/servers/server_profiles.py#L235-L251
18,647
HewlettPackard/python-hpOneView
hpOneView/resources/servers/server_profiles.py
ServerProfiles.get_available_storage_system
def get_available_storage_system(self, **kwargs): """ Retrieves a specific storage system and its associated volumes available to the server profile based on the given server hardware type and enclosure group. Args: enclosureGroupUri (str): The URI of the enclo...
python
def get_available_storage_system(self, **kwargs): """ Retrieves a specific storage system and its associated volumes available to the server profile based on the given server hardware type and enclosure group. Args: enclosureGroupUri (str): The URI of the enclo...
[ "def", "get_available_storage_system", "(", "self", ",", "*", "*", "kwargs", ")", ":", "uri", "=", "self", ".", "_helper", ".", "build_uri_with_query_string", "(", "kwargs", ",", "'/available-storage-system'", ")", "return", "self", ".", "_helper", ".", "do_get"...
Retrieves a specific storage system and its associated volumes available to the server profile based on the given server hardware type and enclosure group. Args: enclosureGroupUri (str): The URI of the enclosure group associated with the resource. serverHardwareType...
[ "Retrieves", "a", "specific", "storage", "system", "and", "its", "associated", "volumes", "available", "to", "the", "server", "profile", "based", "on", "the", "given", "server", "hardware", "type", "and", "enclosure", "group", "." ]
3c6219723ef25e6e0c83d44a89007f89bc325b89
https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/servers/server_profiles.py#L253-L270
18,648
HewlettPackard/python-hpOneView
hpOneView/resources/servers/server_profiles.py
ServerProfiles.get_available_storage_systems
def get_available_storage_systems(self, start=0, count=-1, filter='', sort='', **kwargs): """ Retrieves the list of the storage systems and their associated volumes available to the server profile based on the given server hardware type and enclosure group. Args: count: ...
python
def get_available_storage_systems(self, start=0, count=-1, filter='', sort='', **kwargs): """ Retrieves the list of the storage systems and their associated volumes available to the server profile based on the given server hardware type and enclosure group. Args: count: ...
[ "def", "get_available_storage_systems", "(", "self", ",", "start", "=", "0", ",", "count", "=", "-", "1", ",", "filter", "=", "''", ",", "sort", "=", "''", ",", "*", "*", "kwargs", ")", ":", "uri", "=", "self", ".", "_helper", ".", "build_uri_with_qu...
Retrieves the list of the storage systems and their associated volumes available to the server profile based on the given server hardware type and enclosure group. Args: count: The number of resources to return. A count of -1 requests all items. The actual number of items in ...
[ "Retrieves", "the", "list", "of", "the", "storage", "systems", "and", "their", "associated", "volumes", "available", "to", "the", "server", "profile", "based", "on", "the", "given", "server", "hardware", "type", "and", "enclosure", "group", "." ]
3c6219723ef25e6e0c83d44a89007f89bc325b89
https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/servers/server_profiles.py#L272-L300
18,649
HewlettPackard/python-hpOneView
hpOneView/resources/servers/server_profiles.py
ServerProfiles.get_available_targets
def get_available_targets(self, **kwargs): """ Retrieves a list of the target servers and empty device bays that are available for assignment to the server profile. Args: enclosureGroupUri (str): The URI of the enclosure group associated with the resource. serverHa...
python
def get_available_targets(self, **kwargs): """ Retrieves a list of the target servers and empty device bays that are available for assignment to the server profile. Args: enclosureGroupUri (str): The URI of the enclosure group associated with the resource. serverHa...
[ "def", "get_available_targets", "(", "self", ",", "*", "*", "kwargs", ")", ":", "uri", "=", "self", ".", "_helper", ".", "build_uri_with_query_string", "(", "kwargs", ",", "'/available-targets'", ")", "return", "self", ".", "_helper", ".", "do_get", "(", "ur...
Retrieves a list of the target servers and empty device bays that are available for assignment to the server profile. Args: enclosureGroupUri (str): The URI of the enclosure group associated with the resource. serverHardwareTypeUri (str): The URI of the server hardware type associ...
[ "Retrieves", "a", "list", "of", "the", "target", "servers", "and", "empty", "device", "bays", "that", "are", "available", "for", "assignment", "to", "the", "server", "profile", "." ]
3c6219723ef25e6e0c83d44a89007f89bc325b89
https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/servers/server_profiles.py#L302-L320
18,650
HewlettPackard/python-hpOneView
hpOneView/resources/servers/server_profiles.py
ServerProfiles.get_new_profile_template
def get_new_profile_template(self): """ Retrieves the profile template for a given server profile. Returns: dict: Server profile template. """ uri = '{}/new-profile-template'.format(self.data["uri"]) return self._helper.do_get(uri)
python
def get_new_profile_template(self): """ Retrieves the profile template for a given server profile. Returns: dict: Server profile template. """ uri = '{}/new-profile-template'.format(self.data["uri"]) return self._helper.do_get(uri)
[ "def", "get_new_profile_template", "(", "self", ")", ":", "uri", "=", "'{}/new-profile-template'", ".", "format", "(", "self", ".", "data", "[", "\"uri\"", "]", ")", "return", "self", ".", "_helper", ".", "do_get", "(", "uri", ")" ]
Retrieves the profile template for a given server profile. Returns: dict: Server profile template.
[ "Retrieves", "the", "profile", "template", "for", "a", "given", "server", "profile", "." ]
3c6219723ef25e6e0c83d44a89007f89bc325b89
https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/servers/server_profiles.py#L323-L331
18,651
HewlettPackard/python-hpOneView
hpOneView/resources/servers/enclosure_groups.py
EnclosureGroups.update_script
def update_script(self, script_body): """ Updates the configuration script of the enclosure-group with the specified URI. Args: id_or_uri: Resource id or resource uri. script_body: Configuration script. Returns: dict: Updated enclosure group. ...
python
def update_script(self, script_body): """ Updates the configuration script of the enclosure-group with the specified URI. Args: id_or_uri: Resource id or resource uri. script_body: Configuration script. Returns: dict: Updated enclosure group. ...
[ "def", "update_script", "(", "self", ",", "script_body", ")", ":", "uri", "=", "\"{}/script\"", ".", "format", "(", "self", ".", "data", "[", "'uri'", "]", ")", "return", "self", ".", "_helper", ".", "update", "(", "script_body", ",", "uri", "=", "uri"...
Updates the configuration script of the enclosure-group with the specified URI. Args: id_or_uri: Resource id or resource uri. script_body: Configuration script. Returns: dict: Updated enclosure group.
[ "Updates", "the", "configuration", "script", "of", "the", "enclosure", "-", "group", "with", "the", "specified", "URI", "." ]
3c6219723ef25e6e0c83d44a89007f89bc325b89
https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/servers/enclosure_groups.py#L94-L107
18,652
HewlettPackard/python-hpOneView
hpOneView/resources/storage/storage_volume_attachments.py
StorageVolumeAttachments.remove_extra_presentations
def remove_extra_presentations(self, resource, timeout=-1): """ Removes extra presentations from a specified server profile. Args: resource (dict): Object to create timeout: Timeout in seconds. Wait for task completion by default. The time...
python
def remove_extra_presentations(self, resource, timeout=-1): """ Removes extra presentations from a specified server profile. Args: resource (dict): Object to create timeout: Timeout in seconds. Wait for task completion by default. The time...
[ "def", "remove_extra_presentations", "(", "self", ",", "resource", ",", "timeout", "=", "-", "1", ")", ":", "uri", "=", "self", ".", "URI", "+", "\"/repair\"", "custom_headers", "=", "{", "'Accept-Language'", ":", "'en_US'", "}", "return", "self", ".", "_c...
Removes extra presentations from a specified server profile. 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; it just stops waiti...
[ "Removes", "extra", "presentations", "from", "a", "specified", "server", "profile", "." ]
3c6219723ef25e6e0c83d44a89007f89bc325b89
https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/storage/storage_volume_attachments.py#L98-L113
18,653
HewlettPackard/python-hpOneView
hpOneView/resources/storage/storage_volume_attachments.py
StorageVolumeAttachments.get_paths
def get_paths(self, id_or_uri, path_id_or_uri=''): """ Gets all paths or a specific attachment path for the specified volume attachment. Args: id_or_uri: Can be either the volume attachment id or the volume attachment uri. path_id_or_uri: Can be either the path id or the...
python
def get_paths(self, id_or_uri, path_id_or_uri=''): """ Gets all paths or a specific attachment path for the specified volume attachment. Args: id_or_uri: Can be either the volume attachment id or the volume attachment uri. path_id_or_uri: Can be either the path id or the...
[ "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", ":", "ur...
Gets all paths or a specific attachment path for the specified volume attachment. Args: id_or_uri: Can be either the volume attachment id or the volume attachment uri. path_id_or_uri: Can be either the path id or the path uri. Returns: dict: Paths.
[ "Gets", "all", "paths", "or", "a", "specific", "attachment", "path", "for", "the", "specified", "volume", "attachment", "." ]
3c6219723ef25e6e0c83d44a89007f89bc325b89
https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/storage/storage_volume_attachments.py#L115-L135
18,654
HewlettPackard/python-hpOneView
hpOneView/image_streamer/resources/artifact_bundles.py
ArtifactBundles.get_backup
def get_backup(self, id_or_uri): """ Get the details for the backup from an Artifact Bundle. Args: id_or_uri: ID or URI of the Artifact Bundle. Returns: Dict: Backup for an Artifacts Bundle. """ uri = self.BACKUPS_PATH + '/' + extract_id_from_uri...
python
def get_backup(self, id_or_uri): """ Get the details for the backup from an Artifact Bundle. Args: id_or_uri: ID or URI of the Artifact Bundle. Returns: Dict: Backup for an Artifacts Bundle. """ uri = self.BACKUPS_PATH + '/' + extract_id_from_uri...
[ "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", ")" ]
Get the details for the backup from an Artifact Bundle. Args: id_or_uri: ID or URI of the Artifact Bundle. Returns: Dict: Backup for an Artifacts Bundle.
[ "Get", "the", "details", "for", "the", "backup", "from", "an", "Artifact", "Bundle", "." ]
3c6219723ef25e6e0c83d44a89007f89bc325b89
https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/image_streamer/resources/artifact_bundles.py#L129-L140
18,655
HewlettPackard/python-hpOneView
hpOneView/image_streamer/resources/artifact_bundles.py
ArtifactBundles.download_archive_artifact_bundle
def download_archive_artifact_bundle(self, id_or_uri, file_path): """ Downloads an archive for the Artifact Bundle. Args: id_or_uri: ID or URI of the Artifact Bundle. file_path(str): Destination file path. Returns: bool: Successfully downloaded. ...
python
def download_archive_artifact_bundle(self, id_or_uri, file_path): """ Downloads an archive for the Artifact Bundle. Args: id_or_uri: ID or URI of the Artifact Bundle. file_path(str): Destination file path. Returns: bool: Successfully downloaded. ...
[ "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"...
Downloads an archive for the Artifact Bundle. Args: id_or_uri: ID or URI of the Artifact Bundle. file_path(str): Destination file path. Returns: bool: Successfully downloaded.
[ "Downloads", "an", "archive", "for", "the", "Artifact", "Bundle", "." ]
3c6219723ef25e6e0c83d44a89007f89bc325b89
https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/image_streamer/resources/artifact_bundles.py#L142-L155
18,656
HewlettPackard/python-hpOneView
hpOneView/image_streamer/resources/artifact_bundles.py
ArtifactBundles.download_artifact_bundle
def download_artifact_bundle(self, id_or_uri, file_path): """ Download the Artifact Bundle. Args: id_or_uri: ID or URI of the Artifact Bundle. file_path(str): Destination file path. Returns: bool: Successfully downloaded. """ uri = se...
python
def download_artifact_bundle(self, id_or_uri, file_path): """ Download the Artifact Bundle. Args: id_or_uri: ID or URI of the Artifact Bundle. file_path(str): Destination file path. Returns: bool: Successfully downloaded. """ uri = se...
[ "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", "(", "ur...
Download the Artifact Bundle. Args: id_or_uri: ID or URI of the Artifact Bundle. file_path(str): Destination file path. Returns: bool: Successfully downloaded.
[ "Download", "the", "Artifact", "Bundle", "." ]
3c6219723ef25e6e0c83d44a89007f89bc325b89
https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/image_streamer/resources/artifact_bundles.py#L157-L169
18,657
HewlettPackard/python-hpOneView
hpOneView/image_streamer/resources/artifact_bundles.py
ArtifactBundles.create_backup
def create_backup(self, resource, timeout=-1): """ Creates a backup bundle with all the artifacts present on the appliance. At any given point only one backup bundle will exist on the appliance. Args: resource (dict): Deployment Group to create the backup. timeou...
python
def create_backup(self, resource, timeout=-1): """ Creates a backup bundle with all the artifacts present on the appliance. At any given point only one backup bundle will exist on the appliance. Args: resource (dict): Deployment Group to create the backup. timeou...
[ "def", "create_backup", "(", "self", ",", "resource", ",", "timeout", "=", "-", "1", ")", ":", "return", "self", ".", "_client", ".", "create", "(", "resource", ",", "uri", "=", "self", ".", "BACKUPS_PATH", ",", "timeout", "=", "timeout", ")" ]
Creates a backup bundle with all the artifacts present on the appliance. At any given point only one backup bundle will exist on the appliance. Args: resource (dict): Deployment Group to create the backup. timeout: Timeout in seconds. Waits for task completion by...
[ "Creates", "a", "backup", "bundle", "with", "all", "the", "artifacts", "present", "on", "the", "appliance", ".", "At", "any", "given", "point", "only", "one", "backup", "bundle", "will", "exist", "on", "the", "appliance", "." ]
3c6219723ef25e6e0c83d44a89007f89bc325b89
https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/image_streamer/resources/artifact_bundles.py#L171-L185
18,658
HewlettPackard/python-hpOneView
hpOneView/image_streamer/resources/artifact_bundles.py
ArtifactBundles.upload_backup_bundle_from_file
def upload_backup_bundle_from_file(self, file_path, deployment_groups_id_or_uri): """ Restore an Artifact Bundle from a backup file. Args: file_path (str): The File Path to restore the Artifact Bundle. deployment_groups_id_or_uri: ID or URI of the Deployment Groups. ...
python
def upload_backup_bundle_from_file(self, file_path, deployment_groups_id_or_uri): """ Restore an Artifact Bundle from a backup file. Args: file_path (str): The File Path to restore the Artifact Bundle. deployment_groups_id_or_uri: ID or URI of the Deployment Groups. ...
[ "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", ":", "d...
Restore an Artifact Bundle from a backup file. Args: file_path (str): The File Path to restore the Artifact Bundle. deployment_groups_id_or_uri: ID or URI of the Deployment Groups. Returns: dict: Deployment group.
[ "Restore", "an", "Artifact", "Bundle", "from", "a", "backup", "file", "." ]
3c6219723ef25e6e0c83d44a89007f89bc325b89
https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/image_streamer/resources/artifact_bundles.py#L199-L217
18,659
HewlettPackard/python-hpOneView
hpOneView/image_streamer/resources/artifact_bundles.py
ArtifactBundles.update
def update(self, resource, timeout=-1): """ Updates only name for the Artifact Bundle. Args: resource (dict): Object to update. timeout: Timeout in seconds. Waits for task completion by default. The timeout does not abort the operation in ...
python
def update(self, resource, timeout=-1): """ Updates only name for the Artifact Bundle. Args: resource (dict): Object to update. timeout: Timeout in seconds. Waits for task completion by default. The timeout does not abort the operation in ...
[ "def", "update", "(", "self", ",", "resource", ",", "timeout", "=", "-", "1", ")", ":", "return", "self", ".", "_client", ".", "update", "(", "resource", ",", "timeout", "=", "timeout", ",", "default_values", "=", "self", ".", "DEFAULT_VALUES", ")" ]
Updates only name for the Artifact Bundle. Args: resource (dict): Object to update. timeout: Timeout in seconds. Waits for task completion by default. The timeout does not abort the operation in OneView, it just stops waiting for its completion. ...
[ "Updates", "only", "name", "for", "the", "Artifact", "Bundle", "." ]
3c6219723ef25e6e0c83d44a89007f89bc325b89
https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/image_streamer/resources/artifact_bundles.py#L250-L263
18,660
HewlettPackard/python-hpOneView
hpOneView/image_streamer/resources/artifact_bundles.py
ArtifactBundles.extract_bundle
def extract_bundle(self, resource, timeout=-1): """ Extracts the existing bundle on the appliance and creates all the artifacts. Args: resource (dict): Artifact Bundle to extract. timeout: Timeout in seconds. Waits for task completion by default. The time...
python
def extract_bundle(self, resource, timeout=-1): """ Extracts the existing bundle on the appliance and creates all the artifacts. Args: resource (dict): Artifact Bundle to extract. timeout: Timeout in seconds. Waits for task completion by default. The time...
[ "def", "extract_bundle", "(", "self", ",", "resource", ",", "timeout", "=", "-", "1", ")", ":", "return", "self", ".", "_client", ".", "update", "(", "resource", ",", "timeout", "=", "timeout", ",", "custom_headers", "=", "{", "\"Content-Type\"", ":", "\...
Extracts the existing bundle on the appliance and creates all the artifacts. Args: resource (dict): Artifact Bundle to extract. timeout: Timeout in seconds. Waits for task completion by default. The timeout does not abort the operation in OneView, it just...
[ "Extracts", "the", "existing", "bundle", "on", "the", "appliance", "and", "creates", "all", "the", "artifacts", "." ]
3c6219723ef25e6e0c83d44a89007f89bc325b89
https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/image_streamer/resources/artifact_bundles.py#L265-L278
18,661
HewlettPackard/python-hpOneView
hpOneView/image_streamer/resources/artifact_bundles.py
ArtifactBundles.extract_backup_bundle
def extract_backup_bundle(self, resource, timeout=-1): """ Extracts the existing backup bundle on the appliance and creates all the artifacts. Args: resource (dict): Deployment Group to extract. timeout: Timeout in seconds. Waits for task completion by de...
python
def extract_backup_bundle(self, resource, timeout=-1): """ Extracts the existing backup bundle on the appliance and creates all the artifacts. Args: resource (dict): Deployment Group to extract. timeout: Timeout in seconds. Waits for task completion by de...
[ "def", "extract_backup_bundle", "(", "self", ",", "resource", ",", "timeout", "=", "-", "1", ")", ":", "return", "self", ".", "_client", ".", "update", "(", "resource", ",", "uri", "=", "self", ".", "BACKUP_ARCHIVE_PATH", ",", "timeout", "=", "timeout", ...
Extracts the existing backup bundle on the appliance and creates all the artifacts. Args: resource (dict): Deployment Group to extract. timeout: Timeout in seconds. Waits for task completion by default. The timeout does not abort the operation in OneView,...
[ "Extracts", "the", "existing", "backup", "bundle", "on", "the", "appliance", "and", "creates", "all", "the", "artifacts", "." ]
3c6219723ef25e6e0c83d44a89007f89bc325b89
https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/image_streamer/resources/artifact_bundles.py#L280-L293
18,662
HewlettPackard/python-hpOneView
hpOneView/image_streamer/resources/artifact_bundles.py
ArtifactBundles.stop_artifact_creation
def stop_artifact_creation(self, id_or_uri, task_uri): """ Stops creation of the selected Artifact Bundle. Args: id_or_uri: ID or URI of the Artifact Bundle. task_uri: Task URI associated with the Artifact Bundle. Returns: string: """ ...
python
def stop_artifact_creation(self, id_or_uri, task_uri): """ Stops creation of the selected Artifact Bundle. Args: id_or_uri: ID or URI of the Artifact Bundle. task_uri: Task URI associated with the Artifact Bundle. Returns: string: """ ...
[ "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", ...
Stops creation of the selected Artifact Bundle. Args: id_or_uri: ID or URI of the Artifact Bundle. task_uri: Task URI associated with the Artifact Bundle. Returns: string:
[ "Stops", "creation", "of", "the", "selected", "Artifact", "Bundle", "." ]
3c6219723ef25e6e0c83d44a89007f89bc325b89
https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/image_streamer/resources/artifact_bundles.py#L295-L312
18,663
HewlettPackard/python-hpOneView
hpOneView/resources/servers/logical_enclosures.py
LogicalEnclosures.get_script
def get_script(self): """ Gets the configuration script of the logical enclosure by ID or URI. Return: str: Configuration script. """ uri = "{}/script".format(self.data["uri"]) return self._helper.do_get(uri)
python
def get_script(self): """ Gets the configuration script of the logical enclosure by ID or URI. Return: str: Configuration script. """ uri = "{}/script".format(self.data["uri"]) return self._helper.do_get(uri)
[ "def", "get_script", "(", "self", ")", ":", "uri", "=", "\"{}/script\"", ".", "format", "(", "self", ".", "data", "[", "\"uri\"", "]", ")", "return", "self", ".", "_helper", ".", "do_get", "(", "uri", ")" ]
Gets the configuration script of the logical enclosure by ID or URI. Return: str: Configuration script.
[ "Gets", "the", "configuration", "script", "of", "the", "logical", "enclosure", "by", "ID", "or", "URI", "." ]
3c6219723ef25e6e0c83d44a89007f89bc325b89
https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/servers/logical_enclosures.py#L97-L105
18,664
HewlettPackard/python-hpOneView
hpOneView/resources/servers/logical_enclosures.py
LogicalEnclosures.update_script
def update_script(self, information, timeout=-1): """ Updates the configuration script of the logical enclosure and on all enclosures in the logical enclosure with the specified ID. Args: information: Updated script. timeout: Timeout in seconds. Wait for task com...
python
def update_script(self, information, timeout=-1): """ Updates the configuration script of the logical enclosure and on all enclosures in the logical enclosure with the specified ID. Args: information: Updated script. timeout: Timeout in seconds. Wait for task com...
[ "def", "update_script", "(", "self", ",", "information", ",", "timeout", "=", "-", "1", ")", ":", "uri", "=", "\"{}/script\"", ".", "format", "(", "self", ".", "data", "[", "\"uri\"", "]", ")", "return", "self", ".", "_helper", ".", "update", "(", "i...
Updates the configuration script of the logical enclosure and on all enclosures in the logical enclosure with the specified ID. Args: information: Updated script. timeout: Timeout in seconds. Wait for task completion by default. The timeout does not abort the operation ...
[ "Updates", "the", "configuration", "script", "of", "the", "logical", "enclosure", "and", "on", "all", "enclosures", "in", "the", "logical", "enclosure", "with", "the", "specified", "ID", "." ]
3c6219723ef25e6e0c83d44a89007f89bc325b89
https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/servers/logical_enclosures.py#L108-L122
18,665
HewlettPackard/python-hpOneView
hpOneView/resources/servers/logical_enclosures.py
LogicalEnclosures.generate_support_dump
def generate_support_dump(self, information, timeout=-1): """ Generates a support dump for the logical enclosure with the specified ID. A logical enclosure support dump includes content for logical interconnects associated with that logical enclosure. By default, it also contains applian...
python
def generate_support_dump(self, information, timeout=-1): """ Generates a support dump for the logical enclosure with the specified ID. A logical enclosure support dump includes content for logical interconnects associated with that logical enclosure. By default, it also contains applian...
[ "def", "generate_support_dump", "(", "self", ",", "information", ",", "timeout", "=", "-", "1", ")", ":", "uri", "=", "\"{}/support-dumps\"", ".", "format", "(", "self", ".", "data", "[", "\"uri\"", "]", ")", "return", "self", ".", "_helper", ".", "creat...
Generates a support dump for the logical enclosure with the specified ID. A logical enclosure support dump includes content for logical interconnects associated with that logical enclosure. By default, it also contains appliance support dump content. Args: information (dict): Inform...
[ "Generates", "a", "support", "dump", "for", "the", "logical", "enclosure", "with", "the", "specified", "ID", ".", "A", "logical", "enclosure", "support", "dump", "includes", "content", "for", "logical", "interconnects", "associated", "with", "that", "logical", "...
3c6219723ef25e6e0c83d44a89007f89bc325b89
https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/servers/logical_enclosures.py#L125-L140
18,666
HewlettPackard/python-hpOneView
hpOneView/resources/servers/logical_enclosures.py
LogicalEnclosures.update_from_group
def update_from_group(self, data=None, timeout=-1): """ Use this action to make a logical enclosure consistent with the enclosure group when the logical enclosure is in the Inconsistent state. Args: timeout: Timeout in seconds. Wait for task completion by default. The timeou...
python
def update_from_group(self, data=None, timeout=-1): """ Use this action to make a logical enclosure consistent with the enclosure group when the logical enclosure is in the Inconsistent state. Args: timeout: Timeout in seconds. Wait for task completion by default. The timeou...
[ "def", "update_from_group", "(", "self", ",", "data", "=", "None", ",", "timeout", "=", "-", "1", ")", ":", "uri", "=", "\"{}/updateFromGroup\"", ".", "format", "(", "self", ".", "data", "[", "\"uri\"", "]", ")", "return", "self", ".", "_helper", ".", ...
Use this action to make a logical enclosure consistent with the enclosure group when the logical enclosure is in the Inconsistent state. Args: timeout: Timeout in seconds. Wait for task completion by default. The timeout does not abort the operation in OneView; it just stops...
[ "Use", "this", "action", "to", "make", "a", "logical", "enclosure", "consistent", "with", "the", "enclosure", "group", "when", "the", "logical", "enclosure", "is", "in", "the", "Inconsistent", "state", "." ]
3c6219723ef25e6e0c83d44a89007f89bc325b89
https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/servers/logical_enclosures.py#L143-L156
18,667
HewlettPackard/python-hpOneView
hpOneView/resources/networking/ethernet_networks.py
EthernetNetworks.create_bulk
def create_bulk(self, resource, timeout=-1): """ Creates bulk Ethernet networks. Args: resource (dict): Specifications to create in bulk. timeout: Timeout in seconds. Wait for task completion by default. The timeout does not abort the operation ...
python
def create_bulk(self, resource, timeout=-1): """ Creates bulk Ethernet networks. Args: resource (dict): Specifications to create in bulk. timeout: Timeout in seconds. Wait for task completion by default. The timeout does not abort the operation ...
[ "def", "create_bulk", "(", "self", ",", "resource", ",", "timeout", "=", "-", "1", ")", ":", "uri", "=", "self", ".", "URI", "+", "'/bulk'", "default_values", "=", "self", ".", "_get_default_values", "(", "self", ".", "BULK_DEFAULT_VALUES", ")", "updated_d...
Creates bulk Ethernet networks. Args: resource (dict): Specifications to create in bulk. 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. ...
[ "Creates", "bulk", "Ethernet", "networks", "." ]
3c6219723ef25e6e0c83d44a89007f89bc325b89
https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/networking/ethernet_networks.py#L63-L83
18,668
HewlettPackard/python-hpOneView
hpOneView/resources/networking/ethernet_networks.py
EthernetNetworks.get_range
def get_range(self, name_prefix, vlan_id_range): """ Gets a list of Ethernet Networks that match the 'given name_prefix' and the 'vlan_id_range'. Examples: >>> enet.get_range('Enet_name', '1-2,5') # The result contains the ethernet network with names: ...
python
def get_range(self, name_prefix, vlan_id_range): """ Gets a list of Ethernet Networks that match the 'given name_prefix' and the 'vlan_id_range'. Examples: >>> enet.get_range('Enet_name', '1-2,5') # The result contains the ethernet network with names: ...
[ "def", "get_range", "(", "self", ",", "name_prefix", ",", "vlan_id_range", ")", ":", "filter", "=", "'\"\\'name\\' matches \\'{}\\_%\\'\"'", ".", "format", "(", "name_prefix", ")", "ethernet_networks", "=", "self", ".", "get_all", "(", "filter", "=", "filter", "...
Gets a list of Ethernet Networks that match the 'given name_prefix' and the 'vlan_id_range'. Examples: >>> enet.get_range('Enet_name', '1-2,5') # The result contains the ethernet network with names: ['Enet_name_1', 'Enet_name_2', 'Enet_name_5'] >>> enet....
[ "Gets", "a", "list", "of", "Ethernet", "Networks", "that", "match", "the", "given", "name_prefix", "and", "the", "vlan_id_range", "." ]
3c6219723ef25e6e0c83d44a89007f89bc325b89
https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/networking/ethernet_networks.py#L85-L114
18,669
HewlettPackard/python-hpOneView
hpOneView/resources/networking/ethernet_networks.py
EthernetNetworks.get_associated_profiles
def get_associated_profiles(self): """ Gets the URIs of profiles which are using an Ethernet network. Args: id_or_uri: Can be either the logical interconnect group id or the logical interconnect group uri Returns: list: URIs of the associated profiles. ...
python
def get_associated_profiles(self): """ Gets the URIs of profiles which are using an Ethernet network. Args: id_or_uri: Can be either the logical interconnect group id or the logical interconnect group uri Returns: list: URIs of the associated profiles. ...
[ "def", "get_associated_profiles", "(", "self", ")", ":", "uri", "=", "\"{}/associatedProfiles\"", ".", "format", "(", "self", ".", "data", "[", "'uri'", "]", ")", "return", "self", ".", "_helper", ".", "do_get", "(", "uri", ")" ]
Gets the URIs of profiles which are using an Ethernet network. Args: id_or_uri: Can be either the logical interconnect group id or the logical interconnect group uri Returns: list: URIs of the associated profiles.
[ "Gets", "the", "URIs", "of", "profiles", "which", "are", "using", "an", "Ethernet", "network", "." ]
3c6219723ef25e6e0c83d44a89007f89bc325b89
https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/networking/ethernet_networks.py#L154-L166
18,670
HewlettPackard/python-hpOneView
hpOneView/resources/networking/ethernet_networks.py
EthernetNetworks.get_associated_uplink_groups
def get_associated_uplink_groups(self): """ Gets the uplink sets which are using an Ethernet network. Returns: list: URIs of the associated uplink sets. """ uri = "{}/associatedUplinkGroups".format(self.data['uri']) return self._helper.do_get(uri)
python
def get_associated_uplink_groups(self): """ Gets the uplink sets which are using an Ethernet network. Returns: list: URIs of the associated uplink sets. """ uri = "{}/associatedUplinkGroups".format(self.data['uri']) return self._helper.do_get(uri)
[ "def", "get_associated_uplink_groups", "(", "self", ")", ":", "uri", "=", "\"{}/associatedUplinkGroups\"", ".", "format", "(", "self", ".", "data", "[", "'uri'", "]", ")", "return", "self", ".", "_helper", ".", "do_get", "(", "uri", ")" ]
Gets the uplink sets which are using an Ethernet network. Returns: list: URIs of the associated uplink sets.
[ "Gets", "the", "uplink", "sets", "which", "are", "using", "an", "Ethernet", "network", "." ]
3c6219723ef25e6e0c83d44a89007f89bc325b89
https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/networking/ethernet_networks.py#L169-L178
18,671
HewlettPackard/python-hpOneView
hpOneView/resources/resource.py
merge_resources
def merge_resources(resource1, resource2): """ Updates a copy of resource1 with resource2 values and returns the merged dictionary. Args: resource1: original resource resource2: resource to update resource1 Returns: dict: merged resource """ merged = resource1.copy() ...
python
def merge_resources(resource1, resource2): """ Updates a copy of resource1 with resource2 values and returns the merged dictionary. Args: resource1: original resource resource2: resource to update resource1 Returns: dict: merged resource """ merged = resource1.copy() ...
[ "def", "merge_resources", "(", "resource1", ",", "resource2", ")", ":", "merged", "=", "resource1", ".", "copy", "(", ")", "merged", ".", "update", "(", "resource2", ")", "return", "merged" ]
Updates a copy of resource1 with resource2 values and returns the merged dictionary. Args: resource1: original resource resource2: resource to update resource1 Returns: dict: merged resource
[ "Updates", "a", "copy", "of", "resource1", "with", "resource2", "values", "and", "returns", "the", "merged", "dictionary", "." ]
3c6219723ef25e6e0c83d44a89007f89bc325b89
https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/resource.py#L1737-L1750
18,672
HewlettPackard/python-hpOneView
hpOneView/resources/resource.py
merge_default_values
def merge_default_values(resource_list, default_values): """ Generate a new list where each item of original resource_list will be merged with the default_values. Args: resource_list: list with items to be merged default_values: properties to be merged with each item list. If the item alrea...
python
def merge_default_values(resource_list, default_values): """ Generate a new list where each item of original resource_list will be merged with the default_values. Args: resource_list: list with items to be merged default_values: properties to be merged with each item list. If the item alrea...
[ "def", "merge_default_values", "(", "resource_list", ",", "default_values", ")", ":", "def", "merge_item", "(", "resource", ")", ":", "return", "merge_resources", "(", "default_values", ",", "resource", ")", "return", "lmap", "(", "merge_item", ",", "resource_list...
Generate a new list where each item of original resource_list will be merged with the default_values. Args: resource_list: list with items to be merged default_values: properties to be merged with each item list. If the item already contains some property the original value will be main...
[ "Generate", "a", "new", "list", "where", "each", "item", "of", "original", "resource_list", "will", "be", "merged", "with", "the", "default_values", "." ]
3c6219723ef25e6e0c83d44a89007f89bc325b89
https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/resource.py#L1753-L1769
18,673
HewlettPackard/python-hpOneView
hpOneView/resources/resource.py
Resource.ensure_resource_data
def ensure_resource_data(self, update_data=False): """Retrieves data from OneView and updates resource object. Args: update_data: Flag to update resource data when it is required. """ # Check for unique identifier in the resource data if not any(key in self.data for ...
python
def ensure_resource_data(self, update_data=False): """Retrieves data from OneView and updates resource object. Args: update_data: Flag to update resource data when it is required. """ # Check for unique identifier in the resource data if not any(key in self.data for ...
[ "def", "ensure_resource_data", "(", "self", ",", "update_data", "=", "False", ")", ":", "# Check for unique identifier in the resource data", "if", "not", "any", "(", "key", "in", "self", ".", "data", "for", "key", "in", "self", ".", "UNIQUE_IDENTIFIERS", ")", "...
Retrieves data from OneView and updates resource object. Args: update_data: Flag to update resource data when it is required.
[ "Retrieves", "data", "from", "OneView", "and", "updates", "resource", "object", "." ]
3c6219723ef25e6e0c83d44a89007f89bc325b89
https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/resource.py#L110-L141
18,674
HewlettPackard/python-hpOneView
hpOneView/resources/resource.py
Resource.get_by
def get_by(self, field, value): """Get the resource by passing a field and its value. Note: This function uses get_all passing a filter.The search is case-insensitive. Args: field: Field name to filter. value: Value to filter. Returns: d...
python
def get_by(self, field, value): """Get the resource by passing a field and its value. Note: This function uses get_all passing a filter.The search is case-insensitive. Args: field: Field name to filter. value: Value to filter. Returns: d...
[ "def", "get_by", "(", "self", ",", "field", ",", "value", ")", ":", "if", "not", "field", ":", "logger", ".", "exception", "(", "RESOURCE_CLIENT_INVALID_FIELD", ")", "raise", "ValueError", "(", "RESOURCE_CLIENT_INVALID_FIELD", ")", "filter", "=", "\"\\\"{0}='{1}...
Get the resource by passing a field and its value. Note: This function uses get_all passing a filter.The search is case-insensitive. Args: field: Field name to filter. value: Value to filter. Returns: dict
[ "Get", "the", "resource", "by", "passing", "a", "field", "and", "its", "value", "." ]
3c6219723ef25e6e0c83d44a89007f89bc325b89
https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/resource.py#L234-L259
18,675
HewlettPackard/python-hpOneView
hpOneView/resources/resource.py
Resource.get_by_name
def get_by_name(self, name): """Retrieves a resource by its name. Args: name: Resource name. Returns: Resource object or None if resource does not exist. """ result = self.get_by("name", name) if result: data = result[0] ...
python
def get_by_name(self, name): """Retrieves a resource by its name. Args: name: Resource name. Returns: Resource object or None if resource does not exist. """ result = self.get_by("name", name) if result: data = result[0] ...
[ "def", "get_by_name", "(", "self", ",", "name", ")", ":", "result", "=", "self", ".", "get_by", "(", "\"name\"", ",", "name", ")", "if", "result", ":", "data", "=", "result", "[", "0", "]", "new_resource", "=", "self", ".", "new", "(", "self", ".",...
Retrieves a resource by its name. Args: name: Resource name. Returns: Resource object or None if resource does not exist.
[ "Retrieves", "a", "resource", "by", "its", "name", "." ]
3c6219723ef25e6e0c83d44a89007f89bc325b89
https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/resource.py#L261-L278
18,676
HewlettPackard/python-hpOneView
hpOneView/resources/resource.py
Resource.get_by_uri
def get_by_uri(self, uri): """Retrieves a resource by its URI Args: uri: URI of the resource Returns: Resource object """ self._helper.validate_resource_uri(uri) data = self._helper.do_get(uri) if data: new_resource = self.ne...
python
def get_by_uri(self, uri): """Retrieves a resource by its URI Args: uri: URI of the resource Returns: Resource object """ self._helper.validate_resource_uri(uri) data = self._helper.do_get(uri) if data: new_resource = self.ne...
[ "def", "get_by_uri", "(", "self", ",", "uri", ")", ":", "self", ".", "_helper", ".", "validate_resource_uri", "(", "uri", ")", "data", "=", "self", ".", "_helper", ".", "do_get", "(", "uri", ")", "if", "data", ":", "new_resource", "=", "self", ".", "...
Retrieves a resource by its URI Args: uri: URI of the resource Returns: Resource object
[ "Retrieves", "a", "resource", "by", "its", "URI" ]
3c6219723ef25e6e0c83d44a89007f89bc325b89
https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/resource.py#L280-L297
18,677
HewlettPackard/python-hpOneView
hpOneView/resources/resource.py
Resource._get_default_values
def _get_default_values(self, default_values=None): """Gets the default values set for a resource""" if not default_values: default_values = self.DEFAULT_VALUES if default_values: api_version = str(self._connection._apiVersion) values = default_values.get(ap...
python
def _get_default_values(self, default_values=None): """Gets the default values set for a resource""" if not default_values: default_values = self.DEFAULT_VALUES if default_values: api_version = str(self._connection._apiVersion) values = default_values.get(ap...
[ "def", "_get_default_values", "(", "self", ",", "default_values", "=", "None", ")", ":", "if", "not", "default_values", ":", "default_values", "=", "self", ".", "DEFAULT_VALUES", "if", "default_values", ":", "api_version", "=", "str", "(", "self", ".", "_conne...
Gets the default values set for a resource
[ "Gets", "the", "default", "values", "set", "for", "a", "resource" ]
3c6219723ef25e6e0c83d44a89007f89bc325b89
https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/resource.py#L299-L311
18,678
HewlettPackard/python-hpOneView
hpOneView/resources/resource.py
Resource._merge_default_values
def _merge_default_values(self): """Merge default values with resource data.""" values = self._get_default_values() for key, value in values.items(): if not self.data.get(key): self.data[key] = value
python
def _merge_default_values(self): """Merge default values with resource data.""" values = self._get_default_values() for key, value in values.items(): if not self.data.get(key): self.data[key] = value
[ "def", "_merge_default_values", "(", "self", ")", ":", "values", "=", "self", ".", "_get_default_values", "(", ")", "for", "key", ",", "value", "in", "values", ".", "items", "(", ")", ":", "if", "not", "self", ".", "data", ".", "get", "(", "key", ")"...
Merge default values with resource data.
[ "Merge", "default", "values", "with", "resource", "data", "." ]
3c6219723ef25e6e0c83d44a89007f89bc325b89
https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/resource.py#L313-L318
18,679
HewlettPackard/python-hpOneView
hpOneView/resources/resource.py
ResourceHelper.create_report
def create_report(self, uri, timeout=-1): """ Creates a report and returns the output. Args: uri: URI timeout: Timeout in seconds. Wait for task completion by default. The timeout does not abort the operation in OneView; it just stops wait...
python
def create_report(self, uri, timeout=-1): """ Creates a report and returns the output. Args: uri: URI timeout: Timeout in seconds. Wait for task completion by default. The timeout does not abort the operation in OneView; it just stops wait...
[ "def", "create_report", "(", "self", ",", "uri", ",", "timeout", "=", "-", "1", ")", ":", "logger", ".", "debug", "(", "'Creating Report (uri = %s)'", ".", "format", "(", "uri", ")", ")", "task", ",", "_", "=", "self", ".", "_connection", ".", "post", ...
Creates a report and returns the output. Args: uri: URI 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: list:
[ "Creates", "a", "report", "and", "returns", "the", "output", "." ]
3c6219723ef25e6e0c83d44a89007f89bc325b89
https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/resource.py#L471-L492
18,680
HewlettPackard/python-hpOneView
hpOneView/resources/resource.py
ResourceHelper.build_query_uri
def build_query_uri(self, uri=None, start=0, count=-1, filter='', query='', sort='', view='', fields='', scope_uris=''): """Builds the URI from given parameters. More than one request can be send to get the items, regardless the query parameter 'count', because the actual number of items in the...
python
def build_query_uri(self, uri=None, start=0, count=-1, filter='', query='', sort='', view='', fields='', scope_uris=''): """Builds the URI from given parameters. More than one request can be send to get the items, regardless the query parameter 'count', because the actual number of items in the...
[ "def", "build_query_uri", "(", "self", ",", "uri", "=", "None", ",", "start", "=", "0", ",", "count", "=", "-", "1", ",", "filter", "=", "''", ",", "query", "=", "''", ",", "sort", "=", "''", ",", "view", "=", "''", ",", "fields", "=", "''", ...
Builds the URI from given parameters. More than one request can be send to get the items, regardless the query parameter 'count', because the actual number of items in the response might differ from the requested count. Some types of resource have a limited number of items returned on each call...
[ "Builds", "the", "URI", "from", "given", "parameters", "." ]
3c6219723ef25e6e0c83d44a89007f89bc325b89
https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/resource.py#L523-L585
18,681
HewlettPackard/python-hpOneView
hpOneView/resources/resource.py
ResourceHelper.build_uri
def build_uri(self, id_or_uri): """Helps to build the URI from resource id and validate the URI. Args: id_or_uri: ID/URI of the resource. Returns: Returns a valid resource URI """ if not id_or_uri: logger.exception(RESOURCE_CLIENT_INVALID_ID)...
python
def build_uri(self, id_or_uri): """Helps to build the URI from resource id and validate the URI. Args: id_or_uri: ID/URI of the resource. Returns: Returns a valid resource URI """ if not id_or_uri: logger.exception(RESOURCE_CLIENT_INVALID_ID)...
[ "def", "build_uri", "(", "self", ",", "id_or_uri", ")", ":", "if", "not", "id_or_uri", ":", "logger", ".", "exception", "(", "RESOURCE_CLIENT_INVALID_ID", ")", "raise", "ValueError", "(", "RESOURCE_CLIENT_INVALID_ID", ")", "if", "\"/\"", "in", "id_or_uri", ":", ...
Helps to build the URI from resource id and validate the URI. Args: id_or_uri: ID/URI of the resource. Returns: Returns a valid resource URI
[ "Helps", "to", "build", "the", "URI", "from", "resource", "id", "and", "validate", "the", "URI", "." ]
3c6219723ef25e6e0c83d44a89007f89bc325b89
https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/resource.py#L594-L611
18,682
HewlettPackard/python-hpOneView
hpOneView/resources/resource.py
ResourceHelper.build_subresource_uri
def build_subresource_uri(self, resource_id_or_uri=None, subresource_id_or_uri=None, subresource_path=''): """Helps to build a URI with resource path and its sub resource path. Args: resoure_id_or_uri: ID/URI of the main resource. subresource_id__or_uri: ID/URI of the sub resour...
python
def build_subresource_uri(self, resource_id_or_uri=None, subresource_id_or_uri=None, subresource_path=''): """Helps to build a URI with resource path and its sub resource path. Args: resoure_id_or_uri: ID/URI of the main resource. subresource_id__or_uri: ID/URI of the sub resour...
[ "def", "build_subresource_uri", "(", "self", ",", "resource_id_or_uri", "=", "None", ",", "subresource_id_or_uri", "=", "None", ",", "subresource_path", "=", "''", ")", ":", "if", "subresource_id_or_uri", "and", "\"/\"", "in", "subresource_id_or_uri", ":", "return",...
Helps to build a URI with resource path and its sub resource path. Args: resoure_id_or_uri: ID/URI of the main resource. subresource_id__or_uri: ID/URI of the sub resource. subresource_path: Sub resource path to be added with the URI. Returns: Returns UR...
[ "Helps", "to", "build", "a", "URI", "with", "resource", "path", "and", "its", "sub", "resource", "path", "." ]
3c6219723ef25e6e0c83d44a89007f89bc325b89
https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/resource.py#L613-L638
18,683
HewlettPackard/python-hpOneView
hpOneView/resources/resource.py
ResourceHelper.validate_resource_uri
def validate_resource_uri(self, path): """Helper method to validate URI of the resource.""" if self._base_uri not in path: logger.exception('Get by uri : unrecognized uri: (%s)' % path) raise exceptions.HPOneViewUnknownType(UNRECOGNIZED_URI)
python
def validate_resource_uri(self, path): """Helper method to validate URI of the resource.""" if self._base_uri not in path: logger.exception('Get by uri : unrecognized uri: (%s)' % path) raise exceptions.HPOneViewUnknownType(UNRECOGNIZED_URI)
[ "def", "validate_resource_uri", "(", "self", ",", "path", ")", ":", "if", "self", ".", "_base_uri", "not", "in", "path", ":", "logger", ".", "exception", "(", "'Get by uri : unrecognized uri: (%s)'", "%", "path", ")", "raise", "exceptions", ".", "HPOneViewUnknow...
Helper method to validate URI of the resource.
[ "Helper", "method", "to", "validate", "URI", "of", "the", "resource", "." ]
3c6219723ef25e6e0c83d44a89007f89bc325b89
https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/resource.py#L640-L644
18,684
HewlettPackard/python-hpOneView
hpOneView/resources/resource.py
ResourceHelper.do_requests_to_getall
def do_requests_to_getall(self, uri, requested_count): """Helps to make http request for get_all method. Note: This method will be checking for the pagination URI in the response and make request to pagination URI to get all the resources. """ items = [] ...
python
def do_requests_to_getall(self, uri, requested_count): """Helps to make http request for get_all method. Note: This method will be checking for the pagination URI in the response and make request to pagination URI to get all the resources. """ items = [] ...
[ "def", "do_requests_to_getall", "(", "self", ",", "uri", ",", "requested_count", ")", ":", "items", "=", "[", "]", "while", "uri", ":", "logger", ".", "debug", "(", "'Making HTTP request to get all resources. Uri: {0}'", ".", "format", "(", "uri", ")", ")", "r...
Helps to make http request for get_all method. Note: This method will be checking for the pagination URI in the response and make request to pagination URI to get all the resources.
[ "Helps", "to", "make", "http", "request", "for", "get_all", "method", "." ]
3c6219723ef25e6e0c83d44a89007f89bc325b89
https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/resource.py#L678-L697
18,685
HewlettPackard/python-hpOneView
hpOneView/resources/resource.py
ResourceHelper.do_get
def do_get(self, uri): """Helps to make get requests Args: uri: URI of the resource Returns: Returns: Returns the resource data """ self.validate_resource_uri(uri) return self._connection.get(uri)
python
def do_get(self, uri): """Helps to make get requests Args: uri: URI of the resource Returns: Returns: Returns the resource data """ self.validate_resource_uri(uri) return self._connection.get(uri)
[ "def", "do_get", "(", "self", ",", "uri", ")", ":", "self", ".", "validate_resource_uri", "(", "uri", ")", "return", "self", ".", "_connection", ".", "get", "(", "uri", ")" ]
Helps to make get requests Args: uri: URI of the resource Returns: Returns: Returns the resource data
[ "Helps", "to", "make", "get", "requests" ]
3c6219723ef25e6e0c83d44a89007f89bc325b89
https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/resource.py#L710-L720
18,686
HewlettPackard/python-hpOneView
hpOneView/resources/resource.py
ResourceHelper.do_post
def do_post(self, uri, resource, timeout, custom_headers): """Helps to make post requests. Args: uri: URI of the resource. resource: Resource data to post. timeout: Time out for the request in seconds. cutom_headers: Allows to add custom http headers. ...
python
def do_post(self, uri, resource, timeout, custom_headers): """Helps to make post requests. Args: uri: URI of the resource. resource: Resource data to post. timeout: Time out for the request in seconds. cutom_headers: Allows to add custom http headers. ...
[ "def", "do_post", "(", "self", ",", "uri", ",", "resource", ",", "timeout", ",", "custom_headers", ")", ":", "self", ".", "validate_resource_uri", "(", "uri", ")", "task", ",", "entity", "=", "self", ".", "_connection", ".", "post", "(", "uri", ",", "r...
Helps to make post requests. Args: uri: URI of the resource. resource: Resource data to post. timeout: Time out for the request in seconds. cutom_headers: Allows to add custom http headers. Returns: Retunrs Task object.
[ "Helps", "to", "make", "post", "requests", "." ]
3c6219723ef25e6e0c83d44a89007f89bc325b89
https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/resource.py#L722-L741
18,687
HewlettPackard/python-hpOneView
hpOneView/resources/resource.py
ResourceHelper.do_put
def do_put(self, uri, resource, timeout, custom_headers): """Helps to make put requests. Args: uri: URI of the resource timeout: Time out for the request in seconds. custom_headers: Allows to set custom http headers. Retuns: Returns Task object ...
python
def do_put(self, uri, resource, timeout, custom_headers): """Helps to make put requests. Args: uri: URI of the resource timeout: Time out for the request in seconds. custom_headers: Allows to set custom http headers. Retuns: Returns Task object ...
[ "def", "do_put", "(", "self", ",", "uri", ",", "resource", ",", "timeout", ",", "custom_headers", ")", ":", "self", ".", "validate_resource_uri", "(", "uri", ")", "task", ",", "body", "=", "self", ".", "_connection", ".", "put", "(", "uri", ",", "resou...
Helps to make put requests. Args: uri: URI of the resource timeout: Time out for the request in seconds. custom_headers: Allows to set custom http headers. Retuns: Returns Task object
[ "Helps", "to", "make", "put", "requests", "." ]
3c6219723ef25e6e0c83d44a89007f89bc325b89
https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/resource.py#L743-L761
18,688
HewlettPackard/python-hpOneView
hpOneView/resources/resource.py
ResourceFileHandlerMixin.download
def download(self, uri, file_path): """Downloads the contents of the requested URI to a stream. Args: uri: URI file_path: File path destination Returns: bool: Indicates if the file was successfully downloaded. """ with open(file_path, 'wb') a...
python
def download(self, uri, file_path): """Downloads the contents of the requested URI to a stream. Args: uri: URI file_path: File path destination Returns: bool: Indicates if the file was successfully downloaded. """ with open(file_path, 'wb') a...
[ "def", "download", "(", "self", ",", "uri", ",", "file_path", ")", ":", "with", "open", "(", "file_path", ",", "'wb'", ")", "as", "file", ":", "return", "self", ".", "_connection", ".", "download_to_stream", "(", "file", ",", "uri", ")" ]
Downloads the contents of the requested URI to a stream. Args: uri: URI file_path: File path destination Returns: bool: Indicates if the file was successfully downloaded.
[ "Downloads", "the", "contents", "of", "the", "requested", "URI", "to", "a", "stream", "." ]
3c6219723ef25e6e0c83d44a89007f89bc325b89
https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/resource.py#L863-L874
18,689
HewlettPackard/python-hpOneView
hpOneView/resources/resource.py
ResourceClient.build_query_uri
def build_query_uri(self, start=0, count=-1, filter='', query='', sort='', view='', fields='', uri=None, scope_uris=''): """ Builds the URI given the parameters. More than one request can be send to get the items, regardless the query parameter 'count', because the actual number of item...
python
def build_query_uri(self, start=0, count=-1, filter='', query='', sort='', view='', fields='', uri=None, scope_uris=''): """ Builds the URI given the parameters. More than one request can be send to get the items, regardless the query parameter 'count', because the actual number of item...
[ "def", "build_query_uri", "(", "self", ",", "start", "=", "0", ",", "count", "=", "-", "1", ",", "filter", "=", "''", ",", "query", "=", "''", ",", "sort", "=", "''", ",", "view", "=", "''", ",", "fields", "=", "''", ",", "uri", "=", "None", ...
Builds the URI given the parameters. More than one request can be send to get the items, regardless the query parameter 'count', because the actual number of items in the response might differ from the requested count. Some types of resource have a limited number of items returned on each call....
[ "Builds", "the", "URI", "given", "the", "parameters", "." ]
3c6219723ef25e6e0c83d44a89007f89bc325b89
https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/resource.py#L1023-L1095
18,690
HewlettPackard/python-hpOneView
hpOneView/resources/resource.py
ResourceClient.upload
def upload(self, file_path, uri=None, timeout=-1): """ Makes a multipart request. Args: file_path: File to upload. uri: A specific URI (optional). timeout: Timeout in seconds. Wait for task completion by default...
python
def upload(self, file_path, uri=None, timeout=-1): """ Makes a multipart request. Args: file_path: File to upload. uri: A specific URI (optional). timeout: Timeout in seconds. Wait for task completion by default...
[ "def", "upload", "(", "self", ",", "file_path", ",", "uri", "=", "None", ",", "timeout", "=", "-", "1", ")", ":", "if", "not", "uri", ":", "uri", "=", "self", ".", "_uri", "upload_file_name", "=", "os", ".", "path", ".", "basename", "(", "file_path...
Makes a multipart request. Args: file_path: File to upload. uri: A specific URI (optional). timeout: Timeout in seconds. Wait for task completion by default. The timeout does not abort the operation in OneView; ...
[ "Makes", "a", "multipart", "request", "." ]
3c6219723ef25e6e0c83d44a89007f89bc325b89
https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/resource.py#L1376-L1401
18,691
HewlettPackard/python-hpOneView
hpOneView/resources/resource.py
ResourceClient.get_by
def get_by(self, field, value, uri=None): """ This function uses get_all passing a filter. The search is case-insensitive. Args: field: Field name to filter. value: Value to filter. uri: Resource uri. Returns: dict """ ...
python
def get_by(self, field, value, uri=None): """ This function uses get_all passing a filter. The search is case-insensitive. Args: field: Field name to filter. value: Value to filter. uri: Resource uri. Returns: dict """ ...
[ "def", "get_by", "(", "self", ",", "field", ",", "value", ",", "uri", "=", "None", ")", ":", "if", "not", "field", ":", "logger", ".", "exception", "(", "RESOURCE_CLIENT_INVALID_FIELD", ")", "raise", "ValueError", "(", "RESOURCE_CLIENT_INVALID_FIELD", ")", "...
This function uses get_all passing a filter. The search is case-insensitive. Args: field: Field name to filter. value: Value to filter. uri: Resource uri. Returns: dict
[ "This", "function", "uses", "get_all", "passing", "a", "filter", "." ]
3c6219723ef25e6e0c83d44a89007f89bc325b89
https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/resource.py#L1457-L1490
18,692
HewlettPackard/python-hpOneView
hpOneView/resources/settings/firmware_drivers.py
FirmwareDrivers.get_by
def get_by(self, field, value): """ Gets the list of firmware baseline resources managed by the appliance. Optional parameters can be used to filter the list of resources returned. The search is case-insensitive. Args: field: Field name to filter. value:...
python
def get_by(self, field, value): """ Gets the list of firmware baseline resources managed by the appliance. Optional parameters can be used to filter the list of resources returned. The search is case-insensitive. Args: field: Field name to filter. value:...
[ "def", "get_by", "(", "self", ",", "field", ",", "value", ")", ":", "firmwares", "=", "self", ".", "get_all", "(", ")", "matches", "=", "[", "]", "for", "item", "in", "firmwares", ":", "if", "item", ".", "get", "(", "field", ")", "==", "value", "...
Gets the list of firmware baseline resources managed by the appliance. Optional parameters can be used to filter the list of resources returned. The search is case-insensitive. Args: field: Field name to filter. value: Value to filter. Returns: list...
[ "Gets", "the", "list", "of", "firmware", "baseline", "resources", "managed", "by", "the", "appliance", ".", "Optional", "parameters", "can", "be", "used", "to", "filter", "the", "list", "of", "resources", "returned", "." ]
3c6219723ef25e6e0c83d44a89007f89bc325b89
https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/settings/firmware_drivers.py#L73-L92
18,693
HewlettPackard/python-hpOneView
hpOneView/resources/networking/interconnects.py
Interconnects.get_statistics
def get_statistics(self, id_or_uri, port_name=''): """ Gets the statistics from an interconnect. Args: id_or_uri: Can be either the interconnect id or the interconnect uri. port_name (str): A specific port name of an interconnect. Returns: dict: Th...
python
def get_statistics(self, id_or_uri, port_name=''): """ Gets the statistics from an interconnect. Args: id_or_uri: Can be either the interconnect id or the interconnect uri. port_name (str): A specific port name of an interconnect. Returns: dict: Th...
[ "def", "get_statistics", "(", "self", ",", "id_or_uri", ",", "port_name", "=", "''", ")", ":", "uri", "=", "self", ".", "_client", ".", "build_uri", "(", "id_or_uri", ")", "+", "\"/statistics\"", "if", "port_name", ":", "uri", "=", "uri", "+", "\"/\"", ...
Gets the statistics from an interconnect. Args: id_or_uri: Can be either the interconnect id or the interconnect uri. port_name (str): A specific port name of an interconnect. Returns: dict: The statistics for the interconnect that matches id.
[ "Gets", "the", "statistics", "from", "an", "interconnect", "." ]
3c6219723ef25e6e0c83d44a89007f89bc325b89
https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/networking/interconnects.py#L75-L91
18,694
HewlettPackard/python-hpOneView
hpOneView/resources/networking/interconnects.py
Interconnects.get_subport_statistics
def get_subport_statistics(self, id_or_uri, port_name, subport_number): """ Gets the subport statistics on an interconnect. Args: id_or_uri: Can be either the interconnect id or the interconnect uri. port_name (str): A specific port name of an interconnect. ...
python
def get_subport_statistics(self, id_or_uri, port_name, subport_number): """ Gets the subport statistics on an interconnect. Args: id_or_uri: Can be either the interconnect id or the interconnect uri. port_name (str): A specific port name of an interconnect. ...
[ "def", "get_subport_statistics", "(", "self", ",", "id_or_uri", ",", "port_name", ",", "subport_number", ")", ":", "uri", "=", "self", ".", "_client", ".", "build_uri", "(", "id_or_uri", ")", "+", "\"/statistics/{0}/subport/{1}\"", ".", "format", "(", "port_name...
Gets the subport statistics on an interconnect. Args: id_or_uri: Can be either the interconnect id or the interconnect uri. port_name (str): A specific port name of an interconnect. subport_number (int): The subport. Returns: dict: The statistics for t...
[ "Gets", "the", "subport", "statistics", "on", "an", "interconnect", "." ]
3c6219723ef25e6e0c83d44a89007f89bc325b89
https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/networking/interconnects.py#L93-L106
18,695
HewlettPackard/python-hpOneView
hpOneView/resources/networking/interconnects.py
Interconnects.get_name_servers
def get_name_servers(self, id_or_uri): """ Gets the named servers for an interconnect. Args: id_or_uri: Can be either the interconnect id or the interconnect uri. Returns: dict: the name servers for an interconnect. """ uri = self._client.buil...
python
def get_name_servers(self, id_or_uri): """ Gets the named servers for an interconnect. Args: id_or_uri: Can be either the interconnect id or the interconnect uri. Returns: dict: the name servers for an interconnect. """ uri = self._client.buil...
[ "def", "get_name_servers", "(", "self", ",", "id_or_uri", ")", ":", "uri", "=", "self", ".", "_client", ".", "build_uri", "(", "id_or_uri", ")", "+", "\"/nameServers\"", "return", "self", ".", "_client", ".", "get", "(", "uri", ")" ]
Gets the named servers for an interconnect. Args: id_or_uri: Can be either the interconnect id or the interconnect uri. Returns: dict: the name servers for an interconnect.
[ "Gets", "the", "named", "servers", "for", "an", "interconnect", "." ]
3c6219723ef25e6e0c83d44a89007f89bc325b89
https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/networking/interconnects.py#L108-L120
18,696
HewlettPackard/python-hpOneView
hpOneView/resources/networking/interconnects.py
Interconnects.update_port
def update_port(self, port_information, id_or_uri, timeout=-1): """ Updates an interconnect port. Args: id_or_uri: Can be either the interconnect id or the interconnect uri. port_information (dict): object to update timeout: Timeout in seconds. Wait for task ...
python
def update_port(self, port_information, id_or_uri, timeout=-1): """ Updates an interconnect port. Args: id_or_uri: Can be either the interconnect id or the interconnect uri. port_information (dict): object to update timeout: Timeout in seconds. Wait for task ...
[ "def", "update_port", "(", "self", ",", "port_information", ",", "id_or_uri", ",", "timeout", "=", "-", "1", ")", ":", "uri", "=", "self", ".", "_client", ".", "build_uri", "(", "id_or_uri", ")", "+", "\"/ports\"", "return", "self", ".", "_client", ".", ...
Updates an interconnect port. Args: id_or_uri: Can be either the interconnect id or the interconnect uri. port_information (dict): object to update timeout: Timeout in seconds. Wait for task completion by default. The timeout does not abort the operation in O...
[ "Updates", "an", "interconnect", "port", "." ]
3c6219723ef25e6e0c83d44a89007f89bc325b89
https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/networking/interconnects.py#L186-L201
18,697
HewlettPackard/python-hpOneView
hpOneView/resources/networking/interconnects.py
Interconnects.update_ports
def update_ports(self, ports, id_or_uri, timeout=-1): """ Updates the interconnect ports. Args: id_or_uri: Can be either the interconnect id or the interconnect uri. ports (list): Ports to update. timeout: Timeout in seconds. Wait for task completion by defau...
python
def update_ports(self, ports, id_or_uri, timeout=-1): """ Updates the interconnect ports. Args: id_or_uri: Can be either the interconnect id or the interconnect uri. ports (list): Ports to update. timeout: Timeout in seconds. Wait for task completion by defau...
[ "def", "update_ports", "(", "self", ",", "ports", ",", "id_or_uri", ",", "timeout", "=", "-", "1", ")", ":", "resources", "=", "merge_default_values", "(", "ports", ",", "{", "'type'", ":", "'port'", "}", ")", "uri", "=", "self", ".", "_client", ".", ...
Updates the interconnect ports. Args: id_or_uri: Can be either the interconnect id or the interconnect uri. ports (list): Ports to update. timeout: Timeout in seconds. Wait for task completion by default. The timeout does not abort the operation in OneView; i...
[ "Updates", "the", "interconnect", "ports", "." ]
3c6219723ef25e6e0c83d44a89007f89bc325b89
https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/networking/interconnects.py#L203-L220
18,698
HewlettPackard/python-hpOneView
hpOneView/resources/networking/interconnects.py
Interconnects.reset_port_protection
def reset_port_protection(self, id_or_uri, timeout=-1): """ Triggers a reset of port protection. Cause port protection to be reset on all the interconnects of the logical interconnect that matches ID. Args: id_or_uri: Can be either the interconnect id or the interconnect ur...
python
def reset_port_protection(self, id_or_uri, timeout=-1): """ Triggers a reset of port protection. Cause port protection to be reset on all the interconnects of the logical interconnect that matches ID. Args: id_or_uri: Can be either the interconnect id or the interconnect ur...
[ "def", "reset_port_protection", "(", "self", ",", "id_or_uri", ",", "timeout", "=", "-", "1", ")", ":", "uri", "=", "self", ".", "_client", ".", "build_uri", "(", "id_or_uri", ")", "+", "\"/resetportprotection\"", "return", "self", ".", "_client", ".", "up...
Triggers a reset of port protection. Cause port protection to be reset on all the interconnects of the logical interconnect that matches ID. Args: id_or_uri: Can be either the interconnect id or the interconnect uri. timeout: Timeout in seconds. Wait for task completion by defa...
[ "Triggers", "a", "reset", "of", "port", "protection", "." ]
3c6219723ef25e6e0c83d44a89007f89bc325b89
https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/networking/interconnects.py#L222-L238
18,699
HewlettPackard/python-hpOneView
hpOneView/resources/networking/interconnects.py
Interconnects.get_ports
def get_ports(self, id_or_uri, start=0, count=-1): """ Gets all interconnect ports. Args: id_or_uri: Can be either the interconnect id or the interconnect uri. start: The first item to return, using 0-based indexing. If not specified, the ...
python
def get_ports(self, id_or_uri, start=0, count=-1): """ Gets all interconnect ports. Args: id_or_uri: Can be either the interconnect id or the interconnect uri. start: The first item to return, using 0-based indexing. If not specified, the ...
[ "def", "get_ports", "(", "self", ",", "id_or_uri", ",", "start", "=", "0", ",", "count", "=", "-", "1", ")", ":", "uri", "=", "self", ".", "_client", ".", "build_subresource_uri", "(", "resource_id_or_uri", "=", "id_or_uri", ",", "subresource_path", "=", ...
Gets all interconnect ports. Args: id_or_uri: Can be either the interconnect id or the interconnect uri. start: The first item to return, using 0-based indexing. If not specified, the default is 0 - start with the first available item. count: ...
[ "Gets", "all", "interconnect", "ports", "." ]
3c6219723ef25e6e0c83d44a89007f89bc325b89
https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/networking/interconnects.py#L240-L258