idx
int64
0
252k
question
stringlengths
48
5.28k
target
stringlengths
5
1.23k
251,400
def update_ethernet_settings ( self , configuration , force = False , timeout = - 1 ) : uri = "{}/ethernetSettings" . format ( self . data [ "uri" ] ) return self . _helper . update ( configuration , uri = uri , force = force , timeout = timeout )
Updates the Ethernet interconnect settings for the logical interconnect .
251,401
def update_internal_networks ( self , network_uri_list , force = False , timeout = - 1 ) : uri = "{}/internalNetworks" . format ( self . data [ "uri" ] ) return self . _helper . update ( network_uri_list , uri = uri , force = force , timeout = timeout )
Updates internal networks on the logical interconnect .
251,402
def update_configuration ( self , timeout = - 1 ) : uri = "{}/configuration" . format ( self . data [ "uri" ] ) return self . _helper . update ( None , uri = uri , timeout = timeout )
Asynchronously applies or re - applies the logical interconnect configuration to all managed interconnects .
251,403
def get_snmp_configuration ( self ) : uri = "{}{}" . format ( self . data [ "uri" ] , self . SNMP_CONFIGURATION_PATH ) return self . _helper . do_get ( uri )
Gets the SNMP configuration for a logical interconnect .
251,404
def update_snmp_configuration ( self , configuration , timeout = - 1 ) : data = configuration . copy ( ) if 'type' not in data : data [ 'type' ] = 'snmp-configuration' uri = "{}{}" . format ( self . data [ "uri" ] , self . SNMP_CONFIGURATION_PATH ) return self . _helper . update ( data , uri = uri , timeout = timeout )
Updates the SNMP configuration of a logical interconnect . Changes to the SNMP configuration are asynchronously applied to all managed interconnects .
251,405
def get_unassigned_ports ( self ) : uri = "{}/unassignedPortsForPortMonitor" . format ( self . data [ "uri" ] ) response = self . _helper . do_get ( uri ) return self . _helper . get_members ( response )
Gets the collection ports from the member interconnects which are eligible for assignment to an anlyzer port
251,406
def get_port_monitor ( self ) : uri = "{}{}" . format ( self . data [ "uri" ] , self . PORT_MONITOR_PATH ) return self . _helper . do_get ( uri )
Gets the port monitor configuration of a logical interconnect .
251,407
def update_port_monitor ( self , resource , timeout = - 1 ) : data = resource . copy ( ) if 'type' not in data : data [ 'type' ] = 'port-monitor' uri = "{}{}" . format ( self . data [ "uri" ] , self . PORT_MONITOR_PATH ) return self . _helper . update ( data , uri = uri , timeout = timeout )
Updates the port monitor configuration of a logical interconnect .
251,408
def create_interconnect ( self , location_entries , timeout = - 1 ) : return self . _helper . create ( location_entries , uri = self . locations_uri , timeout = timeout )
Creates an interconnect at the given location .
251,409
def delete_interconnect ( self , enclosure_uri , bay , timeout = - 1 ) : uri = "{path}?location=Enclosure:{enclosure_uri},Bay:{bay}" . format ( path = self . LOCATIONS_PATH , enclosure_uri = enclosure_uri , bay = bay ) return self . _helper . delete ( uri , timeout = timeout )
Deletes an interconnect from a location .
251,410
def get_firmware ( self ) : firmware_uri = self . _helper . build_subresource_uri ( self . data [ "uri" ] , subresource_path = self . FIRMWARE_PATH ) return self . _helper . do_get ( firmware_uri )
Gets the installed firmware for a logical interconnect .
251,411
def get_forwarding_information_base ( self , filter = '' ) : uri = "{}{}" . format ( self . data [ "uri" ] , self . FORWARDING_INFORMATION_PATH ) return self . _helper . get_collection ( uri , filter = filter )
Gets the forwarding information base data for a logical interconnect . A maximum of 100 entries is returned . Optional filtering criteria might be specified .
251,412
def create_forwarding_information_base ( self , timeout = - 1 ) : uri = "{}{}" . format ( self . data [ "uri" ] , self . FORWARDING_INFORMATION_PATH ) return self . _helper . do_post ( uri , None , timeout , None )
Generates the forwarding information base dump file for a logical interconnect .
251,413
def get_qos_aggregated_configuration ( self ) : uri = "{}{}" . format ( self . data [ "uri" ] , self . QOS_AGGREGATED_CONFIGURATION ) return self . _helper . do_get ( uri )
Gets the QoS aggregated configuration for the logical interconnect .
251,414
def update_qos_aggregated_configuration ( self , qos_configuration , timeout = - 1 ) : uri = "{}{}" . format ( self . data [ "uri" ] , self . QOS_AGGREGATED_CONFIGURATION ) return self . _helper . update ( qos_configuration , uri = uri , timeout = timeout )
Updates the QoS aggregated configuration for the logical interconnect .
251,415
def update_telemetry_configurations ( self , configuration , timeout = - 1 ) : telemetry_conf_uri = self . _get_telemetry_configuration_uri ( ) default_values = self . _get_default_values ( self . SETTINGS_TELEMETRY_CONFIG_DEFAULT_VALUES ) configuration = self . _helper . update_resource_fields ( configuration , default_values ) return self . _helper . update ( configuration , uri = telemetry_conf_uri , timeout = timeout )
Updates the telemetry configuration of a logical interconnect . Changes to the telemetry configuration are asynchronously applied to all managed interconnects .
251,416
def get_ethernet_settings ( self ) : uri = "{}/ethernetSettings" . format ( self . data [ "uri" ] ) return self . _helper . do_get ( uri )
Gets the Ethernet interconnect settings for the Logical Interconnect .
251,417
def download_archive ( self , name , file_path ) : uri = self . URI + "/archive/" + name return self . _client . download ( uri , file_path )
Download archived logs of the OS Volume .
251,418
def get_storage ( self , id_or_uri ) : uri = self . URI + "/{}/storage" . format ( extract_id_from_uri ( id_or_uri ) ) return self . _client . get ( uri )
Get storage details of an OS Volume .
251,419
def get_device_topology ( self , id_or_uri ) : uri = self . _client . build_uri ( id_or_uri ) + "/deviceTopology" return self . _client . get ( uri )
Retrieves the topology information for the rack resource specified by ID or URI .
251,420
def get_by_name ( self , name ) : managed_sans = self . get_all ( ) result = [ x for x in managed_sans if x [ 'name' ] == name ] resource = result [ 0 ] if result else None if resource : resource = self . new ( self . _connection , resource ) return resource
Gets a Managed SAN by name .
251,421
def get_endpoints ( self , start = 0 , count = - 1 , filter = '' , sort = '' ) : uri = "{}/endpoints/" . format ( self . data [ "uri" ] ) return self . _helper . get_all ( start , count , filter = filter , sort = sort , uri = uri )
Gets a list of endpoints in a SAN .
251,422
def create_endpoints_csv_file ( self , timeout = - 1 ) : uri = "{}/endpoints/" . format ( self . data [ "uri" ] ) return self . _helper . do_post ( uri , { } , timeout , None )
Creates an endpoints CSV file for a SAN .
251,423
def create_issues_report ( self , timeout = - 1 ) : uri = "{}/issues/" . format ( self . data [ "uri" ] ) return self . _helper . create_report ( uri , timeout )
Creates an unexpected zoning report for a SAN .
251,424
def create ( self , resource , id = None , timeout = - 1 ) : if not id : available_id = self . __get_first_available_id ( ) uri = '%s/%s' % ( self . URI , str ( available_id ) ) else : uri = '%s/%s' % ( self . URI , str ( id ) ) return self . _client . create ( resource , uri = uri , timeout = timeout )
Adds the specified trap forwarding destination . The trap destination associated with the specified id will be created if trap destination with that id does not exists . The id can only be an integer greater than 0 .
251,425
def __findFirstMissing ( self , array , start , end ) : if ( start > end ) : return end + 1 if ( start != array [ start ] ) : return start mid = int ( ( start + end ) / 2 ) if ( array [ mid ] == mid ) : return self . __findFirstMissing ( array , mid + 1 , end ) return self . __findFirstMissing ( array , start , mid )
Find the smallest elements missing in a sorted array .
251,426
def __get_first_available_id ( self ) : traps = self . get_all ( ) if traps : used_ids = [ 0 ] for trap in traps : used_uris = trap . get ( 'uri' ) used_ids . append ( int ( used_uris . split ( '/' ) [ - 1 ] ) ) used_ids . sort ( ) return self . __findFirstMissing ( used_ids , 0 , len ( used_ids ) - 1 ) else : return 1
Private method to get the first available id . The id can only be an integer greater than 0 .
251,427
def update ( self , information , timeout = - 1 ) : return self . _client . update ( information , timeout = timeout )
Edit an IPv4 Range .
251,428
def wait_for_task ( self , task , timeout = - 1 ) : self . __wait_task_completion ( task , timeout ) task = self . get ( task ) logger . debug ( "Waiting for task. Percentage complete: " + str ( task . get ( 'computedPercentComplete' ) ) ) logger . debug ( "Waiting for task. Task state: " + str ( task . get ( 'taskState' ) ) ) task_response = self . __get_task_response ( task ) logger . debug ( 'Task completed' ) return task_response
Wait for task execution and return associated resource .
251,429
def get_completed_task ( self , task , timeout = - 1 ) : self . __wait_task_completion ( task , timeout ) return self . get ( task )
Waits until the task is completed and returns the task resource .
251,430
def get_associated_resource ( self , task ) : if not task : raise HPOneViewUnknownType ( MSG_INVALID_TASK ) if task [ 'category' ] != 'tasks' and task [ 'category' ] != 'backups' : raise HPOneViewUnknownType ( MSG_UNKNOWN_OBJECT_TYPE ) if task [ 'type' ] == 'TaskResourceV2' : resource_uri = task [ 'associatedResource' ] [ 'resourceUri' ] if resource_uri and resource_uri . startswith ( "/rest/appliance/support-dumps/" ) : return task , resource_uri elif task [ 'type' ] == 'BACKUP' : task = self . _connection . get ( task [ 'taskUri' ] ) resource_uri = task [ 'uri' ] else : raise HPOneViewInvalidResource ( MSG_TASK_TYPE_UNRECONIZED % task [ 'type' ] ) entity = { } if resource_uri : entity = self . _connection . get ( resource_uri ) return task , entity
Retrieve a resource associated with a task .
251,431
def update_config ( self , config , timeout = - 1 ) : return self . _client . update ( config , uri = self . URI + "/config" , timeout = timeout )
Updates the remote server configuration and the automatic backup schedule for backup .
251,432
def update_remote_archive ( self , save_uri , timeout = - 1 ) : return self . _client . update_with_zero_body ( uri = save_uri , timeout = timeout )
Saves a backup of the appliance to a previously - configured remote location .
251,433
def get_ethernet_networks ( self ) : network_uris = self . data . get ( 'networkUris' ) networks = [ ] if network_uris : for uri in network_uris : networks . append ( self . _ethernet_networks . get_by_uri ( uri ) ) return networks
Gets a list of associated ethernet networks of an uplink set .
251,434
def __set_ethernet_uris ( self , ethernet_names , operation = "add" ) : if not isinstance ( ethernet_names , list ) : ethernet_names = [ ethernet_names ] associated_enets = self . data . get ( 'networkUris' , [ ] ) ethernet_uris = [ ] for i , enet in enumerate ( ethernet_names ) : enet_exists = self . _ethernet_networks . get_by_name ( enet ) if enet_exists : ethernet_uris . append ( enet_exists . data [ 'uri' ] ) else : raise HPOneViewResourceNotFound ( "Ethernet: {} does not exist" . foramt ( enet ) ) if operation == "remove" : enets_to_update = sorted ( list ( set ( associated_enets ) - set ( ethernet_uris ) ) ) elif operation == "add" : enets_to_update = sorted ( list ( set ( associated_enets ) . union ( set ( ethernet_uris ) ) ) ) else : raise ValueError ( "Value {} is not supported as operation. The supported values are: ['add', 'remove']" ) if set ( enets_to_update ) != set ( associated_enets ) : updated_network = { 'networkUris' : enets_to_update } self . update ( updated_network )
Updates network uris .
251,435
def get_settings ( self ) : uri = "{}/settings" . format ( self . data [ "uri" ] ) return self . _helper . do_get ( uri )
Gets the interconnect settings for a logical interconnect group .
251,436
def upload ( self , file_path , timeout = - 1 ) : return self . _client . upload ( file_path , timeout = timeout )
Upload an SPP ISO image file or a hotfix file to the appliance . The API supports upload of one hotfix at a time into the system . For the successful upload of a hotfix ensure its original name and extension are not altered .
251,437
def get ( self , uri ) : uri = self . URI + uri return self . _client . get ( uri )
Gets an index resource by URI .
251,438
def get_reachable_storage_pools ( self , start = 0 , count = - 1 , filter = '' , query = '' , sort = '' , networks = None , scope_exclusions = None , scope_uris = '' ) : uri = self . URI + "/reachable-storage-pools" if networks : elements = "\'" for n in networks : elements += n + ',' elements = elements [ : - 1 ] + "\'" uri = uri + "?networks=" + elements if scope_exclusions : storage_pools_uris = "," . join ( scope_exclusions ) uri = uri + "?" if "?" not in uri else uri + "&" uri += "scopeExclusions={}" . format ( storage_pools_uris ) return self . _client . get ( self . _client . build_query_uri ( start = start , count = count , filter = filter , query = query , sort = sort , uri = uri , scope_uris = scope_uris ) )
Gets the storage pools that are connected on the specified networks based on the storage system port s expected network connectivity .
251,439
def generate ( self , information , timeout = - 1 ) : return self . _client . create ( information , timeout = timeout )
Generates a self signed certificate or an internal CA signed certificate for RabbitMQ clients .
251,440
def get_key_pair ( self , alias_name ) : uri = self . URI + "/keypair/" + alias_name return self . _client . get ( uri )
Retrieves the public and private key pair associated with the specified alias name .
251,441
def get_keys ( self , alias_name , key_format ) : uri = self . URI + "/keys/" + alias_name + "?format=" + key_format return self . _client . get ( uri )
Retrieves the contents of PKCS12 file in the format specified . This PKCS12 formatted file contains both the certificate as well as the key file data . Valid key formats are Base64 and PKCS12 .
251,442
def validate_id_pool ( self , id_or_uri , ids_pools ) : uri = self . _client . build_uri ( id_or_uri ) + "/validate?idList=" + "&idList=" . join ( ids_pools ) return self . _client . get ( uri )
Validates an ID pool .
251,443
def generate ( self , id_or_uri ) : uri = self . _client . build_uri ( id_or_uri ) + "/generate" return self . _client . get ( uri )
Generates and returns a random range .
251,444
def get_connectable_volume_templates ( self , start = 0 , count = - 1 , filter = '' , query = '' , sort = '' ) : uri = self . URI + "/connectable-volume-templates" get_uri = self . _client . build_query_uri ( start = start , count = count , filter = filter , query = query , sort = sort , uri = uri ) return self . _client . get ( get_uri )
Gets the storage volume templates that are available on the specified networks based on the storage system port s expected network connectivity . If there are no storage volume templates that meet the specified connectivity criteria an empty collection will be returned .
251,445
def get_reachable_volume_templates ( self , start = 0 , count = - 1 , filter = '' , query = '' , sort = '' , networks = None , scope_uris = '' , private_allowed_only = False ) : uri = self . URI + "/reachable-volume-templates" uri += "?networks={}&privateAllowedOnly={}" . format ( networks , private_allowed_only ) get_uri = self . _client . build_query_uri ( start = start , count = count , filter = filter , query = query , sort = sort , uri = uri , scope_uris = scope_uris ) return self . _client . get ( get_uri )
Gets the storage templates that are connected on the specified networks based on the storage system port s expected network connectivity .
251,446
def get_compatible_systems ( self , id_or_uri ) : uri = self . _client . build_uri ( id_or_uri ) + "/compatible-systems" return self . _client . get ( uri )
Retrieves a collection of all storage systems that is applicable to this storage volume template .
251,447
def add_from_existing ( self , resource , timeout = - 1 ) : uri = self . URI + "/from-existing" return self . _client . create ( resource , uri = uri , timeout = timeout )
Adds a volume that already exists in the Storage system
251,448
def create_from_snapshot ( self , data , timeout = - 1 ) : uri = self . URI + "/from-snapshot" return self . _client . create ( data , uri = uri , timeout = timeout )
Creates a new volume on the storage system from a snapshot of a volume . A volume template must also be specified when creating a volume from a snapshot .
251,449
def delete ( self , resource , force = False , export_only = None , suppress_device_updates = None , timeout = - 1 ) : custom_headers = { 'If-Match' : '*' } if 'uri' in resource : uri = resource [ 'uri' ] else : uri = self . _client . build_uri ( resource ) if suppress_device_updates : uri += '?suppressDeviceUpdates=true' if export_only : custom_headers [ 'exportOnly' ] = True return self . _client . delete ( uri , force = force , timeout = timeout , custom_headers = custom_headers )
Deletes a managed volume .
251,450
def get_snapshots ( self , volume_id_or_uri , start = 0 , count = - 1 , filter = '' , sort = '' ) : uri = self . __build_volume_snapshot_uri ( volume_id_or_uri ) return self . _client . get_all ( start , count , filter = filter , sort = sort , uri = uri )
Gets all snapshots of a volume . Returns a list of snapshots based on optional sorting and filtering and constrained by start and count parameters .
251,451
def create_snapshot ( self , volume_id_or_uri , snapshot , timeout = - 1 ) : uri = self . __build_volume_snapshot_uri ( volume_id_or_uri ) return self . _client . create ( snapshot , uri = uri , timeout = timeout , default_values = self . DEFAULT_VALUES_SNAPSHOT )
Creates a snapshot for the specified volume .
251,452
def get_snapshot ( self , snapshot_id_or_uri , volume_id_or_uri = None ) : uri = self . __build_volume_snapshot_uri ( volume_id_or_uri , snapshot_id_or_uri ) return self . _client . get ( uri )
Gets a snapshot of a volume .
251,453
def get_snapshot_by ( self , volume_id_or_uri , field , value ) : uri = self . __build_volume_snapshot_uri ( volume_id_or_uri ) return self . _client . get_by ( field , value , uri = uri )
Gets all snapshots that match the filter .
251,454
def get_extra_managed_storage_volume_paths ( self , start = 0 , count = - 1 , filter = '' , sort = '' ) : uri = self . URI + '/repair?alertFixType=ExtraManagedStorageVolumePaths' return self . _client . get_all ( start , count , filter = filter , sort = sort , uri = uri )
Gets the list of extra managed storage volume paths .
251,455
def repair ( self , volume_id_or_uri , timeout = - 1 ) : data = { "type" : "ExtraManagedStorageVolumePaths" , "resourceUri" : self . _client . build_uri ( volume_id_or_uri ) } custom_headers = { 'Accept-Language' : 'en_US' } uri = self . URI + '/repair' return self . _client . create ( data , uri = uri , timeout = timeout , custom_headers = custom_headers )
Removes extra presentations from a specified volume on the storage system .
251,456
def get_attachable_volumes ( self , start = 0 , count = - 1 , filter = '' , query = '' , sort = '' , scope_uris = '' , connections = '' ) : uri = self . URI + '/attachable-volumes' if connections : uri += str ( '?' + 'connections=' + connections . __str__ ( ) ) return self . _client . get_all ( start , count , filter = filter , query = query , sort = sort , uri = uri , scope_uris = scope_uris )
Gets the volumes that are connected on the specified networks based on the storage system port s expected network connectivity .
251,457
def update_configuration ( self , timeout = - 1 ) : uri = "{}/configuration" . format ( self . data [ 'uri' ] ) return self . update_with_zero_body ( uri = uri , timeout = timeout )
Reapplies the appliance s configuration on the enclosure . This includes running the same configure steps that were performed as part of the enclosure add .
251,458
def get_by_hostname ( self , hostname ) : def filter_by_hostname ( hostname , enclosure ) : is_primary_ip = ( 'activeOaPreferredIP' in enclosure and enclosure [ 'activeOaPreferredIP' ] == hostname ) is_standby_ip = ( 'standbyOaPreferredIP' in enclosure and enclosure [ 'standbyOaPreferredIP' ] == hostname ) return is_primary_ip or is_standby_ip enclosures = self . get_all ( ) result = [ x for x in enclosures if filter_by_hostname ( hostname , x ) ] if result : new_resource = self . new ( self . _connection , result [ 0 ] ) else : new_resource = None return new_resource
Get enclosure by it s hostname
251,459
def update_environmental_configuration ( self , configuration , timeout = - 1 ) : uri = '{}/environmentalConfiguration' . format ( self . data [ 'uri' ] ) return self . _helper . do_put ( uri , configuration , timeout , None )
Sets the calibrated max power of an unmanaged or unsupported enclosure .
251,460
def import_certificate ( self , certificate_data , bay_number = None ) : uri = "{}/https/certificaterequest" . format ( self . data [ 'uri' ] ) if bay_number : uri += "?bayNumber=%d" % ( bay_number ) headers = { 'Content-Type' : 'application/json' } return self . _helper . do_put ( uri , certificate_data , - 1 , headers )
Imports a signed server certificate into the enclosure .
251,461
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 the RabbitMQ server will be restarted to read the latest certificates .
251,462
def get_by_name ( self , name ) : scopes = self . _client . get_all ( ) result = [ x for x in scopes if x [ 'name' ] == name ] return result [ 0 ] if result else None
Gets a Scope by name .
251,463
def create ( self , resource , timeout = - 1 ) : return self . _client . create ( resource , timeout = timeout , default_values = self . DEFAULT_VALUES )
Creates a scope .
251,464
def delete ( self , resource , timeout = - 1 ) : if type ( resource ) is dict : headers = { 'If-Match' : resource . get ( 'eTag' , '*' ) } else : headers = { 'If-Match' : '*' } return self . _client . delete ( resource , timeout = timeout , custom_headers = headers )
Deletes a Scope .
251,465
def update_resource_assignments ( self , id_or_uri , resource_assignments , timeout = - 1 ) : uri = self . _client . build_uri ( id_or_uri ) + "/resource-assignments" headers = { 'Content-Type' : 'application/json' } return self . _client . patch_request ( uri , resource_assignments , timeout = timeout , custom_headers = headers )
Modifies scope membership by adding or removing resource assignments .
251,466
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 .
251,467
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 .
251,468
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 .
251,469
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 .
251,470
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 .
251,471
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 .
251,472
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 .
251,473
def create ( self , resource , timeout = - 1 ) : data = self . __default_values . copy ( ) data . update ( resource ) return self . _client . create ( data , timeout = timeout )
Creates a Golden Image resource from the deployed OS Volume as per the attributes specified .
251,474
def upload ( self , file_path , golden_image_info ) : uri = "{0}?name={1}&description={2}" . format ( self . URI , quote ( golden_image_info . get ( 'name' , '' ) ) , quote ( golden_image_info . get ( 'description' , '' ) ) ) return self . _client . upload ( file_path , uri )
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 .
251,475
def download_archive ( self , id_or_uri , file_path ) : uri = self . URI + "/archive/" + extract_id_from_uri ( id_or_uri ) return self . _client . download ( uri , file_path )
Download the details of the Golden Image capture logs which has been archived based on the specific attribute ID .
251,476
def update ( self , resource , id_or_uri = None , timeout = - 1 ) : uri = resource . pop ( 'uri' , None ) if not uri : if not id_or_uri : raise ValueError ( "URI was not provided" ) uri = self . _client . build_uri ( id_or_uri ) return self . _client . update ( resource = resource , uri = uri , timeout = timeout )
Updates the specified alert resource .
251,477
def delete_alert_change_log ( self , id_or_uri ) : uri = self . URI + "/AlertChangeLog/" + extract_id_from_uri ( id_or_uri ) resource = { "uri" : uri } self . _client . delete ( resource )
Deletes alert change log by alert ID or URI .
251,478
def add_multiple_servers ( self , information , timeout = - 1 ) : uri = "{}/discovery" . format ( self . URI ) return self . create ( information , uri = uri , timeout = timeout )
Adds multiple rack - mount servers for management by the appliance . This API initiates the asynchronous addition of supported server models .
251,479
def get_firmware ( self ) : uri = "{}/firmware" . format ( self . data [ "uri" ] ) return self . _helper . do_get ( uri )
Get the firmware inventory of a server .
251,480
def update_mp_firware_version ( self , timeout = - 1 ) : uri = "{}/mpFirmwareVersion" . format ( self . data [ "uri" ] ) return self . _helper . do_put ( uri , None , timeout , None )
Updates the iLO firmware on a physical server to a minimum ILO firmware version required by OneView to manage the server .
251,481
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 .
251,482
def update ( self , resource , timeout = - 1 ) : self . __set_default_values ( resource ) uri = self . _client . build_uri ( resource [ 'logicalSwitch' ] [ 'uri' ] ) return self . _client . update ( resource , uri = uri , timeout = timeout )
Updates a Logical Switch .
251,483
def refresh ( self , id_or_uri , timeout = - 1 ) : uri = self . _client . build_uri ( id_or_uri ) + "/refresh" return self . _client . update_with_zero_body ( uri , timeout = timeout )
The Refresh action reclaims the top - of - rack switches in a logical switch .
251,484
def patch ( self , id_or_uri , operation , path , value , timeout = - 1 ) : return self . _client . patch ( id_or_uri , operation , path , value , timeout = timeout )
Uses the PATCH to update a resource for a given logical switch group .
251,485
def migrate ( self , id_or_uri , timeout = - 1 ) : migrationInformation = { 'migrationState' : 'Migrated' , 'type' : 'migratable-vc-domains' , 'category' : 'migratable-vc-domains' } complete_uri = self . _client . build_uri ( id_or_uri ) return self . _client . update ( migrationInformation , uri = complete_uri , timeout = timeout )
Initiates a migration of an enclosure specified by the ID or URI of a migration report .
251,486
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
251,487
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 .
251,488
def delete ( self , resource , timeout = - 1 ) : self . _client . delete ( resource = resource , timeout = timeout )
Delete all the labels for a resource .
251,489
def update ( self , resource , timeout = - 1 ) : return self . _client . update ( resource , timeout = timeout , default_values = self . DEFAULT_VALUES , uri = self . URI )
Updates a User .
251,490
def get_by ( self , field , value ) : if field == 'userName' or field == 'name' : return self . _client . get ( self . URI + '/' + value ) elif field == 'role' : value = value . replace ( " " , "%20" ) return self . _client . get ( self . URI + '/roles/users/' + value ) [ 'members' ] else : raise HPOneViewException ( 'Only userName, name and role can be queried for this resource.' )
Gets all Users that match the filter .
251,491
def validate_user_name ( self , user_name , timeout = - 1 ) : uri = self . URI + '/validateLoginName/' + user_name return self . _client . create_with_zero_body ( uri = uri , timeout = timeout )
Verifies if a userName is already in use .
251,492
def validate_full_name ( self , full_name , timeout = - 1 ) : uri = self . URI + '/validateUserName/' + full_name return self . _client . create_with_zero_body ( uri = uri , timeout = timeout )
Verifies if a fullName is already in use .
251,493
def add_ipdu ( self , information , timeout = - 1 ) : uri = self . URI + "/discover" return self . _client . create ( information , uri = uri , timeout = timeout )
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 communication and management of the iPDU . Use force to claim the device even if claimed by another management appliance
251,494
def update_power_state ( self , id_or_uri , power_state ) : uri = self . _client . build_uri ( id_or_uri ) + "/powerState" return self . _client . update ( power_state , uri )
Sets the power state of the specified power delivery device . The device must be an HP Intelligent Outlet .
251,495
def update_refresh_state ( self , id_or_uri , refresh_state_data ) : uri = self . _client . build_uri ( id_or_uri ) + "/refreshState" return self . _client . update ( refresh_state_data , uri = uri )
Refreshes a given intelligent power delivery device .
251,496
def get_utilization ( self , id_or_uri , fields = None , filter = None , refresh = False , view = None ) : return self . _client . get_utilization ( id_or_uri , fields , filter , refresh , view )
Retrieves historical utilization data for the specified metrics and time span . The device must be a component of an HPE iPDU .
251,497
def retrieve_differences ( self , id_or_uri , content , timeout = - 1 ) : uri = self . URI + "/differences/" + extract_id_from_uri ( id_or_uri ) return self . _client . create ( content , uri = uri , timeout = timeout )
Retrieves the modified contents of the selected Plan Script according to the provided content object as per the selected attributes .
251,498
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 .
251,499
def get_osdp ( self , id_or_uri ) : uri = self . _client . build_subresource_uri ( resource_id_or_uri = id_or_uri , subresource_path = "osdp" ) return self . _client . get ( uri )
Retrieves facts about Server Profiles and Server Profile Templates that are using Deployment Plan based on the ID or URI provided .