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,500 | 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 . | 45 | 14 |
250,501 | def get_available_networks ( self , * * kwargs ) : uri = self . _helper . build_uri_with_query_string ( kwargs , '/available-networks' ) return self . _helper . do_get ( uri ) | Retrieves the list of Ethernet networks Fiber Channel networks and network sets that are available to a server profile along with their respective ports . | 61 | 27 |
250,502 | def get_available_servers ( self , * * kwargs ) : uri = self . _helper . build_uri_with_query_string ( kwargs , '/available-servers' ) return self . _helper . do_get ( uri ) | Retrieves the list of available servers . | 61 | 9 |
250,503 | def get_available_storage_system ( self , * * kwargs ) : uri = self . _helper . build_uri_with_query_string ( kwargs , '/available-storage-system' ) return self . _helper . do_get ( uri ) | Retrieves a specific storage system and its associated volumes available to the server profile based on the given server hardware type and enclosure group . | 63 | 27 |
250,504 | def get_available_storage_systems ( self , start = 0 , count = - 1 , filter = '' , sort = '' , * * kwargs ) : uri = self . _helper . build_uri_with_query_string ( kwargs , '/available-storage-systems' ) return self . _helper . get_all ( start = start , count = count , filter = filter , sort = sort , uri = uri ) | 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 . | 101 | 29 |
250,505 | def get_available_targets ( self , * * kwargs ) : uri = self . _helper . build_uri_with_query_string ( kwargs , '/available-targets' ) return self . _helper . do_get ( uri ) | Retrieves a list of the target servers and empty device bays that are available for assignment to the server profile . | 63 | 24 |
250,506 | 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 . | 51 | 12 |
250,507 | 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 . | 51 | 15 |
250,508 | def remove_extra_presentations ( self , resource , timeout = - 1 ) : uri = self . URI + "/repair" custom_headers = { 'Accept-Language' : 'en_US' } return self . _client . create ( resource , uri = uri , timeout = timeout , custom_headers = custom_headers ) | Removes extra presentations from a specified server profile . | 73 | 10 |
250,509 | def get_paths ( self , id_or_uri , path_id_or_uri = '' ) : if path_id_or_uri : uri = self . _client . build_uri ( path_id_or_uri ) if "/paths" not in uri : uri = self . _client . build_uri ( id_or_uri ) + "/paths" + "/" + path_id_or_uri else : uri = self . _client . build_uri ( id_or_uri ) + "/paths" return self . _client . get ( uri ) | Gets all paths or a specific attachment path for the specified volume attachment . | 134 | 15 |
250,510 | 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 . | 60 | 11 |
250,511 | def download_archive_artifact_bundle ( self , id_or_uri , file_path ) : uri = self . BACKUP_ARCHIVE_PATH + '/' + extract_id_from_uri ( id_or_uri ) return self . _client . download ( uri , file_path ) | Downloads an archive for the Artifact Bundle . | 69 | 9 |
250,512 | def download_artifact_bundle ( self , id_or_uri , file_path ) : uri = self . DOWNLOAD_PATH + '/' + extract_id_from_uri ( id_or_uri ) return self . _client . download ( uri , file_path ) | Download the Artifact Bundle . | 64 | 5 |
250,513 | 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 . | 41 | 28 |
250,514 | def upload_backup_bundle_from_file ( self , file_path , deployment_groups_id_or_uri ) : deployment_groups_uri = deployment_groups_id_or_uri if self . DEPLOYMENT_GROUPS_URI not in deployment_groups_id_or_uri : deployment_groups_uri = self . DEPLOYMENT_GROUPS_URI + deployment_groups_id_or_uri uri = self . BACKUP_ARCHIVE_PATH + "?deploymentGrpUri=" + deployment_groups_uri return self . _client . upload ( file_path , uri ) | Restore an Artifact Bundle from a backup file . | 142 | 10 |
250,515 | 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 . | 39 | 9 |
250,516 | def extract_bundle ( self , resource , timeout = - 1 ) : return self . _client . update ( resource , timeout = timeout , custom_headers = { "Content-Type" : "text/plain" } ) | Extracts the existing bundle on the appliance and creates all the artifacts . | 48 | 15 |
250,517 | 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 . | 46 | 16 |
250,518 | def stop_artifact_creation ( self , id_or_uri , task_uri ) : data = { "taskUri" : task_uri } uri = self . URI + '/' + extract_id_from_uri ( id_or_uri ) + self . STOP_CREATION_PATH return self . _client . update ( data , uri = uri ) | Stops creation of the selected Artifact Bundle . | 83 | 9 |
250,519 | 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 . | 42 | 14 |
250,520 | def update_script ( self , information , timeout = - 1 ) : uri = "{}/script" . format ( self . data [ "uri" ] ) return self . _helper . update ( information , uri = uri , timeout = timeout ) | Updates the configuration script of the logical enclosure and on all enclosures in the logical enclosure with the specified ID . | 56 | 23 |
250,521 | def generate_support_dump ( self , information , timeout = - 1 ) : uri = "{}/support-dumps" . format ( self . data [ "uri" ] ) return self . _helper . create ( information , uri = uri , timeout = timeout ) | 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 . | 61 | 42 |
250,522 | def update_from_group ( self , data = None , timeout = - 1 ) : uri = "{}/updateFromGroup" . format ( self . data [ "uri" ] ) return self . _helper . update ( data , uri , timeout = timeout ) | Use this action to make a logical enclosure consistent with the enclosure group when the logical enclosure is in the Inconsistent state . | 59 | 25 |
250,523 | def create_bulk ( self , resource , timeout = - 1 ) : uri = self . URI + '/bulk' default_values = self . _get_default_values ( self . BULK_DEFAULT_VALUES ) updated_data = self . _helper . update_resource_fields ( resource , default_values ) self . _helper . create ( updated_data , uri = uri , timeout = timeout ) return self . get_range ( resource [ 'namePrefix' ] , resource [ 'vlanIdRange' ] ) | Creates bulk Ethernet networks . | 122 | 6 |
250,524 | def get_range ( self , name_prefix , vlan_id_range ) : filter = '"\'name\' matches \'{}\_%\'"' . format ( name_prefix ) ethernet_networks = self . get_all ( filter = filter , sort = 'vlanId:ascending' ) vlan_ids = self . dissociate_values_or_ranges ( vlan_id_range ) for net in ethernet_networks [ : ] : if int ( net [ 'vlanId' ] ) not in vlan_ids : ethernet_networks . remove ( net ) return ethernet_networks | Gets a list of Ethernet Networks that match the given name_prefix and the vlan_id_range . | 140 | 23 |
250,525 | 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 . | 47 | 14 |
250,526 | 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 . | 53 | 13 |
250,527 | 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 . | 29 | 17 |
250,528 | 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 . | 47 | 22 |
250,529 | 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 ) : raise exceptions . HPOneViewMissingUniqueIdentifiers ( MISSING_UNIQUE_IDENTIFIERS ) # Returns if data update is not required if not update_data : return resource_data = None if 'uri' in self . UNIQUE_IDENTIFIERS and self . data . get ( 'uri' ) : resource_data = self . _helper . do_get ( self . data [ 'uri' ] ) else : for identifier in self . UNIQUE_IDENTIFIERS : identifier_value = self . data . get ( identifier ) if identifier_value : result = self . get_by ( identifier , identifier_value ) if result and isinstance ( result , list ) : resource_data = result [ 0 ] break if resource_data : self . data . update ( resource_data ) else : raise exceptions . HPOneViewResourceNotFound ( RESOURCE_DOES_NOT_EXIST ) | Retrieves data from OneView and updates resource object . | 247 | 12 |
250,530 | def get_by ( self , field , value ) : if not field : logger . exception ( RESOURCE_CLIENT_INVALID_FIELD ) raise ValueError ( RESOURCE_CLIENT_INVALID_FIELD ) filter = "\"{0}='{1}'\"" . format ( field , value ) results = self . get_all ( filter = filter ) # Workaround when the OneView filter does not work, it will filter again if "." not in field : # This filter only work for the first level results = [ item for item in results if str ( item . get ( field , "" ) ) . lower ( ) == value . lower ( ) ] return results | Get the resource by passing a field and its value . | 146 | 11 |
250,531 | def get_by_name ( self , name ) : result = self . get_by ( "name" , name ) if result : data = result [ 0 ] new_resource = self . new ( self . _connection , data ) else : new_resource = None return new_resource | Retrieves a resource by its name . | 61 | 9 |
250,532 | def get_by_uri ( self , uri ) : self . _helper . validate_resource_uri ( uri ) data = self . _helper . do_get ( uri ) if data : new_resource = self . new ( self . _connection , data ) else : new_resource = None return new_resource | Retrieves a resource by its URI | 72 | 8 |
250,533 | def _get_default_values ( self , default_values = None ) : if not default_values : default_values = self . DEFAULT_VALUES if default_values : api_version = str ( self . _connection . _apiVersion ) values = default_values . get ( api_version , { } ) . copy ( ) else : values = { } return values | Gets the default values set for a resource | 81 | 9 |
250,534 | def _merge_default_values ( self ) : values = self . _get_default_values ( ) for key , value in values . items ( ) : if not self . data . get ( key ) : self . data [ key ] = value | Merge default values with resource data . | 54 | 8 |
250,535 | def create_report ( self , uri , timeout = - 1 ) : logger . debug ( 'Creating Report (uri = %s)' . format ( uri ) ) task , _ = self . _connection . post ( uri , { } ) if not task : raise exceptions . HPOneViewException ( RESOURCE_CLIENT_TASK_EXPECTED ) task = self . _task_monitor . get_completed_task ( task , timeout ) return task [ 'taskOutput' ] | Creates a report and returns the output . | 107 | 9 |
250,536 | def build_query_uri ( self , uri = None , start = 0 , count = - 1 , filter = '' , query = '' , sort = '' , view = '' , fields = '' , scope_uris = '' ) : if filter : filter = self . make_query_filter ( filter ) if query : query = "&query=" + quote ( query ) if sort : sort = "&sort=" + quote ( sort ) if view : view = "&view=" + quote ( view ) if fields : fields = "&fields=" + quote ( fields ) if scope_uris : scope_uris = "&scopeUris=" + quote ( scope_uris ) path = uri if uri else self . _base_uri self . validate_resource_uri ( path ) symbol = '?' if '?' not in path else '&' uri = "{0}{1}start={2}&count={3}{4}{5}{6}{7}{8}{9}" . format ( path , symbol , start , count , filter , query , sort , view , fields , scope_uris ) return uri | Builds the URI from given parameters . | 243 | 8 |
250,537 | 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 : self . validate_resource_uri ( id_or_uri ) return id_or_uri else : return self . _base_uri + "/" + id_or_uri | Helps to build the URI from resource id and validate the URI . | 102 | 14 |
250,538 | 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 subresource_id_or_uri else : if not resource_id_or_uri : raise exceptions . HPOneViewValueError ( RESOURCE_ID_OR_URI_REQUIRED ) resource_uri = self . build_uri ( resource_id_or_uri ) uri = "{}/{}/{}" . format ( resource_uri , subresource_path , str ( subresource_id_or_uri or '' ) ) uri = uri . replace ( "//" , "/" ) if uri . endswith ( "/" ) : uri = uri [ : - 1 ] return uri | Helps to build a URI with resource path and its sub resource path . | 199 | 15 |
250,539 | def validate_resource_uri ( self , path ) : if self . _base_uri not in path : logger . exception ( 'Get by uri : unrecognized uri: (%s)' % path ) raise exceptions . HPOneViewUnknownType ( UNRECOGNIZED_URI ) | Helper method to validate URI of the resource . | 62 | 9 |
250,540 | 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 ) ) response = self . _connection . get ( uri ) members = self . get_members ( response ) items += members logger . debug ( "Response getAll: nextPageUri = {0}, members list length: {1}" . format ( uri , str ( len ( members ) ) ) ) uri = self . get_next_page ( response , items , requested_count ) logger . debug ( 'Total # of members found = {0}' . format ( str ( len ( items ) ) ) ) return items | Helps to make http request for get_all method . | 167 | 12 |
250,541 | def do_get ( self , uri ) : self . validate_resource_uri ( uri ) return self . _connection . get ( uri ) | Helps to make get requests | 33 | 6 |
250,542 | def do_post ( self , uri , resource , timeout , custom_headers ) : self . validate_resource_uri ( uri ) task , entity = self . _connection . post ( uri , resource , custom_headers = custom_headers ) if not task : return entity return self . _task_monitor . wait_for_task ( task , timeout ) | Helps to make post requests . | 78 | 7 |
250,543 | def do_put ( self , uri , resource , timeout , custom_headers ) : self . validate_resource_uri ( uri ) task , body = self . _connection . put ( uri , resource , custom_headers = custom_headers ) if not task : return body return self . _task_monitor . wait_for_task ( task , timeout ) | Helps to make put requests . | 78 | 7 |
250,544 | 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 . | 44 | 12 |
250,545 | def build_query_uri ( self , start = 0 , count = - 1 , filter = '' , query = '' , sort = '' , view = '' , fields = '' , uri = None , scope_uris = '' ) : if filter : filter = self . __make_query_filter ( filter ) if query : query = "&query=" + quote ( query ) if sort : sort = "&sort=" + quote ( sort ) if view : view = "&view=" + quote ( view ) if fields : fields = "&fields=" + quote ( fields ) if scope_uris : scope_uris = "&scopeUris=" + quote ( scope_uris ) path = uri if uri else self . _uri self . __validate_resource_uri ( path ) symbol = '?' if '?' not in path else '&' uri = "{0}{1}start={2}&count={3}{4}{5}{6}{7}{8}{9}" . format ( path , symbol , start , count , filter , query , sort , view , fields , scope_uris ) return uri | Builds the URI given the parameters . | 244 | 8 |
250,546 | def upload ( self , file_path , uri = None , timeout = - 1 ) : if not uri : uri = self . _uri upload_file_name = os . path . basename ( file_path ) task , entity = self . _connection . post_multipart_with_response_handling ( uri , file_path , upload_file_name ) if not task : return entity return self . _task_monitor . wait_for_task ( task , timeout ) | Makes a multipart request . | 108 | 7 |
250,547 | def get_by ( self , field , value , uri = None ) : if not field : logger . exception ( RESOURCE_CLIENT_INVALID_FIELD ) raise ValueError ( RESOURCE_CLIENT_INVALID_FIELD ) if not uri : uri = self . _uri self . __validate_resource_uri ( uri ) logger . debug ( 'Get by (uri = %s, field = %s, value = %s)' % ( uri , field , str ( value ) ) ) filter = "\"{0}='{1}'\"" . format ( field , value ) results = self . get_all ( filter = filter , uri = uri ) # Workaround when the OneView filter does not work, it will filter again if "." not in field : # This filter only work for the first level results = [ item for item in results if str ( item . get ( field , '' ) ) . lower ( ) == value . lower ( ) ] return results | This function uses get_all passing a filter . | 218 | 10 |
250,548 | def get_by ( self , field , value ) : firmwares = self . get_all ( ) matches = [ ] for item in firmwares : if item . get ( field ) == value : matches . append ( item ) return matches | Gets the list of firmware baseline resources managed by the appliance . Optional parameters can be used to filter the list of resources returned . | 52 | 26 |
250,549 | def get_statistics ( self , id_or_uri , port_name = '' ) : uri = self . _client . build_uri ( id_or_uri ) + "/statistics" if port_name : uri = uri + "/" + port_name return self . _client . get ( uri ) | Gets the statistics from an interconnect . | 72 | 9 |
250,550 | 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 , subport_number ) return self . _client . get ( uri ) | Gets the subport statistics on an interconnect . | 83 | 11 |
250,551 | 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 . | 52 | 10 |
250,552 | def update_port ( self , port_information , id_or_uri , timeout = - 1 ) : uri = self . _client . build_uri ( id_or_uri ) + "/ports" return self . _client . update ( port_information , uri , timeout ) | Updates an interconnect port . | 62 | 7 |
250,553 | def update_ports ( self , ports , id_or_uri , timeout = - 1 ) : resources = merge_default_values ( ports , { 'type' : 'port' } ) uri = self . _client . build_uri ( id_or_uri ) + "/update-ports" return self . _client . update ( resources , uri , timeout ) | Updates the interconnect ports . | 80 | 7 |
250,554 | def reset_port_protection ( self , id_or_uri , timeout = - 1 ) : uri = self . _client . build_uri ( id_or_uri ) + "/resetportprotection" return self . _client . update_with_zero_body ( uri , timeout ) | Triggers a reset of port protection . | 64 | 9 |
250,555 | 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 = "ports" ) return self . _client . get_all ( start , count , uri = uri ) | Gets all interconnect ports . | 81 | 7 |
250,556 | def get_port ( self , id_or_uri , port_id_or_uri ) : uri = self . _client . build_subresource_uri ( id_or_uri , port_id_or_uri , "ports" ) return self . _client . get ( uri ) | Gets an interconnect port . | 66 | 7 |
250,557 | def get_pluggable_module_information ( self , id_or_uri ) : uri = self . _client . build_uri ( id_or_uri ) + "/pluggableModuleInformation" return self . _client . get ( uri ) | Gets all the pluggable module information . | 57 | 10 |
250,558 | def update_configuration ( self , id_or_uri , timeout = - 1 ) : uri = self . _client . build_uri ( id_or_uri ) + "/configuration" return self . _client . update_with_zero_body ( uri , timeout = timeout ) | Reapplies the appliance s configuration on the interconnect . This includes running the same configure steps that were performed as part of the interconnect add by the enclosure . | 64 | 33 |
250,559 | def update ( self , resource , id_or_uri ) : return self . _client . update ( resource = resource , uri = id_or_uri ) | Updates a registered Device Manager . | 35 | 7 |
250,560 | def add ( self , resource , provider_uri_or_id , timeout = - 1 ) : uri = self . _provider_client . build_uri ( provider_uri_or_id ) + "/device-managers" return self . _client . create ( resource = resource , uri = uri , timeout = timeout ) | Adds a Device Manager under the specified provider . | 73 | 9 |
250,561 | def get_provider_uri ( self , provider_display_name ) : providers = self . _provider_client . get_by ( 'displayName' , provider_display_name ) return providers [ 0 ] [ 'uri' ] if providers else None | Gets uri for a specific provider . | 56 | 9 |
250,562 | def get_default_connection_info ( self , provider_name ) : provider = self . _provider_client . get_by_name ( provider_name ) if provider : return provider [ 'defaultConnectionInfo' ] else : return { } | Gets default connection info for a specific provider . | 53 | 10 |
250,563 | def get_by_name ( self , name ) : san_managers = self . _client . get_all ( ) result = [ x for x in san_managers if x [ 'name' ] == name ] return result [ 0 ] if result else None | Gets a SAN Manager by name . | 57 | 8 |
250,564 | def get_by_provider_display_name ( self , provider_display_name ) : san_managers = self . _client . get_all ( ) result = [ x for x in san_managers if x [ 'providerDisplayName' ] == provider_display_name ] return result [ 0 ] if result else None | Gets a SAN Manager by provider display name . | 73 | 10 |
250,565 | def update_configuration ( self , configuration ) : return self . _client . update ( configuration , uri = self . URI + "/configuration" ) | Updates the metrics configuration with the new values . Overwrites the existing configuration . | 33 | 17 |
250,566 | def delete_all ( self , filter = None , timeout = - 1 ) : return self . _client . delete_all ( filter = filter , timeout = timeout ) | Delete an SNMPv3 User based on User name specified in filter . The user will be deleted only if it has no associated destinations . | 35 | 28 |
250,567 | def update_ports ( self , ports , id_or_uri ) : ports = merge_default_values ( ports , { 'type' : 'port' } ) uri = self . _client . build_uri ( id_or_uri ) + "/update-ports" return self . _client . update ( uri = uri , resource = ports ) | Updates the switch ports . Only the ports under the management of OneView and those that are unlinked are supported for update . | 78 | 26 |
250,568 | def from_json_file ( cls , file_name ) : with open ( file_name ) as json_data : config = json . load ( json_data ) return cls ( config ) | Construct OneViewClient using a json file . | 43 | 9 |
250,569 | def from_environment_variables ( cls ) : ip = os . environ . get ( 'ONEVIEWSDK_IP' , '' ) image_streamer_ip = os . environ . get ( 'ONEVIEWSDK_IMAGE_STREAMER_IP' , '' ) api_version = int ( os . environ . get ( 'ONEVIEWSDK_API_VERSION' , OneViewClient . DEFAULT_API_VERSION ) ) ssl_certificate = os . environ . get ( 'ONEVIEWSDK_SSL_CERTIFICATE' , '' ) username = os . environ . get ( 'ONEVIEWSDK_USERNAME' , '' ) auth_login_domain = os . environ . get ( 'ONEVIEWSDK_AUTH_LOGIN_DOMAIN' , '' ) password = os . environ . get ( 'ONEVIEWSDK_PASSWORD' , '' ) proxy = os . environ . get ( 'ONEVIEWSDK_PROXY' , '' ) sessionID = os . environ . get ( 'ONEVIEWSDK_SESSIONID' , '' ) timeout = os . environ . get ( 'ONEVIEWSDK_CONNECTION_TIMEOUT' ) config = dict ( ip = ip , image_streamer_ip = image_streamer_ip , api_version = api_version , ssl_certificate = ssl_certificate , credentials = dict ( userName = username , authLoginDomain = auth_login_domain , password = password , sessionID = sessionID ) , proxy = proxy , timeout = timeout ) return cls ( config ) | Construct OneViewClient using environment variables . | 356 | 8 |
250,570 | def create_image_streamer_client ( self ) : image_streamer = ImageStreamerClient ( self . __image_streamer_ip , self . __connection . get_session_id ( ) , self . __connection . _apiVersion , self . __connection . _sslBundle ) return image_streamer | Create the Image Streamer API Client . | 69 | 8 |
250,571 | def certificate_authority ( self ) : if not self . __certificate_authority : self . __certificate_authority = CertificateAuthority ( self . __connection ) return self . __certificate_authority | Gets the Certificate Authority API client . | 47 | 8 |
250,572 | def connections ( self ) : if not self . __connections : self . __connections = Connections ( self . __connection ) return self . __connections | Gets the Connections API client . | 34 | 8 |
250,573 | def fcoe_networks ( self ) : if not self . __fcoe_networks : self . __fcoe_networks = FcoeNetworks ( self . __connection ) return self . __fcoe_networks | Gets the FcoeNetworks API client . | 49 | 10 |
250,574 | def fabrics ( self ) : if not self . __fabrics : self . __fabrics = Fabrics ( self . __connection ) return self . __fabrics | Gets the Fabrics API client . | 34 | 8 |
250,575 | def restores ( self ) : if not self . __restores : self . __restores = Restores ( self . __connection ) return self . __restores | Gets the Restores API client . | 34 | 8 |
250,576 | def scopes ( self ) : if not self . __scopes : self . __scopes = Scopes ( self . __connection ) return self . __scopes | Gets the Scopes API client . | 35 | 8 |
250,577 | def datacenters ( self ) : if not self . __datacenters : self . __datacenters = Datacenters ( self . __connection ) return self . __datacenters | Gets the Datacenters API client . | 40 | 9 |
250,578 | def network_sets ( self ) : if not self . __network_sets : self . __network_sets = NetworkSets ( self . __connection ) return self . __network_sets | Gets the NetworkSets API client . | 40 | 9 |
250,579 | def server_hardware ( self ) : if not self . __server_hardware : self . __server_hardware = ServerHardware ( self . __connection ) return self . __server_hardware | Gets the ServerHardware API client . | 43 | 8 |
250,580 | def server_hardware_types ( self ) : if not self . __server_hardware_types : self . __server_hardware_types = ServerHardwareTypes ( self . __connection ) return self . __server_hardware_types | Gets the ServerHardwareTypes API client . | 52 | 9 |
250,581 | def id_pools_vsn_ranges ( self ) : if not self . __id_pools_vsn_ranges : self . __id_pools_vsn_ranges = IdPoolsRanges ( 'vsn' , self . __connection ) return self . __id_pools_vsn_ranges | Gets the IdPoolsRanges API Client for VSN Ranges . | 75 | 16 |
250,582 | def id_pools_vmac_ranges ( self ) : if not self . __id_pools_vmac_ranges : self . __id_pools_vmac_ranges = IdPoolsRanges ( 'vmac' , self . __connection ) return self . __id_pools_vmac_ranges | Gets the IdPoolsRanges API Client for VMAC Ranges . | 75 | 16 |
250,583 | def id_pools_vwwn_ranges ( self ) : if not self . __id_pools_vwwn_ranges : self . __id_pools_vwwn_ranges = IdPoolsRanges ( 'vwwn' , self . __connection ) return self . __id_pools_vwwn_ranges | Gets the IdPoolsRanges API Client for VWWN Ranges . | 80 | 17 |
250,584 | def id_pools_ipv4_ranges ( self ) : if not self . __id_pools_ipv4_ranges : self . __id_pools_ipv4_ranges = IdPoolsIpv4Ranges ( self . __connection ) return self . __id_pools_ipv4_ranges | Gets the IdPoolsIpv4Ranges API client . | 78 | 15 |
250,585 | def id_pools_ipv4_subnets ( self ) : if not self . __id_pools_ipv4_subnets : self . __id_pools_ipv4_subnets = IdPoolsIpv4Subnets ( self . __connection ) return self . __id_pools_ipv4_subnets | Gets the IdPoolsIpv4Subnets API client . | 78 | 15 |
250,586 | def id_pools ( self ) : if not self . __id_pools : self . __id_pools = IdPools ( self . __connection ) return self . __id_pools | Gets the IdPools API client . | 44 | 9 |
250,587 | def switches ( self ) : if not self . __switches : self . __switches = Switches ( self . __connection ) return self . __switches | Gets the Switches API client . | 34 | 8 |
250,588 | def roles ( self ) : if not self . __roles : self . __roles = Roles ( self . __connection ) return self . __roles | Gets the Roles API client . | 34 | 8 |
250,589 | def switch_types ( self ) : if not self . __switch_types : self . __switch_types = SwitchTypes ( self . __connection ) return self . __switch_types | Gets the SwitchTypes API client . | 39 | 8 |
250,590 | def logical_switches ( self ) : if not self . __logical_switches : self . __logical_switches = LogicalSwitches ( self . __connection ) return self . __logical_switches | Gets the LogicalSwitches API client . | 48 | 10 |
250,591 | def tasks ( self ) : if not self . __tasks : self . __tasks = Tasks ( self . __connection ) return self . __tasks | Gets the Tasks API client . | 34 | 8 |
250,592 | def enclosure_groups ( self ) : if not self . __enclosure_groups : self . __enclosure_groups = EnclosureGroups ( self . __connection ) return self . __enclosure_groups | Gets the EnclosureGroups API client . | 44 | 10 |
250,593 | def logical_enclosures ( self ) : if not self . __logical_enclosures : self . __logical_enclosures = LogicalEnclosures ( self . __connection ) return self . __logical_enclosures | Gets the LogicalEnclosures API client . | 53 | 11 |
250,594 | def metric_streaming ( self ) : if not self . __metric_streaming : self . __metric_streaming = MetricStreaming ( self . __connection ) return self . __metric_streaming | Gets the MetricStreaming API client . | 48 | 10 |
250,595 | def interconnects ( self ) : if not self . __interconnects : self . __interconnects = Interconnects ( self . __connection ) return self . __interconnects | Gets the Interconnects API client . | 40 | 9 |
250,596 | def interconnect_link_topologies ( self ) : if not self . __interconnect_link_topologies : self . __interconnect_link_topologies = InterconnectLinkTopologies ( self . __connection ) return self . __interconnect_link_topologies | Gets the InterconnectLinkTopologies API client . | 58 | 11 |
250,597 | def sas_interconnect_types ( self ) : if not self . __sas_interconnect_types : self . __sas_interconnect_types = SasInterconnectTypes ( self . __connection ) return self . __sas_interconnect_types | Gets the SasInterconnectTypes API client . | 57 | 10 |
250,598 | def internal_link_sets ( self ) : if not self . __internal_link_sets : self . __internal_link_sets = InternalLinkSets ( self . __connection ) return self . __internal_link_sets | Gets the InternalLinkSets API client . | 49 | 10 |
250,599 | def logical_interconnect_groups ( self ) : if not self . __logical_interconnect_groups : self . __logical_interconnect_groups = LogicalInterconnectGroups ( self . __connection ) return self . __logical_interconnect_groups | Gets the LogicalInterconnectGroups API client . | 58 | 12 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.