idx int64 0 251k | question stringlengths 53 3.53k | target stringlengths 5 1.23k | len_question int64 20 893 | len_target int64 3 238 |
|---|---|---|---|---|
250,400 | 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 . | 56 | 20 |
250,401 | 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 . | 56 | 12 |
250,402 | 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 . | 99 | 30 |
250,403 | 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 | 67 | 22 |
250,404 | 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 . | 53 | 12 |
250,405 | 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 . | 94 | 12 |
250,406 | 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 . | 46 | 10 |
250,407 | 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 . | 81 | 9 |
250,408 | 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 . | 64 | 11 |
250,409 | 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 . | 64 | 28 |
250,410 | 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 . | 67 | 14 |
250,411 | 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 . | 63 | 14 |
250,412 | 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 . | 85 | 14 |
250,413 | 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 . | 118 | 30 |
250,414 | 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 . | 49 | 14 |
250,415 | 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 . | 41 | 8 |
250,416 | 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 . | 56 | 8 |
250,417 | 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 . | 52 | 17 |
250,418 | 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 . | 73 | 9 |
250,419 | 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 . | 76 | 11 |
250,420 | 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 . | 60 | 11 |
250,421 | 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 . | 51 | 10 |
250,422 | 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 . | 103 | 39 |
250,423 | 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 . | 90 | 10 |
250,424 | 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 . | 108 | 20 |
250,425 | def update ( self , information , timeout = - 1 ) : return self . _client . update ( information , timeout = timeout ) | Edit an IPv4 Range . | 27 | 6 |
250,426 | 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 . | 125 | 9 |
250,427 | 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 . | 39 | 13 |
250,428 | def get_associated_resource ( self , task ) : if not task : raise HPOneViewUnknownType ( MSG_INVALID_TASK ) if task [ 'category' ] != 'tasks' and task [ 'category' ] != 'backups' : # it is an error if type is not in obj, so let the except flow 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/" ) : # Specific for 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 . | 261 | 9 |
250,429 | 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 . | 40 | 14 |
250,430 | 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 . | 44 | 15 |
250,431 | 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 . | 75 | 15 |
250,432 | 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 . | 323 | 6 |
250,433 | 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 . | 42 | 13 |
250,434 | 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 . | 31 | 49 |
250,435 | def get ( self , uri ) : uri = self . URI + uri return self . _client . get ( uri ) | Gets an index resource by URI . | 29 | 8 |
250,436 | 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 . | 233 | 23 |
250,437 | 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 . | 27 | 17 |
250,438 | 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 . | 40 | 16 |
250,439 | 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 . | 50 | 44 |
250,440 | 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 . | 74 | 6 |
250,441 | 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 . | 46 | 8 |
250,442 | 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 . | 104 | 44 |
250,443 | 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 . | 160 | 23 |
250,444 | 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 . | 53 | 18 |
250,445 | 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 | 49 | 10 |
250,446 | 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 . | 51 | 31 |
250,447 | 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 . | 143 | 6 |
250,448 | 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 . | 85 | 27 |
250,449 | 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 . | 84 | 9 |
250,450 | 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 . | 69 | 8 |
250,451 | 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 . | 66 | 9 |
250,452 | 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 . | 84 | 11 |
250,453 | 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 . | 115 | 13 |
250,454 | 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 . | 124 | 22 |
250,455 | 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 . | 56 | 28 |
250,456 | 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 | 175 | 7 |
250,457 | 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 . | 62 | 14 |
250,458 | 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 . | 103 | 10 |
250,459 | 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 . | 43 | 69 |
250,460 | 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 . | 53 | 7 |
250,461 | def create ( self , resource , timeout = - 1 ) : return self . _client . create ( resource , timeout = timeout , default_values = self . DEFAULT_VALUES ) | Creates a scope . | 39 | 5 |
250,462 | 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 . | 79 | 5 |
250,463 | 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 . | 99 | 11 |
250,464 | 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 . | 42 | 8 |
250,465 | 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 . | 40 | 9 |
250,466 | 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 . | 44 | 8 |
250,467 | 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 . | 44 | 9 |
250,468 | 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 . | 51 | 9 |
250,469 | 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 . | 52 | 9 |
250,470 | 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 . | 47 | 9 |
250,471 | 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 . | 45 | 17 |
250,472 | 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 . | 90 | 29 |
250,473 | 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 . | 58 | 20 |
250,474 | 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 . | 98 | 7 |
250,475 | 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 . | 64 | 11 |
250,476 | 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 . | 51 | 24 |
250,477 | def get_firmware ( self ) : uri = "{}/firmware" . format ( self . data [ "uri" ] ) return self . _helper . do_get ( uri ) | Get the firmware inventory of a server . | 46 | 8 |
250,478 | 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 . | 63 | 26 |
250,479 | 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 . | 49 | 27 |
250,480 | 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 . | 70 | 7 |
250,481 | 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 . | 61 | 17 |
250,482 | 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 . | 47 | 16 |
250,483 | def migrate ( self , id_or_uri , timeout = - 1 ) : # create the special payload to tell the VC Migration Manager to migrate the VC domain migrationInformation = { 'migrationState' : 'Migrated' , 'type' : 'migratable-vc-domains' , 'category' : 'migratable-vc-domains' } # call build_uri manually since .update(...) doesn't do it and the URI is not to be included in the body when # requesting a migration 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 . | 150 | 19 |
250,484 | 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 | 53 | 9 |
250,485 | 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 . | 41 | 8 |
250,486 | def delete ( self , resource , timeout = - 1 ) : self . _client . delete ( resource = resource , timeout = timeout ) | Delete all the labels for a resource . | 28 | 8 |
250,487 | def update ( self , resource , timeout = - 1 ) : return self . _client . update ( resource , timeout = timeout , default_values = self . DEFAULT_VALUES , uri = self . URI ) | Updates a User . | 46 | 5 |
250,488 | 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 . | 116 | 9 |
250,489 | 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 . | 61 | 11 |
250,490 | 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 . | 61 | 11 |
250,491 | 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 | 47 | 69 |
250,492 | 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 . | 58 | 22 |
250,493 | 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 . | 67 | 10 |
250,494 | 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 . | 56 | 28 |
250,495 | 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 . | 68 | 23 |
250,496 | 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 . | 46 | 18 |
250,497 | 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 . | 65 | 27 |
250,498 | 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 . | 49 | 20 |
250,499 | 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 . | 59 | 18 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.