def test_enable_premium_feature(self): api = StorageSystemsApi() storage_systems_api = None try: storage_systems_api = api.enable_premium_feature(system_id="test", ) # For the DELETE calls, there's no reponse returned and we want to set that as a valid sdk call. if storage_systems_api is None: storage_systems_api = 1 except (ApiException, IOError) as exp: # The API call went through but got a HTTP errorcode, which means the SDK works storage_systems_api = 1 self.assertNotEqual(storage_systems_api, None)
def test_cancel_discovery_operation(self): api = StorageSystemsApi() storage_systems_api = None try: storage_systems_api = api.cancel_discovery_operation() # For the DELETE calls, there's no reponse returned and we want to set that as a valid sdk call. if storage_systems_api is None: storage_systems_api = 1 except (ApiException, IOError) as exp: # The API call went through but got a HTTP errorcode, which means the SDK works storage_systems_api = 1 self.assertNotEqual(storage_systems_api, None)
def test_get_storage_device_with_folder(self): api = StorageSystemsApi() storage_systems_api = None try: storage_systems_api = api.get_storage_device_with_folder(folder_id="test") # For the DELETE calls, there's no reponse returned and we want to set that as a valid sdk call. if storage_systems_api is None: storage_systems_api = 1 except (ApiException, IOError) as exp: # The API call went through but got a HTTP errorcode, which means the SDK works storage_systems_api = 1 self.assertNotEqual(storage_systems_api, None)
# This is not recommended, but added here to clean up output. urllib3.disable_warnings() # Create a configuration object and set the appropriate parameters api_configuration = Configuration() api_configuration.password = args.password api_configuration.host = args.proxy # For demonstration purposes, let's disable SSL verification api_configuration.verify_ssl = False # Now create the generic ApiClient object # The ApiClient will utilize the Configuration object automatically client = ApiClient() # remove this prior to release #print("client:\n{}".format(client.__dict__)) storage_api = StorageSystemsApi() # remove this prior to release #print("storage_api: \n{}".format(storage_api.__dict__)) diagnostics_api = DiagnosticsApi() data_request = SupportDataRequest() # type, filename data_request.type = "supportBundle" data_request.filename = "sampledata" try: initial_response = diagnostics_api.start_support_data_retrieval_request( args.systemid, body=data_request) except ApiException: print("An error occurred retrieving the support bundle.") sys.exit() print("Response from DiagnosticsApi.start_support_data_retrieval:\n") pprint.pprint(initial_response) # Now we need to wait a bit for the bundle to be generated
from netapp.santricity.models.v2.storage_pool_create_request import StoragePoolCreateRequest from netapp.santricity.models.v2.volume_create_request import VolumeCreateRequest from netapp.santricity.models.v2.volume_mapping_create_request import VolumeMappingCreateRequest from pprint import pprint import csv config = Configuration() config.host = "http://<E-Series Address>:18080" config.username = "******" config.password = "******" api_client = ApiClient() config.api_client = api_client storage_system = StorageSystemsApi(api_client=api_client) ssr = storage_system.get_all_storage_systems() print ssr vol_api = VolumesApi(api_client=api_client) file = open('multipath.conf', 'w') file.write('multipaths {\n') vol_a = vol_api.get_all_volumes( system_id='1c57c70c-bc5f-4f8c-a6a7-34cdb2cafc3a') vol_b = vol_api.get_all_volumes( system_id='b6856c5b-5aa6-45d6-a64d-fcefcb2bf676')
from netapp.santricity.api_client import ApiClient from netapp.santricity.api.v2.storage_systems_api import StorageSystemsApi from netapp.santricity.api.v2.volumes_api import VolumesApi from netapp.santricity.api.v2.hardware_api import HardwareApi from pprint import pprint config = Configuration() config.host = "http://localhost:8080" # Add ip address of the proxy here config.username = "******" config.password = "******" api_client = ApiClient() config.api_client = api_client storage_system = StorageSystemsApi(api_client=api_client) # Get storage system status ssr = storage_system.get_all_storage_systems() for ss in ssr: print "\n##################################\n" \ "Storage System wwn - " + ss.wwn + ", Status : " + ss.status # Get all volumes info for each storage system volume_api = VolumesApi(api_client=api_client) volumes = volume_api.get_all_volumes(system_id=ss.id) for vol in volumes: print "\n##################################\n" \ "Volume " + vol.wwn + ", info : \n"