From 9df1d75ed6ce6bddbe26447b457de8960256cf7f Mon Sep 17 00:00:00 2001 From: rlucan-ps Date: Tue, 18 Jun 2024 11:06:46 +0000 Subject: [PATCH] Release 1.52.0 Added FlashBlade REST 2.14 --- docs/changelog.rst | 1 + docs/conf.py | 4 +- docs/fb_reference.rst | 306 +- .../pypureclient.flashblade.FB_2_14.api.rst | 469 + ...pypureclient.flashblade.FB_2_14.models.rst | 3525 +++ .../pypureclient.flashblade.FB_2_14.rst | 54 + docs/source/pypureclient.flashblade.rst | 1 + pyproject.toml | 2 +- pypureclient/client_settings.py | 2 +- pypureclient/flashblade/FB_2_14/__init__.py | 529 + .../flashblade/FB_2_14/api/__init__.py | 61 + .../FB_2_14/api/active_directory_api.py | 563 + .../FB_2_14/api/administrators_api.py | 993 + .../FB_2_14/api/alert_watchers_api.py | 549 + .../flashblade/FB_2_14/api/alerts_api.py | 253 + .../flashblade/FB_2_14/api/api_clients_api.py | 442 + .../FB_2_14/api/array_connections_api.py | 948 + .../flashblade/FB_2_14/api/arrays_api.py | 1385 + .../flashblade/FB_2_14/api/audits_api.py | 151 + .../FB_2_14/api/authorization_api.py | 444 + .../flashblade/FB_2_14/api/blades_api.py | 155 + .../FB_2_14/api/bucket_replica_links_api.py | 558 + .../flashblade/FB_2_14/api/buckets_api.py | 2155 ++ .../FB_2_14/api/certificate_groups_api.py | 817 + .../FB_2_14/api/certificates_api.py | 926 + .../flashblade/FB_2_14/api/clients_api.py | 137 + .../FB_2_14/api/directory_services_api.py | 923 + .../flashblade/FB_2_14/api/dns_api.py | 253 + .../flashblade/FB_2_14/api/drives_api.py | 155 + .../api/file_system_replica_links_api.py | 1056 + .../FB_2_14/api/file_system_snapshots_api.py | 967 + .../FB_2_14/api/file_systems_api.py | 2449 ++ .../flashblade/FB_2_14/api/hardware_api.py | 249 + .../FB_2_14/api/hardware_connectors_api.py | 394 + .../flashblade/FB_2_14/api/keytabs_api.py | 521 + .../flashblade/FB_2_14/api/kmip_api.py | 537 + .../FB_2_14/api/lifecycle_rules_api.py | 490 + .../api/link_aggregation_groups_api.py | 445 + .../flashblade/FB_2_14/api/logs_api.py | 415 + .../FB_2_14/api/network_interfaces_api.py | 669 + .../api/object_store_access_keys_api.py | 424 + .../FB_2_14/api/object_store_accounts_api.py | 450 + .../object_store_remote_credentials_api.py | 445 + .../FB_2_14/api/object_store_users_api.py | 701 + .../api/object_store_virtual_hosts_api.py | 336 + .../policies___audit_for_file_systems_api.py | 803 + .../api/policies___network_access_api.py | 878 + .../FB_2_14/api/policies___nfs_api.py | 936 + .../api/policies___object_store_access_api.py | 1392 + .../FB_2_14/api/policies___smb_client_api.py | 920 + .../FB_2_14/api/policies___smb_share_api.py | 912 + .../FB_2_14/api/policies___snapshot_api.py | 1701 ++ ...olicies___ssh_certificate_authority_api.py | 2028 ++ .../FB_2_14/api/policies__all_api.py | 346 + .../flashblade/FB_2_14/api/public_keys_api.py | 466 + .../flashblade/FB_2_14/api/quotas_api.py | 1217 + .../flashblade/FB_2_14/api/rdl_api.py | 351 + .../flashblade/FB_2_14/api/roles_api.py | 151 + .../flashblade/FB_2_14/api/sessions_api.py | 151 + .../flashblade/FB_2_14/api/smtp_api.py | 237 + .../flashblade/FB_2_14/api/snmp_agents_api.py | 316 + .../FB_2_14/api/snmp_managers_api.py | 568 + .../flashblade/FB_2_14/api/subnets_api.py | 445 + .../flashblade/FB_2_14/api/support_api.py | 304 + .../flashblade/FB_2_14/api/syslog_api.py | 750 + .../flashblade/FB_2_14/api/targets_api.py | 590 + .../flashblade/FB_2_14/api/usage_api.py | 306 + .../FB_2_14/api/verification_keys_api.py | 221 + pypureclient/flashblade/FB_2_14/api_client.py | 646 + pypureclient/flashblade/FB_2_14/client.py | 25397 ++++++++++++++++ .../flashblade/FB_2_14/configuration.py | 249 + .../flashblade/FB_2_14/models/__init__.py | 485 + .../FB_2_14/models/active_directory.py | 165 + .../active_directory_directory_servers.py | 117 + .../models/active_directory_get_response.py | 123 + .../FB_2_14/models/active_directory_patch.py | 147 + .../FB_2_14/models/active_directory_post.py | 177 + .../models/active_directory_response.py | 111 + .../flashblade/FB_2_14/models/admin.py | 153 + .../FB_2_14/models/admin_api_token.py | 117 + .../models/admin_api_token_get_response.py | 123 + .../models/admin_api_token_response.py | 111 + .../flashblade/FB_2_14/models/admin_cache.py | 129 + .../models/admin_cache_get_response.py | 123 + .../FB_2_14/models/admin_get_response.py | 123 + .../flashblade/FB_2_14/models/admin_patch.py | 129 + .../FB_2_14/models/admin_response.py | 111 + .../FB_2_14/models/admin_setting.py | 138 + .../models/admin_settings_get_response.py | 123 + .../FB_2_14/models/admin_settings_response.py | 111 + .../flashblade/FB_2_14/models/alert.py | 207 + .../FB_2_14/models/alert_get_response.py | 123 + .../FB_2_14/models/alert_response.py | 111 + .../FB_2_14/models/alert_watcher.py | 129 + .../models/alert_watcher_get_response.py | 123 + .../FB_2_14/models/alert_watcher_post.py | 111 + .../FB_2_14/models/alert_watcher_response.py | 111 + .../flashblade/FB_2_14/models/api_client.py | 153 + .../FB_2_14/models/api_clients_post.py | 133 + .../FB_2_14/models/api_clients_response.py | 111 + .../flashblade/FB_2_14/models/api_token.py | 123 + .../flashblade/FB_2_14/models/api_version.py | 111 + .../flashblade/FB_2_14/models/array.py | 201 + .../FB_2_14/models/array_connection.py | 159 + .../models/array_connection_get_response.py | 123 + .../FB_2_14/models/array_connection_key.py | 123 + .../array_connection_key_get_response.py | 123 + .../models/array_connection_key_response.py | 111 + .../FB_2_14/models/array_connection_path.py | 141 + .../array_connection_path_get_response.py | 123 + .../FB_2_14/models/array_connection_post.py | 165 + .../models/array_connection_response.py | 111 + .../FB_2_14/models/array_encryption.py | 111 + .../models/array_encryption_data_at_rest.py | 123 + .../models/array_eradication_config.py | 117 + .../models/array_factory_reset_token.py | 117 + .../array_factory_reset_token_get_response.py | 123 + .../array_factory_reset_token_response.py | 111 + .../FB_2_14/models/array_get_response.py | 123 + .../models/array_http_specific_performance.py | 213 + .../array_http_specific_performance_get.py | 123 + .../models/array_nfs_specific_performance.py | 555 + .../array_nfs_specific_performance_get.py | 123 + .../FB_2_14/models/array_performance.py | 222 + .../models/array_performance_get_response.py | 123 + .../array_performance_replication_get_resp.py | 123 + .../FB_2_14/models/array_response.py | 111 + .../models/array_s3_specific_performance.py | 213 + .../array_s3_specific_performance_get_resp.py | 123 + .../flashblade/FB_2_14/models/array_space.py | 141 + .../models/array_space_get_response.py | 123 + ...rrays_supported_time_zones_get_response.py | 123 + .../flashblade/FB_2_14/models/audit.py | 165 + .../models/audit_file_systems_policies.py | 147 + ...udit_file_systems_policies_get_response.py | 123 + ...e_systems_policies_members_get_response.py | 123 + ..._file_systems_policies_members_response.py | 111 + .../audit_file_systems_policies_patch.py | 159 + .../audit_file_systems_policies_post.py | 147 + .../audit_file_systems_policies_response.py | 111 + .../models/audit_file_systems_policy.py | 147 + .../FB_2_14/models/audit_get_response.py | 123 + .../FB_2_14/models/audit_response.py | 111 + .../flashblade/FB_2_14/models/blade.py | 147 + .../FB_2_14/models/blade_get_response.py | 129 + .../flashblade/FB_2_14/models/bucket.py | 213 + .../FB_2_14/models/bucket_access_policy.py | 153 + .../bucket_access_policy_get_response.py | 123 + .../models/bucket_access_policy_post.py | 111 + .../models/bucket_access_policy_response.py | 111 + .../models/bucket_access_policy_rule.py | 141 + .../bucket_access_policy_rule_bulk_manage.py | 135 + .../bucket_access_policy_rule_get_response.py | 123 + .../models/bucket_access_policy_rule_post.py | 129 + .../bucket_access_policy_rule_principal.py | 111 + .../bucket_access_policy_rule_response.py | 111 + .../FB_2_14/models/bucket_defaults.py | 117 + .../models/bucket_defaults_readonly.py | 117 + .../models/bucket_eradication_config.py | 123 + .../FB_2_14/models/bucket_get_response.py | 129 + .../flashblade/FB_2_14/models/bucket_patch.py | 153 + .../FB_2_14/models/bucket_performance.py | 222 + .../models/bucket_performance_get_response.py | 129 + .../flashblade/FB_2_14/models/bucket_post.py | 147 + .../FB_2_14/models/bucket_replica_link.py | 183 + .../bucket_replica_link_get_response.py | 129 + .../models/bucket_replica_link_post.py | 117 + .../models/bucket_replica_link_response.py | 117 + .../FB_2_14/models/bucket_response.py | 111 + .../models/bucket_s3_specific_performance.py | 213 + ...bucket_s3_specific_performance_get_resp.py | 129 + .../flashblade/FB_2_14/models/built_in.py | 117 + .../FB_2_14/models/built_in_no_id.py | 111 + .../FB_2_14/models/built_in_relationship.py | 111 + .../flashblade/FB_2_14/models/certificate.py | 219 + .../certificate_certificate_group_get_resp.py | 123 + .../certificate_certificate_group_response.py | 111 + .../models/certificate_get_response.py | 123 + .../FB_2_14/models/certificate_group.py | 117 + .../certificate_group_certificate_get_resp.py | 123 + .../certificate_group_certificate_response.py | 111 + .../models/certificate_group_get_response.py | 123 + .../models/certificate_group_response.py | 111 + .../FB_2_14/models/certificate_group_use.py | 123 + .../certificate_group_use_get_response.py | 123 + .../FB_2_14/models/certificate_patch.py | 141 + .../FB_2_14/models/certificate_post.py | 207 + .../FB_2_14/models/certificate_response.py | 111 + .../FB_2_14/models/certificate_use.py | 129 + .../models/certificate_use_get_response.py | 123 + .../FB_2_14/models/client_performance.py | 216 + .../models/client_performance_get_response.py | 129 + ...on_relationship_performance_replication.py | 141 + ...onship_performance_replication_get_resp.py | 129 + .../continuous_replication_performance.py | 129 + .../cross_origin_resource_sharing_policy.py | 153 + ...in_resource_sharing_policy_get_response.py | 123 + ...ss_origin_resource_sharing_policy_patch.py | 111 + ...origin_resource_sharing_policy_response.py | 111 + ...oss_origin_resource_sharing_policy_rule.py | 135 + ...esource_sharing_policy_rule_bulk_manage.py | 129 + ...source_sharing_policy_rule_get_response.py | 123 + ...rigin_resource_sharing_policy_rule_post.py | 123 + ...n_resource_sharing_policy_rule_response.py | 111 + .../flashblade/FB_2_14/models/direction.py | 105 + .../FB_2_14/models/directory_service.py | 183 + .../models/directory_service_get_response.py | 123 + .../models/directory_service_management.py | 117 + .../FB_2_14/models/directory_service_nfs.py | 117 + .../models/directory_service_response.py | 111 + .../FB_2_14/models/directory_service_role.py | 135 + .../directory_service_roles_get_response.py | 123 + .../directory_service_roles_response.py | 111 + .../FB_2_14/models/directory_service_smb.py | 111 + pypureclient/flashblade/FB_2_14/models/dns.py | 129 + .../FB_2_14/models/dns_get_response.py | 123 + .../flashblade/FB_2_14/models/dns_response.py | 111 + .../flashblade/FB_2_14/models/drive.py | 152 + .../FB_2_14/models/drive_get_response.py | 129 + .../flashblade/FB_2_14/models/eula.py | 117 + .../FB_2_14/models/eula_get_response.py | 123 + .../FB_2_14/models/eula_response.py | 111 + .../FB_2_14/models/eula_signature.py | 129 + .../flashblade/FB_2_14/models/file_info.py | 117 + .../flashblade/FB_2_14/models/file_lock.py | 159 + .../FB_2_14/models/file_lock_get_response.py | 123 + .../file_lock_nlm_reclamation_response.py | 111 + .../FB_2_14/models/file_lock_range.py | 117 + .../FB_2_14/models/file_lock_response.py | 111 + .../flashblade/FB_2_14/models/file_session.py | 165 + .../models/file_session_get_response.py | 123 + .../FB_2_14/models/file_session_response.py | 111 + .../flashblade/FB_2_14/models/file_system.py | 231 + .../FB_2_14/models/file_system_client.py | 111 + .../file_system_clients_get_response.py | 123 + .../models/file_system_clients_response.py | 111 + .../models/file_system_get_response.py | 129 + .../models/file_system_group_performance.py | 228 + ..._system_groups_performance_get_response.py | 117 + .../file_system_lock_nlm_reclamation.py | 117 + .../FB_2_14/models/file_system_patch.py | 231 + .../FB_2_14/models/file_system_performance.py | 222 + .../file_system_performance_get_response.py | 129 + .../FB_2_14/models/file_system_post.py | 189 + .../models/file_system_replica_link.py | 165 + .../file_system_replica_link_get_response.py | 123 + .../file_system_replica_link_response.py | 111 + .../FB_2_14/models/file_system_response.py | 111 + .../FB_2_14/models/file_system_snapshot.py | 171 + .../file_system_snapshot_get_response.py | 129 + ...e_system_snapshot_get_transfer_response.py | 129 + .../models/file_system_snapshot_post.py | 111 + .../models/file_system_snapshot_response.py | 111 + .../models/file_system_snapshot_transfer.py | 176 + .../file_system_snapshot_transfer_response.py | 111 + .../models/file_system_user_performance.py | 228 + ...e_system_users_performance_get_response.py | 117 + .../models/fixed_location_reference.py | 141 + .../FB_2_14/models/fixed_reference.py | 123 + .../models/fixed_reference_name_only.py | 111 + .../FB_2_14/models/fixed_reference_no_id.py | 117 + .../fixed_reference_no_resource_type.py | 117 + .../models/fixed_reference_with_remote.py | 129 + .../flashblade/FB_2_14/models/group.py | 117 + .../flashblade/FB_2_14/models/group_quota.py | 141 + .../models/group_quota_get_response.py | 123 + .../FB_2_14/models/group_quota_patch.py | 105 + .../FB_2_14/models/group_quota_post.py | 119 + .../FB_2_14/models/group_quota_response.py | 111 + .../flashblade/FB_2_14/models/hardware.py | 183 + .../FB_2_14/models/hardware_connector.py | 141 + .../models/hardware_connector_get_response.py | 123 + .../models/hardware_connector_performance.py | 219 + ...ware_connector_performance_get_response.py | 129 + .../models/hardware_connector_response.py | 111 + .../FB_2_14/models/hardware_get_response.py | 123 + .../FB_2_14/models/hardware_response.py | 111 + .../flashblade/FB_2_14/models/http.py | 111 + .../FB_2_14/models/inline_response400.py | 117 + .../FB_2_14/models/inline_response401.py | 117 + .../flashblade/FB_2_14/models/keytab.py | 165 + .../FB_2_14/models/keytab_file_base64.py | 105 + .../FB_2_14/models/keytab_file_binary.py | 105 + .../FB_2_14/models/keytab_file_response.py | 105 + .../FB_2_14/models/keytab_get_response.py | 123 + .../flashblade/FB_2_14/models/keytab_post.py | 111 + .../FB_2_14/models/keytab_response.py | 111 + .../flashblade/FB_2_14/models/kmip_server.py | 135 + .../FB_2_14/models/kmip_server_response.py | 111 + .../FB_2_14/models/lifecycle_rule.py | 171 + .../models/lifecycle_rule_config_extension.py | 123 + .../models/lifecycle_rule_get_response.py | 123 + .../FB_2_14/models/lifecycle_rule_patch.py | 141 + .../FB_2_14/models/lifecycle_rule_post.py | 147 + .../FB_2_14/models/lifecycle_rule_response.py | 111 + .../FB_2_14/models/link_aggregation_group.py | 150 + .../link_aggregation_group_get_response.py | 123 + .../models/link_aggregation_group_response.py | 111 + .../FB_2_14/models/linkaggregationgroup.py | 123 + .../FB_2_14/models/location_reference.py | 141 + .../flashblade/FB_2_14/models/login.py | 111 + .../models/login_banner_get_response.py | 111 + .../flashblade/FB_2_14/models/logs_async.py | 168 + .../FB_2_14/models/logs_async_get_response.py | 123 + .../FB_2_14/models/logs_async_response.py | 111 + .../flashblade/FB_2_14/models/member.py | 117 + .../flashblade/FB_2_14/models/member_link.py | 123 + .../FB_2_14/models/multi_protocol.py | 117 + .../FB_2_14/models/multi_protocol_post.py | 117 + .../FB_2_14/models/network_access_policy.py | 153 + .../network_access_policy_get_response.py | 123 + .../models/network_access_policy_response.py | 111 + .../models/network_access_policy_rule.py | 153 + .../models/network_access_policy_rule_base.py | 147 + ...network_access_policy_rule_get_response.py | 123 + .../network_access_policy_rule_in_policy.py | 153 + .../models/network_access_policy_rule_post.py | 141 + .../network_access_policy_rule_post_base.py | 135 + .../network_access_policy_rule_response.py | 111 + .../FB_2_14/models/network_interface.py | 171 + .../models/network_interface_get_response.py | 123 + .../FB_2_14/models/network_interface_patch.py | 117 + .../FB_2_14/models/network_interface_ping.py | 129 + .../network_interface_ping_get_response.py | 123 + .../models/network_interface_ping_response.py | 111 + .../models/network_interface_response.py | 111 + .../FB_2_14/models/network_interface_trace.py | 129 + .../network_interface_trace_get_response.py | 123 + .../network_interface_trace_response.py | 111 + pypureclient/flashblade/FB_2_14/models/nfs.py | 129 + .../FB_2_14/models/nfs_export_policy.py | 153 + .../models/nfs_export_policy_get_response.py | 123 + .../FB_2_14/models/nfs_export_policy_post.py | 147 + .../models/nfs_export_policy_response.py | 111 + .../FB_2_14/models/nfs_export_policy_rule.py | 189 + .../models/nfs_export_policy_rule_base.py | 183 + .../nfs_export_policy_rule_get_response.py | 123 + .../nfs_export_policy_rule_in_policy.py | 189 + .../models/nfs_export_policy_rule_response.py | 111 + .../flashblade/FB_2_14/models/nfs_patch.py | 147 + .../FB_2_14/models/oauth_token_response.py | 129 + .../FB_2_14/models/object_backlog.py | 129 + .../FB_2_14/models/object_lock_config_base.py | 123 + .../models/object_lock_config_request_body.py | 129 + .../models/object_lock_config_response.py | 129 + .../FB_2_14/models/object_store_access_key.py | 135 + .../object_store_access_key_get_response.py | 123 + .../models/object_store_access_key_post.py | 117 + .../object_store_access_key_response.py | 111 + .../models/object_store_access_policy.py | 177 + .../object_store_access_policy_action.py | 117 + ...store_access_policy_action_get_response.py | 123 + ...ect_store_access_policy_action_response.py | 111 + ...object_store_access_policy_get_response.py | 123 + .../object_store_access_policy_patch.py | 111 + .../models/object_store_access_policy_post.py | 117 + .../object_store_access_policy_response.py | 111 + .../models/object_store_access_policy_rule.py | 141 + ...t_store_access_policy_rule_get_response.py | 123 + ...bject_store_access_policy_rule_response.py | 111 + .../FB_2_14/models/object_store_account.py | 159 + .../object_store_account_get_response.py | 129 + .../models/object_store_account_patch.py | 129 + .../models/object_store_account_post.py | 123 + .../models/object_store_account_response.py | 111 + ...object_store_remote_credential_get_resp.py | 123 + .../models/object_store_remote_credentials.py | 135 + .../object_store_remote_credentials_post.py | 117 + .../object_store_remote_credentials_resp.py | 111 + .../FB_2_14/models/object_store_user.py | 135 + .../models/object_store_user_get_response.py | 123 + .../models/object_store_user_response.py | 111 + .../models/object_store_virtual_host.py | 117 + .../object_store_virtual_host_get_response.py | 123 + .../object_store_virtual_host_response.py | 111 + .../flashblade/FB_2_14/models/page_info.py | 117 + .../flashblade/FB_2_14/models/permission.py | 117 + .../flashblade/FB_2_14/models/policy.py | 153 + .../flashblade/FB_2_14/models/policy_base.py | 141 + .../models/policy_base_get_response.py | 123 + .../FB_2_14/models/policy_base_renameable.py | 141 + .../FB_2_14/models/policy_base_response.py | 111 + .../models/policy_file_system_snapshot.py | 117 + ...olicy_file_system_snapshot_get_response.py | 123 + .../policy_file_system_snapshot_response.py | 111 + .../FB_2_14/models/policy_get_response.py | 123 + .../FB_2_14/models/policy_local_member.py | 117 + .../FB_2_14/models/policy_member.py | 117 + .../models/policy_member_get_response.py | 123 + .../FB_2_14/models/policy_member_response.py | 111 + .../models/policy_member_with_remote.py | 123 + .../policy_member_with_remote_get_response.py | 123 + .../policy_member_with_remote_response.py | 111 + .../flashblade/FB_2_14/models/policy_patch.py | 165 + .../FB_2_14/models/policy_response.py | 111 + .../flashblade/FB_2_14/models/policy_rule.py | 129 + .../FB_2_14/models/policy_rule_index.py | 111 + .../models/policy_rule_index_in_policy.py | 111 + .../models/policy_rule_object_access.py | 141 + .../policy_rule_object_access_bulk_manage.py | 135 + .../policy_rule_object_access_condition.py | 123 + .../models/policy_rule_object_access_post.py | 129 + .../FB_2_14/models/public_access_config.py | 117 + .../flashblade/FB_2_14/models/public_key.py | 138 + .../FB_2_14/models/public_key_get_response.py | 123 + .../FB_2_14/models/public_key_post.py | 114 + .../FB_2_14/models/public_key_response.py | 111 + .../FB_2_14/models/public_key_use.py | 123 + .../models/public_key_use_get_response.py | 123 + .../FB_2_14/models/public_key_use_response.py | 111 + .../FB_2_14/models/quota_setting.py | 129 + .../models/quota_setting_get_response.py | 123 + .../FB_2_14/models/quota_setting_response.py | 111 + .../FB_2_14/models/rapid_data_locking.py | 117 + .../models/rapid_data_locking_response.py | 111 + .../flashblade/FB_2_14/models/reference.py | 123 + .../FB_2_14/models/reference_writable.py | 123 + .../relationship_performance_replication.py | 135 + .../FB_2_14/models/replica_link_built_in.py | 129 + .../FB_2_14/models/replication_performance.py | 123 + .../flashblade/FB_2_14/models/resource.py | 117 + .../resource_performance_replication.py | 141 + ...ce_performance_replication_get_response.py | 129 + .../FB_2_14/models/resource_type.py | 105 + .../flashblade/FB_2_14/models/role.py | 123 + .../FB_2_14/models/role_get_response.py | 123 + .../flashblade/FB_2_14/models/session.py | 171 + .../FB_2_14/models/session_get_response.py | 123 + pypureclient/flashblade/FB_2_14/models/smb.py | 129 + .../FB_2_14/models/smb_client_policy.py | 153 + .../models/smb_client_policy_get_response.py | 123 + .../FB_2_14/models/smb_client_policy_post.py | 147 + .../models/smb_client_policy_response.py | 111 + .../FB_2_14/models/smb_client_policy_rule.py | 153 + .../models/smb_client_policy_rule_base.py | 147 + .../smb_client_policy_rule_get_response.py | 123 + .../smb_client_policy_rule_in_policy.py | 153 + .../models/smb_client_policy_rule_post.py | 141 + .../smb_client_policy_rule_post_base.py | 135 + .../smb_client_policy_rule_post_in_policy.py | 141 + .../models/smb_client_policy_rule_response.py | 111 + .../flashblade/FB_2_14/models/smb_post.py | 123 + .../FB_2_14/models/smb_share_policy.py | 147 + .../models/smb_share_policy_get_response.py | 123 + .../FB_2_14/models/smb_share_policy_post.py | 147 + .../models/smb_share_policy_response.py | 111 + .../FB_2_14/models/smb_share_policy_rule.py | 147 + .../smb_share_policy_rule_get_response.py | 123 + .../models/smb_share_policy_rule_post.py | 141 + .../models/smb_share_policy_rule_response.py | 111 + .../flashblade/FB_2_14/models/smtp.py | 129 + .../flashblade/FB_2_14/models/smtp_server.py | 129 + .../models/smtp_server_get_response.py | 123 + .../FB_2_14/models/smtp_server_response.py | 111 + .../flashblade/FB_2_14/models/snmp_agent.py | 144 + .../FB_2_14/models/snmp_agent_get_response.py | 123 + .../FB_2_14/models/snmp_agent_mib.py | 111 + .../FB_2_14/models/snmp_agent_mib_response.py | 111 + .../FB_2_14/models/snmp_agent_response.py | 111 + .../flashblade/FB_2_14/models/snmp_manager.py | 147 + .../models/snmp_manager_get_response.py | 123 + .../FB_2_14/models/snmp_manager_post.py | 135 + .../FB_2_14/models/snmp_manager_response.py | 111 + .../FB_2_14/models/snmp_manager_test.py | 129 + .../flashblade/FB_2_14/models/snmp_v2c.py | 114 + .../flashblade/FB_2_14/models/snmp_v3.py | 135 + .../flashblade/FB_2_14/models/snmp_v3_post.py | 143 + .../flashblade/FB_2_14/models/space.py | 176 + .../FB_2_14/models/space_extended.py | 144 + .../ssh_certificate_authority_policy.py | 153 + ...rtificate_authority_policy_get_response.py | 123 + .../ssh_certificate_authority_policy_post.py | 153 + ...h_certificate_authority_policy_response.py | 111 + .../flashblade/FB_2_14/models/subnet.py | 170 + .../FB_2_14/models/subnet_get_response.py | 123 + .../FB_2_14/models/subnet_response.py | 111 + .../flashblade/FB_2_14/models/support.py | 165 + .../FB_2_14/models/support_get_response.py | 123 + .../models/support_remote_assist_paths.py | 117 + .../FB_2_14/models/support_response.py | 111 + .../FB_2_14/models/syslog_server.py | 129 + .../models/syslog_server_get_response.py | 123 + .../FB_2_14/models/syslog_server_patch.py | 117 + .../FB_2_14/models/syslog_server_post.py | 117 + .../models/syslog_server_post_or_patch.py | 111 + .../FB_2_14/models/syslog_server_response.py | 111 + .../FB_2_14/models/syslog_server_settings.py | 129 + .../syslog_server_settings_get_response.py | 123 + .../models/syslog_server_settings_response.py | 111 + .../flashblade/FB_2_14/models/target.py | 141 + .../FB_2_14/models/target_get_response.py | 123 + .../flashblade/FB_2_14/models/target_post.py | 111 + .../FB_2_14/models/target_response.py | 111 + .../flashblade/FB_2_14/models/test_result.py | 159 + .../models/test_result_get_response.py | 111 + .../FB_2_14/models/test_result_response.py | 111 + .../flashblade/FB_2_14/models/throttle.py | 123 + .../flashblade/FB_2_14/models/time_window.py | 117 + .../flashblade/FB_2_14/models/time_zone.py | 111 + .../flashblade/FB_2_14/models/user.py | 117 + .../flashblade/FB_2_14/models/user_no_id.py | 111 + .../flashblade/FB_2_14/models/user_quota.py | 141 + .../FB_2_14/models/user_quota_get_response.py | 123 + .../FB_2_14/models/user_quota_patch.py | 105 + .../FB_2_14/models/user_quota_post.py | 119 + .../FB_2_14/models/user_quota_response.py | 111 + .../FB_2_14/models/verification_key.py | 123 + .../models/verification_key_get_response.py | 123 + .../FB_2_14/models/verification_key_patch.py | 111 + .../models/verification_key_response.py | 111 + .../flashblade/FB_2_14/models/version.py | 111 + pypureclient/flashblade/FB_2_14/rest.py | 331 + pypureclient/flashblade/__init__.py | 2 +- pypureclient/flashblade/client.py | 19 +- setup.py | 4 +- 515 files changed, 127929 insertions(+), 27 deletions(-) create mode 100644 docs/source/pypureclient.flashblade.FB_2_14.api.rst create mode 100644 docs/source/pypureclient.flashblade.FB_2_14.models.rst create mode 100644 docs/source/pypureclient.flashblade.FB_2_14.rst create mode 100644 pypureclient/flashblade/FB_2_14/__init__.py create mode 100644 pypureclient/flashblade/FB_2_14/api/__init__.py create mode 100644 pypureclient/flashblade/FB_2_14/api/active_directory_api.py create mode 100644 pypureclient/flashblade/FB_2_14/api/administrators_api.py create mode 100644 pypureclient/flashblade/FB_2_14/api/alert_watchers_api.py create mode 100644 pypureclient/flashblade/FB_2_14/api/alerts_api.py create mode 100644 pypureclient/flashblade/FB_2_14/api/api_clients_api.py create mode 100644 pypureclient/flashblade/FB_2_14/api/array_connections_api.py create mode 100644 pypureclient/flashblade/FB_2_14/api/arrays_api.py create mode 100644 pypureclient/flashblade/FB_2_14/api/audits_api.py create mode 100644 pypureclient/flashblade/FB_2_14/api/authorization_api.py create mode 100644 pypureclient/flashblade/FB_2_14/api/blades_api.py create mode 100644 pypureclient/flashblade/FB_2_14/api/bucket_replica_links_api.py create mode 100644 pypureclient/flashblade/FB_2_14/api/buckets_api.py create mode 100644 pypureclient/flashblade/FB_2_14/api/certificate_groups_api.py create mode 100644 pypureclient/flashblade/FB_2_14/api/certificates_api.py create mode 100644 pypureclient/flashblade/FB_2_14/api/clients_api.py create mode 100644 pypureclient/flashblade/FB_2_14/api/directory_services_api.py create mode 100644 pypureclient/flashblade/FB_2_14/api/dns_api.py create mode 100644 pypureclient/flashblade/FB_2_14/api/drives_api.py create mode 100644 pypureclient/flashblade/FB_2_14/api/file_system_replica_links_api.py create mode 100644 pypureclient/flashblade/FB_2_14/api/file_system_snapshots_api.py create mode 100644 pypureclient/flashblade/FB_2_14/api/file_systems_api.py create mode 100644 pypureclient/flashblade/FB_2_14/api/hardware_api.py create mode 100644 pypureclient/flashblade/FB_2_14/api/hardware_connectors_api.py create mode 100644 pypureclient/flashblade/FB_2_14/api/keytabs_api.py create mode 100644 pypureclient/flashblade/FB_2_14/api/kmip_api.py create mode 100644 pypureclient/flashblade/FB_2_14/api/lifecycle_rules_api.py create mode 100644 pypureclient/flashblade/FB_2_14/api/link_aggregation_groups_api.py create mode 100644 pypureclient/flashblade/FB_2_14/api/logs_api.py create mode 100644 pypureclient/flashblade/FB_2_14/api/network_interfaces_api.py create mode 100644 pypureclient/flashblade/FB_2_14/api/object_store_access_keys_api.py create mode 100644 pypureclient/flashblade/FB_2_14/api/object_store_accounts_api.py create mode 100644 pypureclient/flashblade/FB_2_14/api/object_store_remote_credentials_api.py create mode 100644 pypureclient/flashblade/FB_2_14/api/object_store_users_api.py create mode 100644 pypureclient/flashblade/FB_2_14/api/object_store_virtual_hosts_api.py create mode 100644 pypureclient/flashblade/FB_2_14/api/policies___audit_for_file_systems_api.py create mode 100644 pypureclient/flashblade/FB_2_14/api/policies___network_access_api.py create mode 100644 pypureclient/flashblade/FB_2_14/api/policies___nfs_api.py create mode 100644 pypureclient/flashblade/FB_2_14/api/policies___object_store_access_api.py create mode 100644 pypureclient/flashblade/FB_2_14/api/policies___smb_client_api.py create mode 100644 pypureclient/flashblade/FB_2_14/api/policies___smb_share_api.py create mode 100644 pypureclient/flashblade/FB_2_14/api/policies___snapshot_api.py create mode 100644 pypureclient/flashblade/FB_2_14/api/policies___ssh_certificate_authority_api.py create mode 100644 pypureclient/flashblade/FB_2_14/api/policies__all_api.py create mode 100644 pypureclient/flashblade/FB_2_14/api/public_keys_api.py create mode 100644 pypureclient/flashblade/FB_2_14/api/quotas_api.py create mode 100644 pypureclient/flashblade/FB_2_14/api/rdl_api.py create mode 100644 pypureclient/flashblade/FB_2_14/api/roles_api.py create mode 100644 pypureclient/flashblade/FB_2_14/api/sessions_api.py create mode 100644 pypureclient/flashblade/FB_2_14/api/smtp_api.py create mode 100644 pypureclient/flashblade/FB_2_14/api/snmp_agents_api.py create mode 100644 pypureclient/flashblade/FB_2_14/api/snmp_managers_api.py create mode 100644 pypureclient/flashblade/FB_2_14/api/subnets_api.py create mode 100644 pypureclient/flashblade/FB_2_14/api/support_api.py create mode 100644 pypureclient/flashblade/FB_2_14/api/syslog_api.py create mode 100644 pypureclient/flashblade/FB_2_14/api/targets_api.py create mode 100644 pypureclient/flashblade/FB_2_14/api/usage_api.py create mode 100644 pypureclient/flashblade/FB_2_14/api/verification_keys_api.py create mode 100644 pypureclient/flashblade/FB_2_14/api_client.py create mode 100644 pypureclient/flashblade/FB_2_14/client.py create mode 100644 pypureclient/flashblade/FB_2_14/configuration.py create mode 100644 pypureclient/flashblade/FB_2_14/models/__init__.py create mode 100644 pypureclient/flashblade/FB_2_14/models/active_directory.py create mode 100644 pypureclient/flashblade/FB_2_14/models/active_directory_directory_servers.py create mode 100644 pypureclient/flashblade/FB_2_14/models/active_directory_get_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/active_directory_patch.py create mode 100644 pypureclient/flashblade/FB_2_14/models/active_directory_post.py create mode 100644 pypureclient/flashblade/FB_2_14/models/active_directory_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/admin.py create mode 100644 pypureclient/flashblade/FB_2_14/models/admin_api_token.py create mode 100644 pypureclient/flashblade/FB_2_14/models/admin_api_token_get_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/admin_api_token_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/admin_cache.py create mode 100644 pypureclient/flashblade/FB_2_14/models/admin_cache_get_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/admin_get_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/admin_patch.py create mode 100644 pypureclient/flashblade/FB_2_14/models/admin_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/admin_setting.py create mode 100644 pypureclient/flashblade/FB_2_14/models/admin_settings_get_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/admin_settings_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/alert.py create mode 100644 pypureclient/flashblade/FB_2_14/models/alert_get_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/alert_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/alert_watcher.py create mode 100644 pypureclient/flashblade/FB_2_14/models/alert_watcher_get_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/alert_watcher_post.py create mode 100644 pypureclient/flashblade/FB_2_14/models/alert_watcher_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/api_client.py create mode 100644 pypureclient/flashblade/FB_2_14/models/api_clients_post.py create mode 100644 pypureclient/flashblade/FB_2_14/models/api_clients_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/api_token.py create mode 100644 pypureclient/flashblade/FB_2_14/models/api_version.py create mode 100644 pypureclient/flashblade/FB_2_14/models/array.py create mode 100644 pypureclient/flashblade/FB_2_14/models/array_connection.py create mode 100644 pypureclient/flashblade/FB_2_14/models/array_connection_get_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/array_connection_key.py create mode 100644 pypureclient/flashblade/FB_2_14/models/array_connection_key_get_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/array_connection_key_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/array_connection_path.py create mode 100644 pypureclient/flashblade/FB_2_14/models/array_connection_path_get_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/array_connection_post.py create mode 100644 pypureclient/flashblade/FB_2_14/models/array_connection_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/array_encryption.py create mode 100644 pypureclient/flashblade/FB_2_14/models/array_encryption_data_at_rest.py create mode 100644 pypureclient/flashblade/FB_2_14/models/array_eradication_config.py create mode 100644 pypureclient/flashblade/FB_2_14/models/array_factory_reset_token.py create mode 100644 pypureclient/flashblade/FB_2_14/models/array_factory_reset_token_get_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/array_factory_reset_token_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/array_get_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/array_http_specific_performance.py create mode 100644 pypureclient/flashblade/FB_2_14/models/array_http_specific_performance_get.py create mode 100644 pypureclient/flashblade/FB_2_14/models/array_nfs_specific_performance.py create mode 100644 pypureclient/flashblade/FB_2_14/models/array_nfs_specific_performance_get.py create mode 100644 pypureclient/flashblade/FB_2_14/models/array_performance.py create mode 100644 pypureclient/flashblade/FB_2_14/models/array_performance_get_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/array_performance_replication_get_resp.py create mode 100644 pypureclient/flashblade/FB_2_14/models/array_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/array_s3_specific_performance.py create mode 100644 pypureclient/flashblade/FB_2_14/models/array_s3_specific_performance_get_resp.py create mode 100644 pypureclient/flashblade/FB_2_14/models/array_space.py create mode 100644 pypureclient/flashblade/FB_2_14/models/array_space_get_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/arrays_supported_time_zones_get_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/audit.py create mode 100644 pypureclient/flashblade/FB_2_14/models/audit_file_systems_policies.py create mode 100644 pypureclient/flashblade/FB_2_14/models/audit_file_systems_policies_get_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/audit_file_systems_policies_members_get_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/audit_file_systems_policies_members_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/audit_file_systems_policies_patch.py create mode 100644 pypureclient/flashblade/FB_2_14/models/audit_file_systems_policies_post.py create mode 100644 pypureclient/flashblade/FB_2_14/models/audit_file_systems_policies_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/audit_file_systems_policy.py create mode 100644 pypureclient/flashblade/FB_2_14/models/audit_get_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/audit_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/blade.py create mode 100644 pypureclient/flashblade/FB_2_14/models/blade_get_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/bucket.py create mode 100644 pypureclient/flashblade/FB_2_14/models/bucket_access_policy.py create mode 100644 pypureclient/flashblade/FB_2_14/models/bucket_access_policy_get_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/bucket_access_policy_post.py create mode 100644 pypureclient/flashblade/FB_2_14/models/bucket_access_policy_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/bucket_access_policy_rule.py create mode 100644 pypureclient/flashblade/FB_2_14/models/bucket_access_policy_rule_bulk_manage.py create mode 100644 pypureclient/flashblade/FB_2_14/models/bucket_access_policy_rule_get_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/bucket_access_policy_rule_post.py create mode 100644 pypureclient/flashblade/FB_2_14/models/bucket_access_policy_rule_principal.py create mode 100644 pypureclient/flashblade/FB_2_14/models/bucket_access_policy_rule_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/bucket_defaults.py create mode 100644 pypureclient/flashblade/FB_2_14/models/bucket_defaults_readonly.py create mode 100644 pypureclient/flashblade/FB_2_14/models/bucket_eradication_config.py create mode 100644 pypureclient/flashblade/FB_2_14/models/bucket_get_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/bucket_patch.py create mode 100644 pypureclient/flashblade/FB_2_14/models/bucket_performance.py create mode 100644 pypureclient/flashblade/FB_2_14/models/bucket_performance_get_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/bucket_post.py create mode 100644 pypureclient/flashblade/FB_2_14/models/bucket_replica_link.py create mode 100644 pypureclient/flashblade/FB_2_14/models/bucket_replica_link_get_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/bucket_replica_link_post.py create mode 100644 pypureclient/flashblade/FB_2_14/models/bucket_replica_link_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/bucket_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/bucket_s3_specific_performance.py create mode 100644 pypureclient/flashblade/FB_2_14/models/bucket_s3_specific_performance_get_resp.py create mode 100644 pypureclient/flashblade/FB_2_14/models/built_in.py create mode 100644 pypureclient/flashblade/FB_2_14/models/built_in_no_id.py create mode 100644 pypureclient/flashblade/FB_2_14/models/built_in_relationship.py create mode 100644 pypureclient/flashblade/FB_2_14/models/certificate.py create mode 100644 pypureclient/flashblade/FB_2_14/models/certificate_certificate_group_get_resp.py create mode 100644 pypureclient/flashblade/FB_2_14/models/certificate_certificate_group_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/certificate_get_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/certificate_group.py create mode 100644 pypureclient/flashblade/FB_2_14/models/certificate_group_certificate_get_resp.py create mode 100644 pypureclient/flashblade/FB_2_14/models/certificate_group_certificate_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/certificate_group_get_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/certificate_group_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/certificate_group_use.py create mode 100644 pypureclient/flashblade/FB_2_14/models/certificate_group_use_get_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/certificate_patch.py create mode 100644 pypureclient/flashblade/FB_2_14/models/certificate_post.py create mode 100644 pypureclient/flashblade/FB_2_14/models/certificate_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/certificate_use.py create mode 100644 pypureclient/flashblade/FB_2_14/models/certificate_use_get_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/client_performance.py create mode 100644 pypureclient/flashblade/FB_2_14/models/client_performance_get_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/connection_relationship_performance_replication.py create mode 100644 pypureclient/flashblade/FB_2_14/models/connection_relationship_performance_replication_get_resp.py create mode 100644 pypureclient/flashblade/FB_2_14/models/continuous_replication_performance.py create mode 100644 pypureclient/flashblade/FB_2_14/models/cross_origin_resource_sharing_policy.py create mode 100644 pypureclient/flashblade/FB_2_14/models/cross_origin_resource_sharing_policy_get_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/cross_origin_resource_sharing_policy_patch.py create mode 100644 pypureclient/flashblade/FB_2_14/models/cross_origin_resource_sharing_policy_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/cross_origin_resource_sharing_policy_rule.py create mode 100644 pypureclient/flashblade/FB_2_14/models/cross_origin_resource_sharing_policy_rule_bulk_manage.py create mode 100644 pypureclient/flashblade/FB_2_14/models/cross_origin_resource_sharing_policy_rule_get_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/cross_origin_resource_sharing_policy_rule_post.py create mode 100644 pypureclient/flashblade/FB_2_14/models/cross_origin_resource_sharing_policy_rule_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/direction.py create mode 100644 pypureclient/flashblade/FB_2_14/models/directory_service.py create mode 100644 pypureclient/flashblade/FB_2_14/models/directory_service_get_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/directory_service_management.py create mode 100644 pypureclient/flashblade/FB_2_14/models/directory_service_nfs.py create mode 100644 pypureclient/flashblade/FB_2_14/models/directory_service_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/directory_service_role.py create mode 100644 pypureclient/flashblade/FB_2_14/models/directory_service_roles_get_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/directory_service_roles_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/directory_service_smb.py create mode 100644 pypureclient/flashblade/FB_2_14/models/dns.py create mode 100644 pypureclient/flashblade/FB_2_14/models/dns_get_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/dns_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/drive.py create mode 100644 pypureclient/flashblade/FB_2_14/models/drive_get_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/eula.py create mode 100644 pypureclient/flashblade/FB_2_14/models/eula_get_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/eula_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/eula_signature.py create mode 100644 pypureclient/flashblade/FB_2_14/models/file_info.py create mode 100644 pypureclient/flashblade/FB_2_14/models/file_lock.py create mode 100644 pypureclient/flashblade/FB_2_14/models/file_lock_get_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/file_lock_nlm_reclamation_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/file_lock_range.py create mode 100644 pypureclient/flashblade/FB_2_14/models/file_lock_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/file_session.py create mode 100644 pypureclient/flashblade/FB_2_14/models/file_session_get_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/file_session_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/file_system.py create mode 100644 pypureclient/flashblade/FB_2_14/models/file_system_client.py create mode 100644 pypureclient/flashblade/FB_2_14/models/file_system_clients_get_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/file_system_clients_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/file_system_get_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/file_system_group_performance.py create mode 100644 pypureclient/flashblade/FB_2_14/models/file_system_groups_performance_get_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/file_system_lock_nlm_reclamation.py create mode 100644 pypureclient/flashblade/FB_2_14/models/file_system_patch.py create mode 100644 pypureclient/flashblade/FB_2_14/models/file_system_performance.py create mode 100644 pypureclient/flashblade/FB_2_14/models/file_system_performance_get_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/file_system_post.py create mode 100644 pypureclient/flashblade/FB_2_14/models/file_system_replica_link.py create mode 100644 pypureclient/flashblade/FB_2_14/models/file_system_replica_link_get_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/file_system_replica_link_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/file_system_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/file_system_snapshot.py create mode 100644 pypureclient/flashblade/FB_2_14/models/file_system_snapshot_get_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/file_system_snapshot_get_transfer_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/file_system_snapshot_post.py create mode 100644 pypureclient/flashblade/FB_2_14/models/file_system_snapshot_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/file_system_snapshot_transfer.py create mode 100644 pypureclient/flashblade/FB_2_14/models/file_system_snapshot_transfer_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/file_system_user_performance.py create mode 100644 pypureclient/flashblade/FB_2_14/models/file_system_users_performance_get_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/fixed_location_reference.py create mode 100644 pypureclient/flashblade/FB_2_14/models/fixed_reference.py create mode 100644 pypureclient/flashblade/FB_2_14/models/fixed_reference_name_only.py create mode 100644 pypureclient/flashblade/FB_2_14/models/fixed_reference_no_id.py create mode 100644 pypureclient/flashblade/FB_2_14/models/fixed_reference_no_resource_type.py create mode 100644 pypureclient/flashblade/FB_2_14/models/fixed_reference_with_remote.py create mode 100644 pypureclient/flashblade/FB_2_14/models/group.py create mode 100644 pypureclient/flashblade/FB_2_14/models/group_quota.py create mode 100644 pypureclient/flashblade/FB_2_14/models/group_quota_get_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/group_quota_patch.py create mode 100644 pypureclient/flashblade/FB_2_14/models/group_quota_post.py create mode 100644 pypureclient/flashblade/FB_2_14/models/group_quota_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/hardware.py create mode 100644 pypureclient/flashblade/FB_2_14/models/hardware_connector.py create mode 100644 pypureclient/flashblade/FB_2_14/models/hardware_connector_get_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/hardware_connector_performance.py create mode 100644 pypureclient/flashblade/FB_2_14/models/hardware_connector_performance_get_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/hardware_connector_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/hardware_get_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/hardware_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/http.py create mode 100644 pypureclient/flashblade/FB_2_14/models/inline_response400.py create mode 100644 pypureclient/flashblade/FB_2_14/models/inline_response401.py create mode 100644 pypureclient/flashblade/FB_2_14/models/keytab.py create mode 100644 pypureclient/flashblade/FB_2_14/models/keytab_file_base64.py create mode 100644 pypureclient/flashblade/FB_2_14/models/keytab_file_binary.py create mode 100644 pypureclient/flashblade/FB_2_14/models/keytab_file_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/keytab_get_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/keytab_post.py create mode 100644 pypureclient/flashblade/FB_2_14/models/keytab_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/kmip_server.py create mode 100644 pypureclient/flashblade/FB_2_14/models/kmip_server_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/lifecycle_rule.py create mode 100644 pypureclient/flashblade/FB_2_14/models/lifecycle_rule_config_extension.py create mode 100644 pypureclient/flashblade/FB_2_14/models/lifecycle_rule_get_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/lifecycle_rule_patch.py create mode 100644 pypureclient/flashblade/FB_2_14/models/lifecycle_rule_post.py create mode 100644 pypureclient/flashblade/FB_2_14/models/lifecycle_rule_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/link_aggregation_group.py create mode 100644 pypureclient/flashblade/FB_2_14/models/link_aggregation_group_get_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/link_aggregation_group_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/linkaggregationgroup.py create mode 100644 pypureclient/flashblade/FB_2_14/models/location_reference.py create mode 100644 pypureclient/flashblade/FB_2_14/models/login.py create mode 100644 pypureclient/flashblade/FB_2_14/models/login_banner_get_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/logs_async.py create mode 100644 pypureclient/flashblade/FB_2_14/models/logs_async_get_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/logs_async_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/member.py create mode 100644 pypureclient/flashblade/FB_2_14/models/member_link.py create mode 100644 pypureclient/flashblade/FB_2_14/models/multi_protocol.py create mode 100644 pypureclient/flashblade/FB_2_14/models/multi_protocol_post.py create mode 100644 pypureclient/flashblade/FB_2_14/models/network_access_policy.py create mode 100644 pypureclient/flashblade/FB_2_14/models/network_access_policy_get_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/network_access_policy_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/network_access_policy_rule.py create mode 100644 pypureclient/flashblade/FB_2_14/models/network_access_policy_rule_base.py create mode 100644 pypureclient/flashblade/FB_2_14/models/network_access_policy_rule_get_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/network_access_policy_rule_in_policy.py create mode 100644 pypureclient/flashblade/FB_2_14/models/network_access_policy_rule_post.py create mode 100644 pypureclient/flashblade/FB_2_14/models/network_access_policy_rule_post_base.py create mode 100644 pypureclient/flashblade/FB_2_14/models/network_access_policy_rule_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/network_interface.py create mode 100644 pypureclient/flashblade/FB_2_14/models/network_interface_get_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/network_interface_patch.py create mode 100644 pypureclient/flashblade/FB_2_14/models/network_interface_ping.py create mode 100644 pypureclient/flashblade/FB_2_14/models/network_interface_ping_get_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/network_interface_ping_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/network_interface_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/network_interface_trace.py create mode 100644 pypureclient/flashblade/FB_2_14/models/network_interface_trace_get_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/network_interface_trace_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/nfs.py create mode 100644 pypureclient/flashblade/FB_2_14/models/nfs_export_policy.py create mode 100644 pypureclient/flashblade/FB_2_14/models/nfs_export_policy_get_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/nfs_export_policy_post.py create mode 100644 pypureclient/flashblade/FB_2_14/models/nfs_export_policy_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/nfs_export_policy_rule.py create mode 100644 pypureclient/flashblade/FB_2_14/models/nfs_export_policy_rule_base.py create mode 100644 pypureclient/flashblade/FB_2_14/models/nfs_export_policy_rule_get_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/nfs_export_policy_rule_in_policy.py create mode 100644 pypureclient/flashblade/FB_2_14/models/nfs_export_policy_rule_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/nfs_patch.py create mode 100644 pypureclient/flashblade/FB_2_14/models/oauth_token_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/object_backlog.py create mode 100644 pypureclient/flashblade/FB_2_14/models/object_lock_config_base.py create mode 100644 pypureclient/flashblade/FB_2_14/models/object_lock_config_request_body.py create mode 100644 pypureclient/flashblade/FB_2_14/models/object_lock_config_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/object_store_access_key.py create mode 100644 pypureclient/flashblade/FB_2_14/models/object_store_access_key_get_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/object_store_access_key_post.py create mode 100644 pypureclient/flashblade/FB_2_14/models/object_store_access_key_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/object_store_access_policy.py create mode 100644 pypureclient/flashblade/FB_2_14/models/object_store_access_policy_action.py create mode 100644 pypureclient/flashblade/FB_2_14/models/object_store_access_policy_action_get_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/object_store_access_policy_action_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/object_store_access_policy_get_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/object_store_access_policy_patch.py create mode 100644 pypureclient/flashblade/FB_2_14/models/object_store_access_policy_post.py create mode 100644 pypureclient/flashblade/FB_2_14/models/object_store_access_policy_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/object_store_access_policy_rule.py create mode 100644 pypureclient/flashblade/FB_2_14/models/object_store_access_policy_rule_get_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/object_store_access_policy_rule_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/object_store_account.py create mode 100644 pypureclient/flashblade/FB_2_14/models/object_store_account_get_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/object_store_account_patch.py create mode 100644 pypureclient/flashblade/FB_2_14/models/object_store_account_post.py create mode 100644 pypureclient/flashblade/FB_2_14/models/object_store_account_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/object_store_remote_credential_get_resp.py create mode 100644 pypureclient/flashblade/FB_2_14/models/object_store_remote_credentials.py create mode 100644 pypureclient/flashblade/FB_2_14/models/object_store_remote_credentials_post.py create mode 100644 pypureclient/flashblade/FB_2_14/models/object_store_remote_credentials_resp.py create mode 100644 pypureclient/flashblade/FB_2_14/models/object_store_user.py create mode 100644 pypureclient/flashblade/FB_2_14/models/object_store_user_get_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/object_store_user_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/object_store_virtual_host.py create mode 100644 pypureclient/flashblade/FB_2_14/models/object_store_virtual_host_get_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/object_store_virtual_host_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/page_info.py create mode 100644 pypureclient/flashblade/FB_2_14/models/permission.py create mode 100644 pypureclient/flashblade/FB_2_14/models/policy.py create mode 100644 pypureclient/flashblade/FB_2_14/models/policy_base.py create mode 100644 pypureclient/flashblade/FB_2_14/models/policy_base_get_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/policy_base_renameable.py create mode 100644 pypureclient/flashblade/FB_2_14/models/policy_base_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/policy_file_system_snapshot.py create mode 100644 pypureclient/flashblade/FB_2_14/models/policy_file_system_snapshot_get_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/policy_file_system_snapshot_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/policy_get_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/policy_local_member.py create mode 100644 pypureclient/flashblade/FB_2_14/models/policy_member.py create mode 100644 pypureclient/flashblade/FB_2_14/models/policy_member_get_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/policy_member_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/policy_member_with_remote.py create mode 100644 pypureclient/flashblade/FB_2_14/models/policy_member_with_remote_get_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/policy_member_with_remote_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/policy_patch.py create mode 100644 pypureclient/flashblade/FB_2_14/models/policy_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/policy_rule.py create mode 100644 pypureclient/flashblade/FB_2_14/models/policy_rule_index.py create mode 100644 pypureclient/flashblade/FB_2_14/models/policy_rule_index_in_policy.py create mode 100644 pypureclient/flashblade/FB_2_14/models/policy_rule_object_access.py create mode 100644 pypureclient/flashblade/FB_2_14/models/policy_rule_object_access_bulk_manage.py create mode 100644 pypureclient/flashblade/FB_2_14/models/policy_rule_object_access_condition.py create mode 100644 pypureclient/flashblade/FB_2_14/models/policy_rule_object_access_post.py create mode 100644 pypureclient/flashblade/FB_2_14/models/public_access_config.py create mode 100644 pypureclient/flashblade/FB_2_14/models/public_key.py create mode 100644 pypureclient/flashblade/FB_2_14/models/public_key_get_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/public_key_post.py create mode 100644 pypureclient/flashblade/FB_2_14/models/public_key_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/public_key_use.py create mode 100644 pypureclient/flashblade/FB_2_14/models/public_key_use_get_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/public_key_use_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/quota_setting.py create mode 100644 pypureclient/flashblade/FB_2_14/models/quota_setting_get_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/quota_setting_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/rapid_data_locking.py create mode 100644 pypureclient/flashblade/FB_2_14/models/rapid_data_locking_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/reference.py create mode 100644 pypureclient/flashblade/FB_2_14/models/reference_writable.py create mode 100644 pypureclient/flashblade/FB_2_14/models/relationship_performance_replication.py create mode 100644 pypureclient/flashblade/FB_2_14/models/replica_link_built_in.py create mode 100644 pypureclient/flashblade/FB_2_14/models/replication_performance.py create mode 100644 pypureclient/flashblade/FB_2_14/models/resource.py create mode 100644 pypureclient/flashblade/FB_2_14/models/resource_performance_replication.py create mode 100644 pypureclient/flashblade/FB_2_14/models/resource_performance_replication_get_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/resource_type.py create mode 100644 pypureclient/flashblade/FB_2_14/models/role.py create mode 100644 pypureclient/flashblade/FB_2_14/models/role_get_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/session.py create mode 100644 pypureclient/flashblade/FB_2_14/models/session_get_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/smb.py create mode 100644 pypureclient/flashblade/FB_2_14/models/smb_client_policy.py create mode 100644 pypureclient/flashblade/FB_2_14/models/smb_client_policy_get_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/smb_client_policy_post.py create mode 100644 pypureclient/flashblade/FB_2_14/models/smb_client_policy_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/smb_client_policy_rule.py create mode 100644 pypureclient/flashblade/FB_2_14/models/smb_client_policy_rule_base.py create mode 100644 pypureclient/flashblade/FB_2_14/models/smb_client_policy_rule_get_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/smb_client_policy_rule_in_policy.py create mode 100644 pypureclient/flashblade/FB_2_14/models/smb_client_policy_rule_post.py create mode 100644 pypureclient/flashblade/FB_2_14/models/smb_client_policy_rule_post_base.py create mode 100644 pypureclient/flashblade/FB_2_14/models/smb_client_policy_rule_post_in_policy.py create mode 100644 pypureclient/flashblade/FB_2_14/models/smb_client_policy_rule_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/smb_post.py create mode 100644 pypureclient/flashblade/FB_2_14/models/smb_share_policy.py create mode 100644 pypureclient/flashblade/FB_2_14/models/smb_share_policy_get_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/smb_share_policy_post.py create mode 100644 pypureclient/flashblade/FB_2_14/models/smb_share_policy_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/smb_share_policy_rule.py create mode 100644 pypureclient/flashblade/FB_2_14/models/smb_share_policy_rule_get_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/smb_share_policy_rule_post.py create mode 100644 pypureclient/flashblade/FB_2_14/models/smb_share_policy_rule_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/smtp.py create mode 100644 pypureclient/flashblade/FB_2_14/models/smtp_server.py create mode 100644 pypureclient/flashblade/FB_2_14/models/smtp_server_get_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/smtp_server_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/snmp_agent.py create mode 100644 pypureclient/flashblade/FB_2_14/models/snmp_agent_get_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/snmp_agent_mib.py create mode 100644 pypureclient/flashblade/FB_2_14/models/snmp_agent_mib_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/snmp_agent_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/snmp_manager.py create mode 100644 pypureclient/flashblade/FB_2_14/models/snmp_manager_get_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/snmp_manager_post.py create mode 100644 pypureclient/flashblade/FB_2_14/models/snmp_manager_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/snmp_manager_test.py create mode 100644 pypureclient/flashblade/FB_2_14/models/snmp_v2c.py create mode 100644 pypureclient/flashblade/FB_2_14/models/snmp_v3.py create mode 100644 pypureclient/flashblade/FB_2_14/models/snmp_v3_post.py create mode 100644 pypureclient/flashblade/FB_2_14/models/space.py create mode 100644 pypureclient/flashblade/FB_2_14/models/space_extended.py create mode 100644 pypureclient/flashblade/FB_2_14/models/ssh_certificate_authority_policy.py create mode 100644 pypureclient/flashblade/FB_2_14/models/ssh_certificate_authority_policy_get_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/ssh_certificate_authority_policy_post.py create mode 100644 pypureclient/flashblade/FB_2_14/models/ssh_certificate_authority_policy_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/subnet.py create mode 100644 pypureclient/flashblade/FB_2_14/models/subnet_get_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/subnet_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/support.py create mode 100644 pypureclient/flashblade/FB_2_14/models/support_get_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/support_remote_assist_paths.py create mode 100644 pypureclient/flashblade/FB_2_14/models/support_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/syslog_server.py create mode 100644 pypureclient/flashblade/FB_2_14/models/syslog_server_get_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/syslog_server_patch.py create mode 100644 pypureclient/flashblade/FB_2_14/models/syslog_server_post.py create mode 100644 pypureclient/flashblade/FB_2_14/models/syslog_server_post_or_patch.py create mode 100644 pypureclient/flashblade/FB_2_14/models/syslog_server_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/syslog_server_settings.py create mode 100644 pypureclient/flashblade/FB_2_14/models/syslog_server_settings_get_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/syslog_server_settings_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/target.py create mode 100644 pypureclient/flashblade/FB_2_14/models/target_get_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/target_post.py create mode 100644 pypureclient/flashblade/FB_2_14/models/target_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/test_result.py create mode 100644 pypureclient/flashblade/FB_2_14/models/test_result_get_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/test_result_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/throttle.py create mode 100644 pypureclient/flashblade/FB_2_14/models/time_window.py create mode 100644 pypureclient/flashblade/FB_2_14/models/time_zone.py create mode 100644 pypureclient/flashblade/FB_2_14/models/user.py create mode 100644 pypureclient/flashblade/FB_2_14/models/user_no_id.py create mode 100644 pypureclient/flashblade/FB_2_14/models/user_quota.py create mode 100644 pypureclient/flashblade/FB_2_14/models/user_quota_get_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/user_quota_patch.py create mode 100644 pypureclient/flashblade/FB_2_14/models/user_quota_post.py create mode 100644 pypureclient/flashblade/FB_2_14/models/user_quota_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/verification_key.py create mode 100644 pypureclient/flashblade/FB_2_14/models/verification_key_get_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/verification_key_patch.py create mode 100644 pypureclient/flashblade/FB_2_14/models/verification_key_response.py create mode 100644 pypureclient/flashblade/FB_2_14/models/version.py create mode 100644 pypureclient/flashblade/FB_2_14/rest.py diff --git a/docs/changelog.rst b/docs/changelog.rst index 84b48f479..54f8dd57d 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -6,6 +6,7 @@ A log of changes by version and date. ======= ========== ===== Version Date Notes ======= ========== ===== +1.52.0 06/17/2024 Added FlashBlade 2.14 client 1.51.0 05/28/2024 Added FlashArray 2.33 client 1.50.0 04/23/2024 Added FlashArray 2.32 client 1.49.0 03/23/2024 Added FlashArray 2.31 client diff --git a/docs/conf.py b/docs/conf.py index 301046fa8..fb95ee0a9 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -27,9 +27,9 @@ author = u'Pure Storage, Inc.' # The short X.Y version -version = u'1.51' +version = u'1.52' # The full version, including alpha/beta/rc tags -release = u'1.51.0' +release = u'1.52.0' # -- General configuration --------------------------------------------------- diff --git a/docs/fb_reference.rst b/docs/fb_reference.rst index 7acb8fa2b..4f2a82ba4 100644 --- a/docs/fb_reference.rst +++ b/docs/fb_reference.rst @@ -87,6 +87,11 @@ FlashBlade REST 2.13 Client ~~~~~~~~~~~~~~~~~~~~~~~~~~ .. autoclass:: pypureclient.flashblade.FB_2_13.client.Client + +FlashBlade REST 2.14 Client +~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. autoclass:: pypureclient.flashblade.FB_2_14.client.Client :members: @@ -346,6 +351,30 @@ Audit .. autoclass:: pypureclient.flashblade.Audit :members: +AuditFileSystemsPolicies +~~~~~~~~~~~~~~~~~~~~~~~~ + +.. autoclass:: pypureclient.flashblade.AuditFileSystemsPolicies + :members: + +AuditFileSystemsPoliciesPatch +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. autoclass:: pypureclient.flashblade.AuditFileSystemsPoliciesPatch + :members: + +AuditFileSystemsPoliciesPost +~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. autoclass:: pypureclient.flashblade.AuditFileSystemsPoliciesPost + :members: + +AuditFileSystemsPolicy +~~~~~~~~~~~~~~~~~~~~~~ + +.. autoclass:: pypureclient.flashblade.AuditFileSystemsPolicy + :members: + Blade ~~~~~ @@ -1246,6 +1275,24 @@ PublicAccessConfig .. autoclass:: pypureclient.flashblade.PublicAccessConfig :members: +PublicKey +~~~~~~~~~ + +.. autoclass:: pypureclient.flashblade.PublicKey + :members: + +PublicKeyPost +~~~~~~~~~~~~~ + +.. autoclass:: pypureclient.flashblade.PublicKeyPost + :members: + +PublicKeyUse +~~~~~~~~~~~~ + +.. autoclass:: pypureclient.flashblade.PublicKeyUse + :members: + QuotaSetting ~~~~~~~~~~~~ @@ -1312,12 +1359,6 @@ Role .. autoclass:: pypureclient.flashblade.Role :members: -SMTP -~~~~ - -.. autoclass:: pypureclient.flashblade.SMTP - :members: - Session ~~~~~~~ @@ -1408,6 +1449,12 @@ SmbSharePolicyRulePost .. autoclass:: pypureclient.flashblade.SmbSharePolicyRulePost :members: +Smtp +~~~~ + +.. autoclass:: pypureclient.flashblade.Smtp + :members: + SmtpServer ~~~~~~~~~~ @@ -1474,6 +1521,18 @@ SpaceExtended .. autoclass:: pypureclient.flashblade.SpaceExtended :members: +SshCertificateAuthorityPolicy +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. autoclass:: pypureclient.flashblade.SshCertificateAuthorityPolicy + :members: + +SshCertificateAuthorityPolicyPost +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. autoclass:: pypureclient.flashblade.SshCertificateAuthorityPolicyPost + :members: + Subnet ~~~~~~ @@ -1498,6 +1557,18 @@ SyslogServer .. autoclass:: pypureclient.flashblade.SyslogServer :members: +SyslogServerPatch +~~~~~~~~~~~~~~~~~ + +.. autoclass:: pypureclient.flashblade.SyslogServerPatch + :members: + +SyslogServerPost +~~~~~~~~~~~~~~~~ + +.. autoclass:: pypureclient.flashblade.SyslogServerPost + :members: + SyslogServerPostOrPatch ~~~~~~~~~~~~~~~~~~~~~~~ @@ -2344,16 +2415,28 @@ patch_directory_services .. literalinclude:: source/examples/FB2.0/patch_directory_services.py :language: python +delete_directory_services_roles +''''''''''''''''''''''''''''''' + +.. literalinclude:: source/examples/FB2.14/delete_directory_services_roles.py + :language: python + get_directory_services_roles '''''''''''''''''''''''''''' -.. literalinclude:: source/examples/FB2.0/get_directory_services_roles.py +.. literalinclude:: source/examples/FB2.14/get_directory_services_roles.py :language: python patch_directory_services_roles '''''''''''''''''''''''''''''' -.. literalinclude:: source/examples/FB2.0/patch_directory_services_roles.py +.. literalinclude:: source/examples/FB2.14/patch_directory_services_roles.py + :language: python + +post_directory_services_roles +''''''''''''''''''''''''''''' + +.. literalinclude:: source/examples/FB2.14/post_directory_services_roles.py :language: python get_directory_services_test @@ -2501,6 +2584,24 @@ File Systems The following examples assume that ``client`` is an instantiated ``flashblade.Client`` object as shown in :ref:`Instantiating a Client`. +delete_file_systems_audit_policies +'''''''''''''''''''''''''''''''''' + +.. literalinclude:: source/examples/FB2.14/delete_file_systems_audit_policies.py + :language: python + +get_file_systems_audit_policies +''''''''''''''''''''''''''''''' + +.. literalinclude:: source/examples/FB2.14/get_file_systems_audit_policies.py + :language: python + +post_file_systems_audit_policies +'''''''''''''''''''''''''''''''' + +.. literalinclude:: source/examples/FB2.14/post_file_systems_audit_policies.py + :language: python + delete_file_systems ''''''''''''''''''' @@ -2992,6 +3093,53 @@ post_object_store_virtual_hosts .. literalinclude:: source/examples/FB2.0/post_object_store_virtual_hosts.py :language: python +Policies Audit For File Systems +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The following examples assume that ``client`` is an instantiated ``flashblade.Client`` object as shown in :ref:`Instantiating a Client`. + +delete_audit_file_systems_policies +'''''''''''''''''''''''''''''''''' + +.. literalinclude:: source/examples/FB2.14/delete_audit_file_systems_policies.py + :language: python + +get_audit_file_systems_policies +''''''''''''''''''''''''''''''' + +.. literalinclude:: source/examples/FB2.14/get_audit_file_systems_policies.py + :language: python + +delete_audit_file_systems_policies_members +'''''''''''''''''''''''''''''''''''''''''' + +.. literalinclude:: source/examples/FB2.14/delete_audit_file_systems_policies_members.py + :language: python + +get_audit_file_systems_policies_members +''''''''''''''''''''''''''''''''''''''' + +.. literalinclude:: source/examples/FB2.14/get_audit_file_systems_policies_members.py + :language: python + +post_audit_file_systems_policies_members +'''''''''''''''''''''''''''''''''''''''' + +.. literalinclude:: source/examples/FB2.14/post_audit_file_systems_policies_members.py + :language: python + +patch_audit_file_systems_policies +''''''''''''''''''''''''''''''''' + +.. literalinclude:: source/examples/FB2.14/patch_audit_file_systems_policies.py + :language: python + +post_audit_file_systems_policies +'''''''''''''''''''''''''''''''' + +.. literalinclude:: source/examples/FB2.14/post_audit_file_systems_policies.py + :language: python + Policies Network Access ~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -3358,6 +3506,113 @@ post_policies .. literalinclude:: source/examples/FB2.0/post_policies.py :language: python +Policies Ssh Certificate Authority +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The following examples assume that ``client`` is an instantiated ``flashblade.Client`` object as shown in :ref:`Instantiating a Client`. + +delete_admins_ssh_certificate_authority_policies +'''''''''''''''''''''''''''''''''''''''''''''''' + +.. literalinclude:: source/examples/FB2.14/delete_admins_ssh_certificate_authority_policies.py + :language: python + +get_admins_ssh_certificate_authority_policies +''''''''''''''''''''''''''''''''''''''''''''' + +.. literalinclude:: source/examples/FB2.14/get_admins_ssh_certificate_authority_policies.py + :language: python + +post_admins_ssh_certificate_authority_policies +'''''''''''''''''''''''''''''''''''''''''''''' + +.. literalinclude:: source/examples/FB2.14/post_admins_ssh_certificate_authority_policies.py + :language: python + +delete_arrays_ssh_certificate_authority_policies +'''''''''''''''''''''''''''''''''''''''''''''''' + +.. literalinclude:: source/examples/FB2.14/delete_arrays_ssh_certificate_authority_policies.py + :language: python + +get_arrays_ssh_certificate_authority_policies +''''''''''''''''''''''''''''''''''''''''''''' + +.. literalinclude:: source/examples/FB2.14/get_arrays_ssh_certificate_authority_policies.py + :language: python + +post_arrays_ssh_certificate_authority_policies +'''''''''''''''''''''''''''''''''''''''''''''' + +.. literalinclude:: source/examples/FB2.14/post_arrays_ssh_certificate_authority_policies.py + :language: python + +delete_ssh_certificate_authority_policies_admins +'''''''''''''''''''''''''''''''''''''''''''''''' + +.. literalinclude:: source/examples/FB2.14/delete_ssh_certificate_authority_policies_admins.py + :language: python + +get_ssh_certificate_authority_policies_admins +''''''''''''''''''''''''''''''''''''''''''''' + +.. literalinclude:: source/examples/FB2.14/get_ssh_certificate_authority_policies_admins.py + :language: python + +post_ssh_certificate_authority_policies_admins +'''''''''''''''''''''''''''''''''''''''''''''' + +.. literalinclude:: source/examples/FB2.14/post_ssh_certificate_authority_policies_admins.py + :language: python + +delete_ssh_certificate_authority_policies_arrays +'''''''''''''''''''''''''''''''''''''''''''''''' + +.. literalinclude:: source/examples/FB2.14/delete_ssh_certificate_authority_policies_arrays.py + :language: python + +get_ssh_certificate_authority_policies_arrays +''''''''''''''''''''''''''''''''''''''''''''' + +.. literalinclude:: source/examples/FB2.14/get_ssh_certificate_authority_policies_arrays.py + :language: python + +post_ssh_certificate_authority_policies_arrays +'''''''''''''''''''''''''''''''''''''''''''''' + +.. literalinclude:: source/examples/FB2.14/post_ssh_certificate_authority_policies_arrays.py + :language: python + +delete_ssh_certificate_authority_policies +''''''''''''''''''''''''''''''''''''''''' + +.. literalinclude:: source/examples/FB2.14/delete_ssh_certificate_authority_policies.py + :language: python + +get_ssh_certificate_authority_policies +'''''''''''''''''''''''''''''''''''''' + +.. literalinclude:: source/examples/FB2.14/get_ssh_certificate_authority_policies.py + :language: python + +get_ssh_certificate_authority_policies_members +'''''''''''''''''''''''''''''''''''''''''''''' + +.. literalinclude:: source/examples/FB2.14/get_ssh_certificate_authority_policies_members.py + :language: python + +patch_ssh_certificate_authority_policies +'''''''''''''''''''''''''''''''''''''''' + +.. literalinclude:: source/examples/FB2.14/patch_ssh_certificate_authority_policies.py + :language: python + +post_ssh_certificate_authority_policies +''''''''''''''''''''''''''''''''''''''' + +.. literalinclude:: source/examples/FB2.14/post_ssh_certificate_authority_policies.py + :language: python + Policies All ~~~~~~~~~~~~~ @@ -3375,6 +3630,35 @@ get_policies_all_members .. literalinclude:: source/examples/FB2.2/get_policies_all_members.py :language: python +Public Keys +~~~~~~~~~~~ + +The following examples assume that ``client`` is an instantiated ``flashblade.Client`` object as shown in :ref:`Instantiating a Client`. + +delete_public_keys +'''''''''''''''''' + +.. literalinclude:: source/examples/FB2.14/delete_public_keys.py + :language: python + +get_public_keys +''''''''''''''' + +.. literalinclude:: source/examples/FB2.14/get_public_keys.py + :language: python + +post_public_keys +'''''''''''''''' + +.. literalinclude:: source/examples/FB2.14/post_public_keys.py + :language: python + +get_public_keys_uses +'''''''''''''''''''' + +.. literalinclude:: source/examples/FB2.14/get_public_keys_uses.py + :language: python + Quotas ~~~~~~ @@ -3609,7 +3893,7 @@ get_support patch_support ''''''''''''' -.. literalinclude:: source/examples/FB2.0/patch_support.py +.. literalinclude:: source/examples/FB2.14/patch_support.py :language: python get_support_test @@ -3638,13 +3922,13 @@ get_syslog_servers patch_syslog_servers '''''''''''''''''''' -.. literalinclude:: source/examples/FB2.0/patch_syslog_servers.py +.. literalinclude:: source/examples/FB2.14/patch_syslog_servers.py :language: python post_syslog_servers ''''''''''''''''''' -.. literalinclude:: source/examples/FB2.0/post_syslog_servers.py +.. literalinclude:: source/examples/FB2.14/post_syslog_servers.py :language: python get_syslog_servers_settings diff --git a/docs/source/pypureclient.flashblade.FB_2_14.api.rst b/docs/source/pypureclient.flashblade.FB_2_14.api.rst new file mode 100644 index 000000000..4a42cf8e0 --- /dev/null +++ b/docs/source/pypureclient.flashblade.FB_2_14.api.rst @@ -0,0 +1,469 @@ +pypureclient.flashblade.FB\_2\_14.api package +============================================= + +Submodules +---------- + +pypureclient.flashblade.FB\_2\_14.api.active\_directory\_api module +------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.api.active_directory_api + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.api.administrators\_api module +---------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.api.administrators_api + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.api.alert\_watchers\_api module +----------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.api.alert_watchers_api + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.api.alerts\_api module +-------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.api.alerts_api + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.api.api\_clients\_api module +-------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.api.api_clients_api + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.api.array\_connections\_api module +-------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.api.array_connections_api + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.api.arrays\_api module +-------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.api.arrays_api + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.api.audits\_api module +-------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.api.audits_api + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.api.authorization\_api module +--------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.api.authorization_api + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.api.blades\_api module +-------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.api.blades_api + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.api.bucket\_replica\_links\_api module +------------------------------------------------------------------------ + +.. automodule:: pypureclient.flashblade.FB_2_14.api.bucket_replica_links_api + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.api.buckets\_api module +--------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.api.buckets_api + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.api.certificate\_groups\_api module +--------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.api.certificate_groups_api + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.api.certificates\_api module +-------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.api.certificates_api + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.api.clients\_api module +--------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.api.clients_api + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.api.directory\_services\_api module +--------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.api.directory_services_api + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.api.dns\_api module +----------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.api.dns_api + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.api.drives\_api module +-------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.api.drives_api + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.api.file\_system\_replica\_links\_api module +------------------------------------------------------------------------------ + +.. automodule:: pypureclient.flashblade.FB_2_14.api.file_system_replica_links_api + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.api.file\_system\_snapshots\_api module +------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.api.file_system_snapshots_api + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.api.file\_systems\_api module +--------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.api.file_systems_api + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.api.hardware\_api module +---------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.api.hardware_api + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.api.hardware\_connectors\_api module +---------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.api.hardware_connectors_api + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.api.keytabs\_api module +--------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.api.keytabs_api + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.api.kmip\_api module +------------------------------------------------------ + +.. automodule:: pypureclient.flashblade.FB_2_14.api.kmip_api + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.api.lifecycle\_rules\_api module +------------------------------------------------------------------ + +.. automodule:: pypureclient.flashblade.FB_2_14.api.lifecycle_rules_api + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.api.link\_aggregation\_groups\_api module +--------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.api.link_aggregation_groups_api + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.api.logs\_api module +------------------------------------------------------ + +.. automodule:: pypureclient.flashblade.FB_2_14.api.logs_api + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.api.network\_interfaces\_api module +--------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.api.network_interfaces_api + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.api.object\_store\_access\_keys\_api module +----------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.api.object_store_access_keys_api + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.api.object\_store\_accounts\_api module +------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.api.object_store_accounts_api + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.api.object\_store\_remote\_credentials\_api module +------------------------------------------------------------------------------------ + +.. automodule:: pypureclient.flashblade.FB_2_14.api.object_store_remote_credentials_api + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.api.object\_store\_users\_api module +---------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.api.object_store_users_api + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.api.object\_store\_virtual\_hosts\_api module +------------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.api.object_store_virtual_hosts_api + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.api.policies\_\_\_audit\_for\_file\_systems\_api module +----------------------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.api.policies___audit_for_file_systems_api + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.api.policies\_\_\_network\_access\_api module +------------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.api.policies___network_access_api + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.api.policies\_\_\_nfs\_api module +------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.api.policies___nfs_api + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.api.policies\_\_\_object\_store\_access\_api module +------------------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.api.policies___object_store_access_api + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.api.policies\_\_\_smb\_client\_api module +--------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.api.policies___smb_client_api + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.api.policies\_\_\_smb\_share\_api module +-------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.api.policies___smb_share_api + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.api.policies\_\_\_snapshot\_api module +------------------------------------------------------------------------ + +.. automodule:: pypureclient.flashblade.FB_2_14.api.policies___snapshot_api + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.api.policies\_\_\_ssh\_certificate\_authority\_api module +------------------------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.api.policies___ssh_certificate_authority_api + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.api.policies\_\_all\_api module +----------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.api.policies__all_api + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.api.public\_keys\_api module +-------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.api.public_keys_api + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.api.quotas\_api module +-------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.api.quotas_api + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.api.rdl\_api module +----------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.api.rdl_api + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.api.roles\_api module +------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.api.roles_api + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.api.sessions\_api module +---------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.api.sessions_api + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.api.smtp\_api module +------------------------------------------------------ + +.. automodule:: pypureclient.flashblade.FB_2_14.api.smtp_api + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.api.snmp\_agents\_api module +-------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.api.snmp_agents_api + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.api.snmp\_managers\_api module +---------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.api.snmp_managers_api + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.api.subnets\_api module +--------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.api.subnets_api + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.api.support\_api module +--------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.api.support_api + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.api.syslog\_api module +-------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.api.syslog_api + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.api.targets\_api module +--------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.api.targets_api + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.api.usage\_api module +------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.api.usage_api + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.api.verification\_keys\_api module +-------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.api.verification_keys_api + :members: + :undoc-members: + :show-inheritance: + +Module contents +--------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.api + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/source/pypureclient.flashblade.FB_2_14.models.rst b/docs/source/pypureclient.flashblade.FB_2_14.models.rst new file mode 100644 index 000000000..902d3ffdc --- /dev/null +++ b/docs/source/pypureclient.flashblade.FB_2_14.models.rst @@ -0,0 +1,3525 @@ +pypureclient.flashblade.FB\_2\_14.models package +================================================ + +Submodules +---------- + +pypureclient.flashblade.FB\_2\_14.models.active\_directory module +----------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.active_directory + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.active\_directory\_directory\_servers module +------------------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.active_directory_directory_servers + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.active\_directory\_get\_response module +-------------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.active_directory_get_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.active\_directory\_patch module +------------------------------------------------------------------------ + +.. automodule:: pypureclient.flashblade.FB_2_14.models.active_directory_patch + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.active\_directory\_post module +----------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.active_directory_post + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.active\_directory\_response module +--------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.active_directory_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.admin module +----------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.admin + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.admin\_api\_token module +----------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.admin_api_token + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.admin\_api\_token\_get\_response module +-------------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.admin_api_token_get_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.admin\_api\_token\_response module +--------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.admin_api_token_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.admin\_cache module +------------------------------------------------------------ + +.. automodule:: pypureclient.flashblade.FB_2_14.models.admin_cache + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.admin\_cache\_get\_response module +--------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.admin_cache_get_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.admin\_get\_response module +-------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.admin_get_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.admin\_patch module +------------------------------------------------------------ + +.. automodule:: pypureclient.flashblade.FB_2_14.models.admin_patch + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.admin\_response module +--------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.admin_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.admin\_setting module +-------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.admin_setting + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.admin\_settings\_get\_response module +------------------------------------------------------------------------------ + +.. automodule:: pypureclient.flashblade.FB_2_14.models.admin_settings_get_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.admin\_settings\_response module +------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.admin_settings_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.alert module +----------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.alert + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.alert\_get\_response module +-------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.alert_get_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.alert\_response module +--------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.alert_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.alert\_watcher module +-------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.alert_watcher + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.alert\_watcher\_get\_response module +----------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.alert_watcher_get_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.alert\_watcher\_post module +-------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.alert_watcher_post + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.alert\_watcher\_response module +------------------------------------------------------------------------ + +.. automodule:: pypureclient.flashblade.FB_2_14.models.alert_watcher_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.api\_client module +----------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.api_client + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.api\_clients\_post module +------------------------------------------------------------------ + +.. automodule:: pypureclient.flashblade.FB_2_14.models.api_clients_post + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.api\_clients\_response module +---------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.api_clients_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.api\_token module +---------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.api_token + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.api\_version module +------------------------------------------------------------ + +.. automodule:: pypureclient.flashblade.FB_2_14.models.api_version + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.array module +----------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.array + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.array\_connection module +----------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.array_connection + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.array\_connection\_get\_response module +-------------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.array_connection_get_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.array\_connection\_key module +---------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.array_connection_key + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.array\_connection\_key\_get\_response module +------------------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.array_connection_key_get_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.array\_connection\_key\_response module +-------------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.array_connection_key_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.array\_connection\_path module +----------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.array_connection_path + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.array\_connection\_path\_get\_response module +-------------------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.array_connection_path_get_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.array\_connection\_post module +----------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.array_connection_post + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.array\_connection\_response module +--------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.array_connection_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.array\_encryption module +----------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.array_encryption + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.array\_encryption\_data\_at\_rest module +--------------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.array_encryption_data_at_rest + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.array\_eradication\_config module +-------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.array_eradication_config + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.array\_factory\_reset\_token module +---------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.array_factory_reset_token + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.array\_factory\_reset\_token\_get\_response module +------------------------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.array_factory_reset_token_get_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.array\_factory\_reset\_token\_response module +-------------------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.array_factory_reset_token_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.array\_get\_response module +-------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.array_get_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.array\_http\_specific\_performance module +---------------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.array_http_specific_performance + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.array\_http\_specific\_performance\_get module +--------------------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.array_http_specific_performance_get + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.array\_nfs\_specific\_performance module +--------------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.array_nfs_specific_performance + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.array\_nfs\_specific\_performance\_get module +-------------------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.array_nfs_specific_performance_get + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.array\_performance module +------------------------------------------------------------------ + +.. automodule:: pypureclient.flashblade.FB_2_14.models.array_performance + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.array\_performance\_get\_response module +--------------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.array_performance_get_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.array\_performance\_replication\_get\_resp module +------------------------------------------------------------------------------------------ + +.. automodule:: pypureclient.flashblade.FB_2_14.models.array_performance_replication_get_resp + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.array\_response module +--------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.array_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.array\_s3\_specific\_performance module +-------------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.array_s3_specific_performance + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.array\_s3\_specific\_performance\_get\_resp module +------------------------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.array_s3_specific_performance_get_resp + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.array\_space module +------------------------------------------------------------ + +.. automodule:: pypureclient.flashblade.FB_2_14.models.array_space + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.array\_space\_get\_response module +--------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.array_space_get_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.arrays\_supported\_time\_zones\_get\_response module +--------------------------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.arrays_supported_time_zones_get_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.audit module +----------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.audit + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.audit\_file\_systems\_policies module +------------------------------------------------------------------------------ + +.. automodule:: pypureclient.flashblade.FB_2_14.models.audit_file_systems_policies + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.audit\_file\_systems\_policies\_get\_response module +--------------------------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.audit_file_systems_policies_get_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.audit\_file\_systems\_policies\_members\_get\_response module +------------------------------------------------------------------------------------------------------ + +.. automodule:: pypureclient.flashblade.FB_2_14.models.audit_file_systems_policies_members_get_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.audit\_file\_systems\_policies\_members\_response module +------------------------------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.audit_file_systems_policies_members_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.audit\_file\_systems\_policies\_patch module +------------------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.audit_file_systems_policies_patch + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.audit\_file\_systems\_policies\_post module +------------------------------------------------------------------------------------ + +.. automodule:: pypureclient.flashblade.FB_2_14.models.audit_file_systems_policies_post + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.audit\_file\_systems\_policies\_response module +---------------------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.audit_file_systems_policies_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.audit\_file\_systems\_policy module +---------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.audit_file_systems_policy + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.audit\_get\_response module +-------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.audit_get_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.audit\_response module +--------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.audit_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.blade module +----------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.blade + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.blade\_get\_response module +-------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.blade_get_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.bucket module +------------------------------------------------------ + +.. automodule:: pypureclient.flashblade.FB_2_14.models.bucket + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.bucket\_access\_policy module +---------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.bucket_access_policy + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.bucket\_access\_policy\_get\_response module +------------------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.bucket_access_policy_get_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.bucket\_access\_policy\_post module +---------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.bucket_access_policy_post + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.bucket\_access\_policy\_response module +-------------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.bucket_access_policy_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.bucket\_access\_policy\_rule module +---------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.bucket_access_policy_rule + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.bucket\_access\_policy\_rule\_bulk\_manage module +------------------------------------------------------------------------------------------ + +.. automodule:: pypureclient.flashblade.FB_2_14.models.bucket_access_policy_rule_bulk_manage + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.bucket\_access\_policy\_rule\_get\_response module +------------------------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.bucket_access_policy_rule_get_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.bucket\_access\_policy\_rule\_post module +---------------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.bucket_access_policy_rule_post + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.bucket\_access\_policy\_rule\_principal module +--------------------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.bucket_access_policy_rule_principal + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.bucket\_access\_policy\_rule\_response module +-------------------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.bucket_access_policy_rule_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.bucket\_defaults module +---------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.bucket_defaults + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.bucket\_defaults\_readonly module +-------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.bucket_defaults_readonly + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.bucket\_eradication\_config module +--------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.bucket_eradication_config + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.bucket\_get\_response module +--------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.bucket_get_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.bucket\_patch module +------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.bucket_patch + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.bucket\_performance module +------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.bucket_performance + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.bucket\_performance\_get\_response module +---------------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.bucket_performance_get_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.bucket\_post module +------------------------------------------------------------ + +.. automodule:: pypureclient.flashblade.FB_2_14.models.bucket_post + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.bucket\_replica\_link module +--------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.bucket_replica_link + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.bucket\_replica\_link\_get\_response module +------------------------------------------------------------------------------------ + +.. automodule:: pypureclient.flashblade.FB_2_14.models.bucket_replica_link_get_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.bucket\_replica\_link\_post module +--------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.bucket_replica_link_post + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.bucket\_replica\_link\_response module +------------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.bucket_replica_link_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.bucket\_response module +---------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.bucket_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.bucket\_s3\_specific\_performance module +--------------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.bucket_s3_specific_performance + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.bucket\_s3\_specific\_performance\_get\_resp module +-------------------------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.bucket_s3_specific_performance_get_resp + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.built\_in module +--------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.built_in + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.built\_in\_no\_id module +----------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.built_in_no_id + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.built\_in\_relationship module +----------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.built_in_relationship + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.certificate module +----------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.certificate + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.certificate\_certificate\_group\_get\_resp module +------------------------------------------------------------------------------------------ + +.. automodule:: pypureclient.flashblade.FB_2_14.models.certificate_certificate_group_get_resp + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.certificate\_certificate\_group\_response module +----------------------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.certificate_certificate_group_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.certificate\_get\_response module +-------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.certificate_get_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.certificate\_group module +------------------------------------------------------------------ + +.. automodule:: pypureclient.flashblade.FB_2_14.models.certificate_group + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.certificate\_group\_certificate\_get\_resp module +------------------------------------------------------------------------------------------ + +.. automodule:: pypureclient.flashblade.FB_2_14.models.certificate_group_certificate_get_resp + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.certificate\_group\_certificate\_response module +----------------------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.certificate_group_certificate_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.certificate\_group\_get\_response module +--------------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.certificate_group_get_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.certificate\_group\_response module +---------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.certificate_group_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.certificate\_group\_use module +----------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.certificate_group_use + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.certificate\_group\_use\_get\_response module +-------------------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.certificate_group_use_get_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.certificate\_patch module +------------------------------------------------------------------ + +.. automodule:: pypureclient.flashblade.FB_2_14.models.certificate_patch + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.certificate\_post module +----------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.certificate_post + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.certificate\_response module +--------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.certificate_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.certificate\_use module +---------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.certificate_use + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.certificate\_use\_get\_response module +------------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.certificate_use_get_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.client\_performance module +------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.client_performance + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.client\_performance\_get\_response module +---------------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.client_performance_get_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.connection\_relationship\_performance\_replication module +-------------------------------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.connection_relationship_performance_replication + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.connection\_relationship\_performance\_replication\_get\_resp module +------------------------------------------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.connection_relationship_performance_replication_get_resp + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.continuous\_replication\_performance module +------------------------------------------------------------------------------------ + +.. automodule:: pypureclient.flashblade.FB_2_14.models.continuous_replication_performance + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.cross\_origin\_resource\_sharing\_policy module +---------------------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.cross_origin_resource_sharing_policy + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.cross\_origin\_resource\_sharing\_policy\_get\_response module +------------------------------------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.cross_origin_resource_sharing_policy_get_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.cross\_origin\_resource\_sharing\_policy\_patch module +----------------------------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.cross_origin_resource_sharing_policy_patch + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.cross\_origin\_resource\_sharing\_policy\_response module +-------------------------------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.cross_origin_resource_sharing_policy_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.cross\_origin\_resource\_sharing\_policy\_rule module +---------------------------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.cross_origin_resource_sharing_policy_rule + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.cross\_origin\_resource\_sharing\_policy\_rule\_bulk\_manage module +------------------------------------------------------------------------------------------------------------ + +.. automodule:: pypureclient.flashblade.FB_2_14.models.cross_origin_resource_sharing_policy_rule_bulk_manage + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.cross\_origin\_resource\_sharing\_policy\_rule\_get\_response module +------------------------------------------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.cross_origin_resource_sharing_policy_rule_get_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.cross\_origin\_resource\_sharing\_policy\_rule\_post module +---------------------------------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.cross_origin_resource_sharing_policy_rule_post + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.cross\_origin\_resource\_sharing\_policy\_rule\_response module +-------------------------------------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.cross_origin_resource_sharing_policy_rule_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.direction module +--------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.direction + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.directory\_service module +------------------------------------------------------------------ + +.. automodule:: pypureclient.flashblade.FB_2_14.models.directory_service + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.directory\_service\_get\_response module +--------------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.directory_service_get_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.directory\_service\_management module +------------------------------------------------------------------------------ + +.. automodule:: pypureclient.flashblade.FB_2_14.models.directory_service_management + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.directory\_service\_nfs module +----------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.directory_service_nfs + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.directory\_service\_response module +---------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.directory_service_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.directory\_service\_role module +------------------------------------------------------------------------ + +.. automodule:: pypureclient.flashblade.FB_2_14.models.directory_service_role + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.directory\_service\_roles\_get\_response module +---------------------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.directory_service_roles_get_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.directory\_service\_roles\_response module +----------------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.directory_service_roles_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.directory\_service\_smb module +----------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.directory_service_smb + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.dns module +--------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.dns + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.dns\_get\_response module +------------------------------------------------------------------ + +.. automodule:: pypureclient.flashblade.FB_2_14.models.dns_get_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.dns\_response module +------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.dns_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.drive module +----------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.drive + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.drive\_get\_response module +-------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.drive_get_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.eula module +---------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.eula + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.eula\_get\_response module +------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.eula_get_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.eula\_response module +-------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.eula_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.eula\_signature module +--------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.eula_signature + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.file\_info module +---------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.file_info + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.file\_lock module +---------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.file_lock + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.file\_lock\_get\_response module +------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.file_lock_get_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.file\_lock\_nlm\_reclamation\_response module +-------------------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.file_lock_nlm_reclamation_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.file\_lock\_range module +----------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.file_lock_range + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.file\_lock\_response module +-------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.file_lock_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.file\_session module +------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.file_session + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.file\_session\_get\_response module +---------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.file_session_get_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.file\_session\_response module +----------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.file_session_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.file\_system module +------------------------------------------------------------ + +.. automodule:: pypureclient.flashblade.FB_2_14.models.file_system + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.file\_system\_client module +-------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.file_system_client + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.file\_system\_clients\_get\_response module +------------------------------------------------------------------------------------ + +.. automodule:: pypureclient.flashblade.FB_2_14.models.file_system_clients_get_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.file\_system\_clients\_response module +------------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.file_system_clients_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.file\_system\_get\_response module +--------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.file_system_get_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.file\_system\_group\_performance module +-------------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.file_system_group_performance + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.file\_system\_groups\_performance\_get\_response module +------------------------------------------------------------------------------------------------ + +.. automodule:: pypureclient.flashblade.FB_2_14.models.file_system_groups_performance_get_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.file\_system\_lock\_nlm\_reclamation module +------------------------------------------------------------------------------------ + +.. automodule:: pypureclient.flashblade.FB_2_14.models.file_system_lock_nlm_reclamation + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.file\_system\_patch module +------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.file_system_patch + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.file\_system\_performance module +------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.file_system_performance + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.file\_system\_performance\_get\_response module +---------------------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.file_system_performance_get_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.file\_system\_post module +------------------------------------------------------------------ + +.. automodule:: pypureclient.flashblade.FB_2_14.models.file_system_post + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.file\_system\_replica\_link module +--------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.file_system_replica_link + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.file\_system\_replica\_link\_get\_response module +------------------------------------------------------------------------------------------ + +.. automodule:: pypureclient.flashblade.FB_2_14.models.file_system_replica_link_get_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.file\_system\_replica\_link\_response module +------------------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.file_system_replica_link_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.file\_system\_response module +---------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.file_system_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.file\_system\_snapshot module +---------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.file_system_snapshot + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.file\_system\_snapshot\_get\_response module +------------------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.file_system_snapshot_get_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.file\_system\_snapshot\_get\_transfer\_response module +----------------------------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.file_system_snapshot_get_transfer_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.file\_system\_snapshot\_post module +---------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.file_system_snapshot_post + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.file\_system\_snapshot\_response module +-------------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.file_system_snapshot_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.file\_system\_snapshot\_transfer module +-------------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.file_system_snapshot_transfer + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.file\_system\_snapshot\_transfer\_response module +------------------------------------------------------------------------------------------ + +.. automodule:: pypureclient.flashblade.FB_2_14.models.file_system_snapshot_transfer_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.file\_system\_user\_performance module +------------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.file_system_user_performance + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.file\_system\_users\_performance\_get\_response module +----------------------------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.file_system_users_performance_get_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.fixed\_location\_reference module +-------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.fixed_location_reference + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.fixed\_reference module +---------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.fixed_reference + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.fixed\_reference\_name\_only module +---------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.fixed_reference_name_only + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.fixed\_reference\_no\_id module +------------------------------------------------------------------------ + +.. automodule:: pypureclient.flashblade.FB_2_14.models.fixed_reference_no_id + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.fixed\_reference\_no\_resource\_type module +------------------------------------------------------------------------------------ + +.. automodule:: pypureclient.flashblade.FB_2_14.models.fixed_reference_no_resource_type + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.fixed\_reference\_with\_remote module +------------------------------------------------------------------------------ + +.. automodule:: pypureclient.flashblade.FB_2_14.models.fixed_reference_with_remote + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.group module +----------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.group + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.group\_quota module +------------------------------------------------------------ + +.. automodule:: pypureclient.flashblade.FB_2_14.models.group_quota + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.group\_quota\_get\_response module +--------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.group_quota_get_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.group\_quota\_patch module +------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.group_quota_patch + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.group\_quota\_post module +------------------------------------------------------------------ + +.. automodule:: pypureclient.flashblade.FB_2_14.models.group_quota_post + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.group\_quota\_response module +---------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.group_quota_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.hardware module +-------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.hardware + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.hardware\_connector module +------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.hardware_connector + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.hardware\_connector\_get\_response module +---------------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.hardware_connector_get_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.hardware\_connector\_performance module +-------------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.hardware_connector_performance + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.hardware\_connector\_performance\_get\_response module +----------------------------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.hardware_connector_performance_get_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.hardware\_connector\_response module +----------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.hardware_connector_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.hardware\_get\_response module +----------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.hardware_get_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.hardware\_response module +------------------------------------------------------------------ + +.. automodule:: pypureclient.flashblade.FB_2_14.models.hardware_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.http module +---------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.http + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.inline\_response400 module +------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.inline_response400 + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.inline\_response401 module +------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.inline_response401 + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.keytab module +------------------------------------------------------ + +.. automodule:: pypureclient.flashblade.FB_2_14.models.keytab + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.keytab\_file\_base64 module +-------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.keytab_file_base64 + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.keytab\_file\_binary module +-------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.keytab_file_binary + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.keytab\_file\_response module +---------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.keytab_file_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.keytab\_get\_response module +--------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.keytab_get_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.keytab\_post module +------------------------------------------------------------ + +.. automodule:: pypureclient.flashblade.FB_2_14.models.keytab_post + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.keytab\_response module +---------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.keytab_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.kmip\_server module +------------------------------------------------------------ + +.. automodule:: pypureclient.flashblade.FB_2_14.models.kmip_server + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.kmip\_server\_response module +---------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.kmip_server_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.lifecycle\_rule module +--------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.lifecycle_rule + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.lifecycle\_rule\_config\_extension module +---------------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.lifecycle_rule_config_extension + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.lifecycle\_rule\_get\_response module +------------------------------------------------------------------------------ + +.. automodule:: pypureclient.flashblade.FB_2_14.models.lifecycle_rule_get_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.lifecycle\_rule\_patch module +---------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.lifecycle_rule_patch + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.lifecycle\_rule\_post module +--------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.lifecycle_rule_post + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.lifecycle\_rule\_response module +------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.lifecycle_rule_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.link\_aggregation\_group module +------------------------------------------------------------------------ + +.. automodule:: pypureclient.flashblade.FB_2_14.models.link_aggregation_group + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.link\_aggregation\_group\_get\_response module +--------------------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.link_aggregation_group_get_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.link\_aggregation\_group\_response module +---------------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.link_aggregation_group_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.linkaggregationgroup module +-------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.linkaggregationgroup + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.location\_reference module +------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.location_reference + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.login module +----------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.login + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.login\_banner\_get\_response module +---------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.login_banner_get_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.logs\_async module +----------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.logs_async + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.logs\_async\_get\_response module +-------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.logs_async_get_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.logs\_async\_response module +--------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.logs_async_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.member module +------------------------------------------------------ + +.. automodule:: pypureclient.flashblade.FB_2_14.models.member + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.member\_link module +------------------------------------------------------------ + +.. automodule:: pypureclient.flashblade.FB_2_14.models.member_link + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.multi\_protocol module +--------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.multi_protocol + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.multi\_protocol\_post module +--------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.multi_protocol_post + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.network\_access\_policy module +----------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.network_access_policy + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.network\_access\_policy\_get\_response module +-------------------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.network_access_policy_get_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.network\_access\_policy\_response module +--------------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.network_access_policy_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.network\_access\_policy\_rule module +----------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.network_access_policy_rule + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.network\_access\_policy\_rule\_base module +----------------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.network_access_policy_rule_base + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.network\_access\_policy\_rule\_get\_response module +-------------------------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.network_access_policy_rule_get_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.network\_access\_policy\_rule\_in\_policy module +----------------------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.network_access_policy_rule_in_policy + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.network\_access\_policy\_rule\_post module +----------------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.network_access_policy_rule_post + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.network\_access\_policy\_rule\_post\_base module +----------------------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.network_access_policy_rule_post_base + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.network\_access\_policy\_rule\_response module +--------------------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.network_access_policy_rule_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.network\_interface module +------------------------------------------------------------------ + +.. automodule:: pypureclient.flashblade.FB_2_14.models.network_interface + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.network\_interface\_get\_response module +--------------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.network_interface_get_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.network\_interface\_patch module +------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.network_interface_patch + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.network\_interface\_ping module +------------------------------------------------------------------------ + +.. automodule:: pypureclient.flashblade.FB_2_14.models.network_interface_ping + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.network\_interface\_ping\_get\_response module +--------------------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.network_interface_ping_get_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.network\_interface\_ping\_response module +---------------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.network_interface_ping_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.network\_interface\_response module +---------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.network_interface_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.network\_interface\_trace module +------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.network_interface_trace + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.network\_interface\_trace\_get\_response module +---------------------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.network_interface_trace_get_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.network\_interface\_trace\_response module +----------------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.network_interface_trace_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.nfs module +--------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.nfs + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.nfs\_export\_policy module +------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.nfs_export_policy + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.nfs\_export\_policy\_get\_response module +---------------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.nfs_export_policy_get_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.nfs\_export\_policy\_post module +------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.nfs_export_policy_post + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.nfs\_export\_policy\_response module +----------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.nfs_export_policy_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.nfs\_export\_policy\_rule module +------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.nfs_export_policy_rule + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.nfs\_export\_policy\_rule\_base module +------------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.nfs_export_policy_rule_base + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.nfs\_export\_policy\_rule\_get\_response module +---------------------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.nfs_export_policy_rule_get_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.nfs\_export\_policy\_rule\_in\_policy module +------------------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.nfs_export_policy_rule_in_policy + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.nfs\_export\_policy\_rule\_response module +----------------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.nfs_export_policy_rule_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.nfs\_patch module +---------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.nfs_patch + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.oauth\_token\_response module +---------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.oauth_token_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.object\_backlog module +--------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.object_backlog + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.object\_lock\_config\_base module +-------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.object_lock_config_base + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.object\_lock\_config\_request\_body module +----------------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.object_lock_config_request_body + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.object\_lock\_config\_response module +------------------------------------------------------------------------------ + +.. automodule:: pypureclient.flashblade.FB_2_14.models.object_lock_config_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.object\_store\_access\_key module +-------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.object_store_access_key + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.object\_store\_access\_key\_get\_response module +----------------------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.object_store_access_key_get_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.object\_store\_access\_key\_post module +-------------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.object_store_access_key_post + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.object\_store\_access\_key\_response module +------------------------------------------------------------------------------------ + +.. automodule:: pypureclient.flashblade.FB_2_14.models.object_store_access_key_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.object\_store\_access\_policy module +----------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.object_store_access_policy + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.object\_store\_access\_policy\_action module +------------------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.object_store_access_policy_action + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.object\_store\_access\_policy\_action\_get\_response module +---------------------------------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.object_store_access_policy_action_get_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.object\_store\_access\_policy\_action\_response module +----------------------------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.object_store_access_policy_action_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.object\_store\_access\_policy\_get\_response module +-------------------------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.object_store_access_policy_get_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.object\_store\_access\_policy\_patch module +------------------------------------------------------------------------------------ + +.. automodule:: pypureclient.flashblade.FB_2_14.models.object_store_access_policy_patch + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.object\_store\_access\_policy\_post module +----------------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.object_store_access_policy_post + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.object\_store\_access\_policy\_response module +--------------------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.object_store_access_policy_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.object\_store\_access\_policy\_rule module +----------------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.object_store_access_policy_rule + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.object\_store\_access\_policy\_rule\_get\_response module +-------------------------------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.object_store_access_policy_rule_get_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.object\_store\_access\_policy\_rule\_response module +--------------------------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.object_store_access_policy_rule_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.object\_store\_account module +---------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.object_store_account + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.object\_store\_account\_get\_response module +------------------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.object_store_account_get_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.object\_store\_account\_patch module +----------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.object_store_account_patch + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.object\_store\_account\_post module +---------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.object_store_account_post + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.object\_store\_account\_response module +-------------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.object_store_account_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.object\_store\_remote\_credential\_get\_resp module +-------------------------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.object_store_remote_credential_get_resp + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.object\_store\_remote\_credentials module +---------------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.object_store_remote_credentials + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.object\_store\_remote\_credentials\_post module +---------------------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.object_store_remote_credentials_post + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.object\_store\_remote\_credentials\_resp module +---------------------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.object_store_remote_credentials_resp + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.object\_store\_user module +------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.object_store_user + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.object\_store\_user\_get\_response module +---------------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.object_store_user_get_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.object\_store\_user\_response module +----------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.object_store_user_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.object\_store\_virtual\_host module +---------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.object_store_virtual_host + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.object\_store\_virtual\_host\_get\_response module +------------------------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.object_store_virtual_host_get_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.object\_store\_virtual\_host\_response module +-------------------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.object_store_virtual_host_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.page\_info module +---------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.page_info + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.permission module +---------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.permission + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.policy module +------------------------------------------------------ + +.. automodule:: pypureclient.flashblade.FB_2_14.models.policy + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.policy\_base module +------------------------------------------------------------ + +.. automodule:: pypureclient.flashblade.FB_2_14.models.policy_base + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.policy\_base\_get\_response module +--------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.policy_base_get_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.policy\_base\_renameable module +------------------------------------------------------------------------ + +.. automodule:: pypureclient.flashblade.FB_2_14.models.policy_base_renameable + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.policy\_base\_response module +---------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.policy_base_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.policy\_file\_system\_snapshot module +------------------------------------------------------------------------------ + +.. automodule:: pypureclient.flashblade.FB_2_14.models.policy_file_system_snapshot + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.policy\_file\_system\_snapshot\_get\_response module +--------------------------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.policy_file_system_snapshot_get_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.policy\_file\_system\_snapshot\_response module +---------------------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.policy_file_system_snapshot_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.policy\_get\_response module +--------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.policy_get_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.policy\_local\_member module +--------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.policy_local_member + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.policy\_member module +-------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.policy_member + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.policy\_member\_get\_response module +----------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.policy_member_get_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.policy\_member\_response module +------------------------------------------------------------------------ + +.. automodule:: pypureclient.flashblade.FB_2_14.models.policy_member_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.policy\_member\_with\_remote module +---------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.policy_member_with_remote + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.policy\_member\_with\_remote\_get\_response module +------------------------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.policy_member_with_remote_get_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.policy\_member\_with\_remote\_response module +-------------------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.policy_member_with_remote_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.policy\_patch module +------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.policy_patch + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.policy\_response module +---------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.policy_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.policy\_rule module +------------------------------------------------------------ + +.. automodule:: pypureclient.flashblade.FB_2_14.models.policy_rule + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.policy\_rule\_index module +------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.policy_rule_index + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.policy\_rule\_index\_in\_policy module +------------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.policy_rule_index_in_policy + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.policy\_rule\_object\_access module +---------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.policy_rule_object_access + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.policy\_rule\_object\_access\_bulk\_manage module +------------------------------------------------------------------------------------------ + +.. automodule:: pypureclient.flashblade.FB_2_14.models.policy_rule_object_access_bulk_manage + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.policy\_rule\_object\_access\_condition module +--------------------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.policy_rule_object_access_condition + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.policy\_rule\_object\_access\_post module +---------------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.policy_rule_object_access_post + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.public\_access\_config module +---------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.public_access_config + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.public\_key module +----------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.public_key + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.public\_key\_get\_response module +-------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.public_key_get_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.public\_key\_post module +----------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.public_key_post + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.public\_key\_response module +--------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.public_key_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.public\_key\_use module +---------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.public_key_use + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.public\_key\_use\_get\_response module +------------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.public_key_use_get_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.public\_key\_use\_response module +-------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.public_key_use_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.quota\_setting module +-------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.quota_setting + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.quota\_setting\_get\_response module +----------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.quota_setting_get_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.quota\_setting\_response module +------------------------------------------------------------------------ + +.. automodule:: pypureclient.flashblade.FB_2_14.models.quota_setting_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.rapid\_data\_locking module +-------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.rapid_data_locking + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.rapid\_data\_locking\_response module +------------------------------------------------------------------------------ + +.. automodule:: pypureclient.flashblade.FB_2_14.models.rapid_data_locking_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.reference module +--------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.reference + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.reference\_writable module +------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.reference_writable + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.relationship\_performance\_replication module +-------------------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.relationship_performance_replication + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.replica\_link\_built\_in module +------------------------------------------------------------------------ + +.. automodule:: pypureclient.flashblade.FB_2_14.models.replica_link_built_in + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.replication\_performance module +------------------------------------------------------------------------ + +.. automodule:: pypureclient.flashblade.FB_2_14.models.replication_performance + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.resource module +-------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.resource + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.resource\_performance\_replication module +---------------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.resource_performance_replication + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.resource\_performance\_replication\_get\_response module +------------------------------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.resource_performance_replication_get_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.resource\_type module +-------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.resource_type + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.role module +---------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.role + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.role\_get\_response module +------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.role_get_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.session module +------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.session + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.session\_get\_response module +---------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.session_get_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.smb module +--------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.smb + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.smb\_client\_policy module +------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.smb_client_policy + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.smb\_client\_policy\_get\_response module +---------------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.smb_client_policy_get_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.smb\_client\_policy\_post module +------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.smb_client_policy_post + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.smb\_client\_policy\_response module +----------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.smb_client_policy_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.smb\_client\_policy\_rule module +------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.smb_client_policy_rule + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.smb\_client\_policy\_rule\_base module +------------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.smb_client_policy_rule_base + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.smb\_client\_policy\_rule\_get\_response module +---------------------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.smb_client_policy_rule_get_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.smb\_client\_policy\_rule\_in\_policy module +------------------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.smb_client_policy_rule_in_policy + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.smb\_client\_policy\_rule\_post module +------------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.smb_client_policy_rule_post + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.smb\_client\_policy\_rule\_post\_base module +------------------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.smb_client_policy_rule_post_base + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.smb\_client\_policy\_rule\_post\_in\_policy module +------------------------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.smb_client_policy_rule_post_in_policy + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.smb\_client\_policy\_rule\_response module +----------------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.smb_client_policy_rule_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.smb\_post module +--------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.smb_post + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.smb\_share\_policy module +------------------------------------------------------------------ + +.. automodule:: pypureclient.flashblade.FB_2_14.models.smb_share_policy + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.smb\_share\_policy\_get\_response module +--------------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.smb_share_policy_get_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.smb\_share\_policy\_post module +------------------------------------------------------------------------ + +.. automodule:: pypureclient.flashblade.FB_2_14.models.smb_share_policy_post + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.smb\_share\_policy\_response module +---------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.smb_share_policy_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.smb\_share\_policy\_rule module +------------------------------------------------------------------------ + +.. automodule:: pypureclient.flashblade.FB_2_14.models.smb_share_policy_rule + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.smb\_share\_policy\_rule\_get\_response module +--------------------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.smb_share_policy_rule_get_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.smb\_share\_policy\_rule\_post module +------------------------------------------------------------------------------ + +.. automodule:: pypureclient.flashblade.FB_2_14.models.smb_share_policy_rule_post + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.smb\_share\_policy\_rule\_response module +---------------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.smb_share_policy_rule_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.smtp module +---------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.smtp + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.smtp\_server module +------------------------------------------------------------ + +.. automodule:: pypureclient.flashblade.FB_2_14.models.smtp_server + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.smtp\_server\_get\_response module +--------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.smtp_server_get_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.smtp\_server\_response module +---------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.smtp_server_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.snmp\_agent module +----------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.snmp_agent + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.snmp\_agent\_get\_response module +-------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.snmp_agent_get_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.snmp\_agent\_mib module +---------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.snmp_agent_mib + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.snmp\_agent\_mib\_response module +-------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.snmp_agent_mib_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.snmp\_agent\_response module +--------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.snmp_agent_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.snmp\_manager module +------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.snmp_manager + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.snmp\_manager\_get\_response module +---------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.snmp_manager_get_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.snmp\_manager\_post module +------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.snmp_manager_post + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.snmp\_manager\_response module +----------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.snmp_manager_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.snmp\_manager\_test module +------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.snmp_manager_test + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.snmp\_v2c module +--------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.snmp_v2c + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.snmp\_v3 module +-------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.snmp_v3 + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.snmp\_v3\_post module +-------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.snmp_v3_post + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.space module +----------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.space + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.space\_extended module +--------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.space_extended + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.ssh\_certificate\_authority\_policy module +----------------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.ssh_certificate_authority_policy + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.ssh\_certificate\_authority\_policy\_get\_response module +-------------------------------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.ssh_certificate_authority_policy_get_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.ssh\_certificate\_authority\_policy\_post module +----------------------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.ssh_certificate_authority_policy_post + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.ssh\_certificate\_authority\_policy\_response module +--------------------------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.ssh_certificate_authority_policy_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.subnet module +------------------------------------------------------ + +.. automodule:: pypureclient.flashblade.FB_2_14.models.subnet + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.subnet\_get\_response module +--------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.subnet_get_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.subnet\_response module +---------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.subnet_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.support module +------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.support + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.support\_get\_response module +---------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.support_get_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.support\_remote\_assist\_paths module +------------------------------------------------------------------------------ + +.. automodule:: pypureclient.flashblade.FB_2_14.models.support_remote_assist_paths + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.support\_response module +----------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.support_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.syslog\_server module +-------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.syslog_server + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.syslog\_server\_get\_response module +----------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.syslog_server_get_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.syslog\_server\_patch module +--------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.syslog_server_patch + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.syslog\_server\_post module +-------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.syslog_server_post + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.syslog\_server\_post\_or\_patch module +------------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.syslog_server_post_or_patch + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.syslog\_server\_response module +------------------------------------------------------------------------ + +.. automodule:: pypureclient.flashblade.FB_2_14.models.syslog_server_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.syslog\_server\_settings module +------------------------------------------------------------------------ + +.. automodule:: pypureclient.flashblade.FB_2_14.models.syslog_server_settings + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.syslog\_server\_settings\_get\_response module +--------------------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.syslog_server_settings_get_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.syslog\_server\_settings\_response module +---------------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.syslog_server_settings_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.target module +------------------------------------------------------ + +.. automodule:: pypureclient.flashblade.FB_2_14.models.target + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.target\_get\_response module +--------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.target_get_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.target\_post module +------------------------------------------------------------ + +.. automodule:: pypureclient.flashblade.FB_2_14.models.target_post + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.target\_response module +---------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.target_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.test\_result module +------------------------------------------------------------ + +.. automodule:: pypureclient.flashblade.FB_2_14.models.test_result + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.test\_result\_get\_response module +--------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.test_result_get_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.test\_result\_response module +---------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.test_result_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.throttle module +-------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.throttle + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.time\_window module +------------------------------------------------------------ + +.. automodule:: pypureclient.flashblade.FB_2_14.models.time_window + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.time\_zone module +---------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.time_zone + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.user module +---------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.user + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.user\_no\_id module +------------------------------------------------------------ + +.. automodule:: pypureclient.flashblade.FB_2_14.models.user_no_id + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.user\_quota module +----------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.user_quota + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.user\_quota\_get\_response module +-------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.user_quota_get_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.user\_quota\_patch module +------------------------------------------------------------------ + +.. automodule:: pypureclient.flashblade.FB_2_14.models.user_quota_patch + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.user\_quota\_post module +----------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.user_quota_post + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.user\_quota\_response module +--------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.user_quota_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.verification\_key module +----------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.verification_key + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.verification\_key\_get\_response module +-------------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.verification_key_get_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.verification\_key\_patch module +------------------------------------------------------------------------ + +.. automodule:: pypureclient.flashblade.FB_2_14.models.verification_key_patch + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.verification\_key\_response module +--------------------------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.verification_key_response + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.models.version module +------------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models.version + :members: + :undoc-members: + :show-inheritance: + +Module contents +--------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.models + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/source/pypureclient.flashblade.FB_2_14.rst b/docs/source/pypureclient.flashblade.FB_2_14.rst new file mode 100644 index 000000000..ac14c9b4e --- /dev/null +++ b/docs/source/pypureclient.flashblade.FB_2_14.rst @@ -0,0 +1,54 @@ +pypureclient.flashblade.FB\_2\_14 package +========================================= + +Subpackages +----------- + +.. toctree:: + :maxdepth: 4 + + pypureclient.flashblade.FB_2_14.api + pypureclient.flashblade.FB_2_14.models + +Submodules +---------- + +pypureclient.flashblade.FB\_2\_14.api\_client module +---------------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.api_client + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.client module +----------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.client + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.configuration module +------------------------------------------------------ + +.. automodule:: pypureclient.flashblade.FB_2_14.configuration + :members: + :undoc-members: + :show-inheritance: + +pypureclient.flashblade.FB\_2\_14.rest module +--------------------------------------------- + +.. automodule:: pypureclient.flashblade.FB_2_14.rest + :members: + :undoc-members: + :show-inheritance: + +Module contents +--------------- + +.. automodule:: pypureclient.flashblade.FB_2_14 + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/source/pypureclient.flashblade.rst b/docs/source/pypureclient.flashblade.rst index 13363ef3a..bb0b34121 100644 --- a/docs/source/pypureclient.flashblade.rst +++ b/docs/source/pypureclient.flashblade.rst @@ -13,6 +13,7 @@ Subpackages pypureclient.flashblade.FB_2_11 pypureclient.flashblade.FB_2_12 pypureclient.flashblade.FB_2_13 + pypureclient.flashblade.FB_2_14 pypureclient.flashblade.FB_2_2 pypureclient.flashblade.FB_2_3 pypureclient.flashblade.FB_2_4 diff --git a/pyproject.toml b/pyproject.toml index 5504126f1..b9490f052 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "py-pure-client" -version = "1.51.0" +version = "1.52.0" description = "Pure Storage Python clients for FlashArray, FlashBlade, and Pure1 APIs" authors = [ { name = "Pure Storage", email = "support@purestorage.com" } diff --git a/pypureclient/client_settings.py b/pypureclient/client_settings.py index d91f95eab..07f068d8a 100644 --- a/pypureclient/client_settings.py +++ b/pypureclient/client_settings.py @@ -1,4 +1,4 @@ -USER_AGENT_TEMPLATE = 'pypureclient/1.51.0/{prod}/{rest_version}/{sys}/{rel}' +USER_AGENT_TEMPLATE = 'pypureclient/1.52.0/{prod}/{rest_version}/{sys}/{rel}' def resolve_ssl_validation(verify_ssl): """ diff --git a/pypureclient/flashblade/FB_2_14/__init__.py b/pypureclient/flashblade/FB_2_14/__init__.py new file mode 100644 index 000000000..4a794fdaa --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/__init__.py @@ -0,0 +1,529 @@ +from __future__ import absolute_import +import os + +from .client import Client +from ...exceptions import PureError +from ...properties import Property, Filter +from ...responses import ValidResponse, ErrorResponse, ApiError, ResponseHeaders + +from .models.active_directory import ActiveDirectory +from .models.active_directory_directory_servers import ActiveDirectoryDirectoryServers +from .models.active_directory_patch import ActiveDirectoryPatch +from .models.active_directory_post import ActiveDirectoryPost +from .models.admin import Admin +from .models.admin_api_token import AdminApiToken +from .models.admin_cache import AdminCache +from .models.admin_patch import AdminPatch +from .models.admin_setting import AdminSetting +from .models.alert import Alert +from .models.alert_watcher import AlertWatcher +from .models.alert_watcher_post import AlertWatcherPost +from .models.api_client import ApiClient +from .models.api_clients_post import ApiClientsPost +from .models.api_token import ApiToken +from .models.api_version import ApiVersion +from .models.array import Array +from .models.array_connection import ArrayConnection +from .models.array_connection_key import ArrayConnectionKey +from .models.array_connection_path import ArrayConnectionPath +from .models.array_connection_post import ArrayConnectionPost +from .models.array_encryption import ArrayEncryption +from .models.array_encryption_data_at_rest import ArrayEncryptionDataAtRest +from .models.array_eradication_config import ArrayEradicationConfig +from .models.array_factory_reset_token import ArrayFactoryResetToken +from .models.array_http_specific_performance import ArrayHttpSpecificPerformance +from .models.array_http_specific_performance_get import ArrayHttpSpecificPerformanceGet +from .models.array_nfs_specific_performance import ArrayNfsSpecificPerformance +from .models.array_nfs_specific_performance_get import ArrayNfsSpecificPerformanceGet +from .models.array_performance import ArrayPerformance +from .models.array_performance_replication_get_resp import ArrayPerformanceReplicationGetResp +from .models.array_s3_specific_performance import ArrayS3SpecificPerformance +from .models.array_s3_specific_performance_get_resp import ArrayS3SpecificPerformanceGetResp +from .models.array_space import ArraySpace +from .models.audit import Audit +from .models.audit_file_systems_policies import AuditFileSystemsPolicies +from .models.audit_file_systems_policies_patch import AuditFileSystemsPoliciesPatch +from .models.audit_file_systems_policies_post import AuditFileSystemsPoliciesPost +from .models.audit_file_systems_policy import AuditFileSystemsPolicy +from .models.blade import Blade +from .models.bucket import Bucket +from .models.bucket_access_policy import BucketAccessPolicy +from .models.bucket_access_policy_post import BucketAccessPolicyPost +from .models.bucket_access_policy_rule import BucketAccessPolicyRule +from .models.bucket_access_policy_rule_bulk_manage import BucketAccessPolicyRuleBulkManage +from .models.bucket_access_policy_rule_post import BucketAccessPolicyRulePost +from .models.bucket_access_policy_rule_principal import BucketAccessPolicyRulePrincipal +from .models.bucket_defaults import BucketDefaults +from .models.bucket_defaults_readonly import BucketDefaultsReadonly +from .models.bucket_eradication_config import BucketEradicationConfig +from .models.bucket_patch import BucketPatch +from .models.bucket_performance import BucketPerformance +from .models.bucket_post import BucketPost +from .models.bucket_replica_link import BucketReplicaLink +from .models.bucket_replica_link_post import BucketReplicaLinkPost +from .models.bucket_s3_specific_performance import BucketS3SpecificPerformance +from .models.bucket_s3_specific_performance_get_resp import BucketS3SpecificPerformanceGetResp +from .models.built_in import BuiltIn +from .models.built_in_no_id import BuiltInNoId +from .models.built_in_relationship import BuiltInRelationship +from .models.certificate import Certificate +from .models.certificate_certificate_group_get_resp import CertificateCertificateGroupGetResp +from .models.certificate_group import CertificateGroup +from .models.certificate_group_certificate_get_resp import CertificateGroupCertificateGetResp +from .models.certificate_group_use import CertificateGroupUse +from .models.certificate_patch import CertificatePatch +from .models.certificate_post import CertificatePost +from .models.certificate_use import CertificateUse +from .models.client_performance import ClientPerformance +from .models.connection_relationship_performance_replication import ConnectionRelationshipPerformanceReplication +from .models.connection_relationship_performance_replication_get_resp import ConnectionRelationshipPerformanceReplicationGetResp +from .models.continuous_replication_performance import ContinuousReplicationPerformance +from .models.cross_origin_resource_sharing_policy import CrossOriginResourceSharingPolicy +from .models.cross_origin_resource_sharing_policy_patch import CrossOriginResourceSharingPolicyPatch +from .models.cross_origin_resource_sharing_policy_rule import CrossOriginResourceSharingPolicyRule +from .models.cross_origin_resource_sharing_policy_rule_bulk_manage import CrossOriginResourceSharingPolicyRuleBulkManage +from .models.cross_origin_resource_sharing_policy_rule_post import CrossOriginResourceSharingPolicyRulePost +from .models.direction import Direction +from .models.directory_service import DirectoryService +from .models.directory_service_management import DirectoryServiceManagement +from .models.directory_service_nfs import DirectoryServiceNfs +from .models.directory_service_role import DirectoryServiceRole +from .models.directory_service_smb import DirectoryServiceSmb +from .models.dns import Dns +from .models.drive import Drive +from .models.eula import Eula +from .models.eula_signature import EulaSignature +from .models.file_info import FileInfo +from .models.file_lock import FileLock +from .models.file_lock_range import FileLockRange +from .models.file_session import FileSession +from .models.file_system import FileSystem +from .models.file_system_client import FileSystemClient +from .models.file_system_group_performance import FileSystemGroupPerformance +from .models.file_system_lock_nlm_reclamation import FileSystemLockNlmReclamation +from .models.file_system_patch import FileSystemPatch +from .models.file_system_performance import FileSystemPerformance +from .models.file_system_post import FileSystemPost +from .models.file_system_replica_link import FileSystemReplicaLink +from .models.file_system_snapshot import FileSystemSnapshot +from .models.file_system_snapshot_post import FileSystemSnapshotPost +from .models.file_system_snapshot_transfer import FileSystemSnapshotTransfer +from .models.file_system_user_performance import FileSystemUserPerformance +from .models.fixed_location_reference import FixedLocationReference +from .models.fixed_reference import FixedReference +from .models.fixed_reference_name_only import FixedReferenceNameOnly +from .models.fixed_reference_no_id import FixedReferenceNoId +from .models.fixed_reference_no_resource_type import FixedReferenceNoResourceType +from .models.fixed_reference_with_remote import FixedReferenceWithRemote +from .models.group import Group +from .models.group_quota import GroupQuota +from .models.group_quota_patch import GroupQuotaPatch +from .models.group_quota_post import GroupQuotaPost +from .models.hardware import Hardware +from .models.hardware_connector import HardwareConnector +from .models.hardware_connector_performance import HardwareConnectorPerformance +from .models.http import Http +from .models.keytab import Keytab +from .models.keytab_file_base64 import KeytabFileBase64 +from .models.keytab_file_binary import KeytabFileBinary +from .models.keytab_post import KeytabPost +from .models.kmip_server import KmipServer +from .models.lifecycle_rule import LifecycleRule +from .models.lifecycle_rule_config_extension import LifecycleRuleConfigExtension +from .models.lifecycle_rule_patch import LifecycleRulePatch +from .models.lifecycle_rule_post import LifecycleRulePost +from .models.link_aggregation_group import LinkAggregationGroup +from .models.linkaggregationgroup import Linkaggregationgroup +from .models.location_reference import LocationReference +from .models.login import Login +from .models.logs_async import LogsAsync +from .models.member import Member +from .models.member_link import MemberLink +from .models.multi_protocol import MultiProtocol +from .models.multi_protocol_post import MultiProtocolPost +from .models.network_access_policy import NetworkAccessPolicy +from .models.network_access_policy_rule import NetworkAccessPolicyRule +from .models.network_access_policy_rule_base import NetworkAccessPolicyRuleBase +from .models.network_access_policy_rule_in_policy import NetworkAccessPolicyRuleInPolicy +from .models.network_access_policy_rule_post import NetworkAccessPolicyRulePost +from .models.network_access_policy_rule_post_base import NetworkAccessPolicyRulePostBase +from .models.network_interface import NetworkInterface +from .models.network_interface_patch import NetworkInterfacePatch +from .models.network_interface_ping import NetworkInterfacePing +from .models.network_interface_trace import NetworkInterfaceTrace +from .models.nfs import Nfs +from .models.nfs_export_policy import NfsExportPolicy +from .models.nfs_export_policy_post import NfsExportPolicyPost +from .models.nfs_export_policy_rule import NfsExportPolicyRule +from .models.nfs_export_policy_rule_base import NfsExportPolicyRuleBase +from .models.nfs_export_policy_rule_in_policy import NfsExportPolicyRuleInPolicy +from .models.nfs_patch import NfsPatch +from .models.object_backlog import ObjectBacklog +from .models.object_lock_config_base import ObjectLockConfigBase +from .models.object_lock_config_request_body import ObjectLockConfigRequestBody +from .models.object_store_access_key import ObjectStoreAccessKey +from .models.object_store_access_key_post import ObjectStoreAccessKeyPost +from .models.object_store_access_policy import ObjectStoreAccessPolicy +from .models.object_store_access_policy_action import ObjectStoreAccessPolicyAction +from .models.object_store_access_policy_patch import ObjectStoreAccessPolicyPatch +from .models.object_store_access_policy_post import ObjectStoreAccessPolicyPost +from .models.object_store_access_policy_rule import ObjectStoreAccessPolicyRule +from .models.object_store_account import ObjectStoreAccount +from .models.object_store_account_patch import ObjectStoreAccountPatch +from .models.object_store_account_post import ObjectStoreAccountPost +from .models.object_store_remote_credential_get_resp import ObjectStoreRemoteCredentialGetResp +from .models.object_store_remote_credentials import ObjectStoreRemoteCredentials +from .models.object_store_remote_credentials_post import ObjectStoreRemoteCredentialsPost +from .models.object_store_remote_credentials_resp import ObjectStoreRemoteCredentialsResp +from .models.object_store_user import ObjectStoreUser +from .models.object_store_virtual_host import ObjectStoreVirtualHost +from .models.page_info import PageInfo +from .models.permission import Permission +from .models.policy import Policy +from .models.policy_base import PolicyBase +from .models.policy_base_renameable import PolicyBaseRenameable +from .models.policy_file_system_snapshot import PolicyFileSystemSnapshot +from .models.policy_local_member import PolicyLocalMember +from .models.policy_member import PolicyMember +from .models.policy_member_with_remote import PolicyMemberWithRemote +from .models.policy_patch import PolicyPatch +from .models.policy_rule import PolicyRule +from .models.policy_rule_index import PolicyRuleIndex +from .models.policy_rule_index_in_policy import PolicyRuleIndexInPolicy +from .models.policy_rule_object_access import PolicyRuleObjectAccess +from .models.policy_rule_object_access_bulk_manage import PolicyRuleObjectAccessBulkManage +from .models.policy_rule_object_access_condition import PolicyRuleObjectAccessCondition +from .models.policy_rule_object_access_post import PolicyRuleObjectAccessPost +from .models.public_access_config import PublicAccessConfig +from .models.public_key import PublicKey +from .models.public_key_post import PublicKeyPost +from .models.public_key_use import PublicKeyUse +from .models.quota_setting import QuotaSetting +from .models.rapid_data_locking import RapidDataLocking +from .models.reference import Reference +from .models.reference_writable import ReferenceWritable +from .models.relationship_performance_replication import RelationshipPerformanceReplication +from .models.replica_link_built_in import ReplicaLinkBuiltIn +from .models.replication_performance import ReplicationPerformance +from .models.resource import Resource +from .models.resource_performance_replication import ResourcePerformanceReplication +from .models.resource_type import ResourceType +from .models.role import Role +from .models.smtp import SMTP +from .models.session import Session +from .models.smb import Smb +from .models.smb_client_policy import SmbClientPolicy +from .models.smb_client_policy_post import SmbClientPolicyPost +from .models.smb_client_policy_rule import SmbClientPolicyRule +from .models.smb_client_policy_rule_base import SmbClientPolicyRuleBase +from .models.smb_client_policy_rule_in_policy import SmbClientPolicyRuleInPolicy +from .models.smb_client_policy_rule_post import SmbClientPolicyRulePost +from .models.smb_client_policy_rule_post_base import SmbClientPolicyRulePostBase +from .models.smb_client_policy_rule_post_in_policy import SmbClientPolicyRulePostInPolicy +from .models.smb_post import SmbPost +from .models.smb_share_policy import SmbSharePolicy +from .models.smb_share_policy_post import SmbSharePolicyPost +from .models.smb_share_policy_rule import SmbSharePolicyRule +from .models.smb_share_policy_rule_post import SmbSharePolicyRulePost +from .models.smtp_server import SmtpServer +from .models.snmp_agent import SnmpAgent +from .models.snmp_agent_mib import SnmpAgentMib +from .models.snmp_manager import SnmpManager +from .models.snmp_manager_post import SnmpManagerPost +from .models.snmp_manager_test import SnmpManagerTest +from .models.snmp_v2c import SnmpV2c +from .models.snmp_v3 import SnmpV3 +from .models.snmp_v3_post import SnmpV3Post +from .models.space import Space +from .models.space_extended import SpaceExtended +from .models.ssh_certificate_authority_policy import SshCertificateAuthorityPolicy +from .models.ssh_certificate_authority_policy_post import SshCertificateAuthorityPolicyPost +from .models.subnet import Subnet +from .models.support import Support +from .models.support_remote_assist_paths import SupportRemoteAssistPaths +from .models.syslog_server import SyslogServer +from .models.syslog_server_patch import SyslogServerPatch +from .models.syslog_server_post import SyslogServerPost +from .models.syslog_server_post_or_patch import SyslogServerPostOrPatch +from .models.syslog_server_settings import SyslogServerSettings +from .models.target import Target +from .models.target_post import TargetPost +from .models.test_result import TestResult +from .models.throttle import Throttle +from .models.time_window import TimeWindow +from .models.time_zone import TimeZone +from .models.user import User +from .models.user_no_id import UserNoId +from .models.user_quota import UserQuota +from .models.user_quota_patch import UserQuotaPatch +from .models.user_quota_post import UserQuotaPost +from .models.verification_key import VerificationKey +from .models.verification_key_patch import VerificationKeyPatch +from .models.version import Version + + +def add_properties(model): + for name, value in model.attribute_map.items(): + setattr(model, name, Property(value)) + + +CLASSES_TO_ADD_PROPS = [ + ActiveDirectory, + ActiveDirectoryDirectoryServers, + ActiveDirectoryPatch, + ActiveDirectoryPost, + Admin, + AdminApiToken, + AdminCache, + AdminPatch, + AdminSetting, + Alert, + AlertWatcher, + AlertWatcherPost, + ApiClient, + ApiClientsPost, + ApiToken, + ApiVersion, + Array, + ArrayConnection, + ArrayConnectionKey, + ArrayConnectionPath, + ArrayConnectionPost, + ArrayEncryption, + ArrayEncryptionDataAtRest, + ArrayEradicationConfig, + ArrayFactoryResetToken, + ArrayHttpSpecificPerformance, + ArrayHttpSpecificPerformanceGet, + ArrayNfsSpecificPerformance, + ArrayNfsSpecificPerformanceGet, + ArrayPerformance, + ArrayPerformanceReplicationGetResp, + ArrayS3SpecificPerformance, + ArrayS3SpecificPerformanceGetResp, + ArraySpace, + Audit, + AuditFileSystemsPolicies, + AuditFileSystemsPoliciesPatch, + AuditFileSystemsPoliciesPost, + AuditFileSystemsPolicy, + Blade, + Bucket, + BucketAccessPolicy, + BucketAccessPolicyPost, + BucketAccessPolicyRule, + BucketAccessPolicyRuleBulkManage, + BucketAccessPolicyRulePost, + BucketAccessPolicyRulePrincipal, + BucketDefaults, + BucketDefaultsReadonly, + BucketEradicationConfig, + BucketPatch, + BucketPerformance, + BucketPost, + BucketReplicaLink, + BucketReplicaLinkPost, + BucketS3SpecificPerformance, + BucketS3SpecificPerformanceGetResp, + BuiltIn, + BuiltInNoId, + BuiltInRelationship, + Certificate, + CertificateCertificateGroupGetResp, + CertificateGroup, + CertificateGroupCertificateGetResp, + CertificateGroupUse, + CertificatePatch, + CertificatePost, + CertificateUse, + ClientPerformance, + ConnectionRelationshipPerformanceReplication, + ConnectionRelationshipPerformanceReplicationGetResp, + ContinuousReplicationPerformance, + CrossOriginResourceSharingPolicy, + CrossOriginResourceSharingPolicyPatch, + CrossOriginResourceSharingPolicyRule, + CrossOriginResourceSharingPolicyRuleBulkManage, + CrossOriginResourceSharingPolicyRulePost, + Direction, + DirectoryService, + DirectoryServiceManagement, + DirectoryServiceNfs, + DirectoryServiceRole, + DirectoryServiceSmb, + Dns, + Drive, + Eula, + EulaSignature, + FileInfo, + FileLock, + FileLockRange, + FileSession, + FileSystem, + FileSystemClient, + FileSystemGroupPerformance, + FileSystemLockNlmReclamation, + FileSystemPatch, + FileSystemPerformance, + FileSystemPost, + FileSystemReplicaLink, + FileSystemSnapshot, + FileSystemSnapshotPost, + FileSystemSnapshotTransfer, + FileSystemUserPerformance, + FixedLocationReference, + FixedReference, + FixedReferenceNameOnly, + FixedReferenceNoId, + FixedReferenceNoResourceType, + FixedReferenceWithRemote, + Group, + GroupQuota, + GroupQuotaPatch, + GroupQuotaPost, + Hardware, + HardwareConnector, + HardwareConnectorPerformance, + Http, + Keytab, + KeytabFileBase64, + KeytabFileBinary, + KeytabPost, + KmipServer, + LifecycleRule, + LifecycleRuleConfigExtension, + LifecycleRulePatch, + LifecycleRulePost, + LinkAggregationGroup, + Linkaggregationgroup, + LocationReference, + Login, + LogsAsync, + Member, + MemberLink, + MultiProtocol, + MultiProtocolPost, + NetworkAccessPolicy, + NetworkAccessPolicyRule, + NetworkAccessPolicyRuleBase, + NetworkAccessPolicyRuleInPolicy, + NetworkAccessPolicyRulePost, + NetworkAccessPolicyRulePostBase, + NetworkInterface, + NetworkInterfacePatch, + NetworkInterfacePing, + NetworkInterfaceTrace, + Nfs, + NfsExportPolicy, + NfsExportPolicyPost, + NfsExportPolicyRule, + NfsExportPolicyRuleBase, + NfsExportPolicyRuleInPolicy, + NfsPatch, + ObjectBacklog, + ObjectLockConfigBase, + ObjectLockConfigRequestBody, + ObjectStoreAccessKey, + ObjectStoreAccessKeyPost, + ObjectStoreAccessPolicy, + ObjectStoreAccessPolicyAction, + ObjectStoreAccessPolicyPatch, + ObjectStoreAccessPolicyPost, + ObjectStoreAccessPolicyRule, + ObjectStoreAccount, + ObjectStoreAccountPatch, + ObjectStoreAccountPost, + ObjectStoreRemoteCredentialGetResp, + ObjectStoreRemoteCredentials, + ObjectStoreRemoteCredentialsPost, + ObjectStoreRemoteCredentialsResp, + ObjectStoreUser, + ObjectStoreVirtualHost, + PageInfo, + Permission, + Policy, + PolicyBase, + PolicyBaseRenameable, + PolicyFileSystemSnapshot, + PolicyLocalMember, + PolicyMember, + PolicyMemberWithRemote, + PolicyPatch, + PolicyRule, + PolicyRuleIndex, + PolicyRuleIndexInPolicy, + PolicyRuleObjectAccess, + PolicyRuleObjectAccessBulkManage, + PolicyRuleObjectAccessCondition, + PolicyRuleObjectAccessPost, + PublicAccessConfig, + PublicKey, + PublicKeyPost, + PublicKeyUse, + QuotaSetting, + RapidDataLocking, + Reference, + ReferenceWritable, + RelationshipPerformanceReplication, + ReplicaLinkBuiltIn, + ReplicationPerformance, + Resource, + ResourcePerformanceReplication, + ResourceType, + Role, + SMTP, + Session, + Smb, + SmbClientPolicy, + SmbClientPolicyPost, + SmbClientPolicyRule, + SmbClientPolicyRuleBase, + SmbClientPolicyRuleInPolicy, + SmbClientPolicyRulePost, + SmbClientPolicyRulePostBase, + SmbClientPolicyRulePostInPolicy, + SmbPost, + SmbSharePolicy, + SmbSharePolicyPost, + SmbSharePolicyRule, + SmbSharePolicyRulePost, + SmtpServer, + SnmpAgent, + SnmpAgentMib, + SnmpManager, + SnmpManagerPost, + SnmpManagerTest, + SnmpV2c, + SnmpV3, + SnmpV3Post, + Space, + SpaceExtended, + SshCertificateAuthorityPolicy, + SshCertificateAuthorityPolicyPost, + Subnet, + Support, + SupportRemoteAssistPaths, + SyslogServer, + SyslogServerPatch, + SyslogServerPost, + SyslogServerPostOrPatch, + SyslogServerSettings, + Target, + TargetPost, + TestResult, + Throttle, + TimeWindow, + TimeZone, + User, + UserNoId, + UserQuota, + UserQuotaPatch, + UserQuotaPost, + VerificationKey, + VerificationKeyPatch, + Version +] + +if os.environ.get('DOCS_GENERATION') is None: + for model in CLASSES_TO_ADD_PROPS: + add_properties(model) diff --git a/pypureclient/flashblade/FB_2_14/api/__init__.py b/pypureclient/flashblade/FB_2_14/api/__init__.py new file mode 100644 index 000000000..5a0d614ab --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/api/__init__.py @@ -0,0 +1,61 @@ +from __future__ import absolute_import + +# import apis into api package +from .api_clients_api import APIClientsApi +from .active_directory_api import ActiveDirectoryApi +from .administrators_api import AdministratorsApi +from .alert_watchers_api import AlertWatchersApi +from .alerts_api import AlertsApi +from .array_connections_api import ArrayConnectionsApi +from .arrays_api import ArraysApi +from .audits_api import AuditsApi +from .authorization_api import AuthorizationApi +from .blades_api import BladesApi +from .bucket_replica_links_api import BucketReplicaLinksApi +from .buckets_api import BucketsApi +from .certificate_groups_api import CertificateGroupsApi +from .certificates_api import CertificatesApi +from .clients_api import ClientsApi +from .dns_api import DNSApi +from .directory_services_api import DirectoryServicesApi +from .drives_api import DrivesApi +from .file_system_replica_links_api import FileSystemReplicaLinksApi +from .file_system_snapshots_api import FileSystemSnapshotsApi +from .file_systems_api import FileSystemsApi +from .hardware_api import HardwareApi +from .hardware_connectors_api import HardwareConnectorsApi +from .kmip_api import KMIPApi +from .keytabs_api import KeytabsApi +from .lifecycle_rules_api import LifecycleRulesApi +from .link_aggregation_groups_api import LinkAggregationGroupsApi +from .logs_api import LogsApi +from .network_interfaces_api import NetworkInterfacesApi +from .object_store_access_keys_api import ObjectStoreAccessKeysApi +from .object_store_accounts_api import ObjectStoreAccountsApi +from .object_store_remote_credentials_api import ObjectStoreRemoteCredentialsApi +from .object_store_users_api import ObjectStoreUsersApi +from .object_store_virtual_hosts_api import ObjectStoreVirtualHostsApi +from .policies__all_api import PoliciesAllApi +from .policies___audit_for_file_systems_api import PoliciesAuditForFileSystemsApi +from .policies___nfs_api import PoliciesNFSApi +from .policies___network_access_api import PoliciesNetworkAccessApi +from .policies___object_store_access_api import PoliciesObjectStoreAccessApi +from .policies___smb_client_api import PoliciesSMBClientApi +from .policies___smb_share_api import PoliciesSMBShareApi +from .policies___ssh_certificate_authority_api import PoliciesSSHCertificateAuthorityApi +from .policies___snapshot_api import PoliciesSnapshotApi +from .public_keys_api import PublicKeysApi +from .quotas_api import QuotasApi +from .rdl_api import RDLApi +from .roles_api import RolesApi +from .smtp_api import SMTPApi +from .snmp_agents_api import SNMPAgentsApi +from .snmp_managers_api import SNMPManagersApi +from .sessions_api import SessionsApi +from .subnets_api import SubnetsApi +from .support_api import SupportApi +from .syslog_api import SyslogApi +from .targets_api import TargetsApi +from .usage_api import UsageApi +from .verification_keys_api import VerificationKeysApi + diff --git a/pypureclient/flashblade/FB_2_14/api/active_directory_api.py b/pypureclient/flashblade/FB_2_14/api/active_directory_api.py new file mode 100644 index 000000000..8dbf904e7 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/api/active_directory_api.py @@ -0,0 +1,563 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import re + +# python 2 and python 3 compatibility library +import six +import uuid +from typing import List, Optional + +from .. import models + +class ActiveDirectoryApi(object): + + def __init__(self, api_client): + self.api_client = api_client + + def api214_active_directory_delete_with_http_info( + self, + x_request_id=None, # type: str + ids=None, # type: List[str] + local_only=None, # type: bool + names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> None + """DELETE active-directory + + Delete an Active Directory account. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_active_directory_delete_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param list[str] ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :param bool local_only: If specified as `true`, only delete the Active Directory configuration on the local array, without deleting the computer account created in the Active Directory domain. If not specified, defaults to `false`. + :param list[str] names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: None + If the method is called asynchronously, + returns the request thread. + """ + if ids is not None: + if not isinstance(ids, list): + ids = [ids] + if names is not None: + if not isinstance(names, list): + names = [names] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + collection_formats = {} + path_params = {} + + query_params = [] + if 'ids' in params: + query_params.append(('ids', params['ids'])) + collection_formats['ids'] = 'csv' + if 'local_only' in params: + query_params.append(('local_only', params['local_only'])) + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/active-directory', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_active_directory_get_with_http_info( + self, + x_request_id=None, # type: str + continuation_token=None, # type: str + filter=None, # type: str + ids=None, # type: List[str] + limit=None, # type: int + names=None, # type: List[str] + offset=None, # type: int + sort=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.ActiveDirectoryGetResponse + """GET active-directory + + List an Active Directory account and its configuration. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_active_directory_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param str continuation_token: An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result. + :param str filter: Exclude resources that don't match the specified criteria. + :param list[str] ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :param int limit: Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the maximum number, the request is still valid. In that case the server just returns the maximum number of items, disregarding the client's page size request. + :param list[str] names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :param int offset: The offset of the first resource to return from a collection. + :param list[str] sort: Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: ActiveDirectoryGetResponse + If the method is called asynchronously, + returns the request thread. + """ + if ids is not None: + if not isinstance(ids, list): + ids = [ids] + if names is not None: + if not isinstance(names, list): + names = [names] + if sort is not None: + if not isinstance(sort, list): + sort = [sort] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + if 'limit' in params and params['limit'] < 1: + raise ValueError("Invalid value for parameter `limit` when calling `api214_active_directory_get`, must be a value greater than or equal to `1`") + if 'offset' in params and params['offset'] < 0: + raise ValueError("Invalid value for parameter `offset` when calling `api214_active_directory_get`, must be a value greater than or equal to `0`") + collection_formats = {} + path_params = {} + + query_params = [] + if 'continuation_token' in params: + query_params.append(('continuation_token', params['continuation_token'])) + if 'filter' in params: + query_params.append(('filter', params['filter'])) + if 'ids' in params: + query_params.append(('ids', params['ids'])) + collection_formats['ids'] = 'csv' + if 'limit' in params: + query_params.append(('limit', params['limit'])) + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + if 'offset' in params: + query_params.append(('offset', params['offset'])) + if 'sort' in params: + query_params.append(('sort', params['sort'])) + collection_formats['sort'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/active-directory', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ActiveDirectoryGetResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_active_directory_patch_with_http_info( + self, + active_directory=None, # type: models.ActiveDirectoryPatch + x_request_id=None, # type: str + ids=None, # type: List[str] + names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.ActiveDirectoryResponse + """PATCH active-directory + + Modify the configuration of an Active Directory account. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_active_directory_patch_with_http_info(active_directory, async_req=True) + >>> result = thread.get() + + :param ActiveDirectoryPatch active_directory: (required) + :param str x_request_id: Supplied by client during request or generated by server. + :param list[str] ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :param list[str] names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: ActiveDirectoryResponse + If the method is called asynchronously, + returns the request thread. + """ + if ids is not None: + if not isinstance(ids, list): + ids = [ids] + if names is not None: + if not isinstance(names, list): + names = [names] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + # verify the required parameter 'active_directory' is set + if active_directory is None: + raise TypeError("Missing the required parameter `active_directory` when calling `api214_active_directory_patch`") + + collection_formats = {} + path_params = {} + + query_params = [] + if 'ids' in params: + query_params.append(('ids', params['ids'])) + collection_formats['ids'] = 'csv' + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + if 'active_directory' in params: + body_params = params['active_directory'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/active-directory', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ActiveDirectoryResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_active_directory_post_with_http_info( + self, + active_directory=None, # type: models.ActiveDirectoryPost + x_request_id=None, # type: str + names=None, # type: List[str] + join_existing_account=None, # type: bool + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.ActiveDirectoryResponse + """POST active-directory + + Join an Active Directory domain and generate keytabs for the registered SPNs and supported encryption types. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_active_directory_post_with_http_info(active_directory, async_req=True) + >>> result = thread.get() + + :param ActiveDirectoryPost active_directory: (required) + :param str x_request_id: Supplied by client during request or generated by server. + :param list[str] names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :param bool join_existing_account: If specified as `true`, the domain is searched for a pre-existing computer account to join to, and no new account will be created within the domain. The `user` specified when joining to a pre-existing account must have permissions to 'read attributes from' and 'reset the password of' the pre-existing account. `service_principal_names`, `encryption_types`, and `join_ou` will be read from the pre-existing account and cannot be specified when joining to an existing account. If not specified, defaults to `false`. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: ActiveDirectoryResponse + If the method is called asynchronously, + returns the request thread. + """ + if names is not None: + if not isinstance(names, list): + names = [names] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + # verify the required parameter 'active_directory' is set + if active_directory is None: + raise TypeError("Missing the required parameter `active_directory` when calling `api214_active_directory_post`") + + collection_formats = {} + path_params = {} + + query_params = [] + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + if 'join_existing_account' in params: + query_params.append(('join_existing_account', params['join_existing_account'])) + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + if 'active_directory' in params: + body_params = params['active_directory'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/active-directory', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ActiveDirectoryResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_active_directory_test_get_with_http_info( + self, + x_request_id=None, # type: str + filter=None, # type: str + ids=None, # type: List[str] + limit=None, # type: int + names=None, # type: List[str] + sort=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.TestResultGetResponse + """GET active-directory/test + + Testing if the configuration of an Active Directory account is valid. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_active_directory_test_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param str filter: Exclude resources that don't match the specified criteria. + :param list[str] ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :param int limit: Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the maximum number, the request is still valid. In that case the server just returns the maximum number of items, disregarding the client's page size request. + :param list[str] names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :param list[str] sort: Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: TestResultGetResponse + If the method is called asynchronously, + returns the request thread. + """ + if ids is not None: + if not isinstance(ids, list): + ids = [ids] + if names is not None: + if not isinstance(names, list): + names = [names] + if sort is not None: + if not isinstance(sort, list): + sort = [sort] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + if 'limit' in params and params['limit'] < 1: + raise ValueError("Invalid value for parameter `limit` when calling `api214_active_directory_test_get`, must be a value greater than or equal to `1`") + collection_formats = {} + path_params = {} + + query_params = [] + if 'filter' in params: + query_params.append(('filter', params['filter'])) + if 'ids' in params: + query_params.append(('ids', params['ids'])) + collection_formats['ids'] = 'csv' + if 'limit' in params: + query_params.append(('limit', params['limit'])) + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + if 'sort' in params: + query_params.append(('sort', params['sort'])) + collection_formats['sort'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/active-directory/test', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='TestResultGetResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) diff --git a/pypureclient/flashblade/FB_2_14/api/administrators_api.py b/pypureclient/flashblade/FB_2_14/api/administrators_api.py new file mode 100644 index 000000000..18815ab7a --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/api/administrators_api.py @@ -0,0 +1,993 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import re + +# python 2 and python 3 compatibility library +import six +import uuid +from typing import List, Optional + +from .. import models + +class AdministratorsApi(object): + + def __init__(self, api_client): + self.api_client = api_client + + def api214_admins_api_tokens_delete_with_http_info( + self, + x_request_id=None, # type: str + admin_ids=None, # type: List[str] + admin_names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> None + """DELETE admins/api-tokens + + Deletes the API tokens of the specified administrators. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_admins_api_tokens_delete_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param list[str] admin_ids: A comma-separated list of admin IDs. If after filtering, there is not at least one admin resource that matches each of the elements, then an error is returned. This cannot be provided together with the `admin_names` query parameter. + :param list[str] admin_names: A comma-separated list of admin names. If there is not at least one admin resource that matches each of the elements, then an error is returned. This cannot be provided together with `admin_ids` query parameter. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: None + If the method is called asynchronously, + returns the request thread. + """ + if admin_ids is not None: + if not isinstance(admin_ids, list): + admin_ids = [admin_ids] + if admin_names is not None: + if not isinstance(admin_names, list): + admin_names = [admin_names] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + collection_formats = {} + path_params = {} + + query_params = [] + if 'admin_ids' in params: + query_params.append(('admin_ids', params['admin_ids'])) + collection_formats['admin_ids'] = 'csv' + if 'admin_names' in params: + query_params.append(('admin_names', params['admin_names'])) + collection_formats['admin_names'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/admins/api-tokens', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_admins_api_tokens_get_with_http_info( + self, + x_request_id=None, # type: str + admin_ids=None, # type: List[str] + admin_names=None, # type: List[str] + continuation_token=None, # type: str + expose_api_token=None, # type: bool + filter=None, # type: str + limit=None, # type: int + offset=None, # type: int + sort=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.AdminApiTokenGetResponse + """GET admins/api-tokens + + Displays API tokens for the specified administrators. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_admins_api_tokens_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param list[str] admin_ids: A comma-separated list of admin IDs. If after filtering, there is not at least one admin resource that matches each of the elements, then an error is returned. This cannot be provided together with the `admin_names` query parameter. + :param list[str] admin_names: A comma-separated list of admin names. If there is not at least one admin resource that matches each of the elements, then an error is returned. This cannot be provided together with `admin_ids` query parameter. + :param str continuation_token: An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result. + :param bool expose_api_token: If `true`, exposes the API token of the current user. + :param str filter: Exclude resources that don't match the specified criteria. + :param int limit: Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the maximum number, the request is still valid. In that case the server just returns the maximum number of items, disregarding the client's page size request. + :param int offset: The offset of the first resource to return from a collection. + :param list[str] sort: Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: AdminApiTokenGetResponse + If the method is called asynchronously, + returns the request thread. + """ + if admin_ids is not None: + if not isinstance(admin_ids, list): + admin_ids = [admin_ids] + if admin_names is not None: + if not isinstance(admin_names, list): + admin_names = [admin_names] + if sort is not None: + if not isinstance(sort, list): + sort = [sort] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + if 'limit' in params and params['limit'] < 1: + raise ValueError("Invalid value for parameter `limit` when calling `api214_admins_api_tokens_get`, must be a value greater than or equal to `1`") + if 'offset' in params and params['offset'] < 0: + raise ValueError("Invalid value for parameter `offset` when calling `api214_admins_api_tokens_get`, must be a value greater than or equal to `0`") + collection_formats = {} + path_params = {} + + query_params = [] + if 'admin_ids' in params: + query_params.append(('admin_ids', params['admin_ids'])) + collection_formats['admin_ids'] = 'csv' + if 'admin_names' in params: + query_params.append(('admin_names', params['admin_names'])) + collection_formats['admin_names'] = 'csv' + if 'continuation_token' in params: + query_params.append(('continuation_token', params['continuation_token'])) + if 'expose_api_token' in params: + query_params.append(('expose_api_token', params['expose_api_token'])) + if 'filter' in params: + query_params.append(('filter', params['filter'])) + if 'limit' in params: + query_params.append(('limit', params['limit'])) + if 'offset' in params: + query_params.append(('offset', params['offset'])) + if 'sort' in params: + query_params.append(('sort', params['sort'])) + collection_formats['sort'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/admins/api-tokens', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='AdminApiTokenGetResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_admins_api_tokens_post_with_http_info( + self, + x_request_id=None, # type: str + admin_ids=None, # type: List[str] + admin_names=None, # type: List[str] + timeout=None, # type: int + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.AdminApiTokenResponse + """POST admins/api-tokens + + Creates API tokens for the specified administrators. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_admins_api_tokens_post_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param list[str] admin_ids: A comma-separated list of admin IDs. If after filtering, there is not at least one admin resource that matches each of the elements, then an error is returned. This cannot be provided together with the `admin_names` query parameter. + :param list[str] admin_names: A comma-separated list of admin names. If there is not at least one admin resource that matches each of the elements, then an error is returned. This cannot be provided together with `admin_ids` query parameter. + :param int timeout: The duration of API token validity, in milliseconds. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: AdminApiTokenResponse + If the method is called asynchronously, + returns the request thread. + """ + if admin_ids is not None: + if not isinstance(admin_ids, list): + admin_ids = [admin_ids] + if admin_names is not None: + if not isinstance(admin_names, list): + admin_names = [admin_names] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + collection_formats = {} + path_params = {} + + query_params = [] + if 'admin_ids' in params: + query_params.append(('admin_ids', params['admin_ids'])) + collection_formats['admin_ids'] = 'csv' + if 'admin_names' in params: + query_params.append(('admin_names', params['admin_names'])) + collection_formats['admin_names'] = 'csv' + if 'timeout' in params: + query_params.append(('timeout', params['timeout'])) + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/admins/api-tokens', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='AdminApiTokenResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_admins_cache_delete_with_http_info( + self, + x_request_id=None, # type: str + ids=None, # type: List[str] + names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> None + """DELETE admins/cache + + Delete cached administrator role information by name or ID. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_admins_cache_delete_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param list[str] ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :param list[str] names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: None + If the method is called asynchronously, + returns the request thread. + """ + if ids is not None: + if not isinstance(ids, list): + ids = [ids] + if names is not None: + if not isinstance(names, list): + names = [names] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + collection_formats = {} + path_params = {} + + query_params = [] + if 'ids' in params: + query_params.append(('ids', params['ids'])) + collection_formats['ids'] = 'csv' + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/admins/cache', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_admins_cache_get_with_http_info( + self, + x_request_id=None, # type: str + continuation_token=None, # type: str + filter=None, # type: str + ids=None, # type: List[str] + limit=None, # type: int + names=None, # type: List[str] + offset=None, # type: int + refresh=None, # type: bool + sort=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.AdminCacheGetResponse + """GET admins/cache + + List cached administrator information used to determine role based access control privileges. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_admins_cache_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param str continuation_token: An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result. + :param str filter: Exclude resources that don't match the specified criteria. + :param list[str] ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :param int limit: Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the maximum number, the request is still valid. In that case the server just returns the maximum number of items, disregarding the client's page size request. + :param list[str] names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :param int offset: The offset of the first resource to return from a collection. + :param bool refresh: Whether to refresh the user info from directory service. If not specified, defaults to `false`. + :param list[str] sort: Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: AdminCacheGetResponse + If the method is called asynchronously, + returns the request thread. + """ + if ids is not None: + if not isinstance(ids, list): + ids = [ids] + if names is not None: + if not isinstance(names, list): + names = [names] + if sort is not None: + if not isinstance(sort, list): + sort = [sort] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + if 'limit' in params and params['limit'] < 1: + raise ValueError("Invalid value for parameter `limit` when calling `api214_admins_cache_get`, must be a value greater than or equal to `1`") + if 'offset' in params and params['offset'] < 0: + raise ValueError("Invalid value for parameter `offset` when calling `api214_admins_cache_get`, must be a value greater than or equal to `0`") + collection_formats = {} + path_params = {} + + query_params = [] + if 'continuation_token' in params: + query_params.append(('continuation_token', params['continuation_token'])) + if 'filter' in params: + query_params.append(('filter', params['filter'])) + if 'ids' in params: + query_params.append(('ids', params['ids'])) + collection_formats['ids'] = 'csv' + if 'limit' in params: + query_params.append(('limit', params['limit'])) + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + if 'offset' in params: + query_params.append(('offset', params['offset'])) + if 'refresh' in params: + query_params.append(('refresh', params['refresh'])) + if 'sort' in params: + query_params.append(('sort', params['sort'])) + collection_formats['sort'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/admins/cache', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='AdminCacheGetResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_admins_get_with_http_info( + self, + x_request_id=None, # type: str + continuation_token=None, # type: str + expose_api_token=None, # type: bool + filter=None, # type: str + ids=None, # type: List[str] + limit=None, # type: int + names=None, # type: List[str] + offset=None, # type: int + sort=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.AdminGetResponse + """GET admins + + List the administrator's attributes, including the API token and public key. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_admins_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param str continuation_token: An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result. + :param bool expose_api_token: If `true`, exposes the API token of the current user. + :param str filter: Exclude resources that don't match the specified criteria. + :param list[str] ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :param int limit: Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the maximum number, the request is still valid. In that case the server just returns the maximum number of items, disregarding the client's page size request. + :param list[str] names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :param int offset: The offset of the first resource to return from a collection. + :param list[str] sort: Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: AdminGetResponse + If the method is called asynchronously, + returns the request thread. + """ + if ids is not None: + if not isinstance(ids, list): + ids = [ids] + if names is not None: + if not isinstance(names, list): + names = [names] + if sort is not None: + if not isinstance(sort, list): + sort = [sort] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + if 'limit' in params and params['limit'] < 1: + raise ValueError("Invalid value for parameter `limit` when calling `api214_admins_get`, must be a value greater than or equal to `1`") + if 'offset' in params and params['offset'] < 0: + raise ValueError("Invalid value for parameter `offset` when calling `api214_admins_get`, must be a value greater than or equal to `0`") + collection_formats = {} + path_params = {} + + query_params = [] + if 'continuation_token' in params: + query_params.append(('continuation_token', params['continuation_token'])) + if 'expose_api_token' in params: + query_params.append(('expose_api_token', params['expose_api_token'])) + if 'filter' in params: + query_params.append(('filter', params['filter'])) + if 'ids' in params: + query_params.append(('ids', params['ids'])) + collection_formats['ids'] = 'csv' + if 'limit' in params: + query_params.append(('limit', params['limit'])) + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + if 'offset' in params: + query_params.append(('offset', params['offset'])) + if 'sort' in params: + query_params.append(('sort', params['sort'])) + collection_formats['sort'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/admins', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='AdminGetResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_admins_patch_with_http_info( + self, + admin=None, # type: models.AdminPatch + x_request_id=None, # type: str + ids=None, # type: List[str] + names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.AdminResponse + """PATCH admins + + Modify the attributes of the administrator. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_admins_patch_with_http_info(admin, async_req=True) + >>> result = thread.get() + + :param AdminPatch admin: (required) + :param str x_request_id: Supplied by client during request or generated by server. + :param list[str] ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :param list[str] names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: AdminResponse + If the method is called asynchronously, + returns the request thread. + """ + if ids is not None: + if not isinstance(ids, list): + ids = [ids] + if names is not None: + if not isinstance(names, list): + names = [names] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + # verify the required parameter 'admin' is set + if admin is None: + raise TypeError("Missing the required parameter `admin` when calling `api214_admins_patch`") + + collection_formats = {} + path_params = {} + + query_params = [] + if 'ids' in params: + query_params.append(('ids', params['ids'])) + collection_formats['ids'] = 'csv' + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + if 'admin' in params: + body_params = params['admin'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/admins', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='AdminResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_admins_settings_get_with_http_info( + self, + x_request_id=None, # type: str + continuation_token=None, # type: str + filter=None, # type: str + limit=None, # type: int + offset=None, # type: int + sort=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.AdminSettingsGetResponse + """List global admin settings + + Return global admin settings. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_admins_settings_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param str continuation_token: An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result. + :param str filter: Exclude resources that don't match the specified criteria. + :param int limit: Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the maximum number, the request is still valid. In that case the server just returns the maximum number of items, disregarding the client's page size request. + :param int offset: The offset of the first resource to return from a collection. + :param list[str] sort: Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: AdminSettingsGetResponse + If the method is called asynchronously, + returns the request thread. + """ + if sort is not None: + if not isinstance(sort, list): + sort = [sort] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + if 'limit' in params and params['limit'] < 1: + raise ValueError("Invalid value for parameter `limit` when calling `api214_admins_settings_get`, must be a value greater than or equal to `1`") + if 'offset' in params and params['offset'] < 0: + raise ValueError("Invalid value for parameter `offset` when calling `api214_admins_settings_get`, must be a value greater than or equal to `0`") + collection_formats = {} + path_params = {} + + query_params = [] + if 'continuation_token' in params: + query_params.append(('continuation_token', params['continuation_token'])) + if 'filter' in params: + query_params.append(('filter', params['filter'])) + if 'limit' in params: + query_params.append(('limit', params['limit'])) + if 'offset' in params: + query_params.append(('offset', params['offset'])) + if 'sort' in params: + query_params.append(('sort', params['sort'])) + collection_formats['sort'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/admins/settings', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='AdminSettingsGetResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_admins_settings_patch_with_http_info( + self, + admin_setting=None, # type: models.AdminSetting + x_request_id=None, # type: str + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.AdminSettingsResponse + """Update global admin settings + + Update properties for global admin settings. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_admins_settings_patch_with_http_info(admin_setting, async_req=True) + >>> result = thread.get() + + :param AdminSetting admin_setting: (required) + :param str x_request_id: Supplied by client during request or generated by server. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: AdminSettingsResponse + If the method is called asynchronously, + returns the request thread. + """ + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + # verify the required parameter 'admin_setting' is set + if admin_setting is None: + raise TypeError("Missing the required parameter `admin_setting` when calling `api214_admins_settings_patch`") + + collection_formats = {} + path_params = {} + + query_params = [] + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + if 'admin_setting' in params: + body_params = params['admin_setting'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/admins/settings', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='AdminSettingsResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) diff --git a/pypureclient/flashblade/FB_2_14/api/alert_watchers_api.py b/pypureclient/flashblade/FB_2_14/api/alert_watchers_api.py new file mode 100644 index 000000000..3d9ab6290 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/api/alert_watchers_api.py @@ -0,0 +1,549 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import re + +# python 2 and python 3 compatibility library +import six +import uuid +from typing import List, Optional + +from .. import models + +class AlertWatchersApi(object): + + def __init__(self, api_client): + self.api_client = api_client + + def api214_alert_watchers_delete_with_http_info( + self, + x_request_id=None, # type: str + ids=None, # type: List[str] + names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> None + """DELETE alert-watchers + + Delete an alert watcher. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_alert_watchers_delete_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param list[str] ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :param list[str] names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: None + If the method is called asynchronously, + returns the request thread. + """ + if ids is not None: + if not isinstance(ids, list): + ids = [ids] + if names is not None: + if not isinstance(names, list): + names = [names] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + collection_formats = {} + path_params = {} + + query_params = [] + if 'ids' in params: + query_params.append(('ids', params['ids'])) + collection_formats['ids'] = 'csv' + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/alert-watchers', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_alert_watchers_get_with_http_info( + self, + x_request_id=None, # type: str + continuation_token=None, # type: str + filter=None, # type: str + ids=None, # type: List[str] + limit=None, # type: int + names=None, # type: List[str] + offset=None, # type: int + sort=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.AlertWatcherGetResponse + """GET alert-watchers + + List alert watchers that are configured to receive alert messages. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_alert_watchers_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param str continuation_token: An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result. + :param str filter: Exclude resources that don't match the specified criteria. + :param list[str] ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :param int limit: Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the maximum number, the request is still valid. In that case the server just returns the maximum number of items, disregarding the client's page size request. + :param list[str] names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :param int offset: The offset of the first resource to return from a collection. + :param list[str] sort: Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: AlertWatcherGetResponse + If the method is called asynchronously, + returns the request thread. + """ + if ids is not None: + if not isinstance(ids, list): + ids = [ids] + if names is not None: + if not isinstance(names, list): + names = [names] + if sort is not None: + if not isinstance(sort, list): + sort = [sort] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + if 'limit' in params and params['limit'] < 1: + raise ValueError("Invalid value for parameter `limit` when calling `api214_alert_watchers_get`, must be a value greater than or equal to `1`") + if 'offset' in params and params['offset'] < 0: + raise ValueError("Invalid value for parameter `offset` when calling `api214_alert_watchers_get`, must be a value greater than or equal to `0`") + collection_formats = {} + path_params = {} + + query_params = [] + if 'continuation_token' in params: + query_params.append(('continuation_token', params['continuation_token'])) + if 'filter' in params: + query_params.append(('filter', params['filter'])) + if 'ids' in params: + query_params.append(('ids', params['ids'])) + collection_formats['ids'] = 'csv' + if 'limit' in params: + query_params.append(('limit', params['limit'])) + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + if 'offset' in params: + query_params.append(('offset', params['offset'])) + if 'sort' in params: + query_params.append(('sort', params['sort'])) + collection_formats['sort'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/alert-watchers', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='AlertWatcherGetResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_alert_watchers_patch_with_http_info( + self, + alert_watcher=None, # type: models.AlertWatcher + x_request_id=None, # type: str + ids=None, # type: List[str] + names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.AlertWatcherResponse + """PATCH alert-watchers + + Modify an alert watcher’s configuration. Enable or disable an alert watcher privilege and select the level of alert notification of an alert watcher. Alert notification levels are `info`, `warning`, or `critical`. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_alert_watchers_patch_with_http_info(alert_watcher, async_req=True) + >>> result = thread.get() + + :param AlertWatcher alert_watcher: (required) + :param str x_request_id: Supplied by client during request or generated by server. + :param list[str] ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :param list[str] names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: AlertWatcherResponse + If the method is called asynchronously, + returns the request thread. + """ + if ids is not None: + if not isinstance(ids, list): + ids = [ids] + if names is not None: + if not isinstance(names, list): + names = [names] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + # verify the required parameter 'alert_watcher' is set + if alert_watcher is None: + raise TypeError("Missing the required parameter `alert_watcher` when calling `api214_alert_watchers_patch`") + + collection_formats = {} + path_params = {} + + query_params = [] + if 'ids' in params: + query_params.append(('ids', params['ids'])) + collection_formats['ids'] = 'csv' + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + if 'alert_watcher' in params: + body_params = params['alert_watcher'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/alert-watchers', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='AlertWatcherResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_alert_watchers_post_with_http_info( + self, + names=None, # type: List[str] + x_request_id=None, # type: str + alert_watcher=None, # type: models.AlertWatcherPost + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.AlertWatcherResponse + """POST alert-watchers + + Create an alert watcher to receive array alert messages. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_alert_watchers_post_with_http_info(names, async_req=True) + >>> result = thread.get() + + :param list[str] names: A comma-separated list of resource names. (required) + :param str x_request_id: Supplied by client during request or generated by server. + :param AlertWatcherPost alert_watcher: + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: AlertWatcherResponse + If the method is called asynchronously, + returns the request thread. + """ + if names is not None: + if not isinstance(names, list): + names = [names] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + # verify the required parameter 'names' is set + if names is None: + raise TypeError("Missing the required parameter `names` when calling `api214_alert_watchers_post`") + + collection_formats = {} + path_params = {} + + query_params = [] + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + if 'alert_watcher' in params: + body_params = params['alert_watcher'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/alert-watchers', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='AlertWatcherResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_alert_watchers_test_get_with_http_info( + self, + x_request_id=None, # type: str + filter=None, # type: str + ids=None, # type: List[str] + names=None, # type: List[str] + sort=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.TestResultResponse + """GET alert-watchers/test + + Test an alert watcher's contact information to verify alerts can be sent and received. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_alert_watchers_test_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param str filter: Exclude resources that don't match the specified criteria. + :param list[str] ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :param list[str] names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :param list[str] sort: Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: TestResultResponse + If the method is called asynchronously, + returns the request thread. + """ + if ids is not None: + if not isinstance(ids, list): + ids = [ids] + if names is not None: + if not isinstance(names, list): + names = [names] + if sort is not None: + if not isinstance(sort, list): + sort = [sort] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + collection_formats = {} + path_params = {} + + query_params = [] + if 'filter' in params: + query_params.append(('filter', params['filter'])) + if 'ids' in params: + query_params.append(('ids', params['ids'])) + collection_formats['ids'] = 'csv' + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + if 'sort' in params: + query_params.append(('sort', params['sort'])) + collection_formats['sort'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/alert-watchers/test', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='TestResultResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) diff --git a/pypureclient/flashblade/FB_2_14/api/alerts_api.py b/pypureclient/flashblade/FB_2_14/api/alerts_api.py new file mode 100644 index 000000000..69b2a1475 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/api/alerts_api.py @@ -0,0 +1,253 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import re + +# python 2 and python 3 compatibility library +import six +import uuid +from typing import List, Optional + +from .. import models + +class AlertsApi(object): + + def __init__(self, api_client): + self.api_client = api_client + + def api214_alerts_get_with_http_info( + self, + x_request_id=None, # type: str + continuation_token=None, # type: str + filter=None, # type: str + ids=None, # type: List[str] + limit=None, # type: int + names=None, # type: List[str] + offset=None, # type: int + sort=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.AlertGetResponse + """GET alerts + + Returns a list of alerts which have been generated by the array. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_alerts_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param str continuation_token: An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result. + :param str filter: Exclude resources that don't match the specified criteria. + :param list[str] ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :param int limit: Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the maximum number, the request is still valid. In that case the server just returns the maximum number of items, disregarding the client's page size request. + :param list[str] names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :param int offset: The offset of the first resource to return from a collection. + :param list[str] sort: Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: AlertGetResponse + If the method is called asynchronously, + returns the request thread. + """ + if ids is not None: + if not isinstance(ids, list): + ids = [ids] + if names is not None: + if not isinstance(names, list): + names = [names] + if sort is not None: + if not isinstance(sort, list): + sort = [sort] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + if 'limit' in params and params['limit'] < 1: + raise ValueError("Invalid value for parameter `limit` when calling `api214_alerts_get`, must be a value greater than or equal to `1`") + if 'offset' in params and params['offset'] < 0: + raise ValueError("Invalid value for parameter `offset` when calling `api214_alerts_get`, must be a value greater than or equal to `0`") + collection_formats = {} + path_params = {} + + query_params = [] + if 'continuation_token' in params: + query_params.append(('continuation_token', params['continuation_token'])) + if 'filter' in params: + query_params.append(('filter', params['filter'])) + if 'ids' in params: + query_params.append(('ids', params['ids'])) + collection_formats['ids'] = 'csv' + if 'limit' in params: + query_params.append(('limit', params['limit'])) + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + if 'offset' in params: + query_params.append(('offset', params['offset'])) + if 'sort' in params: + query_params.append(('sort', params['sort'])) + collection_formats['sort'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/alerts', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='AlertGetResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_alerts_patch_with_http_info( + self, + alerts_settings=None, # type: models.Alert + x_request_id=None, # type: str + ids=None, # type: List[str] + names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.AlertResponse + """PATCH alerts + + Make changes to an alert. This is currently limited to the alert's `flagged` property. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_alerts_patch_with_http_info(alerts_settings, async_req=True) + >>> result = thread.get() + + :param Alert alerts_settings: (required) + :param str x_request_id: Supplied by client during request or generated by server. + :param list[str] ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :param list[str] names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: AlertResponse + If the method is called asynchronously, + returns the request thread. + """ + if ids is not None: + if not isinstance(ids, list): + ids = [ids] + if names is not None: + if not isinstance(names, list): + names = [names] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + # verify the required parameter 'alerts_settings' is set + if alerts_settings is None: + raise TypeError("Missing the required parameter `alerts_settings` when calling `api214_alerts_patch`") + + collection_formats = {} + path_params = {} + + query_params = [] + if 'ids' in params: + query_params.append(('ids', params['ids'])) + collection_formats['ids'] = 'csv' + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + if 'alerts_settings' in params: + body_params = params['alerts_settings'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/alerts', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='AlertResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) diff --git a/pypureclient/flashblade/FB_2_14/api/api_clients_api.py b/pypureclient/flashblade/FB_2_14/api/api_clients_api.py new file mode 100644 index 000000000..6da706b0f --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/api/api_clients_api.py @@ -0,0 +1,442 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import re + +# python 2 and python 3 compatibility library +import six +import uuid +from typing import List, Optional + +from .. import models + +class APIClientsApi(object): + + def __init__(self, api_client): + self.api_client = api_client + + def api214_api_clients_delete_with_http_info( + self, + x_request_id=None, # type: str + ids=None, # type: List[str] + names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> None + """DELETE api-clients + + Delete the API client. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_api_clients_delete_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param list[str] ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :param list[str] names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: None + If the method is called asynchronously, + returns the request thread. + """ + if ids is not None: + if not isinstance(ids, list): + ids = [ids] + if names is not None: + if not isinstance(names, list): + names = [names] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + collection_formats = {} + path_params = {} + + query_params = [] + if 'ids' in params: + query_params.append(('ids', params['ids'])) + collection_formats['ids'] = 'csv' + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/api-clients', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_api_clients_get_with_http_info( + self, + x_request_id=None, # type: str + continuation_token=None, # type: str + filter=None, # type: str + ids=None, # type: List[str] + limit=None, # type: int + names=None, # type: List[str] + offset=None, # type: int + sort=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.ApiClientsResponse + """GET api-clients + + List an API client and its configuration attributes. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_api_clients_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param str continuation_token: An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result. + :param str filter: Exclude resources that don't match the specified criteria. + :param list[str] ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :param int limit: Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the maximum number, the request is still valid. In that case the server just returns the maximum number of items, disregarding the client's page size request. + :param list[str] names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :param int offset: The offset of the first resource to return from a collection. + :param list[str] sort: Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: ApiClientsResponse + If the method is called asynchronously, + returns the request thread. + """ + if ids is not None: + if not isinstance(ids, list): + ids = [ids] + if names is not None: + if not isinstance(names, list): + names = [names] + if sort is not None: + if not isinstance(sort, list): + sort = [sort] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + if 'limit' in params and params['limit'] < 1: + raise ValueError("Invalid value for parameter `limit` when calling `api214_api_clients_get`, must be a value greater than or equal to `1`") + if 'offset' in params and params['offset'] < 0: + raise ValueError("Invalid value for parameter `offset` when calling `api214_api_clients_get`, must be a value greater than or equal to `0`") + collection_formats = {} + path_params = {} + + query_params = [] + if 'continuation_token' in params: + query_params.append(('continuation_token', params['continuation_token'])) + if 'filter' in params: + query_params.append(('filter', params['filter'])) + if 'ids' in params: + query_params.append(('ids', params['ids'])) + collection_formats['ids'] = 'csv' + if 'limit' in params: + query_params.append(('limit', params['limit'])) + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + if 'offset' in params: + query_params.append(('offset', params['offset'])) + if 'sort' in params: + query_params.append(('sort', params['sort'])) + collection_formats['sort'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/api-clients', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ApiClientsResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_api_clients_patch_with_http_info( + self, + api_clients=None, # type: models.ApiClient + x_request_id=None, # type: str + ids=None, # type: List[str] + names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.ApiClientsResponse + """PATCH api-clients + + Modify an API client. Newly created API clients can be enabled by setting the `enabled` parameter to `true`. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_api_clients_patch_with_http_info(api_clients, async_req=True) + >>> result = thread.get() + + :param ApiClient api_clients: (required) + :param str x_request_id: Supplied by client during request or generated by server. + :param list[str] ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :param list[str] names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: ApiClientsResponse + If the method is called asynchronously, + returns the request thread. + """ + if ids is not None: + if not isinstance(ids, list): + ids = [ids] + if names is not None: + if not isinstance(names, list): + names = [names] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + # verify the required parameter 'api_clients' is set + if api_clients is None: + raise TypeError("Missing the required parameter `api_clients` when calling `api214_api_clients_patch`") + + collection_formats = {} + path_params = {} + + query_params = [] + if 'ids' in params: + query_params.append(('ids', params['ids'])) + collection_formats['ids'] = 'csv' + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + if 'api_clients' in params: + body_params = params['api_clients'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/api-clients', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ApiClientsResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_api_clients_post_with_http_info( + self, + api_client=None, # type: models.ApiClientsPost + x_request_id=None, # type: str + names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.ApiClientsResponse + """POST api-clients + + Create an API client to authorize Access Token or Bearer Tokens for use on the array. Required fields include `issuer`, `public_key`, and `access_token_ttl_in_ms`. After creating an API client, it can only be enabled by an authorized user. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_api_clients_post_with_http_info(api_client, async_req=True) + >>> result = thread.get() + + :param ApiClientsPost api_client: (required) + :param str x_request_id: Supplied by client during request or generated by server. + :param list[str] names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: ApiClientsResponse + If the method is called asynchronously, + returns the request thread. + """ + if names is not None: + if not isinstance(names, list): + names = [names] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + # verify the required parameter 'api_client' is set + if api_client is None: + raise TypeError("Missing the required parameter `api_client` when calling `api214_api_clients_post`") + + collection_formats = {} + path_params = {} + + query_params = [] + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + if 'api_client' in params: + body_params = params['api_client'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/api-clients', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ApiClientsResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) diff --git a/pypureclient/flashblade/FB_2_14/api/array_connections_api.py b/pypureclient/flashblade/FB_2_14/api/array_connections_api.py new file mode 100644 index 000000000..4f975a4a1 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/api/array_connections_api.py @@ -0,0 +1,948 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import re + +# python 2 and python 3 compatibility library +import six +import uuid +from typing import List, Optional + +from .. import models + +class ArrayConnectionsApi(object): + + def __init__(self, api_client): + self.api_client = api_client + + def api214_array_connections_connection_key_get_with_http_info( + self, + x_request_id=None, # type: str + continuation_token=None, # type: str + filter=None, # type: str + ids=None, # type: List[str] + limit=None, # type: int + names=None, # type: List[str] + offset=None, # type: int + sort=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.ArrayConnectionKeyGetResponse + """GET array-connections/connection-key + + List connection keys used to authenticate the connection from one array to another. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_array_connections_connection_key_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param str continuation_token: An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result. + :param str filter: Exclude resources that don't match the specified criteria. + :param list[str] ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :param int limit: Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the maximum number, the request is still valid. In that case the server just returns the maximum number of items, disregarding the client's page size request. + :param list[str] names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :param int offset: The offset of the first resource to return from a collection. + :param list[str] sort: Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: ArrayConnectionKeyGetResponse + If the method is called asynchronously, + returns the request thread. + """ + if ids is not None: + if not isinstance(ids, list): + ids = [ids] + if names is not None: + if not isinstance(names, list): + names = [names] + if sort is not None: + if not isinstance(sort, list): + sort = [sort] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + if 'limit' in params and params['limit'] < 1: + raise ValueError("Invalid value for parameter `limit` when calling `api214_array_connections_connection_key_get`, must be a value greater than or equal to `1`") + if 'offset' in params and params['offset'] < 0: + raise ValueError("Invalid value for parameter `offset` when calling `api214_array_connections_connection_key_get`, must be a value greater than or equal to `0`") + collection_formats = {} + path_params = {} + + query_params = [] + if 'continuation_token' in params: + query_params.append(('continuation_token', params['continuation_token'])) + if 'filter' in params: + query_params.append(('filter', params['filter'])) + if 'ids' in params: + query_params.append(('ids', params['ids'])) + collection_formats['ids'] = 'csv' + if 'limit' in params: + query_params.append(('limit', params['limit'])) + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + if 'offset' in params: + query_params.append(('offset', params['offset'])) + if 'sort' in params: + query_params.append(('sort', params['sort'])) + collection_formats['sort'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/array-connections/connection-key', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ArrayConnectionKeyGetResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_array_connections_connection_key_post_with_http_info( + self, + x_request_id=None, # type: str + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.ArrayConnectionKeyResponse + """POST array-connections/connection-key + + Create an array connection key allowing one array to connect to another for replication. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_array_connections_connection_key_post_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: ArrayConnectionKeyResponse + If the method is called asynchronously, + returns the request thread. + """ + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + collection_formats = {} + path_params = {} + + query_params = [] + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/array-connections/connection-key', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ArrayConnectionKeyResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_array_connections_delete_with_http_info( + self, + x_request_id=None, # type: str + ids=None, # type: List[str] + remote_ids=None, # type: List[str] + remote_names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> None + """DELETE array-connections + + Delete a connection to an array. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_array_connections_delete_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param list[str] ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :param list[str] remote_ids: A comma-separated list of remote array IDs. If after filtering, there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `remote_names` query parameter. + :param list[str] remote_names: A comma-separated list of remote array names. If there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with `remote_ids` query parameter. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: None + If the method is called asynchronously, + returns the request thread. + """ + if ids is not None: + if not isinstance(ids, list): + ids = [ids] + if remote_ids is not None: + if not isinstance(remote_ids, list): + remote_ids = [remote_ids] + if remote_names is not None: + if not isinstance(remote_names, list): + remote_names = [remote_names] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + collection_formats = {} + path_params = {} + + query_params = [] + if 'ids' in params: + query_params.append(('ids', params['ids'])) + collection_formats['ids'] = 'csv' + if 'remote_ids' in params: + query_params.append(('remote_ids', params['remote_ids'])) + collection_formats['remote_ids'] = 'csv' + if 'remote_names' in params: + query_params.append(('remote_names', params['remote_names'])) + collection_formats['remote_names'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/array-connections', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_array_connections_get_with_http_info( + self, + x_request_id=None, # type: str + continuation_token=None, # type: str + filter=None, # type: str + ids=None, # type: List[str] + limit=None, # type: int + offset=None, # type: int + remote_ids=None, # type: List[str] + remote_names=None, # type: List[str] + sort=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.ArrayConnectionGetResponse + """GET array-connections + + List connected arrays for replication. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_array_connections_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param str continuation_token: An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result. + :param str filter: Exclude resources that don't match the specified criteria. + :param list[str] ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :param int limit: Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the maximum number, the request is still valid. In that case the server just returns the maximum number of items, disregarding the client's page size request. + :param int offset: The offset of the first resource to return from a collection. + :param list[str] remote_ids: A comma-separated list of remote array IDs. If after filtering, there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `remote_names` query parameter. + :param list[str] remote_names: A comma-separated list of remote array names. If there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with `remote_ids` query parameter. + :param list[str] sort: Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: ArrayConnectionGetResponse + If the method is called asynchronously, + returns the request thread. + """ + if ids is not None: + if not isinstance(ids, list): + ids = [ids] + if remote_ids is not None: + if not isinstance(remote_ids, list): + remote_ids = [remote_ids] + if remote_names is not None: + if not isinstance(remote_names, list): + remote_names = [remote_names] + if sort is not None: + if not isinstance(sort, list): + sort = [sort] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + if 'limit' in params and params['limit'] < 1: + raise ValueError("Invalid value for parameter `limit` when calling `api214_array_connections_get`, must be a value greater than or equal to `1`") + if 'offset' in params and params['offset'] < 0: + raise ValueError("Invalid value for parameter `offset` when calling `api214_array_connections_get`, must be a value greater than or equal to `0`") + collection_formats = {} + path_params = {} + + query_params = [] + if 'continuation_token' in params: + query_params.append(('continuation_token', params['continuation_token'])) + if 'filter' in params: + query_params.append(('filter', params['filter'])) + if 'ids' in params: + query_params.append(('ids', params['ids'])) + collection_formats['ids'] = 'csv' + if 'limit' in params: + query_params.append(('limit', params['limit'])) + if 'offset' in params: + query_params.append(('offset', params['offset'])) + if 'remote_ids' in params: + query_params.append(('remote_ids', params['remote_ids'])) + collection_formats['remote_ids'] = 'csv' + if 'remote_names' in params: + query_params.append(('remote_names', params['remote_names'])) + collection_formats['remote_names'] = 'csv' + if 'sort' in params: + query_params.append(('sort', params['sort'])) + collection_formats['sort'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/array-connections', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ArrayConnectionGetResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_array_connections_patch_with_http_info( + self, + array_connection=None, # type: models.ArrayConnection + x_request_id=None, # type: str + ids=None, # type: List[str] + remote_ids=None, # type: List[str] + remote_names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.ArrayConnectionResponse + """PATCH array-connections + + Modify the configuration of a connected array. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_array_connections_patch_with_http_info(array_connection, async_req=True) + >>> result = thread.get() + + :param ArrayConnection array_connection: (required) + :param str x_request_id: Supplied by client during request or generated by server. + :param list[str] ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :param list[str] remote_ids: A comma-separated list of remote array IDs. If after filtering, there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `remote_names` query parameter. + :param list[str] remote_names: A comma-separated list of remote array names. If there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with `remote_ids` query parameter. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: ArrayConnectionResponse + If the method is called asynchronously, + returns the request thread. + """ + if ids is not None: + if not isinstance(ids, list): + ids = [ids] + if remote_ids is not None: + if not isinstance(remote_ids, list): + remote_ids = [remote_ids] + if remote_names is not None: + if not isinstance(remote_names, list): + remote_names = [remote_names] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + # verify the required parameter 'array_connection' is set + if array_connection is None: + raise TypeError("Missing the required parameter `array_connection` when calling `api214_array_connections_patch`") + + collection_formats = {} + path_params = {} + + query_params = [] + if 'ids' in params: + query_params.append(('ids', params['ids'])) + collection_formats['ids'] = 'csv' + if 'remote_ids' in params: + query_params.append(('remote_ids', params['remote_ids'])) + collection_formats['remote_ids'] = 'csv' + if 'remote_names' in params: + query_params.append(('remote_names', params['remote_names'])) + collection_formats['remote_names'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + if 'array_connection' in params: + body_params = params['array_connection'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/array-connections', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ArrayConnectionResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_array_connections_path_get_with_http_info( + self, + x_request_id=None, # type: str + continuation_token=None, # type: str + filter=None, # type: str + ids=None, # type: List[str] + limit=None, # type: int + offset=None, # type: int + remote_ids=None, # type: List[str] + remote_names=None, # type: List[str] + sort=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.ArrayConnectionPathGetResponse + """GET array-connections/path + + List network path details of connected arrays. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_array_connections_path_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param str continuation_token: An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result. + :param str filter: Exclude resources that don't match the specified criteria. + :param list[str] ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :param int limit: Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the maximum number, the request is still valid. In that case the server just returns the maximum number of items, disregarding the client's page size request. + :param int offset: The offset of the first resource to return from a collection. + :param list[str] remote_ids: A comma-separated list of remote array IDs. If after filtering, there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `remote_names` query parameter. + :param list[str] remote_names: A comma-separated list of remote array names. If there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with `remote_ids` query parameter. + :param list[str] sort: Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: ArrayConnectionPathGetResponse + If the method is called asynchronously, + returns the request thread. + """ + if ids is not None: + if not isinstance(ids, list): + ids = [ids] + if remote_ids is not None: + if not isinstance(remote_ids, list): + remote_ids = [remote_ids] + if remote_names is not None: + if not isinstance(remote_names, list): + remote_names = [remote_names] + if sort is not None: + if not isinstance(sort, list): + sort = [sort] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + if 'limit' in params and params['limit'] < 1: + raise ValueError("Invalid value for parameter `limit` when calling `api214_array_connections_path_get`, must be a value greater than or equal to `1`") + if 'offset' in params and params['offset'] < 0: + raise ValueError("Invalid value for parameter `offset` when calling `api214_array_connections_path_get`, must be a value greater than or equal to `0`") + collection_formats = {} + path_params = {} + + query_params = [] + if 'continuation_token' in params: + query_params.append(('continuation_token', params['continuation_token'])) + if 'filter' in params: + query_params.append(('filter', params['filter'])) + if 'ids' in params: + query_params.append(('ids', params['ids'])) + collection_formats['ids'] = 'csv' + if 'limit' in params: + query_params.append(('limit', params['limit'])) + if 'offset' in params: + query_params.append(('offset', params['offset'])) + if 'remote_ids' in params: + query_params.append(('remote_ids', params['remote_ids'])) + collection_formats['remote_ids'] = 'csv' + if 'remote_names' in params: + query_params.append(('remote_names', params['remote_names'])) + collection_formats['remote_names'] = 'csv' + if 'sort' in params: + query_params.append(('sort', params['sort'])) + collection_formats['sort'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/array-connections/path', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ArrayConnectionPathGetResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_array_connections_performance_replication_get_with_http_info( + self, + x_request_id=None, # type: str + continuation_token=None, # type: str + end_time=None, # type: int + filter=None, # type: str + ids=None, # type: List[str] + limit=None, # type: int + offset=None, # type: int + remote_ids=None, # type: List[str] + remote_names=None, # type: List[str] + resolution=None, # type: int + sort=None, # type: List[str] + start_time=None, # type: int + total_only=None, # type: bool + type=None, # type: str + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.ConnectionRelationshipPerformanceReplicationGetResp + """GET array-connections/performance/replication + + List performance metrics of file systems or objects being replicated from one array to another. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_array_connections_performance_replication_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param str continuation_token: An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result. + :param int end_time: When the time window ends (in milliseconds since epoch). + :param str filter: Exclude resources that don't match the specified criteria. + :param list[str] ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :param int limit: Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the maximum number, the request is still valid. In that case the server just returns the maximum number of items, disregarding the client's page size request. + :param int offset: The offset of the first resource to return from a collection. + :param list[str] remote_ids: A comma-separated list of remote array IDs. If after filtering, there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `remote_names` query parameter. + :param list[str] remote_names: A comma-separated list of remote array names. If there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with `remote_ids` query parameter. + :param int resolution: The desired ms between samples. Available resolutions may depend on data type, `start_time` and `end_time`. In general `1000`, `30000`, `300000`, `1800000`, `7200000`, and `86400000` are possible values. + :param list[str] sort: Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response. + :param int start_time: When the time window starts (in milliseconds since epoch). + :param bool total_only: Only return the total record for the specified items. The total record will be the total of all items after filtering. The `items` list will be empty. + :param str type: Display the metric of a specified object type. Valid values are `all`, `file-system`, and `object-store`. If not specified, defaults to `all`. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: ConnectionRelationshipPerformanceReplicationGetResp + If the method is called asynchronously, + returns the request thread. + """ + if ids is not None: + if not isinstance(ids, list): + ids = [ids] + if remote_ids is not None: + if not isinstance(remote_ids, list): + remote_ids = [remote_ids] + if remote_names is not None: + if not isinstance(remote_names, list): + remote_names = [remote_names] + if sort is not None: + if not isinstance(sort, list): + sort = [sort] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + if 'end_time' in params and params['end_time'] < 0: + raise ValueError("Invalid value for parameter `end_time` when calling `api214_array_connections_performance_replication_get`, must be a value greater than or equal to `0`") + if 'limit' in params and params['limit'] < 1: + raise ValueError("Invalid value for parameter `limit` when calling `api214_array_connections_performance_replication_get`, must be a value greater than or equal to `1`") + if 'offset' in params and params['offset'] < 0: + raise ValueError("Invalid value for parameter `offset` when calling `api214_array_connections_performance_replication_get`, must be a value greater than or equal to `0`") + if 'resolution' in params and params['resolution'] < 0: + raise ValueError("Invalid value for parameter `resolution` when calling `api214_array_connections_performance_replication_get`, must be a value greater than or equal to `0`") + if 'start_time' in params and params['start_time'] < 0: + raise ValueError("Invalid value for parameter `start_time` when calling `api214_array_connections_performance_replication_get`, must be a value greater than or equal to `0`") + collection_formats = {} + path_params = {} + + query_params = [] + if 'continuation_token' in params: + query_params.append(('continuation_token', params['continuation_token'])) + if 'end_time' in params: + query_params.append(('end_time', params['end_time'])) + if 'filter' in params: + query_params.append(('filter', params['filter'])) + if 'ids' in params: + query_params.append(('ids', params['ids'])) + collection_formats['ids'] = 'csv' + if 'limit' in params: + query_params.append(('limit', params['limit'])) + if 'offset' in params: + query_params.append(('offset', params['offset'])) + if 'remote_ids' in params: + query_params.append(('remote_ids', params['remote_ids'])) + collection_formats['remote_ids'] = 'csv' + if 'remote_names' in params: + query_params.append(('remote_names', params['remote_names'])) + collection_formats['remote_names'] = 'csv' + if 'resolution' in params: + query_params.append(('resolution', params['resolution'])) + if 'sort' in params: + query_params.append(('sort', params['sort'])) + collection_formats['sort'] = 'csv' + if 'start_time' in params: + query_params.append(('start_time', params['start_time'])) + if 'total_only' in params: + query_params.append(('total_only', params['total_only'])) + if 'type' in params: + query_params.append(('type', params['type'])) + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/array-connections/performance/replication', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ConnectionRelationshipPerformanceReplicationGetResp', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_array_connections_post_with_http_info( + self, + array_connection=None, # type: models.ArrayConnectionPost + x_request_id=None, # type: str + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.ArrayConnectionResponse + """POST array-connections + + Create a connection to an array for replication and configure network settings. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_array_connections_post_with_http_info(array_connection, async_req=True) + >>> result = thread.get() + + :param ArrayConnectionPost array_connection: (required) + :param str x_request_id: Supplied by client during request or generated by server. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: ArrayConnectionResponse + If the method is called asynchronously, + returns the request thread. + """ + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + # verify the required parameter 'array_connection' is set + if array_connection is None: + raise TypeError("Missing the required parameter `array_connection` when calling `api214_array_connections_post`") + + collection_formats = {} + path_params = {} + + query_params = [] + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + if 'array_connection' in params: + body_params = params['array_connection'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/array-connections', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ArrayConnectionResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) diff --git a/pypureclient/flashblade/FB_2_14/api/arrays_api.py b/pypureclient/flashblade/FB_2_14/api/arrays_api.py new file mode 100644 index 000000000..fb44bbfcc --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/api/arrays_api.py @@ -0,0 +1,1385 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import re + +# python 2 and python 3 compatibility library +import six +import uuid +from typing import List, Optional + +from .. import models + +class ArraysApi(object): + + def __init__(self, api_client): + self.api_client = api_client + + def api214_arrays_eula_get_with_http_info( + self, + x_request_id=None, # type: str + continuation_token=None, # type: str + filter=None, # type: str + limit=None, # type: int + offset=None, # type: int + sort=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.EulaGetResponse + """GET arrays/eula + + List the End User Agreement and signature. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_arrays_eula_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param str continuation_token: An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result. + :param str filter: Exclude resources that don't match the specified criteria. + :param int limit: Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the maximum number, the request is still valid. In that case the server just returns the maximum number of items, disregarding the client's page size request. + :param int offset: The offset of the first resource to return from a collection. + :param list[str] sort: Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: EulaGetResponse + If the method is called asynchronously, + returns the request thread. + """ + if sort is not None: + if not isinstance(sort, list): + sort = [sort] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + if 'limit' in params and params['limit'] < 1: + raise ValueError("Invalid value for parameter `limit` when calling `api214_arrays_eula_get`, must be a value greater than or equal to `1`") + if 'offset' in params and params['offset'] < 0: + raise ValueError("Invalid value for parameter `offset` when calling `api214_arrays_eula_get`, must be a value greater than or equal to `0`") + collection_formats = {} + path_params = {} + + query_params = [] + if 'continuation_token' in params: + query_params.append(('continuation_token', params['continuation_token'])) + if 'filter' in params: + query_params.append(('filter', params['filter'])) + if 'limit' in params: + query_params.append(('limit', params['limit'])) + if 'offset' in params: + query_params.append(('offset', params['offset'])) + if 'sort' in params: + query_params.append(('sort', params['sort'])) + collection_formats['sort'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/arrays/eula', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='EulaGetResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_arrays_eula_patch_with_http_info( + self, + x_request_id=None, # type: str + eula=None, # type: models.Eula + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.EulaResponse + """PATCH arrays/eula + + Modifies the signature on the End User Agreement. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_arrays_eula_patch_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param Eula eula: + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: EulaResponse + If the method is called asynchronously, + returns the request thread. + """ + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + collection_formats = {} + path_params = {} + + query_params = [] + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + if 'eula' in params: + body_params = params['eula'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/arrays/eula', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='EulaResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_arrays_factory_reset_token_delete_with_http_info( + self, + x_request_id=None, # type: str + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> None + """Delete a factory reset token + + Deletes any existing token that could be used to perform a factory reset on the array. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_arrays_factory_reset_token_delete_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: None + If the method is called asynchronously, + returns the request thread. + """ + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + collection_formats = {} + path_params = {} + + query_params = [] + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/arrays/factory-reset-token', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_arrays_factory_reset_token_get_with_http_info( + self, + x_request_id=None, # type: str + continuation_token=None, # type: str + filter=None, # type: str + limit=None, # type: int + offset=None, # type: int + sort=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.ArrayFactoryResetTokenGetResponse + """List factory reset tokens + + Displays a list of tokens used to perform a factory reset on the array. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_arrays_factory_reset_token_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param str continuation_token: An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result. + :param str filter: Exclude resources that don't match the specified criteria. + :param int limit: Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the maximum number, the request is still valid. In that case the server just returns the maximum number of items, disregarding the client's page size request. + :param int offset: The offset of the first resource to return from a collection. + :param list[str] sort: Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: ArrayFactoryResetTokenGetResponse + If the method is called asynchronously, + returns the request thread. + """ + if sort is not None: + if not isinstance(sort, list): + sort = [sort] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + if 'limit' in params and params['limit'] < 1: + raise ValueError("Invalid value for parameter `limit` when calling `api214_arrays_factory_reset_token_get`, must be a value greater than or equal to `1`") + if 'offset' in params and params['offset'] < 0: + raise ValueError("Invalid value for parameter `offset` when calling `api214_arrays_factory_reset_token_get`, must be a value greater than or equal to `0`") + collection_formats = {} + path_params = {} + + query_params = [] + if 'continuation_token' in params: + query_params.append(('continuation_token', params['continuation_token'])) + if 'filter' in params: + query_params.append(('filter', params['filter'])) + if 'limit' in params: + query_params.append(('limit', params['limit'])) + if 'offset' in params: + query_params.append(('offset', params['offset'])) + if 'sort' in params: + query_params.append(('sort', params['sort'])) + collection_formats['sort'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/arrays/factory-reset-token', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ArrayFactoryResetTokenGetResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_arrays_factory_reset_token_post_with_http_info( + self, + x_request_id=None, # type: str + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.ArrayFactoryResetTokenResponse + """Create a factory reset token + + Creates a token that can be used to perform a factory reset on the array. Factory reset tokens can only be created after the array has been prepared for reset (e.g., all file systems, buckets, and snapshots must first be eradicated). After a token has been created, operations that would take the array out of the prepared state (e.g., creating file systems) are disabled until all tokens have been deleted. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_arrays_factory_reset_token_post_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: ArrayFactoryResetTokenResponse + If the method is called asynchronously, + returns the request thread. + """ + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + collection_formats = {} + path_params = {} + + query_params = [] + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/arrays/factory-reset-token', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ArrayFactoryResetTokenResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_arrays_get_with_http_info( + self, + x_request_id=None, # type: str + continuation_token=None, # type: str + filter=None, # type: str + limit=None, # type: int + offset=None, # type: int + sort=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.ArrayGetResponse + """GET arrays + + List array attributes such as the array name, ID, version, and NTP servers. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_arrays_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param str continuation_token: An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result. + :param str filter: Exclude resources that don't match the specified criteria. + :param int limit: Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the maximum number, the request is still valid. In that case the server just returns the maximum number of items, disregarding the client's page size request. + :param int offset: The offset of the first resource to return from a collection. + :param list[str] sort: Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: ArrayGetResponse + If the method is called asynchronously, + returns the request thread. + """ + if sort is not None: + if not isinstance(sort, list): + sort = [sort] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + if 'limit' in params and params['limit'] < 1: + raise ValueError("Invalid value for parameter `limit` when calling `api214_arrays_get`, must be a value greater than or equal to `1`") + if 'offset' in params and params['offset'] < 0: + raise ValueError("Invalid value for parameter `offset` when calling `api214_arrays_get`, must be a value greater than or equal to `0`") + collection_formats = {} + path_params = {} + + query_params = [] + if 'continuation_token' in params: + query_params.append(('continuation_token', params['continuation_token'])) + if 'filter' in params: + query_params.append(('filter', params['filter'])) + if 'limit' in params: + query_params.append(('limit', params['limit'])) + if 'offset' in params: + query_params.append(('offset', params['offset'])) + if 'sort' in params: + query_params.append(('sort', params['sort'])) + collection_formats['sort'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/arrays', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ArrayGetResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_arrays_http_specific_performance_get_with_http_info( + self, + x_request_id=None, # type: str + end_time=None, # type: int + resolution=None, # type: int + start_time=None, # type: int + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.ArrayHttpSpecificPerformanceGet + """GET arrays/http-specific-performance + + List the HTTP performance metrics of the array. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_arrays_http_specific_performance_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param int end_time: When the time window ends (in milliseconds since epoch). + :param int resolution: The desired ms between samples. Available resolutions may depend on data type, `start_time` and `end_time`. In general `1000`, `30000`, `300000`, `1800000`, `7200000`, and `86400000` are possible values. + :param int start_time: When the time window starts (in milliseconds since epoch). + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: ArrayHttpSpecificPerformanceGet + If the method is called asynchronously, + returns the request thread. + """ + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + if 'end_time' in params and params['end_time'] < 0: + raise ValueError("Invalid value for parameter `end_time` when calling `api214_arrays_http_specific_performance_get`, must be a value greater than or equal to `0`") + if 'resolution' in params and params['resolution'] < 0: + raise ValueError("Invalid value for parameter `resolution` when calling `api214_arrays_http_specific_performance_get`, must be a value greater than or equal to `0`") + if 'start_time' in params and params['start_time'] < 0: + raise ValueError("Invalid value for parameter `start_time` when calling `api214_arrays_http_specific_performance_get`, must be a value greater than or equal to `0`") + collection_formats = {} + path_params = {} + + query_params = [] + if 'end_time' in params: + query_params.append(('end_time', params['end_time'])) + if 'resolution' in params: + query_params.append(('resolution', params['resolution'])) + if 'start_time' in params: + query_params.append(('start_time', params['start_time'])) + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/arrays/http-specific-performance', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ArrayHttpSpecificPerformanceGet', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_arrays_nfs_specific_performance_get_with_http_info( + self, + x_request_id=None, # type: str + end_time=None, # type: int + resolution=None, # type: int + start_time=None, # type: int + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.ArrayNfsSpecificPerformanceGet + """GET arrays/nfs-specific-performance + + List the NFS performance metrics of the array. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_arrays_nfs_specific_performance_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param int end_time: When the time window ends (in milliseconds since epoch). + :param int resolution: The desired ms between samples. Available resolutions may depend on data type, `start_time` and `end_time`. In general `1000`, `30000`, `300000`, `1800000`, `7200000`, and `86400000` are possible values. + :param int start_time: When the time window starts (in milliseconds since epoch). + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: ArrayNfsSpecificPerformanceGet + If the method is called asynchronously, + returns the request thread. + """ + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + if 'end_time' in params and params['end_time'] < 0: + raise ValueError("Invalid value for parameter `end_time` when calling `api214_arrays_nfs_specific_performance_get`, must be a value greater than or equal to `0`") + if 'resolution' in params and params['resolution'] < 0: + raise ValueError("Invalid value for parameter `resolution` when calling `api214_arrays_nfs_specific_performance_get`, must be a value greater than or equal to `0`") + if 'start_time' in params and params['start_time'] < 0: + raise ValueError("Invalid value for parameter `start_time` when calling `api214_arrays_nfs_specific_performance_get`, must be a value greater than or equal to `0`") + collection_formats = {} + path_params = {} + + query_params = [] + if 'end_time' in params: + query_params.append(('end_time', params['end_time'])) + if 'resolution' in params: + query_params.append(('resolution', params['resolution'])) + if 'start_time' in params: + query_params.append(('start_time', params['start_time'])) + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/arrays/nfs-specific-performance', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ArrayNfsSpecificPerformanceGet', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_arrays_patch_with_http_info( + self, + array=None, # type: list + x_request_id=None, # type: str + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.ArrayResponse + """PATCH arrays + + Modify the general configuration of the array including banner text, array name, NTP servers, and time zone. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_arrays_patch_with_http_info(array, async_req=True) + >>> result = thread.get() + + :param Array array: (required) + :param str x_request_id: Supplied by client during request or generated by server. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: ArrayResponse + If the method is called asynchronously, + returns the request thread. + """ + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + # verify the required parameter 'array' is set + if array is None: + raise TypeError("Missing the required parameter `array` when calling `api214_arrays_patch`") + + collection_formats = {} + path_params = {} + + query_params = [] + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + if 'array' in params: + body_params = params['array'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/arrays', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ArrayResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_arrays_performance_get_with_http_info( + self, + x_request_id=None, # type: str + end_time=None, # type: int + protocol=None, # type: str + resolution=None, # type: int + start_time=None, # type: int + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.ArrayPerformanceGetResponse + """GET arrays/performance + + Lists the overall performance metrics of the array. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_arrays_performance_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param int end_time: When the time window ends (in milliseconds since epoch). + :param str protocol: Display the performance of a specified protocol. Valid values are `all`, `HTTP`, `SMB`, `NFS`, and `S3`. If not specified, defaults to `all`, which will provide the combined performance of all available protocols. + :param int resolution: The desired ms between samples. Available resolutions may depend on data type, `start_time` and `end_time`. In general `1000`, `30000`, `300000`, `1800000`, `7200000`, and `86400000` are possible values. + :param int start_time: When the time window starts (in milliseconds since epoch). + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: ArrayPerformanceGetResponse + If the method is called asynchronously, + returns the request thread. + """ + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + if 'end_time' in params and params['end_time'] < 0: + raise ValueError("Invalid value for parameter `end_time` when calling `api214_arrays_performance_get`, must be a value greater than or equal to `0`") + if 'resolution' in params and params['resolution'] < 0: + raise ValueError("Invalid value for parameter `resolution` when calling `api214_arrays_performance_get`, must be a value greater than or equal to `0`") + if 'start_time' in params and params['start_time'] < 0: + raise ValueError("Invalid value for parameter `start_time` when calling `api214_arrays_performance_get`, must be a value greater than or equal to `0`") + collection_formats = {} + path_params = {} + + query_params = [] + if 'end_time' in params: + query_params.append(('end_time', params['end_time'])) + if 'protocol' in params: + query_params.append(('protocol', params['protocol'])) + if 'resolution' in params: + query_params.append(('resolution', params['resolution'])) + if 'start_time' in params: + query_params.append(('start_time', params['start_time'])) + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/arrays/performance', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ArrayPerformanceGetResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_arrays_performance_replication_get_with_http_info( + self, + x_request_id=None, # type: str + end_time=None, # type: int + resolution=None, # type: int + start_time=None, # type: int + type=None, # type: str + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.ArrayPerformanceReplicationGetResp + """GET arrays/performance/replication + + List replication performance metrics. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_arrays_performance_replication_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param int end_time: When the time window ends (in milliseconds since epoch). + :param int resolution: The desired ms between samples. Available resolutions may depend on data type, `start_time` and `end_time`. In general `1000`, `30000`, `300000`, `1800000`, `7200000`, and `86400000` are possible values. + :param int start_time: When the time window starts (in milliseconds since epoch). + :param str type: Display the metric of a specified object type. Valid values are `all`, `file-system`, and `object-store`. If not specified, defaults to `all`. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: ArrayPerformanceReplicationGetResp + If the method is called asynchronously, + returns the request thread. + """ + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + if 'end_time' in params and params['end_time'] < 0: + raise ValueError("Invalid value for parameter `end_time` when calling `api214_arrays_performance_replication_get`, must be a value greater than or equal to `0`") + if 'resolution' in params and params['resolution'] < 0: + raise ValueError("Invalid value for parameter `resolution` when calling `api214_arrays_performance_replication_get`, must be a value greater than or equal to `0`") + if 'start_time' in params and params['start_time'] < 0: + raise ValueError("Invalid value for parameter `start_time` when calling `api214_arrays_performance_replication_get`, must be a value greater than or equal to `0`") + collection_formats = {} + path_params = {} + + query_params = [] + if 'end_time' in params: + query_params.append(('end_time', params['end_time'])) + if 'resolution' in params: + query_params.append(('resolution', params['resolution'])) + if 'start_time' in params: + query_params.append(('start_time', params['start_time'])) + if 'type' in params: + query_params.append(('type', params['type'])) + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/arrays/performance/replication', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ArrayPerformanceReplicationGetResp', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_arrays_s3_specific_performance_get_with_http_info( + self, + x_request_id=None, # type: str + end_time=None, # type: int + resolution=None, # type: int + start_time=None, # type: int + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.ArrayS3SpecificPerformanceGetResp + """GET arrays/s3-specific-performance + + List the S3 performance metrics of the array. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_arrays_s3_specific_performance_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param int end_time: When the time window ends (in milliseconds since epoch). + :param int resolution: The desired ms between samples. Available resolutions may depend on data type, `start_time` and `end_time`. In general `1000`, `30000`, `300000`, `1800000`, `7200000`, and `86400000` are possible values. + :param int start_time: When the time window starts (in milliseconds since epoch). + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: ArrayS3SpecificPerformanceGetResp + If the method is called asynchronously, + returns the request thread. + """ + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + if 'end_time' in params and params['end_time'] < 0: + raise ValueError("Invalid value for parameter `end_time` when calling `api214_arrays_s3_specific_performance_get`, must be a value greater than or equal to `0`") + if 'resolution' in params and params['resolution'] < 0: + raise ValueError("Invalid value for parameter `resolution` when calling `api214_arrays_s3_specific_performance_get`, must be a value greater than or equal to `0`") + if 'start_time' in params and params['start_time'] < 0: + raise ValueError("Invalid value for parameter `start_time` when calling `api214_arrays_s3_specific_performance_get`, must be a value greater than or equal to `0`") + collection_formats = {} + path_params = {} + + query_params = [] + if 'end_time' in params: + query_params.append(('end_time', params['end_time'])) + if 'resolution' in params: + query_params.append(('resolution', params['resolution'])) + if 'start_time' in params: + query_params.append(('start_time', params['start_time'])) + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/arrays/s3-specific-performance', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ArrayS3SpecificPerformanceGetResp', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_arrays_space_get_with_http_info( + self, + x_request_id=None, # type: str + end_time=None, # type: int + resolution=None, # type: int + start_time=None, # type: int + type=None, # type: str + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.ArraySpaceGetResponse + """GET arrays/space + + List available and used storage space on the array. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_arrays_space_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param int end_time: When the time window ends (in milliseconds since epoch). + :param int resolution: The desired ms between samples. Available resolutions may depend on data type, `start_time` and `end_time`. In general `1000`, `30000`, `300000`, `1800000`, `7200000`, and `86400000` are possible values. + :param int start_time: When the time window starts (in milliseconds since epoch). + :param str type: Display the metric of a specified object type. Valid values are `array`, `file-system`, and `object-store`. If not specified, defaults to `array`. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: ArraySpaceGetResponse + If the method is called asynchronously, + returns the request thread. + """ + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + if 'end_time' in params and params['end_time'] < 0: + raise ValueError("Invalid value for parameter `end_time` when calling `api214_arrays_space_get`, must be a value greater than or equal to `0`") + if 'resolution' in params and params['resolution'] < 0: + raise ValueError("Invalid value for parameter `resolution` when calling `api214_arrays_space_get`, must be a value greater than or equal to `0`") + if 'start_time' in params and params['start_time'] < 0: + raise ValueError("Invalid value for parameter `start_time` when calling `api214_arrays_space_get`, must be a value greater than or equal to `0`") + collection_formats = {} + path_params = {} + + query_params = [] + if 'end_time' in params: + query_params.append(('end_time', params['end_time'])) + if 'resolution' in params: + query_params.append(('resolution', params['resolution'])) + if 'start_time' in params: + query_params.append(('start_time', params['start_time'])) + if 'type' in params: + query_params.append(('type', params['type'])) + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/arrays/space', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ArraySpaceGetResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_arrays_supported_time_zones_get_with_http_info( + self, + x_request_id=None, # type: str + continuation_token=None, # type: str + filter=None, # type: str + limit=None, # type: int + names=None, # type: List[str] + offset=None, # type: int + sort=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.ArraysSupportedTimeZonesGetResponse + """GET arrays/supported-time-zones + + List supported time zones for the array. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_arrays_supported_time_zones_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param str continuation_token: An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result. + :param str filter: Exclude resources that don't match the specified criteria. + :param int limit: Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the maximum number, the request is still valid. In that case the server just returns the maximum number of items, disregarding the client's page size request. + :param list[str] names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :param int offset: The offset of the first resource to return from a collection. + :param list[str] sort: Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: ArraysSupportedTimeZonesGetResponse + If the method is called asynchronously, + returns the request thread. + """ + if names is not None: + if not isinstance(names, list): + names = [names] + if sort is not None: + if not isinstance(sort, list): + sort = [sort] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + if 'limit' in params and params['limit'] < 1: + raise ValueError("Invalid value for parameter `limit` when calling `api214_arrays_supported_time_zones_get`, must be a value greater than or equal to `1`") + if 'offset' in params and params['offset'] < 0: + raise ValueError("Invalid value for parameter `offset` when calling `api214_arrays_supported_time_zones_get`, must be a value greater than or equal to `0`") + collection_formats = {} + path_params = {} + + query_params = [] + if 'continuation_token' in params: + query_params.append(('continuation_token', params['continuation_token'])) + if 'filter' in params: + query_params.append(('filter', params['filter'])) + if 'limit' in params: + query_params.append(('limit', params['limit'])) + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + if 'offset' in params: + query_params.append(('offset', params['offset'])) + if 'sort' in params: + query_params.append(('sort', params['sort'])) + collection_formats['sort'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/arrays/supported-time-zones', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ArraysSupportedTimeZonesGetResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) diff --git a/pypureclient/flashblade/FB_2_14/api/audits_api.py b/pypureclient/flashblade/FB_2_14/api/audits_api.py new file mode 100644 index 000000000..165d97878 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/api/audits_api.py @@ -0,0 +1,151 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import re + +# python 2 and python 3 compatibility library +import six +import uuid +from typing import List, Optional + +from .. import models + +class AuditsApi(object): + + def __init__(self, api_client): + self.api_client = api_client + + def api214_audits_get_with_http_info( + self, + x_request_id=None, # type: str + continuation_token=None, # type: str + filter=None, # type: str + ids=None, # type: List[str] + limit=None, # type: int + names=None, # type: List[str] + offset=None, # type: int + sort=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.AuditGetResponse + """GET audits + + List the array audit trail to view activities that were performed on the array. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_audits_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param str continuation_token: An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result. + :param str filter: Exclude resources that don't match the specified criteria. + :param list[str] ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :param int limit: Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the maximum number, the request is still valid. In that case the server just returns the maximum number of items, disregarding the client's page size request. + :param list[str] names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :param int offset: The offset of the first resource to return from a collection. + :param list[str] sort: Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: AuditGetResponse + If the method is called asynchronously, + returns the request thread. + """ + if ids is not None: + if not isinstance(ids, list): + ids = [ids] + if names is not None: + if not isinstance(names, list): + names = [names] + if sort is not None: + if not isinstance(sort, list): + sort = [sort] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + if 'limit' in params and params['limit'] < 1: + raise ValueError("Invalid value for parameter `limit` when calling `api214_audits_get`, must be a value greater than or equal to `1`") + if 'offset' in params and params['offset'] < 0: + raise ValueError("Invalid value for parameter `offset` when calling `api214_audits_get`, must be a value greater than or equal to `0`") + collection_formats = {} + path_params = {} + + query_params = [] + if 'continuation_token' in params: + query_params.append(('continuation_token', params['continuation_token'])) + if 'filter' in params: + query_params.append(('filter', params['filter'])) + if 'ids' in params: + query_params.append(('ids', params['ids'])) + collection_formats['ids'] = 'csv' + if 'limit' in params: + query_params.append(('limit', params['limit'])) + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + if 'offset' in params: + query_params.append(('offset', params['offset'])) + if 'sort' in params: + query_params.append(('sort', params['sort'])) + collection_formats['sort'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/audits', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='AuditGetResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) diff --git a/pypureclient/flashblade/FB_2_14/api/authorization_api.py b/pypureclient/flashblade/FB_2_14/api/authorization_api.py new file mode 100644 index 000000000..eb3f5bfc7 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/api/authorization_api.py @@ -0,0 +1,444 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import re + +# python 2 and python 3 compatibility library +import six +import uuid +from typing import List, Optional + +from .. import models + +class AuthorizationApi(object): + + def __init__(self, api_client): + self.api_client = api_client + + def api_api_version_get_with_http_info( + self, + x_request_id=None, # type: str + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.ApiVersion + """GET api_version + + Get available API versions. No authentication is required to access this endpoint. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api_api_version_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: ApiVersion + If the method is called asynchronously, + returns the request thread. + """ + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + collection_formats = {} + path_params = {} + + query_params = [] + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = [] + + return self.api_client.call_api( + '/api/api_version', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ApiVersion', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api_login_banner_get_with_http_info( + self, + x_request_id=None, # type: str + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.LoginBannerGetResponse + """GET login_banner + + Get the login banner for the array. No authentication is required to access this endpoint. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api_login_banner_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: LoginBannerGetResponse + If the method is called asynchronously, + returns the request thread. + """ + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + collection_formats = {} + path_params = {} + + query_params = [] + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = [] + + return self.api_client.call_api( + '/api/login-banner', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='LoginBannerGetResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api_login_post_with_http_info( + self, + x_request_id=None, # type: str + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.Login + """POST login + + Exchange an API token for a REST session token. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api_login_post_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: Login + If the method is called asynchronously, + returns the request thread. + """ + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + collection_formats = {} + path_params = {} + + query_params = [] + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['ApiToken'] + + return self.api_client.call_api( + '/api/login', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Login', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api_logout_post_with_http_info( + self, + x_request_id=None, # type: str + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> None + """POST logout + + Invalidate a REST session token. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api_logout_post_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: None + If the method is called asynchronously, + returns the request thread. + """ + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + collection_formats = {} + path_params = {} + + query_params = [] + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/logout', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def oauth210_token_post_with_http_info( + self, + grant_type=None, # type: str + subject_token=None, # type: str + subject_token_type=None, # type: str + x_request_id=None, # type: str + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.OauthTokenResponse + """Get access token + + Exchanges an ID Token for an OAuth 2.0 access token. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.oauth210_token_post_with_http_info(grant_type, subject_token, subject_token_type, async_req=True) + >>> result = thread.get() + + :param str grant_type: The method by which the access token will be obtained. The Pure Storage REST API supports the OAuth 2.0 \"token exchange\" grant type, which indicates that a token exchange is being performed. Set `grant_type` to `urn:ietf:params:oauth:grant-type:token-exchange`. (required) + :param str subject_token: An encoded security ID Token representing the identity of the party on behalf of whom the request is being made. The token must be issued by a trusted identity provider which must be either a registered application in Pure1 or an enabled API client on the array. The token must be a JSON Web Token and must contain the following claims: > | JWT claim | Location | API Client Field | Description | Required By | > |-|-|-|-|-| > | kid | Header | key_id | Key ID of the API client that issues the identity token. | FlashArray and FlashBlade only. | > | aud | Payload | id | Client ID of the API client that issues the identity token. | FlashArray and FlashBlade only. | > | sub | Payload | | Login name of the array user for whom the token should be issued. This must be a valid user in the system. | FlashArray and FlashBlade only. | > | iss | Payload | issuer | Application ID for the Pure1 or API client's trusted identity issuer on the array. | All products. | > | iat | Payload | | Timestamp of when the identity token was issued. Measured in milliseconds since the UNIX epoch. | All products. | > | exp | Payload | | Timestamp of when the identity token will expire. Measured in milliseconds since the UNIX epoch. | All products. | Each token must also be signed with the private key that is paired with the API client's public key. (required) + :param str subject_token_type: An identifier that indicates the type of security token specifed in the `subject_token` parameter. The Pure Storage REST API supports the JSON Web Token (JWT) as the means for requesting the access token. Set `subject_token_type` to `urn:ietf:params:oauth:token-type:jwt`. (required) + :param str x_request_id: Supplied by client during request or generated by server. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: OauthTokenResponse + If the method is called asynchronously, + returns the request thread. + """ + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + # verify the required parameter 'grant_type' is set + if grant_type is None: + raise TypeError("Missing the required parameter `grant_type` when calling `oauth210_token_post`") + # verify the required parameter 'subject_token' is set + if subject_token is None: + raise TypeError("Missing the required parameter `subject_token` when calling `oauth210_token_post`") + # verify the required parameter 'subject_token_type' is set + if subject_token_type is None: + raise TypeError("Missing the required parameter `subject_token_type` when calling `oauth210_token_post`") + + collection_formats = {} + path_params = {} + + query_params = [] + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + if 'grant_type' in params: + form_params.append(('grant_type', params['grant_type'])) + if 'subject_token' in params: + form_params.append(('subject_token', params['subject_token'])) + if 'subject_token_type' in params: + form_params.append(('subject_token_type', params['subject_token_type'])) + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/x-www-form-urlencoded']) + + # Authentication setting + auth_settings = [] + + return self.api_client.call_api( + '/oauth2/1.0/token', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='OauthTokenResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) diff --git a/pypureclient/flashblade/FB_2_14/api/blades_api.py b/pypureclient/flashblade/FB_2_14/api/blades_api.py new file mode 100644 index 000000000..66dff1692 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/api/blades_api.py @@ -0,0 +1,155 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import re + +# python 2 and python 3 compatibility library +import six +import uuid +from typing import List, Optional + +from .. import models + +class BladesApi(object): + + def __init__(self, api_client): + self.api_client = api_client + + def api214_blades_get_with_http_info( + self, + x_request_id=None, # type: str + continuation_token=None, # type: str + filter=None, # type: str + ids=None, # type: List[str] + limit=None, # type: int + names=None, # type: List[str] + offset=None, # type: int + sort=None, # type: List[str] + total_only=None, # type: bool + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.BladeGetResponse + """GET blades + + List array blade information. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_blades_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param str continuation_token: An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result. + :param str filter: Exclude resources that don't match the specified criteria. + :param list[str] ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :param int limit: Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the maximum number, the request is still valid. In that case the server just returns the maximum number of items, disregarding the client's page size request. + :param list[str] names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :param int offset: The offset of the first resource to return from a collection. + :param list[str] sort: Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response. + :param bool total_only: Only return the total record for the specified items. The total record will be the total of all items after filtering. The `items` list will be empty. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: BladeGetResponse + If the method is called asynchronously, + returns the request thread. + """ + if ids is not None: + if not isinstance(ids, list): + ids = [ids] + if names is not None: + if not isinstance(names, list): + names = [names] + if sort is not None: + if not isinstance(sort, list): + sort = [sort] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + if 'limit' in params and params['limit'] < 1: + raise ValueError("Invalid value for parameter `limit` when calling `api214_blades_get`, must be a value greater than or equal to `1`") + if 'offset' in params and params['offset'] < 0: + raise ValueError("Invalid value for parameter `offset` when calling `api214_blades_get`, must be a value greater than or equal to `0`") + collection_formats = {} + path_params = {} + + query_params = [] + if 'continuation_token' in params: + query_params.append(('continuation_token', params['continuation_token'])) + if 'filter' in params: + query_params.append(('filter', params['filter'])) + if 'ids' in params: + query_params.append(('ids', params['ids'])) + collection_formats['ids'] = 'csv' + if 'limit' in params: + query_params.append(('limit', params['limit'])) + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + if 'offset' in params: + query_params.append(('offset', params['offset'])) + if 'sort' in params: + query_params.append(('sort', params['sort'])) + collection_formats['sort'] = 'csv' + if 'total_only' in params: + query_params.append(('total_only', params['total_only'])) + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/blades', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='BladeGetResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) diff --git a/pypureclient/flashblade/FB_2_14/api/bucket_replica_links_api.py b/pypureclient/flashblade/FB_2_14/api/bucket_replica_links_api.py new file mode 100644 index 000000000..4bc5db51b --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/api/bucket_replica_links_api.py @@ -0,0 +1,558 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import re + +# python 2 and python 3 compatibility library +import six +import uuid +from typing import List, Optional + +from .. import models + +class BucketReplicaLinksApi(object): + + def __init__(self, api_client): + self.api_client = api_client + + def api214_bucket_replica_links_delete_with_http_info( + self, + ids=None, # type: List[str] + local_bucket_ids=None, # type: List[str] + local_bucket_names=None, # type: List[str] + remote_bucket_names=None, # type: List[str] + remote_ids=None, # type: List[str] + remote_names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> None + """DELETE bucket-replica-links + + Delete a bucket replica link. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_bucket_replica_links_delete_with_http_info(async_req=True) + >>> result = thread.get() + + :param list[str] ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :param list[str] local_bucket_ids: A comma-separated list of local bucket IDs. If after filtering, there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `local_bucket_names` query parameter. + :param list[str] local_bucket_names: A comma-separated list of local bucket names. If there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with `local_bucket_ids` query parameter. + :param list[str] remote_bucket_names: A comma-separated list of remote bucket names. If there is not at least one resource that matches each of the elements, then an error is returned. + :param list[str] remote_ids: A comma-separated list of remote array IDs. If after filtering, there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `remote_names` query parameter. + :param list[str] remote_names: A comma-separated list of remote array names. If there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with `remote_ids` query parameter. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: None + If the method is called asynchronously, + returns the request thread. + """ + if ids is not None: + if not isinstance(ids, list): + ids = [ids] + if local_bucket_ids is not None: + if not isinstance(local_bucket_ids, list): + local_bucket_ids = [local_bucket_ids] + if local_bucket_names is not None: + if not isinstance(local_bucket_names, list): + local_bucket_names = [local_bucket_names] + if remote_bucket_names is not None: + if not isinstance(remote_bucket_names, list): + remote_bucket_names = [remote_bucket_names] + if remote_ids is not None: + if not isinstance(remote_ids, list): + remote_ids = [remote_ids] + if remote_names is not None: + if not isinstance(remote_names, list): + remote_names = [remote_names] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + collection_formats = {} + path_params = {} + + query_params = [] + if 'ids' in params: + query_params.append(('ids', params['ids'])) + collection_formats['ids'] = 'csv' + if 'local_bucket_ids' in params: + query_params.append(('local_bucket_ids', params['local_bucket_ids'])) + collection_formats['local_bucket_ids'] = 'csv' + if 'local_bucket_names' in params: + query_params.append(('local_bucket_names', params['local_bucket_names'])) + collection_formats['local_bucket_names'] = 'csv' + if 'remote_bucket_names' in params: + query_params.append(('remote_bucket_names', params['remote_bucket_names'])) + collection_formats['remote_bucket_names'] = 'csv' + if 'remote_ids' in params: + query_params.append(('remote_ids', params['remote_ids'])) + collection_formats['remote_ids'] = 'csv' + if 'remote_names' in params: + query_params.append(('remote_names', params['remote_names'])) + collection_formats['remote_names'] = 'csv' + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/bucket-replica-links', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_bucket_replica_links_get_with_http_info( + self, + continuation_token=None, # type: str + filter=None, # type: str + ids=None, # type: List[str] + limit=None, # type: int + local_bucket_ids=None, # type: List[str] + local_bucket_names=None, # type: List[str] + offset=None, # type: int + remote_bucket_names=None, # type: List[str] + remote_ids=None, # type: List[str] + remote_names=None, # type: List[str] + sort=None, # type: List[str] + total_only=None, # type: bool + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.BucketReplicaLinkGetResponse + """GET bucket-replica-links + + List bucket replica links for object replication. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_bucket_replica_links_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param str continuation_token: An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result. + :param str filter: Exclude resources that don't match the specified criteria. + :param list[str] ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :param int limit: Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the maximum number, the request is still valid. In that case the server just returns the maximum number of items, disregarding the client's page size request. + :param list[str] local_bucket_ids: A comma-separated list of local bucket IDs. If after filtering, there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `local_bucket_names` query parameter. + :param list[str] local_bucket_names: A comma-separated list of local bucket names. If there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with `local_bucket_ids` query parameter. + :param int offset: The offset of the first resource to return from a collection. + :param list[str] remote_bucket_names: A comma-separated list of remote bucket names. If there is not at least one resource that matches each of the elements, then an error is returned. + :param list[str] remote_ids: A comma-separated list of remote array IDs. If after filtering, there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `remote_names` query parameter. + :param list[str] remote_names: A comma-separated list of remote array names. If there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with `remote_ids` query parameter. + :param list[str] sort: Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response. + :param bool total_only: Only return the total record for the specified items. The total record will be the total of all items after filtering. The `items` list will be empty. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: BucketReplicaLinkGetResponse + If the method is called asynchronously, + returns the request thread. + """ + if ids is not None: + if not isinstance(ids, list): + ids = [ids] + if local_bucket_ids is not None: + if not isinstance(local_bucket_ids, list): + local_bucket_ids = [local_bucket_ids] + if local_bucket_names is not None: + if not isinstance(local_bucket_names, list): + local_bucket_names = [local_bucket_names] + if remote_bucket_names is not None: + if not isinstance(remote_bucket_names, list): + remote_bucket_names = [remote_bucket_names] + if remote_ids is not None: + if not isinstance(remote_ids, list): + remote_ids = [remote_ids] + if remote_names is not None: + if not isinstance(remote_names, list): + remote_names = [remote_names] + if sort is not None: + if not isinstance(sort, list): + sort = [sort] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + if 'limit' in params and params['limit'] < 1: + raise ValueError("Invalid value for parameter `limit` when calling `api214_bucket_replica_links_get`, must be a value greater than or equal to `1`") + if 'offset' in params and params['offset'] < 0: + raise ValueError("Invalid value for parameter `offset` when calling `api214_bucket_replica_links_get`, must be a value greater than or equal to `0`") + collection_formats = {} + path_params = {} + + query_params = [] + if 'continuation_token' in params: + query_params.append(('continuation_token', params['continuation_token'])) + if 'filter' in params: + query_params.append(('filter', params['filter'])) + if 'ids' in params: + query_params.append(('ids', params['ids'])) + collection_formats['ids'] = 'csv' + if 'limit' in params: + query_params.append(('limit', params['limit'])) + if 'local_bucket_ids' in params: + query_params.append(('local_bucket_ids', params['local_bucket_ids'])) + collection_formats['local_bucket_ids'] = 'csv' + if 'local_bucket_names' in params: + query_params.append(('local_bucket_names', params['local_bucket_names'])) + collection_formats['local_bucket_names'] = 'csv' + if 'offset' in params: + query_params.append(('offset', params['offset'])) + if 'remote_bucket_names' in params: + query_params.append(('remote_bucket_names', params['remote_bucket_names'])) + collection_formats['remote_bucket_names'] = 'csv' + if 'remote_ids' in params: + query_params.append(('remote_ids', params['remote_ids'])) + collection_formats['remote_ids'] = 'csv' + if 'remote_names' in params: + query_params.append(('remote_names', params['remote_names'])) + collection_formats['remote_names'] = 'csv' + if 'sort' in params: + query_params.append(('sort', params['sort'])) + collection_formats['sort'] = 'csv' + if 'total_only' in params: + query_params.append(('total_only', params['total_only'])) + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/bucket-replica-links', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='BucketReplicaLinkGetResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_bucket_replica_links_patch_with_http_info( + self, + bucket_replica_link=None, # type: models.BucketReplicaLink + ids=None, # type: List[str] + local_bucket_ids=None, # type: List[str] + local_bucket_names=None, # type: List[str] + remote_bucket_names=None, # type: List[str] + remote_ids=None, # type: List[str] + remote_names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.BucketReplicaLinkResponse + """PATCH bucket-replica-links + + Modify the configuration of a bucket replica link including whether the link is paused and the object store remote credentials used. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_bucket_replica_links_patch_with_http_info(bucket_replica_link, async_req=True) + >>> result = thread.get() + + :param BucketReplicaLink bucket_replica_link: (required) + :param list[str] ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :param list[str] local_bucket_ids: A comma-separated list of local bucket IDs. If after filtering, there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `local_bucket_names` query parameter. + :param list[str] local_bucket_names: A comma-separated list of local bucket names. If there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with `local_bucket_ids` query parameter. + :param list[str] remote_bucket_names: A comma-separated list of remote bucket names. If there is not at least one resource that matches each of the elements, then an error is returned. + :param list[str] remote_ids: A comma-separated list of remote array IDs. If after filtering, there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `remote_names` query parameter. + :param list[str] remote_names: A comma-separated list of remote array names. If there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with `remote_ids` query parameter. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: BucketReplicaLinkResponse + If the method is called asynchronously, + returns the request thread. + """ + if ids is not None: + if not isinstance(ids, list): + ids = [ids] + if local_bucket_ids is not None: + if not isinstance(local_bucket_ids, list): + local_bucket_ids = [local_bucket_ids] + if local_bucket_names is not None: + if not isinstance(local_bucket_names, list): + local_bucket_names = [local_bucket_names] + if remote_bucket_names is not None: + if not isinstance(remote_bucket_names, list): + remote_bucket_names = [remote_bucket_names] + if remote_ids is not None: + if not isinstance(remote_ids, list): + remote_ids = [remote_ids] + if remote_names is not None: + if not isinstance(remote_names, list): + remote_names = [remote_names] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + # verify the required parameter 'bucket_replica_link' is set + if bucket_replica_link is None: + raise TypeError("Missing the required parameter `bucket_replica_link` when calling `api214_bucket_replica_links_patch`") + + collection_formats = {} + path_params = {} + + query_params = [] + if 'ids' in params: + query_params.append(('ids', params['ids'])) + collection_formats['ids'] = 'csv' + if 'local_bucket_ids' in params: + query_params.append(('local_bucket_ids', params['local_bucket_ids'])) + collection_formats['local_bucket_ids'] = 'csv' + if 'local_bucket_names' in params: + query_params.append(('local_bucket_names', params['local_bucket_names'])) + collection_formats['local_bucket_names'] = 'csv' + if 'remote_bucket_names' in params: + query_params.append(('remote_bucket_names', params['remote_bucket_names'])) + collection_formats['remote_bucket_names'] = 'csv' + if 'remote_ids' in params: + query_params.append(('remote_ids', params['remote_ids'])) + collection_formats['remote_ids'] = 'csv' + if 'remote_names' in params: + query_params.append(('remote_names', params['remote_names'])) + collection_formats['remote_names'] = 'csv' + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'bucket_replica_link' in params: + body_params = params['bucket_replica_link'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/bucket-replica-links', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='BucketReplicaLinkResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_bucket_replica_links_post_with_http_info( + self, + bucket_replica_link=None, # type: models.BucketReplicaLinkPost + local_bucket_names=None, # type: List[str] + local_bucket_ids=None, # type: List[str] + remote_bucket_names=None, # type: List[str] + remote_credentials_names=None, # type: List[str] + remote_credentials_ids=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.BucketReplicaLinkResponse + """POST bucket-replica-links + + Create a bucket replica link for object replication. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_bucket_replica_links_post_with_http_info(bucket_replica_link, async_req=True) + >>> result = thread.get() + + :param BucketReplicaLinkPost bucket_replica_link: (required) + :param list[str] local_bucket_names: A comma-separated list of local bucket names. If there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with `local_bucket_ids` query parameter. + :param list[str] local_bucket_ids: A comma-separated list of local bucket IDs. If after filtering, there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `local_bucket_names` query parameter. + :param list[str] remote_bucket_names: A comma-separated list of remote bucket names. If there is not at least one resource that matches each of the elements, then an error is returned. + :param list[str] remote_credentials_names: A comma-separated list of remote credentials names. If there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `remote_credentials_ids` query parameter. + :param list[str] remote_credentials_ids: A comma-separated list of remote credentials IDs. If after filtering, there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `remote_credentials_names` query parameter. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: BucketReplicaLinkResponse + If the method is called asynchronously, + returns the request thread. + """ + if local_bucket_names is not None: + if not isinstance(local_bucket_names, list): + local_bucket_names = [local_bucket_names] + if local_bucket_ids is not None: + if not isinstance(local_bucket_ids, list): + local_bucket_ids = [local_bucket_ids] + if remote_bucket_names is not None: + if not isinstance(remote_bucket_names, list): + remote_bucket_names = [remote_bucket_names] + if remote_credentials_names is not None: + if not isinstance(remote_credentials_names, list): + remote_credentials_names = [remote_credentials_names] + if remote_credentials_ids is not None: + if not isinstance(remote_credentials_ids, list): + remote_credentials_ids = [remote_credentials_ids] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + # verify the required parameter 'bucket_replica_link' is set + if bucket_replica_link is None: + raise TypeError("Missing the required parameter `bucket_replica_link` when calling `api214_bucket_replica_links_post`") + + collection_formats = {} + path_params = {} + + query_params = [] + if 'local_bucket_names' in params: + query_params.append(('local_bucket_names', params['local_bucket_names'])) + collection_formats['local_bucket_names'] = 'csv' + if 'local_bucket_ids' in params: + query_params.append(('local_bucket_ids', params['local_bucket_ids'])) + collection_formats['local_bucket_ids'] = 'csv' + if 'remote_bucket_names' in params: + query_params.append(('remote_bucket_names', params['remote_bucket_names'])) + collection_formats['remote_bucket_names'] = 'csv' + if 'remote_credentials_names' in params: + query_params.append(('remote_credentials_names', params['remote_credentials_names'])) + collection_formats['remote_credentials_names'] = 'csv' + if 'remote_credentials_ids' in params: + query_params.append(('remote_credentials_ids', params['remote_credentials_ids'])) + collection_formats['remote_credentials_ids'] = 'csv' + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'bucket_replica_link' in params: + body_params = params['bucket_replica_link'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/bucket-replica-links', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='BucketReplicaLinkResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) diff --git a/pypureclient/flashblade/FB_2_14/api/buckets_api.py b/pypureclient/flashblade/FB_2_14/api/buckets_api.py new file mode 100644 index 000000000..17eee8855 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/api/buckets_api.py @@ -0,0 +1,2155 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import re + +# python 2 and python 3 compatibility library +import six +import uuid +from typing import List, Optional + +from .. import models + +class BucketsApi(object): + + def __init__(self, api_client): + self.api_client = api_client + + def api214_buckets_bucket_access_policies_delete_with_http_info( + self, + x_request_id=None, # type: str + bucket_ids=None, # type: List[str] + bucket_names=None, # type: List[str] + names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> None + """DELETE buckets/bucket-access-policies + + Delete a bucket policy of the specified bucket. Either `names` or `bucket_names`/`bucket_ids` query parameters can be used. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_buckets_bucket_access_policies_delete_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param list[str] bucket_ids: A comma-separated list of bucket IDs. If after filtering, there is not at least one resource that matches each of the elements of `bucket_ids`, then an error is returned. This cannot be provided together with the `bucket_names` query parameter. This can be provided with the `ids` query parameter but not with `names`. + :param list[str] bucket_names: A comma-separated list of bucket names. If there is not at least one resource that matches each of the elements of `bucket_names`, then an error is returned. This cannot be provided together with the `bucket_ids` query parameter. This can be provided with the `ids` query parameter but not with `names`. + :param list[str] names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: None + If the method is called asynchronously, + returns the request thread. + """ + if bucket_ids is not None: + if not isinstance(bucket_ids, list): + bucket_ids = [bucket_ids] + if bucket_names is not None: + if not isinstance(bucket_names, list): + bucket_names = [bucket_names] + if names is not None: + if not isinstance(names, list): + names = [names] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + collection_formats = {} + path_params = {} + + query_params = [] + if 'bucket_ids' in params: + query_params.append(('bucket_ids', params['bucket_ids'])) + collection_formats['bucket_ids'] = 'csv' + if 'bucket_names' in params: + query_params.append(('bucket_names', params['bucket_names'])) + collection_formats['bucket_names'] = 'csv' + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/buckets/bucket-access-policies', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_buckets_bucket_access_policies_get_with_http_info( + self, + x_request_id=None, # type: str + bucket_ids=None, # type: List[str] + bucket_names=None, # type: List[str] + continuation_token=None, # type: str + filter=None, # type: str + limit=None, # type: int + names=None, # type: List[str] + offset=None, # type: int + sort=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.BucketAccessPolicyGetResponse + """GET buckets/bucket-access-policies + + List a policy for the specified bucket and its attributes. Either `names` or `bucket_names`/`bucket_ids` query parameters can be used. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_buckets_bucket_access_policies_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param list[str] bucket_ids: A comma-separated list of bucket IDs. If after filtering, there is not at least one resource that matches each of the elements of `bucket_ids`, then an error is returned. This cannot be provided together with the `bucket_names` query parameter. This can be provided with the `ids` query parameter but not with `names`. + :param list[str] bucket_names: A comma-separated list of bucket names. If there is not at least one resource that matches each of the elements of `bucket_names`, then an error is returned. This cannot be provided together with the `bucket_ids` query parameter. This can be provided with the `ids` query parameter but not with `names`. + :param str continuation_token: An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result. + :param str filter: Exclude resources that don't match the specified criteria. + :param int limit: Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the maximum number, the request is still valid. In that case the server just returns the maximum number of items, disregarding the client's page size request. + :param list[str] names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :param int offset: The offset of the first resource to return from a collection. + :param list[str] sort: Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: BucketAccessPolicyGetResponse + If the method is called asynchronously, + returns the request thread. + """ + if bucket_ids is not None: + if not isinstance(bucket_ids, list): + bucket_ids = [bucket_ids] + if bucket_names is not None: + if not isinstance(bucket_names, list): + bucket_names = [bucket_names] + if names is not None: + if not isinstance(names, list): + names = [names] + if sort is not None: + if not isinstance(sort, list): + sort = [sort] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + if 'limit' in params and params['limit'] < 1: + raise ValueError("Invalid value for parameter `limit` when calling `api214_buckets_bucket_access_policies_get`, must be a value greater than or equal to `1`") + if 'offset' in params and params['offset'] < 0: + raise ValueError("Invalid value for parameter `offset` when calling `api214_buckets_bucket_access_policies_get`, must be a value greater than or equal to `0`") + collection_formats = {} + path_params = {} + + query_params = [] + if 'bucket_ids' in params: + query_params.append(('bucket_ids', params['bucket_ids'])) + collection_formats['bucket_ids'] = 'csv' + if 'bucket_names' in params: + query_params.append(('bucket_names', params['bucket_names'])) + collection_formats['bucket_names'] = 'csv' + if 'continuation_token' in params: + query_params.append(('continuation_token', params['continuation_token'])) + if 'filter' in params: + query_params.append(('filter', params['filter'])) + if 'limit' in params: + query_params.append(('limit', params['limit'])) + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + if 'offset' in params: + query_params.append(('offset', params['offset'])) + if 'sort' in params: + query_params.append(('sort', params['sort'])) + collection_formats['sort'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/buckets/bucket-access-policies', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='BucketAccessPolicyGetResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_buckets_bucket_access_policies_post_with_http_info( + self, + x_request_id=None, # type: str + bucket_ids=None, # type: List[str] + bucket_names=None, # type: List[str] + policy=None, # type: models.BucketAccessPolicyPost + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.BucketAccessPolicyResponse + """POST buckets/bucket-access-policies + + Create a new policy for the specified bucket. Policy's name will be autogenerated by the system. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_buckets_bucket_access_policies_post_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param list[str] bucket_ids: A comma-separated list of bucket IDs. If after filtering, there is not at least one resource that matches each of the elements of `bucket_ids`, then an error is returned. This cannot be provided together with the `bucket_names` query parameter. This can be provided with the `ids` query parameter but not with `names`. + :param list[str] bucket_names: A comma-separated list of bucket names. If there is not at least one resource that matches each of the elements of `bucket_names`, then an error is returned. This cannot be provided together with the `bucket_ids` query parameter. This can be provided with the `ids` query parameter but not with `names`. + :param BucketAccessPolicyPost policy: + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: BucketAccessPolicyResponse + If the method is called asynchronously, + returns the request thread. + """ + if bucket_ids is not None: + if not isinstance(bucket_ids, list): + bucket_ids = [bucket_ids] + if bucket_names is not None: + if not isinstance(bucket_names, list): + bucket_names = [bucket_names] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + collection_formats = {} + path_params = {} + + query_params = [] + if 'bucket_ids' in params: + query_params.append(('bucket_ids', params['bucket_ids'])) + collection_formats['bucket_ids'] = 'csv' + if 'bucket_names' in params: + query_params.append(('bucket_names', params['bucket_names'])) + collection_formats['bucket_names'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + if 'policy' in params: + body_params = params['policy'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/buckets/bucket-access-policies', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='BucketAccessPolicyResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_buckets_bucket_access_policies_rules_delete_with_http_info( + self, + x_request_id=None, # type: str + bucket_ids=None, # type: List[str] + bucket_names=None, # type: List[str] + names=None, # type: List[str] + policy_names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> None + """DELETE buckets/bucket-access-policies/rules + + Delete one or more bucket policy rules for the specified bucket. Either `policy_names` or `bucket_names`/`bucket_ids` query parameters can be used. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_buckets_bucket_access_policies_rules_delete_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param list[str] bucket_ids: A comma-separated list of bucket IDs. If after filtering, there is not at least one resource that matches each of the elements of `bucket_ids`, then an error is returned. This cannot be provided together with the `bucket_names` query parameter. This can be provided with the `ids` query parameter but not with `names`. + :param list[str] bucket_names: A comma-separated list of bucket names. If there is not at least one resource that matches each of the elements of `bucket_names`, then an error is returned. This cannot be provided together with the `bucket_ids` query parameter. This can be provided with the `ids` query parameter but not with `names`. + :param list[str] names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :param list[str] policy_names: A comma-separated list of policy names. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: None + If the method is called asynchronously, + returns the request thread. + """ + if bucket_ids is not None: + if not isinstance(bucket_ids, list): + bucket_ids = [bucket_ids] + if bucket_names is not None: + if not isinstance(bucket_names, list): + bucket_names = [bucket_names] + if names is not None: + if not isinstance(names, list): + names = [names] + if policy_names is not None: + if not isinstance(policy_names, list): + policy_names = [policy_names] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + collection_formats = {} + path_params = {} + + query_params = [] + if 'bucket_ids' in params: + query_params.append(('bucket_ids', params['bucket_ids'])) + collection_formats['bucket_ids'] = 'csv' + if 'bucket_names' in params: + query_params.append(('bucket_names', params['bucket_names'])) + collection_formats['bucket_names'] = 'csv' + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + if 'policy_names' in params: + query_params.append(('policy_names', params['policy_names'])) + collection_formats['policy_names'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/buckets/bucket-access-policies/rules', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_buckets_bucket_access_policies_rules_get_with_http_info( + self, + x_request_id=None, # type: str + bucket_ids=None, # type: List[str] + bucket_names=None, # type: List[str] + continuation_token=None, # type: str + filter=None, # type: str + limit=None, # type: int + names=None, # type: List[str] + offset=None, # type: int + policy_names=None, # type: List[str] + sort=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.BucketAccessPolicyRuleGetResponse + """GET buckets/bucket-access-policies/rules + + List bucket policy rules for the specified bucket and their attributes. Either `policy_names` or `bucket_names`/`bucket_ids` query parameters can be used. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_buckets_bucket_access_policies_rules_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param list[str] bucket_ids: A comma-separated list of bucket IDs. If after filtering, there is not at least one resource that matches each of the elements of `bucket_ids`, then an error is returned. This cannot be provided together with the `bucket_names` query parameter. This can be provided with the `ids` query parameter but not with `names`. + :param list[str] bucket_names: A comma-separated list of bucket names. If there is not at least one resource that matches each of the elements of `bucket_names`, then an error is returned. This cannot be provided together with the `bucket_ids` query parameter. This can be provided with the `ids` query parameter but not with `names`. + :param str continuation_token: An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result. + :param str filter: Exclude resources that don't match the specified criteria. + :param int limit: Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the maximum number, the request is still valid. In that case the server just returns the maximum number of items, disregarding the client's page size request. + :param list[str] names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :param int offset: The offset of the first resource to return from a collection. + :param list[str] policy_names: A comma-separated list of policy names. + :param list[str] sort: Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: BucketAccessPolicyRuleGetResponse + If the method is called asynchronously, + returns the request thread. + """ + if bucket_ids is not None: + if not isinstance(bucket_ids, list): + bucket_ids = [bucket_ids] + if bucket_names is not None: + if not isinstance(bucket_names, list): + bucket_names = [bucket_names] + if names is not None: + if not isinstance(names, list): + names = [names] + if policy_names is not None: + if not isinstance(policy_names, list): + policy_names = [policy_names] + if sort is not None: + if not isinstance(sort, list): + sort = [sort] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + if 'limit' in params and params['limit'] < 1: + raise ValueError("Invalid value for parameter `limit` when calling `api214_buckets_bucket_access_policies_rules_get`, must be a value greater than or equal to `1`") + if 'offset' in params and params['offset'] < 0: + raise ValueError("Invalid value for parameter `offset` when calling `api214_buckets_bucket_access_policies_rules_get`, must be a value greater than or equal to `0`") + collection_formats = {} + path_params = {} + + query_params = [] + if 'bucket_ids' in params: + query_params.append(('bucket_ids', params['bucket_ids'])) + collection_formats['bucket_ids'] = 'csv' + if 'bucket_names' in params: + query_params.append(('bucket_names', params['bucket_names'])) + collection_formats['bucket_names'] = 'csv' + if 'continuation_token' in params: + query_params.append(('continuation_token', params['continuation_token'])) + if 'filter' in params: + query_params.append(('filter', params['filter'])) + if 'limit' in params: + query_params.append(('limit', params['limit'])) + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + if 'offset' in params: + query_params.append(('offset', params['offset'])) + if 'policy_names' in params: + query_params.append(('policy_names', params['policy_names'])) + collection_formats['policy_names'] = 'csv' + if 'sort' in params: + query_params.append(('sort', params['sort'])) + collection_formats['sort'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/buckets/bucket-access-policies/rules', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='BucketAccessPolicyRuleGetResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_buckets_bucket_access_policies_rules_post_with_http_info( + self, + names=None, # type: List[str] + rule=None, # type: models.BucketAccessPolicyRulePost + x_request_id=None, # type: str + bucket_ids=None, # type: List[str] + bucket_names=None, # type: List[str] + policy_names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.BucketAccessPolicyRuleResponse + """POST buckets/bucket-access-policies/rules + + Create a new bucket policy rule for the specified bucket. Either `policy_names` or `bucket_names`/`bucket_ids` query parameters can be used. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_buckets_bucket_access_policies_rules_post_with_http_info(names, rule, async_req=True) + >>> result = thread.get() + + :param list[str] names: A comma-separated list of resource names. (required) + :param BucketAccessPolicyRulePost rule: (required) + :param str x_request_id: Supplied by client during request or generated by server. + :param list[str] bucket_ids: A comma-separated list of bucket IDs. If after filtering, there is not at least one resource that matches each of the elements of `bucket_ids`, then an error is returned. This cannot be provided together with the `bucket_names` query parameter. This can be provided with the `ids` query parameter but not with `names`. + :param list[str] bucket_names: A comma-separated list of bucket names. If there is not at least one resource that matches each of the elements of `bucket_names`, then an error is returned. This cannot be provided together with the `bucket_ids` query parameter. This can be provided with the `ids` query parameter but not with `names`. + :param list[str] policy_names: A comma-separated list of policy names. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: BucketAccessPolicyRuleResponse + If the method is called asynchronously, + returns the request thread. + """ + if names is not None: + if not isinstance(names, list): + names = [names] + if bucket_ids is not None: + if not isinstance(bucket_ids, list): + bucket_ids = [bucket_ids] + if bucket_names is not None: + if not isinstance(bucket_names, list): + bucket_names = [bucket_names] + if policy_names is not None: + if not isinstance(policy_names, list): + policy_names = [policy_names] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + # verify the required parameter 'names' is set + if names is None: + raise TypeError("Missing the required parameter `names` when calling `api214_buckets_bucket_access_policies_rules_post`") + # verify the required parameter 'rule' is set + if rule is None: + raise TypeError("Missing the required parameter `rule` when calling `api214_buckets_bucket_access_policies_rules_post`") + + collection_formats = {} + path_params = {} + + query_params = [] + if 'bucket_ids' in params: + query_params.append(('bucket_ids', params['bucket_ids'])) + collection_formats['bucket_ids'] = 'csv' + if 'bucket_names' in params: + query_params.append(('bucket_names', params['bucket_names'])) + collection_formats['bucket_names'] = 'csv' + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + if 'policy_names' in params: + query_params.append(('policy_names', params['policy_names'])) + collection_formats['policy_names'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + if 'rule' in params: + body_params = params['rule'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/buckets/bucket-access-policies/rules', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='BucketAccessPolicyRuleResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_buckets_cross_origin_resource_sharing_policies_delete_with_http_info( + self, + x_request_id=None, # type: str + bucket_ids=None, # type: List[str] + bucket_names=None, # type: List[str] + names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> None + """DELETE buckets/cross-origin-resource-sharing-policies + + Delete a cross origin resource sharing policy of the specified bucket. Either `names` or `bucket_names`/`bucket_ids` query parameters can be used. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_buckets_cross_origin_resource_sharing_policies_delete_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param list[str] bucket_ids: A comma-separated list of bucket IDs. If after filtering, there is not at least one resource that matches each of the elements of `bucket_ids`, then an error is returned. This cannot be provided together with the `bucket_names` query parameter. This can be provided with the `ids` query parameter but not with `names`. + :param list[str] bucket_names: A comma-separated list of bucket names. If there is not at least one resource that matches each of the elements of `bucket_names`, then an error is returned. This cannot be provided together with the `bucket_ids` query parameter. This can be provided with the `ids` query parameter but not with `names`. + :param list[str] names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: None + If the method is called asynchronously, + returns the request thread. + """ + if bucket_ids is not None: + if not isinstance(bucket_ids, list): + bucket_ids = [bucket_ids] + if bucket_names is not None: + if not isinstance(bucket_names, list): + bucket_names = [bucket_names] + if names is not None: + if not isinstance(names, list): + names = [names] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + collection_formats = {} + path_params = {} + + query_params = [] + if 'bucket_ids' in params: + query_params.append(('bucket_ids', params['bucket_ids'])) + collection_formats['bucket_ids'] = 'csv' + if 'bucket_names' in params: + query_params.append(('bucket_names', params['bucket_names'])) + collection_formats['bucket_names'] = 'csv' + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/buckets/cross-origin-resource-sharing-policies', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_buckets_cross_origin_resource_sharing_policies_get_with_http_info( + self, + x_request_id=None, # type: str + bucket_ids=None, # type: List[str] + bucket_names=None, # type: List[str] + continuation_token=None, # type: str + filter=None, # type: str + limit=None, # type: int + names=None, # type: List[str] + offset=None, # type: int + sort=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.CrossOriginResourceSharingPolicyGetResponse + """GET buckets/cross-origin-resource-sharing-policies + + List cross origin resource sharing policy for the specified bucket and its attributes. Either `names` or `bucket_names`/`bucket_ids` query parameters can be used. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_buckets_cross_origin_resource_sharing_policies_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param list[str] bucket_ids: A comma-separated list of bucket IDs. If after filtering, there is not at least one resource that matches each of the elements of `bucket_ids`, then an error is returned. This cannot be provided together with the `bucket_names` query parameter. This can be provided with the `ids` query parameter but not with `names`. + :param list[str] bucket_names: A comma-separated list of bucket names. If there is not at least one resource that matches each of the elements of `bucket_names`, then an error is returned. This cannot be provided together with the `bucket_ids` query parameter. This can be provided with the `ids` query parameter but not with `names`. + :param str continuation_token: An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result. + :param str filter: Exclude resources that don't match the specified criteria. + :param int limit: Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the maximum number, the request is still valid. In that case the server just returns the maximum number of items, disregarding the client's page size request. + :param list[str] names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :param int offset: The offset of the first resource to return from a collection. + :param list[str] sort: Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: CrossOriginResourceSharingPolicyGetResponse + If the method is called asynchronously, + returns the request thread. + """ + if bucket_ids is not None: + if not isinstance(bucket_ids, list): + bucket_ids = [bucket_ids] + if bucket_names is not None: + if not isinstance(bucket_names, list): + bucket_names = [bucket_names] + if names is not None: + if not isinstance(names, list): + names = [names] + if sort is not None: + if not isinstance(sort, list): + sort = [sort] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + if 'limit' in params and params['limit'] < 1: + raise ValueError("Invalid value for parameter `limit` when calling `api214_buckets_cross_origin_resource_sharing_policies_get`, must be a value greater than or equal to `1`") + if 'offset' in params and params['offset'] < 0: + raise ValueError("Invalid value for parameter `offset` when calling `api214_buckets_cross_origin_resource_sharing_policies_get`, must be a value greater than or equal to `0`") + collection_formats = {} + path_params = {} + + query_params = [] + if 'bucket_ids' in params: + query_params.append(('bucket_ids', params['bucket_ids'])) + collection_formats['bucket_ids'] = 'csv' + if 'bucket_names' in params: + query_params.append(('bucket_names', params['bucket_names'])) + collection_formats['bucket_names'] = 'csv' + if 'continuation_token' in params: + query_params.append(('continuation_token', params['continuation_token'])) + if 'filter' in params: + query_params.append(('filter', params['filter'])) + if 'limit' in params: + query_params.append(('limit', params['limit'])) + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + if 'offset' in params: + query_params.append(('offset', params['offset'])) + if 'sort' in params: + query_params.append(('sort', params['sort'])) + collection_formats['sort'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/buckets/cross-origin-resource-sharing-policies', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='CrossOriginResourceSharingPolicyGetResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_buckets_cross_origin_resource_sharing_policies_post_with_http_info( + self, + x_request_id=None, # type: str + bucket_ids=None, # type: List[str] + bucket_names=None, # type: List[str] + policy=None, # type: models.CrossOriginResourceSharingPolicyPatch + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.CrossOriginResourceSharingPolicyResponse + """POST buckets/cross-origin-resource-sharing-policies + + Create a new cross origin resource sharing policy for the specified bucket. Policy's name will be autogenerated by the system. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_buckets_cross_origin_resource_sharing_policies_post_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param list[str] bucket_ids: A comma-separated list of bucket IDs. If after filtering, there is not at least one resource that matches each of the elements of `bucket_ids`, then an error is returned. This cannot be provided together with the `bucket_names` query parameter. This can be provided with the `ids` query parameter but not with `names`. + :param list[str] bucket_names: A comma-separated list of bucket names. If there is not at least one resource that matches each of the elements of `bucket_names`, then an error is returned. This cannot be provided together with the `bucket_ids` query parameter. This can be provided with the `ids` query parameter but not with `names`. + :param CrossOriginResourceSharingPolicyPatch policy: + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: CrossOriginResourceSharingPolicyResponse + If the method is called asynchronously, + returns the request thread. + """ + if bucket_ids is not None: + if not isinstance(bucket_ids, list): + bucket_ids = [bucket_ids] + if bucket_names is not None: + if not isinstance(bucket_names, list): + bucket_names = [bucket_names] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + collection_formats = {} + path_params = {} + + query_params = [] + if 'bucket_ids' in params: + query_params.append(('bucket_ids', params['bucket_ids'])) + collection_formats['bucket_ids'] = 'csv' + if 'bucket_names' in params: + query_params.append(('bucket_names', params['bucket_names'])) + collection_formats['bucket_names'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + if 'policy' in params: + body_params = params['policy'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/buckets/cross-origin-resource-sharing-policies', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='CrossOriginResourceSharingPolicyResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_buckets_cross_origin_resource_sharing_policies_rules_delete_with_http_info( + self, + x_request_id=None, # type: str + bucket_ids=None, # type: List[str] + bucket_names=None, # type: List[str] + names=None, # type: List[str] + policy_names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> None + """DELETE buckets/cross-origin-resource-sharing-policies/rules + + Delete one or more cross origin resource sharing policy rules for the specified bucket. Either `policy_names` or `bucket_names` query parameters can be used. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_buckets_cross_origin_resource_sharing_policies_rules_delete_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param list[str] bucket_ids: A comma-separated list of bucket IDs. If after filtering, there is not at least one resource that matches each of the elements of `bucket_ids`, then an error is returned. This cannot be provided together with the `bucket_names` query parameter. This can be provided with the `ids` query parameter but not with `names`. + :param list[str] bucket_names: A comma-separated list of bucket names. If there is not at least one resource that matches each of the elements of `bucket_names`, then an error is returned. This cannot be provided together with the `bucket_ids` query parameter. This can be provided with the `ids` query parameter but not with `names`. + :param list[str] names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :param list[str] policy_names: A comma-separated list of policy names. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: None + If the method is called asynchronously, + returns the request thread. + """ + if bucket_ids is not None: + if not isinstance(bucket_ids, list): + bucket_ids = [bucket_ids] + if bucket_names is not None: + if not isinstance(bucket_names, list): + bucket_names = [bucket_names] + if names is not None: + if not isinstance(names, list): + names = [names] + if policy_names is not None: + if not isinstance(policy_names, list): + policy_names = [policy_names] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + collection_formats = {} + path_params = {} + + query_params = [] + if 'bucket_ids' in params: + query_params.append(('bucket_ids', params['bucket_ids'])) + collection_formats['bucket_ids'] = 'csv' + if 'bucket_names' in params: + query_params.append(('bucket_names', params['bucket_names'])) + collection_formats['bucket_names'] = 'csv' + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + if 'policy_names' in params: + query_params.append(('policy_names', params['policy_names'])) + collection_formats['policy_names'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/buckets/cross-origin-resource-sharing-policies/rules', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_buckets_cross_origin_resource_sharing_policies_rules_get_with_http_info( + self, + x_request_id=None, # type: str + bucket_ids=None, # type: List[str] + bucket_names=None, # type: List[str] + continuation_token=None, # type: str + filter=None, # type: str + limit=None, # type: int + names=None, # type: List[str] + offset=None, # type: int + policy_names=None, # type: List[str] + sort=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.CrossOriginResourceSharingPolicyRuleGetResponse + """GET buckets/cross-origin-resource-sharing-policies/rules + + List cross origin resource sharing policy rules for the specified bucket and their attributes. Either `policy_names` or `bucket_names` query parameters can be used. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_buckets_cross_origin_resource_sharing_policies_rules_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param list[str] bucket_ids: A comma-separated list of bucket IDs. If after filtering, there is not at least one resource that matches each of the elements of `bucket_ids`, then an error is returned. This cannot be provided together with the `bucket_names` query parameter. This can be provided with the `ids` query parameter but not with `names`. + :param list[str] bucket_names: A comma-separated list of bucket names. If there is not at least one resource that matches each of the elements of `bucket_names`, then an error is returned. This cannot be provided together with the `bucket_ids` query parameter. This can be provided with the `ids` query parameter but not with `names`. + :param str continuation_token: An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result. + :param str filter: Exclude resources that don't match the specified criteria. + :param int limit: Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the maximum number, the request is still valid. In that case the server just returns the maximum number of items, disregarding the client's page size request. + :param list[str] names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :param int offset: The offset of the first resource to return from a collection. + :param list[str] policy_names: A comma-separated list of policy names. + :param list[str] sort: Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: CrossOriginResourceSharingPolicyRuleGetResponse + If the method is called asynchronously, + returns the request thread. + """ + if bucket_ids is not None: + if not isinstance(bucket_ids, list): + bucket_ids = [bucket_ids] + if bucket_names is not None: + if not isinstance(bucket_names, list): + bucket_names = [bucket_names] + if names is not None: + if not isinstance(names, list): + names = [names] + if policy_names is not None: + if not isinstance(policy_names, list): + policy_names = [policy_names] + if sort is not None: + if not isinstance(sort, list): + sort = [sort] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + if 'limit' in params and params['limit'] < 1: + raise ValueError("Invalid value for parameter `limit` when calling `api214_buckets_cross_origin_resource_sharing_policies_rules_get`, must be a value greater than or equal to `1`") + if 'offset' in params and params['offset'] < 0: + raise ValueError("Invalid value for parameter `offset` when calling `api214_buckets_cross_origin_resource_sharing_policies_rules_get`, must be a value greater than or equal to `0`") + collection_formats = {} + path_params = {} + + query_params = [] + if 'bucket_ids' in params: + query_params.append(('bucket_ids', params['bucket_ids'])) + collection_formats['bucket_ids'] = 'csv' + if 'bucket_names' in params: + query_params.append(('bucket_names', params['bucket_names'])) + collection_formats['bucket_names'] = 'csv' + if 'continuation_token' in params: + query_params.append(('continuation_token', params['continuation_token'])) + if 'filter' in params: + query_params.append(('filter', params['filter'])) + if 'limit' in params: + query_params.append(('limit', params['limit'])) + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + if 'offset' in params: + query_params.append(('offset', params['offset'])) + if 'policy_names' in params: + query_params.append(('policy_names', params['policy_names'])) + collection_formats['policy_names'] = 'csv' + if 'sort' in params: + query_params.append(('sort', params['sort'])) + collection_formats['sort'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/buckets/cross-origin-resource-sharing-policies/rules', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='CrossOriginResourceSharingPolicyRuleGetResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_buckets_cross_origin_resource_sharing_policies_rules_post_with_http_info( + self, + names=None, # type: List[str] + rule=None, # type: models.CrossOriginResourceSharingPolicyRulePost + x_request_id=None, # type: str + bucket_ids=None, # type: List[str] + bucket_names=None, # type: List[str] + policy_names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.CrossOriginResourceSharingPolicyRuleResponse + """POST buckets/cross-origin-resource-sharing-policies/rules + + Create a new cross origin resource sharing policy rule for the specified bucket. Either `policy_names` or `bucket_names` query parameters can be used. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_buckets_cross_origin_resource_sharing_policies_rules_post_with_http_info(names, rule, async_req=True) + >>> result = thread.get() + + :param list[str] names: A comma-separated list of resource names. (required) + :param CrossOriginResourceSharingPolicyRulePost rule: (required) + :param str x_request_id: Supplied by client during request or generated by server. + :param list[str] bucket_ids: A comma-separated list of bucket IDs. If after filtering, there is not at least one resource that matches each of the elements of `bucket_ids`, then an error is returned. This cannot be provided together with the `bucket_names` query parameter. This can be provided with the `ids` query parameter but not with `names`. + :param list[str] bucket_names: A comma-separated list of bucket names. If there is not at least one resource that matches each of the elements of `bucket_names`, then an error is returned. This cannot be provided together with the `bucket_ids` query parameter. This can be provided with the `ids` query parameter but not with `names`. + :param list[str] policy_names: A comma-separated list of policy names. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: CrossOriginResourceSharingPolicyRuleResponse + If the method is called asynchronously, + returns the request thread. + """ + if names is not None: + if not isinstance(names, list): + names = [names] + if bucket_ids is not None: + if not isinstance(bucket_ids, list): + bucket_ids = [bucket_ids] + if bucket_names is not None: + if not isinstance(bucket_names, list): + bucket_names = [bucket_names] + if policy_names is not None: + if not isinstance(policy_names, list): + policy_names = [policy_names] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + # verify the required parameter 'names' is set + if names is None: + raise TypeError("Missing the required parameter `names` when calling `api214_buckets_cross_origin_resource_sharing_policies_rules_post`") + # verify the required parameter 'rule' is set + if rule is None: + raise TypeError("Missing the required parameter `rule` when calling `api214_buckets_cross_origin_resource_sharing_policies_rules_post`") + + collection_formats = {} + path_params = {} + + query_params = [] + if 'bucket_ids' in params: + query_params.append(('bucket_ids', params['bucket_ids'])) + collection_formats['bucket_ids'] = 'csv' + if 'bucket_names' in params: + query_params.append(('bucket_names', params['bucket_names'])) + collection_formats['bucket_names'] = 'csv' + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + if 'policy_names' in params: + query_params.append(('policy_names', params['policy_names'])) + collection_formats['policy_names'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + if 'rule' in params: + body_params = params['rule'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/buckets/cross-origin-resource-sharing-policies/rules', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='CrossOriginResourceSharingPolicyRuleResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_buckets_delete_with_http_info( + self, + x_request_id=None, # type: str + ids=None, # type: List[str] + names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> None + """DELETE buckets + + Delete object store buckets. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_buckets_delete_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param list[str] ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :param list[str] names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: None + If the method is called asynchronously, + returns the request thread. + """ + if ids is not None: + if not isinstance(ids, list): + ids = [ids] + if names is not None: + if not isinstance(names, list): + names = [names] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + collection_formats = {} + path_params = {} + + query_params = [] + if 'ids' in params: + query_params.append(('ids', params['ids'])) + collection_formats['ids'] = 'csv' + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/buckets', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_buckets_get_with_http_info( + self, + x_request_id=None, # type: str + continuation_token=None, # type: str + destroyed=None, # type: bool + filter=None, # type: str + ids=None, # type: List[str] + limit=None, # type: int + names=None, # type: List[str] + offset=None, # type: int + sort=None, # type: List[str] + total_only=None, # type: bool + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.BucketGetResponse + """GET buckets + + List object store bucket attributes such as creation time and space usage. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_buckets_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param str continuation_token: An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result. + :param bool destroyed: If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. If object name(s) are specified in the `names` parameter, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met. + :param str filter: Exclude resources that don't match the specified criteria. + :param list[str] ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :param int limit: Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the maximum number, the request is still valid. In that case the server just returns the maximum number of items, disregarding the client's page size request. + :param list[str] names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :param int offset: The offset of the first resource to return from a collection. + :param list[str] sort: Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response. + :param bool total_only: Only return the total record for the specified items. The total record will be the total of all items after filtering. The `items` list will be empty. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: BucketGetResponse + If the method is called asynchronously, + returns the request thread. + """ + if ids is not None: + if not isinstance(ids, list): + ids = [ids] + if names is not None: + if not isinstance(names, list): + names = [names] + if sort is not None: + if not isinstance(sort, list): + sort = [sort] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + if 'limit' in params and params['limit'] < 1: + raise ValueError("Invalid value for parameter `limit` when calling `api214_buckets_get`, must be a value greater than or equal to `1`") + if 'offset' in params and params['offset'] < 0: + raise ValueError("Invalid value for parameter `offset` when calling `api214_buckets_get`, must be a value greater than or equal to `0`") + collection_formats = {} + path_params = {} + + query_params = [] + if 'continuation_token' in params: + query_params.append(('continuation_token', params['continuation_token'])) + if 'destroyed' in params: + query_params.append(('destroyed', params['destroyed'])) + if 'filter' in params: + query_params.append(('filter', params['filter'])) + if 'ids' in params: + query_params.append(('ids', params['ids'])) + collection_formats['ids'] = 'csv' + if 'limit' in params: + query_params.append(('limit', params['limit'])) + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + if 'offset' in params: + query_params.append(('offset', params['offset'])) + if 'sort' in params: + query_params.append(('sort', params['sort'])) + collection_formats['sort'] = 'csv' + if 'total_only' in params: + query_params.append(('total_only', params['total_only'])) + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/buckets', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='BucketGetResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_buckets_patch_with_http_info( + self, + bucket=None, # type: models.BucketPatch + x_request_id=None, # type: str + ids=None, # type: List[str] + ignore_usage=None, # type: bool + names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.BucketResponse + """PATCH buckets + + Modify object store bucket attributes such as destroyed and versioning. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_buckets_patch_with_http_info(bucket, async_req=True) + >>> result = thread.get() + + :param BucketPatch bucket: (required) + :param str x_request_id: Supplied by client during request or generated by server. + :param list[str] ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :param bool ignore_usage: Allow update operations that lead to a `hard_limit_enabled` object store account, bucket, or file system with usage over its limiting value. For object store accounts and buckets, the limiting value is that of `quota_limit`, and for file systems it is that of `provisioned`. The operation can be either setting `hard_limit_enabled` when usage is higher than the limiting value, modifying the limiting value to a value under usage when `hard_limit_enabled` or recovering a destroyed bucket of an object store account that cause account's space usage to go over its hard `quota_limit`. + :param list[str] names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: BucketResponse + If the method is called asynchronously, + returns the request thread. + """ + if ids is not None: + if not isinstance(ids, list): + ids = [ids] + if names is not None: + if not isinstance(names, list): + names = [names] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + # verify the required parameter 'bucket' is set + if bucket is None: + raise TypeError("Missing the required parameter `bucket` when calling `api214_buckets_patch`") + + collection_formats = {} + path_params = {} + + query_params = [] + if 'ids' in params: + query_params.append(('ids', params['ids'])) + collection_formats['ids'] = 'csv' + if 'ignore_usage' in params: + query_params.append(('ignore_usage', params['ignore_usage'])) + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + if 'bucket' in params: + body_params = params['bucket'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/buckets', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='BucketResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_buckets_performance_get_with_http_info( + self, + x_request_id=None, # type: str + continuation_token=None, # type: str + end_time=None, # type: int + filter=None, # type: str + ids=None, # type: List[str] + limit=None, # type: int + names=None, # type: List[str] + offset=None, # type: int + resolution=None, # type: int + sort=None, # type: List[str] + start_time=None, # type: int + total_only=None, # type: bool + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.BucketPerformanceGetResponse + """GET buckets/performance + + List performance metrics for a bucket. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_buckets_performance_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param str continuation_token: An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result. + :param int end_time: When the time window ends (in milliseconds since epoch). + :param str filter: Exclude resources that don't match the specified criteria. + :param list[str] ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :param int limit: Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the maximum number, the request is still valid. In that case the server just returns the maximum number of items, disregarding the client's page size request. + :param list[str] names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :param int offset: The offset of the first resource to return from a collection. + :param int resolution: The desired ms between samples. Available resolutions may depend on data type, `start_time` and `end_time`. In general `1000`, `30000`, `300000`, `1800000`, `7200000`, and `86400000` are possible values. + :param list[str] sort: Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response. + :param int start_time: When the time window starts (in milliseconds since epoch). + :param bool total_only: Only return the total record for the specified items. The total record will be the total of all items after filtering. The `items` list will be empty. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: BucketPerformanceGetResponse + If the method is called asynchronously, + returns the request thread. + """ + if ids is not None: + if not isinstance(ids, list): + ids = [ids] + if names is not None: + if not isinstance(names, list): + names = [names] + if sort is not None: + if not isinstance(sort, list): + sort = [sort] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + if 'end_time' in params and params['end_time'] < 0: + raise ValueError("Invalid value for parameter `end_time` when calling `api214_buckets_performance_get`, must be a value greater than or equal to `0`") + if 'limit' in params and params['limit'] < 1: + raise ValueError("Invalid value for parameter `limit` when calling `api214_buckets_performance_get`, must be a value greater than or equal to `1`") + if 'offset' in params and params['offset'] < 0: + raise ValueError("Invalid value for parameter `offset` when calling `api214_buckets_performance_get`, must be a value greater than or equal to `0`") + if 'resolution' in params and params['resolution'] < 0: + raise ValueError("Invalid value for parameter `resolution` when calling `api214_buckets_performance_get`, must be a value greater than or equal to `0`") + if 'start_time' in params and params['start_time'] < 0: + raise ValueError("Invalid value for parameter `start_time` when calling `api214_buckets_performance_get`, must be a value greater than or equal to `0`") + collection_formats = {} + path_params = {} + + query_params = [] + if 'continuation_token' in params: + query_params.append(('continuation_token', params['continuation_token'])) + if 'end_time' in params: + query_params.append(('end_time', params['end_time'])) + if 'filter' in params: + query_params.append(('filter', params['filter'])) + if 'ids' in params: + query_params.append(('ids', params['ids'])) + collection_formats['ids'] = 'csv' + if 'limit' in params: + query_params.append(('limit', params['limit'])) + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + if 'offset' in params: + query_params.append(('offset', params['offset'])) + if 'resolution' in params: + query_params.append(('resolution', params['resolution'])) + if 'sort' in params: + query_params.append(('sort', params['sort'])) + collection_formats['sort'] = 'csv' + if 'start_time' in params: + query_params.append(('start_time', params['start_time'])) + if 'total_only' in params: + query_params.append(('total_only', params['total_only'])) + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/buckets/performance', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='BucketPerformanceGetResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_buckets_post_with_http_info( + self, + names=None, # type: List[str] + bucket=None, # type: models.BucketPost + x_request_id=None, # type: str + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.BucketResponse + """POST buckets + + Create a new object store bucket. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_buckets_post_with_http_info(names, bucket, async_req=True) + >>> result = thread.get() + + :param list[str] names: A comma-separated list of resource names. (required) + :param BucketPost bucket: (required) + :param str x_request_id: Supplied by client during request or generated by server. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: BucketResponse + If the method is called asynchronously, + returns the request thread. + """ + if names is not None: + if not isinstance(names, list): + names = [names] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + # verify the required parameter 'names' is set + if names is None: + raise TypeError("Missing the required parameter `names` when calling `api214_buckets_post`") + # verify the required parameter 'bucket' is set + if bucket is None: + raise TypeError("Missing the required parameter `bucket` when calling `api214_buckets_post`") + + collection_formats = {} + path_params = {} + + query_params = [] + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + if 'bucket' in params: + body_params = params['bucket'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/buckets', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='BucketResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_buckets_s3_specific_performance_get_with_http_info( + self, + x_request_id=None, # type: str + continuation_token=None, # type: str + end_time=None, # type: int + filter=None, # type: str + ids=None, # type: List[str] + limit=None, # type: int + names=None, # type: List[str] + offset=None, # type: int + resolution=None, # type: int + sort=None, # type: List[str] + start_time=None, # type: int + total_only=None, # type: bool + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.BucketS3SpecificPerformanceGetResp + """GET buckets/s3-specific-performance + + List performance metrics specific to S3 operations for a bucket. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_buckets_s3_specific_performance_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param str continuation_token: An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result. + :param int end_time: When the time window ends (in milliseconds since epoch). + :param str filter: Exclude resources that don't match the specified criteria. + :param list[str] ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :param int limit: Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the maximum number, the request is still valid. In that case the server just returns the maximum number of items, disregarding the client's page size request. + :param list[str] names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :param int offset: The offset of the first resource to return from a collection. + :param int resolution: The desired ms between samples. Available resolutions may depend on data type, `start_time` and `end_time`. In general `1000`, `30000`, `300000`, `1800000`, `7200000`, and `86400000` are possible values. + :param list[str] sort: Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response. + :param int start_time: When the time window starts (in milliseconds since epoch). + :param bool total_only: Only return the total record for the specified items. The total record will be the total of all items after filtering. The `items` list will be empty. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: BucketS3SpecificPerformanceGetResp + If the method is called asynchronously, + returns the request thread. + """ + if ids is not None: + if not isinstance(ids, list): + ids = [ids] + if names is not None: + if not isinstance(names, list): + names = [names] + if sort is not None: + if not isinstance(sort, list): + sort = [sort] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + if 'end_time' in params and params['end_time'] < 0: + raise ValueError("Invalid value for parameter `end_time` when calling `api214_buckets_s3_specific_performance_get`, must be a value greater than or equal to `0`") + if 'limit' in params and params['limit'] < 1: + raise ValueError("Invalid value for parameter `limit` when calling `api214_buckets_s3_specific_performance_get`, must be a value greater than or equal to `1`") + if 'offset' in params and params['offset'] < 0: + raise ValueError("Invalid value for parameter `offset` when calling `api214_buckets_s3_specific_performance_get`, must be a value greater than or equal to `0`") + if 'resolution' in params and params['resolution'] < 0: + raise ValueError("Invalid value for parameter `resolution` when calling `api214_buckets_s3_specific_performance_get`, must be a value greater than or equal to `0`") + if 'start_time' in params and params['start_time'] < 0: + raise ValueError("Invalid value for parameter `start_time` when calling `api214_buckets_s3_specific_performance_get`, must be a value greater than or equal to `0`") + collection_formats = {} + path_params = {} + + query_params = [] + if 'continuation_token' in params: + query_params.append(('continuation_token', params['continuation_token'])) + if 'end_time' in params: + query_params.append(('end_time', params['end_time'])) + if 'filter' in params: + query_params.append(('filter', params['filter'])) + if 'ids' in params: + query_params.append(('ids', params['ids'])) + collection_formats['ids'] = 'csv' + if 'limit' in params: + query_params.append(('limit', params['limit'])) + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + if 'offset' in params: + query_params.append(('offset', params['offset'])) + if 'resolution' in params: + query_params.append(('resolution', params['resolution'])) + if 'sort' in params: + query_params.append(('sort', params['sort'])) + collection_formats['sort'] = 'csv' + if 'start_time' in params: + query_params.append(('start_time', params['start_time'])) + if 'total_only' in params: + query_params.append(('total_only', params['total_only'])) + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/buckets/s3-specific-performance', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='BucketS3SpecificPerformanceGetResp', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) diff --git a/pypureclient/flashblade/FB_2_14/api/certificate_groups_api.py b/pypureclient/flashblade/FB_2_14/api/certificate_groups_api.py new file mode 100644 index 000000000..d80a3c281 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/api/certificate_groups_api.py @@ -0,0 +1,817 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import re + +# python 2 and python 3 compatibility library +import six +import uuid +from typing import List, Optional + +from .. import models + +class CertificateGroupsApi(object): + + def __init__(self, api_client): + self.api_client = api_client + + def api214_certificate_groups_certificates_delete_with_http_info( + self, + x_request_id=None, # type: str + certificate_ids=None, # type: List[str] + certificate_group_ids=None, # type: List[str] + certificate_group_names=None, # type: List[str] + certificate_names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> None + """DELETE certificate-groups/certificates + + Delete one or more certificate groups. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_certificate_groups_certificates_delete_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param list[str] certificate_ids: A comma-separated list of certificate ids. If there is not at least one resource that matches each of the elements of `certificate_ids`, then an error is returned. This cannot be provided in conjunction with the `certificate_names` parameter. + :param list[str] certificate_group_ids: A comma-separated list of certificate group ids. If there is not at least one resource that matches each of the elements of `certificate_group_ids`, then an error is returned. This cannot be provided in conjunction with the `certificate_group_names` parameter. + :param list[str] certificate_group_names: A comma-separated list of certificate group names. If there is not at least one resource that matches each of the elements of `certificate_group_names`, then an error is returned. This cannot be provided in conjunction with the `certificate_group_ids` parameter. + :param list[str] certificate_names: A comma-separated list of certificate names. If there is not at least one resource that matches each of the elements of `certificate_names`, then an error is returned. This cannot be provided in conjunction with the `certificate_ids` parameter. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: None + If the method is called asynchronously, + returns the request thread. + """ + if certificate_ids is not None: + if not isinstance(certificate_ids, list): + certificate_ids = [certificate_ids] + if certificate_group_ids is not None: + if not isinstance(certificate_group_ids, list): + certificate_group_ids = [certificate_group_ids] + if certificate_group_names is not None: + if not isinstance(certificate_group_names, list): + certificate_group_names = [certificate_group_names] + if certificate_names is not None: + if not isinstance(certificate_names, list): + certificate_names = [certificate_names] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + collection_formats = {} + path_params = {} + + query_params = [] + if 'certificate_ids' in params: + query_params.append(('certificate_ids', params['certificate_ids'])) + collection_formats['certificate_ids'] = 'csv' + if 'certificate_group_ids' in params: + query_params.append(('certificate_group_ids', params['certificate_group_ids'])) + collection_formats['certificate_group_ids'] = 'csv' + if 'certificate_group_names' in params: + query_params.append(('certificate_group_names', params['certificate_group_names'])) + collection_formats['certificate_group_names'] = 'csv' + if 'certificate_names' in params: + query_params.append(('certificate_names', params['certificate_names'])) + collection_formats['certificate_names'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/certificate-groups/certificates', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_certificate_groups_certificates_get_with_http_info( + self, + x_request_id=None, # type: str + continuation_token=None, # type: str + certificate_ids=None, # type: List[str] + certificate_group_ids=None, # type: List[str] + certificate_group_names=None, # type: List[str] + certificate_names=None, # type: List[str] + filter=None, # type: str + limit=None, # type: int + offset=None, # type: int + sort=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.CertificateGroupCertificateGetResp + """GET certificate-groups/certificates + + List membership associations between groups and certificates on the array. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_certificate_groups_certificates_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param str continuation_token: An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result. + :param list[str] certificate_ids: A comma-separated list of certificate ids. If there is not at least one resource that matches each of the elements of `certificate_ids`, then an error is returned. This cannot be provided in conjunction with the `certificate_names` parameter. + :param list[str] certificate_group_ids: A comma-separated list of certificate group ids. If there is not at least one resource that matches each of the elements of `certificate_group_ids`, then an error is returned. This cannot be provided in conjunction with the `certificate_group_names` parameter. + :param list[str] certificate_group_names: A comma-separated list of certificate group names. If there is not at least one resource that matches each of the elements of `certificate_group_names`, then an error is returned. This cannot be provided in conjunction with the `certificate_group_ids` parameter. + :param list[str] certificate_names: A comma-separated list of certificate names. If there is not at least one resource that matches each of the elements of `certificate_names`, then an error is returned. This cannot be provided in conjunction with the `certificate_ids` parameter. + :param str filter: Exclude resources that don't match the specified criteria. + :param int limit: Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the maximum number, the request is still valid. In that case the server just returns the maximum number of items, disregarding the client's page size request. + :param int offset: The offset of the first resource to return from a collection. + :param list[str] sort: Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: CertificateGroupCertificateGetResp + If the method is called asynchronously, + returns the request thread. + """ + if certificate_ids is not None: + if not isinstance(certificate_ids, list): + certificate_ids = [certificate_ids] + if certificate_group_ids is not None: + if not isinstance(certificate_group_ids, list): + certificate_group_ids = [certificate_group_ids] + if certificate_group_names is not None: + if not isinstance(certificate_group_names, list): + certificate_group_names = [certificate_group_names] + if certificate_names is not None: + if not isinstance(certificate_names, list): + certificate_names = [certificate_names] + if sort is not None: + if not isinstance(sort, list): + sort = [sort] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + if 'limit' in params and params['limit'] < 1: + raise ValueError("Invalid value for parameter `limit` when calling `api214_certificate_groups_certificates_get`, must be a value greater than or equal to `1`") + if 'offset' in params and params['offset'] < 0: + raise ValueError("Invalid value for parameter `offset` when calling `api214_certificate_groups_certificates_get`, must be a value greater than or equal to `0`") + collection_formats = {} + path_params = {} + + query_params = [] + if 'continuation_token' in params: + query_params.append(('continuation_token', params['continuation_token'])) + if 'certificate_ids' in params: + query_params.append(('certificate_ids', params['certificate_ids'])) + collection_formats['certificate_ids'] = 'csv' + if 'certificate_group_ids' in params: + query_params.append(('certificate_group_ids', params['certificate_group_ids'])) + collection_formats['certificate_group_ids'] = 'csv' + if 'certificate_group_names' in params: + query_params.append(('certificate_group_names', params['certificate_group_names'])) + collection_formats['certificate_group_names'] = 'csv' + if 'certificate_names' in params: + query_params.append(('certificate_names', params['certificate_names'])) + collection_formats['certificate_names'] = 'csv' + if 'filter' in params: + query_params.append(('filter', params['filter'])) + if 'limit' in params: + query_params.append(('limit', params['limit'])) + if 'offset' in params: + query_params.append(('offset', params['offset'])) + if 'sort' in params: + query_params.append(('sort', params['sort'])) + collection_formats['sort'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/certificate-groups/certificates', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='CertificateGroupCertificateGetResp', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_certificate_groups_certificates_post_with_http_info( + self, + x_request_id=None, # type: str + certificate_ids=None, # type: List[str] + certificate_group_ids=None, # type: List[str] + certificate_group_names=None, # type: List[str] + certificate_names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.CertificateGroupCertificateResponse + """POST certificate-groups/certificates + + Add one or more certificates to one or more certificate groups on the array. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_certificate_groups_certificates_post_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param list[str] certificate_ids: A comma-separated list of certificate ids. If there is not at least one resource that matches each of the elements of `certificate_ids`, then an error is returned. This cannot be provided in conjunction with the `certificate_names` parameter. + :param list[str] certificate_group_ids: A comma-separated list of certificate group ids. If there is not at least one resource that matches each of the elements of `certificate_group_ids`, then an error is returned. This cannot be provided in conjunction with the `certificate_group_names` parameter. + :param list[str] certificate_group_names: A comma-separated list of certificate group names. If there is not at least one resource that matches each of the elements of `certificate_group_names`, then an error is returned. This cannot be provided in conjunction with the `certificate_group_ids` parameter. + :param list[str] certificate_names: A comma-separated list of certificate names. If there is not at least one resource that matches each of the elements of `certificate_names`, then an error is returned. This cannot be provided in conjunction with the `certificate_ids` parameter. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: CertificateGroupCertificateResponse + If the method is called asynchronously, + returns the request thread. + """ + if certificate_ids is not None: + if not isinstance(certificate_ids, list): + certificate_ids = [certificate_ids] + if certificate_group_ids is not None: + if not isinstance(certificate_group_ids, list): + certificate_group_ids = [certificate_group_ids] + if certificate_group_names is not None: + if not isinstance(certificate_group_names, list): + certificate_group_names = [certificate_group_names] + if certificate_names is not None: + if not isinstance(certificate_names, list): + certificate_names = [certificate_names] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + collection_formats = {} + path_params = {} + + query_params = [] + if 'certificate_ids' in params: + query_params.append(('certificate_ids', params['certificate_ids'])) + collection_formats['certificate_ids'] = 'csv' + if 'certificate_group_ids' in params: + query_params.append(('certificate_group_ids', params['certificate_group_ids'])) + collection_formats['certificate_group_ids'] = 'csv' + if 'certificate_group_names' in params: + query_params.append(('certificate_group_names', params['certificate_group_names'])) + collection_formats['certificate_group_names'] = 'csv' + if 'certificate_names' in params: + query_params.append(('certificate_names', params['certificate_names'])) + collection_formats['certificate_names'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/certificate-groups/certificates', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='CertificateGroupCertificateResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_certificate_groups_delete_with_http_info( + self, + x_request_id=None, # type: str + ids=None, # type: List[str] + names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> None + """DELETE certificate-groups + + Delete one or more certificate groups from the array. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_certificate_groups_delete_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param list[str] ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :param list[str] names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: None + If the method is called asynchronously, + returns the request thread. + """ + if ids is not None: + if not isinstance(ids, list): + ids = [ids] + if names is not None: + if not isinstance(names, list): + names = [names] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + collection_formats = {} + path_params = {} + + query_params = [] + if 'ids' in params: + query_params.append(('ids', params['ids'])) + collection_formats['ids'] = 'csv' + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/certificate-groups', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_certificate_groups_get_with_http_info( + self, + x_request_id=None, # type: str + continuation_token=None, # type: str + filter=None, # type: str + ids=None, # type: List[str] + limit=None, # type: int + names=None, # type: List[str] + offset=None, # type: int + sort=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.CertificateGroupGetResponse + """GET certificate-groups + + Display all array certificate groups. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_certificate_groups_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param str continuation_token: An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result. + :param str filter: Exclude resources that don't match the specified criteria. + :param list[str] ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :param int limit: Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the maximum number, the request is still valid. In that case the server just returns the maximum number of items, disregarding the client's page size request. + :param list[str] names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :param int offset: The offset of the first resource to return from a collection. + :param list[str] sort: Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: CertificateGroupGetResponse + If the method is called asynchronously, + returns the request thread. + """ + if ids is not None: + if not isinstance(ids, list): + ids = [ids] + if names is not None: + if not isinstance(names, list): + names = [names] + if sort is not None: + if not isinstance(sort, list): + sort = [sort] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + if 'limit' in params and params['limit'] < 1: + raise ValueError("Invalid value for parameter `limit` when calling `api214_certificate_groups_get`, must be a value greater than or equal to `1`") + if 'offset' in params and params['offset'] < 0: + raise ValueError("Invalid value for parameter `offset` when calling `api214_certificate_groups_get`, must be a value greater than or equal to `0`") + collection_formats = {} + path_params = {} + + query_params = [] + if 'continuation_token' in params: + query_params.append(('continuation_token', params['continuation_token'])) + if 'filter' in params: + query_params.append(('filter', params['filter'])) + if 'ids' in params: + query_params.append(('ids', params['ids'])) + collection_formats['ids'] = 'csv' + if 'limit' in params: + query_params.append(('limit', params['limit'])) + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + if 'offset' in params: + query_params.append(('offset', params['offset'])) + if 'sort' in params: + query_params.append(('sort', params['sort'])) + collection_formats['sort'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/certificate-groups', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='CertificateGroupGetResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_certificate_groups_post_with_http_info( + self, + x_request_id=None, # type: str + names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.CertificateGroupResponse + """POST certificate-groups + + Create one or more certificate groups on the array. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_certificate_groups_post_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param list[str] names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: CertificateGroupResponse + If the method is called asynchronously, + returns the request thread. + """ + if names is not None: + if not isinstance(names, list): + names = [names] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + collection_formats = {} + path_params = {} + + query_params = [] + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/certificate-groups', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='CertificateGroupResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_certificate_groups_uses_get_with_http_info( + self, + x_request_id=None, # type: str + continuation_token=None, # type: str + filter=None, # type: str + ids=None, # type: List[str] + limit=None, # type: int + names=None, # type: List[str] + offset=None, # type: int + sort=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.CertificateGroupUseGetResponse + """GET certificate-groups/uses + + List how certificate groups are being used and by what. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_certificate_groups_uses_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param str continuation_token: An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result. + :param str filter: Exclude resources that don't match the specified criteria. + :param list[str] ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :param int limit: Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the maximum number, the request is still valid. In that case the server just returns the maximum number of items, disregarding the client's page size request. + :param list[str] names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :param int offset: The offset of the first resource to return from a collection. + :param list[str] sort: Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: CertificateGroupUseGetResponse + If the method is called asynchronously, + returns the request thread. + """ + if ids is not None: + if not isinstance(ids, list): + ids = [ids] + if names is not None: + if not isinstance(names, list): + names = [names] + if sort is not None: + if not isinstance(sort, list): + sort = [sort] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + if 'limit' in params and params['limit'] < 1: + raise ValueError("Invalid value for parameter `limit` when calling `api214_certificate_groups_uses_get`, must be a value greater than or equal to `1`") + if 'offset' in params and params['offset'] < 0: + raise ValueError("Invalid value for parameter `offset` when calling `api214_certificate_groups_uses_get`, must be a value greater than or equal to `0`") + collection_formats = {} + path_params = {} + + query_params = [] + if 'continuation_token' in params: + query_params.append(('continuation_token', params['continuation_token'])) + if 'filter' in params: + query_params.append(('filter', params['filter'])) + if 'ids' in params: + query_params.append(('ids', params['ids'])) + collection_formats['ids'] = 'csv' + if 'limit' in params: + query_params.append(('limit', params['limit'])) + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + if 'offset' in params: + query_params.append(('offset', params['offset'])) + if 'sort' in params: + query_params.append(('sort', params['sort'])) + collection_formats['sort'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/certificate-groups/uses', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='CertificateGroupUseGetResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) diff --git a/pypureclient/flashblade/FB_2_14/api/certificates_api.py b/pypureclient/flashblade/FB_2_14/api/certificates_api.py new file mode 100644 index 000000000..f0802629c --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/api/certificates_api.py @@ -0,0 +1,926 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import re + +# python 2 and python 3 compatibility library +import six +import uuid +from typing import List, Optional + +from .. import models + +class CertificatesApi(object): + + def __init__(self, api_client): + self.api_client = api_client + + def api214_certificates_certificate_groups_delete_with_http_info( + self, + x_request_id=None, # type: str + certificate_ids=None, # type: List[str] + certificate_group_ids=None, # type: List[str] + certificate_group_names=None, # type: List[str] + certificate_names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> None + """DELETE certificates/certificate-groups + + Remove one or more certificates from one or more certificate groups. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_certificates_certificate_groups_delete_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param list[str] certificate_ids: A comma-separated list of certificate ids. If there is not at least one resource that matches each of the elements of `certificate_ids`, then an error is returned. This cannot be provided in conjunction with the `certificate_names` parameter. + :param list[str] certificate_group_ids: A comma-separated list of certificate group ids. If there is not at least one resource that matches each of the elements of `certificate_group_ids`, then an error is returned. This cannot be provided in conjunction with the `certificate_group_names` parameter. + :param list[str] certificate_group_names: A comma-separated list of certificate group names. If there is not at least one resource that matches each of the elements of `certificate_group_names`, then an error is returned. This cannot be provided in conjunction with the `certificate_group_ids` parameter. + :param list[str] certificate_names: A comma-separated list of certificate names. If there is not at least one resource that matches each of the elements of `certificate_names`, then an error is returned. This cannot be provided in conjunction with the `certificate_ids` parameter. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: None + If the method is called asynchronously, + returns the request thread. + """ + if certificate_ids is not None: + if not isinstance(certificate_ids, list): + certificate_ids = [certificate_ids] + if certificate_group_ids is not None: + if not isinstance(certificate_group_ids, list): + certificate_group_ids = [certificate_group_ids] + if certificate_group_names is not None: + if not isinstance(certificate_group_names, list): + certificate_group_names = [certificate_group_names] + if certificate_names is not None: + if not isinstance(certificate_names, list): + certificate_names = [certificate_names] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + collection_formats = {} + path_params = {} + + query_params = [] + if 'certificate_ids' in params: + query_params.append(('certificate_ids', params['certificate_ids'])) + collection_formats['certificate_ids'] = 'csv' + if 'certificate_group_ids' in params: + query_params.append(('certificate_group_ids', params['certificate_group_ids'])) + collection_formats['certificate_group_ids'] = 'csv' + if 'certificate_group_names' in params: + query_params.append(('certificate_group_names', params['certificate_group_names'])) + collection_formats['certificate_group_names'] = 'csv' + if 'certificate_names' in params: + query_params.append(('certificate_names', params['certificate_names'])) + collection_formats['certificate_names'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/certificates/certificate-groups', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_certificates_certificate_groups_get_with_http_info( + self, + x_request_id=None, # type: str + continuation_token=None, # type: str + certificate_ids=None, # type: List[str] + certificate_group_ids=None, # type: List[str] + certificate_group_names=None, # type: List[str] + certificate_names=None, # type: List[str] + filter=None, # type: str + limit=None, # type: int + offset=None, # type: int + sort=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.CertificateCertificateGroupGetResp + """GET certificates/certificate-groups + + List membership associations between groups and certificates. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_certificates_certificate_groups_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param str continuation_token: An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result. + :param list[str] certificate_ids: A comma-separated list of certificate ids. If there is not at least one resource that matches each of the elements of `certificate_ids`, then an error is returned. This cannot be provided in conjunction with the `certificate_names` parameter. + :param list[str] certificate_group_ids: A comma-separated list of certificate group ids. If there is not at least one resource that matches each of the elements of `certificate_group_ids`, then an error is returned. This cannot be provided in conjunction with the `certificate_group_names` parameter. + :param list[str] certificate_group_names: A comma-separated list of certificate group names. If there is not at least one resource that matches each of the elements of `certificate_group_names`, then an error is returned. This cannot be provided in conjunction with the `certificate_group_ids` parameter. + :param list[str] certificate_names: A comma-separated list of certificate names. If there is not at least one resource that matches each of the elements of `certificate_names`, then an error is returned. This cannot be provided in conjunction with the `certificate_ids` parameter. + :param str filter: Exclude resources that don't match the specified criteria. + :param int limit: Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the maximum number, the request is still valid. In that case the server just returns the maximum number of items, disregarding the client's page size request. + :param int offset: The offset of the first resource to return from a collection. + :param list[str] sort: Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: CertificateCertificateGroupGetResp + If the method is called asynchronously, + returns the request thread. + """ + if certificate_ids is not None: + if not isinstance(certificate_ids, list): + certificate_ids = [certificate_ids] + if certificate_group_ids is not None: + if not isinstance(certificate_group_ids, list): + certificate_group_ids = [certificate_group_ids] + if certificate_group_names is not None: + if not isinstance(certificate_group_names, list): + certificate_group_names = [certificate_group_names] + if certificate_names is not None: + if not isinstance(certificate_names, list): + certificate_names = [certificate_names] + if sort is not None: + if not isinstance(sort, list): + sort = [sort] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + if 'limit' in params and params['limit'] < 1: + raise ValueError("Invalid value for parameter `limit` when calling `api214_certificates_certificate_groups_get`, must be a value greater than or equal to `1`") + if 'offset' in params and params['offset'] < 0: + raise ValueError("Invalid value for parameter `offset` when calling `api214_certificates_certificate_groups_get`, must be a value greater than or equal to `0`") + collection_formats = {} + path_params = {} + + query_params = [] + if 'continuation_token' in params: + query_params.append(('continuation_token', params['continuation_token'])) + if 'certificate_ids' in params: + query_params.append(('certificate_ids', params['certificate_ids'])) + collection_formats['certificate_ids'] = 'csv' + if 'certificate_group_ids' in params: + query_params.append(('certificate_group_ids', params['certificate_group_ids'])) + collection_formats['certificate_group_ids'] = 'csv' + if 'certificate_group_names' in params: + query_params.append(('certificate_group_names', params['certificate_group_names'])) + collection_formats['certificate_group_names'] = 'csv' + if 'certificate_names' in params: + query_params.append(('certificate_names', params['certificate_names'])) + collection_formats['certificate_names'] = 'csv' + if 'filter' in params: + query_params.append(('filter', params['filter'])) + if 'limit' in params: + query_params.append(('limit', params['limit'])) + if 'offset' in params: + query_params.append(('offset', params['offset'])) + if 'sort' in params: + query_params.append(('sort', params['sort'])) + collection_formats['sort'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/certificates/certificate-groups', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='CertificateCertificateGroupGetResp', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_certificates_certificate_groups_post_with_http_info( + self, + x_request_id=None, # type: str + certificate_ids=None, # type: List[str] + certificate_group_ids=None, # type: List[str] + certificate_group_names=None, # type: List[str] + certificate_names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.CertificateCertificateGroupResponse + """POST certificates/certificate-groups + + Add one or more certificates to one or more certificate groups. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_certificates_certificate_groups_post_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param list[str] certificate_ids: A comma-separated list of certificate ids. If there is not at least one resource that matches each of the elements of `certificate_ids`, then an error is returned. This cannot be provided in conjunction with the `certificate_names` parameter. + :param list[str] certificate_group_ids: A comma-separated list of certificate group ids. If there is not at least one resource that matches each of the elements of `certificate_group_ids`, then an error is returned. This cannot be provided in conjunction with the `certificate_group_names` parameter. + :param list[str] certificate_group_names: A comma-separated list of certificate group names. If there is not at least one resource that matches each of the elements of `certificate_group_names`, then an error is returned. This cannot be provided in conjunction with the `certificate_group_ids` parameter. + :param list[str] certificate_names: A comma-separated list of certificate names. If there is not at least one resource that matches each of the elements of `certificate_names`, then an error is returned. This cannot be provided in conjunction with the `certificate_ids` parameter. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: CertificateCertificateGroupResponse + If the method is called asynchronously, + returns the request thread. + """ + if certificate_ids is not None: + if not isinstance(certificate_ids, list): + certificate_ids = [certificate_ids] + if certificate_group_ids is not None: + if not isinstance(certificate_group_ids, list): + certificate_group_ids = [certificate_group_ids] + if certificate_group_names is not None: + if not isinstance(certificate_group_names, list): + certificate_group_names = [certificate_group_names] + if certificate_names is not None: + if not isinstance(certificate_names, list): + certificate_names = [certificate_names] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + collection_formats = {} + path_params = {} + + query_params = [] + if 'certificate_ids' in params: + query_params.append(('certificate_ids', params['certificate_ids'])) + collection_formats['certificate_ids'] = 'csv' + if 'certificate_group_ids' in params: + query_params.append(('certificate_group_ids', params['certificate_group_ids'])) + collection_formats['certificate_group_ids'] = 'csv' + if 'certificate_group_names' in params: + query_params.append(('certificate_group_names', params['certificate_group_names'])) + collection_formats['certificate_group_names'] = 'csv' + if 'certificate_names' in params: + query_params.append(('certificate_names', params['certificate_names'])) + collection_formats['certificate_names'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/certificates/certificate-groups', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='CertificateCertificateGroupResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_certificates_delete_with_http_info( + self, + x_request_id=None, # type: str + ids=None, # type: List[str] + names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> None + """DELETE certificates + + Delete a CA certificate from the array. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_certificates_delete_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param list[str] ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :param list[str] names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: None + If the method is called asynchronously, + returns the request thread. + """ + if ids is not None: + if not isinstance(ids, list): + ids = [ids] + if names is not None: + if not isinstance(names, list): + names = [names] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + collection_formats = {} + path_params = {} + + query_params = [] + if 'ids' in params: + query_params.append(('ids', params['ids'])) + collection_formats['ids'] = 'csv' + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/certificates', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_certificates_get_with_http_info( + self, + x_request_id=None, # type: str + continuation_token=None, # type: str + filter=None, # type: str + ids=None, # type: List[str] + limit=None, # type: int + names=None, # type: List[str] + offset=None, # type: int + sort=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.CertificateGetResponse + """GET certificates + + List array certificates and their attributes. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_certificates_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param str continuation_token: An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result. + :param str filter: Exclude resources that don't match the specified criteria. + :param list[str] ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :param int limit: Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the maximum number, the request is still valid. In that case the server just returns the maximum number of items, disregarding the client's page size request. + :param list[str] names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :param int offset: The offset of the first resource to return from a collection. + :param list[str] sort: Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: CertificateGetResponse + If the method is called asynchronously, + returns the request thread. + """ + if ids is not None: + if not isinstance(ids, list): + ids = [ids] + if names is not None: + if not isinstance(names, list): + names = [names] + if sort is not None: + if not isinstance(sort, list): + sort = [sort] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + if 'limit' in params and params['limit'] < 1: + raise ValueError("Invalid value for parameter `limit` when calling `api214_certificates_get`, must be a value greater than or equal to `1`") + if 'offset' in params and params['offset'] < 0: + raise ValueError("Invalid value for parameter `offset` when calling `api214_certificates_get`, must be a value greater than or equal to `0`") + collection_formats = {} + path_params = {} + + query_params = [] + if 'continuation_token' in params: + query_params.append(('continuation_token', params['continuation_token'])) + if 'filter' in params: + query_params.append(('filter', params['filter'])) + if 'ids' in params: + query_params.append(('ids', params['ids'])) + collection_formats['ids'] = 'csv' + if 'limit' in params: + query_params.append(('limit', params['limit'])) + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + if 'offset' in params: + query_params.append(('offset', params['offset'])) + if 'sort' in params: + query_params.append(('sort', params['sort'])) + collection_formats['sort'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/certificates', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='CertificateGetResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_certificates_patch_with_http_info( + self, + certificate=None, # type: models.CertificatePatch + x_request_id=None, # type: str + ids=None, # type: List[str] + names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.CertificateResponse + """PATCH certificates + + Modify SSL certificate attributes such as passphrases and intermediate certificates. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_certificates_patch_with_http_info(certificate, async_req=True) + >>> result = thread.get() + + :param CertificatePatch certificate: (required) + :param str x_request_id: Supplied by client during request or generated by server. + :param list[str] ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :param list[str] names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: CertificateResponse + If the method is called asynchronously, + returns the request thread. + """ + if ids is not None: + if not isinstance(ids, list): + ids = [ids] + if names is not None: + if not isinstance(names, list): + names = [names] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + # verify the required parameter 'certificate' is set + if certificate is None: + raise TypeError("Missing the required parameter `certificate` when calling `api214_certificates_patch`") + + collection_formats = {} + path_params = {} + + query_params = [] + if 'ids' in params: + query_params.append(('ids', params['ids'])) + collection_formats['ids'] = 'csv' + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + if 'certificate' in params: + body_params = params['certificate'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/certificates', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='CertificateResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_certificates_post_with_http_info( + self, + certificate=None, # type: models.CertificatePost + x_request_id=None, # type: str + names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.CertificateResponse + """POST certificates + + Upload a CA certificate to the array. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_certificates_post_with_http_info(certificate, async_req=True) + >>> result = thread.get() + + :param CertificatePost certificate: (required) + :param str x_request_id: Supplied by client during request or generated by server. + :param list[str] names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: CertificateResponse + If the method is called asynchronously, + returns the request thread. + """ + if names is not None: + if not isinstance(names, list): + names = [names] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + # verify the required parameter 'certificate' is set + if certificate is None: + raise TypeError("Missing the required parameter `certificate` when calling `api214_certificates_post`") + + collection_formats = {} + path_params = {} + + query_params = [] + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + if 'certificate' in params: + body_params = params['certificate'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/certificates', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='CertificateResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_certificates_uses_get_with_http_info( + self, + x_request_id=None, # type: str + continuation_token=None, # type: str + filter=None, # type: str + ids=None, # type: List[str] + limit=None, # type: int + names=None, # type: List[str] + offset=None, # type: int + sort=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.CertificateUseGetResponse + """GET certificates/uses + + List how certificates are being used and by what. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_certificates_uses_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param str continuation_token: An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result. + :param str filter: Exclude resources that don't match the specified criteria. + :param list[str] ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :param int limit: Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the maximum number, the request is still valid. In that case the server just returns the maximum number of items, disregarding the client's page size request. + :param list[str] names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :param int offset: The offset of the first resource to return from a collection. + :param list[str] sort: Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: CertificateUseGetResponse + If the method is called asynchronously, + returns the request thread. + """ + if ids is not None: + if not isinstance(ids, list): + ids = [ids] + if names is not None: + if not isinstance(names, list): + names = [names] + if sort is not None: + if not isinstance(sort, list): + sort = [sort] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + if 'limit' in params and params['limit'] < 1: + raise ValueError("Invalid value for parameter `limit` when calling `api214_certificates_uses_get`, must be a value greater than or equal to `1`") + if 'offset' in params and params['offset'] < 0: + raise ValueError("Invalid value for parameter `offset` when calling `api214_certificates_uses_get`, must be a value greater than or equal to `0`") + collection_formats = {} + path_params = {} + + query_params = [] + if 'continuation_token' in params: + query_params.append(('continuation_token', params['continuation_token'])) + if 'filter' in params: + query_params.append(('filter', params['filter'])) + if 'ids' in params: + query_params.append(('ids', params['ids'])) + collection_formats['ids'] = 'csv' + if 'limit' in params: + query_params.append(('limit', params['limit'])) + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + if 'offset' in params: + query_params.append(('offset', params['offset'])) + if 'sort' in params: + query_params.append(('sort', params['sort'])) + collection_formats['sort'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/certificates/uses', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='CertificateUseGetResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) diff --git a/pypureclient/flashblade/FB_2_14/api/clients_api.py b/pypureclient/flashblade/FB_2_14/api/clients_api.py new file mode 100644 index 000000000..3f5e73486 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/api/clients_api.py @@ -0,0 +1,137 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import re + +# python 2 and python 3 compatibility library +import six +import uuid +from typing import List, Optional + +from .. import models + +class ClientsApi(object): + + def __init__(self, api_client): + self.api_client = api_client + + def api214_arrays_clients_performance_get_with_http_info( + self, + x_request_id=None, # type: str + filter=None, # type: str + limit=None, # type: int + names=None, # type: List[str] + sort=None, # type: List[str] + total_only=None, # type: bool + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.ClientPerformanceGetResponse + """GET clients-performance + + List NFS client I/O performance metrics. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_arrays_clients_performance_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param str filter: Exclude resources that don't match the specified criteria. + :param int limit: Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the maximum number, the request is still valid. In that case the server just returns the maximum number of items, disregarding the client's page size request. + :param list[str] names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :param list[str] sort: Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response. + :param bool total_only: Only return the total record for the specified items. The total record will be the total of all items after filtering. The `items` list will be empty. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: ClientPerformanceGetResponse + If the method is called asynchronously, + returns the request thread. + """ + if names is not None: + if not isinstance(names, list): + names = [names] + if sort is not None: + if not isinstance(sort, list): + sort = [sort] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + if 'limit' in params and params['limit'] < 1: + raise ValueError("Invalid value for parameter `limit` when calling `api214_arrays_clients_performance_get`, must be a value greater than or equal to `1`") + collection_formats = {} + path_params = {} + + query_params = [] + if 'filter' in params: + query_params.append(('filter', params['filter'])) + if 'limit' in params: + query_params.append(('limit', params['limit'])) + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + if 'sort' in params: + query_params.append(('sort', params['sort'])) + collection_formats['sort'] = 'csv' + if 'total_only' in params: + query_params.append(('total_only', params['total_only'])) + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/arrays/clients/performance', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ClientPerformanceGetResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) diff --git a/pypureclient/flashblade/FB_2_14/api/directory_services_api.py b/pypureclient/flashblade/FB_2_14/api/directory_services_api.py new file mode 100644 index 000000000..232c59e9a --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/api/directory_services_api.py @@ -0,0 +1,923 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import re + +# python 2 and python 3 compatibility library +import six +import uuid +from typing import List, Optional + +from .. import models + +class DirectoryServicesApi(object): + + def __init__(self, api_client): + self.api_client = api_client + + def api214_directory_services_get_with_http_info( + self, + x_request_id=None, # type: str + continuation_token=None, # type: str + filter=None, # type: str + ids=None, # type: List[str] + limit=None, # type: int + names=None, # type: List[str] + offset=None, # type: int + sort=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.DirectoryServiceGetResponse + """GET directory-services + + List directory service configuration information for the array. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_directory_services_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param str continuation_token: An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result. + :param str filter: Exclude resources that don't match the specified criteria. + :param list[str] ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :param int limit: Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the maximum number, the request is still valid. In that case the server just returns the maximum number of items, disregarding the client's page size request. + :param list[str] names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :param int offset: The offset of the first resource to return from a collection. + :param list[str] sort: Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: DirectoryServiceGetResponse + If the method is called asynchronously, + returns the request thread. + """ + if ids is not None: + if not isinstance(ids, list): + ids = [ids] + if names is not None: + if not isinstance(names, list): + names = [names] + if sort is not None: + if not isinstance(sort, list): + sort = [sort] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + if 'limit' in params and params['limit'] < 1: + raise ValueError("Invalid value for parameter `limit` when calling `api214_directory_services_get`, must be a value greater than or equal to `1`") + if 'offset' in params and params['offset'] < 0: + raise ValueError("Invalid value for parameter `offset` when calling `api214_directory_services_get`, must be a value greater than or equal to `0`") + collection_formats = {} + path_params = {} + + query_params = [] + if 'continuation_token' in params: + query_params.append(('continuation_token', params['continuation_token'])) + if 'filter' in params: + query_params.append(('filter', params['filter'])) + if 'ids' in params: + query_params.append(('ids', params['ids'])) + collection_formats['ids'] = 'csv' + if 'limit' in params: + query_params.append(('limit', params['limit'])) + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + if 'offset' in params: + query_params.append(('offset', params['offset'])) + if 'sort' in params: + query_params.append(('sort', params['sort'])) + collection_formats['sort'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/directory-services', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='DirectoryServiceGetResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_directory_services_patch_with_http_info( + self, + directory_service=None, # type: models.DirectoryService + x_request_id=None, # type: str + ids=None, # type: List[str] + names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.DirectoryServiceResponse + """PATCH directory-services + + Modifies and tests the directory service configuration. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_directory_services_patch_with_http_info(directory_service, async_req=True) + >>> result = thread.get() + + :param DirectoryService directory_service: (required) + :param str x_request_id: Supplied by client during request or generated by server. + :param list[str] ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :param list[str] names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: DirectoryServiceResponse + If the method is called asynchronously, + returns the request thread. + """ + if ids is not None: + if not isinstance(ids, list): + ids = [ids] + if names is not None: + if not isinstance(names, list): + names = [names] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + # verify the required parameter 'directory_service' is set + if directory_service is None: + raise TypeError("Missing the required parameter `directory_service` when calling `api214_directory_services_patch`") + + collection_formats = {} + path_params = {} + + query_params = [] + if 'ids' in params: + query_params.append(('ids', params['ids'])) + collection_formats['ids'] = 'csv' + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + if 'directory_service' in params: + body_params = params['directory_service'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/directory-services', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='DirectoryServiceResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_directory_services_roles_delete_with_http_info( + self, + x_request_id=None, # type: str + names=None, # type: List[str] + ids=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> None + """DELETE directory-service/roles + + Delete an RBAC group configuration setting for manageability. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_directory_services_roles_delete_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param list[str] names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :param list[str] ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: None + If the method is called asynchronously, + returns the request thread. + """ + if names is not None: + if not isinstance(names, list): + names = [names] + if ids is not None: + if not isinstance(ids, list): + ids = [ids] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + collection_formats = {} + path_params = {} + + query_params = [] + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + if 'ids' in params: + query_params.append(('ids', params['ids'])) + collection_formats['ids'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/directory-services/roles', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_directory_services_roles_get_with_http_info( + self, + x_request_id=None, # type: str + continuation_token=None, # type: str + filter=None, # type: str + limit=None, # type: int + offset=None, # type: int + names=None, # type: List[str] + ids=None, # type: List[str] + role_ids=None, # type: List[str] + role_names=None, # type: List[str] + sort=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.DirectoryServiceRolesGetResponse + """GET directory-service/roles + + Return array's RBAC group configuration settings for manageability. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_directory_services_roles_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param str continuation_token: An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result. + :param str filter: Exclude resources that don't match the specified criteria. + :param int limit: Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the maximum number, the request is still valid. In that case the server just returns the maximum number of items, disregarding the client's page size request. + :param int offset: The offset of the first resource to return from a collection. + :param list[str] names: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `names`, then an error is returned. This cannot be provided together with the `ids`, `role_names`, or `role_ids` query parameters. + :param list[str] ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `names`, `role_names`, or `role_ids` query parameters. + :param list[str] role_ids: A comma-separated list of role_ids. If after filtering, there is not at least one resource that matches each of the elements of `role_ids`, then an error is returned. This cannot be provided together with the `ids`, `names` or `role_names` query parameters. This query parameter is deprecated for use with directory service roles. If this parameter is used to query or modify directory service roles, but more than 1 configuration exists with a given role id, an error will be returned in order to avoid ambiguous operation. + :param list[str] role_names: A comma-separated list of role_names. If there is not at least one resource that matches each of the elements of `role_names`, then an error is returned. This cannot be provided together with the `ids`, `names`, or `role_ids` query parameters. This query parameter is deprecated for use with directory service roles. If this parameter is used to query or modify directory service roles, but more than 1 configuration exists with a given role name, an error will be returned in order to avoid ambiguous operation. + :param list[str] sort: Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: DirectoryServiceRolesGetResponse + If the method is called asynchronously, + returns the request thread. + """ + if names is not None: + if not isinstance(names, list): + names = [names] + if ids is not None: + if not isinstance(ids, list): + ids = [ids] + if role_ids is not None: + if not isinstance(role_ids, list): + role_ids = [role_ids] + if role_names is not None: + if not isinstance(role_names, list): + role_names = [role_names] + if sort is not None: + if not isinstance(sort, list): + sort = [sort] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + if 'limit' in params and params['limit'] < 1: + raise ValueError("Invalid value for parameter `limit` when calling `api214_directory_services_roles_get`, must be a value greater than or equal to `1`") + if 'offset' in params and params['offset'] < 0: + raise ValueError("Invalid value for parameter `offset` when calling `api214_directory_services_roles_get`, must be a value greater than or equal to `0`") + collection_formats = {} + path_params = {} + + query_params = [] + if 'continuation_token' in params: + query_params.append(('continuation_token', params['continuation_token'])) + if 'filter' in params: + query_params.append(('filter', params['filter'])) + if 'limit' in params: + query_params.append(('limit', params['limit'])) + if 'offset' in params: + query_params.append(('offset', params['offset'])) + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + if 'ids' in params: + query_params.append(('ids', params['ids'])) + collection_formats['ids'] = 'csv' + if 'role_ids' in params: + query_params.append(('role_ids', params['role_ids'])) + collection_formats['role_ids'] = 'csv' + if 'role_names' in params: + query_params.append(('role_names', params['role_names'])) + collection_formats['role_names'] = 'csv' + if 'sort' in params: + query_params.append(('sort', params['sort'])) + collection_formats['sort'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/directory-services/roles', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='DirectoryServiceRolesGetResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_directory_services_roles_patch_with_http_info( + self, + directory_service_roles=None, # type: models.DirectoryServiceRole + x_request_id=None, # type: str + names=None, # type: List[str] + ids=None, # type: List[str] + role_ids=None, # type: List[str] + role_names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.DirectoryServiceRolesResponse + """PATCH directory-service/roles + + Update an RBAC group configuration setting for manageability. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_directory_services_roles_patch_with_http_info(directory_service_roles, async_req=True) + >>> result = thread.get() + + :param DirectoryServiceRole directory_service_roles: (required) + :param str x_request_id: Supplied by client during request or generated by server. + :param list[str] names: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `names`, then an error is returned. This cannot be provided together with the `ids`, `role_names`, or `role_ids` query parameters. + :param list[str] ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `names`, `role_names`, or `role_ids` query parameters. + :param list[str] role_ids: A comma-separated list of role_ids. If after filtering, there is not at least one resource that matches each of the elements of `role_ids`, then an error is returned. This cannot be provided together with the `ids`, `names` or `role_names` query parameters. This query parameter is deprecated for use with directory service roles. If this parameter is used to query or modify directory service roles, but more than 1 configuration exists with a given role id, an error will be returned in order to avoid ambiguous operation. + :param list[str] role_names: A comma-separated list of role_names. If there is not at least one resource that matches each of the elements of `role_names`, then an error is returned. This cannot be provided together with the `ids`, `names`, or `role_ids` query parameters. This query parameter is deprecated for use with directory service roles. If this parameter is used to query or modify directory service roles, but more than 1 configuration exists with a given role name, an error will be returned in order to avoid ambiguous operation. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: DirectoryServiceRolesResponse + If the method is called asynchronously, + returns the request thread. + """ + if names is not None: + if not isinstance(names, list): + names = [names] + if ids is not None: + if not isinstance(ids, list): + ids = [ids] + if role_ids is not None: + if not isinstance(role_ids, list): + role_ids = [role_ids] + if role_names is not None: + if not isinstance(role_names, list): + role_names = [role_names] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + # verify the required parameter 'directory_service_roles' is set + if directory_service_roles is None: + raise TypeError("Missing the required parameter `directory_service_roles` when calling `api214_directory_services_roles_patch`") + + collection_formats = {} + path_params = {} + + query_params = [] + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + if 'ids' in params: + query_params.append(('ids', params['ids'])) + collection_formats['ids'] = 'csv' + if 'role_ids' in params: + query_params.append(('role_ids', params['role_ids'])) + collection_formats['role_ids'] = 'csv' + if 'role_names' in params: + query_params.append(('role_names', params['role_names'])) + collection_formats['role_names'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + if 'directory_service_roles' in params: + body_params = params['directory_service_roles'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/directory-services/roles', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='DirectoryServiceRolesResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_directory_services_roles_post_with_http_info( + self, + directory_service_roles=None, # type: models.DirectoryServiceRole + x_request_id=None, # type: str + names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.DirectoryServiceRolesResponse + """POST directory-service/roles + + Create an RBAC group configuration setting for manageability. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_directory_services_roles_post_with_http_info(directory_service_roles, async_req=True) + >>> result = thread.get() + + :param DirectoryServiceRole directory_service_roles: (required) + :param str x_request_id: Supplied by client during request or generated by server. + :param list[str] names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: DirectoryServiceRolesResponse + If the method is called asynchronously, + returns the request thread. + """ + if names is not None: + if not isinstance(names, list): + names = [names] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + # verify the required parameter 'directory_service_roles' is set + if directory_service_roles is None: + raise TypeError("Missing the required parameter `directory_service_roles` when calling `api214_directory_services_roles_post`") + + collection_formats = {} + path_params = {} + + query_params = [] + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + if 'directory_service_roles' in params: + body_params = params['directory_service_roles'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/directory-services/roles', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='DirectoryServiceRolesResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_directory_services_test_get_with_http_info( + self, + x_request_id=None, # type: str + filter=None, # type: str + ids=None, # type: List[str] + limit=None, # type: int + names=None, # type: List[str] + sort=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.TestResultGetResponse + """GET directory-services/test + + Test the configured directory services on the array. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_directory_services_test_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param str filter: Exclude resources that don't match the specified criteria. + :param list[str] ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :param int limit: Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the maximum number, the request is still valid. In that case the server just returns the maximum number of items, disregarding the client's page size request. + :param list[str] names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :param list[str] sort: Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: TestResultGetResponse + If the method is called asynchronously, + returns the request thread. + """ + if ids is not None: + if not isinstance(ids, list): + ids = [ids] + if names is not None: + if not isinstance(names, list): + names = [names] + if sort is not None: + if not isinstance(sort, list): + sort = [sort] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + if 'limit' in params and params['limit'] < 1: + raise ValueError("Invalid value for parameter `limit` when calling `api214_directory_services_test_get`, must be a value greater than or equal to `1`") + collection_formats = {} + path_params = {} + + query_params = [] + if 'filter' in params: + query_params.append(('filter', params['filter'])) + if 'ids' in params: + query_params.append(('ids', params['ids'])) + collection_formats['ids'] = 'csv' + if 'limit' in params: + query_params.append(('limit', params['limit'])) + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + if 'sort' in params: + query_params.append(('sort', params['sort'])) + collection_formats['sort'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/directory-services/test', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='TestResultGetResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_directory_services_test_patch_with_http_info( + self, + x_request_id=None, # type: str + filter=None, # type: str + ids=None, # type: List[str] + names=None, # type: List[str] + sort=None, # type: List[str] + directory_service=None, # type: models.DirectoryService + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.TestResultResponse + """PATCH directory-service/test + + Test the configured directory services on the array. Optionally, provide modifications which will be used to perform the tests, but will not be applied to the current configuration. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_directory_services_test_patch_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param str filter: Exclude resources that don't match the specified criteria. + :param list[str] ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :param list[str] names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :param list[str] sort: Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response. + :param DirectoryService directory_service: An optional directory service configuration that, if provided, will be used to overwrite aspects of the existing directory service objects when performing tests. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: TestResultResponse + If the method is called asynchronously, + returns the request thread. + """ + if ids is not None: + if not isinstance(ids, list): + ids = [ids] + if names is not None: + if not isinstance(names, list): + names = [names] + if sort is not None: + if not isinstance(sort, list): + sort = [sort] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + collection_formats = {} + path_params = {} + + query_params = [] + if 'filter' in params: + query_params.append(('filter', params['filter'])) + if 'ids' in params: + query_params.append(('ids', params['ids'])) + collection_formats['ids'] = 'csv' + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + if 'sort' in params: + query_params.append(('sort', params['sort'])) + collection_formats['sort'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + if 'directory_service' in params: + body_params = params['directory_service'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/directory-services/test', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='TestResultResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) diff --git a/pypureclient/flashblade/FB_2_14/api/dns_api.py b/pypureclient/flashblade/FB_2_14/api/dns_api.py new file mode 100644 index 000000000..2130862d7 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/api/dns_api.py @@ -0,0 +1,253 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import re + +# python 2 and python 3 compatibility library +import six +import uuid +from typing import List, Optional + +from .. import models + +class DNSApi(object): + + def __init__(self, api_client): + self.api_client = api_client + + def api214_dns_get_with_http_info( + self, + x_request_id=None, # type: str + continuation_token=None, # type: str + filter=None, # type: str + ids=None, # type: List[str] + limit=None, # type: int + names=None, # type: List[str] + offset=None, # type: int + sort=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.DnsGetResponse + """GET dns + + List DNS attributes for the array's administrative network. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_dns_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param str continuation_token: An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result. + :param str filter: Exclude resources that don't match the specified criteria. + :param list[str] ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :param int limit: Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the maximum number, the request is still valid. In that case the server just returns the maximum number of items, disregarding the client's page size request. + :param list[str] names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :param int offset: The offset of the first resource to return from a collection. + :param list[str] sort: Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: DnsGetResponse + If the method is called asynchronously, + returns the request thread. + """ + if ids is not None: + if not isinstance(ids, list): + ids = [ids] + if names is not None: + if not isinstance(names, list): + names = [names] + if sort is not None: + if not isinstance(sort, list): + sort = [sort] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + if 'limit' in params and params['limit'] < 1: + raise ValueError("Invalid value for parameter `limit` when calling `api214_dns_get`, must be a value greater than or equal to `1`") + if 'offset' in params and params['offset'] < 0: + raise ValueError("Invalid value for parameter `offset` when calling `api214_dns_get`, must be a value greater than or equal to `0`") + collection_formats = {} + path_params = {} + + query_params = [] + if 'continuation_token' in params: + query_params.append(('continuation_token', params['continuation_token'])) + if 'filter' in params: + query_params.append(('filter', params['filter'])) + if 'ids' in params: + query_params.append(('ids', params['ids'])) + collection_formats['ids'] = 'csv' + if 'limit' in params: + query_params.append(('limit', params['limit'])) + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + if 'offset' in params: + query_params.append(('offset', params['offset'])) + if 'sort' in params: + query_params.append(('sort', params['sort'])) + collection_formats['sort'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/dns', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='DnsGetResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_dns_patch_with_http_info( + self, + dns=None, # type: models.Dns + x_request_id=None, # type: str + ids=None, # type: List[str] + names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.DnsResponse + """PATCH dns + + Modify DNS attributes. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_dns_patch_with_http_info(dns, async_req=True) + >>> result = thread.get() + + :param Dns dns: (required) + :param str x_request_id: Supplied by client during request or generated by server. + :param list[str] ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :param list[str] names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: DnsResponse + If the method is called asynchronously, + returns the request thread. + """ + if ids is not None: + if not isinstance(ids, list): + ids = [ids] + if names is not None: + if not isinstance(names, list): + names = [names] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + # verify the required parameter 'dns' is set + if dns is None: + raise TypeError("Missing the required parameter `dns` when calling `api214_dns_patch`") + + collection_formats = {} + path_params = {} + + query_params = [] + if 'ids' in params: + query_params.append(('ids', params['ids'])) + collection_formats['ids'] = 'csv' + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + if 'dns' in params: + body_params = params['dns'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/dns', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='DnsResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) diff --git a/pypureclient/flashblade/FB_2_14/api/drives_api.py b/pypureclient/flashblade/FB_2_14/api/drives_api.py new file mode 100644 index 000000000..42fe8f660 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/api/drives_api.py @@ -0,0 +1,155 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import re + +# python 2 and python 3 compatibility library +import six +import uuid +from typing import List, Optional + +from .. import models + +class DrivesApi(object): + + def __init__(self, api_client): + self.api_client = api_client + + def api214_drives_get_with_http_info( + self, + x_request_id=None, # type: str + continuation_token=None, # type: str + filter=None, # type: str + ids=None, # type: List[str] + limit=None, # type: int + names=None, # type: List[str] + offset=None, # type: int + sort=None, # type: List[str] + total_only=None, # type: bool + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.DriveGetResponse + """GET drives + + List array drive information. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_drives_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param str continuation_token: An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result. + :param str filter: Exclude resources that don't match the specified criteria. + :param list[str] ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :param int limit: Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the maximum number, the request is still valid. In that case the server just returns the maximum number of items, disregarding the client's page size request. + :param list[str] names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :param int offset: The offset of the first resource to return from a collection. + :param list[str] sort: Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response. + :param bool total_only: Only return the total record for the specified items. The total record will be the total of all items after filtering. The `items` list will be empty. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: DriveGetResponse + If the method is called asynchronously, + returns the request thread. + """ + if ids is not None: + if not isinstance(ids, list): + ids = [ids] + if names is not None: + if not isinstance(names, list): + names = [names] + if sort is not None: + if not isinstance(sort, list): + sort = [sort] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + if 'limit' in params and params['limit'] < 1: + raise ValueError("Invalid value for parameter `limit` when calling `api214_drives_get`, must be a value greater than or equal to `1`") + if 'offset' in params and params['offset'] < 0: + raise ValueError("Invalid value for parameter `offset` when calling `api214_drives_get`, must be a value greater than or equal to `0`") + collection_formats = {} + path_params = {} + + query_params = [] + if 'continuation_token' in params: + query_params.append(('continuation_token', params['continuation_token'])) + if 'filter' in params: + query_params.append(('filter', params['filter'])) + if 'ids' in params: + query_params.append(('ids', params['ids'])) + collection_formats['ids'] = 'csv' + if 'limit' in params: + query_params.append(('limit', params['limit'])) + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + if 'offset' in params: + query_params.append(('offset', params['offset'])) + if 'sort' in params: + query_params.append(('sort', params['sort'])) + collection_formats['sort'] = 'csv' + if 'total_only' in params: + query_params.append(('total_only', params['total_only'])) + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/drives', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='DriveGetResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) diff --git a/pypureclient/flashblade/FB_2_14/api/file_system_replica_links_api.py b/pypureclient/flashblade/FB_2_14/api/file_system_replica_links_api.py new file mode 100644 index 000000000..519355cf6 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/api/file_system_replica_links_api.py @@ -0,0 +1,1056 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import re + +# python 2 and python 3 compatibility library +import six +import uuid +from typing import List, Optional + +from .. import models + +class FileSystemReplicaLinksApi(object): + + def __init__(self, api_client): + self.api_client = api_client + + def api214_file_system_replica_links_delete_with_http_info( + self, + x_request_id=None, # type: str + ids=None, # type: List[str] + local_file_system_ids=None, # type: List[str] + local_file_system_names=None, # type: List[str] + remote_file_system_ids=None, # type: List[str] + remote_file_system_names=None, # type: List[str] + remote_ids=None, # type: List[str] + remote_names=None, # type: List[str] + cancel_in_progress_transfers=None, # type: bool + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> None + """DELETE file-system-replica-links + + Delete a file system replication link. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_file_system_replica_links_delete_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param list[str] ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :param list[str] local_file_system_ids: A comma-separated list of local file system IDs. If after filtering, there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `local_file_system_names` query parameter. + :param list[str] local_file_system_names: A comma-separated list of local file system names. If there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with `local_file_system_ids` query parameter. + :param list[str] remote_file_system_ids: A comma-separated list of remote file system IDs. If there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `remote_file_system_names` query parameter. + :param list[str] remote_file_system_names: A comma-separated list of remote file system names. If there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `remote_file_system_ids` query parameter. + :param list[str] remote_ids: A comma-separated list of remote array IDs. If after filtering, there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `remote_names` query parameter. + :param list[str] remote_names: A comma-separated list of remote array names. If there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with `remote_ids` query parameter. + :param bool cancel_in_progress_transfers: This parameter must be set to `true` in order to delete a file system replication link (which can cancel any in-progress replication transfers). Setting this parameter to `true` is acknowledgement that any in-progress replication transfers on the specified links will be cancelled when this request is fulfilled. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: None + If the method is called asynchronously, + returns the request thread. + """ + if ids is not None: + if not isinstance(ids, list): + ids = [ids] + if local_file_system_ids is not None: + if not isinstance(local_file_system_ids, list): + local_file_system_ids = [local_file_system_ids] + if local_file_system_names is not None: + if not isinstance(local_file_system_names, list): + local_file_system_names = [local_file_system_names] + if remote_file_system_ids is not None: + if not isinstance(remote_file_system_ids, list): + remote_file_system_ids = [remote_file_system_ids] + if remote_file_system_names is not None: + if not isinstance(remote_file_system_names, list): + remote_file_system_names = [remote_file_system_names] + if remote_ids is not None: + if not isinstance(remote_ids, list): + remote_ids = [remote_ids] + if remote_names is not None: + if not isinstance(remote_names, list): + remote_names = [remote_names] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + collection_formats = {} + path_params = {} + + query_params = [] + if 'ids' in params: + query_params.append(('ids', params['ids'])) + collection_formats['ids'] = 'csv' + if 'local_file_system_ids' in params: + query_params.append(('local_file_system_ids', params['local_file_system_ids'])) + collection_formats['local_file_system_ids'] = 'csv' + if 'local_file_system_names' in params: + query_params.append(('local_file_system_names', params['local_file_system_names'])) + collection_formats['local_file_system_names'] = 'csv' + if 'remote_file_system_ids' in params: + query_params.append(('remote_file_system_ids', params['remote_file_system_ids'])) + collection_formats['remote_file_system_ids'] = 'csv' + if 'remote_file_system_names' in params: + query_params.append(('remote_file_system_names', params['remote_file_system_names'])) + collection_formats['remote_file_system_names'] = 'csv' + if 'remote_ids' in params: + query_params.append(('remote_ids', params['remote_ids'])) + collection_formats['remote_ids'] = 'csv' + if 'remote_names' in params: + query_params.append(('remote_names', params['remote_names'])) + collection_formats['remote_names'] = 'csv' + if 'cancel_in_progress_transfers' in params: + query_params.append(('cancel_in_progress_transfers', params['cancel_in_progress_transfers'])) + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/file-system-replica-links', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_file_system_replica_links_get_with_http_info( + self, + x_request_id=None, # type: str + continuation_token=None, # type: str + filter=None, # type: str + ids=None, # type: List[str] + limit=None, # type: int + local_file_system_ids=None, # type: List[str] + local_file_system_names=None, # type: List[str] + offset=None, # type: int + remote_file_system_ids=None, # type: List[str] + remote_file_system_names=None, # type: List[str] + remote_ids=None, # type: List[str] + remote_names=None, # type: List[str] + sort=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.FileSystemReplicaLinkGetResponse + """GET file-system-replica-links + + List file system replication link. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_file_system_replica_links_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param str continuation_token: An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result. + :param str filter: Exclude resources that don't match the specified criteria. + :param list[str] ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :param int limit: Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the maximum number, the request is still valid. In that case the server just returns the maximum number of items, disregarding the client's page size request. + :param list[str] local_file_system_ids: A comma-separated list of local file system IDs. If after filtering, there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `local_file_system_names` query parameter. + :param list[str] local_file_system_names: A comma-separated list of local file system names. If there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with `local_file_system_ids` query parameter. + :param int offset: The offset of the first resource to return from a collection. + :param list[str] remote_file_system_ids: A comma-separated list of remote file system IDs. If there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `remote_file_system_names` query parameter. + :param list[str] remote_file_system_names: A comma-separated list of remote file system names. If there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `remote_file_system_ids` query parameter. + :param list[str] remote_ids: A comma-separated list of remote array IDs. If after filtering, there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `remote_names` query parameter. + :param list[str] remote_names: A comma-separated list of remote array names. If there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with `remote_ids` query parameter. + :param list[str] sort: Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: FileSystemReplicaLinkGetResponse + If the method is called asynchronously, + returns the request thread. + """ + if ids is not None: + if not isinstance(ids, list): + ids = [ids] + if local_file_system_ids is not None: + if not isinstance(local_file_system_ids, list): + local_file_system_ids = [local_file_system_ids] + if local_file_system_names is not None: + if not isinstance(local_file_system_names, list): + local_file_system_names = [local_file_system_names] + if remote_file_system_ids is not None: + if not isinstance(remote_file_system_ids, list): + remote_file_system_ids = [remote_file_system_ids] + if remote_file_system_names is not None: + if not isinstance(remote_file_system_names, list): + remote_file_system_names = [remote_file_system_names] + if remote_ids is not None: + if not isinstance(remote_ids, list): + remote_ids = [remote_ids] + if remote_names is not None: + if not isinstance(remote_names, list): + remote_names = [remote_names] + if sort is not None: + if not isinstance(sort, list): + sort = [sort] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + if 'limit' in params and params['limit'] < 1: + raise ValueError("Invalid value for parameter `limit` when calling `api214_file_system_replica_links_get`, must be a value greater than or equal to `1`") + if 'offset' in params and params['offset'] < 0: + raise ValueError("Invalid value for parameter `offset` when calling `api214_file_system_replica_links_get`, must be a value greater than or equal to `0`") + collection_formats = {} + path_params = {} + + query_params = [] + if 'continuation_token' in params: + query_params.append(('continuation_token', params['continuation_token'])) + if 'filter' in params: + query_params.append(('filter', params['filter'])) + if 'ids' in params: + query_params.append(('ids', params['ids'])) + collection_formats['ids'] = 'csv' + if 'limit' in params: + query_params.append(('limit', params['limit'])) + if 'local_file_system_ids' in params: + query_params.append(('local_file_system_ids', params['local_file_system_ids'])) + collection_formats['local_file_system_ids'] = 'csv' + if 'local_file_system_names' in params: + query_params.append(('local_file_system_names', params['local_file_system_names'])) + collection_formats['local_file_system_names'] = 'csv' + if 'offset' in params: + query_params.append(('offset', params['offset'])) + if 'remote_file_system_ids' in params: + query_params.append(('remote_file_system_ids', params['remote_file_system_ids'])) + collection_formats['remote_file_system_ids'] = 'csv' + if 'remote_file_system_names' in params: + query_params.append(('remote_file_system_names', params['remote_file_system_names'])) + collection_formats['remote_file_system_names'] = 'csv' + if 'remote_ids' in params: + query_params.append(('remote_ids', params['remote_ids'])) + collection_formats['remote_ids'] = 'csv' + if 'remote_names' in params: + query_params.append(('remote_names', params['remote_names'])) + collection_formats['remote_names'] = 'csv' + if 'sort' in params: + query_params.append(('sort', params['sort'])) + collection_formats['sort'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/file-system-replica-links', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='FileSystemReplicaLinkGetResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_file_system_replica_links_policies_delete_with_http_info( + self, + x_request_id=None, # type: str + local_file_system_ids=None, # type: List[str] + local_file_system_names=None, # type: List[str] + member_ids=None, # type: List[str] + policy_ids=None, # type: List[str] + policy_names=None, # type: List[str] + remote_ids=None, # type: List[str] + remote_names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> None + """DELETE file-system-replica-links/policies + + Remove a policy from a file system replication link. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_file_system_replica_links_policies_delete_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param list[str] local_file_system_ids: A comma-separated list of local file system IDs. If after filtering, there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `local_file_system_names` query parameter. + :param list[str] local_file_system_names: A comma-separated list of local file system names. If there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with `local_file_system_ids` query parameter. + :param list[str] member_ids: A comma-separated list of member IDs. If after filtering, there is not at least one resource that matches each of the elements of `member_ids`, then an error is returned. This cannot be provided together with the `member_names` query parameter. + :param list[str] policy_ids: A comma-separated list of policy IDs. If after filtering, there is not at least one resource that matches each of the elements of `policy_ids`, then an error is returned. This cannot be provided together with the `policy_names` query parameter. + :param list[str] policy_names: A comma-separated list of policy names. + :param list[str] remote_ids: A comma-separated list of remote array IDs. If after filtering, there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `remote_names` query parameter. + :param list[str] remote_names: A comma-separated list of remote array names. If there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with `remote_ids` query parameter. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: None + If the method is called asynchronously, + returns the request thread. + """ + if local_file_system_ids is not None: + if not isinstance(local_file_system_ids, list): + local_file_system_ids = [local_file_system_ids] + if local_file_system_names is not None: + if not isinstance(local_file_system_names, list): + local_file_system_names = [local_file_system_names] + if member_ids is not None: + if not isinstance(member_ids, list): + member_ids = [member_ids] + if policy_ids is not None: + if not isinstance(policy_ids, list): + policy_ids = [policy_ids] + if policy_names is not None: + if not isinstance(policy_names, list): + policy_names = [policy_names] + if remote_ids is not None: + if not isinstance(remote_ids, list): + remote_ids = [remote_ids] + if remote_names is not None: + if not isinstance(remote_names, list): + remote_names = [remote_names] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + collection_formats = {} + path_params = {} + + query_params = [] + if 'local_file_system_ids' in params: + query_params.append(('local_file_system_ids', params['local_file_system_ids'])) + collection_formats['local_file_system_ids'] = 'csv' + if 'local_file_system_names' in params: + query_params.append(('local_file_system_names', params['local_file_system_names'])) + collection_formats['local_file_system_names'] = 'csv' + if 'member_ids' in params: + query_params.append(('member_ids', params['member_ids'])) + collection_formats['member_ids'] = 'csv' + if 'policy_ids' in params: + query_params.append(('policy_ids', params['policy_ids'])) + collection_formats['policy_ids'] = 'csv' + if 'policy_names' in params: + query_params.append(('policy_names', params['policy_names'])) + collection_formats['policy_names'] = 'csv' + if 'remote_ids' in params: + query_params.append(('remote_ids', params['remote_ids'])) + collection_formats['remote_ids'] = 'csv' + if 'remote_names' in params: + query_params.append(('remote_names', params['remote_names'])) + collection_formats['remote_names'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/file-system-replica-links/policies', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_file_system_replica_links_policies_get_with_http_info( + self, + x_request_id=None, # type: str + continuation_token=None, # type: str + filter=None, # type: str + limit=None, # type: int + local_file_system_ids=None, # type: List[str] + local_file_system_names=None, # type: List[str] + member_ids=None, # type: List[str] + offset=None, # type: int + policy_ids=None, # type: List[str] + policy_names=None, # type: List[str] + remote_ids=None, # type: List[str] + remote_file_system_ids=None, # type: List[str] + remote_file_system_names=None, # type: List[str] + remote_names=None, # type: List[str] + sort=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.PolicyMemberWithRemoteGetResponse + """GET file-system-replica-links/policies + + List file system replication link policies. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_file_system_replica_links_policies_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param str continuation_token: An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result. + :param str filter: Exclude resources that don't match the specified criteria. + :param int limit: Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the maximum number, the request is still valid. In that case the server just returns the maximum number of items, disregarding the client's page size request. + :param list[str] local_file_system_ids: A comma-separated list of local file system IDs. If after filtering, there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `local_file_system_names` query parameter. + :param list[str] local_file_system_names: A comma-separated list of local file system names. If there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with `local_file_system_ids` query parameter. + :param list[str] member_ids: A comma-separated list of member IDs. If after filtering, there is not at least one resource that matches each of the elements of `member_ids`, then an error is returned. This cannot be provided together with the `member_names` query parameter. + :param int offset: The offset of the first resource to return from a collection. + :param list[str] policy_ids: A comma-separated list of policy IDs. If after filtering, there is not at least one resource that matches each of the elements of `policy_ids`, then an error is returned. This cannot be provided together with the `policy_names` query parameter. + :param list[str] policy_names: A comma-separated list of policy names. + :param list[str] remote_ids: A comma-separated list of remote array IDs. If after filtering, there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `remote_names` query parameter. + :param list[str] remote_file_system_ids: A comma-separated list of remote file system IDs. If there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `remote_file_system_names` query parameter. + :param list[str] remote_file_system_names: A comma-separated list of remote file system names. If there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `remote_file_system_ids` query parameter. + :param list[str] remote_names: A comma-separated list of remote array names. If there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with `remote_ids` query parameter. + :param list[str] sort: Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: PolicyMemberWithRemoteGetResponse + If the method is called asynchronously, + returns the request thread. + """ + if local_file_system_ids is not None: + if not isinstance(local_file_system_ids, list): + local_file_system_ids = [local_file_system_ids] + if local_file_system_names is not None: + if not isinstance(local_file_system_names, list): + local_file_system_names = [local_file_system_names] + if member_ids is not None: + if not isinstance(member_ids, list): + member_ids = [member_ids] + if policy_ids is not None: + if not isinstance(policy_ids, list): + policy_ids = [policy_ids] + if policy_names is not None: + if not isinstance(policy_names, list): + policy_names = [policy_names] + if remote_ids is not None: + if not isinstance(remote_ids, list): + remote_ids = [remote_ids] + if remote_file_system_ids is not None: + if not isinstance(remote_file_system_ids, list): + remote_file_system_ids = [remote_file_system_ids] + if remote_file_system_names is not None: + if not isinstance(remote_file_system_names, list): + remote_file_system_names = [remote_file_system_names] + if remote_names is not None: + if not isinstance(remote_names, list): + remote_names = [remote_names] + if sort is not None: + if not isinstance(sort, list): + sort = [sort] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + if 'limit' in params and params['limit'] < 1: + raise ValueError("Invalid value for parameter `limit` when calling `api214_file_system_replica_links_policies_get`, must be a value greater than or equal to `1`") + if 'offset' in params and params['offset'] < 0: + raise ValueError("Invalid value for parameter `offset` when calling `api214_file_system_replica_links_policies_get`, must be a value greater than or equal to `0`") + collection_formats = {} + path_params = {} + + query_params = [] + if 'continuation_token' in params: + query_params.append(('continuation_token', params['continuation_token'])) + if 'filter' in params: + query_params.append(('filter', params['filter'])) + if 'limit' in params: + query_params.append(('limit', params['limit'])) + if 'local_file_system_ids' in params: + query_params.append(('local_file_system_ids', params['local_file_system_ids'])) + collection_formats['local_file_system_ids'] = 'csv' + if 'local_file_system_names' in params: + query_params.append(('local_file_system_names', params['local_file_system_names'])) + collection_formats['local_file_system_names'] = 'csv' + if 'member_ids' in params: + query_params.append(('member_ids', params['member_ids'])) + collection_formats['member_ids'] = 'csv' + if 'offset' in params: + query_params.append(('offset', params['offset'])) + if 'policy_ids' in params: + query_params.append(('policy_ids', params['policy_ids'])) + collection_formats['policy_ids'] = 'csv' + if 'policy_names' in params: + query_params.append(('policy_names', params['policy_names'])) + collection_formats['policy_names'] = 'csv' + if 'remote_ids' in params: + query_params.append(('remote_ids', params['remote_ids'])) + collection_formats['remote_ids'] = 'csv' + if 'remote_file_system_ids' in params: + query_params.append(('remote_file_system_ids', params['remote_file_system_ids'])) + collection_formats['remote_file_system_ids'] = 'csv' + if 'remote_file_system_names' in params: + query_params.append(('remote_file_system_names', params['remote_file_system_names'])) + collection_formats['remote_file_system_names'] = 'csv' + if 'remote_names' in params: + query_params.append(('remote_names', params['remote_names'])) + collection_formats['remote_names'] = 'csv' + if 'sort' in params: + query_params.append(('sort', params['sort'])) + collection_formats['sort'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/file-system-replica-links/policies', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PolicyMemberWithRemoteGetResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_file_system_replica_links_policies_post_with_http_info( + self, + x_request_id=None, # type: str + local_file_system_ids=None, # type: List[str] + local_file_system_names=None, # type: List[str] + member_ids=None, # type: List[str] + policy_ids=None, # type: List[str] + policy_names=None, # type: List[str] + remote_ids=None, # type: List[str] + remote_names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.PolicyMemberWithRemoteResponse + """POST file-system-replica-links/policies + + Add a policy to a file system replication link. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_file_system_replica_links_policies_post_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param list[str] local_file_system_ids: A comma-separated list of local file system IDs. If after filtering, there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `local_file_system_names` query parameter. + :param list[str] local_file_system_names: A comma-separated list of local file system names. If there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with `local_file_system_ids` query parameter. + :param list[str] member_ids: A comma-separated list of member IDs. If after filtering, there is not at least one resource that matches each of the elements of `member_ids`, then an error is returned. This cannot be provided together with the `member_names` query parameter. + :param list[str] policy_ids: A comma-separated list of policy IDs. If after filtering, there is not at least one resource that matches each of the elements of `policy_ids`, then an error is returned. This cannot be provided together with the `policy_names` query parameter. + :param list[str] policy_names: A comma-separated list of policy names. + :param list[str] remote_ids: A comma-separated list of remote array IDs. If after filtering, there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `remote_names` query parameter. + :param list[str] remote_names: A comma-separated list of remote array names. If there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with `remote_ids` query parameter. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: PolicyMemberWithRemoteResponse + If the method is called asynchronously, + returns the request thread. + """ + if local_file_system_ids is not None: + if not isinstance(local_file_system_ids, list): + local_file_system_ids = [local_file_system_ids] + if local_file_system_names is not None: + if not isinstance(local_file_system_names, list): + local_file_system_names = [local_file_system_names] + if member_ids is not None: + if not isinstance(member_ids, list): + member_ids = [member_ids] + if policy_ids is not None: + if not isinstance(policy_ids, list): + policy_ids = [policy_ids] + if policy_names is not None: + if not isinstance(policy_names, list): + policy_names = [policy_names] + if remote_ids is not None: + if not isinstance(remote_ids, list): + remote_ids = [remote_ids] + if remote_names is not None: + if not isinstance(remote_names, list): + remote_names = [remote_names] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + collection_formats = {} + path_params = {} + + query_params = [] + if 'local_file_system_ids' in params: + query_params.append(('local_file_system_ids', params['local_file_system_ids'])) + collection_formats['local_file_system_ids'] = 'csv' + if 'local_file_system_names' in params: + query_params.append(('local_file_system_names', params['local_file_system_names'])) + collection_formats['local_file_system_names'] = 'csv' + if 'member_ids' in params: + query_params.append(('member_ids', params['member_ids'])) + collection_formats['member_ids'] = 'csv' + if 'policy_ids' in params: + query_params.append(('policy_ids', params['policy_ids'])) + collection_formats['policy_ids'] = 'csv' + if 'policy_names' in params: + query_params.append(('policy_names', params['policy_names'])) + collection_formats['policy_names'] = 'csv' + if 'remote_ids' in params: + query_params.append(('remote_ids', params['remote_ids'])) + collection_formats['remote_ids'] = 'csv' + if 'remote_names' in params: + query_params.append(('remote_names', params['remote_names'])) + collection_formats['remote_names'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/file-system-replica-links/policies', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PolicyMemberWithRemoteResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_file_system_replica_links_post_with_http_info( + self, + file_system_replica_link=None, # type: models.FileSystemReplicaLink + x_request_id=None, # type: str + ids=None, # type: List[str] + local_file_system_ids=None, # type: List[str] + local_file_system_names=None, # type: List[str] + remote_file_system_names=None, # type: List[str] + remote_ids=None, # type: List[str] + remote_names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.FileSystemReplicaLinkResponse + """POST file-system-replica-links + + Create a file system replication link. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_file_system_replica_links_post_with_http_info(file_system_replica_link, async_req=True) + >>> result = thread.get() + + :param FileSystemReplicaLink file_system_replica_link: (required) + :param str x_request_id: Supplied by client during request or generated by server. + :param list[str] ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :param list[str] local_file_system_ids: A comma-separated list of local file system IDs. If after filtering, there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `local_file_system_names` query parameter. + :param list[str] local_file_system_names: A comma-separated list of local file system names. If there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with `local_file_system_ids` query parameter. + :param list[str] remote_file_system_names: A comma-separated list of remote file system names. If there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `remote_file_system_ids` query parameter. + :param list[str] remote_ids: A comma-separated list of remote array IDs. If after filtering, there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `remote_names` query parameter. + :param list[str] remote_names: A comma-separated list of remote array names. If there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with `remote_ids` query parameter. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: FileSystemReplicaLinkResponse + If the method is called asynchronously, + returns the request thread. + """ + if ids is not None: + if not isinstance(ids, list): + ids = [ids] + if local_file_system_ids is not None: + if not isinstance(local_file_system_ids, list): + local_file_system_ids = [local_file_system_ids] + if local_file_system_names is not None: + if not isinstance(local_file_system_names, list): + local_file_system_names = [local_file_system_names] + if remote_file_system_names is not None: + if not isinstance(remote_file_system_names, list): + remote_file_system_names = [remote_file_system_names] + if remote_ids is not None: + if not isinstance(remote_ids, list): + remote_ids = [remote_ids] + if remote_names is not None: + if not isinstance(remote_names, list): + remote_names = [remote_names] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + # verify the required parameter 'file_system_replica_link' is set + if file_system_replica_link is None: + raise TypeError("Missing the required parameter `file_system_replica_link` when calling `api214_file_system_replica_links_post`") + + collection_formats = {} + path_params = {} + + query_params = [] + if 'ids' in params: + query_params.append(('ids', params['ids'])) + collection_formats['ids'] = 'csv' + if 'local_file_system_ids' in params: + query_params.append(('local_file_system_ids', params['local_file_system_ids'])) + collection_formats['local_file_system_ids'] = 'csv' + if 'local_file_system_names' in params: + query_params.append(('local_file_system_names', params['local_file_system_names'])) + collection_formats['local_file_system_names'] = 'csv' + if 'remote_file_system_names' in params: + query_params.append(('remote_file_system_names', params['remote_file_system_names'])) + collection_formats['remote_file_system_names'] = 'csv' + if 'remote_ids' in params: + query_params.append(('remote_ids', params['remote_ids'])) + collection_formats['remote_ids'] = 'csv' + if 'remote_names' in params: + query_params.append(('remote_names', params['remote_names'])) + collection_formats['remote_names'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + if 'file_system_replica_link' in params: + body_params = params['file_system_replica_link'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/file-system-replica-links', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='FileSystemReplicaLinkResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_file_system_replica_links_transfer_get_with_http_info( + self, + x_request_id=None, # type: str + continuation_token=None, # type: str + filter=None, # type: str + ids=None, # type: List[str] + limit=None, # type: int + names_or_owner_names=None, # type: List[str] + offset=None, # type: int + remote_ids=None, # type: List[str] + remote_names=None, # type: List[str] + sort=None, # type: List[str] + total_only=None, # type: bool + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.FileSystemSnapshotGetTransferResponse + """GET file-system-replica-links/transfer + + List the transfer status details for file system replication. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_file_system_replica_links_transfer_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param str continuation_token: An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result. + :param str filter: Exclude resources that don't match the specified criteria. + :param list[str] ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :param int limit: Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the maximum number, the request is still valid. In that case the server just returns the maximum number of items, disregarding the client's page size request. + :param list[str] names_or_owner_names: A comma-separated list of resource names. Either the names of the snapshots or the owning file systems. + :param int offset: The offset of the first resource to return from a collection. + :param list[str] remote_ids: A comma-separated list of remote array IDs. If after filtering, there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `remote_names` query parameter. + :param list[str] remote_names: A comma-separated list of remote array names. If there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with `remote_ids` query parameter. + :param list[str] sort: Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response. + :param bool total_only: Only return the total record for the specified items. The total record will be the total of all items after filtering. The `items` list will be empty. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: FileSystemSnapshotGetTransferResponse + If the method is called asynchronously, + returns the request thread. + """ + if ids is not None: + if not isinstance(ids, list): + ids = [ids] + if names_or_owner_names is not None: + if not isinstance(names_or_owner_names, list): + names_or_owner_names = [names_or_owner_names] + if remote_ids is not None: + if not isinstance(remote_ids, list): + remote_ids = [remote_ids] + if remote_names is not None: + if not isinstance(remote_names, list): + remote_names = [remote_names] + if sort is not None: + if not isinstance(sort, list): + sort = [sort] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + if 'limit' in params and params['limit'] < 1: + raise ValueError("Invalid value for parameter `limit` when calling `api214_file_system_replica_links_transfer_get`, must be a value greater than or equal to `1`") + if 'offset' in params and params['offset'] < 0: + raise ValueError("Invalid value for parameter `offset` when calling `api214_file_system_replica_links_transfer_get`, must be a value greater than or equal to `0`") + collection_formats = {} + path_params = {} + + query_params = [] + if 'continuation_token' in params: + query_params.append(('continuation_token', params['continuation_token'])) + if 'filter' in params: + query_params.append(('filter', params['filter'])) + if 'ids' in params: + query_params.append(('ids', params['ids'])) + collection_formats['ids'] = 'csv' + if 'limit' in params: + query_params.append(('limit', params['limit'])) + if 'names_or_owner_names' in params: + query_params.append(('names_or_owner_names', params['names_or_owner_names'])) + collection_formats['names_or_owner_names'] = 'csv' + if 'offset' in params: + query_params.append(('offset', params['offset'])) + if 'remote_ids' in params: + query_params.append(('remote_ids', params['remote_ids'])) + collection_formats['remote_ids'] = 'csv' + if 'remote_names' in params: + query_params.append(('remote_names', params['remote_names'])) + collection_formats['remote_names'] = 'csv' + if 'sort' in params: + query_params.append(('sort', params['sort'])) + collection_formats['sort'] = 'csv' + if 'total_only' in params: + query_params.append(('total_only', params['total_only'])) + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/file-system-replica-links/transfer', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='FileSystemSnapshotGetTransferResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) diff --git a/pypureclient/flashblade/FB_2_14/api/file_system_snapshots_api.py b/pypureclient/flashblade/FB_2_14/api/file_system_snapshots_api.py new file mode 100644 index 000000000..cf44758e3 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/api/file_system_snapshots_api.py @@ -0,0 +1,967 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import re + +# python 2 and python 3 compatibility library +import six +import uuid +from typing import List, Optional + +from .. import models + +class FileSystemSnapshotsApi(object): + + def __init__(self, api_client): + self.api_client = api_client + + def api214_file_system_snapshots_delete_with_http_info( + self, + x_request_id=None, # type: str + ids=None, # type: List[str] + names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> None + """DELETE file-system-snapshots + + Delete a file system snapshot. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_file_system_snapshots_delete_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param list[str] ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :param list[str] names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: None + If the method is called asynchronously, + returns the request thread. + """ + if ids is not None: + if not isinstance(ids, list): + ids = [ids] + if names is not None: + if not isinstance(names, list): + names = [names] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + collection_formats = {} + path_params = {} + + query_params = [] + if 'ids' in params: + query_params.append(('ids', params['ids'])) + collection_formats['ids'] = 'csv' + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/file-system-snapshots', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_file_system_snapshots_get_with_http_info( + self, + x_request_id=None, # type: str + continuation_token=None, # type: str + destroyed=None, # type: bool + filter=None, # type: str + ids=None, # type: List[str] + limit=None, # type: int + names_or_owner_names=None, # type: List[str] + offset=None, # type: int + owner_ids=None, # type: List[str] + sort=None, # type: List[str] + total_only=None, # type: bool + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.FileSystemSnapshotGetResponse + """GET file-system-snapshots + + List file system snapshots. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_file_system_snapshots_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param str continuation_token: An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result. + :param bool destroyed: If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. If object name(s) are specified in the `names` parameter, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met. + :param str filter: Exclude resources that don't match the specified criteria. + :param list[str] ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :param int limit: Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the maximum number, the request is still valid. In that case the server just returns the maximum number of items, disregarding the client's page size request. + :param list[str] names_or_owner_names: A comma-separated list of resource names. Either the names of the snapshots or the owning file systems. + :param int offset: The offset of the first resource to return from a collection. + :param list[str] owner_ids: A comma-separated list of owning file system IDs. If after filtering, there is not at least one resource that matches each of the elements of owner IDs, then an error is returned. This cannot be provided together with the `ids`, `names_or_owner_names`, or `names_or_sources` query parameters. + :param list[str] sort: Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response. + :param bool total_only: Only return the total record for the specified items. The total record will be the total of all items after filtering. The `items` list will be empty. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: FileSystemSnapshotGetResponse + If the method is called asynchronously, + returns the request thread. + """ + if ids is not None: + if not isinstance(ids, list): + ids = [ids] + if names_or_owner_names is not None: + if not isinstance(names_or_owner_names, list): + names_or_owner_names = [names_or_owner_names] + if owner_ids is not None: + if not isinstance(owner_ids, list): + owner_ids = [owner_ids] + if sort is not None: + if not isinstance(sort, list): + sort = [sort] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + if 'limit' in params and params['limit'] < 1: + raise ValueError("Invalid value for parameter `limit` when calling `api214_file_system_snapshots_get`, must be a value greater than or equal to `1`") + if 'offset' in params and params['offset'] < 0: + raise ValueError("Invalid value for parameter `offset` when calling `api214_file_system_snapshots_get`, must be a value greater than or equal to `0`") + collection_formats = {} + path_params = {} + + query_params = [] + if 'continuation_token' in params: + query_params.append(('continuation_token', params['continuation_token'])) + if 'destroyed' in params: + query_params.append(('destroyed', params['destroyed'])) + if 'filter' in params: + query_params.append(('filter', params['filter'])) + if 'ids' in params: + query_params.append(('ids', params['ids'])) + collection_formats['ids'] = 'csv' + if 'limit' in params: + query_params.append(('limit', params['limit'])) + if 'names_or_owner_names' in params: + query_params.append(('names_or_owner_names', params['names_or_owner_names'])) + collection_formats['names_or_owner_names'] = 'csv' + if 'offset' in params: + query_params.append(('offset', params['offset'])) + if 'owner_ids' in params: + query_params.append(('owner_ids', params['owner_ids'])) + collection_formats['owner_ids'] = 'csv' + if 'sort' in params: + query_params.append(('sort', params['sort'])) + collection_formats['sort'] = 'csv' + if 'total_only' in params: + query_params.append(('total_only', params['total_only'])) + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/file-system-snapshots', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='FileSystemSnapshotGetResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_file_system_snapshots_patch_with_http_info( + self, + file_system_snapshot=None, # type: models.FileSystemSnapshot + x_request_id=None, # type: str + ids=None, # type: List[str] + latest_replica=None, # type: bool + names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.FileSystemSnapshotResponse + """PATCH file-system-snapshots + + Modify file system snapshot attributes. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_file_system_snapshots_patch_with_http_info(file_system_snapshot, async_req=True) + >>> result = thread.get() + + :param FileSystemSnapshot file_system_snapshot: (required) + :param str x_request_id: Supplied by client during request or generated by server. + :param list[str] ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :param bool latest_replica: Used when destroying a snapshot. If not present or `false`, and the snapshot is the latest replicated snapshot, then destroy will fail. If `true` or the snapshot is not the latest replicated snapshot, then destroy will be successful. + :param list[str] names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: FileSystemSnapshotResponse + If the method is called asynchronously, + returns the request thread. + """ + if ids is not None: + if not isinstance(ids, list): + ids = [ids] + if names is not None: + if not isinstance(names, list): + names = [names] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + # verify the required parameter 'file_system_snapshot' is set + if file_system_snapshot is None: + raise TypeError("Missing the required parameter `file_system_snapshot` when calling `api214_file_system_snapshots_patch`") + + collection_formats = {} + path_params = {} + + query_params = [] + if 'ids' in params: + query_params.append(('ids', params['ids'])) + collection_formats['ids'] = 'csv' + if 'latest_replica' in params: + query_params.append(('latest_replica', params['latest_replica'])) + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + if 'file_system_snapshot' in params: + body_params = params['file_system_snapshot'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/file-system-snapshots', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='FileSystemSnapshotResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_file_system_snapshots_policies_delete_with_http_info( + self, + x_request_id=None, # type: str + member_ids=None, # type: List[str] + member_names=None, # type: List[str] + policy_ids=None, # type: List[str] + policy_names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> None + """DELETE file-system-snapshots/policies + + Remove snapshot scheduling policies from a file system. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_file_system_snapshots_policies_delete_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param list[str] member_ids: A comma-separated list of member IDs. If after filtering, there is not at least one resource that matches each of the elements of `member_ids`, then an error is returned. This cannot be provided together with the `member_names` query parameter. + :param list[str] member_names: A comma-separated list of member names. + :param list[str] policy_ids: A comma-separated list of policy IDs. If after filtering, there is not at least one resource that matches each of the elements of `policy_ids`, then an error is returned. This cannot be provided together with the `policy_names` query parameter. + :param list[str] policy_names: A comma-separated list of policy names. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: None + If the method is called asynchronously, + returns the request thread. + """ + if member_ids is not None: + if not isinstance(member_ids, list): + member_ids = [member_ids] + if member_names is not None: + if not isinstance(member_names, list): + member_names = [member_names] + if policy_ids is not None: + if not isinstance(policy_ids, list): + policy_ids = [policy_ids] + if policy_names is not None: + if not isinstance(policy_names, list): + policy_names = [policy_names] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + collection_formats = {} + path_params = {} + + query_params = [] + if 'member_ids' in params: + query_params.append(('member_ids', params['member_ids'])) + collection_formats['member_ids'] = 'csv' + if 'member_names' in params: + query_params.append(('member_names', params['member_names'])) + collection_formats['member_names'] = 'csv' + if 'policy_ids' in params: + query_params.append(('policy_ids', params['policy_ids'])) + collection_formats['policy_ids'] = 'csv' + if 'policy_names' in params: + query_params.append(('policy_names', params['policy_names'])) + collection_formats['policy_names'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/file-system-snapshots/policies', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_file_system_snapshots_policies_get_with_http_info( + self, + x_request_id=None, # type: str + continuation_token=None, # type: str + filter=None, # type: str + limit=None, # type: int + member_ids=None, # type: List[str] + member_names=None, # type: List[str] + offset=None, # type: int + policy_ids=None, # type: List[str] + policy_names=None, # type: List[str] + sort=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.PolicyFileSystemSnapshotGetResponse + """GET file-system-snapshots/policies + + List file system snapshots mapped to snapshot scheduling policies. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_file_system_snapshots_policies_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param str continuation_token: An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result. + :param str filter: Exclude resources that don't match the specified criteria. + :param int limit: Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the maximum number, the request is still valid. In that case the server just returns the maximum number of items, disregarding the client's page size request. + :param list[str] member_ids: A comma-separated list of member IDs. If after filtering, there is not at least one resource that matches each of the elements of `member_ids`, then an error is returned. This cannot be provided together with the `member_names` query parameter. + :param list[str] member_names: A comma-separated list of member names. + :param int offset: The offset of the first resource to return from a collection. + :param list[str] policy_ids: A comma-separated list of policy IDs. If after filtering, there is not at least one resource that matches each of the elements of `policy_ids`, then an error is returned. This cannot be provided together with the `policy_names` query parameter. + :param list[str] policy_names: A comma-separated list of policy names. + :param list[str] sort: Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: PolicyFileSystemSnapshotGetResponse + If the method is called asynchronously, + returns the request thread. + """ + if member_ids is not None: + if not isinstance(member_ids, list): + member_ids = [member_ids] + if member_names is not None: + if not isinstance(member_names, list): + member_names = [member_names] + if policy_ids is not None: + if not isinstance(policy_ids, list): + policy_ids = [policy_ids] + if policy_names is not None: + if not isinstance(policy_names, list): + policy_names = [policy_names] + if sort is not None: + if not isinstance(sort, list): + sort = [sort] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + if 'limit' in params and params['limit'] < 1: + raise ValueError("Invalid value for parameter `limit` when calling `api214_file_system_snapshots_policies_get`, must be a value greater than or equal to `1`") + if 'offset' in params and params['offset'] < 0: + raise ValueError("Invalid value for parameter `offset` when calling `api214_file_system_snapshots_policies_get`, must be a value greater than or equal to `0`") + collection_formats = {} + path_params = {} + + query_params = [] + if 'continuation_token' in params: + query_params.append(('continuation_token', params['continuation_token'])) + if 'filter' in params: + query_params.append(('filter', params['filter'])) + if 'limit' in params: + query_params.append(('limit', params['limit'])) + if 'member_ids' in params: + query_params.append(('member_ids', params['member_ids'])) + collection_formats['member_ids'] = 'csv' + if 'member_names' in params: + query_params.append(('member_names', params['member_names'])) + collection_formats['member_names'] = 'csv' + if 'offset' in params: + query_params.append(('offset', params['offset'])) + if 'policy_ids' in params: + query_params.append(('policy_ids', params['policy_ids'])) + collection_formats['policy_ids'] = 'csv' + if 'policy_names' in params: + query_params.append(('policy_names', params['policy_names'])) + collection_formats['policy_names'] = 'csv' + if 'sort' in params: + query_params.append(('sort', params['sort'])) + collection_formats['sort'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/file-system-snapshots/policies', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PolicyFileSystemSnapshotGetResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_file_system_snapshots_post_with_http_info( + self, + x_request_id=None, # type: str + source_ids=None, # type: List[str] + source_names=None, # type: List[str] + send=None, # type: bool + targets=None, # type: List[str] + file_system_snapshot=None, # type: models.FileSystemSnapshotPost + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.FileSystemSnapshotResponse + """POST file-system-snapshots + + Create a snapshot for a specified source file system. If a source file system is not specified, creates snapshots for all file systems on the array. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_file_system_snapshots_post_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param list[str] source_ids: A comma-separated list of source file system IDs. If after filtering, there is not at least one resource that matches each of the elements of `source_ids`, then an error is returned. This cannot be provided together with the `names_or_sources` or `sources` query parameters. + :param list[str] source_names: A comma-separated list of names for the source of the object. If there is not at least one resource that matches each of the elements of `source_names`, an error is returned. + :param bool send: Whether to replicate created snapshots immediately to other arrays. If it's `false`, created snapshots may still be replicated to other arrays according to policy. + :param list[str] targets: The target arrays to replicate created snapshots to. Only valid when `send` is `true`. + :param FileSystemSnapshotPost file_system_snapshot: + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: FileSystemSnapshotResponse + If the method is called asynchronously, + returns the request thread. + """ + if source_ids is not None: + if not isinstance(source_ids, list): + source_ids = [source_ids] + if source_names is not None: + if not isinstance(source_names, list): + source_names = [source_names] + if targets is not None: + if not isinstance(targets, list): + targets = [targets] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + collection_formats = {} + path_params = {} + + query_params = [] + if 'source_ids' in params: + query_params.append(('source_ids', params['source_ids'])) + collection_formats['source_ids'] = 'csv' + if 'source_names' in params: + query_params.append(('source_names', params['source_names'])) + collection_formats['source_names'] = 'csv' + if 'send' in params: + query_params.append(('send', params['send'])) + if 'targets' in params: + query_params.append(('targets', params['targets'])) + collection_formats['targets'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + if 'file_system_snapshot' in params: + body_params = params['file_system_snapshot'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/file-system-snapshots', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='FileSystemSnapshotResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_file_system_snapshots_transfer_delete_with_http_info( + self, + x_request_id=None, # type: str + ids=None, # type: List[str] + names=None, # type: List[str] + remote_names=None, # type: List[str] + remote_ids=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> None + """DELETE file-system-snapshots/transfer + + Delete file system snapshot transfers from the source array to the target array. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_file_system_snapshots_transfer_delete_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param list[str] ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :param list[str] names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :param list[str] remote_names: A comma-separated list of remote array names. If there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with `remote_ids` query parameter. + :param list[str] remote_ids: A comma-separated list of remote array IDs. If after filtering, there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `remote_names` query parameter. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: None + If the method is called asynchronously, + returns the request thread. + """ + if ids is not None: + if not isinstance(ids, list): + ids = [ids] + if names is not None: + if not isinstance(names, list): + names = [names] + if remote_names is not None: + if not isinstance(remote_names, list): + remote_names = [remote_names] + if remote_ids is not None: + if not isinstance(remote_ids, list): + remote_ids = [remote_ids] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + collection_formats = {} + path_params = {} + + query_params = [] + if 'ids' in params: + query_params.append(('ids', params['ids'])) + collection_formats['ids'] = 'csv' + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + if 'remote_names' in params: + query_params.append(('remote_names', params['remote_names'])) + collection_formats['remote_names'] = 'csv' + if 'remote_ids' in params: + query_params.append(('remote_ids', params['remote_ids'])) + collection_formats['remote_ids'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/file-system-snapshots/transfer', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_file_system_snapshots_transfer_get_with_http_info( + self, + x_request_id=None, # type: str + continuation_token=None, # type: str + filter=None, # type: str + ids=None, # type: List[str] + limit=None, # type: int + names_or_owner_names=None, # type: List[str] + offset=None, # type: int + sort=None, # type: List[str] + total_only=None, # type: bool + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.FileSystemSnapshotGetTransferResponse + """GET file-system-snapshots/transfer + + List file system snapshot transfers from the source array to the target array. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_file_system_snapshots_transfer_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param str continuation_token: An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result. + :param str filter: Exclude resources that don't match the specified criteria. + :param list[str] ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :param int limit: Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the maximum number, the request is still valid. In that case the server just returns the maximum number of items, disregarding the client's page size request. + :param list[str] names_or_owner_names: A comma-separated list of resource names. Either the names of the snapshots or the owning file systems. + :param int offset: The offset of the first resource to return from a collection. + :param list[str] sort: Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response. + :param bool total_only: Only return the total record for the specified items. The total record will be the total of all items after filtering. The `items` list will be empty. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: FileSystemSnapshotGetTransferResponse + If the method is called asynchronously, + returns the request thread. + """ + if ids is not None: + if not isinstance(ids, list): + ids = [ids] + if names_or_owner_names is not None: + if not isinstance(names_or_owner_names, list): + names_or_owner_names = [names_or_owner_names] + if sort is not None: + if not isinstance(sort, list): + sort = [sort] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + if 'limit' in params and params['limit'] < 1: + raise ValueError("Invalid value for parameter `limit` when calling `api214_file_system_snapshots_transfer_get`, must be a value greater than or equal to `1`") + if 'offset' in params and params['offset'] < 0: + raise ValueError("Invalid value for parameter `offset` when calling `api214_file_system_snapshots_transfer_get`, must be a value greater than or equal to `0`") + collection_formats = {} + path_params = {} + + query_params = [] + if 'continuation_token' in params: + query_params.append(('continuation_token', params['continuation_token'])) + if 'filter' in params: + query_params.append(('filter', params['filter'])) + if 'ids' in params: + query_params.append(('ids', params['ids'])) + collection_formats['ids'] = 'csv' + if 'limit' in params: + query_params.append(('limit', params['limit'])) + if 'names_or_owner_names' in params: + query_params.append(('names_or_owner_names', params['names_or_owner_names'])) + collection_formats['names_or_owner_names'] = 'csv' + if 'offset' in params: + query_params.append(('offset', params['offset'])) + if 'sort' in params: + query_params.append(('sort', params['sort'])) + collection_formats['sort'] = 'csv' + if 'total_only' in params: + query_params.append(('total_only', params['total_only'])) + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/file-system-snapshots/transfer', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='FileSystemSnapshotGetTransferResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) diff --git a/pypureclient/flashblade/FB_2_14/api/file_systems_api.py b/pypureclient/flashblade/FB_2_14/api/file_systems_api.py new file mode 100644 index 000000000..f7a1ec68e --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/api/file_systems_api.py @@ -0,0 +1,2449 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import re + +# python 2 and python 3 compatibility library +import six +import uuid +from typing import List, Optional + +from .. import models + +class FileSystemsApi(object): + + def __init__(self, api_client): + self.api_client = api_client + + def api214_file_systems_audit_policies_delete_with_http_info( + self, + x_request_id=None, # type: str + member_ids=None, # type: List[str] + member_names=None, # type: List[str] + policy_ids=None, # type: List[str] + policy_names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> None + """DELETE file-systems/audit-policies + + Remove the audit policy mapped to a file system. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_file_systems_audit_policies_delete_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param list[str] member_ids: A comma-separated list of member IDs. If after filtering, there is not at least one resource that matches each of the elements of `member_ids`, then an error is returned. This cannot be provided together with the `member_names` query parameter. + :param list[str] member_names: A comma-separated list of member names. + :param list[str] policy_ids: A comma-separated list of policy IDs. If after filtering, there is not at least one resource that matches each of the elements of `policy_ids`, then an error is returned. This cannot be provided together with the `policy_names` query parameter. + :param list[str] policy_names: A comma-separated list of policy names. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: None + If the method is called asynchronously, + returns the request thread. + """ + if member_ids is not None: + if not isinstance(member_ids, list): + member_ids = [member_ids] + if member_names is not None: + if not isinstance(member_names, list): + member_names = [member_names] + if policy_ids is not None: + if not isinstance(policy_ids, list): + policy_ids = [policy_ids] + if policy_names is not None: + if not isinstance(policy_names, list): + policy_names = [policy_names] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + collection_formats = {} + path_params = {} + + query_params = [] + if 'member_ids' in params: + query_params.append(('member_ids', params['member_ids'])) + collection_formats['member_ids'] = 'csv' + if 'member_names' in params: + query_params.append(('member_names', params['member_names'])) + collection_formats['member_names'] = 'csv' + if 'policy_ids' in params: + query_params.append(('policy_ids', params['policy_ids'])) + collection_formats['policy_ids'] = 'csv' + if 'policy_names' in params: + query_params.append(('policy_names', params['policy_names'])) + collection_formats['policy_names'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/file-systems/audit-policies', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_file_systems_audit_policies_get_with_http_info( + self, + x_request_id=None, # type: str + continuation_token=None, # type: str + filter=None, # type: str + limit=None, # type: int + member_ids=None, # type: List[str] + member_names=None, # type: List[str] + offset=None, # type: int + policy_ids=None, # type: List[str] + policy_names=None, # type: List[str] + sort=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.AuditFileSystemsPoliciesMembersGetResponse + """GET file-systems/audit-policies + + List file systems mapped to a audit policy. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_file_systems_audit_policies_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param str continuation_token: An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result. + :param str filter: Exclude resources that don't match the specified criteria. + :param int limit: Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the maximum number, the request is still valid. In that case the server just returns the maximum number of items, disregarding the client's page size request. + :param list[str] member_ids: A comma-separated list of member IDs. If after filtering, there is not at least one resource that matches each of the elements of `member_ids`, then an error is returned. This cannot be provided together with the `member_names` query parameter. + :param list[str] member_names: A comma-separated list of member names. + :param int offset: The offset of the first resource to return from a collection. + :param list[str] policy_ids: A comma-separated list of policy IDs. If after filtering, there is not at least one resource that matches each of the elements of `policy_ids`, then an error is returned. This cannot be provided together with the `policy_names` query parameter. + :param list[str] policy_names: A comma-separated list of policy names. + :param list[str] sort: Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: AuditFileSystemsPoliciesMembersGetResponse + If the method is called asynchronously, + returns the request thread. + """ + if member_ids is not None: + if not isinstance(member_ids, list): + member_ids = [member_ids] + if member_names is not None: + if not isinstance(member_names, list): + member_names = [member_names] + if policy_ids is not None: + if not isinstance(policy_ids, list): + policy_ids = [policy_ids] + if policy_names is not None: + if not isinstance(policy_names, list): + policy_names = [policy_names] + if sort is not None: + if not isinstance(sort, list): + sort = [sort] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + if 'limit' in params and params['limit'] < 1: + raise ValueError("Invalid value for parameter `limit` when calling `api214_file_systems_audit_policies_get`, must be a value greater than or equal to `1`") + if 'offset' in params and params['offset'] < 0: + raise ValueError("Invalid value for parameter `offset` when calling `api214_file_systems_audit_policies_get`, must be a value greater than or equal to `0`") + collection_formats = {} + path_params = {} + + query_params = [] + if 'continuation_token' in params: + query_params.append(('continuation_token', params['continuation_token'])) + if 'filter' in params: + query_params.append(('filter', params['filter'])) + if 'limit' in params: + query_params.append(('limit', params['limit'])) + if 'member_ids' in params: + query_params.append(('member_ids', params['member_ids'])) + collection_formats['member_ids'] = 'csv' + if 'member_names' in params: + query_params.append(('member_names', params['member_names'])) + collection_formats['member_names'] = 'csv' + if 'offset' in params: + query_params.append(('offset', params['offset'])) + if 'policy_ids' in params: + query_params.append(('policy_ids', params['policy_ids'])) + collection_formats['policy_ids'] = 'csv' + if 'policy_names' in params: + query_params.append(('policy_names', params['policy_names'])) + collection_formats['policy_names'] = 'csv' + if 'sort' in params: + query_params.append(('sort', params['sort'])) + collection_formats['sort'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/file-systems/audit-policies', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='AuditFileSystemsPoliciesMembersGetResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_file_systems_audit_policies_post_with_http_info( + self, + x_request_id=None, # type: str + member_ids=None, # type: List[str] + member_names=None, # type: List[str] + policy_ids=None, # type: List[str] + policy_names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.AuditFileSystemsPoliciesMembersResponse + """POST file-systems/audit-policies + + Map a audit policy to a file system. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_file_systems_audit_policies_post_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param list[str] member_ids: A comma-separated list of member IDs. If after filtering, there is not at least one resource that matches each of the elements of `member_ids`, then an error is returned. This cannot be provided together with the `member_names` query parameter. + :param list[str] member_names: A comma-separated list of member names. + :param list[str] policy_ids: A comma-separated list of policy IDs. If after filtering, there is not at least one resource that matches each of the elements of `policy_ids`, then an error is returned. This cannot be provided together with the `policy_names` query parameter. + :param list[str] policy_names: A comma-separated list of policy names. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: AuditFileSystemsPoliciesMembersResponse + If the method is called asynchronously, + returns the request thread. + """ + if member_ids is not None: + if not isinstance(member_ids, list): + member_ids = [member_ids] + if member_names is not None: + if not isinstance(member_names, list): + member_names = [member_names] + if policy_ids is not None: + if not isinstance(policy_ids, list): + policy_ids = [policy_ids] + if policy_names is not None: + if not isinstance(policy_names, list): + policy_names = [policy_names] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + collection_formats = {} + path_params = {} + + query_params = [] + if 'member_ids' in params: + query_params.append(('member_ids', params['member_ids'])) + collection_formats['member_ids'] = 'csv' + if 'member_names' in params: + query_params.append(('member_names', params['member_names'])) + collection_formats['member_names'] = 'csv' + if 'policy_ids' in params: + query_params.append(('policy_ids', params['policy_ids'])) + collection_formats['policy_ids'] = 'csv' + if 'policy_names' in params: + query_params.append(('policy_names', params['policy_names'])) + collection_formats['policy_names'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/file-systems/audit-policies', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='AuditFileSystemsPoliciesMembersResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_file_systems_delete_with_http_info( + self, + x_request_id=None, # type: str + ids=None, # type: List[str] + names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> None + """DELETE file-systems + + Deletes a file system. Deleting a file system is equivalent to eradication. A file system's `destroyed` parameter must be set to `true` before a file system can be deleted. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_file_systems_delete_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param list[str] ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :param list[str] names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: None + If the method is called asynchronously, + returns the request thread. + """ + if ids is not None: + if not isinstance(ids, list): + ids = [ids] + if names is not None: + if not isinstance(names, list): + names = [names] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + collection_formats = {} + path_params = {} + + query_params = [] + if 'ids' in params: + query_params.append(('ids', params['ids'])) + collection_formats['ids'] = 'csv' + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/file-systems', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_file_systems_get_with_http_info( + self, + x_request_id=None, # type: str + continuation_token=None, # type: str + destroyed=None, # type: bool + filter=None, # type: str + ids=None, # type: List[str] + limit=None, # type: int + names=None, # type: List[str] + offset=None, # type: int + sort=None, # type: List[str] + total_only=None, # type: bool + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.FileSystemGetResponse + """GET file-systems + + List one or more file systems on the array. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_file_systems_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param str continuation_token: An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result. + :param bool destroyed: If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. If object name(s) are specified in the `names` parameter, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met. + :param str filter: Exclude resources that don't match the specified criteria. + :param list[str] ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :param int limit: Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the maximum number, the request is still valid. In that case the server just returns the maximum number of items, disregarding the client's page size request. + :param list[str] names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :param int offset: The offset of the first resource to return from a collection. + :param list[str] sort: Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response. + :param bool total_only: Only return the total record for the specified items. The total record will be the total of all items after filtering. The `items` list will be empty. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: FileSystemGetResponse + If the method is called asynchronously, + returns the request thread. + """ + if ids is not None: + if not isinstance(ids, list): + ids = [ids] + if names is not None: + if not isinstance(names, list): + names = [names] + if sort is not None: + if not isinstance(sort, list): + sort = [sort] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + if 'limit' in params and params['limit'] < 1: + raise ValueError("Invalid value for parameter `limit` when calling `api214_file_systems_get`, must be a value greater than or equal to `1`") + if 'offset' in params and params['offset'] < 0: + raise ValueError("Invalid value for parameter `offset` when calling `api214_file_systems_get`, must be a value greater than or equal to `0`") + collection_formats = {} + path_params = {} + + query_params = [] + if 'continuation_token' in params: + query_params.append(('continuation_token', params['continuation_token'])) + if 'destroyed' in params: + query_params.append(('destroyed', params['destroyed'])) + if 'filter' in params: + query_params.append(('filter', params['filter'])) + if 'ids' in params: + query_params.append(('ids', params['ids'])) + collection_formats['ids'] = 'csv' + if 'limit' in params: + query_params.append(('limit', params['limit'])) + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + if 'offset' in params: + query_params.append(('offset', params['offset'])) + if 'sort' in params: + query_params.append(('sort', params['sort'])) + collection_formats['sort'] = 'csv' + if 'total_only' in params: + query_params.append(('total_only', params['total_only'])) + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/file-systems', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='FileSystemGetResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_file_systems_groups_performance_get_with_http_info( + self, + x_request_id=None, # type: str + file_system_ids=None, # type: List[str] + file_system_names=None, # type: List[str] + filter=None, # type: str + gids=None, # type: List[str] + group_names=None, # type: List[str] + limit=None, # type: int + names=None, # type: List[str] + sort=None, # type: List[str] + total_only=None, # type: bool + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.FileSystemGroupsPerformanceGetResponse + """GET file-systems/groups/performance + + List a group’s I/O performance metrics on a file system. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_file_systems_groups_performance_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param list[str] file_system_ids: A comma-separated list of file system IDs. If after filtering, there is not at least one resource that matches each of the elements of `file_system_ids`, then an error is returned. This cannot be provided together with the `file_system_names` query parameter. + :param list[str] file_system_names: A comma-separated list of file system names. If there is not at least one resource that matches each of the elements of `file_system_names`, then an error is returned. + :param str filter: Exclude resources that don't match the specified criteria. + :param list[str] gids: A comma-separated list of group IDs. This cannot be provided together with `group_names` query parameter. + :param list[str] group_names: A comma-separated list of group names. This cannot be provided together with `gids` query parameter. + :param int limit: Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the maximum number, the request is still valid. In that case the server just returns the maximum number of items, disregarding the client's page size request. + :param list[str] names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :param list[str] sort: Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response. + :param bool total_only: Only return the total record for the specified items. The total record will be the total of all items after filtering. The `items` list will be empty. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: FileSystemGroupsPerformanceGetResponse + If the method is called asynchronously, + returns the request thread. + """ + if file_system_ids is not None: + if not isinstance(file_system_ids, list): + file_system_ids = [file_system_ids] + if file_system_names is not None: + if not isinstance(file_system_names, list): + file_system_names = [file_system_names] + if gids is not None: + if not isinstance(gids, list): + gids = [gids] + if group_names is not None: + if not isinstance(group_names, list): + group_names = [group_names] + if names is not None: + if not isinstance(names, list): + names = [names] + if sort is not None: + if not isinstance(sort, list): + sort = [sort] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + if 'limit' in params and params['limit'] < 1: + raise ValueError("Invalid value for parameter `limit` when calling `api214_file_systems_groups_performance_get`, must be a value greater than or equal to `1`") + collection_formats = {} + path_params = {} + + query_params = [] + if 'file_system_ids' in params: + query_params.append(('file_system_ids', params['file_system_ids'])) + collection_formats['file_system_ids'] = 'csv' + if 'file_system_names' in params: + query_params.append(('file_system_names', params['file_system_names'])) + collection_formats['file_system_names'] = 'csv' + if 'filter' in params: + query_params.append(('filter', params['filter'])) + if 'gids' in params: + query_params.append(('gids', params['gids'])) + collection_formats['gids'] = 'csv' + if 'group_names' in params: + query_params.append(('group_names', params['group_names'])) + collection_formats['group_names'] = 'csv' + if 'limit' in params: + query_params.append(('limit', params['limit'])) + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + if 'sort' in params: + query_params.append(('sort', params['sort'])) + collection_formats['sort'] = 'csv' + if 'total_only' in params: + query_params.append(('total_only', params['total_only'])) + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/file-systems/groups/performance', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='FileSystemGroupsPerformanceGetResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_file_systems_locks_clients_get_with_http_info( + self, + x_request_id=None, # type: str + continuation_token=None, # type: str + filter=None, # type: str + limit=None, # type: int + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.FileSystemClientsGetResponse + """Get a list of clients that hold active file locks + + Lists all clients that hold active file locks. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_file_systems_locks_clients_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param str continuation_token: An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result. + :param str filter: Exclude resources that don't match the specified criteria. + :param int limit: Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the maximum number, the request is still valid. In that case the server just returns the maximum number of items, disregarding the client's page size request. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: FileSystemClientsGetResponse + If the method is called asynchronously, + returns the request thread. + """ + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + if 'limit' in params and params['limit'] < 1: + raise ValueError("Invalid value for parameter `limit` when calling `api214_file_systems_locks_clients_get`, must be a value greater than or equal to `1`") + collection_formats = {} + path_params = {} + + query_params = [] + if 'continuation_token' in params: + query_params.append(('continuation_token', params['continuation_token'])) + if 'filter' in params: + query_params.append(('filter', params['filter'])) + if 'limit' in params: + query_params.append(('limit', params['limit'])) + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/file-systems/locks/clients', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='FileSystemClientsGetResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_file_systems_locks_delete_with_http_info( + self, + x_request_id=None, # type: str + client_names=None, # type: List[str] + file_system_ids=None, # type: List[str] + file_system_names=None, # type: List[str] + inodes=None, # type: List[float] + names=None, # type: List[str] + paths=None, # type: List[str] + recursive=None, # type: bool + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> None + """Invalidate file locks + + Invalidates file locks. It can be used to either delete an individual lock by name or multiple locks filtered by parameters. E.g. to delete locks held by a client on specific file, parameters `client_names`, `file_system_ids` or `file_system_names` and `path` must be specified. When `names` is specified, no other query parameter can be specified. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_file_systems_locks_delete_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param list[str] client_names: A comma-separated list of ip addresses of clients. For IPv6 both the extended format (x:x:x:x:x:x:x:x) and the shortened format are supported. + :param list[str] file_system_ids: A comma-separated list of file system IDs. If after filtering, there is not at least one resource that matches each of the elements of `file_system_ids`, then an error is returned. This cannot be provided together with the `file_system_names` query parameter. + :param list[str] file_system_names: A comma-separated list of file system names. If there is not at least one resource that matches each of the elements of `file_system_names`, then an error is returned. + :param list[float] inodes: A comma-separated list of inodes used for filtering file locks query by inodes. This may only be specified if `file_system_ids` or `file_system_names` is also specified. This cannot be provided together with the `paths` query parameter. + :param list[str] names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :param list[str] paths: A comma-separated list of paths used for filtering file locks query by paths. This may only be specified if `file_system_ids` or `file_system_names` is also specified. This cannot be provided together with the `inodes` query parameter. + :param bool recursive: Flag used to indicate that the action should be done recursively. If set to `true` and used e.g. with `path` pointing to a directory, the operation will delete all locks in given directory and subdirectories recursively. For more fine grained control over deleted locks, use delete by name. If not specified, defaults to `false`. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: None + If the method is called asynchronously, + returns the request thread. + """ + if client_names is not None: + if not isinstance(client_names, list): + client_names = [client_names] + if file_system_ids is not None: + if not isinstance(file_system_ids, list): + file_system_ids = [file_system_ids] + if file_system_names is not None: + if not isinstance(file_system_names, list): + file_system_names = [file_system_names] + if inodes is not None: + if not isinstance(inodes, list): + inodes = [inodes] + if names is not None: + if not isinstance(names, list): + names = [names] + if paths is not None: + if not isinstance(paths, list): + paths = [paths] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + collection_formats = {} + path_params = {} + + query_params = [] + if 'client_names' in params: + query_params.append(('client_names', params['client_names'])) + collection_formats['client_names'] = 'csv' + if 'file_system_ids' in params: + query_params.append(('file_system_ids', params['file_system_ids'])) + collection_formats['file_system_ids'] = 'csv' + if 'file_system_names' in params: + query_params.append(('file_system_names', params['file_system_names'])) + collection_formats['file_system_names'] = 'csv' + if 'inodes' in params: + query_params.append(('inodes', params['inodes'])) + collection_formats['inodes'] = 'csv' + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + if 'paths' in params: + query_params.append(('paths', params['paths'])) + collection_formats['paths'] = 'csv' + if 'recursive' in params: + query_params.append(('recursive', params['recursive'])) + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/file-systems/locks', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_file_systems_locks_get_with_http_info( + self, + x_request_id=None, # type: str + continuation_token=None, # type: str + client_names=None, # type: List[str] + file_system_ids=None, # type: List[str] + file_system_names=None, # type: List[str] + filter=None, # type: str + inodes=None, # type: List[float] + limit=None, # type: int + names=None, # type: List[str] + paths=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.FileLockGetResponse + """Get a list of active file locks + + Lists all active file locks that satisfy the conditions specified by the parameters. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_file_systems_locks_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param str continuation_token: An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result. + :param list[str] client_names: A comma-separated list of ip addresses of clients. For IPv6 both the extended format (x:x:x:x:x:x:x:x) and the shortened format are supported. + :param list[str] file_system_ids: A comma-separated list of file system IDs. If after filtering, there is not at least one resource that matches each of the elements of `file_system_ids`, then an error is returned. This cannot be provided together with the `file_system_names` query parameter. + :param list[str] file_system_names: A comma-separated list of file system names. If there is not at least one resource that matches each of the elements of `file_system_names`, then an error is returned. + :param str filter: Exclude resources that don't match the specified criteria. + :param list[float] inodes: A comma-separated list of inodes used for filtering file locks query by inodes. This may only be specified if `file_system_ids` or `file_system_names` is also specified. This cannot be provided together with the `paths` query parameter. + :param int limit: Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the maximum number, the request is still valid. In that case the server just returns the maximum number of items, disregarding the client's page size request. + :param list[str] names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :param list[str] paths: A comma-separated list of paths used for filtering file locks query by paths. This may only be specified if `file_system_ids` or `file_system_names` is also specified. This cannot be provided together with the `inodes` query parameter. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: FileLockGetResponse + If the method is called asynchronously, + returns the request thread. + """ + if client_names is not None: + if not isinstance(client_names, list): + client_names = [client_names] + if file_system_ids is not None: + if not isinstance(file_system_ids, list): + file_system_ids = [file_system_ids] + if file_system_names is not None: + if not isinstance(file_system_names, list): + file_system_names = [file_system_names] + if inodes is not None: + if not isinstance(inodes, list): + inodes = [inodes] + if names is not None: + if not isinstance(names, list): + names = [names] + if paths is not None: + if not isinstance(paths, list): + paths = [paths] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + if 'limit' in params and params['limit'] < 1: + raise ValueError("Invalid value for parameter `limit` when calling `api214_file_systems_locks_get`, must be a value greater than or equal to `1`") + collection_formats = {} + path_params = {} + + query_params = [] + if 'continuation_token' in params: + query_params.append(('continuation_token', params['continuation_token'])) + if 'client_names' in params: + query_params.append(('client_names', params['client_names'])) + collection_formats['client_names'] = 'csv' + if 'file_system_ids' in params: + query_params.append(('file_system_ids', params['file_system_ids'])) + collection_formats['file_system_ids'] = 'csv' + if 'file_system_names' in params: + query_params.append(('file_system_names', params['file_system_names'])) + collection_formats['file_system_names'] = 'csv' + if 'filter' in params: + query_params.append(('filter', params['filter'])) + if 'inodes' in params: + query_params.append(('inodes', params['inodes'])) + collection_formats['inodes'] = 'csv' + if 'limit' in params: + query_params.append(('limit', params['limit'])) + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + if 'paths' in params: + query_params.append(('paths', params['paths'])) + collection_formats['paths'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/file-systems/locks', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='FileLockGetResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_file_systems_locks_nlm_reclamations_post_with_http_info( + self, + x_request_id=None, # type: str + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.FileLockNlmReclamationResponse + """Initiate NLM reclamation. + + NLM reclamation is a system-wide operation, affecting all clients, and so only one may be in progress at a time. Attempting to initiate reclamation while one is in progress will result in an error. When NLM reclamation is initiated, all NLM locks are deleted and client applications are notified that they can reacquire their locks within a grace period. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_file_systems_locks_nlm_reclamations_post_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: FileLockNlmReclamationResponse + If the method is called asynchronously, + returns the request thread. + """ + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + collection_formats = {} + path_params = {} + + query_params = [] + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/file-systems/locks/nlm-reclamations', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='FileLockNlmReclamationResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_file_systems_patch_with_http_info( + self, + file_system=None, # type: models.FileSystemPatch + x_request_id=None, # type: str + delete_link_on_eradication=None, # type: bool + discard_detailed_permissions=None, # type: bool + discard_non_snapshotted_data=None, # type: bool + ids=None, # type: List[str] + ignore_usage=None, # type: bool + names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.FileSystemResponse + """PATCH file-systems + + Modify a file system’s attributes including its export protocols and limits. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_file_systems_patch_with_http_info(file_system, async_req=True) + >>> result = thread.get() + + :param FileSystemPatch file_system: (required) + :param str x_request_id: Supplied by client during request or generated by server. + :param bool delete_link_on_eradication: If set to `true`, the file system can be destroyed, even if it has a replica link. If set to `false`, the file system cannot be destroyed if it has a replica link. Defaults to `false`. + :param bool discard_detailed_permissions: This parameter must be set to `true` in order to change a file system's `access_control_style` from a style that supports more detailed access control lists to a style that only supports less detailed mode bits as a form of permission control. This parameter may not be set to `true` any other time. Setting this parameter to `true` is acknowledgement that any more detailed access control lists currently set within the file system will be lost, and NFS permission controls will only be enforced at the granularity level of NFS mode bits. + :param bool discard_non_snapshotted_data: This parameter must be set to `true` in order to restore a file system from a snapshot or to demote a file system (which restores the file system from the common baseline snapshot). Setting this parameter to `true` is acknowledgement that any non-snapshotted data currently in the file system will be irretrievably lost. + :param list[str] ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :param bool ignore_usage: Allow update operations that lead to a `hard_limit_enabled` object store account, bucket, or file system with usage over its limiting value. For object store accounts and buckets, the limiting value is that of `quota_limit`, and for file systems it is that of `provisioned`. The operation can be either setting `hard_limit_enabled` when usage is higher than the limiting value, modifying the limiting value to a value under usage when `hard_limit_enabled` or recovering a destroyed bucket of an object store account that cause account's space usage to go over its hard `quota_limit`. + :param list[str] names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: FileSystemResponse + If the method is called asynchronously, + returns the request thread. + """ + if ids is not None: + if not isinstance(ids, list): + ids = [ids] + if names is not None: + if not isinstance(names, list): + names = [names] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + # verify the required parameter 'file_system' is set + if file_system is None: + raise TypeError("Missing the required parameter `file_system` when calling `api214_file_systems_patch`") + + collection_formats = {} + path_params = {} + + query_params = [] + if 'delete_link_on_eradication' in params: + query_params.append(('delete_link_on_eradication', params['delete_link_on_eradication'])) + if 'discard_detailed_permissions' in params: + query_params.append(('discard_detailed_permissions', params['discard_detailed_permissions'])) + if 'discard_non_snapshotted_data' in params: + query_params.append(('discard_non_snapshotted_data', params['discard_non_snapshotted_data'])) + if 'ids' in params: + query_params.append(('ids', params['ids'])) + collection_formats['ids'] = 'csv' + if 'ignore_usage' in params: + query_params.append(('ignore_usage', params['ignore_usage'])) + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + if 'file_system' in params: + body_params = params['file_system'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/file-systems', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='FileSystemResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_file_systems_performance_get_with_http_info( + self, + x_request_id=None, # type: str + continuation_token=None, # type: str + end_time=None, # type: int + filter=None, # type: str + ids=None, # type: List[str] + limit=None, # type: int + names=None, # type: List[str] + offset=None, # type: int + protocol=None, # type: str + resolution=None, # type: int + sort=None, # type: List[str] + start_time=None, # type: int + total_only=None, # type: bool + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.FileSystemPerformanceGetResponse + """GET file-systems/performance + + Displays the performance metrics for a file system. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_file_systems_performance_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param str continuation_token: An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result. + :param int end_time: When the time window ends (in milliseconds since epoch). + :param str filter: Exclude resources that don't match the specified criteria. + :param list[str] ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :param int limit: Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the maximum number, the request is still valid. In that case the server just returns the maximum number of items, disregarding the client's page size request. + :param list[str] names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :param int offset: The offset of the first resource to return from a collection. + :param str protocol: Display the performance of a specified protocol. Valid values are `all`, `HTTP`, `SMB`, `NFS`, and `S3`. If not specified, defaults to `all`, which will provide the combined performance of all available protocols. + :param int resolution: The desired ms between samples. Available resolutions may depend on data type, `start_time` and `end_time`. In general `1000`, `30000`, `300000`, `1800000`, `7200000`, and `86400000` are possible values. + :param list[str] sort: Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response. + :param int start_time: When the time window starts (in milliseconds since epoch). + :param bool total_only: Only return the total record for the specified items. The total record will be the total of all items after filtering. The `items` list will be empty. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: FileSystemPerformanceGetResponse + If the method is called asynchronously, + returns the request thread. + """ + if ids is not None: + if not isinstance(ids, list): + ids = [ids] + if names is not None: + if not isinstance(names, list): + names = [names] + if sort is not None: + if not isinstance(sort, list): + sort = [sort] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + if 'end_time' in params and params['end_time'] < 0: + raise ValueError("Invalid value for parameter `end_time` when calling `api214_file_systems_performance_get`, must be a value greater than or equal to `0`") + if 'limit' in params and params['limit'] < 1: + raise ValueError("Invalid value for parameter `limit` when calling `api214_file_systems_performance_get`, must be a value greater than or equal to `1`") + if 'offset' in params and params['offset'] < 0: + raise ValueError("Invalid value for parameter `offset` when calling `api214_file_systems_performance_get`, must be a value greater than or equal to `0`") + if 'resolution' in params and params['resolution'] < 0: + raise ValueError("Invalid value for parameter `resolution` when calling `api214_file_systems_performance_get`, must be a value greater than or equal to `0`") + if 'start_time' in params and params['start_time'] < 0: + raise ValueError("Invalid value for parameter `start_time` when calling `api214_file_systems_performance_get`, must be a value greater than or equal to `0`") + collection_formats = {} + path_params = {} + + query_params = [] + if 'continuation_token' in params: + query_params.append(('continuation_token', params['continuation_token'])) + if 'end_time' in params: + query_params.append(('end_time', params['end_time'])) + if 'filter' in params: + query_params.append(('filter', params['filter'])) + if 'ids' in params: + query_params.append(('ids', params['ids'])) + collection_formats['ids'] = 'csv' + if 'limit' in params: + query_params.append(('limit', params['limit'])) + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + if 'offset' in params: + query_params.append(('offset', params['offset'])) + if 'protocol' in params: + query_params.append(('protocol', params['protocol'])) + if 'resolution' in params: + query_params.append(('resolution', params['resolution'])) + if 'sort' in params: + query_params.append(('sort', params['sort'])) + collection_formats['sort'] = 'csv' + if 'start_time' in params: + query_params.append(('start_time', params['start_time'])) + if 'total_only' in params: + query_params.append(('total_only', params['total_only'])) + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/file-systems/performance', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='FileSystemPerformanceGetResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_file_systems_policies_all_get_with_http_info( + self, + x_request_id=None, # type: str + continuation_token=None, # type: str + filter=None, # type: str + limit=None, # type: int + member_ids=None, # type: List[str] + member_names=None, # type: List[str] + offset=None, # type: int + policy_ids=None, # type: List[str] + policy_names=None, # type: List[str] + sort=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.PolicyMemberGetResponse + """GET file-systems/policies-all + + List file system policies. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_file_systems_policies_all_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param str continuation_token: An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result. + :param str filter: Exclude resources that don't match the specified criteria. + :param int limit: Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the maximum number, the request is still valid. In that case the server just returns the maximum number of items, disregarding the client's page size request. + :param list[str] member_ids: A comma-separated list of member IDs. If after filtering, there is not at least one resource that matches each of the elements of `member_ids`, then an error is returned. This cannot be provided together with the `member_names` query parameter. + :param list[str] member_names: A comma-separated list of member names. + :param int offset: The offset of the first resource to return from a collection. + :param list[str] policy_ids: A comma-separated list of policy IDs. If after filtering, there is not at least one resource that matches each of the elements of `policy_ids`, then an error is returned. This cannot be provided together with the `policy_names` query parameter. + :param list[str] policy_names: A comma-separated list of policy names. + :param list[str] sort: Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: PolicyMemberGetResponse + If the method is called asynchronously, + returns the request thread. + """ + if member_ids is not None: + if not isinstance(member_ids, list): + member_ids = [member_ids] + if member_names is not None: + if not isinstance(member_names, list): + member_names = [member_names] + if policy_ids is not None: + if not isinstance(policy_ids, list): + policy_ids = [policy_ids] + if policy_names is not None: + if not isinstance(policy_names, list): + policy_names = [policy_names] + if sort is not None: + if not isinstance(sort, list): + sort = [sort] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + if 'limit' in params and params['limit'] < 1: + raise ValueError("Invalid value for parameter `limit` when calling `api214_file_systems_policies_all_get`, must be a value greater than or equal to `1`") + if 'offset' in params and params['offset'] < 0: + raise ValueError("Invalid value for parameter `offset` when calling `api214_file_systems_policies_all_get`, must be a value greater than or equal to `0`") + collection_formats = {} + path_params = {} + + query_params = [] + if 'continuation_token' in params: + query_params.append(('continuation_token', params['continuation_token'])) + if 'filter' in params: + query_params.append(('filter', params['filter'])) + if 'limit' in params: + query_params.append(('limit', params['limit'])) + if 'member_ids' in params: + query_params.append(('member_ids', params['member_ids'])) + collection_formats['member_ids'] = 'csv' + if 'member_names' in params: + query_params.append(('member_names', params['member_names'])) + collection_formats['member_names'] = 'csv' + if 'offset' in params: + query_params.append(('offset', params['offset'])) + if 'policy_ids' in params: + query_params.append(('policy_ids', params['policy_ids'])) + collection_formats['policy_ids'] = 'csv' + if 'policy_names' in params: + query_params.append(('policy_names', params['policy_names'])) + collection_formats['policy_names'] = 'csv' + if 'sort' in params: + query_params.append(('sort', params['sort'])) + collection_formats['sort'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/file-systems/policies-all', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PolicyMemberGetResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_file_systems_policies_delete_with_http_info( + self, + x_request_id=None, # type: str + member_ids=None, # type: List[str] + member_names=None, # type: List[str] + policy_ids=None, # type: List[str] + policy_names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> None + """DELETE file-systems/policies + + Remove a snapshot scheduling policy from a file system. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_file_systems_policies_delete_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param list[str] member_ids: A comma-separated list of member IDs. If after filtering, there is not at least one resource that matches each of the elements of `member_ids`, then an error is returned. This cannot be provided together with the `member_names` query parameter. + :param list[str] member_names: A comma-separated list of member names. + :param list[str] policy_ids: A comma-separated list of policy IDs. If after filtering, there is not at least one resource that matches each of the elements of `policy_ids`, then an error is returned. This cannot be provided together with the `policy_names` query parameter. + :param list[str] policy_names: A comma-separated list of policy names. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: None + If the method is called asynchronously, + returns the request thread. + """ + if member_ids is not None: + if not isinstance(member_ids, list): + member_ids = [member_ids] + if member_names is not None: + if not isinstance(member_names, list): + member_names = [member_names] + if policy_ids is not None: + if not isinstance(policy_ids, list): + policy_ids = [policy_ids] + if policy_names is not None: + if not isinstance(policy_names, list): + policy_names = [policy_names] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + collection_formats = {} + path_params = {} + + query_params = [] + if 'member_ids' in params: + query_params.append(('member_ids', params['member_ids'])) + collection_formats['member_ids'] = 'csv' + if 'member_names' in params: + query_params.append(('member_names', params['member_names'])) + collection_formats['member_names'] = 'csv' + if 'policy_ids' in params: + query_params.append(('policy_ids', params['policy_ids'])) + collection_formats['policy_ids'] = 'csv' + if 'policy_names' in params: + query_params.append(('policy_names', params['policy_names'])) + collection_formats['policy_names'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/file-systems/policies', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_file_systems_policies_get_with_http_info( + self, + x_request_id=None, # type: str + continuation_token=None, # type: str + filter=None, # type: str + limit=None, # type: int + member_ids=None, # type: List[str] + member_names=None, # type: List[str] + offset=None, # type: int + policy_ids=None, # type: List[str] + policy_names=None, # type: List[str] + sort=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.PolicyMemberGetResponse + """GET file-systems/policies + + List file system snapshot scheduling policies. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_file_systems_policies_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param str continuation_token: An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result. + :param str filter: Exclude resources that don't match the specified criteria. + :param int limit: Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the maximum number, the request is still valid. In that case the server just returns the maximum number of items, disregarding the client's page size request. + :param list[str] member_ids: A comma-separated list of member IDs. If after filtering, there is not at least one resource that matches each of the elements of `member_ids`, then an error is returned. This cannot be provided together with the `member_names` query parameter. + :param list[str] member_names: A comma-separated list of member names. + :param int offset: The offset of the first resource to return from a collection. + :param list[str] policy_ids: A comma-separated list of policy IDs. If after filtering, there is not at least one resource that matches each of the elements of `policy_ids`, then an error is returned. This cannot be provided together with the `policy_names` query parameter. + :param list[str] policy_names: A comma-separated list of policy names. + :param list[str] sort: Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: PolicyMemberGetResponse + If the method is called asynchronously, + returns the request thread. + """ + if member_ids is not None: + if not isinstance(member_ids, list): + member_ids = [member_ids] + if member_names is not None: + if not isinstance(member_names, list): + member_names = [member_names] + if policy_ids is not None: + if not isinstance(policy_ids, list): + policy_ids = [policy_ids] + if policy_names is not None: + if not isinstance(policy_names, list): + policy_names = [policy_names] + if sort is not None: + if not isinstance(sort, list): + sort = [sort] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + if 'limit' in params and params['limit'] < 1: + raise ValueError("Invalid value for parameter `limit` when calling `api214_file_systems_policies_get`, must be a value greater than or equal to `1`") + if 'offset' in params and params['offset'] < 0: + raise ValueError("Invalid value for parameter `offset` when calling `api214_file_systems_policies_get`, must be a value greater than or equal to `0`") + collection_formats = {} + path_params = {} + + query_params = [] + if 'continuation_token' in params: + query_params.append(('continuation_token', params['continuation_token'])) + if 'filter' in params: + query_params.append(('filter', params['filter'])) + if 'limit' in params: + query_params.append(('limit', params['limit'])) + if 'member_ids' in params: + query_params.append(('member_ids', params['member_ids'])) + collection_formats['member_ids'] = 'csv' + if 'member_names' in params: + query_params.append(('member_names', params['member_names'])) + collection_formats['member_names'] = 'csv' + if 'offset' in params: + query_params.append(('offset', params['offset'])) + if 'policy_ids' in params: + query_params.append(('policy_ids', params['policy_ids'])) + collection_formats['policy_ids'] = 'csv' + if 'policy_names' in params: + query_params.append(('policy_names', params['policy_names'])) + collection_formats['policy_names'] = 'csv' + if 'sort' in params: + query_params.append(('sort', params['sort'])) + collection_formats['sort'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/file-systems/policies', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PolicyMemberGetResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_file_systems_policies_post_with_http_info( + self, + x_request_id=None, # type: str + member_ids=None, # type: List[str] + member_names=None, # type: List[str] + policy_ids=None, # type: List[str] + policy_names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.PolicyMemberResponse + """POST file-systems/policies + + Apply a snapshot scheduling policy to a file system. Only one file system can be mapped to a policy at a time. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_file_systems_policies_post_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param list[str] member_ids: A comma-separated list of member IDs. If after filtering, there is not at least one resource that matches each of the elements of `member_ids`, then an error is returned. This cannot be provided together with the `member_names` query parameter. + :param list[str] member_names: A comma-separated list of member names. + :param list[str] policy_ids: A comma-separated list of policy IDs. If after filtering, there is not at least one resource that matches each of the elements of `policy_ids`, then an error is returned. This cannot be provided together with the `policy_names` query parameter. + :param list[str] policy_names: A comma-separated list of policy names. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: PolicyMemberResponse + If the method is called asynchronously, + returns the request thread. + """ + if member_ids is not None: + if not isinstance(member_ids, list): + member_ids = [member_ids] + if member_names is not None: + if not isinstance(member_names, list): + member_names = [member_names] + if policy_ids is not None: + if not isinstance(policy_ids, list): + policy_ids = [policy_ids] + if policy_names is not None: + if not isinstance(policy_names, list): + policy_names = [policy_names] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + collection_formats = {} + path_params = {} + + query_params = [] + if 'member_ids' in params: + query_params.append(('member_ids', params['member_ids'])) + collection_formats['member_ids'] = 'csv' + if 'member_names' in params: + query_params.append(('member_names', params['member_names'])) + collection_formats['member_names'] = 'csv' + if 'policy_ids' in params: + query_params.append(('policy_ids', params['policy_ids'])) + collection_formats['policy_ids'] = 'csv' + if 'policy_names' in params: + query_params.append(('policy_names', params['policy_names'])) + collection_formats['policy_names'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/file-systems/policies', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PolicyMemberResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_file_systems_post_with_http_info( + self, + names=None, # type: List[str] + file_system=None, # type: models.FileSystemPost + x_request_id=None, # type: str + discard_non_snapshotted_data=None, # type: bool + overwrite=None, # type: bool + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.FileSystemResponse + """POST file-systems + + Create a file system on the current array. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_file_systems_post_with_http_info(names, file_system, async_req=True) + >>> result = thread.get() + + :param list[str] names: A comma-separated list of resource names. (required) + :param FileSystemPost file_system: (required) + :param str x_request_id: Supplied by client during request or generated by server. + :param bool discard_non_snapshotted_data: This parameter must be set to `true` in order to restore a file system from a snapshot or to demote a file system (which restores the file system from the common baseline snapshot). Setting this parameter to `true` is acknowledgement that any non-snapshotted data currently in the file system will be irretrievably lost. + :param bool overwrite: When used for snapshot restore, overwrites (`true`) an existing file system. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: FileSystemResponse + If the method is called asynchronously, + returns the request thread. + """ + if names is not None: + if not isinstance(names, list): + names = [names] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + # verify the required parameter 'names' is set + if names is None: + raise TypeError("Missing the required parameter `names` when calling `api214_file_systems_post`") + # verify the required parameter 'file_system' is set + if file_system is None: + raise TypeError("Missing the required parameter `file_system` when calling `api214_file_systems_post`") + + collection_formats = {} + path_params = {} + + query_params = [] + if 'discard_non_snapshotted_data' in params: + query_params.append(('discard_non_snapshotted_data', params['discard_non_snapshotted_data'])) + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + if 'overwrite' in params: + query_params.append(('overwrite', params['overwrite'])) + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + if 'file_system' in params: + body_params = params['file_system'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/file-systems', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='FileSystemResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_file_systems_sessions_delete_with_http_info( + self, + x_request_id=None, # type: str + client_names=None, # type: List[str] + disruptive=None, # type: bool + names=None, # type: List[str] + protocols=None, # type: List[str] + user_names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> None + """Delete sessions + + Delete sessions. It can be used to either delete an individual session by name or multiple sessions filtered by parameters. E.g. to delete SMBv3 sessions held by specific client, `protocols` and `client_names` must be specified. To prevent accidental deletes, setting flag `disruptive` to `true` is required when only a single query parameter is part of the query. E.g. to delete all SMBv3 sessions, query parameters `protocols` and `disruptive` must be set. When `names` is specified, no other query parameter can be specified. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_file_systems_sessions_delete_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param list[str] client_names: A comma-separated list of ip addresses of clients. For IPv6 both the extended format (x:x:x:x:x:x:x:x) and the shortened format are supported. + :param bool disruptive: If set to `true`, a wide scope of sessions may be deleted in a single action using a single query parameter from `user_names`, `client_names`, or `protocols`. Otherwise, multiple query parameters must be specified to narrow the impact of deletion and avoid potential for accidental disruption of clients. + :param list[str] names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :param list[str] protocols: A comma-separated list of file protocols. Valid values include `nfs` and `smb`. + :param list[str] user_names: A comma-separated list of user names. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: None + If the method is called asynchronously, + returns the request thread. + """ + if client_names is not None: + if not isinstance(client_names, list): + client_names = [client_names] + if names is not None: + if not isinstance(names, list): + names = [names] + if protocols is not None: + if not isinstance(protocols, list): + protocols = [protocols] + if user_names is not None: + if not isinstance(user_names, list): + user_names = [user_names] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + collection_formats = {} + path_params = {} + + query_params = [] + if 'client_names' in params: + query_params.append(('client_names', params['client_names'])) + collection_formats['client_names'] = 'csv' + if 'disruptive' in params: + query_params.append(('disruptive', params['disruptive'])) + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + if 'protocols' in params: + query_params.append(('protocols', params['protocols'])) + collection_formats['protocols'] = 'csv' + if 'user_names' in params: + query_params.append(('user_names', params['user_names'])) + collection_formats['user_names'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/file-systems/sessions', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_file_systems_sessions_get_with_http_info( + self, + x_request_id=None, # type: str + continuation_token=None, # type: str + client_names=None, # type: List[str] + limit=None, # type: int + names=None, # type: List[str] + protocols=None, # type: List[str] + user_names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.FileSessionGetResponse + """Get a list of active sessions + + Lists all active sessions that satisfy the conditions specified by the parameters. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_file_systems_sessions_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param str continuation_token: An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result. + :param list[str] client_names: A comma-separated list of ip addresses of clients. For IPv6 both the extended format (x:x:x:x:x:x:x:x) and the shortened format are supported. + :param int limit: Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the maximum number, the request is still valid. In that case the server just returns the maximum number of items, disregarding the client's page size request. + :param list[str] names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :param list[str] protocols: A comma-separated list of file protocols. Valid values include `nfs` and `smb`. + :param list[str] user_names: A comma-separated list of user names. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: FileSessionGetResponse + If the method is called asynchronously, + returns the request thread. + """ + if client_names is not None: + if not isinstance(client_names, list): + client_names = [client_names] + if names is not None: + if not isinstance(names, list): + names = [names] + if protocols is not None: + if not isinstance(protocols, list): + protocols = [protocols] + if user_names is not None: + if not isinstance(user_names, list): + user_names = [user_names] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + if 'limit' in params and params['limit'] < 1: + raise ValueError("Invalid value for parameter `limit` when calling `api214_file_systems_sessions_get`, must be a value greater than or equal to `1`") + collection_formats = {} + path_params = {} + + query_params = [] + if 'continuation_token' in params: + query_params.append(('continuation_token', params['continuation_token'])) + if 'client_names' in params: + query_params.append(('client_names', params['client_names'])) + collection_formats['client_names'] = 'csv' + if 'limit' in params: + query_params.append(('limit', params['limit'])) + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + if 'protocols' in params: + query_params.append(('protocols', params['protocols'])) + collection_formats['protocols'] = 'csv' + if 'user_names' in params: + query_params.append(('user_names', params['user_names'])) + collection_formats['user_names'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/file-systems/sessions', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='FileSessionGetResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_file_systems_users_performance_get_with_http_info( + self, + x_request_id=None, # type: str + file_system_ids=None, # type: List[str] + file_system_names=None, # type: List[str] + filter=None, # type: str + limit=None, # type: int + names=None, # type: List[str] + sort=None, # type: List[str] + total_only=None, # type: bool + uids=None, # type: List[int] + user_names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.FileSystemUsersPerformanceGetResponse + """GET file-systems/users/performance + + List a user’s I/O performance metrics on a file system. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_file_systems_users_performance_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param list[str] file_system_ids: A comma-separated list of file system IDs. If after filtering, there is not at least one resource that matches each of the elements of `file_system_ids`, then an error is returned. This cannot be provided together with the `file_system_names` query parameter. + :param list[str] file_system_names: A comma-separated list of file system names. If there is not at least one resource that matches each of the elements of `file_system_names`, then an error is returned. + :param str filter: Exclude resources that don't match the specified criteria. + :param int limit: Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the maximum number, the request is still valid. In that case the server just returns the maximum number of items, disregarding the client's page size request. + :param list[str] names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :param list[str] sort: Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response. + :param bool total_only: Only return the total record for the specified items. The total record will be the total of all items after filtering. The `items` list will be empty. + :param list[int] uids: A comma-separated list of user IDs. This cannot be provided together with `user_names` query parameter. + :param list[str] user_names: A comma-separated list of user names. This cannot be provided together with `uids` query parameter. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: FileSystemUsersPerformanceGetResponse + If the method is called asynchronously, + returns the request thread. + """ + if file_system_ids is not None: + if not isinstance(file_system_ids, list): + file_system_ids = [file_system_ids] + if file_system_names is not None: + if not isinstance(file_system_names, list): + file_system_names = [file_system_names] + if names is not None: + if not isinstance(names, list): + names = [names] + if sort is not None: + if not isinstance(sort, list): + sort = [sort] + if uids is not None: + if not isinstance(uids, list): + uids = [uids] + if user_names is not None: + if not isinstance(user_names, list): + user_names = [user_names] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + if 'limit' in params and params['limit'] < 1: + raise ValueError("Invalid value for parameter `limit` when calling `api214_file_systems_users_performance_get`, must be a value greater than or equal to `1`") + collection_formats = {} + path_params = {} + + query_params = [] + if 'file_system_ids' in params: + query_params.append(('file_system_ids', params['file_system_ids'])) + collection_formats['file_system_ids'] = 'csv' + if 'file_system_names' in params: + query_params.append(('file_system_names', params['file_system_names'])) + collection_formats['file_system_names'] = 'csv' + if 'filter' in params: + query_params.append(('filter', params['filter'])) + if 'limit' in params: + query_params.append(('limit', params['limit'])) + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + if 'sort' in params: + query_params.append(('sort', params['sort'])) + collection_formats['sort'] = 'csv' + if 'total_only' in params: + query_params.append(('total_only', params['total_only'])) + if 'uids' in params: + query_params.append(('uids', params['uids'])) + collection_formats['uids'] = 'csv' + if 'user_names' in params: + query_params.append(('user_names', params['user_names'])) + collection_formats['user_names'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/file-systems/users/performance', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='FileSystemUsersPerformanceGetResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) diff --git a/pypureclient/flashblade/FB_2_14/api/hardware_api.py b/pypureclient/flashblade/FB_2_14/api/hardware_api.py new file mode 100644 index 000000000..d48a1cf8c --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/api/hardware_api.py @@ -0,0 +1,249 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import re + +# python 2 and python 3 compatibility library +import six +import uuid +from typing import List, Optional + +from .. import models + +class HardwareApi(object): + + def __init__(self, api_client): + self.api_client = api_client + + def api214_hardware_get_with_http_info( + self, + continuation_token=None, # type: str + filter=None, # type: str + limit=None, # type: int + offset=None, # type: int + sort=None, # type: List[str] + ids=None, # type: List[str] + names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.HardwareGetResponse + """GET hardware + + List hardware slots and bays and the status of installed components. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_hardware_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param str continuation_token: An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result. + :param str filter: Exclude resources that don't match the specified criteria. + :param int limit: Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the maximum number, the request is still valid. In that case the server just returns the maximum number of items, disregarding the client's page size request. + :param int offset: The offset of the first resource to return from a collection. + :param list[str] sort: Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response. + :param list[str] ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :param list[str] names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: HardwareGetResponse + If the method is called asynchronously, + returns the request thread. + """ + if sort is not None: + if not isinstance(sort, list): + sort = [sort] + if ids is not None: + if not isinstance(ids, list): + ids = [ids] + if names is not None: + if not isinstance(names, list): + names = [names] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + if 'limit' in params and params['limit'] < 1: + raise ValueError("Invalid value for parameter `limit` when calling `api214_hardware_get`, must be a value greater than or equal to `1`") + if 'offset' in params and params['offset'] < 0: + raise ValueError("Invalid value for parameter `offset` when calling `api214_hardware_get`, must be a value greater than or equal to `0`") + collection_formats = {} + path_params = {} + + query_params = [] + if 'continuation_token' in params: + query_params.append(('continuation_token', params['continuation_token'])) + if 'filter' in params: + query_params.append(('filter', params['filter'])) + if 'limit' in params: + query_params.append(('limit', params['limit'])) + if 'offset' in params: + query_params.append(('offset', params['offset'])) + if 'sort' in params: + query_params.append(('sort', params['sort'])) + collection_formats['sort'] = 'csv' + if 'ids' in params: + query_params.append(('ids', params['ids'])) + collection_formats['ids'] = 'csv' + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/hardware', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='HardwareGetResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_hardware_patch_with_http_info( + self, + hardware=None, # type: models.Hardware + x_request_id=None, # type: str + ids=None, # type: List[str] + names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.HardwareResponse + """PATCH hardware + + Controls the visual identification light of the specified hardware component. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_hardware_patch_with_http_info(hardware, async_req=True) + >>> result = thread.get() + + :param Hardware hardware: (required) + :param str x_request_id: Supplied by client during request or generated by server. + :param list[str] ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :param list[str] names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: HardwareResponse + If the method is called asynchronously, + returns the request thread. + """ + if ids is not None: + if not isinstance(ids, list): + ids = [ids] + if names is not None: + if not isinstance(names, list): + names = [names] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + # verify the required parameter 'hardware' is set + if hardware is None: + raise TypeError("Missing the required parameter `hardware` when calling `api214_hardware_patch`") + + collection_formats = {} + path_params = {} + + query_params = [] + if 'ids' in params: + query_params.append(('ids', params['ids'])) + collection_formats['ids'] = 'csv' + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + if 'hardware' in params: + body_params = params['hardware'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/hardware', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='HardwareResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) diff --git a/pypureclient/flashblade/FB_2_14/api/hardware_connectors_api.py b/pypureclient/flashblade/FB_2_14/api/hardware_connectors_api.py new file mode 100644 index 000000000..4cd39756d --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/api/hardware_connectors_api.py @@ -0,0 +1,394 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import re + +# python 2 and python 3 compatibility library +import six +import uuid +from typing import List, Optional + +from .. import models + +class HardwareConnectorsApi(object): + + def __init__(self, api_client): + self.api_client = api_client + + def api214_hardware_connectors_get_with_http_info( + self, + x_request_id=None, # type: str + continuation_token=None, # type: str + filter=None, # type: str + limit=None, # type: int + offset=None, # type: int + sort=None, # type: List[str] + ids=None, # type: List[str] + names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.HardwareConnectorGetResponse + """GET hardware-connectors + + List array connection information. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_hardware_connectors_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param str continuation_token: An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result. + :param str filter: Exclude resources that don't match the specified criteria. + :param int limit: Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the maximum number, the request is still valid. In that case the server just returns the maximum number of items, disregarding the client's page size request. + :param int offset: The offset of the first resource to return from a collection. + :param list[str] sort: Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response. + :param list[str] ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :param list[str] names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: HardwareConnectorGetResponse + If the method is called asynchronously, + returns the request thread. + """ + if sort is not None: + if not isinstance(sort, list): + sort = [sort] + if ids is not None: + if not isinstance(ids, list): + ids = [ids] + if names is not None: + if not isinstance(names, list): + names = [names] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + if 'limit' in params and params['limit'] < 1: + raise ValueError("Invalid value for parameter `limit` when calling `api214_hardware_connectors_get`, must be a value greater than or equal to `1`") + if 'offset' in params and params['offset'] < 0: + raise ValueError("Invalid value for parameter `offset` when calling `api214_hardware_connectors_get`, must be a value greater than or equal to `0`") + collection_formats = {} + path_params = {} + + query_params = [] + if 'continuation_token' in params: + query_params.append(('continuation_token', params['continuation_token'])) + if 'filter' in params: + query_params.append(('filter', params['filter'])) + if 'limit' in params: + query_params.append(('limit', params['limit'])) + if 'offset' in params: + query_params.append(('offset', params['offset'])) + if 'sort' in params: + query_params.append(('sort', params['sort'])) + collection_formats['sort'] = 'csv' + if 'ids' in params: + query_params.append(('ids', params['ids'])) + collection_formats['ids'] = 'csv' + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/hardware-connectors', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='HardwareConnectorGetResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_hardware_connectors_patch_with_http_info( + self, + hardware_connector=None, # type: models.HardwareConnector + x_request_id=None, # type: str + ids=None, # type: List[str] + names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.HardwareConnectorResponse + """PATCH hardware-connectors + + Modify array connection information. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_hardware_connectors_patch_with_http_info(hardware_connector, async_req=True) + >>> result = thread.get() + + :param HardwareConnector hardware_connector: (required) + :param str x_request_id: Supplied by client during request or generated by server. + :param list[str] ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :param list[str] names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: HardwareConnectorResponse + If the method is called asynchronously, + returns the request thread. + """ + if ids is not None: + if not isinstance(ids, list): + ids = [ids] + if names is not None: + if not isinstance(names, list): + names = [names] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + # verify the required parameter 'hardware_connector' is set + if hardware_connector is None: + raise TypeError("Missing the required parameter `hardware_connector` when calling `api214_hardware_connectors_patch`") + + collection_formats = {} + path_params = {} + + query_params = [] + if 'ids' in params: + query_params.append(('ids', params['ids'])) + collection_formats['ids'] = 'csv' + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + if 'hardware_connector' in params: + body_params = params['hardware_connector'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/hardware-connectors', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='HardwareConnectorResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_hardware_connectors_performance_get_with_http_info( + self, + x_request_id=None, # type: str + end_time=None, # type: int + filter=None, # type: str + ids=None, # type: List[str] + limit=None, # type: int + names=None, # type: List[str] + offset=None, # type: int + resolution=None, # type: int + sort=None, # type: List[str] + start_time=None, # type: int + total_only=None, # type: bool + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.HardwareConnectorPerformanceGetResponse + """GET hardware-connectors/performance + + Displays network statistics, historical bandwidth, and error reporting for all specified hardware connectors. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_hardware_connectors_performance_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param int end_time: When the time window ends (in milliseconds since epoch). + :param str filter: Exclude resources that don't match the specified criteria. + :param list[str] ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :param int limit: Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the maximum number, the request is still valid. In that case the server just returns the maximum number of items, disregarding the client's page size request. + :param list[str] names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :param int offset: The offset of the first resource to return from a collection. + :param int resolution: The desired ms between samples. Available resolutions may depend on data type, `start_time` and `end_time`. In general `1000`, `30000`, `300000`, `1800000`, `7200000`, and `86400000` are possible values. + :param list[str] sort: Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response. + :param int start_time: When the time window starts (in milliseconds since epoch). + :param bool total_only: Only return the total record for the specified items. The total record will be the total of all items after filtering. The `items` list will be empty. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: HardwareConnectorPerformanceGetResponse + If the method is called asynchronously, + returns the request thread. + """ + if ids is not None: + if not isinstance(ids, list): + ids = [ids] + if names is not None: + if not isinstance(names, list): + names = [names] + if sort is not None: + if not isinstance(sort, list): + sort = [sort] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + if 'end_time' in params and params['end_time'] < 0: + raise ValueError("Invalid value for parameter `end_time` when calling `api214_hardware_connectors_performance_get`, must be a value greater than or equal to `0`") + if 'limit' in params and params['limit'] < 1: + raise ValueError("Invalid value for parameter `limit` when calling `api214_hardware_connectors_performance_get`, must be a value greater than or equal to `1`") + if 'offset' in params and params['offset'] < 0: + raise ValueError("Invalid value for parameter `offset` when calling `api214_hardware_connectors_performance_get`, must be a value greater than or equal to `0`") + if 'resolution' in params and params['resolution'] < 0: + raise ValueError("Invalid value for parameter `resolution` when calling `api214_hardware_connectors_performance_get`, must be a value greater than or equal to `0`") + if 'start_time' in params and params['start_time'] < 0: + raise ValueError("Invalid value for parameter `start_time` when calling `api214_hardware_connectors_performance_get`, must be a value greater than or equal to `0`") + collection_formats = {} + path_params = {} + + query_params = [] + if 'end_time' in params: + query_params.append(('end_time', params['end_time'])) + if 'filter' in params: + query_params.append(('filter', params['filter'])) + if 'ids' in params: + query_params.append(('ids', params['ids'])) + collection_formats['ids'] = 'csv' + if 'limit' in params: + query_params.append(('limit', params['limit'])) + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + if 'offset' in params: + query_params.append(('offset', params['offset'])) + if 'resolution' in params: + query_params.append(('resolution', params['resolution'])) + if 'sort' in params: + query_params.append(('sort', params['sort'])) + collection_formats['sort'] = 'csv' + if 'start_time' in params: + query_params.append(('start_time', params['start_time'])) + if 'total_only' in params: + query_params.append(('total_only', params['total_only'])) + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/hardware-connectors/performance', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='HardwareConnectorPerformanceGetResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) diff --git a/pypureclient/flashblade/FB_2_14/api/keytabs_api.py b/pypureclient/flashblade/FB_2_14/api/keytabs_api.py new file mode 100644 index 000000000..eaa636242 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/api/keytabs_api.py @@ -0,0 +1,521 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import re + +# python 2 and python 3 compatibility library +import six +import uuid +from typing import List, Optional + +from .. import models + +class KeytabsApi(object): + + def __init__(self, api_client): + self.api_client = api_client + + def api214_keytabs_delete_with_http_info( + self, + x_request_id=None, # type: str + ids=None, # type: List[str] + names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> None + """DELETE keytabs + + Delete a Kerberos keytab file. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_keytabs_delete_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param list[str] ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :param list[str] names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: None + If the method is called asynchronously, + returns the request thread. + """ + if ids is not None: + if not isinstance(ids, list): + ids = [ids] + if names is not None: + if not isinstance(names, list): + names = [names] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + collection_formats = {} + path_params = {} + + query_params = [] + if 'ids' in params: + query_params.append(('ids', params['ids'])) + collection_formats['ids'] = 'csv' + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/keytabs', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_keytabs_download_get_with_http_info( + self, + x_request_id=None, # type: str + keytab_ids=None, # type: List[str] + keytab_names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.KeytabFileResponse + """GET keytabs/download + + Download a Kerberos keytab file. The file can be downloaded in the native binary format or a base64 encoded format. If not specified, defaults to binary. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_keytabs_download_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param list[str] keytab_ids: A comma-separated list of keytab IDs. If after filtering, there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `keytab_names` query parameter. + :param list[str] keytab_names: A comma-separated list of keytab names. If there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with `keytab_ids` query parameter. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: KeytabFileResponse + If the method is called asynchronously, + returns the request thread. + """ + if keytab_ids is not None: + if not isinstance(keytab_ids, list): + keytab_ids = [keytab_ids] + if keytab_names is not None: + if not isinstance(keytab_names, list): + keytab_names = [keytab_names] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + collection_formats = {} + path_params = {} + + query_params = [] + if 'keytab_ids' in params: + query_params.append(('keytab_ids', params['keytab_ids'])) + collection_formats['keytab_ids'] = 'csv' + if 'keytab_names' in params: + query_params.append(('keytab_names', params['keytab_names'])) + collection_formats['keytab_names'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/octet-stream', 'text/plain']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/keytabs/download', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='KeytabFileResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_keytabs_get_with_http_info( + self, + x_request_id=None, # type: str + continuation_token=None, # type: str + filter=None, # type: str + ids=None, # type: List[str] + limit=None, # type: int + names=None, # type: List[str] + offset=None, # type: int + sort=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.KeytabGetResponse + """GET keytabs + + List a Kerberos keytab file and its configuration information. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_keytabs_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param str continuation_token: An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result. + :param str filter: Exclude resources that don't match the specified criteria. + :param list[str] ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :param int limit: Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the maximum number, the request is still valid. In that case the server just returns the maximum number of items, disregarding the client's page size request. + :param list[str] names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :param int offset: The offset of the first resource to return from a collection. + :param list[str] sort: Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: KeytabGetResponse + If the method is called asynchronously, + returns the request thread. + """ + if ids is not None: + if not isinstance(ids, list): + ids = [ids] + if names is not None: + if not isinstance(names, list): + names = [names] + if sort is not None: + if not isinstance(sort, list): + sort = [sort] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + if 'limit' in params and params['limit'] < 1: + raise ValueError("Invalid value for parameter `limit` when calling `api214_keytabs_get`, must be a value greater than or equal to `1`") + if 'offset' in params and params['offset'] < 0: + raise ValueError("Invalid value for parameter `offset` when calling `api214_keytabs_get`, must be a value greater than or equal to `0`") + collection_formats = {} + path_params = {} + + query_params = [] + if 'continuation_token' in params: + query_params.append(('continuation_token', params['continuation_token'])) + if 'filter' in params: + query_params.append(('filter', params['filter'])) + if 'ids' in params: + query_params.append(('ids', params['ids'])) + collection_formats['ids'] = 'csv' + if 'limit' in params: + query_params.append(('limit', params['limit'])) + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + if 'offset' in params: + query_params.append(('offset', params['offset'])) + if 'sort' in params: + query_params.append(('sort', params['sort'])) + collection_formats['sort'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/keytabs', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='KeytabGetResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_keytabs_post_with_http_info( + self, + keytab=None, # type: models.KeytabPost + x_request_id=None, # type: str + name_prefixes=None, # type: str + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.KeytabResponse + """POST keytabs + + Import a Kerberos keytab file from a Key Distribution Center. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_keytabs_post_with_http_info(keytab, async_req=True) + >>> result = thread.get() + + :param KeytabPost keytab: (required) + :param str x_request_id: Supplied by client during request or generated by server. + :param str name_prefixes: The prefix to use for the names of all Kerberos keytab objects that are being created. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: KeytabResponse + If the method is called asynchronously, + returns the request thread. + """ + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + # verify the required parameter 'keytab' is set + if keytab is None: + raise TypeError("Missing the required parameter `keytab` when calling `api214_keytabs_post`") + + collection_formats = {} + path_params = {} + + query_params = [] + if 'name_prefixes' in params: + query_params.append(('name_prefixes', params['name_prefixes'])) + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + if 'keytab' in params: + body_params = params['keytab'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/keytabs', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='KeytabResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_keytabs_upload_post_with_http_info( + self, + keytab_file=None, # type: models.ERRORUNKNOWN + x_request_id=None, # type: str + name_prefixes=None, # type: str + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.KeytabFileResponse + """POST keytabs/upload + + Upload a Kerberos keytab file to the array. The file can be uploaded in the native binary format or a base64 encoded format. If not specified, defaults to binary. The procedure to upload a file may vary depending on the type of REST client. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_keytabs_upload_post_with_http_info(keytab_file, async_req=True) + >>> result = thread.get() + + :param ERRORUNKNOWN keytab_file: The keytab file to upload. (required) + :param str x_request_id: Supplied by client during request or generated by server. + :param str name_prefixes: The prefix to use for the names of all Kerberos keytab objects that are being created. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: KeytabFileResponse + If the method is called asynchronously, + returns the request thread. + """ + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + # verify the required parameter 'keytab_file' is set + if keytab_file is None: + raise TypeError("Missing the required parameter `keytab_file` when calling `api214_keytabs_upload_post`") + + collection_formats = {} + path_params = {} + + query_params = [] + if 'name_prefixes' in params: + query_params.append(('name_prefixes', params['name_prefixes'])) + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + if 'keytab_file' in params: + form_params.append(('keytab_file', params['keytab_file'])) + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/octet-stream', 'text/plain']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['multipart/form-data']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/keytabs/upload', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='KeytabFileResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) diff --git a/pypureclient/flashblade/FB_2_14/api/kmip_api.py b/pypureclient/flashblade/FB_2_14/api/kmip_api.py new file mode 100644 index 000000000..958e165c6 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/api/kmip_api.py @@ -0,0 +1,537 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import re + +# python 2 and python 3 compatibility library +import six +import uuid +from typing import List, Optional + +from .. import models + +class KMIPApi(object): + + def __init__(self, api_client): + self.api_client = api_client + + def api214_kmip_delete_with_http_info( + self, + x_request_id=None, # type: str + names=None, # type: List[str] + ids=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> None + """Delete a KMIP server configuration + + Deletes a KMIP server configuration. A server can only be deleted when not in use by the array. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_kmip_delete_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param list[str] names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :param list[str] ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: None + If the method is called asynchronously, + returns the request thread. + """ + if names is not None: + if not isinstance(names, list): + names = [names] + if ids is not None: + if not isinstance(ids, list): + ids = [ids] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + collection_formats = {} + path_params = {} + + query_params = [] + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + if 'ids' in params: + query_params.append(('ids', params['ids'])) + collection_formats['ids'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/kmip', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_kmip_get_with_http_info( + self, + x_request_id=None, # type: str + names=None, # type: List[str] + ids=None, # type: List[str] + filter=None, # type: str + limit=None, # type: int + offset=None, # type: int + sort=None, # type: List[str] + continuation_token=None, # type: str + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.KmipServerResponse + """List KMIP server configurations + + Displays a list of KMIP server configurations. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_kmip_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param list[str] names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :param list[str] ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :param str filter: Exclude resources that don't match the specified criteria. + :param int limit: Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the maximum number, the request is still valid. In that case the server just returns the maximum number of items, disregarding the client's page size request. + :param int offset: The offset of the first resource to return from a collection. + :param list[str] sort: Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response. + :param str continuation_token: An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: KmipServerResponse + If the method is called asynchronously, + returns the request thread. + """ + if names is not None: + if not isinstance(names, list): + names = [names] + if ids is not None: + if not isinstance(ids, list): + ids = [ids] + if sort is not None: + if not isinstance(sort, list): + sort = [sort] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + if 'limit' in params and params['limit'] < 1: + raise ValueError("Invalid value for parameter `limit` when calling `api214_kmip_get`, must be a value greater than or equal to `1`") + if 'offset' in params and params['offset'] < 0: + raise ValueError("Invalid value for parameter `offset` when calling `api214_kmip_get`, must be a value greater than or equal to `0`") + collection_formats = {} + path_params = {} + + query_params = [] + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + if 'ids' in params: + query_params.append(('ids', params['ids'])) + collection_formats['ids'] = 'csv' + if 'filter' in params: + query_params.append(('filter', params['filter'])) + if 'limit' in params: + query_params.append(('limit', params['limit'])) + if 'offset' in params: + query_params.append(('offset', params['offset'])) + if 'sort' in params: + query_params.append(('sort', params['sort'])) + collection_formats['sort'] = 'csv' + if 'continuation_token' in params: + query_params.append(('continuation_token', params['continuation_token'])) + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/kmip', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='KmipServerResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_kmip_patch_with_http_info( + self, + kmip_server=None, # type: models.KmipServer + x_request_id=None, # type: str + names=None, # type: List[str] + ids=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.KmipServerResponse + """Modify a KMIP server configuration + + Modifies KMIP server properties - URI, certificate, certificate group. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_kmip_patch_with_http_info(kmip_server, async_req=True) + >>> result = thread.get() + + :param KmipServer kmip_server: (required) + :param str x_request_id: Supplied by client during request or generated by server. + :param list[str] names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :param list[str] ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: KmipServerResponse + If the method is called asynchronously, + returns the request thread. + """ + if names is not None: + if not isinstance(names, list): + names = [names] + if ids is not None: + if not isinstance(ids, list): + ids = [ids] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + # verify the required parameter 'kmip_server' is set + if kmip_server is None: + raise TypeError("Missing the required parameter `kmip_server` when calling `api214_kmip_patch`") + + collection_formats = {} + path_params = {} + + query_params = [] + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + if 'ids' in params: + query_params.append(('ids', params['ids'])) + collection_formats['ids'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + if 'kmip_server' in params: + body_params = params['kmip_server'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/kmip', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='KmipServerResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_kmip_post_with_http_info( + self, + kmip_server=None, # type: models.KmipServer + x_request_id=None, # type: str + names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.KmipServerResponse + """Create a KMIP server configuration + + Creates a KMIP server configuration. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_kmip_post_with_http_info(kmip_server, async_req=True) + >>> result = thread.get() + + :param KmipServer kmip_server: (required) + :param str x_request_id: Supplied by client during request or generated by server. + :param list[str] names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: KmipServerResponse + If the method is called asynchronously, + returns the request thread. + """ + if names is not None: + if not isinstance(names, list): + names = [names] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + # verify the required parameter 'kmip_server' is set + if kmip_server is None: + raise TypeError("Missing the required parameter `kmip_server` when calling `api214_kmip_post`") + + collection_formats = {} + path_params = {} + + query_params = [] + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + if 'kmip_server' in params: + body_params = params['kmip_server'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/kmip', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='KmipServerResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_kmip_test_get_with_http_info( + self, + x_request_id=None, # type: str + names=None, # type: List[str] + ids=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.TestResultResponse + """Displays KMIP server test results + + Displays a detailed result of of KMIP server test. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_kmip_test_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param list[str] names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :param list[str] ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: TestResultResponse + If the method is called asynchronously, + returns the request thread. + """ + if names is not None: + if not isinstance(names, list): + names = [names] + if ids is not None: + if not isinstance(ids, list): + ids = [ids] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + collection_formats = {} + path_params = {} + + query_params = [] + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + if 'ids' in params: + query_params.append(('ids', params['ids'])) + collection_formats['ids'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/kmip/test', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='TestResultResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) diff --git a/pypureclient/flashblade/FB_2_14/api/lifecycle_rules_api.py b/pypureclient/flashblade/FB_2_14/api/lifecycle_rules_api.py new file mode 100644 index 000000000..0ea921bd2 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/api/lifecycle_rules_api.py @@ -0,0 +1,490 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import re + +# python 2 and python 3 compatibility library +import six +import uuid +from typing import List, Optional + +from .. import models + +class LifecycleRulesApi(object): + + def __init__(self, api_client): + self.api_client = api_client + + def api214_lifecycle_rules_delete_with_http_info( + self, + x_request_id=None, # type: str + bucket_ids=None, # type: List[str] + bucket_names=None, # type: List[str] + ids=None, # type: List[str] + names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> None + """DELETE lifecycle-rules + + Deletes individual lifecycle rules by name or id, or deletes all rules for a bucket. If `ids` is specified, `bucket_names` or `bucket_ids` is also required. If `bucket_names` or `bucket_ids` are specified without `ids`, delete all the rules for the bucket. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_lifecycle_rules_delete_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param list[str] bucket_ids: A comma-separated list of bucket IDs. If after filtering, there is not at least one resource that matches each of the elements of `bucket_ids`, then an error is returned. This cannot be provided together with the `bucket_names` query parameter. This can be provided with the `ids` query parameter but not with `names`. + :param list[str] bucket_names: A comma-separated list of bucket names. If there is not at least one resource that matches each of the elements of `bucket_names`, then an error is returned. This cannot be provided together with the `bucket_ids` query parameter. This can be provided with the `ids` query parameter but not with `names`. + :param list[str] ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :param list[str] names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: None + If the method is called asynchronously, + returns the request thread. + """ + if bucket_ids is not None: + if not isinstance(bucket_ids, list): + bucket_ids = [bucket_ids] + if bucket_names is not None: + if not isinstance(bucket_names, list): + bucket_names = [bucket_names] + if ids is not None: + if not isinstance(ids, list): + ids = [ids] + if names is not None: + if not isinstance(names, list): + names = [names] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + collection_formats = {} + path_params = {} + + query_params = [] + if 'bucket_ids' in params: + query_params.append(('bucket_ids', params['bucket_ids'])) + collection_formats['bucket_ids'] = 'csv' + if 'bucket_names' in params: + query_params.append(('bucket_names', params['bucket_names'])) + collection_formats['bucket_names'] = 'csv' + if 'ids' in params: + query_params.append(('ids', params['ids'])) + collection_formats['ids'] = 'csv' + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/lifecycle-rules', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_lifecycle_rules_get_with_http_info( + self, + x_request_id=None, # type: str + bucket_ids=None, # type: List[str] + bucket_names=None, # type: List[str] + continuation_token=None, # type: str + filter=None, # type: str + ids=None, # type: List[str] + limit=None, # type: int + names=None, # type: List[str] + offset=None, # type: int + sort=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.LifecycleRuleGetResponse + """GET lifecycle-rules + + Returns a list of lifecycle rules. If `names` is specified, list the individual rules. If `ids` is specified, `bucket_names` or `bucket_ids` is also required. If `bucket_names` or `bucket_ids` are specified without `ids`, list all the rules for the bucket. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_lifecycle_rules_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param list[str] bucket_ids: A comma-separated list of bucket IDs. If after filtering, there is not at least one resource that matches each of the elements of `bucket_ids`, then an error is returned. This cannot be provided together with the `bucket_names` query parameter. This can be provided with the `ids` query parameter but not with `names`. + :param list[str] bucket_names: A comma-separated list of bucket names. If there is not at least one resource that matches each of the elements of `bucket_names`, then an error is returned. This cannot be provided together with the `bucket_ids` query parameter. This can be provided with the `ids` query parameter but not with `names`. + :param str continuation_token: An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result. + :param str filter: Exclude resources that don't match the specified criteria. + :param list[str] ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :param int limit: Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the maximum number, the request is still valid. In that case the server just returns the maximum number of items, disregarding the client's page size request. + :param list[str] names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :param int offset: The offset of the first resource to return from a collection. + :param list[str] sort: Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: LifecycleRuleGetResponse + If the method is called asynchronously, + returns the request thread. + """ + if bucket_ids is not None: + if not isinstance(bucket_ids, list): + bucket_ids = [bucket_ids] + if bucket_names is not None: + if not isinstance(bucket_names, list): + bucket_names = [bucket_names] + if ids is not None: + if not isinstance(ids, list): + ids = [ids] + if names is not None: + if not isinstance(names, list): + names = [names] + if sort is not None: + if not isinstance(sort, list): + sort = [sort] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + if 'limit' in params and params['limit'] < 1: + raise ValueError("Invalid value for parameter `limit` when calling `api214_lifecycle_rules_get`, must be a value greater than or equal to `1`") + if 'offset' in params and params['offset'] < 0: + raise ValueError("Invalid value for parameter `offset` when calling `api214_lifecycle_rules_get`, must be a value greater than or equal to `0`") + collection_formats = {} + path_params = {} + + query_params = [] + if 'bucket_ids' in params: + query_params.append(('bucket_ids', params['bucket_ids'])) + collection_formats['bucket_ids'] = 'csv' + if 'bucket_names' in params: + query_params.append(('bucket_names', params['bucket_names'])) + collection_formats['bucket_names'] = 'csv' + if 'continuation_token' in params: + query_params.append(('continuation_token', params['continuation_token'])) + if 'filter' in params: + query_params.append(('filter', params['filter'])) + if 'ids' in params: + query_params.append(('ids', params['ids'])) + collection_formats['ids'] = 'csv' + if 'limit' in params: + query_params.append(('limit', params['limit'])) + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + if 'offset' in params: + query_params.append(('offset', params['offset'])) + if 'sort' in params: + query_params.append(('sort', params['sort'])) + collection_formats['sort'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/lifecycle-rules', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='LifecycleRuleGetResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_lifecycle_rules_patch_with_http_info( + self, + lifecycle=None, # type: models.LifecycleRulePatch + x_request_id=None, # type: str + bucket_ids=None, # type: List[str] + bucket_names=None, # type: List[str] + ids=None, # type: List[str] + names=None, # type: List[str] + confirm_date=None, # type: bool + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.LifecycleRuleResponse + """PATCH lifecycle-rules + + Modify an existing lifecycle rule by name or id. If `ids` is specified, `bucket_names` or `bucket_ids` is also required. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_lifecycle_rules_patch_with_http_info(lifecycle, async_req=True) + >>> result = thread.get() + + :param LifecycleRulePatch lifecycle: (required) + :param str x_request_id: Supplied by client during request or generated by server. + :param list[str] bucket_ids: A comma-separated list of bucket IDs. If after filtering, there is not at least one resource that matches each of the elements of `bucket_ids`, then an error is returned. This cannot be provided together with the `bucket_names` query parameter. This can be provided with the `ids` query parameter but not with `names`. + :param list[str] bucket_names: A comma-separated list of bucket names. If there is not at least one resource that matches each of the elements of `bucket_names`, then an error is returned. This cannot be provided together with the `bucket_ids` query parameter. This can be provided with the `ids` query parameter but not with `names`. + :param list[str] ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :param list[str] names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :param bool confirm_date: If set to `true`, then confirm the date of `keep_current_version_until` is correct. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: LifecycleRuleResponse + If the method is called asynchronously, + returns the request thread. + """ + if bucket_ids is not None: + if not isinstance(bucket_ids, list): + bucket_ids = [bucket_ids] + if bucket_names is not None: + if not isinstance(bucket_names, list): + bucket_names = [bucket_names] + if ids is not None: + if not isinstance(ids, list): + ids = [ids] + if names is not None: + if not isinstance(names, list): + names = [names] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + # verify the required parameter 'lifecycle' is set + if lifecycle is None: + raise TypeError("Missing the required parameter `lifecycle` when calling `api214_lifecycle_rules_patch`") + + collection_formats = {} + path_params = {} + + query_params = [] + if 'bucket_ids' in params: + query_params.append(('bucket_ids', params['bucket_ids'])) + collection_formats['bucket_ids'] = 'csv' + if 'bucket_names' in params: + query_params.append(('bucket_names', params['bucket_names'])) + collection_formats['bucket_names'] = 'csv' + if 'ids' in params: + query_params.append(('ids', params['ids'])) + collection_formats['ids'] = 'csv' + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + if 'confirm_date' in params: + query_params.append(('confirm_date', params['confirm_date'])) + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + if 'lifecycle' in params: + body_params = params['lifecycle'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/lifecycle-rules', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='LifecycleRuleResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_lifecycle_rules_post_with_http_info( + self, + rule=None, # type: models.LifecycleRulePost + x_request_id=None, # type: str + confirm_date=None, # type: bool + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.LifecycleRuleResponse + """POST lifecycle-rules + + Creates a lifecycle rule. `bucket` and `keep_previous_version_for` are required. If `rule_id` is not specified, it will be automatically generated in the format \"fbRuleIdX\". + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_lifecycle_rules_post_with_http_info(rule, async_req=True) + >>> result = thread.get() + + :param LifecycleRulePost rule: (required) + :param str x_request_id: Supplied by client during request or generated by server. + :param bool confirm_date: If set to `true`, then confirm the date of `keep_current_version_until` is correct. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: LifecycleRuleResponse + If the method is called asynchronously, + returns the request thread. + """ + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + # verify the required parameter 'rule' is set + if rule is None: + raise TypeError("Missing the required parameter `rule` when calling `api214_lifecycle_rules_post`") + + collection_formats = {} + path_params = {} + + query_params = [] + if 'confirm_date' in params: + query_params.append(('confirm_date', params['confirm_date'])) + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + if 'rule' in params: + body_params = params['rule'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/lifecycle-rules', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='LifecycleRuleResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) diff --git a/pypureclient/flashblade/FB_2_14/api/link_aggregation_groups_api.py b/pypureclient/flashblade/FB_2_14/api/link_aggregation_groups_api.py new file mode 100644 index 000000000..a79a618fe --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/api/link_aggregation_groups_api.py @@ -0,0 +1,445 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import re + +# python 2 and python 3 compatibility library +import six +import uuid +from typing import List, Optional + +from .. import models + +class LinkAggregationGroupsApi(object): + + def __init__(self, api_client): + self.api_client = api_client + + def api214_link_aggregation_groups_delete_with_http_info( + self, + x_request_id=None, # type: str + ids=None, # type: List[str] + names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> None + """DELETE link-aggregation-groups + + Remove a link aggregation group to unbind the ports. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_link_aggregation_groups_delete_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param list[str] ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :param list[str] names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: None + If the method is called asynchronously, + returns the request thread. + """ + if ids is not None: + if not isinstance(ids, list): + ids = [ids] + if names is not None: + if not isinstance(names, list): + names = [names] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + collection_formats = {} + path_params = {} + + query_params = [] + if 'ids' in params: + query_params.append(('ids', params['ids'])) + collection_formats['ids'] = 'csv' + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/link-aggregation-groups', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_link_aggregation_groups_get_with_http_info( + self, + x_request_id=None, # type: str + continuation_token=None, # type: str + filter=None, # type: str + ids=None, # type: List[str] + limit=None, # type: int + names=None, # type: List[str] + offset=None, # type: int + sort=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.LinkAggregationGroupGetResponse + """GET link-aggregation-groups + + List the status and attributes of the Ethernet ports in the configured link aggregation groups. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_link_aggregation_groups_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param str continuation_token: An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result. + :param str filter: Exclude resources that don't match the specified criteria. + :param list[str] ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :param int limit: Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the maximum number, the request is still valid. In that case the server just returns the maximum number of items, disregarding the client's page size request. + :param list[str] names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :param int offset: The offset of the first resource to return from a collection. + :param list[str] sort: Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: LinkAggregationGroupGetResponse + If the method is called asynchronously, + returns the request thread. + """ + if ids is not None: + if not isinstance(ids, list): + ids = [ids] + if names is not None: + if not isinstance(names, list): + names = [names] + if sort is not None: + if not isinstance(sort, list): + sort = [sort] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + if 'limit' in params and params['limit'] < 1: + raise ValueError("Invalid value for parameter `limit` when calling `api214_link_aggregation_groups_get`, must be a value greater than or equal to `1`") + if 'offset' in params and params['offset'] < 0: + raise ValueError("Invalid value for parameter `offset` when calling `api214_link_aggregation_groups_get`, must be a value greater than or equal to `0`") + collection_formats = {} + path_params = {} + + query_params = [] + if 'continuation_token' in params: + query_params.append(('continuation_token', params['continuation_token'])) + if 'filter' in params: + query_params.append(('filter', params['filter'])) + if 'ids' in params: + query_params.append(('ids', params['ids'])) + collection_formats['ids'] = 'csv' + if 'limit' in params: + query_params.append(('limit', params['limit'])) + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + if 'offset' in params: + query_params.append(('offset', params['offset'])) + if 'sort' in params: + query_params.append(('sort', params['sort'])) + collection_formats['sort'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/link-aggregation-groups', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='LinkAggregationGroupGetResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_link_aggregation_groups_patch_with_http_info( + self, + link_aggregation_group=None, # type: models.Linkaggregationgroup + x_request_id=None, # type: str + ids=None, # type: List[str] + names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.LinkAggregationGroupResponse + """PATCH link-aggregation-groups + + Modify link aggregation groups by adding and removing Ethernet ports. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_link_aggregation_groups_patch_with_http_info(link_aggregation_group, async_req=True) + >>> result = thread.get() + + :param Linkaggregationgroup link_aggregation_group: (required) + :param str x_request_id: Supplied by client during request or generated by server. + :param list[str] ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :param list[str] names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: LinkAggregationGroupResponse + If the method is called asynchronously, + returns the request thread. + """ + if ids is not None: + if not isinstance(ids, list): + ids = [ids] + if names is not None: + if not isinstance(names, list): + names = [names] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + # verify the required parameter 'link_aggregation_group' is set + if link_aggregation_group is None: + raise TypeError("Missing the required parameter `link_aggregation_group` when calling `api214_link_aggregation_groups_patch`") + + collection_formats = {} + path_params = {} + + query_params = [] + if 'ids' in params: + query_params.append(('ids', params['ids'])) + collection_formats['ids'] = 'csv' + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + if 'link_aggregation_group' in params: + body_params = params['link_aggregation_group'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/link-aggregation-groups', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='LinkAggregationGroupResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_link_aggregation_groups_post_with_http_info( + self, + link_aggregation_group=None, # type: models.LinkAggregationGroup + names=None, # type: List[str] + x_request_id=None, # type: str + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.LinkAggregationGroupResponse + """POST link-aggregation-groups + + Create a link aggregation group of Ethernet ports on the array. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_link_aggregation_groups_post_with_http_info(link_aggregation_group, names, async_req=True) + >>> result = thread.get() + + :param LinkAggregationGroup link_aggregation_group: (required) + :param list[str] names: A comma-separated list of resource names. (required) + :param str x_request_id: Supplied by client during request or generated by server. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: LinkAggregationGroupResponse + If the method is called asynchronously, + returns the request thread. + """ + if names is not None: + if not isinstance(names, list): + names = [names] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + # verify the required parameter 'link_aggregation_group' is set + if link_aggregation_group is None: + raise TypeError("Missing the required parameter `link_aggregation_group` when calling `api214_link_aggregation_groups_post`") + # verify the required parameter 'names' is set + if names is None: + raise TypeError("Missing the required parameter `names` when calling `api214_link_aggregation_groups_post`") + + collection_formats = {} + path_params = {} + + query_params = [] + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + if 'link_aggregation_group' in params: + body_params = params['link_aggregation_group'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/link-aggregation-groups', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='LinkAggregationGroupResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) diff --git a/pypureclient/flashblade/FB_2_14/api/logs_api.py b/pypureclient/flashblade/FB_2_14/api/logs_api.py new file mode 100644 index 000000000..89b0e9b7c --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/api/logs_api.py @@ -0,0 +1,415 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import re + +# python 2 and python 3 compatibility library +import six +import uuid +from typing import List, Optional + +from .. import models + +class LogsApi(object): + + def __init__(self, api_client): + self.api_client = api_client + + def api214_logs_async_download_get_with_http_info( + self, + x_request_id=None, # type: str + names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.file + """GET logs-async/download + + Download the files which contain a history of log events from the array to provide to Pure Technical Services for analysis. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_logs_async_download_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param list[str] names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: file + If the method is called asynchronously, + returns the request thread. + """ + if names is not None: + if not isinstance(names, list): + names = [names] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + collection_formats = {} + path_params = {} + + query_params = [] + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/octet-stream', 'text/plain', 'application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/logs-async/download', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='file', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_logs_async_get_with_http_info( + self, + x_request_id=None, # type: str + continuation_token=None, # type: str + filter=None, # type: str + ids=None, # type: List[str] + limit=None, # type: int + names=None, # type: List[str] + offset=None, # type: int + sort=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.LogsAsyncGetResponse + """GET logs-async + + List the attributes and status of preparation for a history of log events from the array to provide to Pure Technical Services for analysis. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_logs_async_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param str continuation_token: An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result. + :param str filter: Exclude resources that don't match the specified criteria. + :param list[str] ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :param int limit: Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the maximum number, the request is still valid. In that case the server just returns the maximum number of items, disregarding the client's page size request. + :param list[str] names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :param int offset: The offset of the first resource to return from a collection. + :param list[str] sort: Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: LogsAsyncGetResponse + If the method is called asynchronously, + returns the request thread. + """ + if ids is not None: + if not isinstance(ids, list): + ids = [ids] + if names is not None: + if not isinstance(names, list): + names = [names] + if sort is not None: + if not isinstance(sort, list): + sort = [sort] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + if 'limit' in params and params['limit'] < 1: + raise ValueError("Invalid value for parameter `limit` when calling `api214_logs_async_get`, must be a value greater than or equal to `1`") + if 'offset' in params and params['offset'] < 0: + raise ValueError("Invalid value for parameter `offset` when calling `api214_logs_async_get`, must be a value greater than or equal to `0`") + collection_formats = {} + path_params = {} + + query_params = [] + if 'continuation_token' in params: + query_params.append(('continuation_token', params['continuation_token'])) + if 'filter' in params: + query_params.append(('filter', params['filter'])) + if 'ids' in params: + query_params.append(('ids', params['ids'])) + collection_formats['ids'] = 'csv' + if 'limit' in params: + query_params.append(('limit', params['limit'])) + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + if 'offset' in params: + query_params.append(('offset', params['offset'])) + if 'sort' in params: + query_params.append(('sort', params['sort'])) + collection_formats['sort'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/logs-async', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='LogsAsyncGetResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_logs_async_patch_with_http_info( + self, + logs_async=None, # type: models.LogsAsync + x_request_id=None, # type: str + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.LogsAsyncResponse + """PATCH logs-async + + Start the preparation for a history of log events from the array to provide to Pure Technical Services for analysis. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_logs_async_patch_with_http_info(logs_async, async_req=True) + >>> result = thread.get() + + :param LogsAsync logs_async: (required) + :param str x_request_id: Supplied by client during request or generated by server. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: LogsAsyncResponse + If the method is called asynchronously, + returns the request thread. + """ + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + # verify the required parameter 'logs_async' is set + if logs_async is None: + raise TypeError("Missing the required parameter `logs_async` when calling `api214_logs_async_patch`") + + collection_formats = {} + path_params = {} + + query_params = [] + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + if 'logs_async' in params: + body_params = params['logs_async'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/logs-async', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='LogsAsyncResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_logs_get_with_http_info( + self, + x_request_id=None, # type: str + end_time=None, # type: int + start_time=None, # type: int + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.file + """GET logs + + Download a history of log events from the array to provide to Pure Technical Services for analysis. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_logs_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param int end_time: When the time window ends (in milliseconds since epoch). + :param int start_time: When the time window starts (in milliseconds since epoch). + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: file + If the method is called asynchronously, + returns the request thread. + """ + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + if 'end_time' in params and params['end_time'] < 0: + raise ValueError("Invalid value for parameter `end_time` when calling `api214_logs_get`, must be a value greater than or equal to `0`") + if 'start_time' in params and params['start_time'] < 0: + raise ValueError("Invalid value for parameter `start_time` when calling `api214_logs_get`, must be a value greater than or equal to `0`") + collection_formats = {} + path_params = {} + + query_params = [] + if 'end_time' in params: + query_params.append(('end_time', params['end_time'])) + if 'start_time' in params: + query_params.append(('start_time', params['start_time'])) + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/octet-stream', 'text/plain', 'application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/logs', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='file', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) diff --git a/pypureclient/flashblade/FB_2_14/api/network_interfaces_api.py b/pypureclient/flashblade/FB_2_14/api/network_interfaces_api.py new file mode 100644 index 000000000..fbec4de3c --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/api/network_interfaces_api.py @@ -0,0 +1,669 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import re + +# python 2 and python 3 compatibility library +import six +import uuid +from typing import List, Optional + +from .. import models + +class NetworkInterfacesApi(object): + + def __init__(self, api_client): + self.api_client = api_client + + def api214_network_interfaces_delete_with_http_info( + self, + x_request_id=None, # type: str + ids=None, # type: List[str] + names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> None + """DELETE network-interfaces + + Remove a data VIP. Once removed, any clients connected through the data VIP will lose their connection to the file system. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_network_interfaces_delete_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param list[str] ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :param list[str] names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: None + If the method is called asynchronously, + returns the request thread. + """ + if ids is not None: + if not isinstance(ids, list): + ids = [ids] + if names is not None: + if not isinstance(names, list): + names = [names] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + collection_formats = {} + path_params = {} + + query_params = [] + if 'ids' in params: + query_params.append(('ids', params['ids'])) + collection_formats['ids'] = 'csv' + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/network-interfaces', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_network_interfaces_get_with_http_info( + self, + x_request_id=None, # type: str + continuation_token=None, # type: str + filter=None, # type: str + ids=None, # type: List[str] + limit=None, # type: int + names=None, # type: List[str] + offset=None, # type: int + sort=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.NetworkInterfaceGetResponse + """GET network-interfaces + + List network interfaces and their attributes. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_network_interfaces_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param str continuation_token: An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result. + :param str filter: Exclude resources that don't match the specified criteria. + :param list[str] ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :param int limit: Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the maximum number, the request is still valid. In that case the server just returns the maximum number of items, disregarding the client's page size request. + :param list[str] names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :param int offset: The offset of the first resource to return from a collection. + :param list[str] sort: Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: NetworkInterfaceGetResponse + If the method is called asynchronously, + returns the request thread. + """ + if ids is not None: + if not isinstance(ids, list): + ids = [ids] + if names is not None: + if not isinstance(names, list): + names = [names] + if sort is not None: + if not isinstance(sort, list): + sort = [sort] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + if 'limit' in params and params['limit'] < 1: + raise ValueError("Invalid value for parameter `limit` when calling `api214_network_interfaces_get`, must be a value greater than or equal to `1`") + if 'offset' in params and params['offset'] < 0: + raise ValueError("Invalid value for parameter `offset` when calling `api214_network_interfaces_get`, must be a value greater than or equal to `0`") + collection_formats = {} + path_params = {} + + query_params = [] + if 'continuation_token' in params: + query_params.append(('continuation_token', params['continuation_token'])) + if 'filter' in params: + query_params.append(('filter', params['filter'])) + if 'ids' in params: + query_params.append(('ids', params['ids'])) + collection_formats['ids'] = 'csv' + if 'limit' in params: + query_params.append(('limit', params['limit'])) + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + if 'offset' in params: + query_params.append(('offset', params['offset'])) + if 'sort' in params: + query_params.append(('sort', params['sort'])) + collection_formats['sort'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/network-interfaces', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='NetworkInterfaceGetResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_network_interfaces_patch_with_http_info( + self, + network_interface=None, # type: models.NetworkInterfacePatch + x_request_id=None, # type: str + ids=None, # type: List[str] + names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.NetworkInterfaceResponse + """PATCH network-interfaces + + Modify the attributes of a data VIP. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_network_interfaces_patch_with_http_info(network_interface, async_req=True) + >>> result = thread.get() + + :param NetworkInterfacePatch network_interface: (required) + :param str x_request_id: Supplied by client during request or generated by server. + :param list[str] ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :param list[str] names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: NetworkInterfaceResponse + If the method is called asynchronously, + returns the request thread. + """ + if ids is not None: + if not isinstance(ids, list): + ids = [ids] + if names is not None: + if not isinstance(names, list): + names = [names] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + # verify the required parameter 'network_interface' is set + if network_interface is None: + raise TypeError("Missing the required parameter `network_interface` when calling `api214_network_interfaces_patch`") + + collection_formats = {} + path_params = {} + + query_params = [] + if 'ids' in params: + query_params.append(('ids', params['ids'])) + collection_formats['ids'] = 'csv' + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + if 'network_interface' in params: + body_params = params['network_interface'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/network-interfaces', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='NetworkInterfaceResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_network_interfaces_ping_get_with_http_info( + self, + destination=None, # type: str + x_request_id=None, # type: str + packet_size=None, # type: int + count=None, # type: int + component_name=None, # type: str + source=None, # type: str + print_latency=None, # type: bool + resolve_hostname=None, # type: bool + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.NetworkInterfacePingGetResponse + """GET network-interfaces/ping + + Display network interface ping result. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_network_interfaces_ping_get_with_http_info(destination, async_req=True) + >>> result = thread.get() + + :param str destination: A destination specified by user to run the network diagnosis against. Can be a hostname or an IP. (required) + :param str x_request_id: Supplied by client during request or generated by server. + :param int packet_size: Used by ping to specify the number of data bytes to be sent per packet. If not specified, defaults to 56. + :param int count: Used by ping to specify the number of packets to send. If not specified, defaults to 1. + :param str component_name: Used by ping and trace to specify where to run the operation. Valid values are controllers and blades from hardware list. If not specified, defaults to all available controllers and selected blades. + :param str source: Used by ping and trace to specify the property where to start to run the specified operation. The property can be subnet or IP. + :param bool print_latency: Used by ping to specify whether or not to print the full user-to-user latency. If not specified, defaults to false. + :param bool resolve_hostname: Used by ping and trace to specify whether or not to map IP addresses to host names. If not specified, defaults to true. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: NetworkInterfacePingGetResponse + If the method is called asynchronously, + returns the request thread. + """ + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + # verify the required parameter 'destination' is set + if destination is None: + raise TypeError("Missing the required parameter `destination` when calling `api214_network_interfaces_ping_get`") + + collection_formats = {} + path_params = {} + + query_params = [] + if 'packet_size' in params: + query_params.append(('packet_size', params['packet_size'])) + if 'count' in params: + query_params.append(('count', params['count'])) + if 'component_name' in params: + query_params.append(('component_name', params['component_name'])) + if 'destination' in params: + query_params.append(('destination', params['destination'])) + if 'source' in params: + query_params.append(('source', params['source'])) + if 'print_latency' in params: + query_params.append(('print_latency', params['print_latency'])) + if 'resolve_hostname' in params: + query_params.append(('resolve_hostname', params['resolve_hostname'])) + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/network-interfaces/ping', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='NetworkInterfacePingGetResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_network_interfaces_post_with_http_info( + self, + network_interface=None, # type: models.NetworkInterface + names=None, # type: List[str] + x_request_id=None, # type: str + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.NetworkInterfaceResponse + """POST network-interfaces + + Create a data VIP to export a file system. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_network_interfaces_post_with_http_info(network_interface, names, async_req=True) + >>> result = thread.get() + + :param NetworkInterface network_interface: (required) + :param list[str] names: A comma-separated list of resource names. (required) + :param str x_request_id: Supplied by client during request or generated by server. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: NetworkInterfaceResponse + If the method is called asynchronously, + returns the request thread. + """ + if names is not None: + if not isinstance(names, list): + names = [names] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + # verify the required parameter 'network_interface' is set + if network_interface is None: + raise TypeError("Missing the required parameter `network_interface` when calling `api214_network_interfaces_post`") + # verify the required parameter 'names' is set + if names is None: + raise TypeError("Missing the required parameter `names` when calling `api214_network_interfaces_post`") + + collection_formats = {} + path_params = {} + + query_params = [] + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + if 'network_interface' in params: + body_params = params['network_interface'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/network-interfaces', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='NetworkInterfaceResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_network_interfaces_trace_get_with_http_info( + self, + destination=None, # type: str + x_request_id=None, # type: str + fragment_packet=None, # type: bool + method=None, # type: str + discover_mtu=None, # type: bool + component_name=None, # type: str + source=None, # type: str + port=None, # type: str + resolve_hostname=None, # type: bool + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.NetworkInterfaceTraceGetResponse + """GET network-interfaces/trace + + Display network interface trace result. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_network_interfaces_trace_get_with_http_info(destination, async_req=True) + >>> result = thread.get() + + :param str destination: A destination specified by user to run the network diagnosis against. Can be a hostname or an IP. (required) + :param str x_request_id: Supplied by client during request or generated by server. + :param bool fragment_packet: Used by trace to specify whether or not to fragment packets. If not specified, defaults to true. + :param str method: Used by trace to specify which method to use for trace operations. Valid values are `icmp`, `tcp`, and `udp`. If not specified, defaults to 'udp'. + :param bool discover_mtu: Used by trace to specify whether or not to discover the MTU along the path being traced. If not specified, defaults to false. + :param str component_name: Used by ping and trace to specify where to run the operation. Valid values are controllers and blades from hardware list. If not specified, defaults to all available controllers and selected blades. + :param str source: Used by ping and trace to specify the property where to start to run the specified operation. The property can be subnet or IP. + :param str port: Used by trace to specify a destination port. + :param bool resolve_hostname: Used by ping and trace to specify whether or not to map IP addresses to host names. If not specified, defaults to true. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: NetworkInterfaceTraceGetResponse + If the method is called asynchronously, + returns the request thread. + """ + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + # verify the required parameter 'destination' is set + if destination is None: + raise TypeError("Missing the required parameter `destination` when calling `api214_network_interfaces_trace_get`") + + collection_formats = {} + path_params = {} + + query_params = [] + if 'fragment_packet' in params: + query_params.append(('fragment_packet', params['fragment_packet'])) + if 'method' in params: + query_params.append(('method', params['method'])) + if 'discover_mtu' in params: + query_params.append(('discover_mtu', params['discover_mtu'])) + if 'component_name' in params: + query_params.append(('component_name', params['component_name'])) + if 'destination' in params: + query_params.append(('destination', params['destination'])) + if 'source' in params: + query_params.append(('source', params['source'])) + if 'port' in params: + query_params.append(('port', params['port'])) + if 'resolve_hostname' in params: + query_params.append(('resolve_hostname', params['resolve_hostname'])) + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/network-interfaces/trace', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='NetworkInterfaceTraceGetResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) diff --git a/pypureclient/flashblade/FB_2_14/api/object_store_access_keys_api.py b/pypureclient/flashblade/FB_2_14/api/object_store_access_keys_api.py new file mode 100644 index 000000000..84c2014e3 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/api/object_store_access_keys_api.py @@ -0,0 +1,424 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import re + +# python 2 and python 3 compatibility library +import six +import uuid +from typing import List, Optional + +from .. import models + +class ObjectStoreAccessKeysApi(object): + + def __init__(self, api_client): + self.api_client = api_client + + def api214_object_store_access_keys_delete_with_http_info( + self, + names=None, # type: List[str] + x_request_id=None, # type: str + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> None + """DELETE object-store-access-keys + + Delete an object store access key. Once an access key has been deleted, it cannot be recovered. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_object_store_access_keys_delete_with_http_info(names, async_req=True) + >>> result = thread.get() + + :param list[str] names: A comma-separated list of resource names. (required) + :param str x_request_id: Supplied by client during request or generated by server. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: None + If the method is called asynchronously, + returns the request thread. + """ + if names is not None: + if not isinstance(names, list): + names = [names] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + # verify the required parameter 'names' is set + if names is None: + raise TypeError("Missing the required parameter `names` when calling `api214_object_store_access_keys_delete`") + + collection_formats = {} + path_params = {} + + query_params = [] + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/object-store-access-keys', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_object_store_access_keys_get_with_http_info( + self, + x_request_id=None, # type: str + continuation_token=None, # type: str + filter=None, # type: str + limit=None, # type: int + names=None, # type: List[str] + offset=None, # type: int + sort=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.ObjectStoreAccessKeyGetResponse + """GET object-store-access-keys + + List object store access keys. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_object_store_access_keys_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param str continuation_token: An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result. + :param str filter: Exclude resources that don't match the specified criteria. + :param int limit: Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the maximum number, the request is still valid. In that case the server just returns the maximum number of items, disregarding the client's page size request. + :param list[str] names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :param int offset: The offset of the first resource to return from a collection. + :param list[str] sort: Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: ObjectStoreAccessKeyGetResponse + If the method is called asynchronously, + returns the request thread. + """ + if names is not None: + if not isinstance(names, list): + names = [names] + if sort is not None: + if not isinstance(sort, list): + sort = [sort] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + if 'limit' in params and params['limit'] < 1: + raise ValueError("Invalid value for parameter `limit` when calling `api214_object_store_access_keys_get`, must be a value greater than or equal to `1`") + if 'offset' in params and params['offset'] < 0: + raise ValueError("Invalid value for parameter `offset` when calling `api214_object_store_access_keys_get`, must be a value greater than or equal to `0`") + collection_formats = {} + path_params = {} + + query_params = [] + if 'continuation_token' in params: + query_params.append(('continuation_token', params['continuation_token'])) + if 'filter' in params: + query_params.append(('filter', params['filter'])) + if 'limit' in params: + query_params.append(('limit', params['limit'])) + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + if 'offset' in params: + query_params.append(('offset', params['offset'])) + if 'sort' in params: + query_params.append(('sort', params['sort'])) + collection_formats['sort'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/object-store-access-keys', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ObjectStoreAccessKeyGetResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_object_store_access_keys_patch_with_http_info( + self, + names=None, # type: List[str] + object_store_access_key=None, # type: models.ObjectStoreAccessKey + x_request_id=None, # type: str + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.ObjectStoreAccessKeyResponse + """PATCH object-store-access-keys + + Enable or disable object store access keys. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_object_store_access_keys_patch_with_http_info(names, object_store_access_key, async_req=True) + >>> result = thread.get() + + :param list[str] names: A comma-separated list of resource names. (required) + :param ObjectStoreAccessKey object_store_access_key: (required) + :param str x_request_id: Supplied by client during request or generated by server. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: ObjectStoreAccessKeyResponse + If the method is called asynchronously, + returns the request thread. + """ + if names is not None: + if not isinstance(names, list): + names = [names] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + # verify the required parameter 'names' is set + if names is None: + raise TypeError("Missing the required parameter `names` when calling `api214_object_store_access_keys_patch`") + # verify the required parameter 'object_store_access_key' is set + if object_store_access_key is None: + raise TypeError("Missing the required parameter `object_store_access_key` when calling `api214_object_store_access_keys_patch`") + + collection_formats = {} + path_params = {} + + query_params = [] + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + if 'object_store_access_key' in params: + body_params = params['object_store_access_key'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/object-store-access-keys', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ObjectStoreAccessKeyResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_object_store_access_keys_post_with_http_info( + self, + object_store_access_key=None, # type: models.ObjectStoreAccessKeyPost + x_request_id=None, # type: str + names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.ObjectStoreAccessKeyResponse + """POST object-store-access-keys + + Create or import object store access keys. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_object_store_access_keys_post_with_http_info(object_store_access_key, async_req=True) + >>> result = thread.get() + + :param ObjectStoreAccessKeyPost object_store_access_key: (required) + :param str x_request_id: Supplied by client during request or generated by server. + :param list[str] names: A comma-separated list of resource names to import. To import a set of credentials, this field must be specified with the `secret_access_key` body parameter. If both of these are not specified, the system will generate a new set of credentials. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: ObjectStoreAccessKeyResponse + If the method is called asynchronously, + returns the request thread. + """ + if names is not None: + if not isinstance(names, list): + names = [names] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + # verify the required parameter 'object_store_access_key' is set + if object_store_access_key is None: + raise TypeError("Missing the required parameter `object_store_access_key` when calling `api214_object_store_access_keys_post`") + + collection_formats = {} + path_params = {} + + query_params = [] + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + if 'object_store_access_key' in params: + body_params = params['object_store_access_key'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/object-store-access-keys', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ObjectStoreAccessKeyResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) diff --git a/pypureclient/flashblade/FB_2_14/api/object_store_accounts_api.py b/pypureclient/flashblade/FB_2_14/api/object_store_accounts_api.py new file mode 100644 index 000000000..c8f16af87 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/api/object_store_accounts_api.py @@ -0,0 +1,450 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import re + +# python 2 and python 3 compatibility library +import six +import uuid +from typing import List, Optional + +from .. import models + +class ObjectStoreAccountsApi(object): + + def __init__(self, api_client): + self.api_client = api_client + + def api214_object_store_accounts_delete_with_http_info( + self, + x_request_id=None, # type: str + ids=None, # type: List[str] + names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> None + """DELETE object-store-accounts + + Delete an object store account. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_object_store_accounts_delete_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param list[str] ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :param list[str] names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: None + If the method is called asynchronously, + returns the request thread. + """ + if ids is not None: + if not isinstance(ids, list): + ids = [ids] + if names is not None: + if not isinstance(names, list): + names = [names] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + collection_formats = {} + path_params = {} + + query_params = [] + if 'ids' in params: + query_params.append(('ids', params['ids'])) + collection_formats['ids'] = 'csv' + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/object-store-accounts', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_object_store_accounts_get_with_http_info( + self, + x_request_id=None, # type: str + continuation_token=None, # type: str + filter=None, # type: str + ids=None, # type: List[str] + limit=None, # type: int + names=None, # type: List[str] + offset=None, # type: int + sort=None, # type: List[str] + total_only=None, # type: bool + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.ObjectStoreAccountGetResponse + """GET object-store-accounts + + List object store accounts and their attributes. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_object_store_accounts_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param str continuation_token: An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result. + :param str filter: Exclude resources that don't match the specified criteria. + :param list[str] ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :param int limit: Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the maximum number, the request is still valid. In that case the server just returns the maximum number of items, disregarding the client's page size request. + :param list[str] names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :param int offset: The offset of the first resource to return from a collection. + :param list[str] sort: Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response. + :param bool total_only: Only return the total record for the specified items. The total record will be the total of all items after filtering. The `items` list will be empty. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: ObjectStoreAccountGetResponse + If the method is called asynchronously, + returns the request thread. + """ + if ids is not None: + if not isinstance(ids, list): + ids = [ids] + if names is not None: + if not isinstance(names, list): + names = [names] + if sort is not None: + if not isinstance(sort, list): + sort = [sort] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + if 'limit' in params and params['limit'] < 1: + raise ValueError("Invalid value for parameter `limit` when calling `api214_object_store_accounts_get`, must be a value greater than or equal to `1`") + if 'offset' in params and params['offset'] < 0: + raise ValueError("Invalid value for parameter `offset` when calling `api214_object_store_accounts_get`, must be a value greater than or equal to `0`") + collection_formats = {} + path_params = {} + + query_params = [] + if 'continuation_token' in params: + query_params.append(('continuation_token', params['continuation_token'])) + if 'filter' in params: + query_params.append(('filter', params['filter'])) + if 'ids' in params: + query_params.append(('ids', params['ids'])) + collection_formats['ids'] = 'csv' + if 'limit' in params: + query_params.append(('limit', params['limit'])) + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + if 'offset' in params: + query_params.append(('offset', params['offset'])) + if 'sort' in params: + query_params.append(('sort', params['sort'])) + collection_formats['sort'] = 'csv' + if 'total_only' in params: + query_params.append(('total_only', params['total_only'])) + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/object-store-accounts', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ObjectStoreAccountGetResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_object_store_accounts_patch_with_http_info( + self, + object_store_account=None, # type: models.ObjectStoreAccountPatch + x_request_id=None, # type: str + ids=None, # type: List[str] + ignore_usage=None, # type: bool + names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.ObjectStoreAccountResponse + """PATCH object-store-accounts + + Modify object store account attributes such as quota limit and bucket defaults. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_object_store_accounts_patch_with_http_info(object_store_account, async_req=True) + >>> result = thread.get() + + :param ObjectStoreAccountPatch object_store_account: (required) + :param str x_request_id: Supplied by client during request or generated by server. + :param list[str] ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :param bool ignore_usage: Allow update operations that lead to a `hard_limit_enabled` object store account, bucket, or file system with usage over its limiting value. For object store accounts and buckets, the limiting value is that of `quota_limit`, and for file systems it is that of `provisioned`. The operation can be either setting `hard_limit_enabled` when usage is higher than the limiting value, modifying the limiting value to a value under usage when `hard_limit_enabled` or recovering a destroyed bucket of an object store account that cause account's space usage to go over its hard `quota_limit`. + :param list[str] names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: ObjectStoreAccountResponse + If the method is called asynchronously, + returns the request thread. + """ + if ids is not None: + if not isinstance(ids, list): + ids = [ids] + if names is not None: + if not isinstance(names, list): + names = [names] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + # verify the required parameter 'object_store_account' is set + if object_store_account is None: + raise TypeError("Missing the required parameter `object_store_account` when calling `api214_object_store_accounts_patch`") + + collection_formats = {} + path_params = {} + + query_params = [] + if 'ids' in params: + query_params.append(('ids', params['ids'])) + collection_formats['ids'] = 'csv' + if 'ignore_usage' in params: + query_params.append(('ignore_usage', params['ignore_usage'])) + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + if 'object_store_account' in params: + body_params = params['object_store_account'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/object-store-accounts', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ObjectStoreAccountResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_object_store_accounts_post_with_http_info( + self, + names=None, # type: List[str] + x_request_id=None, # type: str + object_store_account=None, # type: models.ObjectStoreAccountPost + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.ObjectStoreAccountResponse + """POST object-store-accounts + + Create an object store account. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_object_store_accounts_post_with_http_info(names, async_req=True) + >>> result = thread.get() + + :param list[str] names: A comma-separated list of resource names. (required) + :param str x_request_id: Supplied by client during request or generated by server. + :param ObjectStoreAccountPost object_store_account: + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: ObjectStoreAccountResponse + If the method is called asynchronously, + returns the request thread. + """ + if names is not None: + if not isinstance(names, list): + names = [names] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + # verify the required parameter 'names' is set + if names is None: + raise TypeError("Missing the required parameter `names` when calling `api214_object_store_accounts_post`") + + collection_formats = {} + path_params = {} + + query_params = [] + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + if 'object_store_account' in params: + body_params = params['object_store_account'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/object-store-accounts', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ObjectStoreAccountResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) diff --git a/pypureclient/flashblade/FB_2_14/api/object_store_remote_credentials_api.py b/pypureclient/flashblade/FB_2_14/api/object_store_remote_credentials_api.py new file mode 100644 index 000000000..b53c01d18 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/api/object_store_remote_credentials_api.py @@ -0,0 +1,445 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import re + +# python 2 and python 3 compatibility library +import six +import uuid +from typing import List, Optional + +from .. import models + +class ObjectStoreRemoteCredentialsApi(object): + + def __init__(self, api_client): + self.api_client = api_client + + def api214_object_store_remote_credentials_delete_with_http_info( + self, + x_request_id=None, # type: str + ids=None, # type: List[str] + names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> None + """DELETE object-store-remote-credentials + + Delete object store remote credentials. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_object_store_remote_credentials_delete_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param list[str] ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :param list[str] names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: None + If the method is called asynchronously, + returns the request thread. + """ + if ids is not None: + if not isinstance(ids, list): + ids = [ids] + if names is not None: + if not isinstance(names, list): + names = [names] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + collection_formats = {} + path_params = {} + + query_params = [] + if 'ids' in params: + query_params.append(('ids', params['ids'])) + collection_formats['ids'] = 'csv' + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/object-store-remote-credentials', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_object_store_remote_credentials_get_with_http_info( + self, + x_request_id=None, # type: str + continuation_token=None, # type: str + filter=None, # type: str + ids=None, # type: List[str] + limit=None, # type: int + names=None, # type: List[str] + offset=None, # type: int + sort=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.ObjectStoreRemoteCredentialGetResp + """GET object-store-remote-credentials + + List object store remote credentials used by bucket replica links to access buckets on remote arrays or targets. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_object_store_remote_credentials_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param str continuation_token: An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result. + :param str filter: Exclude resources that don't match the specified criteria. + :param list[str] ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :param int limit: Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the maximum number, the request is still valid. In that case the server just returns the maximum number of items, disregarding the client's page size request. + :param list[str] names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :param int offset: The offset of the first resource to return from a collection. + :param list[str] sort: Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: ObjectStoreRemoteCredentialGetResp + If the method is called asynchronously, + returns the request thread. + """ + if ids is not None: + if not isinstance(ids, list): + ids = [ids] + if names is not None: + if not isinstance(names, list): + names = [names] + if sort is not None: + if not isinstance(sort, list): + sort = [sort] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + if 'limit' in params and params['limit'] < 1: + raise ValueError("Invalid value for parameter `limit` when calling `api214_object_store_remote_credentials_get`, must be a value greater than or equal to `1`") + if 'offset' in params and params['offset'] < 0: + raise ValueError("Invalid value for parameter `offset` when calling `api214_object_store_remote_credentials_get`, must be a value greater than or equal to `0`") + collection_formats = {} + path_params = {} + + query_params = [] + if 'continuation_token' in params: + query_params.append(('continuation_token', params['continuation_token'])) + if 'filter' in params: + query_params.append(('filter', params['filter'])) + if 'ids' in params: + query_params.append(('ids', params['ids'])) + collection_formats['ids'] = 'csv' + if 'limit' in params: + query_params.append(('limit', params['limit'])) + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + if 'offset' in params: + query_params.append(('offset', params['offset'])) + if 'sort' in params: + query_params.append(('sort', params['sort'])) + collection_formats['sort'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/object-store-remote-credentials', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ObjectStoreRemoteCredentialGetResp', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_object_store_remote_credentials_patch_with_http_info( + self, + remote_credentials=None, # type: models.ObjectStoreRemoteCredentials + x_request_id=None, # type: str + ids=None, # type: List[str] + names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.ObjectStoreRemoteCredentialsResp + """PATCH object-store-remote-credentials + + Rename and/or change the access key/secret key pair for object store remote credentials. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_object_store_remote_credentials_patch_with_http_info(remote_credentials, async_req=True) + >>> result = thread.get() + + :param ObjectStoreRemoteCredentials remote_credentials: (required) + :param str x_request_id: Supplied by client during request or generated by server. + :param list[str] ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :param list[str] names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: ObjectStoreRemoteCredentialsResp + If the method is called asynchronously, + returns the request thread. + """ + if ids is not None: + if not isinstance(ids, list): + ids = [ids] + if names is not None: + if not isinstance(names, list): + names = [names] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + # verify the required parameter 'remote_credentials' is set + if remote_credentials is None: + raise TypeError("Missing the required parameter `remote_credentials` when calling `api214_object_store_remote_credentials_patch`") + + collection_formats = {} + path_params = {} + + query_params = [] + if 'ids' in params: + query_params.append(('ids', params['ids'])) + collection_formats['ids'] = 'csv' + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + if 'remote_credentials' in params: + body_params = params['remote_credentials'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/object-store-remote-credentials', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ObjectStoreRemoteCredentialsResp', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_object_store_remote_credentials_post_with_http_info( + self, + names=None, # type: List[str] + remote_credentials=None, # type: models.ObjectStoreRemoteCredentialsPost + x_request_id=None, # type: str + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.ObjectStoreRemoteCredentialsResp + """POST object-store-remote-credentials + + Create object store remote credentials to set up bucket replicat links to a remote array or target. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_object_store_remote_credentials_post_with_http_info(names, remote_credentials, async_req=True) + >>> result = thread.get() + + :param list[str] names: A comma-separated list of resource names. (required) + :param ObjectStoreRemoteCredentialsPost remote_credentials: (required) + :param str x_request_id: Supplied by client during request or generated by server. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: ObjectStoreRemoteCredentialsResp + If the method is called asynchronously, + returns the request thread. + """ + if names is not None: + if not isinstance(names, list): + names = [names] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + # verify the required parameter 'names' is set + if names is None: + raise TypeError("Missing the required parameter `names` when calling `api214_object_store_remote_credentials_post`") + # verify the required parameter 'remote_credentials' is set + if remote_credentials is None: + raise TypeError("Missing the required parameter `remote_credentials` when calling `api214_object_store_remote_credentials_post`") + + collection_formats = {} + path_params = {} + + query_params = [] + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + if 'remote_credentials' in params: + body_params = params['remote_credentials'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/object-store-remote-credentials', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ObjectStoreRemoteCredentialsResp', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) diff --git a/pypureclient/flashblade/FB_2_14/api/object_store_users_api.py b/pypureclient/flashblade/FB_2_14/api/object_store_users_api.py new file mode 100644 index 000000000..1a55a4b81 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/api/object_store_users_api.py @@ -0,0 +1,701 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import re + +# python 2 and python 3 compatibility library +import six +import uuid +from typing import List, Optional + +from .. import models + +class ObjectStoreUsersApi(object): + + def __init__(self, api_client): + self.api_client = api_client + + def api214_object_store_users_delete_with_http_info( + self, + x_request_id=None, # type: str + ids=None, # type: List[str] + names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> None + """DELETE object-store-users + + Delete an object store user. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_object_store_users_delete_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param list[str] ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :param list[str] names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: None + If the method is called asynchronously, + returns the request thread. + """ + if ids is not None: + if not isinstance(ids, list): + ids = [ids] + if names is not None: + if not isinstance(names, list): + names = [names] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + collection_formats = {} + path_params = {} + + query_params = [] + if 'ids' in params: + query_params.append(('ids', params['ids'])) + collection_formats['ids'] = 'csv' + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/object-store-users', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_object_store_users_get_with_http_info( + self, + x_request_id=None, # type: str + continuation_token=None, # type: str + filter=None, # type: str + ids=None, # type: List[str] + limit=None, # type: int + names=None, # type: List[str] + offset=None, # type: int + sort=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.ObjectStoreUserGetResponse + """GET object-store-users + + List object store users and their attributes. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_object_store_users_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param str continuation_token: An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result. + :param str filter: Exclude resources that don't match the specified criteria. + :param list[str] ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :param int limit: Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the maximum number, the request is still valid. In that case the server just returns the maximum number of items, disregarding the client's page size request. + :param list[str] names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :param int offset: The offset of the first resource to return from a collection. + :param list[str] sort: Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: ObjectStoreUserGetResponse + If the method is called asynchronously, + returns the request thread. + """ + if ids is not None: + if not isinstance(ids, list): + ids = [ids] + if names is not None: + if not isinstance(names, list): + names = [names] + if sort is not None: + if not isinstance(sort, list): + sort = [sort] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + if 'limit' in params and params['limit'] < 1: + raise ValueError("Invalid value for parameter `limit` when calling `api214_object_store_users_get`, must be a value greater than or equal to `1`") + if 'offset' in params and params['offset'] < 0: + raise ValueError("Invalid value for parameter `offset` when calling `api214_object_store_users_get`, must be a value greater than or equal to `0`") + collection_formats = {} + path_params = {} + + query_params = [] + if 'continuation_token' in params: + query_params.append(('continuation_token', params['continuation_token'])) + if 'filter' in params: + query_params.append(('filter', params['filter'])) + if 'ids' in params: + query_params.append(('ids', params['ids'])) + collection_formats['ids'] = 'csv' + if 'limit' in params: + query_params.append(('limit', params['limit'])) + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + if 'offset' in params: + query_params.append(('offset', params['offset'])) + if 'sort' in params: + query_params.append(('sort', params['sort'])) + collection_formats['sort'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/object-store-users', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ObjectStoreUserGetResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_object_store_users_object_store_access_policies_delete_with_http_info( + self, + x_request_id=None, # type: str + member_ids=None, # type: List[str] + member_names=None, # type: List[str] + policy_ids=None, # type: List[str] + policy_names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> None + """DELETE object-store-users/object-store-access-policies + + Revoke an object store user’s access policy. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_object_store_users_object_store_access_policies_delete_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param list[str] member_ids: A comma-separated list of member IDs. If after filtering, there is not at least one resource that matches each of the elements of `member_ids`, then an error is returned. This cannot be provided together with the `member_names` query parameter. + :param list[str] member_names: A comma-separated list of member names. + :param list[str] policy_ids: A comma-separated list of policy IDs. If after filtering, there is not at least one resource that matches each of the elements of `policy_ids`, then an error is returned. This cannot be provided together with the `policy_names` query parameter. + :param list[str] policy_names: A comma-separated list of policy names. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: None + If the method is called asynchronously, + returns the request thread. + """ + if member_ids is not None: + if not isinstance(member_ids, list): + member_ids = [member_ids] + if member_names is not None: + if not isinstance(member_names, list): + member_names = [member_names] + if policy_ids is not None: + if not isinstance(policy_ids, list): + policy_ids = [policy_ids] + if policy_names is not None: + if not isinstance(policy_names, list): + policy_names = [policy_names] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + collection_formats = {} + path_params = {} + + query_params = [] + if 'member_ids' in params: + query_params.append(('member_ids', params['member_ids'])) + collection_formats['member_ids'] = 'csv' + if 'member_names' in params: + query_params.append(('member_names', params['member_names'])) + collection_formats['member_names'] = 'csv' + if 'policy_ids' in params: + query_params.append(('policy_ids', params['policy_ids'])) + collection_formats['policy_ids'] = 'csv' + if 'policy_names' in params: + query_params.append(('policy_names', params['policy_names'])) + collection_formats['policy_names'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/object-store-users/object-store-access-policies', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_object_store_users_object_store_access_policies_get_with_http_info( + self, + x_request_id=None, # type: str + continuation_token=None, # type: str + filter=None, # type: str + limit=None, # type: int + member_ids=None, # type: List[str] + member_names=None, # type: List[str] + offset=None, # type: int + policy_ids=None, # type: List[str] + policy_names=None, # type: List[str] + sort=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.PolicyMemberGetResponse + """GET object-store-users/object-store-access-policies + + List object store users and their access policies. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_object_store_users_object_store_access_policies_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param str continuation_token: An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result. + :param str filter: Exclude resources that don't match the specified criteria. + :param int limit: Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the maximum number, the request is still valid. In that case the server just returns the maximum number of items, disregarding the client's page size request. + :param list[str] member_ids: A comma-separated list of member IDs. If after filtering, there is not at least one resource that matches each of the elements of `member_ids`, then an error is returned. This cannot be provided together with the `member_names` query parameter. + :param list[str] member_names: A comma-separated list of member names. + :param int offset: The offset of the first resource to return from a collection. + :param list[str] policy_ids: A comma-separated list of policy IDs. If after filtering, there is not at least one resource that matches each of the elements of `policy_ids`, then an error is returned. This cannot be provided together with the `policy_names` query parameter. + :param list[str] policy_names: A comma-separated list of policy names. + :param list[str] sort: Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: PolicyMemberGetResponse + If the method is called asynchronously, + returns the request thread. + """ + if member_ids is not None: + if not isinstance(member_ids, list): + member_ids = [member_ids] + if member_names is not None: + if not isinstance(member_names, list): + member_names = [member_names] + if policy_ids is not None: + if not isinstance(policy_ids, list): + policy_ids = [policy_ids] + if policy_names is not None: + if not isinstance(policy_names, list): + policy_names = [policy_names] + if sort is not None: + if not isinstance(sort, list): + sort = [sort] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + if 'limit' in params and params['limit'] < 1: + raise ValueError("Invalid value for parameter `limit` when calling `api214_object_store_users_object_store_access_policies_get`, must be a value greater than or equal to `1`") + if 'offset' in params and params['offset'] < 0: + raise ValueError("Invalid value for parameter `offset` when calling `api214_object_store_users_object_store_access_policies_get`, must be a value greater than or equal to `0`") + collection_formats = {} + path_params = {} + + query_params = [] + if 'continuation_token' in params: + query_params.append(('continuation_token', params['continuation_token'])) + if 'filter' in params: + query_params.append(('filter', params['filter'])) + if 'limit' in params: + query_params.append(('limit', params['limit'])) + if 'member_ids' in params: + query_params.append(('member_ids', params['member_ids'])) + collection_formats['member_ids'] = 'csv' + if 'member_names' in params: + query_params.append(('member_names', params['member_names'])) + collection_formats['member_names'] = 'csv' + if 'offset' in params: + query_params.append(('offset', params['offset'])) + if 'policy_ids' in params: + query_params.append(('policy_ids', params['policy_ids'])) + collection_formats['policy_ids'] = 'csv' + if 'policy_names' in params: + query_params.append(('policy_names', params['policy_names'])) + collection_formats['policy_names'] = 'csv' + if 'sort' in params: + query_params.append(('sort', params['sort'])) + collection_formats['sort'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/object-store-users/object-store-access-policies', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PolicyMemberGetResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_object_store_users_object_store_access_policies_post_with_http_info( + self, + x_request_id=None, # type: str + member_ids=None, # type: List[str] + member_names=None, # type: List[str] + policy_ids=None, # type: List[str] + policy_names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.PolicyMemberResponse + """POST object-store-users/object-store-access-policies + + Grant access policies to an object store user. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_object_store_users_object_store_access_policies_post_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param list[str] member_ids: A comma-separated list of member IDs. If after filtering, there is not at least one resource that matches each of the elements of `member_ids`, then an error is returned. This cannot be provided together with the `member_names` query parameter. + :param list[str] member_names: A comma-separated list of member names. + :param list[str] policy_ids: A comma-separated list of policy IDs. If after filtering, there is not at least one resource that matches each of the elements of `policy_ids`, then an error is returned. This cannot be provided together with the `policy_names` query parameter. + :param list[str] policy_names: A comma-separated list of policy names. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: PolicyMemberResponse + If the method is called asynchronously, + returns the request thread. + """ + if member_ids is not None: + if not isinstance(member_ids, list): + member_ids = [member_ids] + if member_names is not None: + if not isinstance(member_names, list): + member_names = [member_names] + if policy_ids is not None: + if not isinstance(policy_ids, list): + policy_ids = [policy_ids] + if policy_names is not None: + if not isinstance(policy_names, list): + policy_names = [policy_names] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + collection_formats = {} + path_params = {} + + query_params = [] + if 'member_ids' in params: + query_params.append(('member_ids', params['member_ids'])) + collection_formats['member_ids'] = 'csv' + if 'member_names' in params: + query_params.append(('member_names', params['member_names'])) + collection_formats['member_names'] = 'csv' + if 'policy_ids' in params: + query_params.append(('policy_ids', params['policy_ids'])) + collection_formats['policy_ids'] = 'csv' + if 'policy_names' in params: + query_params.append(('policy_names', params['policy_names'])) + collection_formats['policy_names'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/object-store-users/object-store-access-policies', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PolicyMemberResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_object_store_users_post_with_http_info( + self, + names=None, # type: List[str] + x_request_id=None, # type: str + full_access=None, # type: bool + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.ObjectStoreUserResponse + """POST object-store-users + + Create object store users to administer object storage for an object store account. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_object_store_users_post_with_http_info(names, async_req=True) + >>> result = thread.get() + + :param list[str] names: A comma-separated list of resource names. (required) + :param str x_request_id: Supplied by client during request or generated by server. + :param bool full_access: If set to `true`, creates an object store user with full permissions. If set to `false`, creates an object store user with no permission. If not specified, defaults to `false`. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: ObjectStoreUserResponse + If the method is called asynchronously, + returns the request thread. + """ + if names is not None: + if not isinstance(names, list): + names = [names] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + # verify the required parameter 'names' is set + if names is None: + raise TypeError("Missing the required parameter `names` when calling `api214_object_store_users_post`") + + collection_formats = {} + path_params = {} + + query_params = [] + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + if 'full_access' in params: + query_params.append(('full_access', params['full_access'])) + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/object-store-users', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ObjectStoreUserResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) diff --git a/pypureclient/flashblade/FB_2_14/api/object_store_virtual_hosts_api.py b/pypureclient/flashblade/FB_2_14/api/object_store_virtual_hosts_api.py new file mode 100644 index 000000000..8466d8e2b --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/api/object_store_virtual_hosts_api.py @@ -0,0 +1,336 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import re + +# python 2 and python 3 compatibility library +import six +import uuid +from typing import List, Optional + +from .. import models + +class ObjectStoreVirtualHostsApi(object): + + def __init__(self, api_client): + self.api_client = api_client + + def api214_object_store_virtual_hosts_delete_with_http_info( + self, + x_request_id=None, # type: str + ids=None, # type: List[str] + names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> None + """DELETE object-store-virtual-hosts + + Delete an object store virtual host. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_object_store_virtual_hosts_delete_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param list[str] ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :param list[str] names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: None + If the method is called asynchronously, + returns the request thread. + """ + if ids is not None: + if not isinstance(ids, list): + ids = [ids] + if names is not None: + if not isinstance(names, list): + names = [names] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + collection_formats = {} + path_params = {} + + query_params = [] + if 'ids' in params: + query_params.append(('ids', params['ids'])) + collection_formats['ids'] = 'csv' + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/object-store-virtual-hosts', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_object_store_virtual_hosts_get_with_http_info( + self, + x_request_id=None, # type: str + continuation_token=None, # type: str + filter=None, # type: str + ids=None, # type: List[str] + limit=None, # type: int + names=None, # type: List[str] + offset=None, # type: int + sort=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.ObjectStoreVirtualHostGetResponse + """GET object-store-virtual-hosts + + List object store virtual hosts. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_object_store_virtual_hosts_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param str continuation_token: An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result. + :param str filter: Exclude resources that don't match the specified criteria. + :param list[str] ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :param int limit: Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the maximum number, the request is still valid. In that case the server just returns the maximum number of items, disregarding the client's page size request. + :param list[str] names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :param int offset: The offset of the first resource to return from a collection. + :param list[str] sort: Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: ObjectStoreVirtualHostGetResponse + If the method is called asynchronously, + returns the request thread. + """ + if ids is not None: + if not isinstance(ids, list): + ids = [ids] + if names is not None: + if not isinstance(names, list): + names = [names] + if sort is not None: + if not isinstance(sort, list): + sort = [sort] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + if 'limit' in params and params['limit'] < 1: + raise ValueError("Invalid value for parameter `limit` when calling `api214_object_store_virtual_hosts_get`, must be a value greater than or equal to `1`") + if 'offset' in params and params['offset'] < 0: + raise ValueError("Invalid value for parameter `offset` when calling `api214_object_store_virtual_hosts_get`, must be a value greater than or equal to `0`") + collection_formats = {} + path_params = {} + + query_params = [] + if 'continuation_token' in params: + query_params.append(('continuation_token', params['continuation_token'])) + if 'filter' in params: + query_params.append(('filter', params['filter'])) + if 'ids' in params: + query_params.append(('ids', params['ids'])) + collection_formats['ids'] = 'csv' + if 'limit' in params: + query_params.append(('limit', params['limit'])) + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + if 'offset' in params: + query_params.append(('offset', params['offset'])) + if 'sort' in params: + query_params.append(('sort', params['sort'])) + collection_formats['sort'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/object-store-virtual-hosts', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ObjectStoreVirtualHostGetResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_object_store_virtual_hosts_post_with_http_info( + self, + names=None, # type: List[str] + x_request_id=None, # type: str + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.ObjectStoreVirtualHostResponse + """POST object-store-virtual-hosts + + Create an object store virtual host. An example of a hostname is buckethost.example.com. A hostname cannot exceed 255 characters in length, it cannot be an IP address, only 10 hostnames are supported, supersets or subsets of existing hostnames with the same root are not allowed. The default hostname is s3.amazonaws.com and it cannot be deleted. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_object_store_virtual_hosts_post_with_http_info(names, async_req=True) + >>> result = thread.get() + + :param list[str] names: A comma-separated list of resource names. (required) + :param str x_request_id: Supplied by client during request or generated by server. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: ObjectStoreVirtualHostResponse + If the method is called asynchronously, + returns the request thread. + """ + if names is not None: + if not isinstance(names, list): + names = [names] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + # verify the required parameter 'names' is set + if names is None: + raise TypeError("Missing the required parameter `names` when calling `api214_object_store_virtual_hosts_post`") + + collection_formats = {} + path_params = {} + + query_params = [] + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/object-store-virtual-hosts', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ObjectStoreVirtualHostResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) diff --git a/pypureclient/flashblade/FB_2_14/api/policies___audit_for_file_systems_api.py b/pypureclient/flashblade/FB_2_14/api/policies___audit_for_file_systems_api.py new file mode 100644 index 000000000..60e346df4 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/api/policies___audit_for_file_systems_api.py @@ -0,0 +1,803 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import re + +# python 2 and python 3 compatibility library +import six +import uuid +from typing import List, Optional + +from .. import models + +class PoliciesAuditForFileSystemsApi(object): + + def __init__(self, api_client): + self.api_client = api_client + + def api214_audit_file_systems_policies_delete_with_http_info( + self, + x_request_id=None, # type: str + ids=None, # type: List[str] + names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> None + """DELETE audit-file-systems-policies + + Delete one or more audit policies. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_audit_file_systems_policies_delete_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param list[str] ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :param list[str] names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: None + If the method is called asynchronously, + returns the request thread. + """ + if ids is not None: + if not isinstance(ids, list): + ids = [ids] + if names is not None: + if not isinstance(names, list): + names = [names] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + collection_formats = {} + path_params = {} + + query_params = [] + if 'ids' in params: + query_params.append(('ids', params['ids'])) + collection_formats['ids'] = 'csv' + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/audit-file-systems-policies', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_audit_file_systems_policies_get_with_http_info( + self, + x_request_id=None, # type: str + continuation_token=None, # type: str + filter=None, # type: str + ids=None, # type: List[str] + limit=None, # type: int + names=None, # type: List[str] + offset=None, # type: int + sort=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.AuditFileSystemsPoliciesGetResponse + """GET audit-file-systems-policies + + Displays a list of audit policies for file systems. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_audit_file_systems_policies_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param str continuation_token: An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result. + :param str filter: Exclude resources that don't match the specified criteria. + :param list[str] ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :param int limit: Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the maximum number, the request is still valid. In that case the server just returns the maximum number of items, disregarding the client's page size request. + :param list[str] names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :param int offset: The offset of the first resource to return from a collection. + :param list[str] sort: Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: AuditFileSystemsPoliciesGetResponse + If the method is called asynchronously, + returns the request thread. + """ + if ids is not None: + if not isinstance(ids, list): + ids = [ids] + if names is not None: + if not isinstance(names, list): + names = [names] + if sort is not None: + if not isinstance(sort, list): + sort = [sort] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + if 'limit' in params and params['limit'] < 1: + raise ValueError("Invalid value for parameter `limit` when calling `api214_audit_file_systems_policies_get`, must be a value greater than or equal to `1`") + if 'offset' in params and params['offset'] < 0: + raise ValueError("Invalid value for parameter `offset` when calling `api214_audit_file_systems_policies_get`, must be a value greater than or equal to `0`") + collection_formats = {} + path_params = {} + + query_params = [] + if 'continuation_token' in params: + query_params.append(('continuation_token', params['continuation_token'])) + if 'filter' in params: + query_params.append(('filter', params['filter'])) + if 'ids' in params: + query_params.append(('ids', params['ids'])) + collection_formats['ids'] = 'csv' + if 'limit' in params: + query_params.append(('limit', params['limit'])) + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + if 'offset' in params: + query_params.append(('offset', params['offset'])) + if 'sort' in params: + query_params.append(('sort', params['sort'])) + collection_formats['sort'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/audit-file-systems-policies', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='AuditFileSystemsPoliciesGetResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_audit_file_systems_policies_members_delete_with_http_info( + self, + x_request_id=None, # type: str + member_ids=None, # type: List[str] + member_names=None, # type: List[str] + policy_ids=None, # type: List[str] + policy_names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> None + """DELETE audit-file-systems-policies/members + + Remove the audit policy mapped to a file system. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_audit_file_systems_policies_members_delete_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param list[str] member_ids: A comma-separated list of member IDs. If after filtering, there is not at least one resource that matches each of the elements of `member_ids`, then an error is returned. This cannot be provided together with the `member_names` query parameter. + :param list[str] member_names: A comma-separated list of member names. + :param list[str] policy_ids: A comma-separated list of policy IDs. If after filtering, there is not at least one resource that matches each of the elements of `policy_ids`, then an error is returned. This cannot be provided together with the `policy_names` query parameter. + :param list[str] policy_names: A comma-separated list of policy names. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: None + If the method is called asynchronously, + returns the request thread. + """ + if member_ids is not None: + if not isinstance(member_ids, list): + member_ids = [member_ids] + if member_names is not None: + if not isinstance(member_names, list): + member_names = [member_names] + if policy_ids is not None: + if not isinstance(policy_ids, list): + policy_ids = [policy_ids] + if policy_names is not None: + if not isinstance(policy_names, list): + policy_names = [policy_names] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + collection_formats = {} + path_params = {} + + query_params = [] + if 'member_ids' in params: + query_params.append(('member_ids', params['member_ids'])) + collection_formats['member_ids'] = 'csv' + if 'member_names' in params: + query_params.append(('member_names', params['member_names'])) + collection_formats['member_names'] = 'csv' + if 'policy_ids' in params: + query_params.append(('policy_ids', params['policy_ids'])) + collection_formats['policy_ids'] = 'csv' + if 'policy_names' in params: + query_params.append(('policy_names', params['policy_names'])) + collection_formats['policy_names'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/audit-file-systems-policies/members', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_audit_file_systems_policies_members_get_with_http_info( + self, + x_request_id=None, # type: str + continuation_token=None, # type: str + filter=None, # type: str + limit=None, # type: int + member_ids=None, # type: List[str] + member_names=None, # type: List[str] + offset=None, # type: int + policy_ids=None, # type: List[str] + policy_names=None, # type: List[str] + sort=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.AuditFileSystemsPoliciesMembersGetResponse + """GET audit-file-systems-policies/members + + List file systems mapped to a audit policy. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_audit_file_systems_policies_members_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param str continuation_token: An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result. + :param str filter: Exclude resources that don't match the specified criteria. + :param int limit: Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the maximum number, the request is still valid. In that case the server just returns the maximum number of items, disregarding the client's page size request. + :param list[str] member_ids: A comma-separated list of member IDs. If after filtering, there is not at least one resource that matches each of the elements of `member_ids`, then an error is returned. This cannot be provided together with the `member_names` query parameter. + :param list[str] member_names: A comma-separated list of member names. + :param int offset: The offset of the first resource to return from a collection. + :param list[str] policy_ids: A comma-separated list of policy IDs. If after filtering, there is not at least one resource that matches each of the elements of `policy_ids`, then an error is returned. This cannot be provided together with the `policy_names` query parameter. + :param list[str] policy_names: A comma-separated list of policy names. + :param list[str] sort: Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: AuditFileSystemsPoliciesMembersGetResponse + If the method is called asynchronously, + returns the request thread. + """ + if member_ids is not None: + if not isinstance(member_ids, list): + member_ids = [member_ids] + if member_names is not None: + if not isinstance(member_names, list): + member_names = [member_names] + if policy_ids is not None: + if not isinstance(policy_ids, list): + policy_ids = [policy_ids] + if policy_names is not None: + if not isinstance(policy_names, list): + policy_names = [policy_names] + if sort is not None: + if not isinstance(sort, list): + sort = [sort] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + if 'limit' in params and params['limit'] < 1: + raise ValueError("Invalid value for parameter `limit` when calling `api214_audit_file_systems_policies_members_get`, must be a value greater than or equal to `1`") + if 'offset' in params and params['offset'] < 0: + raise ValueError("Invalid value for parameter `offset` when calling `api214_audit_file_systems_policies_members_get`, must be a value greater than or equal to `0`") + collection_formats = {} + path_params = {} + + query_params = [] + if 'continuation_token' in params: + query_params.append(('continuation_token', params['continuation_token'])) + if 'filter' in params: + query_params.append(('filter', params['filter'])) + if 'limit' in params: + query_params.append(('limit', params['limit'])) + if 'member_ids' in params: + query_params.append(('member_ids', params['member_ids'])) + collection_formats['member_ids'] = 'csv' + if 'member_names' in params: + query_params.append(('member_names', params['member_names'])) + collection_formats['member_names'] = 'csv' + if 'offset' in params: + query_params.append(('offset', params['offset'])) + if 'policy_ids' in params: + query_params.append(('policy_ids', params['policy_ids'])) + collection_formats['policy_ids'] = 'csv' + if 'policy_names' in params: + query_params.append(('policy_names', params['policy_names'])) + collection_formats['policy_names'] = 'csv' + if 'sort' in params: + query_params.append(('sort', params['sort'])) + collection_formats['sort'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/audit-file-systems-policies/members', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='AuditFileSystemsPoliciesMembersGetResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_audit_file_systems_policies_members_post_with_http_info( + self, + x_request_id=None, # type: str + member_ids=None, # type: List[str] + member_names=None, # type: List[str] + policy_ids=None, # type: List[str] + policy_names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.AuditFileSystemsPoliciesMembersResponse + """POST audit-file-systems-policies/members + + Map a file system to a audit policy. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_audit_file_systems_policies_members_post_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param list[str] member_ids: A comma-separated list of member IDs. If after filtering, there is not at least one resource that matches each of the elements of `member_ids`, then an error is returned. This cannot be provided together with the `member_names` query parameter. + :param list[str] member_names: A comma-separated list of member names. + :param list[str] policy_ids: A comma-separated list of policy IDs. If after filtering, there is not at least one resource that matches each of the elements of `policy_ids`, then an error is returned. This cannot be provided together with the `policy_names` query parameter. + :param list[str] policy_names: A comma-separated list of policy names. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: AuditFileSystemsPoliciesMembersResponse + If the method is called asynchronously, + returns the request thread. + """ + if member_ids is not None: + if not isinstance(member_ids, list): + member_ids = [member_ids] + if member_names is not None: + if not isinstance(member_names, list): + member_names = [member_names] + if policy_ids is not None: + if not isinstance(policy_ids, list): + policy_ids = [policy_ids] + if policy_names is not None: + if not isinstance(policy_names, list): + policy_names = [policy_names] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + collection_formats = {} + path_params = {} + + query_params = [] + if 'member_ids' in params: + query_params.append(('member_ids', params['member_ids'])) + collection_formats['member_ids'] = 'csv' + if 'member_names' in params: + query_params.append(('member_names', params['member_names'])) + collection_formats['member_names'] = 'csv' + if 'policy_ids' in params: + query_params.append(('policy_ids', params['policy_ids'])) + collection_formats['policy_ids'] = 'csv' + if 'policy_names' in params: + query_params.append(('policy_names', params['policy_names'])) + collection_formats['policy_names'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/audit-file-systems-policies/members', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='AuditFileSystemsPoliciesMembersResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_audit_file_systems_policies_patch_with_http_info( + self, + policy=None, # type: models.AuditFileSystemsPoliciesPatch + x_request_id=None, # type: str + ids=None, # type: List[str] + names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.AuditFileSystemsPoliciesResponse + """PATCH audit-file-systems-policies + + Modify an existing audit policy's attributes. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_audit_file_systems_policies_patch_with_http_info(policy, async_req=True) + >>> result = thread.get() + + :param AuditFileSystemsPoliciesPatch policy: (required) + :param str x_request_id: Supplied by client during request or generated by server. + :param list[str] ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :param list[str] names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: AuditFileSystemsPoliciesResponse + If the method is called asynchronously, + returns the request thread. + """ + if ids is not None: + if not isinstance(ids, list): + ids = [ids] + if names is not None: + if not isinstance(names, list): + names = [names] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + # verify the required parameter 'policy' is set + if policy is None: + raise TypeError("Missing the required parameter `policy` when calling `api214_audit_file_systems_policies_patch`") + + collection_formats = {} + path_params = {} + + query_params = [] + if 'ids' in params: + query_params.append(('ids', params['ids'])) + collection_formats['ids'] = 'csv' + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + if 'policy' in params: + body_params = params['policy'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/audit-file-systems-policies', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='AuditFileSystemsPoliciesResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_audit_file_systems_policies_post_with_http_info( + self, + names=None, # type: List[str] + x_request_id=None, # type: str + policy=None, # type: models.AuditFileSystemsPoliciesPost + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.AuditFileSystemsPoliciesResponse + """POST audit-file-systems-policies + + Create a new audit policy for file systems. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_audit_file_systems_policies_post_with_http_info(names, async_req=True) + >>> result = thread.get() + + :param list[str] names: A comma-separated list of resource names. (required) + :param str x_request_id: Supplied by client during request or generated by server. + :param AuditFileSystemsPoliciesPost policy: + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: AuditFileSystemsPoliciesResponse + If the method is called asynchronously, + returns the request thread. + """ + if names is not None: + if not isinstance(names, list): + names = [names] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + # verify the required parameter 'names' is set + if names is None: + raise TypeError("Missing the required parameter `names` when calling `api214_audit_file_systems_policies_post`") + + collection_formats = {} + path_params = {} + + query_params = [] + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + if 'policy' in params: + body_params = params['policy'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/audit-file-systems-policies', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='AuditFileSystemsPoliciesResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) diff --git a/pypureclient/flashblade/FB_2_14/api/policies___network_access_api.py b/pypureclient/flashblade/FB_2_14/api/policies___network_access_api.py new file mode 100644 index 000000000..739342b32 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/api/policies___network_access_api.py @@ -0,0 +1,878 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import re + +# python 2 and python 3 compatibility library +import six +import uuid +from typing import List, Optional + +from .. import models + +class PoliciesNetworkAccessApi(object): + + def __init__(self, api_client): + self.api_client = api_client + + def api214_network_access_policies_get_with_http_info( + self, + x_request_id=None, # type: str + continuation_token=None, # type: str + filter=None, # type: str + ids=None, # type: List[str] + limit=None, # type: int + names=None, # type: List[str] + offset=None, # type: int + sort=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.NetworkAccessPolicyGetResponse + """GET network-access-policies + + Displays a list of network access policies. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_network_access_policies_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param str continuation_token: An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result. + :param str filter: Exclude resources that don't match the specified criteria. + :param list[str] ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :param int limit: Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the maximum number, the request is still valid. In that case the server just returns the maximum number of items, disregarding the client's page size request. + :param list[str] names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :param int offset: The offset of the first resource to return from a collection. + :param list[str] sort: Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: NetworkAccessPolicyGetResponse + If the method is called asynchronously, + returns the request thread. + """ + if ids is not None: + if not isinstance(ids, list): + ids = [ids] + if names is not None: + if not isinstance(names, list): + names = [names] + if sort is not None: + if not isinstance(sort, list): + sort = [sort] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + if 'limit' in params and params['limit'] < 1: + raise ValueError("Invalid value for parameter `limit` when calling `api214_network_access_policies_get`, must be a value greater than or equal to `1`") + if 'offset' in params and params['offset'] < 0: + raise ValueError("Invalid value for parameter `offset` when calling `api214_network_access_policies_get`, must be a value greater than or equal to `0`") + collection_formats = {} + path_params = {} + + query_params = [] + if 'continuation_token' in params: + query_params.append(('continuation_token', params['continuation_token'])) + if 'filter' in params: + query_params.append(('filter', params['filter'])) + if 'ids' in params: + query_params.append(('ids', params['ids'])) + collection_formats['ids'] = 'csv' + if 'limit' in params: + query_params.append(('limit', params['limit'])) + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + if 'offset' in params: + query_params.append(('offset', params['offset'])) + if 'sort' in params: + query_params.append(('sort', params['sort'])) + collection_formats['sort'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/network-access-policies', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='NetworkAccessPolicyGetResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_network_access_policies_members_get_with_http_info( + self, + x_request_id=None, # type: str + continuation_token=None, # type: str + filter=None, # type: str + limit=None, # type: int + member_ids=None, # type: List[str] + member_names=None, # type: List[str] + offset=None, # type: int + policy_ids=None, # type: List[str] + policy_names=None, # type: List[str] + sort=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.PolicyMemberGetResponse + """GET network-access-policies/members + + List network access policies mapped to different configurations on the array. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_network_access_policies_members_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param str continuation_token: An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result. + :param str filter: Exclude resources that don't match the specified criteria. + :param int limit: Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the maximum number, the request is still valid. In that case the server just returns the maximum number of items, disregarding the client's page size request. + :param list[str] member_ids: A comma-separated list of member IDs. If after filtering, there is not at least one resource that matches each of the elements of `member_ids`, then an error is returned. This cannot be provided together with the `member_names` query parameter. + :param list[str] member_names: A comma-separated list of member names. + :param int offset: The offset of the first resource to return from a collection. + :param list[str] policy_ids: A comma-separated list of policy IDs. If after filtering, there is not at least one resource that matches each of the elements of `policy_ids`, then an error is returned. This cannot be provided together with the `policy_names` query parameter. + :param list[str] policy_names: A comma-separated list of policy names. + :param list[str] sort: Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: PolicyMemberGetResponse + If the method is called asynchronously, + returns the request thread. + """ + if member_ids is not None: + if not isinstance(member_ids, list): + member_ids = [member_ids] + if member_names is not None: + if not isinstance(member_names, list): + member_names = [member_names] + if policy_ids is not None: + if not isinstance(policy_ids, list): + policy_ids = [policy_ids] + if policy_names is not None: + if not isinstance(policy_names, list): + policy_names = [policy_names] + if sort is not None: + if not isinstance(sort, list): + sort = [sort] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + if 'limit' in params and params['limit'] < 1: + raise ValueError("Invalid value for parameter `limit` when calling `api214_network_access_policies_members_get`, must be a value greater than or equal to `1`") + if 'offset' in params and params['offset'] < 0: + raise ValueError("Invalid value for parameter `offset` when calling `api214_network_access_policies_members_get`, must be a value greater than or equal to `0`") + collection_formats = {} + path_params = {} + + query_params = [] + if 'continuation_token' in params: + query_params.append(('continuation_token', params['continuation_token'])) + if 'filter' in params: + query_params.append(('filter', params['filter'])) + if 'limit' in params: + query_params.append(('limit', params['limit'])) + if 'member_ids' in params: + query_params.append(('member_ids', params['member_ids'])) + collection_formats['member_ids'] = 'csv' + if 'member_names' in params: + query_params.append(('member_names', params['member_names'])) + collection_formats['member_names'] = 'csv' + if 'offset' in params: + query_params.append(('offset', params['offset'])) + if 'policy_ids' in params: + query_params.append(('policy_ids', params['policy_ids'])) + collection_formats['policy_ids'] = 'csv' + if 'policy_names' in params: + query_params.append(('policy_names', params['policy_names'])) + collection_formats['policy_names'] = 'csv' + if 'sort' in params: + query_params.append(('sort', params['sort'])) + collection_formats['sort'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/network-access-policies/members', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PolicyMemberGetResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_network_access_policies_patch_with_http_info( + self, + policy=None, # type: models.NetworkAccessPolicy + x_request_id=None, # type: str + ids=None, # type: List[str] + names=None, # type: List[str] + versions=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.NetworkAccessPolicyResponse + """PATCH network-access-policies + + Modify an existing network access policy's attributes. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_network_access_policies_patch_with_http_info(policy, async_req=True) + >>> result = thread.get() + + :param NetworkAccessPolicy policy: (required) + :param str x_request_id: Supplied by client during request or generated by server. + :param list[str] ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :param list[str] names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :param list[str] versions: A comma-separated list of versions. This is an optional query param used for concurrency control. The ordering should match the names or ids query param. This will fail with a 412 Precondition failed if the resource was changed and the current version of the resource doesn't match the value in the query param. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: NetworkAccessPolicyResponse + If the method is called asynchronously, + returns the request thread. + """ + if ids is not None: + if not isinstance(ids, list): + ids = [ids] + if names is not None: + if not isinstance(names, list): + names = [names] + if versions is not None: + if not isinstance(versions, list): + versions = [versions] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + # verify the required parameter 'policy' is set + if policy is None: + raise TypeError("Missing the required parameter `policy` when calling `api214_network_access_policies_patch`") + + collection_formats = {} + path_params = {} + + query_params = [] + if 'ids' in params: + query_params.append(('ids', params['ids'])) + collection_formats['ids'] = 'csv' + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + if 'versions' in params: + query_params.append(('versions', params['versions'])) + collection_formats['versions'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + if 'policy' in params: + body_params = params['policy'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/network-access-policies', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='NetworkAccessPolicyResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_network_access_policies_rules_delete_with_http_info( + self, + x_request_id=None, # type: str + ids=None, # type: List[str] + names=None, # type: List[str] + versions=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> None + """DELETE network-access-policies/rules + + Delete one or more network access policy rules. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_network_access_policies_rules_delete_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param list[str] ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :param list[str] names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :param list[str] versions: A comma-separated list of versions. This is an optional query param used for concurrency control. The ordering should match the names or ids query param. This will fail with a 412 Precondition failed if the resource was changed and the current version of the resource doesn't match the value in the query param. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: None + If the method is called asynchronously, + returns the request thread. + """ + if ids is not None: + if not isinstance(ids, list): + ids = [ids] + if names is not None: + if not isinstance(names, list): + names = [names] + if versions is not None: + if not isinstance(versions, list): + versions = [versions] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + collection_formats = {} + path_params = {} + + query_params = [] + if 'ids' in params: + query_params.append(('ids', params['ids'])) + collection_formats['ids'] = 'csv' + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + if 'versions' in params: + query_params.append(('versions', params['versions'])) + collection_formats['versions'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/network-access-policies/rules', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_network_access_policies_rules_get_with_http_info( + self, + x_request_id=None, # type: str + continuation_token=None, # type: str + filter=None, # type: str + ids=None, # type: List[str] + limit=None, # type: int + names=None, # type: List[str] + offset=None, # type: int + policy_ids=None, # type: List[str] + policy_names=None, # type: List[str] + sort=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.NetworkAccessPolicyRuleGetResponse + """GET network-access-policies/rules + + Displays a list of network access policy rules. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_network_access_policies_rules_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param str continuation_token: An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result. + :param str filter: Exclude resources that don't match the specified criteria. + :param list[str] ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :param int limit: Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the maximum number, the request is still valid. In that case the server just returns the maximum number of items, disregarding the client's page size request. + :param list[str] names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :param int offset: The offset of the first resource to return from a collection. + :param list[str] policy_ids: A comma-separated list of policy IDs. If after filtering, there is not at least one resource that matches each of the elements of `policy_ids`, then an error is returned. This cannot be provided together with the `policy_names` query parameter. + :param list[str] policy_names: A comma-separated list of policy names. + :param list[str] sort: Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: NetworkAccessPolicyRuleGetResponse + If the method is called asynchronously, + returns the request thread. + """ + if ids is not None: + if not isinstance(ids, list): + ids = [ids] + if names is not None: + if not isinstance(names, list): + names = [names] + if policy_ids is not None: + if not isinstance(policy_ids, list): + policy_ids = [policy_ids] + if policy_names is not None: + if not isinstance(policy_names, list): + policy_names = [policy_names] + if sort is not None: + if not isinstance(sort, list): + sort = [sort] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + if 'limit' in params and params['limit'] < 1: + raise ValueError("Invalid value for parameter `limit` when calling `api214_network_access_policies_rules_get`, must be a value greater than or equal to `1`") + if 'offset' in params and params['offset'] < 0: + raise ValueError("Invalid value for parameter `offset` when calling `api214_network_access_policies_rules_get`, must be a value greater than or equal to `0`") + collection_formats = {} + path_params = {} + + query_params = [] + if 'continuation_token' in params: + query_params.append(('continuation_token', params['continuation_token'])) + if 'filter' in params: + query_params.append(('filter', params['filter'])) + if 'ids' in params: + query_params.append(('ids', params['ids'])) + collection_formats['ids'] = 'csv' + if 'limit' in params: + query_params.append(('limit', params['limit'])) + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + if 'offset' in params: + query_params.append(('offset', params['offset'])) + if 'policy_ids' in params: + query_params.append(('policy_ids', params['policy_ids'])) + collection_formats['policy_ids'] = 'csv' + if 'policy_names' in params: + query_params.append(('policy_names', params['policy_names'])) + collection_formats['policy_names'] = 'csv' + if 'sort' in params: + query_params.append(('sort', params['sort'])) + collection_formats['sort'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/network-access-policies/rules', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='NetworkAccessPolicyRuleGetResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_network_access_policies_rules_patch_with_http_info( + self, + rule=None, # type: models.NetworkAccessPolicyRule + x_request_id=None, # type: str + before_rule_id=None, # type: str + before_rule_name=None, # type: str + ids=None, # type: List[str] + names=None, # type: List[str] + versions=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.NetworkAccessPolicyRuleResponse + """PATCH network-access-policies/rules + + Modify an existing network access policy rule. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_network_access_policies_rules_patch_with_http_info(rule, async_req=True) + >>> result = thread.get() + + :param NetworkAccessPolicyRule rule: (required) + :param str x_request_id: Supplied by client during request or generated by server. + :param str before_rule_id: The id of the rule to insert or move a rule before. This cannot be provided together with the `before_rule_name` query parameter. + :param str before_rule_name: The name of the rule to insert or move a rule before. This cannot be provided together with the `before_rule_id` query parameter. + :param list[str] ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :param list[str] names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :param list[str] versions: A comma-separated list of versions. This is an optional query param used for concurrency control. The ordering should match the names or ids query param. This will fail with a 412 Precondition failed if the resource was changed and the current version of the resource doesn't match the value in the query param. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: NetworkAccessPolicyRuleResponse + If the method is called asynchronously, + returns the request thread. + """ + if ids is not None: + if not isinstance(ids, list): + ids = [ids] + if names is not None: + if not isinstance(names, list): + names = [names] + if versions is not None: + if not isinstance(versions, list): + versions = [versions] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + # verify the required parameter 'rule' is set + if rule is None: + raise TypeError("Missing the required parameter `rule` when calling `api214_network_access_policies_rules_patch`") + + collection_formats = {} + path_params = {} + + query_params = [] + if 'before_rule_id' in params: + query_params.append(('before_rule_id', params['before_rule_id'])) + if 'before_rule_name' in params: + query_params.append(('before_rule_name', params['before_rule_name'])) + if 'ids' in params: + query_params.append(('ids', params['ids'])) + collection_formats['ids'] = 'csv' + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + if 'versions' in params: + query_params.append(('versions', params['versions'])) + collection_formats['versions'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + if 'rule' in params: + body_params = params['rule'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/network-access-policies/rules', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='NetworkAccessPolicyRuleResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_network_access_policies_rules_post_with_http_info( + self, + rule=None, # type: models.NetworkAccessPolicyRulePost + x_request_id=None, # type: str + before_rule_id=None, # type: str + before_rule_name=None, # type: str + policy_ids=None, # type: List[str] + policy_names=None, # type: List[str] + versions=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.NetworkAccessPolicyRuleResponse + """POST network-access-policies/rules + + Create a new network access policy rule. Either `policy_ids` or `policy_names` parameter is required. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_network_access_policies_rules_post_with_http_info(rule, async_req=True) + >>> result = thread.get() + + :param NetworkAccessPolicyRulePost rule: (required) + :param str x_request_id: Supplied by client during request or generated by server. + :param str before_rule_id: The id of the rule to insert or move a rule before. This cannot be provided together with the `before_rule_name` query parameter. + :param str before_rule_name: The name of the rule to insert or move a rule before. This cannot be provided together with the `before_rule_id` query parameter. + :param list[str] policy_ids: A comma-separated list of policy IDs. If after filtering, there is not at least one resource that matches each of the elements of `policy_ids`, then an error is returned. This cannot be provided together with the `policy_names` query parameter. + :param list[str] policy_names: A comma-separated list of policy names. + :param list[str] versions: A comma-separated list of versions. This is an optional query param used for concurrency control. The ordering should match the names or ids query param. This will fail with a 412 Precondition failed if the resource was changed and the current version of the resource doesn't match the value in the query param. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: NetworkAccessPolicyRuleResponse + If the method is called asynchronously, + returns the request thread. + """ + if policy_ids is not None: + if not isinstance(policy_ids, list): + policy_ids = [policy_ids] + if policy_names is not None: + if not isinstance(policy_names, list): + policy_names = [policy_names] + if versions is not None: + if not isinstance(versions, list): + versions = [versions] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + # verify the required parameter 'rule' is set + if rule is None: + raise TypeError("Missing the required parameter `rule` when calling `api214_network_access_policies_rules_post`") + + collection_formats = {} + path_params = {} + + query_params = [] + if 'before_rule_id' in params: + query_params.append(('before_rule_id', params['before_rule_id'])) + if 'before_rule_name' in params: + query_params.append(('before_rule_name', params['before_rule_name'])) + if 'policy_ids' in params: + query_params.append(('policy_ids', params['policy_ids'])) + collection_formats['policy_ids'] = 'csv' + if 'policy_names' in params: + query_params.append(('policy_names', params['policy_names'])) + collection_formats['policy_names'] = 'csv' + if 'versions' in params: + query_params.append(('versions', params['versions'])) + collection_formats['versions'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + if 'rule' in params: + body_params = params['rule'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/network-access-policies/rules', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='NetworkAccessPolicyRuleResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) diff --git a/pypureclient/flashblade/FB_2_14/api/policies___nfs_api.py b/pypureclient/flashblade/FB_2_14/api/policies___nfs_api.py new file mode 100644 index 000000000..59853d9c2 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/api/policies___nfs_api.py @@ -0,0 +1,936 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import re + +# python 2 and python 3 compatibility library +import six +import uuid +from typing import List, Optional + +from .. import models + +class PoliciesNFSApi(object): + + def __init__(self, api_client): + self.api_client = api_client + + def api214_nfs_export_policies_delete_with_http_info( + self, + x_request_id=None, # type: str + ids=None, # type: List[str] + names=None, # type: List[str] + versions=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> None + """DELETE nfs-export-policies + + Delete one or more NFS export policies. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_nfs_export_policies_delete_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param list[str] ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :param list[str] names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :param list[str] versions: A comma-separated list of versions. This is an optional query param used for concurrency control. The ordering should match the names or ids query param. This will fail with a 412 Precondition failed if the resource was changed and the current version of the resource doesn't match the value in the query param. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: None + If the method is called asynchronously, + returns the request thread. + """ + if ids is not None: + if not isinstance(ids, list): + ids = [ids] + if names is not None: + if not isinstance(names, list): + names = [names] + if versions is not None: + if not isinstance(versions, list): + versions = [versions] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + collection_formats = {} + path_params = {} + + query_params = [] + if 'ids' in params: + query_params.append(('ids', params['ids'])) + collection_formats['ids'] = 'csv' + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + if 'versions' in params: + query_params.append(('versions', params['versions'])) + collection_formats['versions'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/nfs-export-policies', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_nfs_export_policies_get_with_http_info( + self, + x_request_id=None, # type: str + continuation_token=None, # type: str + filter=None, # type: str + ids=None, # type: List[str] + limit=None, # type: int + names=None, # type: List[str] + offset=None, # type: int + sort=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.NfsExportPolicyGetResponse + """GET nfs-export-policies + + Displays a list of NFS export policies. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_nfs_export_policies_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param str continuation_token: An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result. + :param str filter: Exclude resources that don't match the specified criteria. + :param list[str] ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :param int limit: Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the maximum number, the request is still valid. In that case the server just returns the maximum number of items, disregarding the client's page size request. + :param list[str] names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :param int offset: The offset of the first resource to return from a collection. + :param list[str] sort: Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: NfsExportPolicyGetResponse + If the method is called asynchronously, + returns the request thread. + """ + if ids is not None: + if not isinstance(ids, list): + ids = [ids] + if names is not None: + if not isinstance(names, list): + names = [names] + if sort is not None: + if not isinstance(sort, list): + sort = [sort] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + if 'limit' in params and params['limit'] < 1: + raise ValueError("Invalid value for parameter `limit` when calling `api214_nfs_export_policies_get`, must be a value greater than or equal to `1`") + if 'offset' in params and params['offset'] < 0: + raise ValueError("Invalid value for parameter `offset` when calling `api214_nfs_export_policies_get`, must be a value greater than or equal to `0`") + collection_formats = {} + path_params = {} + + query_params = [] + if 'continuation_token' in params: + query_params.append(('continuation_token', params['continuation_token'])) + if 'filter' in params: + query_params.append(('filter', params['filter'])) + if 'ids' in params: + query_params.append(('ids', params['ids'])) + collection_formats['ids'] = 'csv' + if 'limit' in params: + query_params.append(('limit', params['limit'])) + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + if 'offset' in params: + query_params.append(('offset', params['offset'])) + if 'sort' in params: + query_params.append(('sort', params['sort'])) + collection_formats['sort'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/nfs-export-policies', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='NfsExportPolicyGetResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_nfs_export_policies_patch_with_http_info( + self, + policy=None, # type: models.NfsExportPolicy + x_request_id=None, # type: str + ids=None, # type: List[str] + names=None, # type: List[str] + versions=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.NfsExportPolicyResponse + """PATCH nfs-export-policies + + Modify an existing NFS export policy's attributes. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_nfs_export_policies_patch_with_http_info(policy, async_req=True) + >>> result = thread.get() + + :param NfsExportPolicy policy: (required) + :param str x_request_id: Supplied by client during request or generated by server. + :param list[str] ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :param list[str] names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :param list[str] versions: A comma-separated list of versions. This is an optional query param used for concurrency control. The ordering should match the names or ids query param. This will fail with a 412 Precondition failed if the resource was changed and the current version of the resource doesn't match the value in the query param. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: NfsExportPolicyResponse + If the method is called asynchronously, + returns the request thread. + """ + if ids is not None: + if not isinstance(ids, list): + ids = [ids] + if names is not None: + if not isinstance(names, list): + names = [names] + if versions is not None: + if not isinstance(versions, list): + versions = [versions] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + # verify the required parameter 'policy' is set + if policy is None: + raise TypeError("Missing the required parameter `policy` when calling `api214_nfs_export_policies_patch`") + + collection_formats = {} + path_params = {} + + query_params = [] + if 'ids' in params: + query_params.append(('ids', params['ids'])) + collection_formats['ids'] = 'csv' + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + if 'versions' in params: + query_params.append(('versions', params['versions'])) + collection_formats['versions'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + if 'policy' in params: + body_params = params['policy'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/nfs-export-policies', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='NfsExportPolicyResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_nfs_export_policies_post_with_http_info( + self, + names=None, # type: List[str] + x_request_id=None, # type: str + policy=None, # type: models.NfsExportPolicyPost + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.NfsExportPolicyResponse + """POST nfs-export-policies + + Create a new NFS export policy. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_nfs_export_policies_post_with_http_info(names, async_req=True) + >>> result = thread.get() + + :param list[str] names: A comma-separated list of resource names. (required) + :param str x_request_id: Supplied by client during request or generated by server. + :param NfsExportPolicyPost policy: + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: NfsExportPolicyResponse + If the method is called asynchronously, + returns the request thread. + """ + if names is not None: + if not isinstance(names, list): + names = [names] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + # verify the required parameter 'names' is set + if names is None: + raise TypeError("Missing the required parameter `names` when calling `api214_nfs_export_policies_post`") + + collection_formats = {} + path_params = {} + + query_params = [] + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + if 'policy' in params: + body_params = params['policy'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/nfs-export-policies', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='NfsExportPolicyResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_nfs_export_policies_rules_delete_with_http_info( + self, + x_request_id=None, # type: str + ids=None, # type: List[str] + names=None, # type: List[str] + versions=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> None + """DELETE nfs-export-policies/rules + + Delete one or more NFS export policy rules. One of the following is required: `ids` or `names`. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_nfs_export_policies_rules_delete_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param list[str] ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :param list[str] names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :param list[str] versions: A comma-separated list of versions. This is an optional query param used for concurrency control. The ordering should match the names or ids query param. This will fail with a 412 Precondition failed if the resource was changed and the current version of the resource doesn't match the value in the query param. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: None + If the method is called asynchronously, + returns the request thread. + """ + if ids is not None: + if not isinstance(ids, list): + ids = [ids] + if names is not None: + if not isinstance(names, list): + names = [names] + if versions is not None: + if not isinstance(versions, list): + versions = [versions] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + collection_formats = {} + path_params = {} + + query_params = [] + if 'ids' in params: + query_params.append(('ids', params['ids'])) + collection_formats['ids'] = 'csv' + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + if 'versions' in params: + query_params.append(('versions', params['versions'])) + collection_formats['versions'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/nfs-export-policies/rules', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_nfs_export_policies_rules_get_with_http_info( + self, + x_request_id=None, # type: str + continuation_token=None, # type: str + filter=None, # type: str + ids=None, # type: List[str] + limit=None, # type: int + names=None, # type: List[str] + offset=None, # type: int + policy_ids=None, # type: List[str] + policy_names=None, # type: List[str] + sort=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.NfsExportPolicyRuleGetResponse + """GET nfs-export-policies/rules + + Displays a list of NFS export policy rules. The default sort is by policy name, then index. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_nfs_export_policies_rules_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param str continuation_token: An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result. + :param str filter: Exclude resources that don't match the specified criteria. + :param list[str] ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :param int limit: Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the maximum number, the request is still valid. In that case the server just returns the maximum number of items, disregarding the client's page size request. + :param list[str] names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :param int offset: The offset of the first resource to return from a collection. + :param list[str] policy_ids: A comma-separated list of policy IDs. If after filtering, there is not at least one resource that matches each of the elements of `policy_ids`, then an error is returned. This cannot be provided together with the `policy_names` query parameter. + :param list[str] policy_names: A comma-separated list of policy names. + :param list[str] sort: Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: NfsExportPolicyRuleGetResponse + If the method is called asynchronously, + returns the request thread. + """ + if ids is not None: + if not isinstance(ids, list): + ids = [ids] + if names is not None: + if not isinstance(names, list): + names = [names] + if policy_ids is not None: + if not isinstance(policy_ids, list): + policy_ids = [policy_ids] + if policy_names is not None: + if not isinstance(policy_names, list): + policy_names = [policy_names] + if sort is not None: + if not isinstance(sort, list): + sort = [sort] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + if 'limit' in params and params['limit'] < 1: + raise ValueError("Invalid value for parameter `limit` when calling `api214_nfs_export_policies_rules_get`, must be a value greater than or equal to `1`") + if 'offset' in params and params['offset'] < 0: + raise ValueError("Invalid value for parameter `offset` when calling `api214_nfs_export_policies_rules_get`, must be a value greater than or equal to `0`") + collection_formats = {} + path_params = {} + + query_params = [] + if 'continuation_token' in params: + query_params.append(('continuation_token', params['continuation_token'])) + if 'filter' in params: + query_params.append(('filter', params['filter'])) + if 'ids' in params: + query_params.append(('ids', params['ids'])) + collection_formats['ids'] = 'csv' + if 'limit' in params: + query_params.append(('limit', params['limit'])) + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + if 'offset' in params: + query_params.append(('offset', params['offset'])) + if 'policy_ids' in params: + query_params.append(('policy_ids', params['policy_ids'])) + collection_formats['policy_ids'] = 'csv' + if 'policy_names' in params: + query_params.append(('policy_names', params['policy_names'])) + collection_formats['policy_names'] = 'csv' + if 'sort' in params: + query_params.append(('sort', params['sort'])) + collection_formats['sort'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/nfs-export-policies/rules', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='NfsExportPolicyRuleGetResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_nfs_export_policies_rules_patch_with_http_info( + self, + rule=None, # type: models.NfsExportPolicyRule + x_request_id=None, # type: str + before_rule_id=None, # type: str + before_rule_name=None, # type: str + ids=None, # type: List[str] + names=None, # type: List[str] + versions=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.NfsExportPolicyRuleResponse + """PATCH nfs-export-policies/rules + + Modify an existing NFS export policy rule. If `before_rule_id` or `before_rule_name` are specified, the rule will be moved before that rule. Rules are ordered in three groups; ip addresses, other and `*` and can only be moved within the appropriate group. One of the following is required: `ids` or `names`. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_nfs_export_policies_rules_patch_with_http_info(rule, async_req=True) + >>> result = thread.get() + + :param NfsExportPolicyRule rule: (required) + :param str x_request_id: Supplied by client during request or generated by server. + :param str before_rule_id: The id of the rule to insert or move a rule before. This cannot be provided together with the `before_rule_name` query parameter. + :param str before_rule_name: The name of the rule to insert or move a rule before. This cannot be provided together with the `before_rule_id` query parameter. + :param list[str] ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :param list[str] names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :param list[str] versions: A comma-separated list of versions. This is an optional query param used for concurrency control. The ordering should match the names or ids query param. This will fail with a 412 Precondition failed if the resource was changed and the current version of the resource doesn't match the value in the query param. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: NfsExportPolicyRuleResponse + If the method is called asynchronously, + returns the request thread. + """ + if ids is not None: + if not isinstance(ids, list): + ids = [ids] + if names is not None: + if not isinstance(names, list): + names = [names] + if versions is not None: + if not isinstance(versions, list): + versions = [versions] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + # verify the required parameter 'rule' is set + if rule is None: + raise TypeError("Missing the required parameter `rule` when calling `api214_nfs_export_policies_rules_patch`") + + collection_formats = {} + path_params = {} + + query_params = [] + if 'before_rule_id' in params: + query_params.append(('before_rule_id', params['before_rule_id'])) + if 'before_rule_name' in params: + query_params.append(('before_rule_name', params['before_rule_name'])) + if 'ids' in params: + query_params.append(('ids', params['ids'])) + collection_formats['ids'] = 'csv' + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + if 'versions' in params: + query_params.append(('versions', params['versions'])) + collection_formats['versions'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + if 'rule' in params: + body_params = params['rule'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/nfs-export-policies/rules', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='NfsExportPolicyRuleResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_nfs_export_policies_rules_post_with_http_info( + self, + rule=None, # type: models.NfsExportPolicyRule + x_request_id=None, # type: str + before_rule_id=None, # type: str + before_rule_name=None, # type: str + policy_ids=None, # type: List[str] + policy_names=None, # type: List[str] + versions=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.NfsExportPolicyRuleResponse + """POST nfs-export-policies/rules + + Add a NFS export policy rule. Rules are ordered in three groups; ip addresses, other and `*`. The new rule will be added at the end of the appropriate group if neither `before_rule_id` and `before_rule_name` are specified. Rules can only be inserted into the appropriate group. Either `policy_ids` or `policy_names` parameter is required. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_nfs_export_policies_rules_post_with_http_info(rule, async_req=True) + >>> result = thread.get() + + :param NfsExportPolicyRule rule: (required) + :param str x_request_id: Supplied by client during request or generated by server. + :param str before_rule_id: The id of the rule to insert or move a rule before. This cannot be provided together with the `before_rule_name` query parameter. + :param str before_rule_name: The name of the rule to insert or move a rule before. This cannot be provided together with the `before_rule_id` query parameter. + :param list[str] policy_ids: A comma-separated list of policy IDs. If after filtering, there is not at least one resource that matches each of the elements of `policy_ids`, then an error is returned. This cannot be provided together with the `policy_names` query parameter. + :param list[str] policy_names: A comma-separated list of policy names. + :param list[str] versions: A comma-separated list of versions. This is an optional query param used for concurrency control. The ordering should match the names or ids query param. This will fail with a 412 Precondition failed if the resource was changed and the current version of the resource doesn't match the value in the query param. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: NfsExportPolicyRuleResponse + If the method is called asynchronously, + returns the request thread. + """ + if policy_ids is not None: + if not isinstance(policy_ids, list): + policy_ids = [policy_ids] + if policy_names is not None: + if not isinstance(policy_names, list): + policy_names = [policy_names] + if versions is not None: + if not isinstance(versions, list): + versions = [versions] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + # verify the required parameter 'rule' is set + if rule is None: + raise TypeError("Missing the required parameter `rule` when calling `api214_nfs_export_policies_rules_post`") + + collection_formats = {} + path_params = {} + + query_params = [] + if 'before_rule_id' in params: + query_params.append(('before_rule_id', params['before_rule_id'])) + if 'before_rule_name' in params: + query_params.append(('before_rule_name', params['before_rule_name'])) + if 'policy_ids' in params: + query_params.append(('policy_ids', params['policy_ids'])) + collection_formats['policy_ids'] = 'csv' + if 'policy_names' in params: + query_params.append(('policy_names', params['policy_names'])) + collection_formats['policy_names'] = 'csv' + if 'versions' in params: + query_params.append(('versions', params['versions'])) + collection_formats['versions'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + if 'rule' in params: + body_params = params['rule'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/nfs-export-policies/rules', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='NfsExportPolicyRuleResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) diff --git a/pypureclient/flashblade/FB_2_14/api/policies___object_store_access_api.py b/pypureclient/flashblade/FB_2_14/api/policies___object_store_access_api.py new file mode 100644 index 000000000..490095708 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/api/policies___object_store_access_api.py @@ -0,0 +1,1392 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import re + +# python 2 and python 3 compatibility library +import six +import uuid +from typing import List, Optional + +from .. import models + +class PoliciesObjectStoreAccessApi(object): + + def __init__(self, api_client): + self.api_client = api_client + + def api214_object_store_access_policies_delete_with_http_info( + self, + x_request_id=None, # type: str + ids=None, # type: List[str] + names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> None + """DELETE object-store-access-policies + + Delete one or more access policies. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_object_store_access_policies_delete_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param list[str] ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :param list[str] names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: None + If the method is called asynchronously, + returns the request thread. + """ + if ids is not None: + if not isinstance(ids, list): + ids = [ids] + if names is not None: + if not isinstance(names, list): + names = [names] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + collection_formats = {} + path_params = {} + + query_params = [] + if 'ids' in params: + query_params.append(('ids', params['ids'])) + collection_formats['ids'] = 'csv' + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/object-store-access-policies', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_object_store_access_policies_get_with_http_info( + self, + x_request_id=None, # type: str + continuation_token=None, # type: str + exclude_rules=None, # type: bool + filter=None, # type: str + ids=None, # type: List[str] + limit=None, # type: int + names=None, # type: List[str] + offset=None, # type: int + sort=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.ObjectStoreAccessPolicyGetResponse + """GET object-store-access-policies + + List access policies and their attributes. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_object_store_access_policies_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param str continuation_token: An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result. + :param bool exclude_rules: If true, the rules field in each policy will be null. If false, each returned policy will include its list of rules in the response. If not specified, defaults to `false`. + :param str filter: Exclude resources that don't match the specified criteria. + :param list[str] ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :param int limit: Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the maximum number, the request is still valid. In that case the server just returns the maximum number of items, disregarding the client's page size request. + :param list[str] names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :param int offset: The offset of the first resource to return from a collection. + :param list[str] sort: Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: ObjectStoreAccessPolicyGetResponse + If the method is called asynchronously, + returns the request thread. + """ + if ids is not None: + if not isinstance(ids, list): + ids = [ids] + if names is not None: + if not isinstance(names, list): + names = [names] + if sort is not None: + if not isinstance(sort, list): + sort = [sort] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + if 'limit' in params and params['limit'] < 1: + raise ValueError("Invalid value for parameter `limit` when calling `api214_object_store_access_policies_get`, must be a value greater than or equal to `1`") + if 'offset' in params and params['offset'] < 0: + raise ValueError("Invalid value for parameter `offset` when calling `api214_object_store_access_policies_get`, must be a value greater than or equal to `0`") + collection_formats = {} + path_params = {} + + query_params = [] + if 'continuation_token' in params: + query_params.append(('continuation_token', params['continuation_token'])) + if 'exclude_rules' in params: + query_params.append(('exclude_rules', params['exclude_rules'])) + if 'filter' in params: + query_params.append(('filter', params['filter'])) + if 'ids' in params: + query_params.append(('ids', params['ids'])) + collection_formats['ids'] = 'csv' + if 'limit' in params: + query_params.append(('limit', params['limit'])) + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + if 'offset' in params: + query_params.append(('offset', params['offset'])) + if 'sort' in params: + query_params.append(('sort', params['sort'])) + collection_formats['sort'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/object-store-access-policies', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ObjectStoreAccessPolicyGetResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_object_store_access_policies_object_store_users_delete_with_http_info( + self, + x_request_id=None, # type: str + member_ids=None, # type: List[str] + member_names=None, # type: List[str] + policy_ids=None, # type: List[str] + policy_names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> None + """DELETE object-store-access-policies/object-store-users + + Revokes an object store user's access policy. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_object_store_access_policies_object_store_users_delete_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param list[str] member_ids: A comma-separated list of member IDs. If after filtering, there is not at least one resource that matches each of the elements of `member_ids`, then an error is returned. This cannot be provided together with the `member_names` query parameter. + :param list[str] member_names: A comma-separated list of member names. + :param list[str] policy_ids: A comma-separated list of policy IDs. If after filtering, there is not at least one resource that matches each of the elements of `policy_ids`, then an error is returned. This cannot be provided together with the `policy_names` query parameter. + :param list[str] policy_names: A comma-separated list of policy names. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: None + If the method is called asynchronously, + returns the request thread. + """ + if member_ids is not None: + if not isinstance(member_ids, list): + member_ids = [member_ids] + if member_names is not None: + if not isinstance(member_names, list): + member_names = [member_names] + if policy_ids is not None: + if not isinstance(policy_ids, list): + policy_ids = [policy_ids] + if policy_names is not None: + if not isinstance(policy_names, list): + policy_names = [policy_names] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + collection_formats = {} + path_params = {} + + query_params = [] + if 'member_ids' in params: + query_params.append(('member_ids', params['member_ids'])) + collection_formats['member_ids'] = 'csv' + if 'member_names' in params: + query_params.append(('member_names', params['member_names'])) + collection_formats['member_names'] = 'csv' + if 'policy_ids' in params: + query_params.append(('policy_ids', params['policy_ids'])) + collection_formats['policy_ids'] = 'csv' + if 'policy_names' in params: + query_params.append(('policy_names', params['policy_names'])) + collection_formats['policy_names'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/object-store-access-policies/object-store-users', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_object_store_access_policies_object_store_users_get_with_http_info( + self, + x_request_id=None, # type: str + continuation_token=None, # type: str + filter=None, # type: str + limit=None, # type: int + member_ids=None, # type: List[str] + member_names=None, # type: List[str] + offset=None, # type: int + policy_ids=None, # type: List[str] + policy_names=None, # type: List[str] + sort=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.PolicyMemberGetResponse + """GET object-store-access-policies/object-store-users + + List object store users and their access policies. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_object_store_access_policies_object_store_users_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param str continuation_token: An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result. + :param str filter: Exclude resources that don't match the specified criteria. + :param int limit: Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the maximum number, the request is still valid. In that case the server just returns the maximum number of items, disregarding the client's page size request. + :param list[str] member_ids: A comma-separated list of member IDs. If after filtering, there is not at least one resource that matches each of the elements of `member_ids`, then an error is returned. This cannot be provided together with the `member_names` query parameter. + :param list[str] member_names: A comma-separated list of member names. + :param int offset: The offset of the first resource to return from a collection. + :param list[str] policy_ids: A comma-separated list of policy IDs. If after filtering, there is not at least one resource that matches each of the elements of `policy_ids`, then an error is returned. This cannot be provided together with the `policy_names` query parameter. + :param list[str] policy_names: A comma-separated list of policy names. + :param list[str] sort: Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: PolicyMemberGetResponse + If the method is called asynchronously, + returns the request thread. + """ + if member_ids is not None: + if not isinstance(member_ids, list): + member_ids = [member_ids] + if member_names is not None: + if not isinstance(member_names, list): + member_names = [member_names] + if policy_ids is not None: + if not isinstance(policy_ids, list): + policy_ids = [policy_ids] + if policy_names is not None: + if not isinstance(policy_names, list): + policy_names = [policy_names] + if sort is not None: + if not isinstance(sort, list): + sort = [sort] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + if 'limit' in params and params['limit'] < 1: + raise ValueError("Invalid value for parameter `limit` when calling `api214_object_store_access_policies_object_store_users_get`, must be a value greater than or equal to `1`") + if 'offset' in params and params['offset'] < 0: + raise ValueError("Invalid value for parameter `offset` when calling `api214_object_store_access_policies_object_store_users_get`, must be a value greater than or equal to `0`") + collection_formats = {} + path_params = {} + + query_params = [] + if 'continuation_token' in params: + query_params.append(('continuation_token', params['continuation_token'])) + if 'filter' in params: + query_params.append(('filter', params['filter'])) + if 'limit' in params: + query_params.append(('limit', params['limit'])) + if 'member_ids' in params: + query_params.append(('member_ids', params['member_ids'])) + collection_formats['member_ids'] = 'csv' + if 'member_names' in params: + query_params.append(('member_names', params['member_names'])) + collection_formats['member_names'] = 'csv' + if 'offset' in params: + query_params.append(('offset', params['offset'])) + if 'policy_ids' in params: + query_params.append(('policy_ids', params['policy_ids'])) + collection_formats['policy_ids'] = 'csv' + if 'policy_names' in params: + query_params.append(('policy_names', params['policy_names'])) + collection_formats['policy_names'] = 'csv' + if 'sort' in params: + query_params.append(('sort', params['sort'])) + collection_formats['sort'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/object-store-access-policies/object-store-users', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PolicyMemberGetResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_object_store_access_policies_object_store_users_post_with_http_info( + self, + x_request_id=None, # type: str + member_ids=None, # type: List[str] + member_names=None, # type: List[str] + policy_ids=None, # type: List[str] + policy_names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.PolicyMemberResponse + """POST object-store-access-policies/object-store-users + + Grant access policies to an object store user. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_object_store_access_policies_object_store_users_post_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param list[str] member_ids: A comma-separated list of member IDs. If after filtering, there is not at least one resource that matches each of the elements of `member_ids`, then an error is returned. This cannot be provided together with the `member_names` query parameter. + :param list[str] member_names: A comma-separated list of member names. + :param list[str] policy_ids: A comma-separated list of policy IDs. If after filtering, there is not at least one resource that matches each of the elements of `policy_ids`, then an error is returned. This cannot be provided together with the `policy_names` query parameter. + :param list[str] policy_names: A comma-separated list of policy names. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: PolicyMemberResponse + If the method is called asynchronously, + returns the request thread. + """ + if member_ids is not None: + if not isinstance(member_ids, list): + member_ids = [member_ids] + if member_names is not None: + if not isinstance(member_names, list): + member_names = [member_names] + if policy_ids is not None: + if not isinstance(policy_ids, list): + policy_ids = [policy_ids] + if policy_names is not None: + if not isinstance(policy_names, list): + policy_names = [policy_names] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + collection_formats = {} + path_params = {} + + query_params = [] + if 'member_ids' in params: + query_params.append(('member_ids', params['member_ids'])) + collection_formats['member_ids'] = 'csv' + if 'member_names' in params: + query_params.append(('member_names', params['member_names'])) + collection_formats['member_names'] = 'csv' + if 'policy_ids' in params: + query_params.append(('policy_ids', params['policy_ids'])) + collection_formats['policy_ids'] = 'csv' + if 'policy_names' in params: + query_params.append(('policy_names', params['policy_names'])) + collection_formats['policy_names'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/object-store-access-policies/object-store-users', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PolicyMemberResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_object_store_access_policies_patch_with_http_info( + self, + x_request_id=None, # type: str + enforce_action_restrictions=None, # type: bool + ids=None, # type: List[str] + names=None, # type: List[str] + policy=None, # type: models.ObjectStoreAccessPolicyPatch + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.ObjectStoreAccessPolicyResponse + """PATCH object-store-access-policies + + Modify the rules of an object store access policy. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_object_store_access_policies_patch_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param bool enforce_action_restrictions: Certain combinations of actions and other rule elements are inherently ignored if specified together in a rule. If set to `true`, operations which attempt to set these combinations will fail. If set to `false`, such operations will instead be allowed. Defaults to `true`. + :param list[str] ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :param list[str] names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :param ObjectStoreAccessPolicyPatch policy: + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: ObjectStoreAccessPolicyResponse + If the method is called asynchronously, + returns the request thread. + """ + if ids is not None: + if not isinstance(ids, list): + ids = [ids] + if names is not None: + if not isinstance(names, list): + names = [names] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + collection_formats = {} + path_params = {} + + query_params = [] + if 'enforce_action_restrictions' in params: + query_params.append(('enforce_action_restrictions', params['enforce_action_restrictions'])) + if 'ids' in params: + query_params.append(('ids', params['ids'])) + collection_formats['ids'] = 'csv' + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + if 'policy' in params: + body_params = params['policy'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/object-store-access-policies', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ObjectStoreAccessPolicyResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_object_store_access_policies_post_with_http_info( + self, + names=None, # type: List[str] + x_request_id=None, # type: str + enforce_action_restrictions=None, # type: bool + policy=None, # type: models.ObjectStoreAccessPolicyPost + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.ObjectStoreAccessPolicyResponse + """POST object-store-access-policies + + Create a new access policy. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_object_store_access_policies_post_with_http_info(names, async_req=True) + >>> result = thread.get() + + :param list[str] names: A comma-separated list of resource names. (required) + :param str x_request_id: Supplied by client during request or generated by server. + :param bool enforce_action_restrictions: Certain combinations of actions and other rule elements are inherently ignored if specified together in a rule. If set to `true`, operations which attempt to set these combinations will fail. If set to `false`, such operations will instead be allowed. Defaults to `true`. + :param ObjectStoreAccessPolicyPost policy: + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: ObjectStoreAccessPolicyResponse + If the method is called asynchronously, + returns the request thread. + """ + if names is not None: + if not isinstance(names, list): + names = [names] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + # verify the required parameter 'names' is set + if names is None: + raise TypeError("Missing the required parameter `names` when calling `api214_object_store_access_policies_post`") + + collection_formats = {} + path_params = {} + + query_params = [] + if 'enforce_action_restrictions' in params: + query_params.append(('enforce_action_restrictions', params['enforce_action_restrictions'])) + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + if 'policy' in params: + body_params = params['policy'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/object-store-access-policies', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ObjectStoreAccessPolicyResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_object_store_access_policies_rules_delete_with_http_info( + self, + x_request_id=None, # type: str + names=None, # type: List[str] + policy_ids=None, # type: List[str] + policy_names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> None + """DELETE object-store-access-policies-rules + + Delete one or more access policy rules. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_object_store_access_policies_rules_delete_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param list[str] names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :param list[str] policy_ids: A comma-separated list of policy IDs. If after filtering, there is not at least one resource that matches each of the elements of `policy_ids`, then an error is returned. This cannot be provided together with the `policy_names` query parameter. + :param list[str] policy_names: A comma-separated list of policy names. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: None + If the method is called asynchronously, + returns the request thread. + """ + if names is not None: + if not isinstance(names, list): + names = [names] + if policy_ids is not None: + if not isinstance(policy_ids, list): + policy_ids = [policy_ids] + if policy_names is not None: + if not isinstance(policy_names, list): + policy_names = [policy_names] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + collection_formats = {} + path_params = {} + + query_params = [] + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + if 'policy_ids' in params: + query_params.append(('policy_ids', params['policy_ids'])) + collection_formats['policy_ids'] = 'csv' + if 'policy_names' in params: + query_params.append(('policy_names', params['policy_names'])) + collection_formats['policy_names'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/object-store-access-policies/rules', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_object_store_access_policies_rules_get_with_http_info( + self, + x_request_id=None, # type: str + continuation_token=None, # type: str + filter=None, # type: str + limit=None, # type: int + names=None, # type: List[str] + offset=None, # type: int + policy_ids=None, # type: List[str] + policy_names=None, # type: List[str] + sort=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.ObjectStoreAccessPolicyRuleGetResponse + """GET object-store-access-policies-rules + + List access policy rules and their attributes. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_object_store_access_policies_rules_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param str continuation_token: An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result. + :param str filter: Exclude resources that don't match the specified criteria. + :param int limit: Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the maximum number, the request is still valid. In that case the server just returns the maximum number of items, disregarding the client's page size request. + :param list[str] names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :param int offset: The offset of the first resource to return from a collection. + :param list[str] policy_ids: A comma-separated list of policy IDs. If after filtering, there is not at least one resource that matches each of the elements of `policy_ids`, then an error is returned. This cannot be provided together with the `policy_names` query parameter. + :param list[str] policy_names: A comma-separated list of policy names. + :param list[str] sort: Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: ObjectStoreAccessPolicyRuleGetResponse + If the method is called asynchronously, + returns the request thread. + """ + if names is not None: + if not isinstance(names, list): + names = [names] + if policy_ids is not None: + if not isinstance(policy_ids, list): + policy_ids = [policy_ids] + if policy_names is not None: + if not isinstance(policy_names, list): + policy_names = [policy_names] + if sort is not None: + if not isinstance(sort, list): + sort = [sort] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + if 'limit' in params and params['limit'] < 1: + raise ValueError("Invalid value for parameter `limit` when calling `api214_object_store_access_policies_rules_get`, must be a value greater than or equal to `1`") + if 'offset' in params and params['offset'] < 0: + raise ValueError("Invalid value for parameter `offset` when calling `api214_object_store_access_policies_rules_get`, must be a value greater than or equal to `0`") + collection_formats = {} + path_params = {} + + query_params = [] + if 'continuation_token' in params: + query_params.append(('continuation_token', params['continuation_token'])) + if 'filter' in params: + query_params.append(('filter', params['filter'])) + if 'limit' in params: + query_params.append(('limit', params['limit'])) + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + if 'offset' in params: + query_params.append(('offset', params['offset'])) + if 'policy_ids' in params: + query_params.append(('policy_ids', params['policy_ids'])) + collection_formats['policy_ids'] = 'csv' + if 'policy_names' in params: + query_params.append(('policy_names', params['policy_names'])) + collection_formats['policy_names'] = 'csv' + if 'sort' in params: + query_params.append(('sort', params['sort'])) + collection_formats['sort'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/object-store-access-policies/rules', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ObjectStoreAccessPolicyRuleGetResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_object_store_access_policies_rules_patch_with_http_info( + self, + rule=None, # type: models.PolicyRuleObjectAccessPost + x_request_id=None, # type: str + enforce_action_restrictions=None, # type: bool + names=None, # type: List[str] + policy_ids=None, # type: List[str] + policy_names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.ObjectStoreAccessPolicyRuleResponse + """PATCH object-store-access-policies-rules + + Modify an access policy rule's attributes. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_object_store_access_policies_rules_patch_with_http_info(rule, async_req=True) + >>> result = thread.get() + + :param PolicyRuleObjectAccessPost rule: (required) + :param str x_request_id: Supplied by client during request or generated by server. + :param bool enforce_action_restrictions: Certain combinations of actions and other rule elements are inherently ignored if specified together in a rule. If set to `true`, operations which attempt to set these combinations will fail. If set to `false`, such operations will instead be allowed. Defaults to `true`. + :param list[str] names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :param list[str] policy_ids: A comma-separated list of policy IDs. If after filtering, there is not at least one resource that matches each of the elements of `policy_ids`, then an error is returned. This cannot be provided together with the `policy_names` query parameter. + :param list[str] policy_names: A comma-separated list of policy names. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: ObjectStoreAccessPolicyRuleResponse + If the method is called asynchronously, + returns the request thread. + """ + if names is not None: + if not isinstance(names, list): + names = [names] + if policy_ids is not None: + if not isinstance(policy_ids, list): + policy_ids = [policy_ids] + if policy_names is not None: + if not isinstance(policy_names, list): + policy_names = [policy_names] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + # verify the required parameter 'rule' is set + if rule is None: + raise TypeError("Missing the required parameter `rule` when calling `api214_object_store_access_policies_rules_patch`") + + collection_formats = {} + path_params = {} + + query_params = [] + if 'enforce_action_restrictions' in params: + query_params.append(('enforce_action_restrictions', params['enforce_action_restrictions'])) + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + if 'policy_ids' in params: + query_params.append(('policy_ids', params['policy_ids'])) + collection_formats['policy_ids'] = 'csv' + if 'policy_names' in params: + query_params.append(('policy_names', params['policy_names'])) + collection_formats['policy_names'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + if 'rule' in params: + body_params = params['rule'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/object-store-access-policies/rules', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ObjectStoreAccessPolicyRuleResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_object_store_access_policies_rules_post_with_http_info( + self, + names=None, # type: List[str] + rule=None, # type: models.PolicyRuleObjectAccessPost + x_request_id=None, # type: str + enforce_action_restrictions=None, # type: bool + policy_ids=None, # type: List[str] + policy_names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.ObjectStoreAccessPolicyRuleResponse + """POST object-store-access-policies-rules + + Create a new access policy rule. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_object_store_access_policies_rules_post_with_http_info(names, rule, async_req=True) + >>> result = thread.get() + + :param list[str] names: A comma-separated list of resource names. (required) + :param PolicyRuleObjectAccessPost rule: (required) + :param str x_request_id: Supplied by client during request or generated by server. + :param bool enforce_action_restrictions: Certain combinations of actions and other rule elements are inherently ignored if specified together in a rule. If set to `true`, operations which attempt to set these combinations will fail. If set to `false`, such operations will instead be allowed. Defaults to `true`. + :param list[str] policy_ids: A comma-separated list of policy IDs. If after filtering, there is not at least one resource that matches each of the elements of `policy_ids`, then an error is returned. This cannot be provided together with the `policy_names` query parameter. + :param list[str] policy_names: A comma-separated list of policy names. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: ObjectStoreAccessPolicyRuleResponse + If the method is called asynchronously, + returns the request thread. + """ + if names is not None: + if not isinstance(names, list): + names = [names] + if policy_ids is not None: + if not isinstance(policy_ids, list): + policy_ids = [policy_ids] + if policy_names is not None: + if not isinstance(policy_names, list): + policy_names = [policy_names] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + # verify the required parameter 'names' is set + if names is None: + raise TypeError("Missing the required parameter `names` when calling `api214_object_store_access_policies_rules_post`") + # verify the required parameter 'rule' is set + if rule is None: + raise TypeError("Missing the required parameter `rule` when calling `api214_object_store_access_policies_rules_post`") + + collection_formats = {} + path_params = {} + + query_params = [] + if 'enforce_action_restrictions' in params: + query_params.append(('enforce_action_restrictions', params['enforce_action_restrictions'])) + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + if 'policy_ids' in params: + query_params.append(('policy_ids', params['policy_ids'])) + collection_formats['policy_ids'] = 'csv' + if 'policy_names' in params: + query_params.append(('policy_names', params['policy_names'])) + collection_formats['policy_names'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + if 'rule' in params: + body_params = params['rule'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/object-store-access-policies/rules', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ObjectStoreAccessPolicyRuleResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_object_store_access_policy_actions_get_with_http_info( + self, + x_request_id=None, # type: str + continuation_token=None, # type: str + filter=None, # type: str + limit=None, # type: int + names=None, # type: List[str] + offset=None, # type: int + sort=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.ObjectStoreAccessPolicyActionGetResponse + """GET object-store-access-policy-actions + + List valid actions for access policy rules. Each action is either a valid AWS S3 action (prefixed by `s3:`) or our special wildcard action (`s3:*`). Each action, when included in a rule, may restrict which other properties may be set for that rule. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_object_store_access_policy_actions_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param str continuation_token: An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result. + :param str filter: Exclude resources that don't match the specified criteria. + :param int limit: Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the maximum number, the request is still valid. In that case the server just returns the maximum number of items, disregarding the client's page size request. + :param list[str] names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :param int offset: The offset of the first resource to return from a collection. + :param list[str] sort: Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: ObjectStoreAccessPolicyActionGetResponse + If the method is called asynchronously, + returns the request thread. + """ + if names is not None: + if not isinstance(names, list): + names = [names] + if sort is not None: + if not isinstance(sort, list): + sort = [sort] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + if 'limit' in params and params['limit'] < 1: + raise ValueError("Invalid value for parameter `limit` when calling `api214_object_store_access_policy_actions_get`, must be a value greater than or equal to `1`") + if 'offset' in params and params['offset'] < 0: + raise ValueError("Invalid value for parameter `offset` when calling `api214_object_store_access_policy_actions_get`, must be a value greater than or equal to `0`") + collection_formats = {} + path_params = {} + + query_params = [] + if 'continuation_token' in params: + query_params.append(('continuation_token', params['continuation_token'])) + if 'filter' in params: + query_params.append(('filter', params['filter'])) + if 'limit' in params: + query_params.append(('limit', params['limit'])) + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + if 'offset' in params: + query_params.append(('offset', params['offset'])) + if 'sort' in params: + query_params.append(('sort', params['sort'])) + collection_formats['sort'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/object-store-access-policy-actions', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ObjectStoreAccessPolicyActionGetResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) diff --git a/pypureclient/flashblade/FB_2_14/api/policies___smb_client_api.py b/pypureclient/flashblade/FB_2_14/api/policies___smb_client_api.py new file mode 100644 index 000000000..6e7dfa9a0 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/api/policies___smb_client_api.py @@ -0,0 +1,920 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import re + +# python 2 and python 3 compatibility library +import six +import uuid +from typing import List, Optional + +from .. import models + +class PoliciesSMBClientApi(object): + + def __init__(self, api_client): + self.api_client = api_client + + def api214_smb_client_policies_delete_with_http_info( + self, + x_request_id=None, # type: str + ids=None, # type: List[str] + names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> None + """DELETE smb-client-policies + + Delete one or more SMB Client policies. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_smb_client_policies_delete_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param list[str] ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :param list[str] names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: None + If the method is called asynchronously, + returns the request thread. + """ + if ids is not None: + if not isinstance(ids, list): + ids = [ids] + if names is not None: + if not isinstance(names, list): + names = [names] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + collection_formats = {} + path_params = {} + + query_params = [] + if 'ids' in params: + query_params.append(('ids', params['ids'])) + collection_formats['ids'] = 'csv' + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/smb-client-policies', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_smb_client_policies_get_with_http_info( + self, + x_request_id=None, # type: str + continuation_token=None, # type: str + filter=None, # type: str + ids=None, # type: List[str] + limit=None, # type: int + names=None, # type: List[str] + offset=None, # type: int + sort=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.SmbClientPolicyGetResponse + """GET smb-client-policies + + Display SMB Client policies and their attributes. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_smb_client_policies_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param str continuation_token: An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result. + :param str filter: Exclude resources that don't match the specified criteria. + :param list[str] ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :param int limit: Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the maximum number, the request is still valid. In that case the server just returns the maximum number of items, disregarding the client's page size request. + :param list[str] names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :param int offset: The offset of the first resource to return from a collection. + :param list[str] sort: Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: SmbClientPolicyGetResponse + If the method is called asynchronously, + returns the request thread. + """ + if ids is not None: + if not isinstance(ids, list): + ids = [ids] + if names is not None: + if not isinstance(names, list): + names = [names] + if sort is not None: + if not isinstance(sort, list): + sort = [sort] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + if 'limit' in params and params['limit'] < 1: + raise ValueError("Invalid value for parameter `limit` when calling `api214_smb_client_policies_get`, must be a value greater than or equal to `1`") + if 'offset' in params and params['offset'] < 0: + raise ValueError("Invalid value for parameter `offset` when calling `api214_smb_client_policies_get`, must be a value greater than or equal to `0`") + collection_formats = {} + path_params = {} + + query_params = [] + if 'continuation_token' in params: + query_params.append(('continuation_token', params['continuation_token'])) + if 'filter' in params: + query_params.append(('filter', params['filter'])) + if 'ids' in params: + query_params.append(('ids', params['ids'])) + collection_formats['ids'] = 'csv' + if 'limit' in params: + query_params.append(('limit', params['limit'])) + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + if 'offset' in params: + query_params.append(('offset', params['offset'])) + if 'sort' in params: + query_params.append(('sort', params['sort'])) + collection_formats['sort'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/smb-client-policies', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='SmbClientPolicyGetResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_smb_client_policies_patch_with_http_info( + self, + policy=None, # type: models.SmbClientPolicy + x_request_id=None, # type: str + ids=None, # type: List[str] + names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.SmbClientPolicyResponse + """PATCH smb-client-policies + + Modify an existing SMB Client policy's attributes. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_smb_client_policies_patch_with_http_info(policy, async_req=True) + >>> result = thread.get() + + :param SmbClientPolicy policy: (required) + :param str x_request_id: Supplied by client during request or generated by server. + :param list[str] ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :param list[str] names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: SmbClientPolicyResponse + If the method is called asynchronously, + returns the request thread. + """ + if ids is not None: + if not isinstance(ids, list): + ids = [ids] + if names is not None: + if not isinstance(names, list): + names = [names] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + # verify the required parameter 'policy' is set + if policy is None: + raise TypeError("Missing the required parameter `policy` when calling `api214_smb_client_policies_patch`") + + collection_formats = {} + path_params = {} + + query_params = [] + if 'ids' in params: + query_params.append(('ids', params['ids'])) + collection_formats['ids'] = 'csv' + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + if 'policy' in params: + body_params = params['policy'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/smb-client-policies', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='SmbClientPolicyResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_smb_client_policies_post_with_http_info( + self, + names=None, # type: List[str] + x_request_id=None, # type: str + policy=None, # type: models.SmbClientPolicyPost + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.SmbClientPolicyResponse + """POST smb-client-policies + + Create a new SMB Client policy. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_smb_client_policies_post_with_http_info(names, async_req=True) + >>> result = thread.get() + + :param list[str] names: A comma-separated list of resource names. (required) + :param str x_request_id: Supplied by client during request or generated by server. + :param SmbClientPolicyPost policy: + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: SmbClientPolicyResponse + If the method is called asynchronously, + returns the request thread. + """ + if names is not None: + if not isinstance(names, list): + names = [names] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + # verify the required parameter 'names' is set + if names is None: + raise TypeError("Missing the required parameter `names` when calling `api214_smb_client_policies_post`") + + collection_formats = {} + path_params = {} + + query_params = [] + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + if 'policy' in params: + body_params = params['policy'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/smb-client-policies', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='SmbClientPolicyResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_smb_client_policies_rules_delete_with_http_info( + self, + x_request_id=None, # type: str + ids=None, # type: List[str] + names=None, # type: List[str] + versions=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> None + """DELETE smb-client-policies/rules + + Delete one or more SMB Client policy rules. One of the following is required: `ids` or `names`. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_smb_client_policies_rules_delete_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param list[str] ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :param list[str] names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :param list[str] versions: A comma-separated list of versions. This is an optional query param used for concurrency control. The ordering should match the names or ids query param. This will fail with a 412 Precondition failed if the resource was changed and the current version of the resource doesn't match the value in the query param. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: None + If the method is called asynchronously, + returns the request thread. + """ + if ids is not None: + if not isinstance(ids, list): + ids = [ids] + if names is not None: + if not isinstance(names, list): + names = [names] + if versions is not None: + if not isinstance(versions, list): + versions = [versions] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + collection_formats = {} + path_params = {} + + query_params = [] + if 'ids' in params: + query_params.append(('ids', params['ids'])) + collection_formats['ids'] = 'csv' + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + if 'versions' in params: + query_params.append(('versions', params['versions'])) + collection_formats['versions'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/smb-client-policies/rules', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_smb_client_policies_rules_get_with_http_info( + self, + x_request_id=None, # type: str + continuation_token=None, # type: str + filter=None, # type: str + ids=None, # type: List[str] + limit=None, # type: int + names=None, # type: List[str] + offset=None, # type: int + policy_ids=None, # type: List[str] + policy_names=None, # type: List[str] + sort=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.SmbClientPolicyRuleGetResponse + """GET smb-client-policies/rules + + Displays a list of SMB Client policy rules. The default sort is by policy name, then index. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_smb_client_policies_rules_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param str continuation_token: An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result. + :param str filter: Exclude resources that don't match the specified criteria. + :param list[str] ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :param int limit: Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the maximum number, the request is still valid. In that case the server just returns the maximum number of items, disregarding the client's page size request. + :param list[str] names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :param int offset: The offset of the first resource to return from a collection. + :param list[str] policy_ids: A comma-separated list of policy IDs. If after filtering, there is not at least one resource that matches each of the elements of `policy_ids`, then an error is returned. This cannot be provided together with the `policy_names` query parameter. + :param list[str] policy_names: A comma-separated list of policy names. + :param list[str] sort: Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: SmbClientPolicyRuleGetResponse + If the method is called asynchronously, + returns the request thread. + """ + if ids is not None: + if not isinstance(ids, list): + ids = [ids] + if names is not None: + if not isinstance(names, list): + names = [names] + if policy_ids is not None: + if not isinstance(policy_ids, list): + policy_ids = [policy_ids] + if policy_names is not None: + if not isinstance(policy_names, list): + policy_names = [policy_names] + if sort is not None: + if not isinstance(sort, list): + sort = [sort] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + if 'limit' in params and params['limit'] < 1: + raise ValueError("Invalid value for parameter `limit` when calling `api214_smb_client_policies_rules_get`, must be a value greater than or equal to `1`") + if 'offset' in params and params['offset'] < 0: + raise ValueError("Invalid value for parameter `offset` when calling `api214_smb_client_policies_rules_get`, must be a value greater than or equal to `0`") + collection_formats = {} + path_params = {} + + query_params = [] + if 'continuation_token' in params: + query_params.append(('continuation_token', params['continuation_token'])) + if 'filter' in params: + query_params.append(('filter', params['filter'])) + if 'ids' in params: + query_params.append(('ids', params['ids'])) + collection_formats['ids'] = 'csv' + if 'limit' in params: + query_params.append(('limit', params['limit'])) + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + if 'offset' in params: + query_params.append(('offset', params['offset'])) + if 'policy_ids' in params: + query_params.append(('policy_ids', params['policy_ids'])) + collection_formats['policy_ids'] = 'csv' + if 'policy_names' in params: + query_params.append(('policy_names', params['policy_names'])) + collection_formats['policy_names'] = 'csv' + if 'sort' in params: + query_params.append(('sort', params['sort'])) + collection_formats['sort'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/smb-client-policies/rules', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='SmbClientPolicyRuleGetResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_smb_client_policies_rules_patch_with_http_info( + self, + rule=None, # type: models.SmbClientPolicyRule + x_request_id=None, # type: str + before_rule_id=None, # type: str + before_rule_name=None, # type: str + ids=None, # type: List[str] + names=None, # type: List[str] + versions=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.SmbClientPolicyRuleResponse + """PATCH smb-client-policies/rules + + Modify an existing SMB Client policy rule. If `before_rule_id` or `before_rule_name` are specified, the rule will be moved before that rule. Rules are ordered in three groups; ip addresses, other and `*` and can only be moved within the appropriate group. One of the following is required: `ids` or `names`. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_smb_client_policies_rules_patch_with_http_info(rule, async_req=True) + >>> result = thread.get() + + :param SmbClientPolicyRule rule: (required) + :param str x_request_id: Supplied by client during request or generated by server. + :param str before_rule_id: The id of the rule to insert or move a rule before. This cannot be provided together with the `before_rule_name` query parameter. + :param str before_rule_name: The name of the rule to insert or move a rule before. This cannot be provided together with the `before_rule_id` query parameter. + :param list[str] ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :param list[str] names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :param list[str] versions: A comma-separated list of versions. This is an optional query param used for concurrency control. The ordering should match the names or ids query param. This will fail with a 412 Precondition failed if the resource was changed and the current version of the resource doesn't match the value in the query param. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: SmbClientPolicyRuleResponse + If the method is called asynchronously, + returns the request thread. + """ + if ids is not None: + if not isinstance(ids, list): + ids = [ids] + if names is not None: + if not isinstance(names, list): + names = [names] + if versions is not None: + if not isinstance(versions, list): + versions = [versions] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + # verify the required parameter 'rule' is set + if rule is None: + raise TypeError("Missing the required parameter `rule` when calling `api214_smb_client_policies_rules_patch`") + + collection_formats = {} + path_params = {} + + query_params = [] + if 'before_rule_id' in params: + query_params.append(('before_rule_id', params['before_rule_id'])) + if 'before_rule_name' in params: + query_params.append(('before_rule_name', params['before_rule_name'])) + if 'ids' in params: + query_params.append(('ids', params['ids'])) + collection_formats['ids'] = 'csv' + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + if 'versions' in params: + query_params.append(('versions', params['versions'])) + collection_formats['versions'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + if 'rule' in params: + body_params = params['rule'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/smb-client-policies/rules', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='SmbClientPolicyRuleResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_smb_client_policies_rules_post_with_http_info( + self, + rule=None, # type: models.SmbClientPolicyRulePost + x_request_id=None, # type: str + before_rule_id=None, # type: str + before_rule_name=None, # type: str + policy_ids=None, # type: List[str] + policy_names=None, # type: List[str] + versions=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.SmbClientPolicyRuleResponse + """POST smb-client-policies/rules + + Add an SMB Client policy rule. Rules are ordered in three groups; ip addresses, other and `*`. The new rule will be added at the end of the appropriate group if neither `before_rule_id` nor `before_rule_name` are specified. Rules can only be inserted into the appropriate group. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_smb_client_policies_rules_post_with_http_info(rule, async_req=True) + >>> result = thread.get() + + :param SmbClientPolicyRulePost rule: (required) + :param str x_request_id: Supplied by client during request or generated by server. + :param str before_rule_id: The id of the rule to insert or move a rule before. This cannot be provided together with the `before_rule_name` query parameter. + :param str before_rule_name: The name of the rule to insert or move a rule before. This cannot be provided together with the `before_rule_id` query parameter. + :param list[str] policy_ids: A comma-separated list of policy IDs. If after filtering, there is not at least one resource that matches each of the elements of `policy_ids`, then an error is returned. This cannot be provided together with the `policy_names` query parameter. + :param list[str] policy_names: A comma-separated list of policy names. + :param list[str] versions: A comma-separated list of versions. This is an optional query param used for concurrency control. The ordering should match the names or ids query param. This will fail with a 412 Precondition failed if the resource was changed and the current version of the resource doesn't match the value in the query param. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: SmbClientPolicyRuleResponse + If the method is called asynchronously, + returns the request thread. + """ + if policy_ids is not None: + if not isinstance(policy_ids, list): + policy_ids = [policy_ids] + if policy_names is not None: + if not isinstance(policy_names, list): + policy_names = [policy_names] + if versions is not None: + if not isinstance(versions, list): + versions = [versions] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + # verify the required parameter 'rule' is set + if rule is None: + raise TypeError("Missing the required parameter `rule` when calling `api214_smb_client_policies_rules_post`") + + collection_formats = {} + path_params = {} + + query_params = [] + if 'before_rule_id' in params: + query_params.append(('before_rule_id', params['before_rule_id'])) + if 'before_rule_name' in params: + query_params.append(('before_rule_name', params['before_rule_name'])) + if 'policy_ids' in params: + query_params.append(('policy_ids', params['policy_ids'])) + collection_formats['policy_ids'] = 'csv' + if 'policy_names' in params: + query_params.append(('policy_names', params['policy_names'])) + collection_formats['policy_names'] = 'csv' + if 'versions' in params: + query_params.append(('versions', params['versions'])) + collection_formats['versions'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + if 'rule' in params: + body_params = params['rule'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/smb-client-policies/rules', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='SmbClientPolicyRuleResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) diff --git a/pypureclient/flashblade/FB_2_14/api/policies___smb_share_api.py b/pypureclient/flashblade/FB_2_14/api/policies___smb_share_api.py new file mode 100644 index 000000000..6a23308e6 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/api/policies___smb_share_api.py @@ -0,0 +1,912 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import re + +# python 2 and python 3 compatibility library +import six +import uuid +from typing import List, Optional + +from .. import models + +class PoliciesSMBShareApi(object): + + def __init__(self, api_client): + self.api_client = api_client + + def api214_smb_share_policies_delete_with_http_info( + self, + x_request_id=None, # type: str + ids=None, # type: List[str] + names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> None + """DELETE smb-share-policies + + Delete one or more SMB Share policies. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_smb_share_policies_delete_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param list[str] ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :param list[str] names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: None + If the method is called asynchronously, + returns the request thread. + """ + if ids is not None: + if not isinstance(ids, list): + ids = [ids] + if names is not None: + if not isinstance(names, list): + names = [names] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + collection_formats = {} + path_params = {} + + query_params = [] + if 'ids' in params: + query_params.append(('ids', params['ids'])) + collection_formats['ids'] = 'csv' + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/smb-share-policies', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_smb_share_policies_get_with_http_info( + self, + x_request_id=None, # type: str + continuation_token=None, # type: str + filter=None, # type: str + ids=None, # type: List[str] + limit=None, # type: int + names=None, # type: List[str] + offset=None, # type: int + sort=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.SmbSharePolicyGetResponse + """GET smb-share-policies + + Display SMB Share policies and their attributes. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_smb_share_policies_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param str continuation_token: An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result. + :param str filter: Exclude resources that don't match the specified criteria. + :param list[str] ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :param int limit: Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the maximum number, the request is still valid. In that case the server just returns the maximum number of items, disregarding the client's page size request. + :param list[str] names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :param int offset: The offset of the first resource to return from a collection. + :param list[str] sort: Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: SmbSharePolicyGetResponse + If the method is called asynchronously, + returns the request thread. + """ + if ids is not None: + if not isinstance(ids, list): + ids = [ids] + if names is not None: + if not isinstance(names, list): + names = [names] + if sort is not None: + if not isinstance(sort, list): + sort = [sort] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + if 'limit' in params and params['limit'] < 1: + raise ValueError("Invalid value for parameter `limit` when calling `api214_smb_share_policies_get`, must be a value greater than or equal to `1`") + if 'offset' in params and params['offset'] < 0: + raise ValueError("Invalid value for parameter `offset` when calling `api214_smb_share_policies_get`, must be a value greater than or equal to `0`") + collection_formats = {} + path_params = {} + + query_params = [] + if 'continuation_token' in params: + query_params.append(('continuation_token', params['continuation_token'])) + if 'filter' in params: + query_params.append(('filter', params['filter'])) + if 'ids' in params: + query_params.append(('ids', params['ids'])) + collection_formats['ids'] = 'csv' + if 'limit' in params: + query_params.append(('limit', params['limit'])) + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + if 'offset' in params: + query_params.append(('offset', params['offset'])) + if 'sort' in params: + query_params.append(('sort', params['sort'])) + collection_formats['sort'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/smb-share-policies', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='SmbSharePolicyGetResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_smb_share_policies_patch_with_http_info( + self, + policy=None, # type: models.SmbSharePolicy + x_request_id=None, # type: str + ids=None, # type: List[str] + names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.SmbSharePolicyResponse + """PATCH smb-share-policies + + Modify an existing SMB Share policy's attributes. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_smb_share_policies_patch_with_http_info(policy, async_req=True) + >>> result = thread.get() + + :param SmbSharePolicy policy: (required) + :param str x_request_id: Supplied by client during request or generated by server. + :param list[str] ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :param list[str] names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: SmbSharePolicyResponse + If the method is called asynchronously, + returns the request thread. + """ + if ids is not None: + if not isinstance(ids, list): + ids = [ids] + if names is not None: + if not isinstance(names, list): + names = [names] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + # verify the required parameter 'policy' is set + if policy is None: + raise TypeError("Missing the required parameter `policy` when calling `api214_smb_share_policies_patch`") + + collection_formats = {} + path_params = {} + + query_params = [] + if 'ids' in params: + query_params.append(('ids', params['ids'])) + collection_formats['ids'] = 'csv' + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + if 'policy' in params: + body_params = params['policy'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/smb-share-policies', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='SmbSharePolicyResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_smb_share_policies_post_with_http_info( + self, + names=None, # type: List[str] + x_request_id=None, # type: str + policy=None, # type: models.SmbSharePolicyPost + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.SmbSharePolicyResponse + """POST smb-share-policies + + Create a new SMB Share policy. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_smb_share_policies_post_with_http_info(names, async_req=True) + >>> result = thread.get() + + :param list[str] names: A comma-separated list of resource names. (required) + :param str x_request_id: Supplied by client during request or generated by server. + :param SmbSharePolicyPost policy: + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: SmbSharePolicyResponse + If the method is called asynchronously, + returns the request thread. + """ + if names is not None: + if not isinstance(names, list): + names = [names] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + # verify the required parameter 'names' is set + if names is None: + raise TypeError("Missing the required parameter `names` when calling `api214_smb_share_policies_post`") + + collection_formats = {} + path_params = {} + + query_params = [] + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + if 'policy' in params: + body_params = params['policy'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/smb-share-policies', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='SmbSharePolicyResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_smb_share_policies_rules_delete_with_http_info( + self, + x_request_id=None, # type: str + ids=None, # type: List[str] + names=None, # type: List[str] + policy_ids=None, # type: List[str] + policy_names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> None + """DELETE smb-share-policies/rules + + Delete one or more SMB Share policy rules. One of the following is required: `ids` or `names`. If `names` is provided, the `policy_ids` or `policy_names` parameter is also required. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_smb_share_policies_rules_delete_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param list[str] ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :param list[str] names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :param list[str] policy_ids: A comma-separated list of policy IDs. If after filtering, there is not at least one resource that matches each of the elements of `policy_ids`, then an error is returned. This cannot be provided together with the `policy_names` query parameter. + :param list[str] policy_names: A comma-separated list of policy names. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: None + If the method is called asynchronously, + returns the request thread. + """ + if ids is not None: + if not isinstance(ids, list): + ids = [ids] + if names is not None: + if not isinstance(names, list): + names = [names] + if policy_ids is not None: + if not isinstance(policy_ids, list): + policy_ids = [policy_ids] + if policy_names is not None: + if not isinstance(policy_names, list): + policy_names = [policy_names] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + collection_formats = {} + path_params = {} + + query_params = [] + if 'ids' in params: + query_params.append(('ids', params['ids'])) + collection_formats['ids'] = 'csv' + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + if 'policy_ids' in params: + query_params.append(('policy_ids', params['policy_ids'])) + collection_formats['policy_ids'] = 'csv' + if 'policy_names' in params: + query_params.append(('policy_names', params['policy_names'])) + collection_formats['policy_names'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/smb-share-policies/rules', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_smb_share_policies_rules_get_with_http_info( + self, + x_request_id=None, # type: str + continuation_token=None, # type: str + filter=None, # type: str + ids=None, # type: List[str] + limit=None, # type: int + names=None, # type: List[str] + offset=None, # type: int + policy_ids=None, # type: List[str] + policy_names=None, # type: List[str] + sort=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.SmbSharePolicyRuleGetResponse + """GET smb-share-policies/rules + + Displays a list of SMB Share policy rules. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_smb_share_policies_rules_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param str continuation_token: An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result. + :param str filter: Exclude resources that don't match the specified criteria. + :param list[str] ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :param int limit: Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the maximum number, the request is still valid. In that case the server just returns the maximum number of items, disregarding the client's page size request. + :param list[str] names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :param int offset: The offset of the first resource to return from a collection. + :param list[str] policy_ids: A comma-separated list of policy IDs. If after filtering, there is not at least one resource that matches each of the elements of `policy_ids`, then an error is returned. This cannot be provided together with the `policy_names` query parameter. + :param list[str] policy_names: A comma-separated list of policy names. + :param list[str] sort: Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: SmbSharePolicyRuleGetResponse + If the method is called asynchronously, + returns the request thread. + """ + if ids is not None: + if not isinstance(ids, list): + ids = [ids] + if names is not None: + if not isinstance(names, list): + names = [names] + if policy_ids is not None: + if not isinstance(policy_ids, list): + policy_ids = [policy_ids] + if policy_names is not None: + if not isinstance(policy_names, list): + policy_names = [policy_names] + if sort is not None: + if not isinstance(sort, list): + sort = [sort] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + if 'limit' in params and params['limit'] < 1: + raise ValueError("Invalid value for parameter `limit` when calling `api214_smb_share_policies_rules_get`, must be a value greater than or equal to `1`") + if 'offset' in params and params['offset'] < 0: + raise ValueError("Invalid value for parameter `offset` when calling `api214_smb_share_policies_rules_get`, must be a value greater than or equal to `0`") + collection_formats = {} + path_params = {} + + query_params = [] + if 'continuation_token' in params: + query_params.append(('continuation_token', params['continuation_token'])) + if 'filter' in params: + query_params.append(('filter', params['filter'])) + if 'ids' in params: + query_params.append(('ids', params['ids'])) + collection_formats['ids'] = 'csv' + if 'limit' in params: + query_params.append(('limit', params['limit'])) + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + if 'offset' in params: + query_params.append(('offset', params['offset'])) + if 'policy_ids' in params: + query_params.append(('policy_ids', params['policy_ids'])) + collection_formats['policy_ids'] = 'csv' + if 'policy_names' in params: + query_params.append(('policy_names', params['policy_names'])) + collection_formats['policy_names'] = 'csv' + if 'sort' in params: + query_params.append(('sort', params['sort'])) + collection_formats['sort'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/smb-share-policies/rules', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='SmbSharePolicyRuleGetResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_smb_share_policies_rules_patch_with_http_info( + self, + rule=None, # type: models.SmbSharePolicyRule + x_request_id=None, # type: str + ids=None, # type: List[str] + names=None, # type: List[str] + policy_ids=None, # type: List[str] + policy_names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.SmbSharePolicyRuleResponse + """PATCH smb-share-policies/rules + + Modify an existing SMB Share policy rule. One of the following is required: `ids` or `names`. If `names` is provided, the `policy_ids` or `policy_names` parameter is also required. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_smb_share_policies_rules_patch_with_http_info(rule, async_req=True) + >>> result = thread.get() + + :param SmbSharePolicyRule rule: (required) + :param str x_request_id: Supplied by client during request or generated by server. + :param list[str] ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :param list[str] names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :param list[str] policy_ids: A comma-separated list of policy IDs. If after filtering, there is not at least one resource that matches each of the elements of `policy_ids`, then an error is returned. This cannot be provided together with the `policy_names` query parameter. + :param list[str] policy_names: A comma-separated list of policy names. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: SmbSharePolicyRuleResponse + If the method is called asynchronously, + returns the request thread. + """ + if ids is not None: + if not isinstance(ids, list): + ids = [ids] + if names is not None: + if not isinstance(names, list): + names = [names] + if policy_ids is not None: + if not isinstance(policy_ids, list): + policy_ids = [policy_ids] + if policy_names is not None: + if not isinstance(policy_names, list): + policy_names = [policy_names] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + # verify the required parameter 'rule' is set + if rule is None: + raise TypeError("Missing the required parameter `rule` when calling `api214_smb_share_policies_rules_patch`") + + collection_formats = {} + path_params = {} + + query_params = [] + if 'ids' in params: + query_params.append(('ids', params['ids'])) + collection_formats['ids'] = 'csv' + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + if 'policy_ids' in params: + query_params.append(('policy_ids', params['policy_ids'])) + collection_formats['policy_ids'] = 'csv' + if 'policy_names' in params: + query_params.append(('policy_names', params['policy_names'])) + collection_formats['policy_names'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + if 'rule' in params: + body_params = params['rule'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/smb-share-policies/rules', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='SmbSharePolicyRuleResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_smb_share_policies_rules_post_with_http_info( + self, + rule=None, # type: models.SmbSharePolicyRulePost + x_request_id=None, # type: str + policy_ids=None, # type: List[str] + policy_names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.SmbSharePolicyRuleResponse + """POST smb-share-policies/rules + + Add an SMB Share policy rule. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_smb_share_policies_rules_post_with_http_info(rule, async_req=True) + >>> result = thread.get() + + :param SmbSharePolicyRulePost rule: (required) + :param str x_request_id: Supplied by client during request or generated by server. + :param list[str] policy_ids: A comma-separated list of policy IDs. If after filtering, there is not at least one resource that matches each of the elements of `policy_ids`, then an error is returned. This cannot be provided together with the `policy_names` query parameter. + :param list[str] policy_names: A comma-separated list of policy names. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: SmbSharePolicyRuleResponse + If the method is called asynchronously, + returns the request thread. + """ + if policy_ids is not None: + if not isinstance(policy_ids, list): + policy_ids = [policy_ids] + if policy_names is not None: + if not isinstance(policy_names, list): + policy_names = [policy_names] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + # verify the required parameter 'rule' is set + if rule is None: + raise TypeError("Missing the required parameter `rule` when calling `api214_smb_share_policies_rules_post`") + + collection_formats = {} + path_params = {} + + query_params = [] + if 'policy_ids' in params: + query_params.append(('policy_ids', params['policy_ids'])) + collection_formats['policy_ids'] = 'csv' + if 'policy_names' in params: + query_params.append(('policy_names', params['policy_names'])) + collection_formats['policy_names'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + if 'rule' in params: + body_params = params['rule'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/smb-share-policies/rules', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='SmbSharePolicyRuleResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) diff --git a/pypureclient/flashblade/FB_2_14/api/policies___snapshot_api.py b/pypureclient/flashblade/FB_2_14/api/policies___snapshot_api.py new file mode 100644 index 000000000..3058937f2 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/api/policies___snapshot_api.py @@ -0,0 +1,1701 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import re + +# python 2 and python 3 compatibility library +import six +import uuid +from typing import List, Optional + +from .. import models + +class PoliciesSnapshotApi(object): + + def __init__(self, api_client): + self.api_client = api_client + + def api214_policies_delete_with_http_info( + self, + x_request_id=None, # type: str + ids=None, # type: List[str] + names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> None + """DELETE policies + + Delete one or more snapshot scheduling policies. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_policies_delete_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param list[str] ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :param list[str] names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: None + If the method is called asynchronously, + returns the request thread. + """ + if ids is not None: + if not isinstance(ids, list): + ids = [ids] + if names is not None: + if not isinstance(names, list): + names = [names] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + collection_formats = {} + path_params = {} + + query_params = [] + if 'ids' in params: + query_params.append(('ids', params['ids'])) + collection_formats['ids'] = 'csv' + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/policies', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_policies_file_system_replica_links_delete_with_http_info( + self, + x_request_id=None, # type: str + local_file_system_ids=None, # type: List[str] + local_file_system_names=None, # type: List[str] + member_ids=None, # type: List[str] + policy_ids=None, # type: List[str] + policy_names=None, # type: List[str] + remote_ids=None, # type: List[str] + remote_names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> None + """DELETE policies/file-system-replica-links + + Remove a snapshot scheduling policy mapped to a file system replica link. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_policies_file_system_replica_links_delete_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param list[str] local_file_system_ids: A comma-separated list of local file system IDs. If after filtering, there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `local_file_system_names` query parameter. + :param list[str] local_file_system_names: A comma-separated list of local file system names. If there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with `local_file_system_ids` query parameter. + :param list[str] member_ids: A comma-separated list of member IDs. If after filtering, there is not at least one resource that matches each of the elements of `member_ids`, then an error is returned. This cannot be provided together with the `member_names` query parameter. + :param list[str] policy_ids: A comma-separated list of policy IDs. If after filtering, there is not at least one resource that matches each of the elements of `policy_ids`, then an error is returned. This cannot be provided together with the `policy_names` query parameter. + :param list[str] policy_names: A comma-separated list of policy names. + :param list[str] remote_ids: A comma-separated list of remote array IDs. If after filtering, there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `remote_names` query parameter. + :param list[str] remote_names: A comma-separated list of remote array names. If there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with `remote_ids` query parameter. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: None + If the method is called asynchronously, + returns the request thread. + """ + if local_file_system_ids is not None: + if not isinstance(local_file_system_ids, list): + local_file_system_ids = [local_file_system_ids] + if local_file_system_names is not None: + if not isinstance(local_file_system_names, list): + local_file_system_names = [local_file_system_names] + if member_ids is not None: + if not isinstance(member_ids, list): + member_ids = [member_ids] + if policy_ids is not None: + if not isinstance(policy_ids, list): + policy_ids = [policy_ids] + if policy_names is not None: + if not isinstance(policy_names, list): + policy_names = [policy_names] + if remote_ids is not None: + if not isinstance(remote_ids, list): + remote_ids = [remote_ids] + if remote_names is not None: + if not isinstance(remote_names, list): + remote_names = [remote_names] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + collection_formats = {} + path_params = {} + + query_params = [] + if 'local_file_system_ids' in params: + query_params.append(('local_file_system_ids', params['local_file_system_ids'])) + collection_formats['local_file_system_ids'] = 'csv' + if 'local_file_system_names' in params: + query_params.append(('local_file_system_names', params['local_file_system_names'])) + collection_formats['local_file_system_names'] = 'csv' + if 'member_ids' in params: + query_params.append(('member_ids', params['member_ids'])) + collection_formats['member_ids'] = 'csv' + if 'policy_ids' in params: + query_params.append(('policy_ids', params['policy_ids'])) + collection_formats['policy_ids'] = 'csv' + if 'policy_names' in params: + query_params.append(('policy_names', params['policy_names'])) + collection_formats['policy_names'] = 'csv' + if 'remote_ids' in params: + query_params.append(('remote_ids', params['remote_ids'])) + collection_formats['remote_ids'] = 'csv' + if 'remote_names' in params: + query_params.append(('remote_names', params['remote_names'])) + collection_formats['remote_names'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/policies/file-system-replica-links', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_policies_file_system_replica_links_get_with_http_info( + self, + x_request_id=None, # type: str + continuation_token=None, # type: str + filter=None, # type: str + limit=None, # type: int + local_file_system_ids=None, # type: List[str] + local_file_system_names=None, # type: List[str] + member_ids=None, # type: List[str] + offset=None, # type: int + policy_ids=None, # type: List[str] + policy_names=None, # type: List[str] + remote_ids=None, # type: List[str] + remote_file_system_ids=None, # type: List[str] + remote_file_system_names=None, # type: List[str] + remote_names=None, # type: List[str] + sort=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.PolicyMemberWithRemoteGetResponse + """GET policies/file-system-replica-links + + List snapshot scheduling policies for file system replica links. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_policies_file_system_replica_links_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param str continuation_token: An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result. + :param str filter: Exclude resources that don't match the specified criteria. + :param int limit: Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the maximum number, the request is still valid. In that case the server just returns the maximum number of items, disregarding the client's page size request. + :param list[str] local_file_system_ids: A comma-separated list of local file system IDs. If after filtering, there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `local_file_system_names` query parameter. + :param list[str] local_file_system_names: A comma-separated list of local file system names. If there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with `local_file_system_ids` query parameter. + :param list[str] member_ids: A comma-separated list of member IDs. If after filtering, there is not at least one resource that matches each of the elements of `member_ids`, then an error is returned. This cannot be provided together with the `member_names` query parameter. + :param int offset: The offset of the first resource to return from a collection. + :param list[str] policy_ids: A comma-separated list of policy IDs. If after filtering, there is not at least one resource that matches each of the elements of `policy_ids`, then an error is returned. This cannot be provided together with the `policy_names` query parameter. + :param list[str] policy_names: A comma-separated list of policy names. + :param list[str] remote_ids: A comma-separated list of remote array IDs. If after filtering, there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `remote_names` query parameter. + :param list[str] remote_file_system_ids: A comma-separated list of remote file system IDs. If there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `remote_file_system_names` query parameter. + :param list[str] remote_file_system_names: A comma-separated list of remote file system names. If there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `remote_file_system_ids` query parameter. + :param list[str] remote_names: A comma-separated list of remote array names. If there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with `remote_ids` query parameter. + :param list[str] sort: Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: PolicyMemberWithRemoteGetResponse + If the method is called asynchronously, + returns the request thread. + """ + if local_file_system_ids is not None: + if not isinstance(local_file_system_ids, list): + local_file_system_ids = [local_file_system_ids] + if local_file_system_names is not None: + if not isinstance(local_file_system_names, list): + local_file_system_names = [local_file_system_names] + if member_ids is not None: + if not isinstance(member_ids, list): + member_ids = [member_ids] + if policy_ids is not None: + if not isinstance(policy_ids, list): + policy_ids = [policy_ids] + if policy_names is not None: + if not isinstance(policy_names, list): + policy_names = [policy_names] + if remote_ids is not None: + if not isinstance(remote_ids, list): + remote_ids = [remote_ids] + if remote_file_system_ids is not None: + if not isinstance(remote_file_system_ids, list): + remote_file_system_ids = [remote_file_system_ids] + if remote_file_system_names is not None: + if not isinstance(remote_file_system_names, list): + remote_file_system_names = [remote_file_system_names] + if remote_names is not None: + if not isinstance(remote_names, list): + remote_names = [remote_names] + if sort is not None: + if not isinstance(sort, list): + sort = [sort] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + if 'limit' in params and params['limit'] < 1: + raise ValueError("Invalid value for parameter `limit` when calling `api214_policies_file_system_replica_links_get`, must be a value greater than or equal to `1`") + if 'offset' in params and params['offset'] < 0: + raise ValueError("Invalid value for parameter `offset` when calling `api214_policies_file_system_replica_links_get`, must be a value greater than or equal to `0`") + collection_formats = {} + path_params = {} + + query_params = [] + if 'continuation_token' in params: + query_params.append(('continuation_token', params['continuation_token'])) + if 'filter' in params: + query_params.append(('filter', params['filter'])) + if 'limit' in params: + query_params.append(('limit', params['limit'])) + if 'local_file_system_ids' in params: + query_params.append(('local_file_system_ids', params['local_file_system_ids'])) + collection_formats['local_file_system_ids'] = 'csv' + if 'local_file_system_names' in params: + query_params.append(('local_file_system_names', params['local_file_system_names'])) + collection_formats['local_file_system_names'] = 'csv' + if 'member_ids' in params: + query_params.append(('member_ids', params['member_ids'])) + collection_formats['member_ids'] = 'csv' + if 'offset' in params: + query_params.append(('offset', params['offset'])) + if 'policy_ids' in params: + query_params.append(('policy_ids', params['policy_ids'])) + collection_formats['policy_ids'] = 'csv' + if 'policy_names' in params: + query_params.append(('policy_names', params['policy_names'])) + collection_formats['policy_names'] = 'csv' + if 'remote_ids' in params: + query_params.append(('remote_ids', params['remote_ids'])) + collection_formats['remote_ids'] = 'csv' + if 'remote_file_system_ids' in params: + query_params.append(('remote_file_system_ids', params['remote_file_system_ids'])) + collection_formats['remote_file_system_ids'] = 'csv' + if 'remote_file_system_names' in params: + query_params.append(('remote_file_system_names', params['remote_file_system_names'])) + collection_formats['remote_file_system_names'] = 'csv' + if 'remote_names' in params: + query_params.append(('remote_names', params['remote_names'])) + collection_formats['remote_names'] = 'csv' + if 'sort' in params: + query_params.append(('sort', params['sort'])) + collection_formats['sort'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/policies/file-system-replica-links', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PolicyMemberWithRemoteGetResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_policies_file_system_replica_links_post_with_http_info( + self, + x_request_id=None, # type: str + local_file_system_ids=None, # type: List[str] + local_file_system_names=None, # type: List[str] + member_ids=None, # type: List[str] + policy_ids=None, # type: List[str] + policy_names=None, # type: List[str] + remote_ids=None, # type: List[str] + remote_names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.PolicyMemberWithRemoteResponse + """POST policies/file-system-replica-links + + Add a snapshot scheduling policy to a file system replica link. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_policies_file_system_replica_links_post_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param list[str] local_file_system_ids: A comma-separated list of local file system IDs. If after filtering, there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `local_file_system_names` query parameter. + :param list[str] local_file_system_names: A comma-separated list of local file system names. If there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with `local_file_system_ids` query parameter. + :param list[str] member_ids: A comma-separated list of member IDs. If after filtering, there is not at least one resource that matches each of the elements of `member_ids`, then an error is returned. This cannot be provided together with the `member_names` query parameter. + :param list[str] policy_ids: A comma-separated list of policy IDs. If after filtering, there is not at least one resource that matches each of the elements of `policy_ids`, then an error is returned. This cannot be provided together with the `policy_names` query parameter. + :param list[str] policy_names: A comma-separated list of policy names. + :param list[str] remote_ids: A comma-separated list of remote array IDs. If after filtering, there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `remote_names` query parameter. + :param list[str] remote_names: A comma-separated list of remote array names. If there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with `remote_ids` query parameter. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: PolicyMemberWithRemoteResponse + If the method is called asynchronously, + returns the request thread. + """ + if local_file_system_ids is not None: + if not isinstance(local_file_system_ids, list): + local_file_system_ids = [local_file_system_ids] + if local_file_system_names is not None: + if not isinstance(local_file_system_names, list): + local_file_system_names = [local_file_system_names] + if member_ids is not None: + if not isinstance(member_ids, list): + member_ids = [member_ids] + if policy_ids is not None: + if not isinstance(policy_ids, list): + policy_ids = [policy_ids] + if policy_names is not None: + if not isinstance(policy_names, list): + policy_names = [policy_names] + if remote_ids is not None: + if not isinstance(remote_ids, list): + remote_ids = [remote_ids] + if remote_names is not None: + if not isinstance(remote_names, list): + remote_names = [remote_names] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + collection_formats = {} + path_params = {} + + query_params = [] + if 'local_file_system_ids' in params: + query_params.append(('local_file_system_ids', params['local_file_system_ids'])) + collection_formats['local_file_system_ids'] = 'csv' + if 'local_file_system_names' in params: + query_params.append(('local_file_system_names', params['local_file_system_names'])) + collection_formats['local_file_system_names'] = 'csv' + if 'member_ids' in params: + query_params.append(('member_ids', params['member_ids'])) + collection_formats['member_ids'] = 'csv' + if 'policy_ids' in params: + query_params.append(('policy_ids', params['policy_ids'])) + collection_formats['policy_ids'] = 'csv' + if 'policy_names' in params: + query_params.append(('policy_names', params['policy_names'])) + collection_formats['policy_names'] = 'csv' + if 'remote_ids' in params: + query_params.append(('remote_ids', params['remote_ids'])) + collection_formats['remote_ids'] = 'csv' + if 'remote_names' in params: + query_params.append(('remote_names', params['remote_names'])) + collection_formats['remote_names'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/policies/file-system-replica-links', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PolicyMemberWithRemoteResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_policies_file_system_snapshots_delete_with_http_info( + self, + x_request_id=None, # type: str + member_ids=None, # type: List[str] + member_names=None, # type: List[str] + policy_ids=None, # type: List[str] + policy_names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> None + """DELETE policies/file-system-snapshots + + Remove the snapshot scheduling policy mapped to a file system. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_policies_file_system_snapshots_delete_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param list[str] member_ids: A comma-separated list of member IDs. If after filtering, there is not at least one resource that matches each of the elements of `member_ids`, then an error is returned. This cannot be provided together with the `member_names` query parameter. + :param list[str] member_names: A comma-separated list of member names. + :param list[str] policy_ids: A comma-separated list of policy IDs. If after filtering, there is not at least one resource that matches each of the elements of `policy_ids`, then an error is returned. This cannot be provided together with the `policy_names` query parameter. + :param list[str] policy_names: A comma-separated list of policy names. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: None + If the method is called asynchronously, + returns the request thread. + """ + if member_ids is not None: + if not isinstance(member_ids, list): + member_ids = [member_ids] + if member_names is not None: + if not isinstance(member_names, list): + member_names = [member_names] + if policy_ids is not None: + if not isinstance(policy_ids, list): + policy_ids = [policy_ids] + if policy_names is not None: + if not isinstance(policy_names, list): + policy_names = [policy_names] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + collection_formats = {} + path_params = {} + + query_params = [] + if 'member_ids' in params: + query_params.append(('member_ids', params['member_ids'])) + collection_formats['member_ids'] = 'csv' + if 'member_names' in params: + query_params.append(('member_names', params['member_names'])) + collection_formats['member_names'] = 'csv' + if 'policy_ids' in params: + query_params.append(('policy_ids', params['policy_ids'])) + collection_formats['policy_ids'] = 'csv' + if 'policy_names' in params: + query_params.append(('policy_names', params['policy_names'])) + collection_formats['policy_names'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/policies/file-system-snapshots', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_policies_file_system_snapshots_get_with_http_info( + self, + x_request_id=None, # type: str + continuation_token=None, # type: str + filter=None, # type: str + limit=None, # type: int + member_ids=None, # type: List[str] + member_names=None, # type: List[str] + offset=None, # type: int + policy_ids=None, # type: List[str] + policy_names=None, # type: List[str] + sort=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.PolicyFileSystemSnapshotGetResponse + """GET policies/file-system-snapshots + + List file system snapshots mapped to a snapshot scheduling policy. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_policies_file_system_snapshots_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param str continuation_token: An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result. + :param str filter: Exclude resources that don't match the specified criteria. + :param int limit: Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the maximum number, the request is still valid. In that case the server just returns the maximum number of items, disregarding the client's page size request. + :param list[str] member_ids: A comma-separated list of member IDs. If after filtering, there is not at least one resource that matches each of the elements of `member_ids`, then an error is returned. This cannot be provided together with the `member_names` query parameter. + :param list[str] member_names: A comma-separated list of member names. + :param int offset: The offset of the first resource to return from a collection. + :param list[str] policy_ids: A comma-separated list of policy IDs. If after filtering, there is not at least one resource that matches each of the elements of `policy_ids`, then an error is returned. This cannot be provided together with the `policy_names` query parameter. + :param list[str] policy_names: A comma-separated list of policy names. + :param list[str] sort: Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: PolicyFileSystemSnapshotGetResponse + If the method is called asynchronously, + returns the request thread. + """ + if member_ids is not None: + if not isinstance(member_ids, list): + member_ids = [member_ids] + if member_names is not None: + if not isinstance(member_names, list): + member_names = [member_names] + if policy_ids is not None: + if not isinstance(policy_ids, list): + policy_ids = [policy_ids] + if policy_names is not None: + if not isinstance(policy_names, list): + policy_names = [policy_names] + if sort is not None: + if not isinstance(sort, list): + sort = [sort] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + if 'limit' in params and params['limit'] < 1: + raise ValueError("Invalid value for parameter `limit` when calling `api214_policies_file_system_snapshots_get`, must be a value greater than or equal to `1`") + if 'offset' in params and params['offset'] < 0: + raise ValueError("Invalid value for parameter `offset` when calling `api214_policies_file_system_snapshots_get`, must be a value greater than or equal to `0`") + collection_formats = {} + path_params = {} + + query_params = [] + if 'continuation_token' in params: + query_params.append(('continuation_token', params['continuation_token'])) + if 'filter' in params: + query_params.append(('filter', params['filter'])) + if 'limit' in params: + query_params.append(('limit', params['limit'])) + if 'member_ids' in params: + query_params.append(('member_ids', params['member_ids'])) + collection_formats['member_ids'] = 'csv' + if 'member_names' in params: + query_params.append(('member_names', params['member_names'])) + collection_formats['member_names'] = 'csv' + if 'offset' in params: + query_params.append(('offset', params['offset'])) + if 'policy_ids' in params: + query_params.append(('policy_ids', params['policy_ids'])) + collection_formats['policy_ids'] = 'csv' + if 'policy_names' in params: + query_params.append(('policy_names', params['policy_names'])) + collection_formats['policy_names'] = 'csv' + if 'sort' in params: + query_params.append(('sort', params['sort'])) + collection_formats['sort'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/policies/file-system-snapshots', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PolicyFileSystemSnapshotGetResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_policies_file_systems_delete_with_http_info( + self, + x_request_id=None, # type: str + member_ids=None, # type: List[str] + member_names=None, # type: List[str] + policy_ids=None, # type: List[str] + policy_names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> None + """DELETE policies/file-systems + + Remove the snapshot scheduling policy mapped to a file system. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_policies_file_systems_delete_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param list[str] member_ids: A comma-separated list of member IDs. If after filtering, there is not at least one resource that matches each of the elements of `member_ids`, then an error is returned. This cannot be provided together with the `member_names` query parameter. + :param list[str] member_names: A comma-separated list of member names. + :param list[str] policy_ids: A comma-separated list of policy IDs. If after filtering, there is not at least one resource that matches each of the elements of `policy_ids`, then an error is returned. This cannot be provided together with the `policy_names` query parameter. + :param list[str] policy_names: A comma-separated list of policy names. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: None + If the method is called asynchronously, + returns the request thread. + """ + if member_ids is not None: + if not isinstance(member_ids, list): + member_ids = [member_ids] + if member_names is not None: + if not isinstance(member_names, list): + member_names = [member_names] + if policy_ids is not None: + if not isinstance(policy_ids, list): + policy_ids = [policy_ids] + if policy_names is not None: + if not isinstance(policy_names, list): + policy_names = [policy_names] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + collection_formats = {} + path_params = {} + + query_params = [] + if 'member_ids' in params: + query_params.append(('member_ids', params['member_ids'])) + collection_formats['member_ids'] = 'csv' + if 'member_names' in params: + query_params.append(('member_names', params['member_names'])) + collection_formats['member_names'] = 'csv' + if 'policy_ids' in params: + query_params.append(('policy_ids', params['policy_ids'])) + collection_formats['policy_ids'] = 'csv' + if 'policy_names' in params: + query_params.append(('policy_names', params['policy_names'])) + collection_formats['policy_names'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/policies/file-systems', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_policies_file_systems_get_with_http_info( + self, + x_request_id=None, # type: str + continuation_token=None, # type: str + filter=None, # type: str + limit=None, # type: int + member_ids=None, # type: List[str] + member_names=None, # type: List[str] + offset=None, # type: int + policy_ids=None, # type: List[str] + policy_names=None, # type: List[str] + sort=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.PolicyMemberGetResponse + """GET policies/file-systems + + List file systems mapped to a snapshot scheduling policy. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_policies_file_systems_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param str continuation_token: An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result. + :param str filter: Exclude resources that don't match the specified criteria. + :param int limit: Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the maximum number, the request is still valid. In that case the server just returns the maximum number of items, disregarding the client's page size request. + :param list[str] member_ids: A comma-separated list of member IDs. If after filtering, there is not at least one resource that matches each of the elements of `member_ids`, then an error is returned. This cannot be provided together with the `member_names` query parameter. + :param list[str] member_names: A comma-separated list of member names. + :param int offset: The offset of the first resource to return from a collection. + :param list[str] policy_ids: A comma-separated list of policy IDs. If after filtering, there is not at least one resource that matches each of the elements of `policy_ids`, then an error is returned. This cannot be provided together with the `policy_names` query parameter. + :param list[str] policy_names: A comma-separated list of policy names. + :param list[str] sort: Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: PolicyMemberGetResponse + If the method is called asynchronously, + returns the request thread. + """ + if member_ids is not None: + if not isinstance(member_ids, list): + member_ids = [member_ids] + if member_names is not None: + if not isinstance(member_names, list): + member_names = [member_names] + if policy_ids is not None: + if not isinstance(policy_ids, list): + policy_ids = [policy_ids] + if policy_names is not None: + if not isinstance(policy_names, list): + policy_names = [policy_names] + if sort is not None: + if not isinstance(sort, list): + sort = [sort] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + if 'limit' in params and params['limit'] < 1: + raise ValueError("Invalid value for parameter `limit` when calling `api214_policies_file_systems_get`, must be a value greater than or equal to `1`") + if 'offset' in params and params['offset'] < 0: + raise ValueError("Invalid value for parameter `offset` when calling `api214_policies_file_systems_get`, must be a value greater than or equal to `0`") + collection_formats = {} + path_params = {} + + query_params = [] + if 'continuation_token' in params: + query_params.append(('continuation_token', params['continuation_token'])) + if 'filter' in params: + query_params.append(('filter', params['filter'])) + if 'limit' in params: + query_params.append(('limit', params['limit'])) + if 'member_ids' in params: + query_params.append(('member_ids', params['member_ids'])) + collection_formats['member_ids'] = 'csv' + if 'member_names' in params: + query_params.append(('member_names', params['member_names'])) + collection_formats['member_names'] = 'csv' + if 'offset' in params: + query_params.append(('offset', params['offset'])) + if 'policy_ids' in params: + query_params.append(('policy_ids', params['policy_ids'])) + collection_formats['policy_ids'] = 'csv' + if 'policy_names' in params: + query_params.append(('policy_names', params['policy_names'])) + collection_formats['policy_names'] = 'csv' + if 'sort' in params: + query_params.append(('sort', params['sort'])) + collection_formats['sort'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/policies/file-systems', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PolicyMemberGetResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_policies_file_systems_post_with_http_info( + self, + x_request_id=None, # type: str + member_ids=None, # type: List[str] + member_names=None, # type: List[str] + policy_ids=None, # type: List[str] + policy_names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.PolicyMemberResponse + """POST policies/file-systems + + Map a file system to a snapshot scheduling policy. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_policies_file_systems_post_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param list[str] member_ids: A comma-separated list of member IDs. If after filtering, there is not at least one resource that matches each of the elements of `member_ids`, then an error is returned. This cannot be provided together with the `member_names` query parameter. + :param list[str] member_names: A comma-separated list of member names. + :param list[str] policy_ids: A comma-separated list of policy IDs. If after filtering, there is not at least one resource that matches each of the elements of `policy_ids`, then an error is returned. This cannot be provided together with the `policy_names` query parameter. + :param list[str] policy_names: A comma-separated list of policy names. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: PolicyMemberResponse + If the method is called asynchronously, + returns the request thread. + """ + if member_ids is not None: + if not isinstance(member_ids, list): + member_ids = [member_ids] + if member_names is not None: + if not isinstance(member_names, list): + member_names = [member_names] + if policy_ids is not None: + if not isinstance(policy_ids, list): + policy_ids = [policy_ids] + if policy_names is not None: + if not isinstance(policy_names, list): + policy_names = [policy_names] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + collection_formats = {} + path_params = {} + + query_params = [] + if 'member_ids' in params: + query_params.append(('member_ids', params['member_ids'])) + collection_formats['member_ids'] = 'csv' + if 'member_names' in params: + query_params.append(('member_names', params['member_names'])) + collection_formats['member_names'] = 'csv' + if 'policy_ids' in params: + query_params.append(('policy_ids', params['policy_ids'])) + collection_formats['policy_ids'] = 'csv' + if 'policy_names' in params: + query_params.append(('policy_names', params['policy_names'])) + collection_formats['policy_names'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/policies/file-systems', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PolicyMemberResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_policies_get_with_http_info( + self, + x_request_id=None, # type: str + continuation_token=None, # type: str + filter=None, # type: str + ids=None, # type: List[str] + limit=None, # type: int + names=None, # type: List[str] + offset=None, # type: int + sort=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.PolicyGetResponse + """GET policies + + Display snapshot scheduling policies and their attributes. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_policies_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param str continuation_token: An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result. + :param str filter: Exclude resources that don't match the specified criteria. + :param list[str] ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :param int limit: Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the maximum number, the request is still valid. In that case the server just returns the maximum number of items, disregarding the client's page size request. + :param list[str] names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :param int offset: The offset of the first resource to return from a collection. + :param list[str] sort: Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: PolicyGetResponse + If the method is called asynchronously, + returns the request thread. + """ + if ids is not None: + if not isinstance(ids, list): + ids = [ids] + if names is not None: + if not isinstance(names, list): + names = [names] + if sort is not None: + if not isinstance(sort, list): + sort = [sort] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + if 'limit' in params and params['limit'] < 1: + raise ValueError("Invalid value for parameter `limit` when calling `api214_policies_get`, must be a value greater than or equal to `1`") + if 'offset' in params and params['offset'] < 0: + raise ValueError("Invalid value for parameter `offset` when calling `api214_policies_get`, must be a value greater than or equal to `0`") + collection_formats = {} + path_params = {} + + query_params = [] + if 'continuation_token' in params: + query_params.append(('continuation_token', params['continuation_token'])) + if 'filter' in params: + query_params.append(('filter', params['filter'])) + if 'ids' in params: + query_params.append(('ids', params['ids'])) + collection_formats['ids'] = 'csv' + if 'limit' in params: + query_params.append(('limit', params['limit'])) + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + if 'offset' in params: + query_params.append(('offset', params['offset'])) + if 'sort' in params: + query_params.append(('sort', params['sort'])) + collection_formats['sort'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/policies', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PolicyGetResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_policies_members_get_with_http_info( + self, + x_request_id=None, # type: str + continuation_token=None, # type: str + filter=None, # type: str + limit=None, # type: int + local_file_system_ids=None, # type: List[str] + local_file_system_names=None, # type: List[str] + member_ids=None, # type: List[str] + member_names=None, # type: List[str] + member_types=None, # type: List[models.ModelsFB214ResourceTypeYaml] + offset=None, # type: int + policy_ids=None, # type: List[str] + policy_names=None, # type: List[str] + remote_ids=None, # type: List[str] + remote_file_system_ids=None, # type: List[str] + remote_file_system_names=None, # type: List[str] + remote_names=None, # type: List[str] + sort=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.PolicyMemberWithRemoteGetResponse + """GET policies/members + + List snapshot scheduling policies mapped to file systems, snapshots, and file system replica links. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_policies_members_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param str continuation_token: An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result. + :param str filter: Exclude resources that don't match the specified criteria. + :param int limit: Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the maximum number, the request is still valid. In that case the server just returns the maximum number of items, disregarding the client's page size request. + :param list[str] local_file_system_ids: A comma-separated list of local file system IDs. If after filtering, there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `local_file_system_names` query parameter. + :param list[str] local_file_system_names: A comma-separated list of local file system names. If there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with `local_file_system_ids` query parameter. + :param list[str] member_ids: A comma-separated list of member IDs. If after filtering, there is not at least one resource that matches each of the elements of `member_ids`, then an error is returned. This cannot be provided together with the `member_names` query parameter. + :param list[str] member_names: A comma-separated list of member names. + :param list[ModelsFB214ResourceTypeYaml] member_types: A comma-separated list of member types. Valid values are `file-systems`, `file-system-snapshots`, `file-system-replica-links`, and `object-store-users`. Different endpoints may accept different subsets of these values. + :param int offset: The offset of the first resource to return from a collection. + :param list[str] policy_ids: A comma-separated list of policy IDs. If after filtering, there is not at least one resource that matches each of the elements of `policy_ids`, then an error is returned. This cannot be provided together with the `policy_names` query parameter. + :param list[str] policy_names: A comma-separated list of policy names. + :param list[str] remote_ids: A comma-separated list of remote array IDs. If after filtering, there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `remote_names` query parameter. + :param list[str] remote_file_system_ids: A comma-separated list of remote file system IDs. If there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `remote_file_system_names` query parameter. + :param list[str] remote_file_system_names: A comma-separated list of remote file system names. If there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `remote_file_system_ids` query parameter. + :param list[str] remote_names: A comma-separated list of remote array names. If there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with `remote_ids` query parameter. + :param list[str] sort: Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: PolicyMemberWithRemoteGetResponse + If the method is called asynchronously, + returns the request thread. + """ + if local_file_system_ids is not None: + if not isinstance(local_file_system_ids, list): + local_file_system_ids = [local_file_system_ids] + if local_file_system_names is not None: + if not isinstance(local_file_system_names, list): + local_file_system_names = [local_file_system_names] + if member_ids is not None: + if not isinstance(member_ids, list): + member_ids = [member_ids] + if member_names is not None: + if not isinstance(member_names, list): + member_names = [member_names] + if member_types is not None: + if not isinstance(member_types, list): + member_types = [member_types] + if policy_ids is not None: + if not isinstance(policy_ids, list): + policy_ids = [policy_ids] + if policy_names is not None: + if not isinstance(policy_names, list): + policy_names = [policy_names] + if remote_ids is not None: + if not isinstance(remote_ids, list): + remote_ids = [remote_ids] + if remote_file_system_ids is not None: + if not isinstance(remote_file_system_ids, list): + remote_file_system_ids = [remote_file_system_ids] + if remote_file_system_names is not None: + if not isinstance(remote_file_system_names, list): + remote_file_system_names = [remote_file_system_names] + if remote_names is not None: + if not isinstance(remote_names, list): + remote_names = [remote_names] + if sort is not None: + if not isinstance(sort, list): + sort = [sort] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + if 'limit' in params and params['limit'] < 1: + raise ValueError("Invalid value for parameter `limit` when calling `api214_policies_members_get`, must be a value greater than or equal to `1`") + if 'offset' in params and params['offset'] < 0: + raise ValueError("Invalid value for parameter `offset` when calling `api214_policies_members_get`, must be a value greater than or equal to `0`") + collection_formats = {} + path_params = {} + + query_params = [] + if 'continuation_token' in params: + query_params.append(('continuation_token', params['continuation_token'])) + if 'filter' in params: + query_params.append(('filter', params['filter'])) + if 'limit' in params: + query_params.append(('limit', params['limit'])) + if 'local_file_system_ids' in params: + query_params.append(('local_file_system_ids', params['local_file_system_ids'])) + collection_formats['local_file_system_ids'] = 'csv' + if 'local_file_system_names' in params: + query_params.append(('local_file_system_names', params['local_file_system_names'])) + collection_formats['local_file_system_names'] = 'csv' + if 'member_ids' in params: + query_params.append(('member_ids', params['member_ids'])) + collection_formats['member_ids'] = 'csv' + if 'member_names' in params: + query_params.append(('member_names', params['member_names'])) + collection_formats['member_names'] = 'csv' + if 'member_types' in params: + query_params.append(('member_types', params['member_types'])) + collection_formats['member_types'] = 'csv' + if 'offset' in params: + query_params.append(('offset', params['offset'])) + if 'policy_ids' in params: + query_params.append(('policy_ids', params['policy_ids'])) + collection_formats['policy_ids'] = 'csv' + if 'policy_names' in params: + query_params.append(('policy_names', params['policy_names'])) + collection_formats['policy_names'] = 'csv' + if 'remote_ids' in params: + query_params.append(('remote_ids', params['remote_ids'])) + collection_formats['remote_ids'] = 'csv' + if 'remote_file_system_ids' in params: + query_params.append(('remote_file_system_ids', params['remote_file_system_ids'])) + collection_formats['remote_file_system_ids'] = 'csv' + if 'remote_file_system_names' in params: + query_params.append(('remote_file_system_names', params['remote_file_system_names'])) + collection_formats['remote_file_system_names'] = 'csv' + if 'remote_names' in params: + query_params.append(('remote_names', params['remote_names'])) + collection_formats['remote_names'] = 'csv' + if 'sort' in params: + query_params.append(('sort', params['sort'])) + collection_formats['sort'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/policies/members', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PolicyMemberWithRemoteGetResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_policies_patch_with_http_info( + self, + policy=None, # type: models.PolicyPatch + x_request_id=None, # type: str + ids=None, # type: List[str] + destroy_snapshots=None, # type: bool + names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.PolicyResponse + """PATCH policies + + Modify a snapshot scheduling policy’s attributes for when and how often snapshots are created and how long they are retained. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_policies_patch_with_http_info(policy, async_req=True) + >>> result = thread.get() + + :param PolicyPatch policy: (required) + :param str x_request_id: Supplied by client during request or generated by server. + :param list[str] ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :param bool destroy_snapshots: This parameter must be set to `true` in order to modify a policy such that local or remote snapshots would be destroyed. + :param list[str] names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: PolicyResponse + If the method is called asynchronously, + returns the request thread. + """ + if ids is not None: + if not isinstance(ids, list): + ids = [ids] + if names is not None: + if not isinstance(names, list): + names = [names] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + # verify the required parameter 'policy' is set + if policy is None: + raise TypeError("Missing the required parameter `policy` when calling `api214_policies_patch`") + + collection_formats = {} + path_params = {} + + query_params = [] + if 'ids' in params: + query_params.append(('ids', params['ids'])) + collection_formats['ids'] = 'csv' + if 'destroy_snapshots' in params: + query_params.append(('destroy_snapshots', params['destroy_snapshots'])) + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + if 'policy' in params: + body_params = params['policy'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/policies', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PolicyResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_policies_post_with_http_info( + self, + names=None, # type: List[str] + x_request_id=None, # type: str + policy=None, # type: models.Policy + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.PolicyResponse + """POST policies + + Create a new snapshot scheduling policy with rule attributes to capture file system snapshots for a set period of time and frequency, as well as how long snapshots are retained before being destroyed and eradicated. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_policies_post_with_http_info(names, async_req=True) + >>> result = thread.get() + + :param list[str] names: A comma-separated list of resource names. (required) + :param str x_request_id: Supplied by client during request or generated by server. + :param Policy policy: + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: PolicyResponse + If the method is called asynchronously, + returns the request thread. + """ + if names is not None: + if not isinstance(names, list): + names = [names] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + # verify the required parameter 'names' is set + if names is None: + raise TypeError("Missing the required parameter `names` when calling `api214_policies_post`") + + collection_formats = {} + path_params = {} + + query_params = [] + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + if 'policy' in params: + body_params = params['policy'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/policies', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PolicyResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) diff --git a/pypureclient/flashblade/FB_2_14/api/policies___ssh_certificate_authority_api.py b/pypureclient/flashblade/FB_2_14/api/policies___ssh_certificate_authority_api.py new file mode 100644 index 000000000..b396347fd --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/api/policies___ssh_certificate_authority_api.py @@ -0,0 +1,2028 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import re + +# python 2 and python 3 compatibility library +import six +import uuid +from typing import List, Optional + +from .. import models + +class PoliciesSSHCertificateAuthorityApi(object): + + def __init__(self, api_client): + self.api_client = api_client + + def api214_admins_ssh_certificate_authority_policies_delete_with_http_info( + self, + x_request_id=None, # type: str + member_ids=None, # type: List[str] + member_names=None, # type: List[str] + policy_ids=None, # type: List[str] + policy_names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> None + """DELETE admins/ssh-certificate-authority-policies + + Remove a SSH Certificate Authority policy from a specific user. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_admins_ssh_certificate_authority_policies_delete_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param list[str] member_ids: A comma-separated list of member IDs. If after filtering, there is not at least one resource that matches each of the elements of `member_ids`, then an error is returned. This cannot be provided together with the `member_names` query parameter. + :param list[str] member_names: A comma-separated list of member names. + :param list[str] policy_ids: A comma-separated list of policy IDs. If after filtering, there is not at least one resource that matches each of the elements of `policy_ids`, then an error is returned. This cannot be provided together with the `policy_names` query parameter. + :param list[str] policy_names: A comma-separated list of policy names. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: None + If the method is called asynchronously, + returns the request thread. + """ + if member_ids is not None: + if not isinstance(member_ids, list): + member_ids = [member_ids] + if member_names is not None: + if not isinstance(member_names, list): + member_names = [member_names] + if policy_ids is not None: + if not isinstance(policy_ids, list): + policy_ids = [policy_ids] + if policy_names is not None: + if not isinstance(policy_names, list): + policy_names = [policy_names] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + collection_formats = {} + path_params = {} + + query_params = [] + if 'member_ids' in params: + query_params.append(('member_ids', params['member_ids'])) + collection_formats['member_ids'] = 'csv' + if 'member_names' in params: + query_params.append(('member_names', params['member_names'])) + collection_formats['member_names'] = 'csv' + if 'policy_ids' in params: + query_params.append(('policy_ids', params['policy_ids'])) + collection_formats['policy_ids'] = 'csv' + if 'policy_names' in params: + query_params.append(('policy_names', params['policy_names'])) + collection_formats['policy_names'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/admins/ssh-certificate-authority-policies', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_admins_ssh_certificate_authority_policies_get_with_http_info( + self, + x_request_id=None, # type: str + continuation_token=None, # type: str + filter=None, # type: str + limit=None, # type: int + member_ids=None, # type: List[str] + member_names=None, # type: List[str] + offset=None, # type: int + policy_ids=None, # type: List[str] + policy_names=None, # type: List[str] + sort=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.PolicyMemberGetResponse + """GET admins/ssh-certificate-authority-policies + + List SSH Certificate Authority policies mapped to specific users. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_admins_ssh_certificate_authority_policies_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param str continuation_token: An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result. + :param str filter: Exclude resources that don't match the specified criteria. + :param int limit: Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the maximum number, the request is still valid. In that case the server just returns the maximum number of items, disregarding the client's page size request. + :param list[str] member_ids: A comma-separated list of member IDs. If after filtering, there is not at least one resource that matches each of the elements of `member_ids`, then an error is returned. This cannot be provided together with the `member_names` query parameter. + :param list[str] member_names: A comma-separated list of member names. + :param int offset: The offset of the first resource to return from a collection. + :param list[str] policy_ids: A comma-separated list of policy IDs. If after filtering, there is not at least one resource that matches each of the elements of `policy_ids`, then an error is returned. This cannot be provided together with the `policy_names` query parameter. + :param list[str] policy_names: A comma-separated list of policy names. + :param list[str] sort: Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: PolicyMemberGetResponse + If the method is called asynchronously, + returns the request thread. + """ + if member_ids is not None: + if not isinstance(member_ids, list): + member_ids = [member_ids] + if member_names is not None: + if not isinstance(member_names, list): + member_names = [member_names] + if policy_ids is not None: + if not isinstance(policy_ids, list): + policy_ids = [policy_ids] + if policy_names is not None: + if not isinstance(policy_names, list): + policy_names = [policy_names] + if sort is not None: + if not isinstance(sort, list): + sort = [sort] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + if 'limit' in params and params['limit'] < 1: + raise ValueError("Invalid value for parameter `limit` when calling `api214_admins_ssh_certificate_authority_policies_get`, must be a value greater than or equal to `1`") + if 'offset' in params and params['offset'] < 0: + raise ValueError("Invalid value for parameter `offset` when calling `api214_admins_ssh_certificate_authority_policies_get`, must be a value greater than or equal to `0`") + collection_formats = {} + path_params = {} + + query_params = [] + if 'continuation_token' in params: + query_params.append(('continuation_token', params['continuation_token'])) + if 'filter' in params: + query_params.append(('filter', params['filter'])) + if 'limit' in params: + query_params.append(('limit', params['limit'])) + if 'member_ids' in params: + query_params.append(('member_ids', params['member_ids'])) + collection_formats['member_ids'] = 'csv' + if 'member_names' in params: + query_params.append(('member_names', params['member_names'])) + collection_formats['member_names'] = 'csv' + if 'offset' in params: + query_params.append(('offset', params['offset'])) + if 'policy_ids' in params: + query_params.append(('policy_ids', params['policy_ids'])) + collection_formats['policy_ids'] = 'csv' + if 'policy_names' in params: + query_params.append(('policy_names', params['policy_names'])) + collection_formats['policy_names'] = 'csv' + if 'sort' in params: + query_params.append(('sort', params['sort'])) + collection_formats['sort'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/admins/ssh-certificate-authority-policies', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PolicyMemberGetResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_admins_ssh_certificate_authority_policies_post_with_http_info( + self, + x_request_id=None, # type: str + member_ids=None, # type: List[str] + member_names=None, # type: List[str] + policy_ids=None, # type: List[str] + policy_names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.PolicyMemberResponse + """POST admins/ssh-certificate-authority-policies + + Map a SSH Certificate Authority policy to a specific user. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_admins_ssh_certificate_authority_policies_post_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param list[str] member_ids: A comma-separated list of member IDs. If after filtering, there is not at least one resource that matches each of the elements of `member_ids`, then an error is returned. This cannot be provided together with the `member_names` query parameter. + :param list[str] member_names: A comma-separated list of member names. + :param list[str] policy_ids: A comma-separated list of policy IDs. If after filtering, there is not at least one resource that matches each of the elements of `policy_ids`, then an error is returned. This cannot be provided together with the `policy_names` query parameter. + :param list[str] policy_names: A comma-separated list of policy names. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: PolicyMemberResponse + If the method is called asynchronously, + returns the request thread. + """ + if member_ids is not None: + if not isinstance(member_ids, list): + member_ids = [member_ids] + if member_names is not None: + if not isinstance(member_names, list): + member_names = [member_names] + if policy_ids is not None: + if not isinstance(policy_ids, list): + policy_ids = [policy_ids] + if policy_names is not None: + if not isinstance(policy_names, list): + policy_names = [policy_names] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + collection_formats = {} + path_params = {} + + query_params = [] + if 'member_ids' in params: + query_params.append(('member_ids', params['member_ids'])) + collection_formats['member_ids'] = 'csv' + if 'member_names' in params: + query_params.append(('member_names', params['member_names'])) + collection_formats['member_names'] = 'csv' + if 'policy_ids' in params: + query_params.append(('policy_ids', params['policy_ids'])) + collection_formats['policy_ids'] = 'csv' + if 'policy_names' in params: + query_params.append(('policy_names', params['policy_names'])) + collection_formats['policy_names'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/admins/ssh-certificate-authority-policies', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PolicyMemberResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_arrays_ssh_certificate_authority_policies_delete_with_http_info( + self, + x_request_id=None, # type: str + member_ids=None, # type: List[str] + member_names=None, # type: List[str] + policy_ids=None, # type: List[str] + policy_names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> None + """DELETE admins/settings/ssh-certificate-authority-policies + + Remove a SSH Certificate Authority policy from being a default for admins. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_arrays_ssh_certificate_authority_policies_delete_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param list[str] member_ids: A comma-separated list of member IDs. If after filtering, there is not at least one resource that matches each of the elements of `member_ids`, then an error is returned. This cannot be provided together with the `member_names` query parameter. + :param list[str] member_names: A comma-separated list of member names. + :param list[str] policy_ids: A comma-separated list of policy IDs. If after filtering, there is not at least one resource that matches each of the elements of `policy_ids`, then an error is returned. This cannot be provided together with the `policy_names` query parameter. + :param list[str] policy_names: A comma-separated list of policy names. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: None + If the method is called asynchronously, + returns the request thread. + """ + if member_ids is not None: + if not isinstance(member_ids, list): + member_ids = [member_ids] + if member_names is not None: + if not isinstance(member_names, list): + member_names = [member_names] + if policy_ids is not None: + if not isinstance(policy_ids, list): + policy_ids = [policy_ids] + if policy_names is not None: + if not isinstance(policy_names, list): + policy_names = [policy_names] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + collection_formats = {} + path_params = {} + + query_params = [] + if 'member_ids' in params: + query_params.append(('member_ids', params['member_ids'])) + collection_formats['member_ids'] = 'csv' + if 'member_names' in params: + query_params.append(('member_names', params['member_names'])) + collection_formats['member_names'] = 'csv' + if 'policy_ids' in params: + query_params.append(('policy_ids', params['policy_ids'])) + collection_formats['policy_ids'] = 'csv' + if 'policy_names' in params: + query_params.append(('policy_names', params['policy_names'])) + collection_formats['policy_names'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/arrays/ssh-certificate-authority-policies', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_arrays_ssh_certificate_authority_policies_get_with_http_info( + self, + x_request_id=None, # type: str + continuation_token=None, # type: str + filter=None, # type: str + limit=None, # type: int + member_ids=None, # type: List[str] + member_names=None, # type: List[str] + offset=None, # type: int + policy_ids=None, # type: List[str] + policy_names=None, # type: List[str] + sort=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.PolicyMemberGetResponse + """GET admins/settings/ssh-certificate-authority-policies + + List SSH Certificate Authority policies mapped as defaults for admins. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_arrays_ssh_certificate_authority_policies_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param str continuation_token: An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result. + :param str filter: Exclude resources that don't match the specified criteria. + :param int limit: Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the maximum number, the request is still valid. In that case the server just returns the maximum number of items, disregarding the client's page size request. + :param list[str] member_ids: A comma-separated list of member IDs. If after filtering, there is not at least one resource that matches each of the elements of `member_ids`, then an error is returned. This cannot be provided together with the `member_names` query parameter. + :param list[str] member_names: A comma-separated list of member names. + :param int offset: The offset of the first resource to return from a collection. + :param list[str] policy_ids: A comma-separated list of policy IDs. If after filtering, there is not at least one resource that matches each of the elements of `policy_ids`, then an error is returned. This cannot be provided together with the `policy_names` query parameter. + :param list[str] policy_names: A comma-separated list of policy names. + :param list[str] sort: Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: PolicyMemberGetResponse + If the method is called asynchronously, + returns the request thread. + """ + if member_ids is not None: + if not isinstance(member_ids, list): + member_ids = [member_ids] + if member_names is not None: + if not isinstance(member_names, list): + member_names = [member_names] + if policy_ids is not None: + if not isinstance(policy_ids, list): + policy_ids = [policy_ids] + if policy_names is not None: + if not isinstance(policy_names, list): + policy_names = [policy_names] + if sort is not None: + if not isinstance(sort, list): + sort = [sort] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + if 'limit' in params and params['limit'] < 1: + raise ValueError("Invalid value for parameter `limit` when calling `api214_arrays_ssh_certificate_authority_policies_get`, must be a value greater than or equal to `1`") + if 'offset' in params and params['offset'] < 0: + raise ValueError("Invalid value for parameter `offset` when calling `api214_arrays_ssh_certificate_authority_policies_get`, must be a value greater than or equal to `0`") + collection_formats = {} + path_params = {} + + query_params = [] + if 'continuation_token' in params: + query_params.append(('continuation_token', params['continuation_token'])) + if 'filter' in params: + query_params.append(('filter', params['filter'])) + if 'limit' in params: + query_params.append(('limit', params['limit'])) + if 'member_ids' in params: + query_params.append(('member_ids', params['member_ids'])) + collection_formats['member_ids'] = 'csv' + if 'member_names' in params: + query_params.append(('member_names', params['member_names'])) + collection_formats['member_names'] = 'csv' + if 'offset' in params: + query_params.append(('offset', params['offset'])) + if 'policy_ids' in params: + query_params.append(('policy_ids', params['policy_ids'])) + collection_formats['policy_ids'] = 'csv' + if 'policy_names' in params: + query_params.append(('policy_names', params['policy_names'])) + collection_formats['policy_names'] = 'csv' + if 'sort' in params: + query_params.append(('sort', params['sort'])) + collection_formats['sort'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/arrays/ssh-certificate-authority-policies', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PolicyMemberGetResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_arrays_ssh_certificate_authority_policies_post_with_http_info( + self, + x_request_id=None, # type: str + member_ids=None, # type: List[str] + member_names=None, # type: List[str] + policy_ids=None, # type: List[str] + policy_names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.PolicyMemberResponse + """POST admins/settings/ssh-certificate-authority-policies + + Map a SSH Certificate Authority policy as a default for admins. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_arrays_ssh_certificate_authority_policies_post_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param list[str] member_ids: A comma-separated list of member IDs. If after filtering, there is not at least one resource that matches each of the elements of `member_ids`, then an error is returned. This cannot be provided together with the `member_names` query parameter. + :param list[str] member_names: A comma-separated list of member names. + :param list[str] policy_ids: A comma-separated list of policy IDs. If after filtering, there is not at least one resource that matches each of the elements of `policy_ids`, then an error is returned. This cannot be provided together with the `policy_names` query parameter. + :param list[str] policy_names: A comma-separated list of policy names. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: PolicyMemberResponse + If the method is called asynchronously, + returns the request thread. + """ + if member_ids is not None: + if not isinstance(member_ids, list): + member_ids = [member_ids] + if member_names is not None: + if not isinstance(member_names, list): + member_names = [member_names] + if policy_ids is not None: + if not isinstance(policy_ids, list): + policy_ids = [policy_ids] + if policy_names is not None: + if not isinstance(policy_names, list): + policy_names = [policy_names] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + collection_formats = {} + path_params = {} + + query_params = [] + if 'member_ids' in params: + query_params.append(('member_ids', params['member_ids'])) + collection_formats['member_ids'] = 'csv' + if 'member_names' in params: + query_params.append(('member_names', params['member_names'])) + collection_formats['member_names'] = 'csv' + if 'policy_ids' in params: + query_params.append(('policy_ids', params['policy_ids'])) + collection_formats['policy_ids'] = 'csv' + if 'policy_names' in params: + query_params.append(('policy_names', params['policy_names'])) + collection_formats['policy_names'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/arrays/ssh-certificate-authority-policies', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PolicyMemberResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_ssh_certificate_authority_policies_admins_delete_with_http_info( + self, + x_request_id=None, # type: str + member_ids=None, # type: List[str] + member_names=None, # type: List[str] + policy_ids=None, # type: List[str] + policy_names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> None + """DELETE ssh-certificate-authority-policies/admins + + Remove a SSH Certificate Authority policy from a specific user. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_ssh_certificate_authority_policies_admins_delete_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param list[str] member_ids: A comma-separated list of member IDs. If after filtering, there is not at least one resource that matches each of the elements of `member_ids`, then an error is returned. This cannot be provided together with the `member_names` query parameter. + :param list[str] member_names: A comma-separated list of member names. + :param list[str] policy_ids: A comma-separated list of policy IDs. If after filtering, there is not at least one resource that matches each of the elements of `policy_ids`, then an error is returned. This cannot be provided together with the `policy_names` query parameter. + :param list[str] policy_names: A comma-separated list of policy names. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: None + If the method is called asynchronously, + returns the request thread. + """ + if member_ids is not None: + if not isinstance(member_ids, list): + member_ids = [member_ids] + if member_names is not None: + if not isinstance(member_names, list): + member_names = [member_names] + if policy_ids is not None: + if not isinstance(policy_ids, list): + policy_ids = [policy_ids] + if policy_names is not None: + if not isinstance(policy_names, list): + policy_names = [policy_names] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + collection_formats = {} + path_params = {} + + query_params = [] + if 'member_ids' in params: + query_params.append(('member_ids', params['member_ids'])) + collection_formats['member_ids'] = 'csv' + if 'member_names' in params: + query_params.append(('member_names', params['member_names'])) + collection_formats['member_names'] = 'csv' + if 'policy_ids' in params: + query_params.append(('policy_ids', params['policy_ids'])) + collection_formats['policy_ids'] = 'csv' + if 'policy_names' in params: + query_params.append(('policy_names', params['policy_names'])) + collection_formats['policy_names'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/ssh-certificate-authority-policies/admins', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_ssh_certificate_authority_policies_admins_get_with_http_info( + self, + x_request_id=None, # type: str + continuation_token=None, # type: str + filter=None, # type: str + limit=None, # type: int + member_ids=None, # type: List[str] + member_names=None, # type: List[str] + offset=None, # type: int + policy_ids=None, # type: List[str] + policy_names=None, # type: List[str] + sort=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.PolicyMemberGetResponse + """GET ssh-certificate-authority-policies/admins + + List SSH Certificate Authority policies mapped to specific users. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_ssh_certificate_authority_policies_admins_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param str continuation_token: An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result. + :param str filter: Exclude resources that don't match the specified criteria. + :param int limit: Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the maximum number, the request is still valid. In that case the server just returns the maximum number of items, disregarding the client's page size request. + :param list[str] member_ids: A comma-separated list of member IDs. If after filtering, there is not at least one resource that matches each of the elements of `member_ids`, then an error is returned. This cannot be provided together with the `member_names` query parameter. + :param list[str] member_names: A comma-separated list of member names. + :param int offset: The offset of the first resource to return from a collection. + :param list[str] policy_ids: A comma-separated list of policy IDs. If after filtering, there is not at least one resource that matches each of the elements of `policy_ids`, then an error is returned. This cannot be provided together with the `policy_names` query parameter. + :param list[str] policy_names: A comma-separated list of policy names. + :param list[str] sort: Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: PolicyMemberGetResponse + If the method is called asynchronously, + returns the request thread. + """ + if member_ids is not None: + if not isinstance(member_ids, list): + member_ids = [member_ids] + if member_names is not None: + if not isinstance(member_names, list): + member_names = [member_names] + if policy_ids is not None: + if not isinstance(policy_ids, list): + policy_ids = [policy_ids] + if policy_names is not None: + if not isinstance(policy_names, list): + policy_names = [policy_names] + if sort is not None: + if not isinstance(sort, list): + sort = [sort] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + if 'limit' in params and params['limit'] < 1: + raise ValueError("Invalid value for parameter `limit` when calling `api214_ssh_certificate_authority_policies_admins_get`, must be a value greater than or equal to `1`") + if 'offset' in params and params['offset'] < 0: + raise ValueError("Invalid value for parameter `offset` when calling `api214_ssh_certificate_authority_policies_admins_get`, must be a value greater than or equal to `0`") + collection_formats = {} + path_params = {} + + query_params = [] + if 'continuation_token' in params: + query_params.append(('continuation_token', params['continuation_token'])) + if 'filter' in params: + query_params.append(('filter', params['filter'])) + if 'limit' in params: + query_params.append(('limit', params['limit'])) + if 'member_ids' in params: + query_params.append(('member_ids', params['member_ids'])) + collection_formats['member_ids'] = 'csv' + if 'member_names' in params: + query_params.append(('member_names', params['member_names'])) + collection_formats['member_names'] = 'csv' + if 'offset' in params: + query_params.append(('offset', params['offset'])) + if 'policy_ids' in params: + query_params.append(('policy_ids', params['policy_ids'])) + collection_formats['policy_ids'] = 'csv' + if 'policy_names' in params: + query_params.append(('policy_names', params['policy_names'])) + collection_formats['policy_names'] = 'csv' + if 'sort' in params: + query_params.append(('sort', params['sort'])) + collection_formats['sort'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/ssh-certificate-authority-policies/admins', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PolicyMemberGetResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_ssh_certificate_authority_policies_admins_post_with_http_info( + self, + x_request_id=None, # type: str + member_ids=None, # type: List[str] + member_names=None, # type: List[str] + policy_ids=None, # type: List[str] + policy_names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.PolicyMemberResponse + """POST ssh-certificate-authority-policies/admins + + Map a SSH Certificate Authority policy to a specific user. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_ssh_certificate_authority_policies_admins_post_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param list[str] member_ids: A comma-separated list of member IDs. If after filtering, there is not at least one resource that matches each of the elements of `member_ids`, then an error is returned. This cannot be provided together with the `member_names` query parameter. + :param list[str] member_names: A comma-separated list of member names. + :param list[str] policy_ids: A comma-separated list of policy IDs. If after filtering, there is not at least one resource that matches each of the elements of `policy_ids`, then an error is returned. This cannot be provided together with the `policy_names` query parameter. + :param list[str] policy_names: A comma-separated list of policy names. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: PolicyMemberResponse + If the method is called asynchronously, + returns the request thread. + """ + if member_ids is not None: + if not isinstance(member_ids, list): + member_ids = [member_ids] + if member_names is not None: + if not isinstance(member_names, list): + member_names = [member_names] + if policy_ids is not None: + if not isinstance(policy_ids, list): + policy_ids = [policy_ids] + if policy_names is not None: + if not isinstance(policy_names, list): + policy_names = [policy_names] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + collection_formats = {} + path_params = {} + + query_params = [] + if 'member_ids' in params: + query_params.append(('member_ids', params['member_ids'])) + collection_formats['member_ids'] = 'csv' + if 'member_names' in params: + query_params.append(('member_names', params['member_names'])) + collection_formats['member_names'] = 'csv' + if 'policy_ids' in params: + query_params.append(('policy_ids', params['policy_ids'])) + collection_formats['policy_ids'] = 'csv' + if 'policy_names' in params: + query_params.append(('policy_names', params['policy_names'])) + collection_formats['policy_names'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/ssh-certificate-authority-policies/admins', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PolicyMemberResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_ssh_certificate_authority_policies_arrays_delete_with_http_info( + self, + x_request_id=None, # type: str + member_ids=None, # type: List[str] + member_names=None, # type: List[str] + policy_ids=None, # type: List[str] + policy_names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> None + """DELETE ssh-certificate-authority-policies/arrays + + Remove a SSH Certificate Authority policy from being a default for admins. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_ssh_certificate_authority_policies_arrays_delete_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param list[str] member_ids: A comma-separated list of member IDs. If after filtering, there is not at least one resource that matches each of the elements of `member_ids`, then an error is returned. This cannot be provided together with the `member_names` query parameter. + :param list[str] member_names: A comma-separated list of member names. + :param list[str] policy_ids: A comma-separated list of policy IDs. If after filtering, there is not at least one resource that matches each of the elements of `policy_ids`, then an error is returned. This cannot be provided together with the `policy_names` query parameter. + :param list[str] policy_names: A comma-separated list of policy names. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: None + If the method is called asynchronously, + returns the request thread. + """ + if member_ids is not None: + if not isinstance(member_ids, list): + member_ids = [member_ids] + if member_names is not None: + if not isinstance(member_names, list): + member_names = [member_names] + if policy_ids is not None: + if not isinstance(policy_ids, list): + policy_ids = [policy_ids] + if policy_names is not None: + if not isinstance(policy_names, list): + policy_names = [policy_names] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + collection_formats = {} + path_params = {} + + query_params = [] + if 'member_ids' in params: + query_params.append(('member_ids', params['member_ids'])) + collection_formats['member_ids'] = 'csv' + if 'member_names' in params: + query_params.append(('member_names', params['member_names'])) + collection_formats['member_names'] = 'csv' + if 'policy_ids' in params: + query_params.append(('policy_ids', params['policy_ids'])) + collection_formats['policy_ids'] = 'csv' + if 'policy_names' in params: + query_params.append(('policy_names', params['policy_names'])) + collection_formats['policy_names'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/ssh-certificate-authority-policies/arrays', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_ssh_certificate_authority_policies_arrays_get_with_http_info( + self, + x_request_id=None, # type: str + continuation_token=None, # type: str + filter=None, # type: str + limit=None, # type: int + member_ids=None, # type: List[str] + member_names=None, # type: List[str] + offset=None, # type: int + policy_ids=None, # type: List[str] + policy_names=None, # type: List[str] + sort=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.PolicyMemberGetResponse + """GET ssh-certificate-authority-policies/arrays + + List SSH Certificate Authority policies mapped as defaults for admins. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_ssh_certificate_authority_policies_arrays_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param str continuation_token: An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result. + :param str filter: Exclude resources that don't match the specified criteria. + :param int limit: Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the maximum number, the request is still valid. In that case the server just returns the maximum number of items, disregarding the client's page size request. + :param list[str] member_ids: A comma-separated list of member IDs. If after filtering, there is not at least one resource that matches each of the elements of `member_ids`, then an error is returned. This cannot be provided together with the `member_names` query parameter. + :param list[str] member_names: A comma-separated list of member names. + :param int offset: The offset of the first resource to return from a collection. + :param list[str] policy_ids: A comma-separated list of policy IDs. If after filtering, there is not at least one resource that matches each of the elements of `policy_ids`, then an error is returned. This cannot be provided together with the `policy_names` query parameter. + :param list[str] policy_names: A comma-separated list of policy names. + :param list[str] sort: Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: PolicyMemberGetResponse + If the method is called asynchronously, + returns the request thread. + """ + if member_ids is not None: + if not isinstance(member_ids, list): + member_ids = [member_ids] + if member_names is not None: + if not isinstance(member_names, list): + member_names = [member_names] + if policy_ids is not None: + if not isinstance(policy_ids, list): + policy_ids = [policy_ids] + if policy_names is not None: + if not isinstance(policy_names, list): + policy_names = [policy_names] + if sort is not None: + if not isinstance(sort, list): + sort = [sort] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + if 'limit' in params and params['limit'] < 1: + raise ValueError("Invalid value for parameter `limit` when calling `api214_ssh_certificate_authority_policies_arrays_get`, must be a value greater than or equal to `1`") + if 'offset' in params and params['offset'] < 0: + raise ValueError("Invalid value for parameter `offset` when calling `api214_ssh_certificate_authority_policies_arrays_get`, must be a value greater than or equal to `0`") + collection_formats = {} + path_params = {} + + query_params = [] + if 'continuation_token' in params: + query_params.append(('continuation_token', params['continuation_token'])) + if 'filter' in params: + query_params.append(('filter', params['filter'])) + if 'limit' in params: + query_params.append(('limit', params['limit'])) + if 'member_ids' in params: + query_params.append(('member_ids', params['member_ids'])) + collection_formats['member_ids'] = 'csv' + if 'member_names' in params: + query_params.append(('member_names', params['member_names'])) + collection_formats['member_names'] = 'csv' + if 'offset' in params: + query_params.append(('offset', params['offset'])) + if 'policy_ids' in params: + query_params.append(('policy_ids', params['policy_ids'])) + collection_formats['policy_ids'] = 'csv' + if 'policy_names' in params: + query_params.append(('policy_names', params['policy_names'])) + collection_formats['policy_names'] = 'csv' + if 'sort' in params: + query_params.append(('sort', params['sort'])) + collection_formats['sort'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/ssh-certificate-authority-policies/arrays', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PolicyMemberGetResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_ssh_certificate_authority_policies_arrays_post_with_http_info( + self, + x_request_id=None, # type: str + member_ids=None, # type: List[str] + member_names=None, # type: List[str] + policy_ids=None, # type: List[str] + policy_names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.PolicyMemberResponse + """POST ssh-certificate-authority-policies/arrays + + Map a SSH Certificate Authority policy as a default for admins. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_ssh_certificate_authority_policies_arrays_post_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param list[str] member_ids: A comma-separated list of member IDs. If after filtering, there is not at least one resource that matches each of the elements of `member_ids`, then an error is returned. This cannot be provided together with the `member_names` query parameter. + :param list[str] member_names: A comma-separated list of member names. + :param list[str] policy_ids: A comma-separated list of policy IDs. If after filtering, there is not at least one resource that matches each of the elements of `policy_ids`, then an error is returned. This cannot be provided together with the `policy_names` query parameter. + :param list[str] policy_names: A comma-separated list of policy names. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: PolicyMemberResponse + If the method is called asynchronously, + returns the request thread. + """ + if member_ids is not None: + if not isinstance(member_ids, list): + member_ids = [member_ids] + if member_names is not None: + if not isinstance(member_names, list): + member_names = [member_names] + if policy_ids is not None: + if not isinstance(policy_ids, list): + policy_ids = [policy_ids] + if policy_names is not None: + if not isinstance(policy_names, list): + policy_names = [policy_names] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + collection_formats = {} + path_params = {} + + query_params = [] + if 'member_ids' in params: + query_params.append(('member_ids', params['member_ids'])) + collection_formats['member_ids'] = 'csv' + if 'member_names' in params: + query_params.append(('member_names', params['member_names'])) + collection_formats['member_names'] = 'csv' + if 'policy_ids' in params: + query_params.append(('policy_ids', params['policy_ids'])) + collection_formats['policy_ids'] = 'csv' + if 'policy_names' in params: + query_params.append(('policy_names', params['policy_names'])) + collection_formats['policy_names'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/ssh-certificate-authority-policies/arrays', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PolicyMemberResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_ssh_certificate_authority_policies_delete_with_http_info( + self, + x_request_id=None, # type: str + ids=None, # type: List[str] + names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> None + """Delete SSH Certificate Authority configurations + + Deletes SSH Certificate Authority configurations. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_ssh_certificate_authority_policies_delete_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param list[str] ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :param list[str] names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: None + If the method is called asynchronously, + returns the request thread. + """ + if ids is not None: + if not isinstance(ids, list): + ids = [ids] + if names is not None: + if not isinstance(names, list): + names = [names] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + collection_formats = {} + path_params = {} + + query_params = [] + if 'ids' in params: + query_params.append(('ids', params['ids'])) + collection_formats['ids'] = 'csv' + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/ssh-certificate-authority-policies', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_ssh_certificate_authority_policies_get_with_http_info( + self, + x_request_id=None, # type: str + continuation_token=None, # type: str + filter=None, # type: str + ids=None, # type: List[str] + names=None, # type: List[str] + limit=None, # type: int + offset=None, # type: int + sort=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.SshCertificateAuthorityPolicyGetResponse + """List SSH Certificate Authority configurations + + List SSH Certificate Authority configurations + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_ssh_certificate_authority_policies_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param str continuation_token: An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result. + :param str filter: Exclude resources that don't match the specified criteria. + :param list[str] ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :param list[str] names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :param int limit: Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the maximum number, the request is still valid. In that case the server just returns the maximum number of items, disregarding the client's page size request. + :param int offset: The offset of the first resource to return from a collection. + :param list[str] sort: Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: SshCertificateAuthorityPolicyGetResponse + If the method is called asynchronously, + returns the request thread. + """ + if ids is not None: + if not isinstance(ids, list): + ids = [ids] + if names is not None: + if not isinstance(names, list): + names = [names] + if sort is not None: + if not isinstance(sort, list): + sort = [sort] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + if 'limit' in params and params['limit'] < 1: + raise ValueError("Invalid value for parameter `limit` when calling `api214_ssh_certificate_authority_policies_get`, must be a value greater than or equal to `1`") + if 'offset' in params and params['offset'] < 0: + raise ValueError("Invalid value for parameter `offset` when calling `api214_ssh_certificate_authority_policies_get`, must be a value greater than or equal to `0`") + collection_formats = {} + path_params = {} + + query_params = [] + if 'continuation_token' in params: + query_params.append(('continuation_token', params['continuation_token'])) + if 'filter' in params: + query_params.append(('filter', params['filter'])) + if 'ids' in params: + query_params.append(('ids', params['ids'])) + collection_formats['ids'] = 'csv' + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + if 'limit' in params: + query_params.append(('limit', params['limit'])) + if 'offset' in params: + query_params.append(('offset', params['offset'])) + if 'sort' in params: + query_params.append(('sort', params['sort'])) + collection_formats['sort'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/ssh-certificate-authority-policies', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='SshCertificateAuthorityPolicyGetResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_ssh_certificate_authority_policies_members_get_with_http_info( + self, + x_request_id=None, # type: str + continuation_token=None, # type: str + filter=None, # type: str + limit=None, # type: int + member_ids=None, # type: List[str] + member_names=None, # type: List[str] + offset=None, # type: int + policy_ids=None, # type: List[str] + policy_names=None, # type: List[str] + sort=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.PolicyMemberGetResponse + """GET ssh-certificate-authority-policies/members + + List SSH Certificate Authority policies mapped to the admin default settings, or to one or more specific users. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_ssh_certificate_authority_policies_members_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param str continuation_token: An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result. + :param str filter: Exclude resources that don't match the specified criteria. + :param int limit: Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the maximum number, the request is still valid. In that case the server just returns the maximum number of items, disregarding the client's page size request. + :param list[str] member_ids: A comma-separated list of member IDs. If after filtering, there is not at least one resource that matches each of the elements of `member_ids`, then an error is returned. This cannot be provided together with the `member_names` query parameter. + :param list[str] member_names: A comma-separated list of member names. + :param int offset: The offset of the first resource to return from a collection. + :param list[str] policy_ids: A comma-separated list of policy IDs. If after filtering, there is not at least one resource that matches each of the elements of `policy_ids`, then an error is returned. This cannot be provided together with the `policy_names` query parameter. + :param list[str] policy_names: A comma-separated list of policy names. + :param list[str] sort: Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: PolicyMemberGetResponse + If the method is called asynchronously, + returns the request thread. + """ + if member_ids is not None: + if not isinstance(member_ids, list): + member_ids = [member_ids] + if member_names is not None: + if not isinstance(member_names, list): + member_names = [member_names] + if policy_ids is not None: + if not isinstance(policy_ids, list): + policy_ids = [policy_ids] + if policy_names is not None: + if not isinstance(policy_names, list): + policy_names = [policy_names] + if sort is not None: + if not isinstance(sort, list): + sort = [sort] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + if 'limit' in params and params['limit'] < 1: + raise ValueError("Invalid value for parameter `limit` when calling `api214_ssh_certificate_authority_policies_members_get`, must be a value greater than or equal to `1`") + if 'offset' in params and params['offset'] < 0: + raise ValueError("Invalid value for parameter `offset` when calling `api214_ssh_certificate_authority_policies_members_get`, must be a value greater than or equal to `0`") + collection_formats = {} + path_params = {} + + query_params = [] + if 'continuation_token' in params: + query_params.append(('continuation_token', params['continuation_token'])) + if 'filter' in params: + query_params.append(('filter', params['filter'])) + if 'limit' in params: + query_params.append(('limit', params['limit'])) + if 'member_ids' in params: + query_params.append(('member_ids', params['member_ids'])) + collection_formats['member_ids'] = 'csv' + if 'member_names' in params: + query_params.append(('member_names', params['member_names'])) + collection_formats['member_names'] = 'csv' + if 'offset' in params: + query_params.append(('offset', params['offset'])) + if 'policy_ids' in params: + query_params.append(('policy_ids', params['policy_ids'])) + collection_formats['policy_ids'] = 'csv' + if 'policy_names' in params: + query_params.append(('policy_names', params['policy_names'])) + collection_formats['policy_names'] = 'csv' + if 'sort' in params: + query_params.append(('sort', params['sort'])) + collection_formats['sort'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/ssh-certificate-authority-policies/members', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PolicyMemberGetResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_ssh_certificate_authority_policies_patch_with_http_info( + self, + policy=None, # type: models.SshCertificateAuthorityPolicy + x_request_id=None, # type: str + ids=None, # type: List[str] + names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.SshCertificateAuthorityPolicyResponse + """Modify SSH Certificate Authority configurations + + Modifies one or more attributes of SSH Certificate Authority configurations. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_ssh_certificate_authority_policies_patch_with_http_info(policy, async_req=True) + >>> result = thread.get() + + :param SshCertificateAuthorityPolicy policy: (required) + :param str x_request_id: Supplied by client during request or generated by server. + :param list[str] ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :param list[str] names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: SshCertificateAuthorityPolicyResponse + If the method is called asynchronously, + returns the request thread. + """ + if ids is not None: + if not isinstance(ids, list): + ids = [ids] + if names is not None: + if not isinstance(names, list): + names = [names] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + # verify the required parameter 'policy' is set + if policy is None: + raise TypeError("Missing the required parameter `policy` when calling `api214_ssh_certificate_authority_policies_patch`") + + collection_formats = {} + path_params = {} + + query_params = [] + if 'ids' in params: + query_params.append(('ids', params['ids'])) + collection_formats['ids'] = 'csv' + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + if 'policy' in params: + body_params = params['policy'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/ssh-certificate-authority-policies', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='SshCertificateAuthorityPolicyResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_ssh_certificate_authority_policies_post_with_http_info( + self, + names=None, # type: List[str] + policy=None, # type: models.SshCertificateAuthorityPolicyPost + x_request_id=None, # type: str + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.SshCertificateAuthorityPolicyResponse + """Create SSH Certificate Authority configurations + + Creates SSH Certificate Authority configurations. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_ssh_certificate_authority_policies_post_with_http_info(names, policy, async_req=True) + >>> result = thread.get() + + :param list[str] names: A comma-separated list of resource names. (required) + :param SshCertificateAuthorityPolicyPost policy: (required) + :param str x_request_id: Supplied by client during request or generated by server. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: SshCertificateAuthorityPolicyResponse + If the method is called asynchronously, + returns the request thread. + """ + if names is not None: + if not isinstance(names, list): + names = [names] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + # verify the required parameter 'names' is set + if names is None: + raise TypeError("Missing the required parameter `names` when calling `api214_ssh_certificate_authority_policies_post`") + # verify the required parameter 'policy' is set + if policy is None: + raise TypeError("Missing the required parameter `policy` when calling `api214_ssh_certificate_authority_policies_post`") + + collection_formats = {} + path_params = {} + + query_params = [] + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + if 'policy' in params: + body_params = params['policy'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/ssh-certificate-authority-policies', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='SshCertificateAuthorityPolicyResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) diff --git a/pypureclient/flashblade/FB_2_14/api/policies__all_api.py b/pypureclient/flashblade/FB_2_14/api/policies__all_api.py new file mode 100644 index 000000000..baa0c4b05 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/api/policies__all_api.py @@ -0,0 +1,346 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import re + +# python 2 and python 3 compatibility library +import six +import uuid +from typing import List, Optional + +from .. import models + +class PoliciesAllApi(object): + + def __init__(self, api_client): + self.api_client = api_client + + def api214_policies_all_get_with_http_info( + self, + x_request_id=None, # type: str + continuation_token=None, # type: str + filter=None, # type: str + ids=None, # type: List[str] + limit=None, # type: int + names=None, # type: List[str] + offset=None, # type: int + sort=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.PolicyBaseGetResponse + """GET policies-all + + List all policies of all types. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_policies_all_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param str continuation_token: An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result. + :param str filter: Exclude resources that don't match the specified criteria. + :param list[str] ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :param int limit: Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the maximum number, the request is still valid. In that case the server just returns the maximum number of items, disregarding the client's page size request. + :param list[str] names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :param int offset: The offset of the first resource to return from a collection. + :param list[str] sort: Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: PolicyBaseGetResponse + If the method is called asynchronously, + returns the request thread. + """ + if ids is not None: + if not isinstance(ids, list): + ids = [ids] + if names is not None: + if not isinstance(names, list): + names = [names] + if sort is not None: + if not isinstance(sort, list): + sort = [sort] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + if 'limit' in params and params['limit'] < 1: + raise ValueError("Invalid value for parameter `limit` when calling `api214_policies_all_get`, must be a value greater than or equal to `1`") + if 'offset' in params and params['offset'] < 0: + raise ValueError("Invalid value for parameter `offset` when calling `api214_policies_all_get`, must be a value greater than or equal to `0`") + collection_formats = {} + path_params = {} + + query_params = [] + if 'continuation_token' in params: + query_params.append(('continuation_token', params['continuation_token'])) + if 'filter' in params: + query_params.append(('filter', params['filter'])) + if 'ids' in params: + query_params.append(('ids', params['ids'])) + collection_formats['ids'] = 'csv' + if 'limit' in params: + query_params.append(('limit', params['limit'])) + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + if 'offset' in params: + query_params.append(('offset', params['offset'])) + if 'sort' in params: + query_params.append(('sort', params['sort'])) + collection_formats['sort'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/policies-all', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PolicyBaseGetResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_policies_all_members_get_with_http_info( + self, + x_request_id=None, # type: str + continuation_token=None, # type: str + filter=None, # type: str + limit=None, # type: int + local_file_system_ids=None, # type: List[str] + local_file_system_names=None, # type: List[str] + member_ids=None, # type: List[str] + member_names=None, # type: List[str] + member_types=None, # type: List[models.ModelsFB214ResourceTypeYaml] + offset=None, # type: int + policy_ids=None, # type: List[str] + policy_names=None, # type: List[str] + remote_ids=None, # type: List[str] + remote_file_system_ids=None, # type: List[str] + remote_file_system_names=None, # type: List[str] + remote_names=None, # type: List[str] + sort=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.PolicyMemberWithRemoteGetResponse + """GET policies-all/members + + List policies (of all types) mapped to other entities (file systems, snapshots, file system replica links, and object store users). + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_policies_all_members_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param str continuation_token: An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result. + :param str filter: Exclude resources that don't match the specified criteria. + :param int limit: Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the maximum number, the request is still valid. In that case the server just returns the maximum number of items, disregarding the client's page size request. + :param list[str] local_file_system_ids: A comma-separated list of local file system IDs. If after filtering, there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `local_file_system_names` query parameter. + :param list[str] local_file_system_names: A comma-separated list of local file system names. If there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with `local_file_system_ids` query parameter. + :param list[str] member_ids: A comma-separated list of member IDs. If after filtering, there is not at least one resource that matches each of the elements of `member_ids`, then an error is returned. This cannot be provided together with the `member_names` query parameter. + :param list[str] member_names: A comma-separated list of member names. + :param list[ModelsFB214ResourceTypeYaml] member_types: A comma-separated list of member types. Valid values are `file-systems`, `file-system-snapshots`, `file-system-replica-links`, and `object-store-users`. Different endpoints may accept different subsets of these values. + :param int offset: The offset of the first resource to return from a collection. + :param list[str] policy_ids: A comma-separated list of policy IDs. If after filtering, there is not at least one resource that matches each of the elements of `policy_ids`, then an error is returned. This cannot be provided together with the `policy_names` query parameter. + :param list[str] policy_names: A comma-separated list of policy names. + :param list[str] remote_ids: A comma-separated list of remote array IDs. If after filtering, there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `remote_names` query parameter. + :param list[str] remote_file_system_ids: A comma-separated list of remote file system IDs. If there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `remote_file_system_names` query parameter. + :param list[str] remote_file_system_names: A comma-separated list of remote file system names. If there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `remote_file_system_ids` query parameter. + :param list[str] remote_names: A comma-separated list of remote array names. If there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with `remote_ids` query parameter. + :param list[str] sort: Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: PolicyMemberWithRemoteGetResponse + If the method is called asynchronously, + returns the request thread. + """ + if local_file_system_ids is not None: + if not isinstance(local_file_system_ids, list): + local_file_system_ids = [local_file_system_ids] + if local_file_system_names is not None: + if not isinstance(local_file_system_names, list): + local_file_system_names = [local_file_system_names] + if member_ids is not None: + if not isinstance(member_ids, list): + member_ids = [member_ids] + if member_names is not None: + if not isinstance(member_names, list): + member_names = [member_names] + if member_types is not None: + if not isinstance(member_types, list): + member_types = [member_types] + if policy_ids is not None: + if not isinstance(policy_ids, list): + policy_ids = [policy_ids] + if policy_names is not None: + if not isinstance(policy_names, list): + policy_names = [policy_names] + if remote_ids is not None: + if not isinstance(remote_ids, list): + remote_ids = [remote_ids] + if remote_file_system_ids is not None: + if not isinstance(remote_file_system_ids, list): + remote_file_system_ids = [remote_file_system_ids] + if remote_file_system_names is not None: + if not isinstance(remote_file_system_names, list): + remote_file_system_names = [remote_file_system_names] + if remote_names is not None: + if not isinstance(remote_names, list): + remote_names = [remote_names] + if sort is not None: + if not isinstance(sort, list): + sort = [sort] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + if 'limit' in params and params['limit'] < 1: + raise ValueError("Invalid value for parameter `limit` when calling `api214_policies_all_members_get`, must be a value greater than or equal to `1`") + if 'offset' in params and params['offset'] < 0: + raise ValueError("Invalid value for parameter `offset` when calling `api214_policies_all_members_get`, must be a value greater than or equal to `0`") + collection_formats = {} + path_params = {} + + query_params = [] + if 'continuation_token' in params: + query_params.append(('continuation_token', params['continuation_token'])) + if 'filter' in params: + query_params.append(('filter', params['filter'])) + if 'limit' in params: + query_params.append(('limit', params['limit'])) + if 'local_file_system_ids' in params: + query_params.append(('local_file_system_ids', params['local_file_system_ids'])) + collection_formats['local_file_system_ids'] = 'csv' + if 'local_file_system_names' in params: + query_params.append(('local_file_system_names', params['local_file_system_names'])) + collection_formats['local_file_system_names'] = 'csv' + if 'member_ids' in params: + query_params.append(('member_ids', params['member_ids'])) + collection_formats['member_ids'] = 'csv' + if 'member_names' in params: + query_params.append(('member_names', params['member_names'])) + collection_formats['member_names'] = 'csv' + if 'member_types' in params: + query_params.append(('member_types', params['member_types'])) + collection_formats['member_types'] = 'csv' + if 'offset' in params: + query_params.append(('offset', params['offset'])) + if 'policy_ids' in params: + query_params.append(('policy_ids', params['policy_ids'])) + collection_formats['policy_ids'] = 'csv' + if 'policy_names' in params: + query_params.append(('policy_names', params['policy_names'])) + collection_formats['policy_names'] = 'csv' + if 'remote_ids' in params: + query_params.append(('remote_ids', params['remote_ids'])) + collection_formats['remote_ids'] = 'csv' + if 'remote_file_system_ids' in params: + query_params.append(('remote_file_system_ids', params['remote_file_system_ids'])) + collection_formats['remote_file_system_ids'] = 'csv' + if 'remote_file_system_names' in params: + query_params.append(('remote_file_system_names', params['remote_file_system_names'])) + collection_formats['remote_file_system_names'] = 'csv' + if 'remote_names' in params: + query_params.append(('remote_names', params['remote_names'])) + collection_formats['remote_names'] = 'csv' + if 'sort' in params: + query_params.append(('sort', params['sort'])) + collection_formats['sort'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/policies-all/members', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PolicyMemberWithRemoteGetResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) diff --git a/pypureclient/flashblade/FB_2_14/api/public_keys_api.py b/pypureclient/flashblade/FB_2_14/api/public_keys_api.py new file mode 100644 index 000000000..4b9876c76 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/api/public_keys_api.py @@ -0,0 +1,466 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import re + +# python 2 and python 3 compatibility library +import six +import uuid +from typing import List, Optional + +from .. import models + +class PublicKeysApi(object): + + def __init__(self, api_client): + self.api_client = api_client + + def api214_public_keys_delete_with_http_info( + self, + x_request_id=None, # type: str + ids=None, # type: List[str] + names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> None + """Delete public key configurations + + Deletes public key configurations. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_public_keys_delete_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param list[str] ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :param list[str] names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: None + If the method is called asynchronously, + returns the request thread. + """ + if ids is not None: + if not isinstance(ids, list): + ids = [ids] + if names is not None: + if not isinstance(names, list): + names = [names] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + collection_formats = {} + path_params = {} + + query_params = [] + if 'ids' in params: + query_params.append(('ids', params['ids'])) + collection_formats['ids'] = 'csv' + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/public-keys', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_public_keys_get_with_http_info( + self, + x_request_id=None, # type: str + continuation_token=None, # type: str + filter=None, # type: str + ids=None, # type: List[str] + names=None, # type: List[str] + limit=None, # type: int + offset=None, # type: int + sort=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.PublicKeyGetResponse + """List public key configurations + + List public key configurations. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_public_keys_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param str continuation_token: An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result. + :param str filter: Exclude resources that don't match the specified criteria. + :param list[str] ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :param list[str] names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :param int limit: Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the maximum number, the request is still valid. In that case the server just returns the maximum number of items, disregarding the client's page size request. + :param int offset: The offset of the first resource to return from a collection. + :param list[str] sort: Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: PublicKeyGetResponse + If the method is called asynchronously, + returns the request thread. + """ + if ids is not None: + if not isinstance(ids, list): + ids = [ids] + if names is not None: + if not isinstance(names, list): + names = [names] + if sort is not None: + if not isinstance(sort, list): + sort = [sort] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + if 'limit' in params and params['limit'] < 1: + raise ValueError("Invalid value for parameter `limit` when calling `api214_public_keys_get`, must be a value greater than or equal to `1`") + if 'offset' in params and params['offset'] < 0: + raise ValueError("Invalid value for parameter `offset` when calling `api214_public_keys_get`, must be a value greater than or equal to `0`") + collection_formats = {} + path_params = {} + + query_params = [] + if 'continuation_token' in params: + query_params.append(('continuation_token', params['continuation_token'])) + if 'filter' in params: + query_params.append(('filter', params['filter'])) + if 'ids' in params: + query_params.append(('ids', params['ids'])) + collection_formats['ids'] = 'csv' + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + if 'limit' in params: + query_params.append(('limit', params['limit'])) + if 'offset' in params: + query_params.append(('offset', params['offset'])) + if 'sort' in params: + query_params.append(('sort', params['sort'])) + collection_formats['sort'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/public-keys', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PublicKeyGetResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_public_keys_post_with_http_info( + self, + names=None, # type: List[str] + public_key=None, # type: models.PublicKeyPost + x_request_id=None, # type: str + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.PublicKeyResponse + """Create public key configurations + + Creates public key configurations. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_public_keys_post_with_http_info(names, public_key, async_req=True) + >>> result = thread.get() + + :param list[str] names: A comma-separated list of resource names. (required) + :param PublicKeyPost public_key: (required) + :param str x_request_id: Supplied by client during request or generated by server. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: PublicKeyResponse + If the method is called asynchronously, + returns the request thread. + """ + if names is not None: + if not isinstance(names, list): + names = [names] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + # verify the required parameter 'names' is set + if names is None: + raise TypeError("Missing the required parameter `names` when calling `api214_public_keys_post`") + # verify the required parameter 'public_key' is set + if public_key is None: + raise TypeError("Missing the required parameter `public_key` when calling `api214_public_keys_post`") + + collection_formats = {} + path_params = {} + + query_params = [] + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + if 'public_key' in params: + body_params = params['public_key'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/public-keys', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PublicKeyResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_public_keys_uses_get_with_http_info( + self, + x_request_id=None, # type: str + continuation_token=None, # type: str + filter=None, # type: str + ids=None, # type: List[str] + limit=None, # type: int + names=None, # type: List[str] + offset=None, # type: int + sort=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.PublicKeyUseGetResponse + """GET public-keys/uses + + List how public keys are being used and by what. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_public_keys_uses_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param str continuation_token: An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result. + :param str filter: Exclude resources that don't match the specified criteria. + :param list[str] ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :param int limit: Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the maximum number, the request is still valid. In that case the server just returns the maximum number of items, disregarding the client's page size request. + :param list[str] names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :param int offset: The offset of the first resource to return from a collection. + :param list[str] sort: Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: PublicKeyUseGetResponse + If the method is called asynchronously, + returns the request thread. + """ + if ids is not None: + if not isinstance(ids, list): + ids = [ids] + if names is not None: + if not isinstance(names, list): + names = [names] + if sort is not None: + if not isinstance(sort, list): + sort = [sort] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + if 'limit' in params and params['limit'] < 1: + raise ValueError("Invalid value for parameter `limit` when calling `api214_public_keys_uses_get`, must be a value greater than or equal to `1`") + if 'offset' in params and params['offset'] < 0: + raise ValueError("Invalid value for parameter `offset` when calling `api214_public_keys_uses_get`, must be a value greater than or equal to `0`") + collection_formats = {} + path_params = {} + + query_params = [] + if 'continuation_token' in params: + query_params.append(('continuation_token', params['continuation_token'])) + if 'filter' in params: + query_params.append(('filter', params['filter'])) + if 'ids' in params: + query_params.append(('ids', params['ids'])) + collection_formats['ids'] = 'csv' + if 'limit' in params: + query_params.append(('limit', params['limit'])) + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + if 'offset' in params: + query_params.append(('offset', params['offset'])) + if 'sort' in params: + query_params.append(('sort', params['sort'])) + collection_formats['sort'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/public-keys/uses', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PublicKeyUseGetResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) diff --git a/pypureclient/flashblade/FB_2_14/api/quotas_api.py b/pypureclient/flashblade/FB_2_14/api/quotas_api.py new file mode 100644 index 000000000..772a0421c --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/api/quotas_api.py @@ -0,0 +1,1217 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import re + +# python 2 and python 3 compatibility library +import six +import uuid +from typing import List, Optional + +from .. import models + +class QuotasApi(object): + + def __init__(self, api_client): + self.api_client = api_client + + def api214_quotas_groups_delete_with_http_info( + self, + x_request_id=None, # type: str + file_system_names=None, # type: List[str] + file_system_ids=None, # type: List[str] + gids=None, # type: List[int] + group_names=None, # type: List[str] + names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> None + """DELETE quotas/groups + + Delete a hard limit quota for a group. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_quotas_groups_delete_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param list[str] file_system_names: A comma-separated list of file system names. If there is not at least one resource that matches each of the elements of `file_system_names`, then an error is returned. + :param list[str] file_system_ids: A comma-separated list of file system IDs. If after filtering, there is not at least one resource that matches each of the elements of `file_system_ids`, then an error is returned. This cannot be provided together with the `file_system_names` query parameter. + :param list[int] gids: A comma-separated list of group IDs. If there is not at least one resource that matches each of the elements of `gids`, then an error is returned. This cannot be provided together with `group_names` query parameter. + :param list[str] group_names: A comma-separated list of group names. If there is not at least one resource that matches each of the elements of `group_names`, then an error is returned. This cannot be provided together with `gids` query parameter. + :param list[str] names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: None + If the method is called asynchronously, + returns the request thread. + """ + if file_system_names is not None: + if not isinstance(file_system_names, list): + file_system_names = [file_system_names] + if file_system_ids is not None: + if not isinstance(file_system_ids, list): + file_system_ids = [file_system_ids] + if gids is not None: + if not isinstance(gids, list): + gids = [gids] + if group_names is not None: + if not isinstance(group_names, list): + group_names = [group_names] + if names is not None: + if not isinstance(names, list): + names = [names] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + collection_formats = {} + path_params = {} + + query_params = [] + if 'file_system_names' in params: + query_params.append(('file_system_names', params['file_system_names'])) + collection_formats['file_system_names'] = 'csv' + if 'file_system_ids' in params: + query_params.append(('file_system_ids', params['file_system_ids'])) + collection_formats['file_system_ids'] = 'csv' + if 'gids' in params: + query_params.append(('gids', params['gids'])) + collection_formats['gids'] = 'csv' + if 'group_names' in params: + query_params.append(('group_names', params['group_names'])) + collection_formats['group_names'] = 'csv' + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/quotas/groups', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_quotas_groups_get_with_http_info( + self, + x_request_id=None, # type: str + continuation_token=None, # type: str + file_system_ids=None, # type: List[str] + file_system_names=None, # type: List[str] + filter=None, # type: str + gids=None, # type: List[int] + group_names=None, # type: List[str] + limit=None, # type: int + names=None, # type: List[str] + offset=None, # type: int + sort=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.GroupQuotaGetResponse + """GET quotas/groups + + List groups with hard limit quotas. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_quotas_groups_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param str continuation_token: An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result. + :param list[str] file_system_ids: A comma-separated list of file system IDs. If after filtering, there is not at least one resource that matches each of the elements of `file_system_ids`, then an error is returned. This cannot be provided together with the `file_system_names` query parameter. + :param list[str] file_system_names: A comma-separated list of file system names. If there is not at least one resource that matches each of the elements of `file_system_names`, then an error is returned. + :param str filter: Exclude resources that don't match the specified criteria. + :param list[int] gids: A comma-separated list of group IDs. If there is not at least one resource that matches each of the elements of `gids`, then an error is returned. This cannot be provided together with `group_names` query parameter. + :param list[str] group_names: A comma-separated list of group names. If there is not at least one resource that matches each of the elements of `group_names`, then an error is returned. This cannot be provided together with `gids` query parameter. + :param int limit: Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the maximum number, the request is still valid. In that case the server just returns the maximum number of items, disregarding the client's page size request. + :param list[str] names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :param int offset: The offset of the first resource to return from a collection. + :param list[str] sort: Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: GroupQuotaGetResponse + If the method is called asynchronously, + returns the request thread. + """ + if file_system_ids is not None: + if not isinstance(file_system_ids, list): + file_system_ids = [file_system_ids] + if file_system_names is not None: + if not isinstance(file_system_names, list): + file_system_names = [file_system_names] + if gids is not None: + if not isinstance(gids, list): + gids = [gids] + if group_names is not None: + if not isinstance(group_names, list): + group_names = [group_names] + if names is not None: + if not isinstance(names, list): + names = [names] + if sort is not None: + if not isinstance(sort, list): + sort = [sort] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + if 'limit' in params and params['limit'] < 1: + raise ValueError("Invalid value for parameter `limit` when calling `api214_quotas_groups_get`, must be a value greater than or equal to `1`") + if 'offset' in params and params['offset'] < 0: + raise ValueError("Invalid value for parameter `offset` when calling `api214_quotas_groups_get`, must be a value greater than or equal to `0`") + collection_formats = {} + path_params = {} + + query_params = [] + if 'continuation_token' in params: + query_params.append(('continuation_token', params['continuation_token'])) + if 'file_system_ids' in params: + query_params.append(('file_system_ids', params['file_system_ids'])) + collection_formats['file_system_ids'] = 'csv' + if 'file_system_names' in params: + query_params.append(('file_system_names', params['file_system_names'])) + collection_formats['file_system_names'] = 'csv' + if 'filter' in params: + query_params.append(('filter', params['filter'])) + if 'gids' in params: + query_params.append(('gids', params['gids'])) + collection_formats['gids'] = 'csv' + if 'group_names' in params: + query_params.append(('group_names', params['group_names'])) + collection_formats['group_names'] = 'csv' + if 'limit' in params: + query_params.append(('limit', params['limit'])) + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + if 'offset' in params: + query_params.append(('offset', params['offset'])) + if 'sort' in params: + query_params.append(('sort', params['sort'])) + collection_formats['sort'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/quotas/groups', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='GroupQuotaGetResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_quotas_groups_patch_with_http_info( + self, + x_request_id=None, # type: str + file_system_names=None, # type: List[str] + file_system_ids=None, # type: List[str] + gids=None, # type: List[int] + group_names=None, # type: List[str] + names=None, # type: List[str] + quota=None, # type: models.GroupQuotaPatch + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.GroupQuotaResponse + """PATCH quotas/groups + + Modify a quota for a group. Note that if you modify a group's quota to a lower value and that group's usage has already exceeded the new value, writes will automatically halt until usage decreases below the new quota setting. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_quotas_groups_patch_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param list[str] file_system_names: A comma-separated list of file system names. If there is not at least one resource that matches each of the elements of `file_system_names`, then an error is returned. + :param list[str] file_system_ids: A comma-separated list of file system IDs. If after filtering, there is not at least one resource that matches each of the elements of `file_system_ids`, then an error is returned. This cannot be provided together with the `file_system_names` query parameter. + :param list[int] gids: A comma-separated list of group IDs. If there is not at least one resource that matches each of the elements of `gids`, then an error is returned. This cannot be provided together with `group_names` query parameter. + :param list[str] group_names: A comma-separated list of group names. If there is not at least one resource that matches each of the elements of `group_names`, then an error is returned. This cannot be provided together with `gids` query parameter. + :param list[str] names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :param GroupQuotaPatch quota: + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: GroupQuotaResponse + If the method is called asynchronously, + returns the request thread. + """ + if file_system_names is not None: + if not isinstance(file_system_names, list): + file_system_names = [file_system_names] + if file_system_ids is not None: + if not isinstance(file_system_ids, list): + file_system_ids = [file_system_ids] + if gids is not None: + if not isinstance(gids, list): + gids = [gids] + if group_names is not None: + if not isinstance(group_names, list): + group_names = [group_names] + if names is not None: + if not isinstance(names, list): + names = [names] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + collection_formats = {} + path_params = {} + + query_params = [] + if 'file_system_names' in params: + query_params.append(('file_system_names', params['file_system_names'])) + collection_formats['file_system_names'] = 'csv' + if 'file_system_ids' in params: + query_params.append(('file_system_ids', params['file_system_ids'])) + collection_formats['file_system_ids'] = 'csv' + if 'gids' in params: + query_params.append(('gids', params['gids'])) + collection_formats['gids'] = 'csv' + if 'group_names' in params: + query_params.append(('group_names', params['group_names'])) + collection_formats['group_names'] = 'csv' + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + if 'quota' in params: + body_params = params['quota'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/quotas/groups', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='GroupQuotaResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_quotas_groups_post_with_http_info( + self, + x_request_id=None, # type: str + file_system_ids=None, # type: List[str] + file_system_names=None, # type: List[str] + gids=None, # type: List[int] + group_names=None, # type: List[str] + quota=None, # type: models.GroupQuotaPost + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.GroupQuotaResponse + """POST quotas/groups + + Create a hard limit quota for a group. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_quotas_groups_post_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param list[str] file_system_ids: A comma-separated list of file system IDs. If after filtering, there is not at least one resource that matches each of the elements of `file_system_ids`, then an error is returned. This cannot be provided together with the `file_system_names` query parameter. + :param list[str] file_system_names: A comma-separated list of file system names. If there is not at least one resource that matches each of the elements of `file_system_names`, then an error is returned. + :param list[int] gids: A comma-separated list of group IDs. If there is not at least one resource that matches each of the elements of `gids`, then an error is returned. This cannot be provided together with `group_names` query parameter. + :param list[str] group_names: A comma-separated list of group names. If there is not at least one resource that matches each of the elements of `group_names`, then an error is returned. This cannot be provided together with `gids` query parameter. + :param GroupQuotaPost quota: + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: GroupQuotaResponse + If the method is called asynchronously, + returns the request thread. + """ + if file_system_ids is not None: + if not isinstance(file_system_ids, list): + file_system_ids = [file_system_ids] + if file_system_names is not None: + if not isinstance(file_system_names, list): + file_system_names = [file_system_names] + if gids is not None: + if not isinstance(gids, list): + gids = [gids] + if group_names is not None: + if not isinstance(group_names, list): + group_names = [group_names] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + collection_formats = {} + path_params = {} + + query_params = [] + if 'file_system_ids' in params: + query_params.append(('file_system_ids', params['file_system_ids'])) + collection_formats['file_system_ids'] = 'csv' + if 'file_system_names' in params: + query_params.append(('file_system_names', params['file_system_names'])) + collection_formats['file_system_names'] = 'csv' + if 'gids' in params: + query_params.append(('gids', params['gids'])) + collection_formats['gids'] = 'csv' + if 'group_names' in params: + query_params.append(('group_names', params['group_names'])) + collection_formats['group_names'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + if 'quota' in params: + body_params = params['quota'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/quotas/groups', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='GroupQuotaResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_quotas_settings_get_with_http_info( + self, + x_request_id=None, # type: str + ids=None, # type: List[str] + names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.QuotaSettingGetResponse + """GET quotas-settings + + List notification attributes of a group or user quota. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_quotas_settings_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param list[str] ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :param list[str] names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: QuotaSettingGetResponse + If the method is called asynchronously, + returns the request thread. + """ + if ids is not None: + if not isinstance(ids, list): + ids = [ids] + if names is not None: + if not isinstance(names, list): + names = [names] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + collection_formats = {} + path_params = {} + + query_params = [] + if 'ids' in params: + query_params.append(('ids', params['ids'])) + collection_formats['ids'] = 'csv' + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/quotas/settings', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='QuotaSettingGetResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_quotas_settings_patch_with_http_info( + self, + quota_setting=None, # type: models.QuotaSetting + x_request_id=None, # type: str + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.QuotaSettingResponse + """PATCH quotas-settings + + Modify the notification attributes of a group or user quota. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_quotas_settings_patch_with_http_info(quota_setting, async_req=True) + >>> result = thread.get() + + :param QuotaSetting quota_setting: (required) + :param str x_request_id: Supplied by client during request or generated by server. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: QuotaSettingResponse + If the method is called asynchronously, + returns the request thread. + """ + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + # verify the required parameter 'quota_setting' is set + if quota_setting is None: + raise TypeError("Missing the required parameter `quota_setting` when calling `api214_quotas_settings_patch`") + + collection_formats = {} + path_params = {} + + query_params = [] + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + if 'quota_setting' in params: + body_params = params['quota_setting'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/quotas/settings', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='QuotaSettingResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_quotas_users_delete_with_http_info( + self, + x_request_id=None, # type: str + file_system_names=None, # type: List[str] + file_system_ids=None, # type: List[str] + names=None, # type: List[str] + uids=None, # type: List[int] + user_names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> None + """DELETE quotas/users + + Delete a hard limit file system quota for a user. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_quotas_users_delete_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param list[str] file_system_names: A comma-separated list of file system names. If there is not at least one resource that matches each of the elements of `file_system_names`, then an error is returned. + :param list[str] file_system_ids: A comma-separated list of file system IDs. If after filtering, there is not at least one resource that matches each of the elements of `file_system_ids`, then an error is returned. This cannot be provided together with the `file_system_names` query parameter. + :param list[str] names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :param list[int] uids: A comma-separated list of user IDs. If there is not at least one resource that matches each of the elements of `uids`, then an error is returned. This cannot be provided together with `user_names` query parameter. + :param list[str] user_names: A comma-separated list of user names. If there is not at least one resource that matches each of the elements of `user_names`, then an error is returned. This cannot be provided together with `uids` query parameter. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: None + If the method is called asynchronously, + returns the request thread. + """ + if file_system_names is not None: + if not isinstance(file_system_names, list): + file_system_names = [file_system_names] + if file_system_ids is not None: + if not isinstance(file_system_ids, list): + file_system_ids = [file_system_ids] + if names is not None: + if not isinstance(names, list): + names = [names] + if uids is not None: + if not isinstance(uids, list): + uids = [uids] + if user_names is not None: + if not isinstance(user_names, list): + user_names = [user_names] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + collection_formats = {} + path_params = {} + + query_params = [] + if 'file_system_names' in params: + query_params.append(('file_system_names', params['file_system_names'])) + collection_formats['file_system_names'] = 'csv' + if 'file_system_ids' in params: + query_params.append(('file_system_ids', params['file_system_ids'])) + collection_formats['file_system_ids'] = 'csv' + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + if 'uids' in params: + query_params.append(('uids', params['uids'])) + collection_formats['uids'] = 'csv' + if 'user_names' in params: + query_params.append(('user_names', params['user_names'])) + collection_formats['user_names'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/quotas/users', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_quotas_users_get_with_http_info( + self, + x_request_id=None, # type: str + continuation_token=None, # type: str + file_system_ids=None, # type: List[str] + file_system_names=None, # type: List[str] + filter=None, # type: str + limit=None, # type: int + names=None, # type: List[str] + offset=None, # type: int + sort=None, # type: List[str] + uids=None, # type: List[int] + user_names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.UserQuotaGetResponse + """GET quotas/users + + List users with hard limit file system quotas. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_quotas_users_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param str continuation_token: An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result. + :param list[str] file_system_ids: A comma-separated list of file system IDs. If after filtering, there is not at least one resource that matches each of the elements of `file_system_ids`, then an error is returned. This cannot be provided together with the `file_system_names` query parameter. + :param list[str] file_system_names: A comma-separated list of file system names. If there is not at least one resource that matches each of the elements of `file_system_names`, then an error is returned. + :param str filter: Exclude resources that don't match the specified criteria. + :param int limit: Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the maximum number, the request is still valid. In that case the server just returns the maximum number of items, disregarding the client's page size request. + :param list[str] names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :param int offset: The offset of the first resource to return from a collection. + :param list[str] sort: Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response. + :param list[int] uids: A comma-separated list of user IDs. If there is not at least one resource that matches each of the elements of `uids`, then an error is returned. This cannot be provided together with `user_names` query parameter. + :param list[str] user_names: A comma-separated list of user names. If there is not at least one resource that matches each of the elements of `user_names`, then an error is returned. This cannot be provided together with `uids` query parameter. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: UserQuotaGetResponse + If the method is called asynchronously, + returns the request thread. + """ + if file_system_ids is not None: + if not isinstance(file_system_ids, list): + file_system_ids = [file_system_ids] + if file_system_names is not None: + if not isinstance(file_system_names, list): + file_system_names = [file_system_names] + if names is not None: + if not isinstance(names, list): + names = [names] + if sort is not None: + if not isinstance(sort, list): + sort = [sort] + if uids is not None: + if not isinstance(uids, list): + uids = [uids] + if user_names is not None: + if not isinstance(user_names, list): + user_names = [user_names] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + if 'limit' in params and params['limit'] < 1: + raise ValueError("Invalid value for parameter `limit` when calling `api214_quotas_users_get`, must be a value greater than or equal to `1`") + if 'offset' in params and params['offset'] < 0: + raise ValueError("Invalid value for parameter `offset` when calling `api214_quotas_users_get`, must be a value greater than or equal to `0`") + collection_formats = {} + path_params = {} + + query_params = [] + if 'continuation_token' in params: + query_params.append(('continuation_token', params['continuation_token'])) + if 'file_system_ids' in params: + query_params.append(('file_system_ids', params['file_system_ids'])) + collection_formats['file_system_ids'] = 'csv' + if 'file_system_names' in params: + query_params.append(('file_system_names', params['file_system_names'])) + collection_formats['file_system_names'] = 'csv' + if 'filter' in params: + query_params.append(('filter', params['filter'])) + if 'limit' in params: + query_params.append(('limit', params['limit'])) + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + if 'offset' in params: + query_params.append(('offset', params['offset'])) + if 'sort' in params: + query_params.append(('sort', params['sort'])) + collection_formats['sort'] = 'csv' + if 'uids' in params: + query_params.append(('uids', params['uids'])) + collection_formats['uids'] = 'csv' + if 'user_names' in params: + query_params.append(('user_names', params['user_names'])) + collection_formats['user_names'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/quotas/users', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='UserQuotaGetResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_quotas_users_patch_with_http_info( + self, + x_request_id=None, # type: str + file_system_names=None, # type: List[str] + file_system_ids=None, # type: List[str] + names=None, # type: List[str] + uids=None, # type: List[int] + user_names=None, # type: List[str] + quota=None, # type: models.UserQuotaPatch + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.UserQuotaResponse + """PATCH quotas/users + + Modify the attributes of a hard limit file system quota. Note that if you modify a user's quota to a lower value and that user’s usage has already exceeded the new value, writes will automatically halt until usage decreases below the new quota setting. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_quotas_users_patch_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param list[str] file_system_names: A comma-separated list of file system names. If there is not at least one resource that matches each of the elements of `file_system_names`, then an error is returned. + :param list[str] file_system_ids: A comma-separated list of file system IDs. If after filtering, there is not at least one resource that matches each of the elements of `file_system_ids`, then an error is returned. This cannot be provided together with the `file_system_names` query parameter. + :param list[str] names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :param list[int] uids: A comma-separated list of user IDs. If there is not at least one resource that matches each of the elements of `uids`, then an error is returned. This cannot be provided together with `user_names` query parameter. + :param list[str] user_names: A comma-separated list of user names. If there is not at least one resource that matches each of the elements of `user_names`, then an error is returned. This cannot be provided together with `uids` query parameter. + :param UserQuotaPatch quota: + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: UserQuotaResponse + If the method is called asynchronously, + returns the request thread. + """ + if file_system_names is not None: + if not isinstance(file_system_names, list): + file_system_names = [file_system_names] + if file_system_ids is not None: + if not isinstance(file_system_ids, list): + file_system_ids = [file_system_ids] + if names is not None: + if not isinstance(names, list): + names = [names] + if uids is not None: + if not isinstance(uids, list): + uids = [uids] + if user_names is not None: + if not isinstance(user_names, list): + user_names = [user_names] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + collection_formats = {} + path_params = {} + + query_params = [] + if 'file_system_names' in params: + query_params.append(('file_system_names', params['file_system_names'])) + collection_formats['file_system_names'] = 'csv' + if 'file_system_ids' in params: + query_params.append(('file_system_ids', params['file_system_ids'])) + collection_formats['file_system_ids'] = 'csv' + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + if 'uids' in params: + query_params.append(('uids', params['uids'])) + collection_formats['uids'] = 'csv' + if 'user_names' in params: + query_params.append(('user_names', params['user_names'])) + collection_formats['user_names'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + if 'quota' in params: + body_params = params['quota'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/quotas/users', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='UserQuotaResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_quotas_users_post_with_http_info( + self, + x_request_id=None, # type: str + file_system_ids=None, # type: List[str] + file_system_names=None, # type: List[str] + uids=None, # type: List[int] + user_names=None, # type: List[str] + quota=None, # type: models.UserQuotaPost + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.UserQuotaResponse + """POST quotas/users + + Create a hard limit file system quota for a user. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_quotas_users_post_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param list[str] file_system_ids: A comma-separated list of file system IDs. If after filtering, there is not at least one resource that matches each of the elements of `file_system_ids`, then an error is returned. This cannot be provided together with the `file_system_names` query parameter. + :param list[str] file_system_names: A comma-separated list of file system names. If there is not at least one resource that matches each of the elements of `file_system_names`, then an error is returned. + :param list[int] uids: A comma-separated list of user IDs. If there is not at least one resource that matches each of the elements of `uids`, then an error is returned. This cannot be provided together with `user_names` query parameter. + :param list[str] user_names: A comma-separated list of user names. If there is not at least one resource that matches each of the elements of `user_names`, then an error is returned. This cannot be provided together with `uids` query parameter. + :param UserQuotaPost quota: + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: UserQuotaResponse + If the method is called asynchronously, + returns the request thread. + """ + if file_system_ids is not None: + if not isinstance(file_system_ids, list): + file_system_ids = [file_system_ids] + if file_system_names is not None: + if not isinstance(file_system_names, list): + file_system_names = [file_system_names] + if uids is not None: + if not isinstance(uids, list): + uids = [uids] + if user_names is not None: + if not isinstance(user_names, list): + user_names = [user_names] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + collection_formats = {} + path_params = {} + + query_params = [] + if 'file_system_ids' in params: + query_params.append(('file_system_ids', params['file_system_ids'])) + collection_formats['file_system_ids'] = 'csv' + if 'file_system_names' in params: + query_params.append(('file_system_names', params['file_system_names'])) + collection_formats['file_system_names'] = 'csv' + if 'uids' in params: + query_params.append(('uids', params['uids'])) + collection_formats['uids'] = 'csv' + if 'user_names' in params: + query_params.append(('user_names', params['user_names'])) + collection_formats['user_names'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + if 'quota' in params: + body_params = params['quota'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/quotas/users', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='UserQuotaResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) diff --git a/pypureclient/flashblade/FB_2_14/api/rdl_api.py b/pypureclient/flashblade/FB_2_14/api/rdl_api.py new file mode 100644 index 000000000..183988ead --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/api/rdl_api.py @@ -0,0 +1,351 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import re + +# python 2 and python 3 compatibility library +import six +import uuid +from typing import List, Optional + +from .. import models + +class RDLApi(object): + + def __init__(self, api_client): + self.api_client = api_client + + def api214_rapid_data_locking_get_with_http_info( + self, + x_request_id=None, # type: str + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.RapidDataLockingResponse + """Get the status of the Rapid Data Locking feature. + + Displays the status of the Rapid Data Locking feature. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_rapid_data_locking_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: RapidDataLockingResponse + If the method is called asynchronously, + returns the request thread. + """ + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + collection_formats = {} + path_params = {} + + query_params = [] + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/rapid-data-locking', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='RapidDataLockingResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_rapid_data_locking_patch_with_http_info( + self, + rapid_data_locking=None, # type: models.RapidDataLocking + x_request_id=None, # type: str + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.RapidDataLockingResponse + """Modifies the Rapid Data Locking feature. + + Modifies the Rapid Data Locking feature. Note that the feature can only be enabled if there are no file systems nor buckets created on the array. Once enabled, the feature cannot be modified. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_rapid_data_locking_patch_with_http_info(rapid_data_locking, async_req=True) + >>> result = thread.get() + + :param RapidDataLocking rapid_data_locking: (required) + :param str x_request_id: Supplied by client during request or generated by server. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: RapidDataLockingResponse + If the method is called asynchronously, + returns the request thread. + """ + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + # verify the required parameter 'rapid_data_locking' is set + if rapid_data_locking is None: + raise TypeError("Missing the required parameter `rapid_data_locking` when calling `api214_rapid_data_locking_patch`") + + collection_formats = {} + path_params = {} + + query_params = [] + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + if 'rapid_data_locking' in params: + body_params = params['rapid_data_locking'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/rapid-data-locking', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='RapidDataLockingResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_rapid_data_locking_rotate_post_with_http_info( + self, + x_request_id=None, # type: str + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> None + """Rotates the external keys on the associated EKM appliance. + + Rotates the external keys on the associated EKM appliance. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_rapid_data_locking_rotate_post_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: None + If the method is called asynchronously, + returns the request thread. + """ + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + collection_formats = {} + path_params = {} + + query_params = [] + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/rapid-data-locking/rotate', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_rapid_data_locking_test_get_with_http_info( + self, + x_request_id=None, # type: str + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.TestResultResponse + """Displays Rapid Data Locking test results. + + Displays a detailed result of a Rapid Data Locking test. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_rapid_data_locking_test_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: TestResultResponse + If the method is called asynchronously, + returns the request thread. + """ + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + collection_formats = {} + path_params = {} + + query_params = [] + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/rapid-data-locking/test', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='TestResultResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) diff --git a/pypureclient/flashblade/FB_2_14/api/roles_api.py b/pypureclient/flashblade/FB_2_14/api/roles_api.py new file mode 100644 index 000000000..0f5e78229 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/api/roles_api.py @@ -0,0 +1,151 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import re + +# python 2 and python 3 compatibility library +import six +import uuid +from typing import List, Optional + +from .. import models + +class RolesApi(object): + + def __init__(self, api_client): + self.api_client = api_client + + def api214_roles_get_with_http_info( + self, + x_request_id=None, # type: str + continuation_token=None, # type: str + ids=None, # type: List[str] + filter=None, # type: str + limit=None, # type: int + names=None, # type: List[str] + offset=None, # type: int + sort=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.RoleGetResponse + """GET roles + + List roles and permission attributes for role-based access control (RBAC). + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_roles_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param str continuation_token: An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result. + :param list[str] ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :param str filter: Exclude resources that don't match the specified criteria. + :param int limit: Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the maximum number, the request is still valid. In that case the server just returns the maximum number of items, disregarding the client's page size request. + :param list[str] names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :param int offset: The offset of the first resource to return from a collection. + :param list[str] sort: Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: RoleGetResponse + If the method is called asynchronously, + returns the request thread. + """ + if ids is not None: + if not isinstance(ids, list): + ids = [ids] + if names is not None: + if not isinstance(names, list): + names = [names] + if sort is not None: + if not isinstance(sort, list): + sort = [sort] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + if 'limit' in params and params['limit'] < 1: + raise ValueError("Invalid value for parameter `limit` when calling `api214_roles_get`, must be a value greater than or equal to `1`") + if 'offset' in params and params['offset'] < 0: + raise ValueError("Invalid value for parameter `offset` when calling `api214_roles_get`, must be a value greater than or equal to `0`") + collection_formats = {} + path_params = {} + + query_params = [] + if 'continuation_token' in params: + query_params.append(('continuation_token', params['continuation_token'])) + if 'ids' in params: + query_params.append(('ids', params['ids'])) + collection_formats['ids'] = 'csv' + if 'filter' in params: + query_params.append(('filter', params['filter'])) + if 'limit' in params: + query_params.append(('limit', params['limit'])) + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + if 'offset' in params: + query_params.append(('offset', params['offset'])) + if 'sort' in params: + query_params.append(('sort', params['sort'])) + collection_formats['sort'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/roles', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='RoleGetResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) diff --git a/pypureclient/flashblade/FB_2_14/api/sessions_api.py b/pypureclient/flashblade/FB_2_14/api/sessions_api.py new file mode 100644 index 000000000..82a087cdd --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/api/sessions_api.py @@ -0,0 +1,151 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import re + +# python 2 and python 3 compatibility library +import six +import uuid +from typing import List, Optional + +from .. import models + +class SessionsApi(object): + + def __init__(self, api_client): + self.api_client = api_client + + def api214_sessions_get_with_http_info( + self, + x_request_id=None, # type: str + continuation_token=None, # type: str + filter=None, # type: str + ids=None, # type: List[str] + limit=None, # type: int + names=None, # type: List[str] + offset=None, # type: int + sort=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.SessionGetResponse + """List session data + + Displays session data for user login events performed in the Purity//FB GUI, CLI, and REST API. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_sessions_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param str continuation_token: An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result. + :param str filter: Exclude resources that don't match the specified criteria. + :param list[str] ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :param int limit: Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the maximum number, the request is still valid. In that case the server just returns the maximum number of items, disregarding the client's page size request. + :param list[str] names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :param int offset: The offset of the first resource to return from a collection. + :param list[str] sort: Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: SessionGetResponse + If the method is called asynchronously, + returns the request thread. + """ + if ids is not None: + if not isinstance(ids, list): + ids = [ids] + if names is not None: + if not isinstance(names, list): + names = [names] + if sort is not None: + if not isinstance(sort, list): + sort = [sort] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + if 'limit' in params and params['limit'] < 1: + raise ValueError("Invalid value for parameter `limit` when calling `api214_sessions_get`, must be a value greater than or equal to `1`") + if 'offset' in params and params['offset'] < 0: + raise ValueError("Invalid value for parameter `offset` when calling `api214_sessions_get`, must be a value greater than or equal to `0`") + collection_formats = {} + path_params = {} + + query_params = [] + if 'continuation_token' in params: + query_params.append(('continuation_token', params['continuation_token'])) + if 'filter' in params: + query_params.append(('filter', params['filter'])) + if 'ids' in params: + query_params.append(('ids', params['ids'])) + collection_formats['ids'] = 'csv' + if 'limit' in params: + query_params.append(('limit', params['limit'])) + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + if 'offset' in params: + query_params.append(('offset', params['offset'])) + if 'sort' in params: + query_params.append(('sort', params['sort'])) + collection_formats['sort'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/sessions', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='SessionGetResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) diff --git a/pypureclient/flashblade/FB_2_14/api/smtp_api.py b/pypureclient/flashblade/FB_2_14/api/smtp_api.py new file mode 100644 index 000000000..079b0426a --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/api/smtp_api.py @@ -0,0 +1,237 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import re + +# python 2 and python 3 compatibility library +import six +import uuid +from typing import List, Optional + +from .. import models + +class SMTPApi(object): + + def __init__(self, api_client): + self.api_client = api_client + + def api214_smtp_servers_get_with_http_info( + self, + x_request_id=None, # type: str + continuation_token=None, # type: str + filter=None, # type: str + ids=None, # type: List[str] + limit=None, # type: int + names=None, # type: List[str] + offset=None, # type: int + sort=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.SmtpServerGetResponse + """GET smtp-servers + + List SMTP server attributes for the array network. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_smtp_servers_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param str continuation_token: An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result. + :param str filter: Exclude resources that don't match the specified criteria. + :param list[str] ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :param int limit: Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the maximum number, the request is still valid. In that case the server just returns the maximum number of items, disregarding the client's page size request. + :param list[str] names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :param int offset: The offset of the first resource to return from a collection. + :param list[str] sort: Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: SmtpServerGetResponse + If the method is called asynchronously, + returns the request thread. + """ + if ids is not None: + if not isinstance(ids, list): + ids = [ids] + if names is not None: + if not isinstance(names, list): + names = [names] + if sort is not None: + if not isinstance(sort, list): + sort = [sort] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + if 'limit' in params and params['limit'] < 1: + raise ValueError("Invalid value for parameter `limit` when calling `api214_smtp_servers_get`, must be a value greater than or equal to `1`") + if 'offset' in params and params['offset'] < 0: + raise ValueError("Invalid value for parameter `offset` when calling `api214_smtp_servers_get`, must be a value greater than or equal to `0`") + collection_formats = {} + path_params = {} + + query_params = [] + if 'continuation_token' in params: + query_params.append(('continuation_token', params['continuation_token'])) + if 'filter' in params: + query_params.append(('filter', params['filter'])) + if 'ids' in params: + query_params.append(('ids', params['ids'])) + collection_formats['ids'] = 'csv' + if 'limit' in params: + query_params.append(('limit', params['limit'])) + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + if 'offset' in params: + query_params.append(('offset', params['offset'])) + if 'sort' in params: + query_params.append(('sort', params['sort'])) + collection_formats['sort'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/smtp-servers', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='SmtpServerGetResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_smtp_servers_patch_with_http_info( + self, + smtp=None, # type: models.SmtpServer + x_request_id=None, # type: str + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.SmtpServerResponse + """PATCH smtp-servers + + Modify SMTP server attributes such as the relay host and sender domain. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_smtp_servers_patch_with_http_info(smtp, async_req=True) + >>> result = thread.get() + + :param SmtpServer smtp: (required) + :param str x_request_id: Supplied by client during request or generated by server. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: SmtpServerResponse + If the method is called asynchronously, + returns the request thread. + """ + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + # verify the required parameter 'smtp' is set + if smtp is None: + raise TypeError("Missing the required parameter `smtp` when calling `api214_smtp_servers_patch`") + + collection_formats = {} + path_params = {} + + query_params = [] + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + if 'smtp' in params: + body_params = params['smtp'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/smtp-servers', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='SmtpServerResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) diff --git a/pypureclient/flashblade/FB_2_14/api/snmp_agents_api.py b/pypureclient/flashblade/FB_2_14/api/snmp_agents_api.py new file mode 100644 index 000000000..4819f2760 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/api/snmp_agents_api.py @@ -0,0 +1,316 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import re + +# python 2 and python 3 compatibility library +import six +import uuid +from typing import List, Optional + +from .. import models + +class SNMPAgentsApi(object): + + def __init__(self, api_client): + self.api_client = api_client + + def api214_snmp_agents_get_with_http_info( + self, + x_request_id=None, # type: str + continuation_token=None, # type: str + filter=None, # type: str + ids=None, # type: List[str] + limit=None, # type: int + names=None, # type: List[str] + offset=None, # type: int + sort=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.SnmpAgentGetResponse + """GET snmp-agents + + List SNMP agent attributes. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_snmp_agents_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param str continuation_token: An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result. + :param str filter: Exclude resources that don't match the specified criteria. + :param list[str] ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :param int limit: Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the maximum number, the request is still valid. In that case the server just returns the maximum number of items, disregarding the client's page size request. + :param list[str] names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :param int offset: The offset of the first resource to return from a collection. + :param list[str] sort: Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: SnmpAgentGetResponse + If the method is called asynchronously, + returns the request thread. + """ + if ids is not None: + if not isinstance(ids, list): + ids = [ids] + if names is not None: + if not isinstance(names, list): + names = [names] + if sort is not None: + if not isinstance(sort, list): + sort = [sort] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + if 'limit' in params and params['limit'] < 1: + raise ValueError("Invalid value for parameter `limit` when calling `api214_snmp_agents_get`, must be a value greater than or equal to `1`") + if 'offset' in params and params['offset'] < 0: + raise ValueError("Invalid value for parameter `offset` when calling `api214_snmp_agents_get`, must be a value greater than or equal to `0`") + collection_formats = {} + path_params = {} + + query_params = [] + if 'continuation_token' in params: + query_params.append(('continuation_token', params['continuation_token'])) + if 'filter' in params: + query_params.append(('filter', params['filter'])) + if 'ids' in params: + query_params.append(('ids', params['ids'])) + collection_formats['ids'] = 'csv' + if 'limit' in params: + query_params.append(('limit', params['limit'])) + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + if 'offset' in params: + query_params.append(('offset', params['offset'])) + if 'sort' in params: + query_params.append(('sort', params['sort'])) + collection_formats['sort'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/snmp-agents', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='SnmpAgentGetResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_snmp_agents_mib_get_with_http_info( + self, + x_request_id=None, # type: str + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.SnmpAgentMibResponse + """GET snmp-agents-mib + + List the SNMP MIB text. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_snmp_agents_mib_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: SnmpAgentMibResponse + If the method is called asynchronously, + returns the request thread. + """ + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + collection_formats = {} + path_params = {} + + query_params = [] + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/snmp-agents/mib', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='SnmpAgentMibResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_snmp_agents_patch_with_http_info( + self, + snmp_agent=None, # type: models.SnmpAgent + x_request_id=None, # type: str + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.SnmpAgentResponse + """PATCH snmp-agents + + Modify SNMP agent attributes. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_snmp_agents_patch_with_http_info(snmp_agent, async_req=True) + >>> result = thread.get() + + :param SnmpAgent snmp_agent: (required) + :param str x_request_id: Supplied by client during request or generated by server. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: SnmpAgentResponse + If the method is called asynchronously, + returns the request thread. + """ + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + # verify the required parameter 'snmp_agent' is set + if snmp_agent is None: + raise TypeError("Missing the required parameter `snmp_agent` when calling `api214_snmp_agents_patch`") + + collection_formats = {} + path_params = {} + + query_params = [] + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + if 'snmp_agent' in params: + body_params = params['snmp_agent'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/snmp-agents', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='SnmpAgentResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) diff --git a/pypureclient/flashblade/FB_2_14/api/snmp_managers_api.py b/pypureclient/flashblade/FB_2_14/api/snmp_managers_api.py new file mode 100644 index 000000000..555ff9339 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/api/snmp_managers_api.py @@ -0,0 +1,568 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import re + +# python 2 and python 3 compatibility library +import six +import uuid +from typing import List, Optional + +from .. import models + +class SNMPManagersApi(object): + + def __init__(self, api_client): + self.api_client = api_client + + def api214_snmp_managers_delete_with_http_info( + self, + x_request_id=None, # type: str + ids=None, # type: List[str] + names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> None + """DELETE snmp-managers + + Remove an SNMP manager. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_snmp_managers_delete_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param list[str] ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :param list[str] names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: None + If the method is called asynchronously, + returns the request thread. + """ + if ids is not None: + if not isinstance(ids, list): + ids = [ids] + if names is not None: + if not isinstance(names, list): + names = [names] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + collection_formats = {} + path_params = {} + + query_params = [] + if 'ids' in params: + query_params.append(('ids', params['ids'])) + collection_formats['ids'] = 'csv' + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/snmp-managers', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_snmp_managers_get_with_http_info( + self, + x_request_id=None, # type: str + continuation_token=None, # type: str + ids=None, # type: List[str] + filter=None, # type: str + limit=None, # type: int + names=None, # type: List[str] + offset=None, # type: int + sort=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.SnmpManagerGetResponse + """GET snmp-managers + + List SNMP managers and their attributes. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_snmp_managers_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param str continuation_token: An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result. + :param list[str] ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :param str filter: Exclude resources that don't match the specified criteria. + :param int limit: Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the maximum number, the request is still valid. In that case the server just returns the maximum number of items, disregarding the client's page size request. + :param list[str] names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :param int offset: The offset of the first resource to return from a collection. + :param list[str] sort: Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: SnmpManagerGetResponse + If the method is called asynchronously, + returns the request thread. + """ + if ids is not None: + if not isinstance(ids, list): + ids = [ids] + if names is not None: + if not isinstance(names, list): + names = [names] + if sort is not None: + if not isinstance(sort, list): + sort = [sort] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + if 'limit' in params and params['limit'] < 1: + raise ValueError("Invalid value for parameter `limit` when calling `api214_snmp_managers_get`, must be a value greater than or equal to `1`") + if 'offset' in params and params['offset'] < 0: + raise ValueError("Invalid value for parameter `offset` when calling `api214_snmp_managers_get`, must be a value greater than or equal to `0`") + collection_formats = {} + path_params = {} + + query_params = [] + if 'continuation_token' in params: + query_params.append(('continuation_token', params['continuation_token'])) + if 'ids' in params: + query_params.append(('ids', params['ids'])) + collection_formats['ids'] = 'csv' + if 'filter' in params: + query_params.append(('filter', params['filter'])) + if 'limit' in params: + query_params.append(('limit', params['limit'])) + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + if 'offset' in params: + query_params.append(('offset', params['offset'])) + if 'sort' in params: + query_params.append(('sort', params['sort'])) + collection_formats['sort'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/snmp-managers', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='SnmpManagerGetResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_snmp_managers_patch_with_http_info( + self, + snmp_manager=None, # type: models.SnmpManager + x_request_id=None, # type: str + ids=None, # type: List[str] + names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.SnmpManagerResponse + """PATCH snmp-managers + + Modify SNMP manager attributes such as versions. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_snmp_managers_patch_with_http_info(snmp_manager, async_req=True) + >>> result = thread.get() + + :param SnmpManager snmp_manager: (required) + :param str x_request_id: Supplied by client during request or generated by server. + :param list[str] ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :param list[str] names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: SnmpManagerResponse + If the method is called asynchronously, + returns the request thread. + """ + if ids is not None: + if not isinstance(ids, list): + ids = [ids] + if names is not None: + if not isinstance(names, list): + names = [names] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + # verify the required parameter 'snmp_manager' is set + if snmp_manager is None: + raise TypeError("Missing the required parameter `snmp_manager` when calling `api214_snmp_managers_patch`") + + collection_formats = {} + path_params = {} + + query_params = [] + if 'ids' in params: + query_params.append(('ids', params['ids'])) + collection_formats['ids'] = 'csv' + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + if 'snmp_manager' in params: + body_params = params['snmp_manager'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/snmp-managers', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='SnmpManagerResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_snmp_managers_post_with_http_info( + self, + snmp_manager=None, # type: models.SnmpManagerPost + names=None, # type: List[str] + x_request_id=None, # type: str + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.SnmpManagerResponse + """POST snmp-managers + + Create an SNMP manager. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_snmp_managers_post_with_http_info(snmp_manager, names, async_req=True) + >>> result = thread.get() + + :param SnmpManagerPost snmp_manager: (required) + :param list[str] names: A comma-separated list of resource names. (required) + :param str x_request_id: Supplied by client during request or generated by server. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: SnmpManagerResponse + If the method is called asynchronously, + returns the request thread. + """ + if names is not None: + if not isinstance(names, list): + names = [names] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + # verify the required parameter 'snmp_manager' is set + if snmp_manager is None: + raise TypeError("Missing the required parameter `snmp_manager` when calling `api214_snmp_managers_post`") + # verify the required parameter 'names' is set + if names is None: + raise TypeError("Missing the required parameter `names` when calling `api214_snmp_managers_post`") + + collection_formats = {} + path_params = {} + + query_params = [] + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + if 'snmp_manager' in params: + body_params = params['snmp_manager'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/snmp-managers', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='SnmpManagerResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_snmp_managers_test_get_with_http_info( + self, + x_request_id=None, # type: str + continuation_token=None, # type: str + ids=None, # type: List[str] + filter=None, # type: str + limit=None, # type: int + names=None, # type: List[str] + offset=None, # type: int + sort=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.TestResultGetResponse + """GET snmp-managers/test + + Test if the configuration of an SNMP manager is valid. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_snmp_managers_test_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param str continuation_token: An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result. + :param list[str] ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :param str filter: Exclude resources that don't match the specified criteria. + :param int limit: Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the maximum number, the request is still valid. In that case the server just returns the maximum number of items, disregarding the client's page size request. + :param list[str] names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :param int offset: The offset of the first resource to return from a collection. + :param list[str] sort: Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: TestResultGetResponse + If the method is called asynchronously, + returns the request thread. + """ + if ids is not None: + if not isinstance(ids, list): + ids = [ids] + if names is not None: + if not isinstance(names, list): + names = [names] + if sort is not None: + if not isinstance(sort, list): + sort = [sort] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + if 'limit' in params and params['limit'] < 1: + raise ValueError("Invalid value for parameter `limit` when calling `api214_snmp_managers_test_get`, must be a value greater than or equal to `1`") + if 'offset' in params and params['offset'] < 0: + raise ValueError("Invalid value for parameter `offset` when calling `api214_snmp_managers_test_get`, must be a value greater than or equal to `0`") + collection_formats = {} + path_params = {} + + query_params = [] + if 'continuation_token' in params: + query_params.append(('continuation_token', params['continuation_token'])) + if 'ids' in params: + query_params.append(('ids', params['ids'])) + collection_formats['ids'] = 'csv' + if 'filter' in params: + query_params.append(('filter', params['filter'])) + if 'limit' in params: + query_params.append(('limit', params['limit'])) + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + if 'offset' in params: + query_params.append(('offset', params['offset'])) + if 'sort' in params: + query_params.append(('sort', params['sort'])) + collection_formats['sort'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/snmp-managers/test', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='TestResultGetResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) diff --git a/pypureclient/flashblade/FB_2_14/api/subnets_api.py b/pypureclient/flashblade/FB_2_14/api/subnets_api.py new file mode 100644 index 000000000..244da89ae --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/api/subnets_api.py @@ -0,0 +1,445 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import re + +# python 2 and python 3 compatibility library +import six +import uuid +from typing import List, Optional + +from .. import models + +class SubnetsApi(object): + + def __init__(self, api_client): + self.api_client = api_client + + def api214_subnets_delete_with_http_info( + self, + x_request_id=None, # type: str + ids=None, # type: List[str] + names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> None + """DELETE subnets + + Remove an array subnet. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_subnets_delete_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param list[str] ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :param list[str] names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: None + If the method is called asynchronously, + returns the request thread. + """ + if ids is not None: + if not isinstance(ids, list): + ids = [ids] + if names is not None: + if not isinstance(names, list): + names = [names] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + collection_formats = {} + path_params = {} + + query_params = [] + if 'ids' in params: + query_params.append(('ids', params['ids'])) + collection_formats['ids'] = 'csv' + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/subnets', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_subnets_get_with_http_info( + self, + x_request_id=None, # type: str + continuation_token=None, # type: str + filter=None, # type: str + ids=None, # type: List[str] + limit=None, # type: int + names=None, # type: List[str] + offset=None, # type: int + sort=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.SubnetGetResponse + """GET subnets + + List the array’s subnets. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_subnets_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param str continuation_token: An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result. + :param str filter: Exclude resources that don't match the specified criteria. + :param list[str] ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :param int limit: Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the maximum number, the request is still valid. In that case the server just returns the maximum number of items, disregarding the client's page size request. + :param list[str] names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :param int offset: The offset of the first resource to return from a collection. + :param list[str] sort: Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: SubnetGetResponse + If the method is called asynchronously, + returns the request thread. + """ + if ids is not None: + if not isinstance(ids, list): + ids = [ids] + if names is not None: + if not isinstance(names, list): + names = [names] + if sort is not None: + if not isinstance(sort, list): + sort = [sort] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + if 'limit' in params and params['limit'] < 1: + raise ValueError("Invalid value for parameter `limit` when calling `api214_subnets_get`, must be a value greater than or equal to `1`") + if 'offset' in params and params['offset'] < 0: + raise ValueError("Invalid value for parameter `offset` when calling `api214_subnets_get`, must be a value greater than or equal to `0`") + collection_formats = {} + path_params = {} + + query_params = [] + if 'continuation_token' in params: + query_params.append(('continuation_token', params['continuation_token'])) + if 'filter' in params: + query_params.append(('filter', params['filter'])) + if 'ids' in params: + query_params.append(('ids', params['ids'])) + collection_formats['ids'] = 'csv' + if 'limit' in params: + query_params.append(('limit', params['limit'])) + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + if 'offset' in params: + query_params.append(('offset', params['offset'])) + if 'sort' in params: + query_params.append(('sort', params['sort'])) + collection_formats['sort'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/subnets', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='SubnetGetResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_subnets_patch_with_http_info( + self, + subnet=None, # type: models.Subnet + x_request_id=None, # type: str + ids=None, # type: List[str] + names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.SubnetResponse + """PATCH subnets + + Modify array subnet attributes. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_subnets_patch_with_http_info(subnet, async_req=True) + >>> result = thread.get() + + :param Subnet subnet: (required) + :param str x_request_id: Supplied by client during request or generated by server. + :param list[str] ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :param list[str] names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: SubnetResponse + If the method is called asynchronously, + returns the request thread. + """ + if ids is not None: + if not isinstance(ids, list): + ids = [ids] + if names is not None: + if not isinstance(names, list): + names = [names] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + # verify the required parameter 'subnet' is set + if subnet is None: + raise TypeError("Missing the required parameter `subnet` when calling `api214_subnets_patch`") + + collection_formats = {} + path_params = {} + + query_params = [] + if 'ids' in params: + query_params.append(('ids', params['ids'])) + collection_formats['ids'] = 'csv' + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + if 'subnet' in params: + body_params = params['subnet'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/subnets', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='SubnetResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_subnets_post_with_http_info( + self, + subnet=None, # type: models.Subnet + names=None, # type: List[str] + x_request_id=None, # type: str + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.SubnetResponse + """POST subnets + + Create an array subnet. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_subnets_post_with_http_info(subnet, names, async_req=True) + >>> result = thread.get() + + :param Subnet subnet: (required) + :param list[str] names: A comma-separated list of resource names. (required) + :param str x_request_id: Supplied by client during request or generated by server. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: SubnetResponse + If the method is called asynchronously, + returns the request thread. + """ + if names is not None: + if not isinstance(names, list): + names = [names] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + # verify the required parameter 'subnet' is set + if subnet is None: + raise TypeError("Missing the required parameter `subnet` when calling `api214_subnets_post`") + # verify the required parameter 'names' is set + if names is None: + raise TypeError("Missing the required parameter `names` when calling `api214_subnets_post`") + + collection_formats = {} + path_params = {} + + query_params = [] + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + if 'subnet' in params: + body_params = params['subnet'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/subnets', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='SubnetResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) diff --git a/pypureclient/flashblade/FB_2_14/api/support_api.py b/pypureclient/flashblade/FB_2_14/api/support_api.py new file mode 100644 index 000000000..92b1a1ed7 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/api/support_api.py @@ -0,0 +1,304 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import re + +# python 2 and python 3 compatibility library +import six +import uuid +from typing import List, Optional + +from .. import models + +class SupportApi(object): + + def __init__(self, api_client): + self.api_client = api_client + + def api214_support_get_with_http_info( + self, + x_request_id=None, # type: str + ids=None, # type: List[str] + names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.SupportGetResponse + """GET support + + List Phone Home and Remote Assistance settings. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_support_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param list[str] ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :param list[str] names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: SupportGetResponse + If the method is called asynchronously, + returns the request thread. + """ + if ids is not None: + if not isinstance(ids, list): + ids = [ids] + if names is not None: + if not isinstance(names, list): + names = [names] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + collection_formats = {} + path_params = {} + + query_params = [] + if 'ids' in params: + query_params.append(('ids', params['ids'])) + collection_formats['ids'] = 'csv' + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/support', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='SupportGetResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_support_patch_with_http_info( + self, + support=None, # type: models.Support + x_request_id=None, # type: str + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.SupportResponse + """PATCH support + + Modify Phone Home and Remote Assistance settings. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_support_patch_with_http_info(support, async_req=True) + >>> result = thread.get() + + :param Support support: (required) + :param str x_request_id: Supplied by client during request or generated by server. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: SupportResponse + If the method is called asynchronously, + returns the request thread. + """ + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + # verify the required parameter 'support' is set + if support is None: + raise TypeError("Missing the required parameter `support` when calling `api214_support_patch`") + + collection_formats = {} + path_params = {} + + query_params = [] + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + if 'support' in params: + body_params = params['support'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/support', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='SupportResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_support_test_get_with_http_info( + self, + x_request_id=None, # type: str + filter=None, # type: str + sort=None, # type: List[str] + test_type=None, # type: str + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.TestResultGetResponse + """GET support-test + + Test if the Phone Home and Remote Assistance settings are functioning properly. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_support_test_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param str filter: Exclude resources that don't match the specified criteria. + :param list[str] sort: Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response. + :param str test_type: Specify the type of test. Valid values are `all`, `phonehome` and `remote-assist`. If not specified, defaults to `all`. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: TestResultGetResponse + If the method is called asynchronously, + returns the request thread. + """ + if sort is not None: + if not isinstance(sort, list): + sort = [sort] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + collection_formats = {} + path_params = {} + + query_params = [] + if 'filter' in params: + query_params.append(('filter', params['filter'])) + if 'sort' in params: + query_params.append(('sort', params['sort'])) + collection_formats['sort'] = 'csv' + if 'test_type' in params: + query_params.append(('test_type', params['test_type'])) + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/support/test', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='TestResultGetResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) diff --git a/pypureclient/flashblade/FB_2_14/api/syslog_api.py b/pypureclient/flashblade/FB_2_14/api/syslog_api.py new file mode 100644 index 000000000..fa7630ae7 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/api/syslog_api.py @@ -0,0 +1,750 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import re + +# python 2 and python 3 compatibility library +import six +import uuid +from typing import List, Optional + +from .. import models + +class SyslogApi(object): + + def __init__(self, api_client): + self.api_client = api_client + + def api214_syslog_servers_delete_with_http_info( + self, + x_request_id=None, # type: str + ids=None, # type: List[str] + names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> None + """DELETE syslog-servers + + Delete a configured syslog server and stop forwarding syslog messages. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_syslog_servers_delete_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param list[str] ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :param list[str] names: Performs the operation on the unique name specified. Enter multiple names in comma-separated format. For example, `name01,name02`. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: None + If the method is called asynchronously, + returns the request thread. + """ + if ids is not None: + if not isinstance(ids, list): + ids = [ids] + if names is not None: + if not isinstance(names, list): + names = [names] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + collection_formats = {} + path_params = {} + + query_params = [] + if 'ids' in params: + query_params.append(('ids', params['ids'])) + collection_formats['ids'] = 'csv' + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/syslog-servers', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_syslog_servers_get_with_http_info( + self, + x_request_id=None, # type: str + continuation_token=None, # type: str + filter=None, # type: str + ids=None, # type: List[str] + limit=None, # type: int + names=None, # type: List[str] + offset=None, # type: int + sort=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.SyslogServerGetResponse + """GET syslog-servers + + Return a list of configured syslog servers. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_syslog_servers_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param str continuation_token: An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result. + :param str filter: Exclude resources that don't match the specified criteria. + :param list[str] ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :param int limit: Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the maximum number, the request is still valid. In that case the server just returns the maximum number of items, disregarding the client's page size request. + :param list[str] names: Performs the operation on the unique name specified. Enter multiple names in comma-separated format. For example, `name01,name02`. + :param int offset: The offset of the first resource to return from a collection. + :param list[str] sort: Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: SyslogServerGetResponse + If the method is called asynchronously, + returns the request thread. + """ + if ids is not None: + if not isinstance(ids, list): + ids = [ids] + if names is not None: + if not isinstance(names, list): + names = [names] + if sort is not None: + if not isinstance(sort, list): + sort = [sort] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + if 'limit' in params and params['limit'] < 1: + raise ValueError("Invalid value for parameter `limit` when calling `api214_syslog_servers_get`, must be a value greater than or equal to `1`") + if 'offset' in params and params['offset'] < 0: + raise ValueError("Invalid value for parameter `offset` when calling `api214_syslog_servers_get`, must be a value greater than or equal to `0`") + collection_formats = {} + path_params = {} + + query_params = [] + if 'continuation_token' in params: + query_params.append(('continuation_token', params['continuation_token'])) + if 'filter' in params: + query_params.append(('filter', params['filter'])) + if 'ids' in params: + query_params.append(('ids', params['ids'])) + collection_formats['ids'] = 'csv' + if 'limit' in params: + query_params.append(('limit', params['limit'])) + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + if 'offset' in params: + query_params.append(('offset', params['offset'])) + if 'sort' in params: + query_params.append(('sort', params['sort'])) + collection_formats['sort'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/syslog-servers', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='SyslogServerGetResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_syslog_servers_patch_with_http_info( + self, + syslog_server=None, # type: models.SyslogServerPatch + x_request_id=None, # type: str + ids=None, # type: List[str] + names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.SyslogServerResponse + """PATCH syslog-servers + + Modify the URI or services of a configured syslog server. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_syslog_servers_patch_with_http_info(syslog_server, async_req=True) + >>> result = thread.get() + + :param SyslogServerPatch syslog_server: (required) + :param str x_request_id: Supplied by client during request or generated by server. + :param list[str] ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :param list[str] names: Performs the operation on the unique name specified. Enter multiple names in comma-separated format. For example, `name01,name02`. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: SyslogServerResponse + If the method is called asynchronously, + returns the request thread. + """ + if ids is not None: + if not isinstance(ids, list): + ids = [ids] + if names is not None: + if not isinstance(names, list): + names = [names] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + # verify the required parameter 'syslog_server' is set + if syslog_server is None: + raise TypeError("Missing the required parameter `syslog_server` when calling `api214_syslog_servers_patch`") + + collection_formats = {} + path_params = {} + + query_params = [] + if 'ids' in params: + query_params.append(('ids', params['ids'])) + collection_formats['ids'] = 'csv' + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + if 'syslog_server' in params: + body_params = params['syslog_server'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/syslog-servers', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='SyslogServerResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_syslog_servers_post_with_http_info( + self, + syslog_server=None, # type: models.SyslogServerPost + x_request_id=None, # type: str + names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.SyslogServerResponse + """POST syslog-servers + + Configure a new syslog server. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_syslog_servers_post_with_http_info(syslog_server, async_req=True) + >>> result = thread.get() + + :param SyslogServerPost syslog_server: (required) + :param str x_request_id: Supplied by client during request or generated by server. + :param list[str] names: Performs the operation on the unique name specified. Enter multiple names in comma-separated format. For example, `name01,name02`. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: SyslogServerResponse + If the method is called asynchronously, + returns the request thread. + """ + if names is not None: + if not isinstance(names, list): + names = [names] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + # verify the required parameter 'syslog_server' is set + if syslog_server is None: + raise TypeError("Missing the required parameter `syslog_server` when calling `api214_syslog_servers_post`") + + collection_formats = {} + path_params = {} + + query_params = [] + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + if 'syslog_server' in params: + body_params = params['syslog_server'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/syslog-servers', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='SyslogServerResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_syslog_servers_settings_get_with_http_info( + self, + x_request_id=None, # type: str + continuation_token=None, # type: str + filter=None, # type: str + ids=None, # type: List[str] + limit=None, # type: int + names=None, # type: List[str] + offset=None, # type: int + sort=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.SyslogServerSettingsGetResponse + """GET syslog-servers/settings + + List the certificate or certificate group associated with the syslog servers. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_syslog_servers_settings_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param str continuation_token: An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result. + :param str filter: Exclude resources that don't match the specified criteria. + :param list[str] ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :param int limit: Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the maximum number, the request is still valid. In that case the server just returns the maximum number of items, disregarding the client's page size request. + :param list[str] names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :param int offset: The offset of the first resource to return from a collection. + :param list[str] sort: Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: SyslogServerSettingsGetResponse + If the method is called asynchronously, + returns the request thread. + """ + if ids is not None: + if not isinstance(ids, list): + ids = [ids] + if names is not None: + if not isinstance(names, list): + names = [names] + if sort is not None: + if not isinstance(sort, list): + sort = [sort] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + if 'limit' in params and params['limit'] < 1: + raise ValueError("Invalid value for parameter `limit` when calling `api214_syslog_servers_settings_get`, must be a value greater than or equal to `1`") + if 'offset' in params and params['offset'] < 0: + raise ValueError("Invalid value for parameter `offset` when calling `api214_syslog_servers_settings_get`, must be a value greater than or equal to `0`") + collection_formats = {} + path_params = {} + + query_params = [] + if 'continuation_token' in params: + query_params.append(('continuation_token', params['continuation_token'])) + if 'filter' in params: + query_params.append(('filter', params['filter'])) + if 'ids' in params: + query_params.append(('ids', params['ids'])) + collection_formats['ids'] = 'csv' + if 'limit' in params: + query_params.append(('limit', params['limit'])) + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + if 'offset' in params: + query_params.append(('offset', params['offset'])) + if 'sort' in params: + query_params.append(('sort', params['sort'])) + collection_formats['sort'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/syslog-servers/settings', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='SyslogServerSettingsGetResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_syslog_servers_settings_patch_with_http_info( + self, + syslog_server_settings=None, # type: models.SyslogServerSettings + x_request_id=None, # type: str + ids=None, # type: List[str] + names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.SyslogServerSettingsResponse + """PATCH syslog-servers/settings + + Modify the certificate or certificate group associated with the syslog servers. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_syslog_servers_settings_patch_with_http_info(syslog_server_settings, async_req=True) + >>> result = thread.get() + + :param SyslogServerSettings syslog_server_settings: (required) + :param str x_request_id: Supplied by client during request or generated by server. + :param list[str] ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :param list[str] names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: SyslogServerSettingsResponse + If the method is called asynchronously, + returns the request thread. + """ + if ids is not None: + if not isinstance(ids, list): + ids = [ids] + if names is not None: + if not isinstance(names, list): + names = [names] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + # verify the required parameter 'syslog_server_settings' is set + if syslog_server_settings is None: + raise TypeError("Missing the required parameter `syslog_server_settings` when calling `api214_syslog_servers_settings_patch`") + + collection_formats = {} + path_params = {} + + query_params = [] + if 'ids' in params: + query_params.append(('ids', params['ids'])) + collection_formats['ids'] = 'csv' + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + if 'syslog_server_settings' in params: + body_params = params['syslog_server_settings'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/syslog-servers/settings', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='SyslogServerSettingsResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_syslog_servers_test_get_with_http_info( + self, + x_request_id=None, # type: str + continuation_token=None, # type: str + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.TestResultGetResponse + """GET syslog-servers/test + + Send test messages to conifgured remote syslog servers. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_syslog_servers_test_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param str continuation_token: An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: TestResultGetResponse + If the method is called asynchronously, + returns the request thread. + """ + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + collection_formats = {} + path_params = {} + + query_params = [] + if 'continuation_token' in params: + query_params.append(('continuation_token', params['continuation_token'])) + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/syslog-servers/test', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='TestResultGetResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) diff --git a/pypureclient/flashblade/FB_2_14/api/targets_api.py b/pypureclient/flashblade/FB_2_14/api/targets_api.py new file mode 100644 index 000000000..7103c028e --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/api/targets_api.py @@ -0,0 +1,590 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import re + +# python 2 and python 3 compatibility library +import six +import uuid +from typing import List, Optional + +from .. import models + +class TargetsApi(object): + + def __init__(self, api_client): + self.api_client = api_client + + def api214_targets_delete_with_http_info( + self, + x_request_id=None, # type: str + ids=None, # type: List[str] + names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> None + """DELETE targets + + Delete the connection to the target for replication. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_targets_delete_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param list[str] ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :param list[str] names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: None + If the method is called asynchronously, + returns the request thread. + """ + if ids is not None: + if not isinstance(ids, list): + ids = [ids] + if names is not None: + if not isinstance(names, list): + names = [names] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + collection_formats = {} + path_params = {} + + query_params = [] + if 'ids' in params: + query_params.append(('ids', params['ids'])) + collection_formats['ids'] = 'csv' + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/targets', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_targets_get_with_http_info( + self, + x_request_id=None, # type: str + continuation_token=None, # type: str + filter=None, # type: str + ids=None, # type: List[str] + limit=None, # type: int + names=None, # type: List[str] + offset=None, # type: int + sort=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.TargetGetResponse + """GET targets + + List targets used for replication. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_targets_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param str continuation_token: An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result. + :param str filter: Exclude resources that don't match the specified criteria. + :param list[str] ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :param int limit: Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the maximum number, the request is still valid. In that case the server just returns the maximum number of items, disregarding the client's page size request. + :param list[str] names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :param int offset: The offset of the first resource to return from a collection. + :param list[str] sort: Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: TargetGetResponse + If the method is called asynchronously, + returns the request thread. + """ + if ids is not None: + if not isinstance(ids, list): + ids = [ids] + if names is not None: + if not isinstance(names, list): + names = [names] + if sort is not None: + if not isinstance(sort, list): + sort = [sort] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + if 'limit' in params and params['limit'] < 1: + raise ValueError("Invalid value for parameter `limit` when calling `api214_targets_get`, must be a value greater than or equal to `1`") + if 'offset' in params and params['offset'] < 0: + raise ValueError("Invalid value for parameter `offset` when calling `api214_targets_get`, must be a value greater than or equal to `0`") + collection_formats = {} + path_params = {} + + query_params = [] + if 'continuation_token' in params: + query_params.append(('continuation_token', params['continuation_token'])) + if 'filter' in params: + query_params.append(('filter', params['filter'])) + if 'ids' in params: + query_params.append(('ids', params['ids'])) + collection_formats['ids'] = 'csv' + if 'limit' in params: + query_params.append(('limit', params['limit'])) + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + if 'offset' in params: + query_params.append(('offset', params['offset'])) + if 'sort' in params: + query_params.append(('sort', params['sort'])) + collection_formats['sort'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/targets', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='TargetGetResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_targets_patch_with_http_info( + self, + target=None, # type: models.Target + x_request_id=None, # type: str + ids=None, # type: List[str] + names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.TargetResponse + """PATCH targets + + Modify the target attributes for replication. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_targets_patch_with_http_info(target, async_req=True) + >>> result = thread.get() + + :param Target target: (required) + :param str x_request_id: Supplied by client during request or generated by server. + :param list[str] ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :param list[str] names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: TargetResponse + If the method is called asynchronously, + returns the request thread. + """ + if ids is not None: + if not isinstance(ids, list): + ids = [ids] + if names is not None: + if not isinstance(names, list): + names = [names] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + # verify the required parameter 'target' is set + if target is None: + raise TypeError("Missing the required parameter `target` when calling `api214_targets_patch`") + + collection_formats = {} + path_params = {} + + query_params = [] + if 'ids' in params: + query_params.append(('ids', params['ids'])) + collection_formats['ids'] = 'csv' + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + if 'target' in params: + body_params = params['target'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/targets', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='TargetResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_targets_performance_replication_get_with_http_info( + self, + x_request_id=None, # type: str + continuation_token=None, # type: str + end_time=None, # type: int + filter=None, # type: str + ids=None, # type: List[str] + limit=None, # type: int + names=None, # type: List[str] + offset=None, # type: int + resolution=None, # type: int + sort=None, # type: List[str] + start_time=None, # type: int + total_only=None, # type: bool + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.ResourcePerformanceReplicationGetResponse + """GET targets/performance/replication + + List replication performance metrics for targets. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_targets_performance_replication_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param str continuation_token: An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result. + :param int end_time: When the time window ends (in milliseconds since epoch). + :param str filter: Exclude resources that don't match the specified criteria. + :param list[str] ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :param int limit: Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the maximum number, the request is still valid. In that case the server just returns the maximum number of items, disregarding the client's page size request. + :param list[str] names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :param int offset: The offset of the first resource to return from a collection. + :param int resolution: The desired ms between samples. Available resolutions may depend on data type, `start_time` and `end_time`. In general `1000`, `30000`, `300000`, `1800000`, `7200000`, and `86400000` are possible values. + :param list[str] sort: Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response. + :param int start_time: When the time window starts (in milliseconds since epoch). + :param bool total_only: Only return the total record for the specified items. The total record will be the total of all items after filtering. The `items` list will be empty. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: ResourcePerformanceReplicationGetResponse + If the method is called asynchronously, + returns the request thread. + """ + if ids is not None: + if not isinstance(ids, list): + ids = [ids] + if names is not None: + if not isinstance(names, list): + names = [names] + if sort is not None: + if not isinstance(sort, list): + sort = [sort] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + if 'end_time' in params and params['end_time'] < 0: + raise ValueError("Invalid value for parameter `end_time` when calling `api214_targets_performance_replication_get`, must be a value greater than or equal to `0`") + if 'limit' in params and params['limit'] < 1: + raise ValueError("Invalid value for parameter `limit` when calling `api214_targets_performance_replication_get`, must be a value greater than or equal to `1`") + if 'offset' in params and params['offset'] < 0: + raise ValueError("Invalid value for parameter `offset` when calling `api214_targets_performance_replication_get`, must be a value greater than or equal to `0`") + if 'resolution' in params and params['resolution'] < 0: + raise ValueError("Invalid value for parameter `resolution` when calling `api214_targets_performance_replication_get`, must be a value greater than or equal to `0`") + if 'start_time' in params and params['start_time'] < 0: + raise ValueError("Invalid value for parameter `start_time` when calling `api214_targets_performance_replication_get`, must be a value greater than or equal to `0`") + collection_formats = {} + path_params = {} + + query_params = [] + if 'continuation_token' in params: + query_params.append(('continuation_token', params['continuation_token'])) + if 'end_time' in params: + query_params.append(('end_time', params['end_time'])) + if 'filter' in params: + query_params.append(('filter', params['filter'])) + if 'ids' in params: + query_params.append(('ids', params['ids'])) + collection_formats['ids'] = 'csv' + if 'limit' in params: + query_params.append(('limit', params['limit'])) + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + if 'offset' in params: + query_params.append(('offset', params['offset'])) + if 'resolution' in params: + query_params.append(('resolution', params['resolution'])) + if 'sort' in params: + query_params.append(('sort', params['sort'])) + collection_formats['sort'] = 'csv' + if 'start_time' in params: + query_params.append(('start_time', params['start_time'])) + if 'total_only' in params: + query_params.append(('total_only', params['total_only'])) + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/targets/performance/replication', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ResourcePerformanceReplicationGetResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_targets_post_with_http_info( + self, + names=None, # type: List[str] + target=None, # type: models.TargetPost + x_request_id=None, # type: str + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.TargetResponse + """POST targets + + Add a target for replication. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_targets_post_with_http_info(names, target, async_req=True) + >>> result = thread.get() + + :param list[str] names: A comma-separated list of resource names. (required) + :param TargetPost target: (required) + :param str x_request_id: Supplied by client during request or generated by server. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: TargetResponse + If the method is called asynchronously, + returns the request thread. + """ + if names is not None: + if not isinstance(names, list): + names = [names] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + # verify the required parameter 'names' is set + if names is None: + raise TypeError("Missing the required parameter `names` when calling `api214_targets_post`") + # verify the required parameter 'target' is set + if target is None: + raise TypeError("Missing the required parameter `target` when calling `api214_targets_post`") + + collection_formats = {} + path_params = {} + + query_params = [] + if 'names' in params: + query_params.append(('names', params['names'])) + collection_formats['names'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + if 'target' in params: + body_params = params['target'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/targets', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='TargetResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) diff --git a/pypureclient/flashblade/FB_2_14/api/usage_api.py b/pypureclient/flashblade/FB_2_14/api/usage_api.py new file mode 100644 index 000000000..ad4f6775f --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/api/usage_api.py @@ -0,0 +1,306 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import re + +# python 2 and python 3 compatibility library +import six +import uuid +from typing import List, Optional + +from .. import models + +class UsageApi(object): + + def __init__(self, api_client): + self.api_client = api_client + + def api214_usage_groups_get_with_http_info( + self, + x_request_id=None, # type: str + continuation_token=None, # type: str + file_system_ids=None, # type: List[str] + file_system_names=None, # type: List[str] + filter=None, # type: str + gids=None, # type: List[int] + group_names=None, # type: List[str] + limit=None, # type: int + offset=None, # type: int + sort=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.GroupQuotaGetResponse + """GET usage/groups + + List groups with hard limit quotas and their file system usage. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_usage_groups_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param str continuation_token: An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result. + :param list[str] file_system_ids: A comma-separated list of file system IDs. If after filtering, there is not at least one resource that matches each of the elements of `file_system_ids`, then an error is returned. This cannot be provided together with the `file_system_names` query parameter. + :param list[str] file_system_names: A comma-separated list of file system names. If there is not at least one resource that matches each of the elements of `file_system_names`, then an error is returned. + :param str filter: Exclude resources that don't match the specified criteria. + :param list[int] gids: A comma-separated list of group IDs. If there is not at least one resource that matches each of the elements of `gids`, then an error is returned. This cannot be provided together with `group_names` query parameter. + :param list[str] group_names: A comma-separated list of group names. If there is not at least one resource that matches each of the elements of `group_names`, then an error is returned. This cannot be provided together with `gids` query parameter. + :param int limit: Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the maximum number, the request is still valid. In that case the server just returns the maximum number of items, disregarding the client's page size request. + :param int offset: The offset of the first resource to return from a collection. + :param list[str] sort: Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: GroupQuotaGetResponse + If the method is called asynchronously, + returns the request thread. + """ + if file_system_ids is not None: + if not isinstance(file_system_ids, list): + file_system_ids = [file_system_ids] + if file_system_names is not None: + if not isinstance(file_system_names, list): + file_system_names = [file_system_names] + if gids is not None: + if not isinstance(gids, list): + gids = [gids] + if group_names is not None: + if not isinstance(group_names, list): + group_names = [group_names] + if sort is not None: + if not isinstance(sort, list): + sort = [sort] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + if 'limit' in params and params['limit'] < 1: + raise ValueError("Invalid value for parameter `limit` when calling `api214_usage_groups_get`, must be a value greater than or equal to `1`") + if 'offset' in params and params['offset'] < 0: + raise ValueError("Invalid value for parameter `offset` when calling `api214_usage_groups_get`, must be a value greater than or equal to `0`") + collection_formats = {} + path_params = {} + + query_params = [] + if 'continuation_token' in params: + query_params.append(('continuation_token', params['continuation_token'])) + if 'file_system_ids' in params: + query_params.append(('file_system_ids', params['file_system_ids'])) + collection_formats['file_system_ids'] = 'csv' + if 'file_system_names' in params: + query_params.append(('file_system_names', params['file_system_names'])) + collection_formats['file_system_names'] = 'csv' + if 'filter' in params: + query_params.append(('filter', params['filter'])) + if 'gids' in params: + query_params.append(('gids', params['gids'])) + collection_formats['gids'] = 'csv' + if 'group_names' in params: + query_params.append(('group_names', params['group_names'])) + collection_formats['group_names'] = 'csv' + if 'limit' in params: + query_params.append(('limit', params['limit'])) + if 'offset' in params: + query_params.append(('offset', params['offset'])) + if 'sort' in params: + query_params.append(('sort', params['sort'])) + collection_formats['sort'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/usage/groups', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='GroupQuotaGetResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_usage_users_get_with_http_info( + self, + x_request_id=None, # type: str + continuation_token=None, # type: str + file_system_ids=None, # type: List[str] + file_system_names=None, # type: List[str] + filter=None, # type: str + limit=None, # type: int + offset=None, # type: int + sort=None, # type: List[str] + uids=None, # type: List[int] + user_names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.UserQuotaGetResponse + """GET usage/users + + List users with hard limit quotas and their file system usage. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_usage_users_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param str continuation_token: An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result. + :param list[str] file_system_ids: A comma-separated list of file system IDs. If after filtering, there is not at least one resource that matches each of the elements of `file_system_ids`, then an error is returned. This cannot be provided together with the `file_system_names` query parameter. + :param list[str] file_system_names: A comma-separated list of file system names. If there is not at least one resource that matches each of the elements of `file_system_names`, then an error is returned. + :param str filter: Exclude resources that don't match the specified criteria. + :param int limit: Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the maximum number, the request is still valid. In that case the server just returns the maximum number of items, disregarding the client's page size request. + :param int offset: The offset of the first resource to return from a collection. + :param list[str] sort: Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response. + :param list[int] uids: A comma-separated list of user IDs. If there is not at least one resource that matches each of the elements of `uids`, then an error is returned. This cannot be provided together with `user_names` query parameter. + :param list[str] user_names: A comma-separated list of user names. If there is not at least one resource that matches each of the elements of `user_names`, then an error is returned. This cannot be provided together with `uids` query parameter. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: UserQuotaGetResponse + If the method is called asynchronously, + returns the request thread. + """ + if file_system_ids is not None: + if not isinstance(file_system_ids, list): + file_system_ids = [file_system_ids] + if file_system_names is not None: + if not isinstance(file_system_names, list): + file_system_names = [file_system_names] + if sort is not None: + if not isinstance(sort, list): + sort = [sort] + if uids is not None: + if not isinstance(uids, list): + uids = [uids] + if user_names is not None: + if not isinstance(user_names, list): + user_names = [user_names] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + if 'limit' in params and params['limit'] < 1: + raise ValueError("Invalid value for parameter `limit` when calling `api214_usage_users_get`, must be a value greater than or equal to `1`") + if 'offset' in params and params['offset'] < 0: + raise ValueError("Invalid value for parameter `offset` when calling `api214_usage_users_get`, must be a value greater than or equal to `0`") + collection_formats = {} + path_params = {} + + query_params = [] + if 'continuation_token' in params: + query_params.append(('continuation_token', params['continuation_token'])) + if 'file_system_ids' in params: + query_params.append(('file_system_ids', params['file_system_ids'])) + collection_formats['file_system_ids'] = 'csv' + if 'file_system_names' in params: + query_params.append(('file_system_names', params['file_system_names'])) + collection_formats['file_system_names'] = 'csv' + if 'filter' in params: + query_params.append(('filter', params['filter'])) + if 'limit' in params: + query_params.append(('limit', params['limit'])) + if 'offset' in params: + query_params.append(('offset', params['offset'])) + if 'sort' in params: + query_params.append(('sort', params['sort'])) + collection_formats['sort'] = 'csv' + if 'uids' in params: + query_params.append(('uids', params['uids'])) + collection_formats['uids'] = 'csv' + if 'user_names' in params: + query_params.append(('user_names', params['user_names'])) + collection_formats['user_names'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/usage/users', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='UserQuotaGetResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) diff --git a/pypureclient/flashblade/FB_2_14/api/verification_keys_api.py b/pypureclient/flashblade/FB_2_14/api/verification_keys_api.py new file mode 100644 index 000000000..038f8f1e0 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/api/verification_keys_api.py @@ -0,0 +1,221 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import re + +# python 2 and python 3 compatibility library +import six +import uuid +from typing import List, Optional + +from .. import models + +class VerificationKeysApi(object): + + def __init__(self, api_client): + self.api_client = api_client + + def api214_support_verification_keys_get_with_http_info( + self, + x_request_id=None, # type: str + continuation_token=None, # type: str + filter=None, # type: str + limit=None, # type: int + offset=None, # type: int + sort=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.VerificationKeyGetResponse + """GET verification-keys + + List the key used to verify the signed challenges that are used by Pure Support to access the FlashBlade. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_support_verification_keys_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param str x_request_id: Supplied by client during request or generated by server. + :param str continuation_token: An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result. + :param str filter: Exclude resources that don't match the specified criteria. + :param int limit: Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the maximum number, the request is still valid. In that case the server just returns the maximum number of items, disregarding the client's page size request. + :param int offset: The offset of the first resource to return from a collection. + :param list[str] sort: Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: VerificationKeyGetResponse + If the method is called asynchronously, + returns the request thread. + """ + if sort is not None: + if not isinstance(sort, list): + sort = [sort] + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + + if 'limit' in params and params['limit'] < 1: + raise ValueError("Invalid value for parameter `limit` when calling `api214_support_verification_keys_get`, must be a value greater than or equal to `1`") + if 'offset' in params and params['offset'] < 0: + raise ValueError("Invalid value for parameter `offset` when calling `api214_support_verification_keys_get`, must be a value greater than or equal to `0`") + collection_formats = {} + path_params = {} + + query_params = [] + if 'continuation_token' in params: + query_params.append(('continuation_token', params['continuation_token'])) + if 'filter' in params: + query_params.append(('filter', params['filter'])) + if 'limit' in params: + query_params.append(('limit', params['limit'])) + if 'offset' in params: + query_params.append(('offset', params['offset'])) + if 'sort' in params: + query_params.append(('sort', params['sort'])) + collection_formats['sort'] = 'csv' + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/support/verification-keys', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='VerificationKeyGetResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + + def api214_support_verification_keys_patch_with_http_info( + self, + key=None, # type: models.VerificationKeyPatch + x_request_id=None, # type: str + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.VerificationKeyResponse + """PATCH verification-keys + + Update the key used to verify the signed challenges that are used by Pure Support to access the FlashBlade. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.api214_support_verification_keys_patch_with_http_info(key, async_req=True) + >>> result = thread.get() + + :param VerificationKeyPatch key: (required) + :param str x_request_id: Supplied by client during request or generated by server. + :param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult. + :param bool _return_http_data_only: Returns only data field. + :param bool _preload_content: Response is converted into objects. + :param int _request_timeout: Total request timeout in seconds. + It can also be a tuple of (connection time, read time) timeouts. + :return: VerificationKeyResponse + If the method is called asynchronously, + returns the request thread. + """ + params = {k: v for k, v in six.iteritems(locals()) if v is not None} + + # Convert the filter into a string + if params.get('filter'): + params['filter'] = str(params['filter']) + if params.get('sort'): + params['sort'] = [str(_x) for _x in params['sort']] + # Assign a value to X-Request-Id if it is not specified + if params.get('x_request_id') is None: + params['x_request_id'] = str(uuid.uuid4()) + # verify the required parameter 'key' is set + if key is None: + raise TypeError("Missing the required parameter `key` when calling `api214_support_verification_keys_patch`") + + collection_formats = {} + path_params = {} + + query_params = [] + + header_params = {} + if 'x_request_id' in params: + header_params['X-Request-ID'] = params['x_request_id'] + + form_params = [] + local_var_files = {} + + body_params = None + if 'key' in params: + body_params = params['key'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( + ['application/json']) + + # Authentication setting + auth_settings = ['AuthorizationHeader'] + + return self.api_client.call_api( + '/api/2.14/support/verification-keys', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='VerificationKeyResponse', + auth_settings=auth_settings, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) diff --git a/pypureclient/flashblade/FB_2_14/api_client.py b/pypureclient/flashblade/FB_2_14/api_client.py new file mode 100644 index 000000000..65ee89b60 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/api_client.py @@ -0,0 +1,646 @@ +# coding: utf-8 +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import atexit +import datetime +import json +import mimetypes +from multiprocessing.pool import ThreadPool +import os +import re +import tempfile + +# python 2 and python 3 compatibility library +import six +from six.moves.urllib.parse import quote + +from .configuration import Configuration +from . import models +from . import rest + + +class ApiClient(object): + """Generic API client for Swagger client library builds. + + Swagger generic API client. This client handles the client- + server communication, and is invariant across implementations. Specifics of + the methods and models for each application are generated from the Swagger + templates. + + :param configuration: .Configuration object for this client + :param header_name: a header to pass when making calls to the API. + :param header_value: a header value to pass when making calls to + the API. + :param cookie: a cookie to include in the header when making calls + to the API + """ + + PRIMITIVE_TYPES = (float, bool, bytes, six.text_type) + six.integer_types + NATIVE_TYPES_MAPPING = { + 'int': int, + 'long': int if six.PY3 else long, + 'float': float, + 'str': str, + 'bool': bool, + 'date': datetime.date, + 'datetime': datetime.datetime, + 'object': object, + } + + def __init__(self, configuration=None, header_name=None, header_value=None, + cookie=None): + if configuration is None: + configuration = Configuration() + self.configuration = configuration + + self.pool = ThreadPool() + # Take care not to clean up the ThreadPool in a destructor method, + # since this can cause Python <= 3.8 to hang when interacting with + # threads in an invalid state. Instead, do it at exit. + self._closed = False + atexit.register(self.close) + + self.rest_client = rest.RESTClientObject(configuration) + self.default_headers = {} + if header_name is not None: + self.default_headers[header_name] = header_value + self.cookie = cookie + # Set default User-Agent. + self.user_agent = 'Swagger-Codegen/2.14/python' + + def close(self): + if self._closed: + return + self._closed = True + if hasattr(atexit, 'unregister'): + atexit.unregister(self.close) + + self.pool.close() + self.pool.join() + + @property + def user_agent(self): + """User agent for this API client""" + return self.default_headers['User-Agent'] + + @user_agent.setter + def user_agent(self, value): + self.default_headers['User-Agent'] = value + + def set_default_header(self, header_name, header_value): + self.default_headers[header_name] = header_value + + def __call_api( + self, resource_path, method, path_params=None, + query_params=None, header_params=None, body=None, post_params=None, + files=None, response_type=None, auth_settings=None, + _return_http_data_only=None, collection_formats=None, + _preload_content=True, _request_timeout=None): + + config = self.configuration + + # header parameters + header_params = header_params or {} + header_params.update(self.default_headers) + if self.cookie: + header_params['Cookie'] = self.cookie + if header_params: + header_params = self.sanitize_for_serialization(header_params) + header_params = dict(self.parameters_to_tuples(header_params, + collection_formats)) + + # path parameters + if path_params: + path_params = self.sanitize_for_serialization(path_params) + path_params = self.parameters_to_tuples(path_params, + collection_formats) + for k, v in path_params: + # specified safe chars, encode everything + resource_path = resource_path.replace( + '{%s}' % k, + quote(str(v), safe=config.safe_chars_for_path_param) + ) + + # query parameters + if query_params: + query_params = self.sanitize_for_serialization(query_params) + query_params = self.parameters_to_tuples(query_params, + collection_formats) + + # post parameters + if post_params or files: + post_params = self.prepare_post_parameters(post_params, files) + post_params = self.sanitize_for_serialization(post_params) + post_params = self.parameters_to_tuples(post_params, + collection_formats) + + # auth setting + self.update_params_for_auth(header_params, query_params, auth_settings) + + # body + if body: + body = self.sanitize_for_serialization(body) + + # request url + url = self.configuration.host + resource_path + + # perform request and return response + response_data = self.request( + method, url, query_params=query_params, headers=header_params, + post_params=post_params, body=body, + _preload_content=_preload_content, + _request_timeout=_request_timeout) + + self.last_response = response_data + + return_data = response_data + if _preload_content: + # deserialize response data + if response_type: + return_data = self.deserialize(response_data, response_type) + else: + return_data = None + + if _return_http_data_only: + return (return_data) + else: + return (return_data, response_data.status, + response_data.getheaders()) + + def extract_object_dict_from_object(self, obj): + """Convert model obj to dict, using `swagger_types` + and use `attribute_map` to determine json keys. """ + obj_dict = {obj.attribute_map[attr]: getattr(obj, attr) + for attr, _ in six.iteritems(obj.swagger_types) + if hasattr(obj, attr)} + return obj_dict + + def sanitize_for_serialization(self, obj): + """Builds a JSON POST object. + + If obj is None, return None. + If obj is str, int, long, float, bool, return directly. + If obj is datetime.datetime, datetime.date + convert to string in iso8601 format. + If obj is list, sanitize each element in the list. + If obj is dict, return the dict. + If obj is swagger model, return the properties dict. + + :param obj: The data to serialize. + :return: The serialized form of data. + """ + if obj is None: + return None + elif isinstance(obj, self.PRIMITIVE_TYPES): + return obj + elif isinstance(obj, list): + return [self.sanitize_for_serialization(sub_obj) + for sub_obj in obj] + elif isinstance(obj, tuple): + return tuple(self.sanitize_for_serialization(sub_obj) + for sub_obj in obj) + elif isinstance(obj, (datetime.datetime, datetime.date)): + return obj.isoformat() + + if isinstance(obj, dict): + obj_dict = obj + else: + obj_dict = self.extract_object_dict_from_object(obj) + + return {key: self.sanitize_for_serialization(val) + for key, val in six.iteritems(obj_dict)} + + def deserialize(self, response, response_type): + """Deserializes response into an object. + + :param response: RESTResponse object to be deserialized. + :param response_type: class literal for + deserialized object, or string of class name. + + :return: deserialized object. + """ + # handle file downloading + # save response body into a tmp file and return the instance + if response_type == "file" or response_type == "KeytabFileResponse": + return self.__deserialize_file(response) + + # fetch data from response object + try: + data = json.loads(response.data) + except ValueError: + data = response.data + + return self.__deserialize(data, response_type) + + def __deserialize(self, data, klass): + """Deserializes dict, list, str into an object. + + :param data: dict, list or str. + :param klass: class literal, or string of class name. + + :return: object. + """ + if data is None: + return None + + if type(klass) == str: + if klass.startswith('list['): + sub_kls = re.match(r'list\[(.*)\]', klass).group(1) + return [self.__deserialize(sub_data, sub_kls) + for sub_data in data] + + if klass.startswith('dict('): + sub_kls = re.match(r'dict\(([^,]*), (.*)\)', klass).group(2) + return {k: self.__deserialize(v, sub_kls) + for k, v in six.iteritems(data)} + + # convert str to class + if klass in self.NATIVE_TYPES_MAPPING: + klass = self.NATIVE_TYPES_MAPPING[klass] + else: + klass = getattr(models, klass) + + if klass in self.PRIMITIVE_TYPES: + return self.__deserialize_primitive(data, klass) + elif klass == object: + return self.__deserialize_object(data) + elif klass == datetime.date: + return self.__deserialize_date(data) + elif klass == datetime.datetime: + return self.__deserialize_datatime(data) + else: + return self.__deserialize_model(data, klass) + + def call_api(self, resource_path, method, + path_params=None, query_params=None, header_params=None, + body=None, post_params=None, files=None, + response_type=None, auth_settings=None, async_req=None, + _return_http_data_only=None, collection_formats=None, + _preload_content=True, _request_timeout=None): + """Makes the HTTP request (synchronous) and returns deserialized data. + + To make an async request, set the async_req parameter. + + :param resource_path: Path to method endpoint. + :param method: Method to call. + :param path_params: Path parameters in the url. + :param query_params: Query parameters in the url. + :param header_params: Header parameters to be + placed in the request header. + :param body: Request body. + :param post_params dict: Request post form parameters, + for `application/x-www-form-urlencoded`, `multipart/form-data`. + :param auth_settings list: Auth Settings names for the request. + :param response: Response data type. + :param files dict: key -> filename, value -> filepath, + for `multipart/form-data`. + :param async_req bool: execute request asynchronously + :param _return_http_data_only: response data without head status code + and headers + :param collection_formats: dict of collection formats for path, query, + header, and post parameters. + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: + If async_req parameter is True, + the request will be called asynchronously. + The method will return the request thread. + If parameter async_req is False or missing, + then the method will return the response directly. + """ + if not async_req: + return self.__call_api(resource_path, method, + path_params, query_params, header_params, + body, post_params, files, + response_type, auth_settings, + _return_http_data_only, collection_formats, + _preload_content, _request_timeout) + else: + thread = self.pool.apply_async(self.__call_api, (resource_path, + method, path_params, query_params, + header_params, body, + post_params, files, + response_type, auth_settings, + _return_http_data_only, + collection_formats, + _preload_content, _request_timeout)) + return thread + + def request(self, method, url, query_params=None, headers=None, + post_params=None, body=None, _preload_content=True, + _request_timeout=None): + """Makes the HTTP request using RESTClient.""" + if method == "GET": + return self.rest_client.GET(url, + query_params=query_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + headers=headers) + elif method == "HEAD": + return self.rest_client.HEAD(url, + query_params=query_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + headers=headers) + elif method == "OPTIONS": + return self.rest_client.OPTIONS(url, + query_params=query_params, + headers=headers, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + elif method == "POST": + return self.rest_client.POST(url, + query_params=query_params, + headers=headers, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + elif method == "PUT": + return self.rest_client.PUT(url, + query_params=query_params, + headers=headers, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + elif method == "PATCH": + return self.rest_client.PATCH(url, + query_params=query_params, + headers=headers, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + elif method == "DELETE": + return self.rest_client.DELETE(url, + query_params=query_params, + headers=headers, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + else: + raise ValueError( + "http method must be `GET`, `HEAD`, `OPTIONS`," + " `POST`, `PATCH`, `PUT` or `DELETE`." + ) + + def parameters_to_tuples(self, params, collection_formats): + """Get parameters as list of tuples, formatting collections. + + :param params: Parameters as dict or list of two-tuples + :param dict collection_formats: Parameter collection formats + :return: Parameters as list of tuples, collections formatted + """ + new_params = [] + if collection_formats is None: + collection_formats = {} + for k, v in six.iteritems(params) if isinstance(params, dict) else params: + if k in collection_formats: + collection_format = collection_formats[k] + if collection_format == 'multi': + new_params.extend((k, value) for value in v) + else: + if collection_format == 'ssv': + delimiter = ' ' + elif collection_format == 'tsv': + delimiter = '\t' + elif collection_format == 'pipes': + delimiter = '|' + else: # csv is the default + delimiter = ',' + new_params.append( + (k, delimiter.join(str(value) for value in v))) + else: + new_params.append((k, v)) + return new_params + + def prepare_post_parameters(self, post_params=None, files=None): + """Builds form parameters. + + :param post_params: Normal form parameters. + :param files: File parameters. + :return: Form parameters with files. + """ + params = [] + + if post_params: + params = post_params + + if files: + for k, v in six.iteritems(files): + if not v: + continue + file_names = v if type(v) is list else [v] + for n in file_names: + with open(n, 'rb') as f: + filename = os.path.basename(f.name) + filedata = f.read() + mimetype = (mimetypes.guess_type(filename)[0] or + 'application/octet-stream') + params.append( + tuple([k, tuple([filename, filedata, mimetype])])) + + return params + + def select_header_accept(self, accepts): + """Returns `Accept` based on an array of accepts provided. + + :param accepts: List of headers. + :return: Accept (e.g. application/json). + """ + if not accepts: + return + + accepts = [x.lower() for x in accepts] + + if 'application/json' in accepts: + return 'application/json' + else: + return ', '.join(accepts) + + def select_header_content_type(self, content_types): + """Returns `Content-Type` based on an array of content_types provided. + + :param content_types: List of content-types. + :return: Content-Type (e.g. application/json). + """ + if not content_types: + return 'application/json' + + content_types = [x.lower() for x in content_types] + + if 'application/json' in content_types or '*/*' in content_types: + return 'application/json' + else: + return content_types[0] + + def update_params_for_auth(self, headers, querys, auth_settings): + """Updates header and query params based on authentication setting. + + :param headers: Header parameters dict to be updated. + :param querys: Query parameters tuple list to be updated. + :param auth_settings: Authentication setting identifiers list. + """ + if not auth_settings: + return + + for auth in auth_settings: + auth_setting = self.configuration.auth_settings().get(auth) + if auth_setting: + if not auth_setting['value']: + continue + elif auth_setting['in'] == 'header': + headers[auth_setting['key']] = auth_setting['value'] + elif auth_setting['in'] == 'query': + querys.append((auth_setting['key'], auth_setting['value'])) + else: + raise ValueError( + 'Authentication token must be in `query` or `header`' + ) + + def __deserialize_file(self, response): + """Deserializes body to file + + Saves response body into a file in a temporary folder, + using the filename from the `Content-Disposition` header if provided. + + :param response: RESTResponse. + :return: file path. + """ + + # If no results, just return None + if response.data == "": + return None + + fd, path = tempfile.mkstemp(dir=self.configuration.temp_folder_path) + os.close(fd) + os.remove(path) + + content_disposition = response.getheader("Content-Disposition") + if content_disposition: + filename = re.search(r'filename=[\'"]?([^\'"\s]+)[\'"]?', + content_disposition).group(1) + path = os.path.join(os.path.dirname(path), filename) + + if type(response.data) == str: + with open(path, "w") as f: + f.write(response.data) + else: + with open(path, "wb") as f: + f.write(response.data) + + return path + + def __deserialize_primitive(self, data, klass): + """Deserializes string to primitive type. + + :param data: str. + :param klass: class literal. + + :return: int, long, float, str, bool. + """ + try: + return klass(data) + except UnicodeEncodeError: + return six.text_type(data) + except TypeError: + return data + + def __deserialize_object(self, value): + """Return a original value. + + :return: object. + """ + return value + + def __deserialize_date(self, string): + """Deserializes string to date. + + :param string: str. + :return: date. + """ + try: + from dateutil.parser import parse + return parse(string).date() + except ImportError: + return string + except ValueError: + raise rest.ApiException( + status=0, + reason="Failed to parse `{0}` as date object".format(string) + ) + + def __deserialize_datatime(self, string): + """Deserializes string to datetime. + + The string should be in iso8601 datetime format. + + :param string: str. + :return: datetime. + """ + try: + from dateutil.parser import parse + return parse(string) + except ImportError: + return string + except ValueError: + raise rest.ApiException( + status=0, + reason=( + "Failed to parse `{0}` as datetime object" + .format(string) + ) + ) + + def __deserialize_model(self, data, klass): + """Deserializes list or dict to model. + + :param data: dict, list. + :param klass: class literal. + :return: model object. + """ + + if not klass.swagger_types and not hasattr(klass, + 'get_real_child_model'): + return data + + kwargs = {} + if klass.swagger_types is not None: + for attr, attr_type in six.iteritems(klass.swagger_types): + if (data is not None and + klass.attribute_map[attr] in data and + isinstance(data, (list, dict))): + value = data[klass.attribute_map[attr]] + kwargs[attr] = self.__deserialize(value, attr_type) + + instance = klass(**kwargs) + + if (isinstance(instance, dict) and + klass.swagger_types is not None and + isinstance(data, dict)): + for key, value in data.items(): + if key not in klass.swagger_types: + instance[key] = value + if hasattr(instance, 'get_real_child_model'): + klass_name = instance.get_real_child_model(data) + if klass_name: + instance = self.__deserialize(data, klass_name) + return instance diff --git a/pypureclient/flashblade/FB_2_14/client.py b/pypureclient/flashblade/FB_2_14/client.py new file mode 100644 index 000000000..649392ee3 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/client.py @@ -0,0 +1,25397 @@ +import json +import platform +import ssl +import time +import urllib3 +import six +from typing import List, Optional + +from ...exceptions import PureError +from ...keywords import Headers, Responses +from ...responses import ValidResponse, ErrorResponse, ApiError, ItemIterator +from ...token_manager import TokenManager +from ...api_token_manager import APITokenManager +from ...client_settings import USER_AGENT_TEMPLATE, resolve_ssl_validation +from .api_client import ApiClient +from .rest import ApiException +from .configuration import Configuration +from . import api +from . import models + +class _FBApiClient(ApiClient): + """ Flashblade version of API client that strips attributes with + value None while sanitizing object arguments.""" + def extract_object_dict_from_object(self, obj): + """Convert model obj to dict, using `swagger_types` + and use `attribute_map` to determine json keys. + Attributes that are unset or with value 'None' are filtered out.""" + obj_dict = {obj.attribute_map[attr]: getattr(obj, attr) + for attr, _ in six.iteritems(obj.swagger_types) + if getattr(obj, attr) is not None} + return obj_dict + + +class Client(object): + DEFAULT_TIMEOUT = 15.0 + DEFAULT_RETRIES = 5 + # Format: client/client_version/endpoint/endpoint_version/system/release + USER_AGENT = USER_AGENT_TEMPLATE.format(prod='FB', rest_version='2.14', sys=platform.system(), rel=platform.release()) + + def __init__(self, target, id_token=None, private_key_file=None, private_key_password=None, + username=None, client_id=None, key_id=None, issuer=None, api_token=None, + retries=DEFAULT_RETRIES, timeout=DEFAULT_TIMEOUT, ssl_cert=None, user_agent=None, + verify_ssl=None): + """ + Initialize a FlashBlade Client. id_token is generated based on app ID and private + key info. Either id_token or api_token could be used for authentication. Only one + authentication option is allowed. + + Keyword args: + target (str, required): + The target array's IP or hostname. + id_token (str, optional): + The security token that represents the identity of the party on + behalf of whom the request is being made, issued by an enabled + API client on the array. Overrides given private key. + private_key_file (str, optional): + The path of the private key to use. Defaults to None. + private_key_password (str, optional): + The password of the private key. Defaults to None. + username (str, optional): + Username of the user the token should be issued for. This must + be a valid user in the system. + client_id (str, optional): + ID of API client that issued the identity token. + key_id (str, optional): + Key ID of API client that issued the identity token. + issuer (str, optional): + API client's trusted identity issuer on the array. + api_token (str, optional): + API token for the user. + retries (int, optional): + The number of times to retry an API call if it fails for a + non-blocking reason. Defaults to 5. + timeout (float or (float, float), optional): + The timeout duration in seconds, either in total time or + (connect and read) times. Defaults to 15.0 total. + ssl_cert (str, optional): + SSL certificate to use. Defaults to None. + user_agent (str, optional): + User-Agent request header to use. + verify_ssl (bool | str, optional): + Controls SSL certificate validation. + `True` specifies that the server validation uses default trust anchors; + `False` switches certificate validation off, **not safe!**; + It also accepts string value for a path to directory with certificates. + + Raises: + PureError: If it could not create an ID or access token + """ + urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning) + config = Configuration() + config.verify_ssl = resolve_ssl_validation(verify_ssl) + config.ssl_ca_cert = ssl_cert + config.host = self._get_base_url(target) + + effective_user_agent = user_agent or self.USER_AGENT + + if id_token and api_token: + raise PureError("Only one authentication option is allowed. Please use either id_token or api_token and try again!") + elif private_key_file and private_key_password and username and \ + key_id and client_id and issuer and api_token: + raise PureError("id_token is generated based on app ID and private key info. Please use either id_token or api_token and try again!") + elif api_token: + api_token_auth_endpoint = self._get_api_token_endpoint(target) + api_token_dispose_endpoint = self._get_api_token_dispose_endpoint(target) + self._token_man = APITokenManager( + api_token_auth_endpoint, + api_token, + verify_ssl=config.verify_ssl, + token_dispose_endpoint=api_token_dispose_endpoint, + user_agent=effective_user_agent + ) + else: + auth_endpoint = 'https://{}/oauth2/1.0/token'.format(target) + headers = { + 'kid': key_id + } + payload = { + 'iss': issuer, + 'aud': client_id, + 'sub': username, + } + self._token_man = TokenManager(auth_endpoint, id_token, private_key_file, private_key_password, + payload=payload, headers=headers, verify_ssl=config.verify_ssl) + + self._api_client = _FBApiClient(configuration=config) + self._api_client.user_agent = effective_user_agent + self._set_agent_header() + self._set_auth_header() + self.models = models + + # Read timeout and retries + self._retries = retries + self._timeout = timeout + + # Instantiate APIs + self._active_directory_api = api.ActiveDirectoryApi(self._api_client) + self._administrators_api = api.AdministratorsApi(self._api_client) + self._alert_watchers_api = api.AlertWatchersApi(self._api_client) + self._alerts_api = api.AlertsApi(self._api_client) + self._api_clients_api = api.APIClientsApi(self._api_client) + self._array_connections_api = api.ArrayConnectionsApi(self._api_client) + self._arrays_api = api.ArraysApi(self._api_client) + self._audits_api = api.AuditsApi(self._api_client) + self._blades_api = api.BladesApi(self._api_client) + self._bucket_replica_links_api = api.BucketReplicaLinksApi(self._api_client) + self._buckets_api = api.BucketsApi(self._api_client) + self._certificate_groups_api = api.CertificateGroupsApi(self._api_client) + self._certificates_api = api.CertificatesApi(self._api_client) + self._clients_api = api.ClientsApi(self._api_client) + self._directory_services_api = api.DirectoryServicesApi(self._api_client) + self._dns_api = api.DNSApi(self._api_client) + self._drives_api = api.DrivesApi(self._api_client) + self._file_system_replica_links_api = api.FileSystemReplicaLinksApi(self._api_client) + self._file_system_snapshots_api = api.FileSystemSnapshotsApi(self._api_client) + self._file_systems_api = api.FileSystemsApi(self._api_client) + self._hardware_api = api.HardwareApi(self._api_client) + self._hardware_connectors_api = api.HardwareConnectorsApi(self._api_client) + self._keytabs_api = api.KeytabsApi(self._api_client) + self._kmip_api = api.KMIPApi(self._api_client) + self._lifecycle_rules_api = api.LifecycleRulesApi(self._api_client) + self._link_aggregation_groups_api = api.LinkAggregationGroupsApi(self._api_client) + self._logs_api = api.LogsApi(self._api_client) + self._network_interfaces_api = api.NetworkInterfacesApi(self._api_client) + self._object_store_access_keys_api = api.ObjectStoreAccessKeysApi(self._api_client) + self._object_store_accounts_api = api.ObjectStoreAccountsApi(self._api_client) + self._object_store_remote_credentials_api = api.ObjectStoreRemoteCredentialsApi(self._api_client) + self._object_store_users_api = api.ObjectStoreUsersApi(self._api_client) + self._object_store_virtual_hosts_api = api.ObjectStoreVirtualHostsApi(self._api_client) + self._policies___audit_for_file_systems_api = api.PoliciesAuditForFileSystemsApi(self._api_client) + self._policies___network_access_api = api.PoliciesNetworkAccessApi(self._api_client) + self._policies___nfs_api = api.PoliciesNFSApi(self._api_client) + self._policies___object_store_access_api = api.PoliciesObjectStoreAccessApi(self._api_client) + self._policies___smb_client_api = api.PoliciesSMBClientApi(self._api_client) + self._policies___smb_share_api = api.PoliciesSMBShareApi(self._api_client) + self._policies___snapshot_api = api.PoliciesSnapshotApi(self._api_client) + self._policies___ssh_certificate_authority_api = api.PoliciesSSHCertificateAuthorityApi(self._api_client) + self._policies__all_api = api.PoliciesAllApi(self._api_client) + self._public_keys_api = api.PublicKeysApi(self._api_client) + self._quotas_api = api.QuotasApi(self._api_client) + self._rdl_api = api.RDLApi(self._api_client) + self._roles_api = api.RolesApi(self._api_client) + self._sessions_api = api.SessionsApi(self._api_client) + self._smtp_api = api.SMTPApi(self._api_client) + self._snmp_agents_api = api.SNMPAgentsApi(self._api_client) + self._snmp_managers_api = api.SNMPManagersApi(self._api_client) + self._subnets_api = api.SubnetsApi(self._api_client) + self._support_api = api.SupportApi(self._api_client) + self._syslog_api = api.SyslogApi(self._api_client) + self._targets_api = api.TargetsApi(self._api_client) + self._usage_api = api.UsageApi(self._api_client) + self._verification_keys_api = api.VerificationKeysApi(self._api_client) + self._authorization_api = api.AuthorizationApi(self._api_client) + + def __del__(self): + # Cleanup this REST API client resources + if self._api_client: + self._api_client.close() + + def get_access_token(self, refresh=False): + """ + Get the last used access token. + + Args: + refresh (bool, optional): + Whether to retrieve a new access token. Defaults to False. + + Returns: + str + + Raises: + PureError: If there was an error retrieving an access token. + """ + return self._token_man.get_access_token(refresh) + + def disable_verify_ssl(self): + """ Change our certificate requirements so that a certificate is not validated. """ + self._api_client.rest_client.pool_manager.connection_pool_kw['cert_reqs'] = ssl.CERT_NONE + + def enable_verify_ssl(self, ca_certs_file_path=None): + """ Change our certificate requirements so that a certificate is required and validated. + Optionally, if a CA certificate(s) file path is provided, configure the client to use + that CA certificate file. + """ + if ca_certs_file_path: + self.configure_ca_certificate_file(ca_certs_file_path) + self._api_client.rest_client.pool_manager.connection_pool_kw['cert_reqs'] = ssl.CERT_REQUIRED + + def configure_ca_certificate_file(self, ca_certs_file_path): + """" + :param ca_certs_file_path: The path to the CA certificate(s) file to use. + :return: + """ + self._api_client.rest_client.pool_manager.connection_pool_kw['ca_certs'] = ca_certs_file_path + + def delete_active_directory( + self, + references=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + ids=None, # type: List[str] + local_only=None, # type: bool + names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> None + """ + Delete an Active Directory account. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides ids and names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + ids (list[str], optional): + A list of resource IDs. If after filtering, there is not at least one resource + that matches each of the elements of `ids`, then an error is returned. This + cannot be provided together with the `name` or `names` query parameters. + local_only (bool, optional): + If specified as `true`, only delete the Active Directory configuration on the + local array, without deleting the computer account created in the Active + Directory domain. If not specified, defaults to `false`. + names (list[str], optional): + A list of resource names. If there is not at least one resource that matches + each of the elements of `names`, then an error is returned. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + ids=ids, + local_only=local_only, + names=names, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._active_directory_api.api214_active_directory_delete_with_http_info + _process_references(references, ['ids', 'names'], kwargs) + return self._call_api(endpoint, kwargs) + + def get_active_directory( + self, + references=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + continuation_token=None, # type: str + filter=None, # type: str + ids=None, # type: List[str] + limit=None, # type: int + names=None, # type: List[str] + offset=None, # type: int + sort=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.ActiveDirectoryGetResponse + """ + List an Active Directory account and its configuration. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides ids and names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + continuation_token (str, optional): + An opaque token to iterate over a collection of resources. + filter (Filter, optional): + A filter to include only resources that match the specified criteria. + ids (list[str], optional): + A list of resource IDs. If after filtering, there is not at least one resource + that matches each of the elements of `ids`, then an error is returned. This + cannot be provided together with the `name` or `names` query parameters. + limit (int, optional): + Limit the number of resources in the response. If not specified, defaults to + 1000. + names (list[str], optional): + A list of resource names. If there is not at least one resource that matches + each of the elements of `names`, then an error is returned. + offset (int, optional): + The offset of the first resource to return from a collection. + sort (list[Property], optional): + Sort the response by the specified Properties. Can also be a single element. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + continuation_token=continuation_token, + filter=filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + sort=sort, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._active_directory_api.api214_active_directory_get_with_http_info + _process_references(references, ['ids', 'names'], kwargs) + return self._call_api(endpoint, kwargs) + + def patch_active_directory( + self, + references=None, # type: List[models.ReferenceType] + active_directory=None, # type: models.ActiveDirectoryPatch + x_request_id=None, # type: str + ids=None, # type: List[str] + names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.ActiveDirectoryResponse + """ + Modify the configuration of an Active Directory account. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides ids and names keyword arguments. + + active_directory (ActiveDirectoryPatch, required): + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + ids (list[str], optional): + A list of resource IDs. If after filtering, there is not at least one resource + that matches each of the elements of `ids`, then an error is returned. This + cannot be provided together with the `name` or `names` query parameters. + names (list[str], optional): + A list of resource names. If there is not at least one resource that matches + each of the elements of `names`, then an error is returned. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + active_directory=active_directory, + x_request_id=x_request_id, + ids=ids, + names=names, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._active_directory_api.api214_active_directory_patch_with_http_info + _process_references(references, ['ids', 'names'], kwargs) + return self._call_api(endpoint, kwargs) + + def post_active_directory( + self, + references=None, # type: List[models.ReferenceType] + active_directory=None, # type: models.ActiveDirectoryPost + x_request_id=None, # type: str + names=None, # type: List[str] + join_existing_account=None, # type: bool + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.ActiveDirectoryResponse + """ + Join an Active Directory domain and generate keytabs for the registered SPNs and + supported encryption types. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides names keyword arguments. + + active_directory (ActiveDirectoryPost, required): + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + names (list[str], optional): + A list of resource names. If there is not at least one resource that matches + each of the elements of `names`, then an error is returned. + join_existing_account (bool, optional): + If specified as `true`, the domain is searched for a pre-existing computer + account to join to, and no new account will be created within the domain. The + `user` specified when joining to a pre-existing account must have permissions to + 'read attributes from' and 'reset the password of' the pre-existing account. + `service_principal_names`, `encryption_types`, and `join_ou` will be read from + the pre-existing account and cannot be specified when joining to an existing + account. If not specified, defaults to `false`. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + active_directory=active_directory, + x_request_id=x_request_id, + names=names, + join_existing_account=join_existing_account, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._active_directory_api.api214_active_directory_post_with_http_info + _process_references(references, ['names'], kwargs) + return self._call_api(endpoint, kwargs) + + def get_active_directory_test( + self, + references=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + filter=None, # type: str + ids=None, # type: List[str] + limit=None, # type: int + names=None, # type: List[str] + sort=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.TestResultGetResponse + """ + Testing if the configuration of an Active Directory account is valid. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides ids and names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + filter (Filter, optional): + A filter to include only resources that match the specified criteria. + ids (list[str], optional): + A list of resource IDs. If after filtering, there is not at least one resource + that matches each of the elements of `ids`, then an error is returned. This + cannot be provided together with the `name` or `names` query parameters. + limit (int, optional): + Limit the number of resources in the response. If not specified, defaults to + 1000. + names (list[str], optional): + A list of resource names. If there is not at least one resource that matches + each of the elements of `names`, then an error is returned. + sort (list[Property], optional): + Sort the response by the specified Properties. Can also be a single element. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + filter=filter, + ids=ids, + limit=limit, + names=names, + sort=sort, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._active_directory_api.api214_active_directory_test_get_with_http_info + _process_references(references, ['ids', 'names'], kwargs) + return self._call_api(endpoint, kwargs) + + def delete_admins_api_tokens( + self, + admins=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + admin_ids=None, # type: List[str] + admin_names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> None + """ + Deletes the API tokens of the specified administrators. + + Args: + admins (list[FixedReference], optional): + A list of admins to query for. Overrides admin_ids and admin_names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + admin_ids (list[str], optional): + A list of admin IDs. If after filtering, there is not at least one admin + resource that matches each of the elements, then an error is returned. This + cannot be provided together with the `admin_names` query parameter. + admin_names (list[str], optional): + A list of admin names. If there is not at least one admin resource that matches + each of the elements, then an error is returned. This cannot be provided + together with `admin_ids` query parameter. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + admin_ids=admin_ids, + admin_names=admin_names, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._administrators_api.api214_admins_api_tokens_delete_with_http_info + _process_references(admins, ['admin_ids', 'admin_names'], kwargs) + return self._call_api(endpoint, kwargs) + + def get_admins_api_tokens( + self, + admins=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + admin_ids=None, # type: List[str] + admin_names=None, # type: List[str] + continuation_token=None, # type: str + expose_api_token=None, # type: bool + filter=None, # type: str + limit=None, # type: int + offset=None, # type: int + sort=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.AdminApiTokenGetResponse + """ + Displays API tokens for the specified administrators. + + Args: + admins (list[FixedReference], optional): + A list of admins to query for. Overrides admin_ids and admin_names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + admin_ids (list[str], optional): + A list of admin IDs. If after filtering, there is not at least one admin + resource that matches each of the elements, then an error is returned. This + cannot be provided together with the `admin_names` query parameter. + admin_names (list[str], optional): + A list of admin names. If there is not at least one admin resource that matches + each of the elements, then an error is returned. This cannot be provided + together with `admin_ids` query parameter. + continuation_token (str, optional): + An opaque token to iterate over a collection of resources. + expose_api_token (bool, optional): + If `true`, exposes the API token of the current user. + filter (Filter, optional): + A filter to include only resources that match the specified criteria. + limit (int, optional): + Limit the number of resources in the response. If not specified, defaults to + 1000. + offset (int, optional): + The offset of the first resource to return from a collection. + sort (list[Property], optional): + Sort the response by the specified Properties. Can also be a single element. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + admin_ids=admin_ids, + admin_names=admin_names, + continuation_token=continuation_token, + expose_api_token=expose_api_token, + filter=filter, + limit=limit, + offset=offset, + sort=sort, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._administrators_api.api214_admins_api_tokens_get_with_http_info + _process_references(admins, ['admin_ids', 'admin_names'], kwargs) + return self._call_api(endpoint, kwargs) + + def post_admins_api_tokens( + self, + admins=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + admin_ids=None, # type: List[str] + admin_names=None, # type: List[str] + timeout=None, # type: int + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.AdminApiTokenResponse + """ + Creates API tokens for the specified administrators. + + Args: + admins (list[FixedReference], optional): + A list of admins to query for. Overrides admin_ids and admin_names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + admin_ids (list[str], optional): + A list of admin IDs. If after filtering, there is not at least one admin + resource that matches each of the elements, then an error is returned. This + cannot be provided together with the `admin_names` query parameter. + admin_names (list[str], optional): + A list of admin names. If there is not at least one admin resource that matches + each of the elements, then an error is returned. This cannot be provided + together with `admin_ids` query parameter. + timeout (int, optional): + The duration of API token validity, in milliseconds. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + admin_ids=admin_ids, + admin_names=admin_names, + timeout=timeout, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._administrators_api.api214_admins_api_tokens_post_with_http_info + _process_references(admins, ['admin_ids', 'admin_names'], kwargs) + return self._call_api(endpoint, kwargs) + + def delete_admins_cache( + self, + references=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + ids=None, # type: List[str] + names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> None + """ + Delete cached administrator role information by name or ID. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides ids and names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + ids (list[str], optional): + A list of resource IDs. If after filtering, there is not at least one resource + that matches each of the elements of `ids`, then an error is returned. This + cannot be provided together with the `name` or `names` query parameters. + names (list[str], optional): + A list of resource names. If there is not at least one resource that matches + each of the elements of `names`, then an error is returned. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + ids=ids, + names=names, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._administrators_api.api214_admins_cache_delete_with_http_info + _process_references(references, ['ids', 'names'], kwargs) + return self._call_api(endpoint, kwargs) + + def get_admins_cache( + self, + references=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + continuation_token=None, # type: str + filter=None, # type: str + ids=None, # type: List[str] + limit=None, # type: int + names=None, # type: List[str] + offset=None, # type: int + refresh=None, # type: bool + sort=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.AdminCacheGetResponse + """ + List cached administrator information used to determine role based access + control privileges. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides ids and names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + continuation_token (str, optional): + An opaque token to iterate over a collection of resources. + filter (Filter, optional): + A filter to include only resources that match the specified criteria. + ids (list[str], optional): + A list of resource IDs. If after filtering, there is not at least one resource + that matches each of the elements of `ids`, then an error is returned. This + cannot be provided together with the `name` or `names` query parameters. + limit (int, optional): + Limit the number of resources in the response. If not specified, defaults to + 1000. + names (list[str], optional): + A list of resource names. If there is not at least one resource that matches + each of the elements of `names`, then an error is returned. + offset (int, optional): + The offset of the first resource to return from a collection. + refresh (bool, optional): + Whether to refresh the user info from directory service. If not specified, + defaults to `false`. + sort (list[Property], optional): + Sort the response by the specified Properties. Can also be a single element. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + continuation_token=continuation_token, + filter=filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + refresh=refresh, + sort=sort, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._administrators_api.api214_admins_cache_get_with_http_info + _process_references(references, ['ids', 'names'], kwargs) + return self._call_api(endpoint, kwargs) + + def get_admins( + self, + references=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + continuation_token=None, # type: str + expose_api_token=None, # type: bool + filter=None, # type: str + ids=None, # type: List[str] + limit=None, # type: int + names=None, # type: List[str] + offset=None, # type: int + sort=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.AdminGetResponse + """ + List the administrator's attributes, including the API token and public key. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides ids and names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + continuation_token (str, optional): + An opaque token to iterate over a collection of resources. + expose_api_token (bool, optional): + If `true`, exposes the API token of the current user. + filter (Filter, optional): + A filter to include only resources that match the specified criteria. + ids (list[str], optional): + A list of resource IDs. If after filtering, there is not at least one resource + that matches each of the elements of `ids`, then an error is returned. This + cannot be provided together with the `name` or `names` query parameters. + limit (int, optional): + Limit the number of resources in the response. If not specified, defaults to + 1000. + names (list[str], optional): + A list of resource names. If there is not at least one resource that matches + each of the elements of `names`, then an error is returned. + offset (int, optional): + The offset of the first resource to return from a collection. + sort (list[Property], optional): + Sort the response by the specified Properties. Can also be a single element. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + continuation_token=continuation_token, + expose_api_token=expose_api_token, + filter=filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + sort=sort, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._administrators_api.api214_admins_get_with_http_info + _process_references(references, ['ids', 'names'], kwargs) + return self._call_api(endpoint, kwargs) + + def patch_admins( + self, + references=None, # type: List[models.ReferenceType] + admin=None, # type: models.AdminPatch + x_request_id=None, # type: str + ids=None, # type: List[str] + names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.AdminResponse + """ + Modify the attributes of the administrator. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides ids and names keyword arguments. + + admin (AdminPatch, required): + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + ids (list[str], optional): + A list of resource IDs. If after filtering, there is not at least one resource + that matches each of the elements of `ids`, then an error is returned. This + cannot be provided together with the `name` or `names` query parameters. + names (list[str], optional): + A list of resource names. If there is not at least one resource that matches + each of the elements of `names`, then an error is returned. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + admin=admin, + x_request_id=x_request_id, + ids=ids, + names=names, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._administrators_api.api214_admins_patch_with_http_info + _process_references(references, ['ids', 'names'], kwargs) + return self._call_api(endpoint, kwargs) + + def get_admins_settings( + self, + x_request_id=None, # type: str + continuation_token=None, # type: str + filter=None, # type: str + limit=None, # type: int + offset=None, # type: int + sort=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.AdminSettingsGetResponse + """ + Return global admin settings. + + Args: + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + continuation_token (str, optional): + An opaque token to iterate over a collection of resources. + filter (Filter, optional): + A filter to include only resources that match the specified criteria. + limit (int, optional): + Limit the number of resources in the response. If not specified, defaults to + 1000. + offset (int, optional): + The offset of the first resource to return from a collection. + sort (list[Property], optional): + Sort the response by the specified Properties. Can also be a single element. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + continuation_token=continuation_token, + filter=filter, + limit=limit, + offset=offset, + sort=sort, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._administrators_api.api214_admins_settings_get_with_http_info + return self._call_api(endpoint, kwargs) + + def patch_admins_settings( + self, + admin_setting=None, # type: models.AdminSetting + x_request_id=None, # type: str + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.AdminSettingsResponse + """ + Update properties for global admin settings. + + Args: + + admin_setting (AdminSetting, required): + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + admin_setting=admin_setting, + x_request_id=x_request_id, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._administrators_api.api214_admins_settings_patch_with_http_info + return self._call_api(endpoint, kwargs) + + def delete_alert_watchers( + self, + references=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + ids=None, # type: List[str] + names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> None + """ + Delete an alert watcher. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides ids and names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + ids (list[str], optional): + A list of resource IDs. If after filtering, there is not at least one resource + that matches each of the elements of `ids`, then an error is returned. This + cannot be provided together with the `name` or `names` query parameters. + names (list[str], optional): + A list of resource names. If there is not at least one resource that matches + each of the elements of `names`, then an error is returned. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + ids=ids, + names=names, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._alert_watchers_api.api214_alert_watchers_delete_with_http_info + _process_references(references, ['ids', 'names'], kwargs) + return self._call_api(endpoint, kwargs) + + def get_alert_watchers( + self, + references=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + continuation_token=None, # type: str + filter=None, # type: str + ids=None, # type: List[str] + limit=None, # type: int + names=None, # type: List[str] + offset=None, # type: int + sort=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.AlertWatcherGetResponse + """ + List alert watchers that are configured to receive alert messages. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides ids and names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + continuation_token (str, optional): + An opaque token to iterate over a collection of resources. + filter (Filter, optional): + A filter to include only resources that match the specified criteria. + ids (list[str], optional): + A list of resource IDs. If after filtering, there is not at least one resource + that matches each of the elements of `ids`, then an error is returned. This + cannot be provided together with the `name` or `names` query parameters. + limit (int, optional): + Limit the number of resources in the response. If not specified, defaults to + 1000. + names (list[str], optional): + A list of resource names. If there is not at least one resource that matches + each of the elements of `names`, then an error is returned. + offset (int, optional): + The offset of the first resource to return from a collection. + sort (list[Property], optional): + Sort the response by the specified Properties. Can also be a single element. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + continuation_token=continuation_token, + filter=filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + sort=sort, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._alert_watchers_api.api214_alert_watchers_get_with_http_info + _process_references(references, ['ids', 'names'], kwargs) + return self._call_api(endpoint, kwargs) + + def patch_alert_watchers( + self, + references=None, # type: List[models.ReferenceType] + alert_watcher=None, # type: models.AlertWatcher + x_request_id=None, # type: str + ids=None, # type: List[str] + names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.AlertWatcherResponse + """ + Modify an alert watcher’s configuration. Enable or disable an alert watcher + privilege and select the level of alert notification of an alert watcher. Alert + notification levels are `info`, `warning`, or `critical`. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides ids and names keyword arguments. + + alert_watcher (AlertWatcher, required): + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + ids (list[str], optional): + A list of resource IDs. If after filtering, there is not at least one resource + that matches each of the elements of `ids`, then an error is returned. This + cannot be provided together with the `name` or `names` query parameters. + names (list[str], optional): + A list of resource names. If there is not at least one resource that matches + each of the elements of `names`, then an error is returned. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + alert_watcher=alert_watcher, + x_request_id=x_request_id, + ids=ids, + names=names, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._alert_watchers_api.api214_alert_watchers_patch_with_http_info + _process_references(references, ['ids', 'names'], kwargs) + return self._call_api(endpoint, kwargs) + + def post_alert_watchers( + self, + references=None, # type: List[models.ReferenceType] + names=None, # type: List[str] + x_request_id=None, # type: str + alert_watcher=None, # type: models.AlertWatcherPost + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.AlertWatcherResponse + """ + Create an alert watcher to receive array alert messages. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides names keyword arguments. + + names (list[str], required): + A list of resource names. + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + alert_watcher (AlertWatcherPost, optional): + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + names=names, + x_request_id=x_request_id, + alert_watcher=alert_watcher, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._alert_watchers_api.api214_alert_watchers_post_with_http_info + _process_references(references, ['names'], kwargs) + return self._call_api(endpoint, kwargs) + + def get_alert_watchers_test( + self, + references=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + filter=None, # type: str + ids=None, # type: List[str] + names=None, # type: List[str] + sort=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.TestResultResponse + """ + Test an alert watcher's contact information to verify alerts can be sent and + received. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides ids and names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + filter (Filter, optional): + A filter to include only resources that match the specified criteria. + ids (list[str], optional): + A list of resource IDs. If after filtering, there is not at least one resource + that matches each of the elements of `ids`, then an error is returned. This + cannot be provided together with the `name` or `names` query parameters. + names (list[str], optional): + A list of resource names. If there is not at least one resource that matches + each of the elements of `names`, then an error is returned. + sort (list[Property], optional): + Sort the response by the specified Properties. Can also be a single element. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + filter=filter, + ids=ids, + names=names, + sort=sort, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._alert_watchers_api.api214_alert_watchers_test_get_with_http_info + _process_references(references, ['ids', 'names'], kwargs) + return self._call_api(endpoint, kwargs) + + def get_alerts( + self, + references=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + continuation_token=None, # type: str + filter=None, # type: str + ids=None, # type: List[str] + limit=None, # type: int + names=None, # type: List[str] + offset=None, # type: int + sort=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.AlertGetResponse + """ + Returns a list of alerts which have been generated by the array. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides ids and names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + continuation_token (str, optional): + An opaque token to iterate over a collection of resources. + filter (Filter, optional): + A filter to include only resources that match the specified criteria. + ids (list[str], optional): + A list of resource IDs. If after filtering, there is not at least one resource + that matches each of the elements of `ids`, then an error is returned. This + cannot be provided together with the `name` or `names` query parameters. + limit (int, optional): + Limit the number of resources in the response. If not specified, defaults to + 1000. + names (list[str], optional): + A list of resource names. If there is not at least one resource that matches + each of the elements of `names`, then an error is returned. + offset (int, optional): + The offset of the first resource to return from a collection. + sort (list[Property], optional): + Sort the response by the specified Properties. Can also be a single element. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + continuation_token=continuation_token, + filter=filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + sort=sort, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._alerts_api.api214_alerts_get_with_http_info + _process_references(references, ['ids', 'names'], kwargs) + return self._call_api(endpoint, kwargs) + + def patch_alerts( + self, + references=None, # type: List[models.ReferenceType] + alerts_settings=None, # type: models.Alert + x_request_id=None, # type: str + ids=None, # type: List[str] + names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.AlertResponse + """ + Make changes to an alert. This is currently limited to the alert's `flagged` + property. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides ids and names keyword arguments. + + alerts_settings (Alert, required): + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + ids (list[str], optional): + A list of resource IDs. If after filtering, there is not at least one resource + that matches each of the elements of `ids`, then an error is returned. This + cannot be provided together with the `name` or `names` query parameters. + names (list[str], optional): + A list of resource names. If there is not at least one resource that matches + each of the elements of `names`, then an error is returned. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + alerts_settings=alerts_settings, + x_request_id=x_request_id, + ids=ids, + names=names, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._alerts_api.api214_alerts_patch_with_http_info + _process_references(references, ['ids', 'names'], kwargs) + return self._call_api(endpoint, kwargs) + + def delete_api_clients( + self, + references=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + ids=None, # type: List[str] + names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> None + """ + Delete the API client. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides ids and names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + ids (list[str], optional): + A list of resource IDs. If after filtering, there is not at least one resource + that matches each of the elements of `ids`, then an error is returned. This + cannot be provided together with the `name` or `names` query parameters. + names (list[str], optional): + A list of resource names. If there is not at least one resource that matches + each of the elements of `names`, then an error is returned. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + ids=ids, + names=names, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._api_clients_api.api214_api_clients_delete_with_http_info + _process_references(references, ['ids', 'names'], kwargs) + return self._call_api(endpoint, kwargs) + + def get_api_clients( + self, + references=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + continuation_token=None, # type: str + filter=None, # type: str + ids=None, # type: List[str] + limit=None, # type: int + names=None, # type: List[str] + offset=None, # type: int + sort=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.ApiClientsResponse + """ + List an API client and its configuration attributes. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides ids and names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + continuation_token (str, optional): + An opaque token to iterate over a collection of resources. + filter (Filter, optional): + A filter to include only resources that match the specified criteria. + ids (list[str], optional): + A list of resource IDs. If after filtering, there is not at least one resource + that matches each of the elements of `ids`, then an error is returned. This + cannot be provided together with the `name` or `names` query parameters. + limit (int, optional): + Limit the number of resources in the response. If not specified, defaults to + 1000. + names (list[str], optional): + A list of resource names. If there is not at least one resource that matches + each of the elements of `names`, then an error is returned. + offset (int, optional): + The offset of the first resource to return from a collection. + sort (list[Property], optional): + Sort the response by the specified Properties. Can also be a single element. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + continuation_token=continuation_token, + filter=filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + sort=sort, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._api_clients_api.api214_api_clients_get_with_http_info + _process_references(references, ['ids', 'names'], kwargs) + return self._call_api(endpoint, kwargs) + + def patch_api_clients( + self, + references=None, # type: List[models.ReferenceType] + api_clients=None, # type: models.ApiClient + x_request_id=None, # type: str + ids=None, # type: List[str] + names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.ApiClientsResponse + """ + Modify an API client. Newly created API clients can be enabled by setting the + `enabled` parameter to `true`. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides ids and names keyword arguments. + + api_clients (ApiClient, required): + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + ids (list[str], optional): + A list of resource IDs. If after filtering, there is not at least one resource + that matches each of the elements of `ids`, then an error is returned. This + cannot be provided together with the `name` or `names` query parameters. + names (list[str], optional): + A list of resource names. If there is not at least one resource that matches + each of the elements of `names`, then an error is returned. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + api_clients=api_clients, + x_request_id=x_request_id, + ids=ids, + names=names, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._api_clients_api.api214_api_clients_patch_with_http_info + _process_references(references, ['ids', 'names'], kwargs) + return self._call_api(endpoint, kwargs) + + def post_api_clients( + self, + references=None, # type: List[models.ReferenceType] + api_client=None, # type: models.ApiClientsPost + x_request_id=None, # type: str + names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.ApiClientsResponse + """ + Create an API client to authorize Access Token or Bearer Tokens for use on the + array. Required fields include `issuer`, `public_key`, and + `access_token_ttl_in_ms`. After creating an API client, it can only be enabled + by an authorized user. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides names keyword arguments. + + api_client (ApiClientsPost, required): + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + names (list[str], optional): + A list of resource names. If there is not at least one resource that matches + each of the elements of `names`, then an error is returned. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + api_client=api_client, + x_request_id=x_request_id, + names=names, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._api_clients_api.api214_api_clients_post_with_http_info + _process_references(references, ['names'], kwargs) + return self._call_api(endpoint, kwargs) + + def get_array_connections_connection_key( + self, + references=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + continuation_token=None, # type: str + filter=None, # type: str + ids=None, # type: List[str] + limit=None, # type: int + names=None, # type: List[str] + offset=None, # type: int + sort=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.ArrayConnectionKeyGetResponse + """ + List connection keys used to authenticate the connection from one array to + another. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides ids and names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + continuation_token (str, optional): + An opaque token to iterate over a collection of resources. + filter (Filter, optional): + A filter to include only resources that match the specified criteria. + ids (list[str], optional): + A list of resource IDs. If after filtering, there is not at least one resource + that matches each of the elements of `ids`, then an error is returned. This + cannot be provided together with the `name` or `names` query parameters. + limit (int, optional): + Limit the number of resources in the response. If not specified, defaults to + 1000. + names (list[str], optional): + A list of resource names. If there is not at least one resource that matches + each of the elements of `names`, then an error is returned. + offset (int, optional): + The offset of the first resource to return from a collection. + sort (list[Property], optional): + Sort the response by the specified Properties. Can also be a single element. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + continuation_token=continuation_token, + filter=filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + sort=sort, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._array_connections_api.api214_array_connections_connection_key_get_with_http_info + _process_references(references, ['ids', 'names'], kwargs) + return self._call_api(endpoint, kwargs) + + def post_array_connections_connection_key( + self, + x_request_id=None, # type: str + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.ArrayConnectionKeyResponse + """ + Create an array connection key allowing one array to connect to another for + replication. + + Args: + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._array_connections_api.api214_array_connections_connection_key_post_with_http_info + return self._call_api(endpoint, kwargs) + + def delete_array_connections( + self, + references=None, # type: List[models.ReferenceType] + remotes=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + ids=None, # type: List[str] + remote_ids=None, # type: List[str] + remote_names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> None + """ + Delete a connection to an array. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides ids keyword arguments. + remotes (list[FixedReference], optional): + A list of remotes to query for. Overrides remote_ids and remote_names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + ids (list[str], optional): + A list of resource IDs. If after filtering, there is not at least one resource + that matches each of the elements of `ids`, then an error is returned. This + cannot be provided together with the `name` or `names` query parameters. + remote_ids (list[str], optional): + A list of remote array IDs. If after filtering, there is not at least one + resource that matches each of the elements, then an error is returned. This + cannot be provided together with the `remote_names` query parameter. + remote_names (list[str], optional): + A list of remote array names. If there is not at least one resource that matches + each of the elements, then an error is returned. This cannot be provided + together with `remote_ids` query parameter. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + ids=ids, + remote_ids=remote_ids, + remote_names=remote_names, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._array_connections_api.api214_array_connections_delete_with_http_info + _process_references(references, ['ids'], kwargs) + _process_references(remotes, ['remote_ids', 'remote_names'], kwargs) + return self._call_api(endpoint, kwargs) + + def get_array_connections( + self, + references=None, # type: List[models.ReferenceType] + remotes=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + continuation_token=None, # type: str + filter=None, # type: str + ids=None, # type: List[str] + limit=None, # type: int + offset=None, # type: int + remote_ids=None, # type: List[str] + remote_names=None, # type: List[str] + sort=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.ArrayConnectionGetResponse + """ + List connected arrays for replication. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides ids keyword arguments. + remotes (list[FixedReference], optional): + A list of remotes to query for. Overrides remote_ids and remote_names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + continuation_token (str, optional): + An opaque token to iterate over a collection of resources. + filter (Filter, optional): + A filter to include only resources that match the specified criteria. + ids (list[str], optional): + A list of resource IDs. If after filtering, there is not at least one resource + that matches each of the elements of `ids`, then an error is returned. This + cannot be provided together with the `name` or `names` query parameters. + limit (int, optional): + Limit the number of resources in the response. If not specified, defaults to + 1000. + offset (int, optional): + The offset of the first resource to return from a collection. + remote_ids (list[str], optional): + A list of remote array IDs. If after filtering, there is not at least one + resource that matches each of the elements, then an error is returned. This + cannot be provided together with the `remote_names` query parameter. + remote_names (list[str], optional): + A list of remote array names. If there is not at least one resource that matches + each of the elements, then an error is returned. This cannot be provided + together with `remote_ids` query parameter. + sort (list[Property], optional): + Sort the response by the specified Properties. Can also be a single element. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + continuation_token=continuation_token, + filter=filter, + ids=ids, + limit=limit, + offset=offset, + remote_ids=remote_ids, + remote_names=remote_names, + sort=sort, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._array_connections_api.api214_array_connections_get_with_http_info + _process_references(references, ['ids'], kwargs) + _process_references(remotes, ['remote_ids', 'remote_names'], kwargs) + return self._call_api(endpoint, kwargs) + + def patch_array_connections( + self, + references=None, # type: List[models.ReferenceType] + remotes=None, # type: List[models.ReferenceType] + array_connection=None, # type: models.ArrayConnection + x_request_id=None, # type: str + ids=None, # type: List[str] + remote_ids=None, # type: List[str] + remote_names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.ArrayConnectionResponse + """ + Modify the configuration of a connected array. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides ids keyword arguments. + remotes (list[FixedReference], optional): + A list of remotes to query for. Overrides remote_ids and remote_names keyword arguments. + + array_connection (ArrayConnection, required): + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + ids (list[str], optional): + A list of resource IDs. If after filtering, there is not at least one resource + that matches each of the elements of `ids`, then an error is returned. This + cannot be provided together with the `name` or `names` query parameters. + remote_ids (list[str], optional): + A list of remote array IDs. If after filtering, there is not at least one + resource that matches each of the elements, then an error is returned. This + cannot be provided together with the `remote_names` query parameter. + remote_names (list[str], optional): + A list of remote array names. If there is not at least one resource that matches + each of the elements, then an error is returned. This cannot be provided + together with `remote_ids` query parameter. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + array_connection=array_connection, + x_request_id=x_request_id, + ids=ids, + remote_ids=remote_ids, + remote_names=remote_names, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._array_connections_api.api214_array_connections_patch_with_http_info + _process_references(references, ['ids'], kwargs) + _process_references(remotes, ['remote_ids', 'remote_names'], kwargs) + return self._call_api(endpoint, kwargs) + + def get_array_connections_path( + self, + references=None, # type: List[models.ReferenceType] + remotes=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + continuation_token=None, # type: str + filter=None, # type: str + ids=None, # type: List[str] + limit=None, # type: int + offset=None, # type: int + remote_ids=None, # type: List[str] + remote_names=None, # type: List[str] + sort=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.ArrayConnectionPathGetResponse + """ + List network path details of connected arrays. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides ids keyword arguments. + remotes (list[FixedReference], optional): + A list of remotes to query for. Overrides remote_ids and remote_names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + continuation_token (str, optional): + An opaque token to iterate over a collection of resources. + filter (Filter, optional): + A filter to include only resources that match the specified criteria. + ids (list[str], optional): + A list of resource IDs. If after filtering, there is not at least one resource + that matches each of the elements of `ids`, then an error is returned. This + cannot be provided together with the `name` or `names` query parameters. + limit (int, optional): + Limit the number of resources in the response. If not specified, defaults to + 1000. + offset (int, optional): + The offset of the first resource to return from a collection. + remote_ids (list[str], optional): + A list of remote array IDs. If after filtering, there is not at least one + resource that matches each of the elements, then an error is returned. This + cannot be provided together with the `remote_names` query parameter. + remote_names (list[str], optional): + A list of remote array names. If there is not at least one resource that matches + each of the elements, then an error is returned. This cannot be provided + together with `remote_ids` query parameter. + sort (list[Property], optional): + Sort the response by the specified Properties. Can also be a single element. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + continuation_token=continuation_token, + filter=filter, + ids=ids, + limit=limit, + offset=offset, + remote_ids=remote_ids, + remote_names=remote_names, + sort=sort, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._array_connections_api.api214_array_connections_path_get_with_http_info + _process_references(references, ['ids'], kwargs) + _process_references(remotes, ['remote_ids', 'remote_names'], kwargs) + return self._call_api(endpoint, kwargs) + + def get_array_connections_performance_replication( + self, + references=None, # type: List[models.ReferenceType] + remotes=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + continuation_token=None, # type: str + end_time=None, # type: int + filter=None, # type: str + ids=None, # type: List[str] + limit=None, # type: int + offset=None, # type: int + remote_ids=None, # type: List[str] + remote_names=None, # type: List[str] + resolution=None, # type: int + sort=None, # type: List[str] + start_time=None, # type: int + total_only=None, # type: bool + type=None, # type: str + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.ConnectionRelationshipPerformanceReplicationGetResp + """ + List performance metrics of file systems or objects being replicated from one + array to another. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides ids keyword arguments. + remotes (list[FixedReference], optional): + A list of remotes to query for. Overrides remote_ids and remote_names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + continuation_token (str, optional): + An opaque token to iterate over a collection of resources. + end_time (int, optional): + When the time window ends (in milliseconds since epoch). + filter (Filter, optional): + A filter to include only resources that match the specified criteria. + ids (list[str], optional): + A list of resource IDs. If after filtering, there is not at least one resource + that matches each of the elements of `ids`, then an error is returned. This + cannot be provided together with the `name` or `names` query parameters. + limit (int, optional): + Limit the number of resources in the response. If not specified, defaults to + 1000. + offset (int, optional): + The offset of the first resource to return from a collection. + remote_ids (list[str], optional): + A list of remote array IDs. If after filtering, there is not at least one + resource that matches each of the elements, then an error is returned. This + cannot be provided together with the `remote_names` query parameter. + remote_names (list[str], optional): + A list of remote array names. If there is not at least one resource that matches + each of the elements, then an error is returned. This cannot be provided + together with `remote_ids` query parameter. + resolution (int, optional): + The desired ms between samples. Available resolutions may depend on data type, + `start_time` and `end_time`. In general `1000`, `30000`, `300000`, `1800000`, + `7200000`, and `86400000` are possible values. + sort (list[Property], optional): + Sort the response by the specified Properties. Can also be a single element. + start_time (int, optional): + When the time window starts (in milliseconds since epoch). + total_only (bool, optional): + Only return the total record for the specified items. The total record will be + the total of all items after filtering. The `items` list will be empty. + type (str, optional): + Display the metric of a specified object type. Valid values are `all`, `file- + system`, and `object-store`. If not specified, defaults to `all`. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + continuation_token=continuation_token, + end_time=end_time, + filter=filter, + ids=ids, + limit=limit, + offset=offset, + remote_ids=remote_ids, + remote_names=remote_names, + resolution=resolution, + sort=sort, + start_time=start_time, + total_only=total_only, + type=type, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._array_connections_api.api214_array_connections_performance_replication_get_with_http_info + _process_references(references, ['ids'], kwargs) + _process_references(remotes, ['remote_ids', 'remote_names'], kwargs) + return self._call_api(endpoint, kwargs) + + def post_array_connections( + self, + array_connection=None, # type: models.ArrayConnectionPost + x_request_id=None, # type: str + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.ArrayConnectionResponse + """ + Create a connection to an array for replication and configure network settings. + + Args: + + array_connection (ArrayConnectionPost, required): + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + array_connection=array_connection, + x_request_id=x_request_id, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._array_connections_api.api214_array_connections_post_with_http_info + return self._call_api(endpoint, kwargs) + + def get_arrays_eula( + self, + x_request_id=None, # type: str + continuation_token=None, # type: str + filter=None, # type: str + limit=None, # type: int + offset=None, # type: int + sort=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.EulaGetResponse + """ + List the End User Agreement and signature. + + Args: + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + continuation_token (str, optional): + An opaque token to iterate over a collection of resources. + filter (Filter, optional): + A filter to include only resources that match the specified criteria. + limit (int, optional): + Limit the number of resources in the response. If not specified, defaults to + 1000. + offset (int, optional): + The offset of the first resource to return from a collection. + sort (list[Property], optional): + Sort the response by the specified Properties. Can also be a single element. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + continuation_token=continuation_token, + filter=filter, + limit=limit, + offset=offset, + sort=sort, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._arrays_api.api214_arrays_eula_get_with_http_info + return self._call_api(endpoint, kwargs) + + def patch_arrays_eula( + self, + x_request_id=None, # type: str + eula=None, # type: models.Eula + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.EulaResponse + """ + Modifies the signature on the End User Agreement. + + Args: + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + eula (Eula, optional): + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + eula=eula, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._arrays_api.api214_arrays_eula_patch_with_http_info + return self._call_api(endpoint, kwargs) + + def delete_arrays_factory_reset_token( + self, + x_request_id=None, # type: str + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> None + """ + Deletes any existing token that could be used to perform a factory reset on the + array. + + Args: + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._arrays_api.api214_arrays_factory_reset_token_delete_with_http_info + return self._call_api(endpoint, kwargs) + + def get_arrays_factory_reset_token( + self, + x_request_id=None, # type: str + continuation_token=None, # type: str + filter=None, # type: str + limit=None, # type: int + offset=None, # type: int + sort=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.ArrayFactoryResetTokenGetResponse + """ + Displays a list of tokens used to perform a factory reset on the array. + + Args: + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + continuation_token (str, optional): + An opaque token to iterate over a collection of resources. + filter (Filter, optional): + A filter to include only resources that match the specified criteria. + limit (int, optional): + Limit the number of resources in the response. If not specified, defaults to + 1000. + offset (int, optional): + The offset of the first resource to return from a collection. + sort (list[Property], optional): + Sort the response by the specified Properties. Can also be a single element. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + continuation_token=continuation_token, + filter=filter, + limit=limit, + offset=offset, + sort=sort, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._arrays_api.api214_arrays_factory_reset_token_get_with_http_info + return self._call_api(endpoint, kwargs) + + def post_arrays_factory_reset_token( + self, + x_request_id=None, # type: str + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.ArrayFactoryResetTokenResponse + """ + Creates a token that can be used to perform a factory reset on the array. + Factory reset tokens can only be created after the array has been prepared for + reset (e.g., all file systems, buckets, and snapshots must first be eradicated). + After a token has been created, operations that would take the array out of the + prepared state (e.g., creating file systems) are disabled until all tokens have + been deleted. + + Args: + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._arrays_api.api214_arrays_factory_reset_token_post_with_http_info + return self._call_api(endpoint, kwargs) + + def get_arrays( + self, + x_request_id=None, # type: str + continuation_token=None, # type: str + filter=None, # type: str + limit=None, # type: int + offset=None, # type: int + sort=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.ArrayGetResponse + """ + List array attributes such as the array name, ID, version, and NTP servers. + + Args: + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + continuation_token (str, optional): + An opaque token to iterate over a collection of resources. + filter (Filter, optional): + A filter to include only resources that match the specified criteria. + limit (int, optional): + Limit the number of resources in the response. If not specified, defaults to + 1000. + offset (int, optional): + The offset of the first resource to return from a collection. + sort (list[Property], optional): + Sort the response by the specified Properties. Can also be a single element. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + continuation_token=continuation_token, + filter=filter, + limit=limit, + offset=offset, + sort=sort, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._arrays_api.api214_arrays_get_with_http_info + return self._call_api(endpoint, kwargs) + + def get_arrays_http_specific_performance( + self, + x_request_id=None, # type: str + end_time=None, # type: int + resolution=None, # type: int + start_time=None, # type: int + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.ArrayHttpSpecificPerformanceGet + """ + List the HTTP performance metrics of the array. + + Args: + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + end_time (int, optional): + When the time window ends (in milliseconds since epoch). + resolution (int, optional): + The desired ms between samples. Available resolutions may depend on data type, + `start_time` and `end_time`. In general `1000`, `30000`, `300000`, `1800000`, + `7200000`, and `86400000` are possible values. + start_time (int, optional): + When the time window starts (in milliseconds since epoch). + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + end_time=end_time, + resolution=resolution, + start_time=start_time, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._arrays_api.api214_arrays_http_specific_performance_get_with_http_info + return self._call_api(endpoint, kwargs) + + def get_arrays_nfs_specific_performance( + self, + x_request_id=None, # type: str + end_time=None, # type: int + resolution=None, # type: int + start_time=None, # type: int + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.ArrayNfsSpecificPerformanceGet + """ + List the NFS performance metrics of the array. + + Args: + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + end_time (int, optional): + When the time window ends (in milliseconds since epoch). + resolution (int, optional): + The desired ms between samples. Available resolutions may depend on data type, + `start_time` and `end_time`. In general `1000`, `30000`, `300000`, `1800000`, + `7200000`, and `86400000` are possible values. + start_time (int, optional): + When the time window starts (in milliseconds since epoch). + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + end_time=end_time, + resolution=resolution, + start_time=start_time, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._arrays_api.api214_arrays_nfs_specific_performance_get_with_http_info + return self._call_api(endpoint, kwargs) + + def patch_arrays( + self, + array=None, # type: list + x_request_id=None, # type: str + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.ArrayResponse + """ + Modify the general configuration of the array including banner text, array name, + NTP servers, and time zone. + + Args: + + array (Array, required): + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + array=array, + x_request_id=x_request_id, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._arrays_api.api214_arrays_patch_with_http_info + return self._call_api(endpoint, kwargs) + + def get_arrays_performance( + self, + x_request_id=None, # type: str + end_time=None, # type: int + protocol=None, # type: str + resolution=None, # type: int + start_time=None, # type: int + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.ArrayPerformanceGetResponse + """ + Lists the overall performance metrics of the array. + + Args: + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + end_time (int, optional): + When the time window ends (in milliseconds since epoch). + protocol (str, optional): + Display the performance of a specified protocol. Valid values are `all`, `HTTP`, + `SMB`, `NFS`, and `S3`. If not specified, defaults to `all`, which will provide + the combined performance of all available protocols. + resolution (int, optional): + The desired ms between samples. Available resolutions may depend on data type, + `start_time` and `end_time`. In general `1000`, `30000`, `300000`, `1800000`, + `7200000`, and `86400000` are possible values. + start_time (int, optional): + When the time window starts (in milliseconds since epoch). + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + end_time=end_time, + protocol=protocol, + resolution=resolution, + start_time=start_time, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._arrays_api.api214_arrays_performance_get_with_http_info + return self._call_api(endpoint, kwargs) + + def get_arrays_performance_replication( + self, + x_request_id=None, # type: str + end_time=None, # type: int + resolution=None, # type: int + start_time=None, # type: int + type=None, # type: str + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.ArrayPerformanceReplicationGetResp + """ + List replication performance metrics. + + Args: + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + end_time (int, optional): + When the time window ends (in milliseconds since epoch). + resolution (int, optional): + The desired ms between samples. Available resolutions may depend on data type, + `start_time` and `end_time`. In general `1000`, `30000`, `300000`, `1800000`, + `7200000`, and `86400000` are possible values. + start_time (int, optional): + When the time window starts (in milliseconds since epoch). + type (str, optional): + Display the metric of a specified object type. Valid values are `all`, `file- + system`, and `object-store`. If not specified, defaults to `all`. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + end_time=end_time, + resolution=resolution, + start_time=start_time, + type=type, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._arrays_api.api214_arrays_performance_replication_get_with_http_info + return self._call_api(endpoint, kwargs) + + def get_arrays_s3_specific_performance( + self, + x_request_id=None, # type: str + end_time=None, # type: int + resolution=None, # type: int + start_time=None, # type: int + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.ArrayS3SpecificPerformanceGetResp + """ + List the S3 performance metrics of the array. + + Args: + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + end_time (int, optional): + When the time window ends (in milliseconds since epoch). + resolution (int, optional): + The desired ms between samples. Available resolutions may depend on data type, + `start_time` and `end_time`. In general `1000`, `30000`, `300000`, `1800000`, + `7200000`, and `86400000` are possible values. + start_time (int, optional): + When the time window starts (in milliseconds since epoch). + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + end_time=end_time, + resolution=resolution, + start_time=start_time, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._arrays_api.api214_arrays_s3_specific_performance_get_with_http_info + return self._call_api(endpoint, kwargs) + + def get_arrays_space( + self, + x_request_id=None, # type: str + end_time=None, # type: int + resolution=None, # type: int + start_time=None, # type: int + type=None, # type: str + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.ArraySpaceGetResponse + """ + List available and used storage space on the array. + + Args: + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + end_time (int, optional): + When the time window ends (in milliseconds since epoch). + resolution (int, optional): + The desired ms between samples. Available resolutions may depend on data type, + `start_time` and `end_time`. In general `1000`, `30000`, `300000`, `1800000`, + `7200000`, and `86400000` are possible values. + start_time (int, optional): + When the time window starts (in milliseconds since epoch). + type (str, optional): + Display the metric of a specified object type. Valid values are `array`, `file- + system`, and `object-store`. If not specified, defaults to `array`. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + end_time=end_time, + resolution=resolution, + start_time=start_time, + type=type, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._arrays_api.api214_arrays_space_get_with_http_info + return self._call_api(endpoint, kwargs) + + def get_arrays_supported_time_zones( + self, + references=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + continuation_token=None, # type: str + filter=None, # type: str + limit=None, # type: int + names=None, # type: List[str] + offset=None, # type: int + sort=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.ArraysSupportedTimeZonesGetResponse + """ + List supported time zones for the array. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + continuation_token (str, optional): + An opaque token to iterate over a collection of resources. + filter (Filter, optional): + A filter to include only resources that match the specified criteria. + limit (int, optional): + Limit the number of resources in the response. If not specified, defaults to + 1000. + names (list[str], optional): + A list of resource names. If there is not at least one resource that matches + each of the elements of `names`, then an error is returned. + offset (int, optional): + The offset of the first resource to return from a collection. + sort (list[Property], optional): + Sort the response by the specified Properties. Can also be a single element. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + continuation_token=continuation_token, + filter=filter, + limit=limit, + names=names, + offset=offset, + sort=sort, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._arrays_api.api214_arrays_supported_time_zones_get_with_http_info + _process_references(references, ['names'], kwargs) + return self._call_api(endpoint, kwargs) + + def get_audits( + self, + references=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + continuation_token=None, # type: str + filter=None, # type: str + ids=None, # type: List[str] + limit=None, # type: int + names=None, # type: List[str] + offset=None, # type: int + sort=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.AuditGetResponse + """ + List the array audit trail to view activities that were performed on the array. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides ids and names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + continuation_token (str, optional): + An opaque token to iterate over a collection of resources. + filter (Filter, optional): + A filter to include only resources that match the specified criteria. + ids (list[str], optional): + A list of resource IDs. If after filtering, there is not at least one resource + that matches each of the elements of `ids`, then an error is returned. This + cannot be provided together with the `name` or `names` query parameters. + limit (int, optional): + Limit the number of resources in the response. If not specified, defaults to + 1000. + names (list[str], optional): + A list of resource names. If there is not at least one resource that matches + each of the elements of `names`, then an error is returned. + offset (int, optional): + The offset of the first resource to return from a collection. + sort (list[Property], optional): + Sort the response by the specified Properties. Can also be a single element. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + continuation_token=continuation_token, + filter=filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + sort=sort, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._audits_api.api214_audits_get_with_http_info + _process_references(references, ['ids', 'names'], kwargs) + return self._call_api(endpoint, kwargs) + + def get_blades( + self, + references=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + continuation_token=None, # type: str + filter=None, # type: str + ids=None, # type: List[str] + limit=None, # type: int + names=None, # type: List[str] + offset=None, # type: int + sort=None, # type: List[str] + total_only=None, # type: bool + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.BladeGetResponse + """ + List array blade information. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides ids and names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + continuation_token (str, optional): + An opaque token to iterate over a collection of resources. + filter (Filter, optional): + A filter to include only resources that match the specified criteria. + ids (list[str], optional): + A list of resource IDs. If after filtering, there is not at least one resource + that matches each of the elements of `ids`, then an error is returned. This + cannot be provided together with the `name` or `names` query parameters. + limit (int, optional): + Limit the number of resources in the response. If not specified, defaults to + 1000. + names (list[str], optional): + A list of resource names. If there is not at least one resource that matches + each of the elements of `names`, then an error is returned. + offset (int, optional): + The offset of the first resource to return from a collection. + sort (list[Property], optional): + Sort the response by the specified Properties. Can also be a single element. + total_only (bool, optional): + Only return the total record for the specified items. The total record will be + the total of all items after filtering. The `items` list will be empty. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + continuation_token=continuation_token, + filter=filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + sort=sort, + total_only=total_only, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._blades_api.api214_blades_get_with_http_info + _process_references(references, ['ids', 'names'], kwargs) + return self._call_api(endpoint, kwargs) + + def delete_bucket_replica_links( + self, + references=None, # type: List[models.ReferenceType] + local_buckets=None, # type: List[models.ReferenceType] + remote_buckets=None, # type: List[models.ReferenceType] + remotes=None, # type: List[models.ReferenceType] + ids=None, # type: List[str] + local_bucket_ids=None, # type: List[str] + local_bucket_names=None, # type: List[str] + remote_bucket_names=None, # type: List[str] + remote_ids=None, # type: List[str] + remote_names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> None + """ + Delete a bucket replica link. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides ids keyword arguments. + local_buckets (list[FixedReference], optional): + A list of local_buckets to query for. Overrides local_bucket_ids and local_bucket_names keyword arguments. + remote_buckets (list[FixedReference], optional): + A list of remote_buckets to query for. Overrides remote_bucket_names keyword arguments. + remotes (list[FixedReference], optional): + A list of remotes to query for. Overrides remote_ids and remote_names keyword arguments. + + ids (list[str], optional): + A list of resource IDs. If after filtering, there is not at least one resource + that matches each of the elements of `ids`, then an error is returned. This + cannot be provided together with the `name` or `names` query parameters. + local_bucket_ids (list[str], optional): + A list of local bucket IDs. If after filtering, there is not at least one + resource that matches each of the elements, then an error is returned. This + cannot be provided together with the `local_bucket_names` query parameter. + local_bucket_names (list[str], optional): + A list of local bucket names. If there is not at least one resource that matches + each of the elements, then an error is returned. This cannot be provided + together with `local_bucket_ids` query parameter. + remote_bucket_names (list[str], optional): + A list of remote bucket names. If there is not at least one resource that + matches each of the elements, then an error is returned. + remote_ids (list[str], optional): + A list of remote array IDs. If after filtering, there is not at least one + resource that matches each of the elements, then an error is returned. This + cannot be provided together with the `remote_names` query parameter. + remote_names (list[str], optional): + A list of remote array names. If there is not at least one resource that matches + each of the elements, then an error is returned. This cannot be provided + together with `remote_ids` query parameter. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + ids=ids, + local_bucket_ids=local_bucket_ids, + local_bucket_names=local_bucket_names, + remote_bucket_names=remote_bucket_names, + remote_ids=remote_ids, + remote_names=remote_names, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._bucket_replica_links_api.api214_bucket_replica_links_delete_with_http_info + _process_references(references, ['ids'], kwargs) + _process_references(local_buckets, ['local_bucket_ids', 'local_bucket_names'], kwargs) + _process_references(remote_buckets, ['remote_bucket_names'], kwargs) + _process_references(remotes, ['remote_ids', 'remote_names'], kwargs) + return self._call_api(endpoint, kwargs) + + def get_bucket_replica_links( + self, + references=None, # type: List[models.ReferenceType] + local_buckets=None, # type: List[models.ReferenceType] + remote_buckets=None, # type: List[models.ReferenceType] + remotes=None, # type: List[models.ReferenceType] + continuation_token=None, # type: str + filter=None, # type: str + ids=None, # type: List[str] + limit=None, # type: int + local_bucket_ids=None, # type: List[str] + local_bucket_names=None, # type: List[str] + offset=None, # type: int + remote_bucket_names=None, # type: List[str] + remote_ids=None, # type: List[str] + remote_names=None, # type: List[str] + sort=None, # type: List[str] + total_only=None, # type: bool + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.BucketReplicaLinkGetResponse + """ + List bucket replica links for object replication. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides ids keyword arguments. + local_buckets (list[FixedReference], optional): + A list of local_buckets to query for. Overrides local_bucket_ids and local_bucket_names keyword arguments. + remote_buckets (list[FixedReference], optional): + A list of remote_buckets to query for. Overrides remote_bucket_names keyword arguments. + remotes (list[FixedReference], optional): + A list of remotes to query for. Overrides remote_ids and remote_names keyword arguments. + + continuation_token (str, optional): + An opaque token to iterate over a collection of resources. + filter (Filter, optional): + A filter to include only resources that match the specified criteria. + ids (list[str], optional): + A list of resource IDs. If after filtering, there is not at least one resource + that matches each of the elements of `ids`, then an error is returned. This + cannot be provided together with the `name` or `names` query parameters. + limit (int, optional): + Limit the number of resources in the response. If not specified, defaults to + 1000. + local_bucket_ids (list[str], optional): + A list of local bucket IDs. If after filtering, there is not at least one + resource that matches each of the elements, then an error is returned. This + cannot be provided together with the `local_bucket_names` query parameter. + local_bucket_names (list[str], optional): + A list of local bucket names. If there is not at least one resource that matches + each of the elements, then an error is returned. This cannot be provided + together with `local_bucket_ids` query parameter. + offset (int, optional): + The offset of the first resource to return from a collection. + remote_bucket_names (list[str], optional): + A list of remote bucket names. If there is not at least one resource that + matches each of the elements, then an error is returned. + remote_ids (list[str], optional): + A list of remote array IDs. If after filtering, there is not at least one + resource that matches each of the elements, then an error is returned. This + cannot be provided together with the `remote_names` query parameter. + remote_names (list[str], optional): + A list of remote array names. If there is not at least one resource that matches + each of the elements, then an error is returned. This cannot be provided + together with `remote_ids` query parameter. + sort (list[Property], optional): + Sort the response by the specified Properties. Can also be a single element. + total_only (bool, optional): + Only return the total record for the specified items. The total record will be + the total of all items after filtering. The `items` list will be empty. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + continuation_token=continuation_token, + filter=filter, + ids=ids, + limit=limit, + local_bucket_ids=local_bucket_ids, + local_bucket_names=local_bucket_names, + offset=offset, + remote_bucket_names=remote_bucket_names, + remote_ids=remote_ids, + remote_names=remote_names, + sort=sort, + total_only=total_only, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._bucket_replica_links_api.api214_bucket_replica_links_get_with_http_info + _process_references(references, ['ids'], kwargs) + _process_references(local_buckets, ['local_bucket_ids', 'local_bucket_names'], kwargs) + _process_references(remote_buckets, ['remote_bucket_names'], kwargs) + _process_references(remotes, ['remote_ids', 'remote_names'], kwargs) + return self._call_api(endpoint, kwargs) + + def patch_bucket_replica_links( + self, + references=None, # type: List[models.ReferenceType] + local_buckets=None, # type: List[models.ReferenceType] + remote_buckets=None, # type: List[models.ReferenceType] + remotes=None, # type: List[models.ReferenceType] + bucket_replica_link=None, # type: models.BucketReplicaLink + ids=None, # type: List[str] + local_bucket_ids=None, # type: List[str] + local_bucket_names=None, # type: List[str] + remote_bucket_names=None, # type: List[str] + remote_ids=None, # type: List[str] + remote_names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.BucketReplicaLinkResponse + """ + Modify the configuration of a bucket replica link including whether the link is + paused and the object store remote credentials used. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides ids keyword arguments. + local_buckets (list[FixedReference], optional): + A list of local_buckets to query for. Overrides local_bucket_ids and local_bucket_names keyword arguments. + remote_buckets (list[FixedReference], optional): + A list of remote_buckets to query for. Overrides remote_bucket_names keyword arguments. + remotes (list[FixedReference], optional): + A list of remotes to query for. Overrides remote_ids and remote_names keyword arguments. + + bucket_replica_link (BucketReplicaLink, required): + ids (list[str], optional): + A list of resource IDs. If after filtering, there is not at least one resource + that matches each of the elements of `ids`, then an error is returned. This + cannot be provided together with the `name` or `names` query parameters. + local_bucket_ids (list[str], optional): + A list of local bucket IDs. If after filtering, there is not at least one + resource that matches each of the elements, then an error is returned. This + cannot be provided together with the `local_bucket_names` query parameter. + local_bucket_names (list[str], optional): + A list of local bucket names. If there is not at least one resource that matches + each of the elements, then an error is returned. This cannot be provided + together with `local_bucket_ids` query parameter. + remote_bucket_names (list[str], optional): + A list of remote bucket names. If there is not at least one resource that + matches each of the elements, then an error is returned. + remote_ids (list[str], optional): + A list of remote array IDs. If after filtering, there is not at least one + resource that matches each of the elements, then an error is returned. This + cannot be provided together with the `remote_names` query parameter. + remote_names (list[str], optional): + A list of remote array names. If there is not at least one resource that matches + each of the elements, then an error is returned. This cannot be provided + together with `remote_ids` query parameter. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + bucket_replica_link=bucket_replica_link, + ids=ids, + local_bucket_ids=local_bucket_ids, + local_bucket_names=local_bucket_names, + remote_bucket_names=remote_bucket_names, + remote_ids=remote_ids, + remote_names=remote_names, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._bucket_replica_links_api.api214_bucket_replica_links_patch_with_http_info + _process_references(references, ['ids'], kwargs) + _process_references(local_buckets, ['local_bucket_ids', 'local_bucket_names'], kwargs) + _process_references(remote_buckets, ['remote_bucket_names'], kwargs) + _process_references(remotes, ['remote_ids', 'remote_names'], kwargs) + return self._call_api(endpoint, kwargs) + + def post_bucket_replica_links( + self, + local_buckets=None, # type: List[models.ReferenceType] + remote_buckets=None, # type: List[models.ReferenceType] + remote_credential=None, # type: List[models.ReferenceType] + bucket_replica_link=None, # type: models.BucketReplicaLinkPost + local_bucket_names=None, # type: List[str] + local_bucket_ids=None, # type: List[str] + remote_bucket_names=None, # type: List[str] + remote_credentials_names=None, # type: List[str] + remote_credentials_ids=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.BucketReplicaLinkResponse + """ + Create a bucket replica link for object replication. + + Args: + local_buckets (list[FixedReference], optional): + A list of local_buckets to query for. Overrides local_bucket_names and local_bucket_ids keyword arguments. + remote_buckets (list[FixedReference], optional): + A list of remote_buckets to query for. Overrides remote_bucket_names keyword arguments. + remote_credential (list[FixedReference], optional): + A list of remote_credential to query for. Overrides remote_credentials_names and remote_credentials_ids keyword arguments. + + bucket_replica_link (BucketReplicaLinkPost, required): + local_bucket_names (list[str], optional): + A list of local bucket names. If there is not at least one resource that matches + each of the elements, then an error is returned. This cannot be provided + together with `local_bucket_ids` query parameter. + local_bucket_ids (list[str], optional): + A list of local bucket IDs. If after filtering, there is not at least one + resource that matches each of the elements, then an error is returned. This + cannot be provided together with the `local_bucket_names` query parameter. + remote_bucket_names (list[str], optional): + A list of remote bucket names. If there is not at least one resource that + matches each of the elements, then an error is returned. + remote_credentials_names (list[str], optional): + A list of remote credentials names. If there is not at least one resource that + matches each of the elements, then an error is returned. This cannot be provided + together with the `remote_credentials_ids` query parameter. + remote_credentials_ids (list[str], optional): + A list of remote credentials IDs. If after filtering, there is not at least one + resource that matches each of the elements, then an error is returned. This + cannot be provided together with the `remote_credentials_names` query parameter. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + bucket_replica_link=bucket_replica_link, + local_bucket_names=local_bucket_names, + local_bucket_ids=local_bucket_ids, + remote_bucket_names=remote_bucket_names, + remote_credentials_names=remote_credentials_names, + remote_credentials_ids=remote_credentials_ids, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._bucket_replica_links_api.api214_bucket_replica_links_post_with_http_info + _process_references(local_buckets, ['local_bucket_names', 'local_bucket_ids'], kwargs) + _process_references(remote_buckets, ['remote_bucket_names'], kwargs) + _process_references(remote_credential, ['remote_credentials_names', 'remote_credentials_ids'], kwargs) + return self._call_api(endpoint, kwargs) + + def delete_buckets_bucket_access_policies( + self, + buckets=None, # type: List[models.ReferenceType] + references=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + bucket_ids=None, # type: List[str] + bucket_names=None, # type: List[str] + names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> None + """ + Delete a bucket policy of the specified bucket. Either `names` or + `bucket_names`/`bucket_ids` query parameters can be used. + + Args: + buckets (list[FixedReference], optional): + A list of buckets to query for. Overrides bucket_ids and bucket_names keyword arguments. + references (list[FixedReference], optional): + A list of references to query for. Overrides names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + bucket_ids (list[str], optional): + A list of bucket IDs. If after filtering, there is not at least one resource + that matches each of the elements of `bucket_ids`, then an error is returned. + This cannot be provided together with the `bucket_names` query parameter. This + can be provided with the `ids` query parameter but not with `names`. + bucket_names (list[str], optional): + A list of bucket names. If there is not at least one resource that matches each + of the elements of `bucket_names`, then an error is returned. This cannot be + provided together with the `bucket_ids` query parameter. This can be provided + with the `ids` query parameter but not with `names`. + names (list[str], optional): + A list of resource names. If there is not at least one resource that matches + each of the elements of `names`, then an error is returned. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + bucket_ids=bucket_ids, + bucket_names=bucket_names, + names=names, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._buckets_api.api214_buckets_bucket_access_policies_delete_with_http_info + _process_references(buckets, ['bucket_ids', 'bucket_names'], kwargs) + _process_references(references, ['names'], kwargs) + return self._call_api(endpoint, kwargs) + + def get_buckets_bucket_access_policies( + self, + buckets=None, # type: List[models.ReferenceType] + references=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + bucket_ids=None, # type: List[str] + bucket_names=None, # type: List[str] + continuation_token=None, # type: str + filter=None, # type: str + limit=None, # type: int + names=None, # type: List[str] + offset=None, # type: int + sort=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.BucketAccessPolicyGetResponse + """ + List a policy for the specified bucket and its attributes. Either `names` or + `bucket_names`/`bucket_ids` query parameters can be used. + + Args: + buckets (list[FixedReference], optional): + A list of buckets to query for. Overrides bucket_ids and bucket_names keyword arguments. + references (list[FixedReference], optional): + A list of references to query for. Overrides names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + bucket_ids (list[str], optional): + A list of bucket IDs. If after filtering, there is not at least one resource + that matches each of the elements of `bucket_ids`, then an error is returned. + This cannot be provided together with the `bucket_names` query parameter. This + can be provided with the `ids` query parameter but not with `names`. + bucket_names (list[str], optional): + A list of bucket names. If there is not at least one resource that matches each + of the elements of `bucket_names`, then an error is returned. This cannot be + provided together with the `bucket_ids` query parameter. This can be provided + with the `ids` query parameter but not with `names`. + continuation_token (str, optional): + An opaque token to iterate over a collection of resources. + filter (Filter, optional): + A filter to include only resources that match the specified criteria. + limit (int, optional): + Limit the number of resources in the response. If not specified, defaults to + 1000. + names (list[str], optional): + A list of resource names. If there is not at least one resource that matches + each of the elements of `names`, then an error is returned. + offset (int, optional): + The offset of the first resource to return from a collection. + sort (list[Property], optional): + Sort the response by the specified Properties. Can also be a single element. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + bucket_ids=bucket_ids, + bucket_names=bucket_names, + continuation_token=continuation_token, + filter=filter, + limit=limit, + names=names, + offset=offset, + sort=sort, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._buckets_api.api214_buckets_bucket_access_policies_get_with_http_info + _process_references(buckets, ['bucket_ids', 'bucket_names'], kwargs) + _process_references(references, ['names'], kwargs) + return self._call_api(endpoint, kwargs) + + def post_buckets_bucket_access_policies( + self, + buckets=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + bucket_ids=None, # type: List[str] + bucket_names=None, # type: List[str] + policy=None, # type: models.BucketAccessPolicyPost + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.BucketAccessPolicyResponse + """ + Create a new policy for the specified bucket. Policy's name will be + autogenerated by the system. + + Args: + buckets (list[FixedReference], optional): + A list of buckets to query for. Overrides bucket_ids and bucket_names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + bucket_ids (list[str], optional): + A list of bucket IDs. If after filtering, there is not at least one resource + that matches each of the elements of `bucket_ids`, then an error is returned. + This cannot be provided together with the `bucket_names` query parameter. This + can be provided with the `ids` query parameter but not with `names`. + bucket_names (list[str], optional): + A list of bucket names. If there is not at least one resource that matches each + of the elements of `bucket_names`, then an error is returned. This cannot be + provided together with the `bucket_ids` query parameter. This can be provided + with the `ids` query parameter but not with `names`. + policy (BucketAccessPolicyPost, optional): + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + bucket_ids=bucket_ids, + bucket_names=bucket_names, + policy=policy, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._buckets_api.api214_buckets_bucket_access_policies_post_with_http_info + _process_references(buckets, ['bucket_ids', 'bucket_names'], kwargs) + return self._call_api(endpoint, kwargs) + + def delete_buckets_bucket_access_policies_rules( + self, + buckets=None, # type: List[models.ReferenceType] + references=None, # type: List[models.ReferenceType] + policies=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + bucket_ids=None, # type: List[str] + bucket_names=None, # type: List[str] + names=None, # type: List[str] + policy_names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> None + """ + Delete one or more bucket policy rules for the specified bucket. Either + `policy_names` or `bucket_names`/`bucket_ids` query parameters can be used. + + Args: + buckets (list[FixedReference], optional): + A list of buckets to query for. Overrides bucket_ids and bucket_names keyword arguments. + references (list[FixedReference], optional): + A list of references to query for. Overrides names keyword arguments. + policies (list[FixedReference], optional): + A list of policies to query for. Overrides policy_names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + bucket_ids (list[str], optional): + A list of bucket IDs. If after filtering, there is not at least one resource + that matches each of the elements of `bucket_ids`, then an error is returned. + This cannot be provided together with the `bucket_names` query parameter. This + can be provided with the `ids` query parameter but not with `names`. + bucket_names (list[str], optional): + A list of bucket names. If there is not at least one resource that matches each + of the elements of `bucket_names`, then an error is returned. This cannot be + provided together with the `bucket_ids` query parameter. This can be provided + with the `ids` query parameter but not with `names`. + names (list[str], optional): + A list of resource names. If there is not at least one resource that matches + each of the elements of `names`, then an error is returned. + policy_names (list[str], optional): + A list of policy names. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + bucket_ids=bucket_ids, + bucket_names=bucket_names, + names=names, + policy_names=policy_names, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._buckets_api.api214_buckets_bucket_access_policies_rules_delete_with_http_info + _process_references(buckets, ['bucket_ids', 'bucket_names'], kwargs) + _process_references(references, ['names'], kwargs) + _process_references(policies, ['policy_names'], kwargs) + return self._call_api(endpoint, kwargs) + + def get_buckets_bucket_access_policies_rules( + self, + buckets=None, # type: List[models.ReferenceType] + references=None, # type: List[models.ReferenceType] + policies=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + bucket_ids=None, # type: List[str] + bucket_names=None, # type: List[str] + continuation_token=None, # type: str + filter=None, # type: str + limit=None, # type: int + names=None, # type: List[str] + offset=None, # type: int + policy_names=None, # type: List[str] + sort=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.BucketAccessPolicyRuleGetResponse + """ + List bucket policy rules for the specified bucket and their attributes. Either + `policy_names` or `bucket_names`/`bucket_ids` query parameters can be used. + + Args: + buckets (list[FixedReference], optional): + A list of buckets to query for. Overrides bucket_ids and bucket_names keyword arguments. + references (list[FixedReference], optional): + A list of references to query for. Overrides names keyword arguments. + policies (list[FixedReference], optional): + A list of policies to query for. Overrides policy_names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + bucket_ids (list[str], optional): + A list of bucket IDs. If after filtering, there is not at least one resource + that matches each of the elements of `bucket_ids`, then an error is returned. + This cannot be provided together with the `bucket_names` query parameter. This + can be provided with the `ids` query parameter but not with `names`. + bucket_names (list[str], optional): + A list of bucket names. If there is not at least one resource that matches each + of the elements of `bucket_names`, then an error is returned. This cannot be + provided together with the `bucket_ids` query parameter. This can be provided + with the `ids` query parameter but not with `names`. + continuation_token (str, optional): + An opaque token to iterate over a collection of resources. + filter (Filter, optional): + A filter to include only resources that match the specified criteria. + limit (int, optional): + Limit the number of resources in the response. If not specified, defaults to + 1000. + names (list[str], optional): + A list of resource names. If there is not at least one resource that matches + each of the elements of `names`, then an error is returned. + offset (int, optional): + The offset of the first resource to return from a collection. + policy_names (list[str], optional): + A list of policy names. + sort (list[Property], optional): + Sort the response by the specified Properties. Can also be a single element. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + bucket_ids=bucket_ids, + bucket_names=bucket_names, + continuation_token=continuation_token, + filter=filter, + limit=limit, + names=names, + offset=offset, + policy_names=policy_names, + sort=sort, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._buckets_api.api214_buckets_bucket_access_policies_rules_get_with_http_info + _process_references(buckets, ['bucket_ids', 'bucket_names'], kwargs) + _process_references(references, ['names'], kwargs) + _process_references(policies, ['policy_names'], kwargs) + return self._call_api(endpoint, kwargs) + + def post_buckets_bucket_access_policies_rules( + self, + references=None, # type: List[models.ReferenceType] + buckets=None, # type: List[models.ReferenceType] + policies=None, # type: List[models.ReferenceType] + names=None, # type: List[str] + rule=None, # type: models.BucketAccessPolicyRulePost + x_request_id=None, # type: str + bucket_ids=None, # type: List[str] + bucket_names=None, # type: List[str] + policy_names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.BucketAccessPolicyRuleResponse + """ + Create a new bucket policy rule for the specified bucket. Either `policy_names` + or `bucket_names`/`bucket_ids` query parameters can be used. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides names keyword arguments. + buckets (list[FixedReference], optional): + A list of buckets to query for. Overrides bucket_ids and bucket_names keyword arguments. + policies (list[FixedReference], optional): + A list of policies to query for. Overrides policy_names keyword arguments. + + names (list[str], required): + A list of resource names. + rule (BucketAccessPolicyRulePost, required): + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + bucket_ids (list[str], optional): + A list of bucket IDs. If after filtering, there is not at least one resource + that matches each of the elements of `bucket_ids`, then an error is returned. + This cannot be provided together with the `bucket_names` query parameter. This + can be provided with the `ids` query parameter but not with `names`. + bucket_names (list[str], optional): + A list of bucket names. If there is not at least one resource that matches each + of the elements of `bucket_names`, then an error is returned. This cannot be + provided together with the `bucket_ids` query parameter. This can be provided + with the `ids` query parameter but not with `names`. + policy_names (list[str], optional): + A list of policy names. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + names=names, + rule=rule, + x_request_id=x_request_id, + bucket_ids=bucket_ids, + bucket_names=bucket_names, + policy_names=policy_names, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._buckets_api.api214_buckets_bucket_access_policies_rules_post_with_http_info + _process_references(references, ['names'], kwargs) + _process_references(buckets, ['bucket_ids', 'bucket_names'], kwargs) + _process_references(policies, ['policy_names'], kwargs) + return self._call_api(endpoint, kwargs) + + def delete_buckets_cross_origin_resource_sharing_policies( + self, + buckets=None, # type: List[models.ReferenceType] + references=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + bucket_ids=None, # type: List[str] + bucket_names=None, # type: List[str] + names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> None + """ + Delete a cross origin resource sharing policy of the specified bucket. Either + `names` or `bucket_names`/`bucket_ids` query parameters can be used. + + Args: + buckets (list[FixedReference], optional): + A list of buckets to query for. Overrides bucket_ids and bucket_names keyword arguments. + references (list[FixedReference], optional): + A list of references to query for. Overrides names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + bucket_ids (list[str], optional): + A list of bucket IDs. If after filtering, there is not at least one resource + that matches each of the elements of `bucket_ids`, then an error is returned. + This cannot be provided together with the `bucket_names` query parameter. This + can be provided with the `ids` query parameter but not with `names`. + bucket_names (list[str], optional): + A list of bucket names. If there is not at least one resource that matches each + of the elements of `bucket_names`, then an error is returned. This cannot be + provided together with the `bucket_ids` query parameter. This can be provided + with the `ids` query parameter but not with `names`. + names (list[str], optional): + A list of resource names. If there is not at least one resource that matches + each of the elements of `names`, then an error is returned. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + bucket_ids=bucket_ids, + bucket_names=bucket_names, + names=names, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._buckets_api.api214_buckets_cross_origin_resource_sharing_policies_delete_with_http_info + _process_references(buckets, ['bucket_ids', 'bucket_names'], kwargs) + _process_references(references, ['names'], kwargs) + return self._call_api(endpoint, kwargs) + + def get_buckets_cross_origin_resource_sharing_policies( + self, + buckets=None, # type: List[models.ReferenceType] + references=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + bucket_ids=None, # type: List[str] + bucket_names=None, # type: List[str] + continuation_token=None, # type: str + filter=None, # type: str + limit=None, # type: int + names=None, # type: List[str] + offset=None, # type: int + sort=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.CrossOriginResourceSharingPolicyGetResponse + """ + List cross origin resource sharing policy for the specified bucket and its + attributes. Either `names` or `bucket_names`/`bucket_ids` query parameters can + be used. + + Args: + buckets (list[FixedReference], optional): + A list of buckets to query for. Overrides bucket_ids and bucket_names keyword arguments. + references (list[FixedReference], optional): + A list of references to query for. Overrides names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + bucket_ids (list[str], optional): + A list of bucket IDs. If after filtering, there is not at least one resource + that matches each of the elements of `bucket_ids`, then an error is returned. + This cannot be provided together with the `bucket_names` query parameter. This + can be provided with the `ids` query parameter but not with `names`. + bucket_names (list[str], optional): + A list of bucket names. If there is not at least one resource that matches each + of the elements of `bucket_names`, then an error is returned. This cannot be + provided together with the `bucket_ids` query parameter. This can be provided + with the `ids` query parameter but not with `names`. + continuation_token (str, optional): + An opaque token to iterate over a collection of resources. + filter (Filter, optional): + A filter to include only resources that match the specified criteria. + limit (int, optional): + Limit the number of resources in the response. If not specified, defaults to + 1000. + names (list[str], optional): + A list of resource names. If there is not at least one resource that matches + each of the elements of `names`, then an error is returned. + offset (int, optional): + The offset of the first resource to return from a collection. + sort (list[Property], optional): + Sort the response by the specified Properties. Can also be a single element. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + bucket_ids=bucket_ids, + bucket_names=bucket_names, + continuation_token=continuation_token, + filter=filter, + limit=limit, + names=names, + offset=offset, + sort=sort, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._buckets_api.api214_buckets_cross_origin_resource_sharing_policies_get_with_http_info + _process_references(buckets, ['bucket_ids', 'bucket_names'], kwargs) + _process_references(references, ['names'], kwargs) + return self._call_api(endpoint, kwargs) + + def post_buckets_cross_origin_resource_sharing_policies( + self, + buckets=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + bucket_ids=None, # type: List[str] + bucket_names=None, # type: List[str] + policy=None, # type: models.CrossOriginResourceSharingPolicyPatch + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.CrossOriginResourceSharingPolicyResponse + """ + Create a new cross origin resource sharing policy for the specified bucket. + Policy's name will be autogenerated by the system. + + Args: + buckets (list[FixedReference], optional): + A list of buckets to query for. Overrides bucket_ids and bucket_names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + bucket_ids (list[str], optional): + A list of bucket IDs. If after filtering, there is not at least one resource + that matches each of the elements of `bucket_ids`, then an error is returned. + This cannot be provided together with the `bucket_names` query parameter. This + can be provided with the `ids` query parameter but not with `names`. + bucket_names (list[str], optional): + A list of bucket names. If there is not at least one resource that matches each + of the elements of `bucket_names`, then an error is returned. This cannot be + provided together with the `bucket_ids` query parameter. This can be provided + with the `ids` query parameter but not with `names`. + policy (CrossOriginResourceSharingPolicyPatch, optional): + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + bucket_ids=bucket_ids, + bucket_names=bucket_names, + policy=policy, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._buckets_api.api214_buckets_cross_origin_resource_sharing_policies_post_with_http_info + _process_references(buckets, ['bucket_ids', 'bucket_names'], kwargs) + return self._call_api(endpoint, kwargs) + + def delete_buckets_cross_origin_resource_sharing_policies_rules( + self, + buckets=None, # type: List[models.ReferenceType] + references=None, # type: List[models.ReferenceType] + policies=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + bucket_ids=None, # type: List[str] + bucket_names=None, # type: List[str] + names=None, # type: List[str] + policy_names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> None + """ + Delete one or more cross origin resource sharing policy rules for the specified + bucket. Either `policy_names` or `bucket_names` query parameters can be used. + + Args: + buckets (list[FixedReference], optional): + A list of buckets to query for. Overrides bucket_ids and bucket_names keyword arguments. + references (list[FixedReference], optional): + A list of references to query for. Overrides names keyword arguments. + policies (list[FixedReference], optional): + A list of policies to query for. Overrides policy_names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + bucket_ids (list[str], optional): + A list of bucket IDs. If after filtering, there is not at least one resource + that matches each of the elements of `bucket_ids`, then an error is returned. + This cannot be provided together with the `bucket_names` query parameter. This + can be provided with the `ids` query parameter but not with `names`. + bucket_names (list[str], optional): + A list of bucket names. If there is not at least one resource that matches each + of the elements of `bucket_names`, then an error is returned. This cannot be + provided together with the `bucket_ids` query parameter. This can be provided + with the `ids` query parameter but not with `names`. + names (list[str], optional): + A list of resource names. If there is not at least one resource that matches + each of the elements of `names`, then an error is returned. + policy_names (list[str], optional): + A list of policy names. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + bucket_ids=bucket_ids, + bucket_names=bucket_names, + names=names, + policy_names=policy_names, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._buckets_api.api214_buckets_cross_origin_resource_sharing_policies_rules_delete_with_http_info + _process_references(buckets, ['bucket_ids', 'bucket_names'], kwargs) + _process_references(references, ['names'], kwargs) + _process_references(policies, ['policy_names'], kwargs) + return self._call_api(endpoint, kwargs) + + def get_buckets_cross_origin_resource_sharing_policies_rules( + self, + buckets=None, # type: List[models.ReferenceType] + references=None, # type: List[models.ReferenceType] + policies=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + bucket_ids=None, # type: List[str] + bucket_names=None, # type: List[str] + continuation_token=None, # type: str + filter=None, # type: str + limit=None, # type: int + names=None, # type: List[str] + offset=None, # type: int + policy_names=None, # type: List[str] + sort=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.CrossOriginResourceSharingPolicyRuleGetResponse + """ + List cross origin resource sharing policy rules for the specified bucket and + their attributes. Either `policy_names` or `bucket_names` query parameters can + be used. + + Args: + buckets (list[FixedReference], optional): + A list of buckets to query for. Overrides bucket_ids and bucket_names keyword arguments. + references (list[FixedReference], optional): + A list of references to query for. Overrides names keyword arguments. + policies (list[FixedReference], optional): + A list of policies to query for. Overrides policy_names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + bucket_ids (list[str], optional): + A list of bucket IDs. If after filtering, there is not at least one resource + that matches each of the elements of `bucket_ids`, then an error is returned. + This cannot be provided together with the `bucket_names` query parameter. This + can be provided with the `ids` query parameter but not with `names`. + bucket_names (list[str], optional): + A list of bucket names. If there is not at least one resource that matches each + of the elements of `bucket_names`, then an error is returned. This cannot be + provided together with the `bucket_ids` query parameter. This can be provided + with the `ids` query parameter but not with `names`. + continuation_token (str, optional): + An opaque token to iterate over a collection of resources. + filter (Filter, optional): + A filter to include only resources that match the specified criteria. + limit (int, optional): + Limit the number of resources in the response. If not specified, defaults to + 1000. + names (list[str], optional): + A list of resource names. If there is not at least one resource that matches + each of the elements of `names`, then an error is returned. + offset (int, optional): + The offset of the first resource to return from a collection. + policy_names (list[str], optional): + A list of policy names. + sort (list[Property], optional): + Sort the response by the specified Properties. Can also be a single element. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + bucket_ids=bucket_ids, + bucket_names=bucket_names, + continuation_token=continuation_token, + filter=filter, + limit=limit, + names=names, + offset=offset, + policy_names=policy_names, + sort=sort, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._buckets_api.api214_buckets_cross_origin_resource_sharing_policies_rules_get_with_http_info + _process_references(buckets, ['bucket_ids', 'bucket_names'], kwargs) + _process_references(references, ['names'], kwargs) + _process_references(policies, ['policy_names'], kwargs) + return self._call_api(endpoint, kwargs) + + def post_buckets_cross_origin_resource_sharing_policies_rules( + self, + references=None, # type: List[models.ReferenceType] + buckets=None, # type: List[models.ReferenceType] + policies=None, # type: List[models.ReferenceType] + names=None, # type: List[str] + rule=None, # type: models.CrossOriginResourceSharingPolicyRulePost + x_request_id=None, # type: str + bucket_ids=None, # type: List[str] + bucket_names=None, # type: List[str] + policy_names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.CrossOriginResourceSharingPolicyRuleResponse + """ + Create a new cross origin resource sharing policy rule for the specified bucket. + Either `policy_names` or `bucket_names` query parameters can be used. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides names keyword arguments. + buckets (list[FixedReference], optional): + A list of buckets to query for. Overrides bucket_ids and bucket_names keyword arguments. + policies (list[FixedReference], optional): + A list of policies to query for. Overrides policy_names keyword arguments. + + names (list[str], required): + A list of resource names. + rule (CrossOriginResourceSharingPolicyRulePost, required): + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + bucket_ids (list[str], optional): + A list of bucket IDs. If after filtering, there is not at least one resource + that matches each of the elements of `bucket_ids`, then an error is returned. + This cannot be provided together with the `bucket_names` query parameter. This + can be provided with the `ids` query parameter but not with `names`. + bucket_names (list[str], optional): + A list of bucket names. If there is not at least one resource that matches each + of the elements of `bucket_names`, then an error is returned. This cannot be + provided together with the `bucket_ids` query parameter. This can be provided + with the `ids` query parameter but not with `names`. + policy_names (list[str], optional): + A list of policy names. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + names=names, + rule=rule, + x_request_id=x_request_id, + bucket_ids=bucket_ids, + bucket_names=bucket_names, + policy_names=policy_names, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._buckets_api.api214_buckets_cross_origin_resource_sharing_policies_rules_post_with_http_info + _process_references(references, ['names'], kwargs) + _process_references(buckets, ['bucket_ids', 'bucket_names'], kwargs) + _process_references(policies, ['policy_names'], kwargs) + return self._call_api(endpoint, kwargs) + + def delete_buckets( + self, + references=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + ids=None, # type: List[str] + names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> None + """ + Delete object store buckets. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides ids and names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + ids (list[str], optional): + A list of resource IDs. If after filtering, there is not at least one resource + that matches each of the elements of `ids`, then an error is returned. This + cannot be provided together with the `name` or `names` query parameters. + names (list[str], optional): + A list of resource names. If there is not at least one resource that matches + each of the elements of `names`, then an error is returned. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + ids=ids, + names=names, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._buckets_api.api214_buckets_delete_with_http_info + _process_references(references, ['ids', 'names'], kwargs) + return self._call_api(endpoint, kwargs) + + def get_buckets( + self, + references=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + continuation_token=None, # type: str + destroyed=None, # type: bool + filter=None, # type: str + ids=None, # type: List[str] + limit=None, # type: int + names=None, # type: List[str] + offset=None, # type: int + sort=None, # type: List[str] + total_only=None, # type: bool + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.BucketGetResponse + """ + List object store bucket attributes such as creation time and space usage. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides ids and names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + continuation_token (str, optional): + An opaque token to iterate over a collection of resources. + destroyed (bool, optional): + If set to `true`, lists only destroyed objects that are in the eradication + pending state. If set to `false`, lists only objects that are not destroyed. If + not set, lists both objects that are destroyed and those that are not destroyed. + If object name(s) are specified in the `names` parameter, then each object + referenced must exist. If `destroyed` is set to `true`, then each object + referenced must also be destroyed. If `destroyed` is set to `false`, then each + object referenced must also not be destroyed. An error is returned if any of + these conditions are not met. + filter (Filter, optional): + A filter to include only resources that match the specified criteria. + ids (list[str], optional): + A list of resource IDs. If after filtering, there is not at least one resource + that matches each of the elements of `ids`, then an error is returned. This + cannot be provided together with the `name` or `names` query parameters. + limit (int, optional): + Limit the number of resources in the response. If not specified, defaults to + 1000. + names (list[str], optional): + A list of resource names. If there is not at least one resource that matches + each of the elements of `names`, then an error is returned. + offset (int, optional): + The offset of the first resource to return from a collection. + sort (list[Property], optional): + Sort the response by the specified Properties. Can also be a single element. + total_only (bool, optional): + Only return the total record for the specified items. The total record will be + the total of all items after filtering. The `items` list will be empty. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + continuation_token=continuation_token, + destroyed=destroyed, + filter=filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + sort=sort, + total_only=total_only, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._buckets_api.api214_buckets_get_with_http_info + _process_references(references, ['ids', 'names'], kwargs) + return self._call_api(endpoint, kwargs) + + def patch_buckets( + self, + references=None, # type: List[models.ReferenceType] + bucket=None, # type: models.BucketPatch + x_request_id=None, # type: str + ids=None, # type: List[str] + ignore_usage=None, # type: bool + names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.BucketResponse + """ + Modify object store bucket attributes such as destroyed and versioning. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides ids and names keyword arguments. + + bucket (BucketPatch, required): + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + ids (list[str], optional): + A list of resource IDs. If after filtering, there is not at least one resource + that matches each of the elements of `ids`, then an error is returned. This + cannot be provided together with the `name` or `names` query parameters. + ignore_usage (bool, optional): + Allow update operations that lead to a `hard_limit_enabled` object store + account, bucket, or file system with usage over its limiting value. For object + store accounts and buckets, the limiting value is that of `quota_limit`, and for + file systems it is that of `provisioned`. The operation can be either setting + `hard_limit_enabled` when usage is higher than the limiting value, modifying the + limiting value to a value under usage when `hard_limit_enabled` or recovering a + destroyed bucket of an object store account that cause account's space usage to + go over its hard `quota_limit`. + names (list[str], optional): + A list of resource names. If there is not at least one resource that matches + each of the elements of `names`, then an error is returned. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + bucket=bucket, + x_request_id=x_request_id, + ids=ids, + ignore_usage=ignore_usage, + names=names, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._buckets_api.api214_buckets_patch_with_http_info + _process_references(references, ['ids', 'names'], kwargs) + return self._call_api(endpoint, kwargs) + + def get_buckets_performance( + self, + references=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + continuation_token=None, # type: str + end_time=None, # type: int + filter=None, # type: str + ids=None, # type: List[str] + limit=None, # type: int + names=None, # type: List[str] + offset=None, # type: int + resolution=None, # type: int + sort=None, # type: List[str] + start_time=None, # type: int + total_only=None, # type: bool + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.BucketPerformanceGetResponse + """ + List performance metrics for a bucket. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides ids and names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + continuation_token (str, optional): + An opaque token to iterate over a collection of resources. + end_time (int, optional): + When the time window ends (in milliseconds since epoch). + filter (Filter, optional): + A filter to include only resources that match the specified criteria. + ids (list[str], optional): + A list of resource IDs. If after filtering, there is not at least one resource + that matches each of the elements of `ids`, then an error is returned. This + cannot be provided together with the `name` or `names` query parameters. + limit (int, optional): + Limit the number of resources in the response. If not specified, defaults to + 1000. + names (list[str], optional): + A list of resource names. If there is not at least one resource that matches + each of the elements of `names`, then an error is returned. + offset (int, optional): + The offset of the first resource to return from a collection. + resolution (int, optional): + The desired ms between samples. Available resolutions may depend on data type, + `start_time` and `end_time`. In general `1000`, `30000`, `300000`, `1800000`, + `7200000`, and `86400000` are possible values. + sort (list[Property], optional): + Sort the response by the specified Properties. Can also be a single element. + start_time (int, optional): + When the time window starts (in milliseconds since epoch). + total_only (bool, optional): + Only return the total record for the specified items. The total record will be + the total of all items after filtering. The `items` list will be empty. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + continuation_token=continuation_token, + end_time=end_time, + filter=filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + resolution=resolution, + sort=sort, + start_time=start_time, + total_only=total_only, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._buckets_api.api214_buckets_performance_get_with_http_info + _process_references(references, ['ids', 'names'], kwargs) + return self._call_api(endpoint, kwargs) + + def post_buckets( + self, + references=None, # type: List[models.ReferenceType] + names=None, # type: List[str] + bucket=None, # type: models.BucketPost + x_request_id=None, # type: str + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.BucketResponse + """ + Create a new object store bucket. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides names keyword arguments. + + names (list[str], required): + A list of resource names. + bucket (BucketPost, required): + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + names=names, + bucket=bucket, + x_request_id=x_request_id, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._buckets_api.api214_buckets_post_with_http_info + _process_references(references, ['names'], kwargs) + return self._call_api(endpoint, kwargs) + + def get_buckets_s3_specific_performance( + self, + references=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + continuation_token=None, # type: str + end_time=None, # type: int + filter=None, # type: str + ids=None, # type: List[str] + limit=None, # type: int + names=None, # type: List[str] + offset=None, # type: int + resolution=None, # type: int + sort=None, # type: List[str] + start_time=None, # type: int + total_only=None, # type: bool + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.BucketS3SpecificPerformanceGetResp + """ + List performance metrics specific to S3 operations for a bucket. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides ids and names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + continuation_token (str, optional): + An opaque token to iterate over a collection of resources. + end_time (int, optional): + When the time window ends (in milliseconds since epoch). + filter (Filter, optional): + A filter to include only resources that match the specified criteria. + ids (list[str], optional): + A list of resource IDs. If after filtering, there is not at least one resource + that matches each of the elements of `ids`, then an error is returned. This + cannot be provided together with the `name` or `names` query parameters. + limit (int, optional): + Limit the number of resources in the response. If not specified, defaults to + 1000. + names (list[str], optional): + A list of resource names. If there is not at least one resource that matches + each of the elements of `names`, then an error is returned. + offset (int, optional): + The offset of the first resource to return from a collection. + resolution (int, optional): + The desired ms between samples. Available resolutions may depend on data type, + `start_time` and `end_time`. In general `1000`, `30000`, `300000`, `1800000`, + `7200000`, and `86400000` are possible values. + sort (list[Property], optional): + Sort the response by the specified Properties. Can also be a single element. + start_time (int, optional): + When the time window starts (in milliseconds since epoch). + total_only (bool, optional): + Only return the total record for the specified items. The total record will be + the total of all items after filtering. The `items` list will be empty. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + continuation_token=continuation_token, + end_time=end_time, + filter=filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + resolution=resolution, + sort=sort, + start_time=start_time, + total_only=total_only, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._buckets_api.api214_buckets_s3_specific_performance_get_with_http_info + _process_references(references, ['ids', 'names'], kwargs) + return self._call_api(endpoint, kwargs) + + def delete_certificate_groups_certificates( + self, + certificates=None, # type: List[models.ReferenceType] + certificate_groups=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + certificate_ids=None, # type: List[str] + certificate_group_ids=None, # type: List[str] + certificate_group_names=None, # type: List[str] + certificate_names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> None + """ + Delete one or more certificate groups. + + Args: + certificates (list[FixedReference], optional): + A list of certificates to query for. Overrides certificate_ids and certificate_names keyword arguments. + certificate_groups (list[FixedReference], optional): + A list of certificate_groups to query for. Overrides certificate_group_ids and certificate_group_names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + certificate_ids (list[str], optional): + A list of certificate ids. If there is not at least one resource that matches + each of the elements of `certificate_ids`, then an error is returned. This + cannot be provided in conjunction with the `certificate_names` parameter. + certificate_group_ids (list[str], optional): + A list of certificate group ids. If there is not at least one resource that + matches each of the elements of `certificate_group_ids`, then an error is + returned. This cannot be provided in conjunction with the + `certificate_group_names` parameter. + certificate_group_names (list[str], optional): + A list of certificate group names. If there is not at least one resource that + matches each of the elements of `certificate_group_names`, then an error is + returned. This cannot be provided in conjunction with the + `certificate_group_ids` parameter. + certificate_names (list[str], optional): + A list of certificate names. If there is not at least one resource that matches + each of the elements of `certificate_names`, then an error is returned. This + cannot be provided in conjunction with the `certificate_ids` parameter. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + certificate_ids=certificate_ids, + certificate_group_ids=certificate_group_ids, + certificate_group_names=certificate_group_names, + certificate_names=certificate_names, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._certificate_groups_api.api214_certificate_groups_certificates_delete_with_http_info + _process_references(certificates, ['certificate_ids', 'certificate_names'], kwargs) + _process_references(certificate_groups, ['certificate_group_ids', 'certificate_group_names'], kwargs) + return self._call_api(endpoint, kwargs) + + def get_certificate_groups_certificates( + self, + certificates=None, # type: List[models.ReferenceType] + certificate_groups=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + continuation_token=None, # type: str + certificate_ids=None, # type: List[str] + certificate_group_ids=None, # type: List[str] + certificate_group_names=None, # type: List[str] + certificate_names=None, # type: List[str] + filter=None, # type: str + limit=None, # type: int + offset=None, # type: int + sort=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.CertificateGroupCertificateGetResp + """ + List membership associations between groups and certificates on the array. + + Args: + certificates (list[FixedReference], optional): + A list of certificates to query for. Overrides certificate_ids and certificate_names keyword arguments. + certificate_groups (list[FixedReference], optional): + A list of certificate_groups to query for. Overrides certificate_group_ids and certificate_group_names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + continuation_token (str, optional): + An opaque token to iterate over a collection of resources. + certificate_ids (list[str], optional): + A list of certificate ids. If there is not at least one resource that matches + each of the elements of `certificate_ids`, then an error is returned. This + cannot be provided in conjunction with the `certificate_names` parameter. + certificate_group_ids (list[str], optional): + A list of certificate group ids. If there is not at least one resource that + matches each of the elements of `certificate_group_ids`, then an error is + returned. This cannot be provided in conjunction with the + `certificate_group_names` parameter. + certificate_group_names (list[str], optional): + A list of certificate group names. If there is not at least one resource that + matches each of the elements of `certificate_group_names`, then an error is + returned. This cannot be provided in conjunction with the + `certificate_group_ids` parameter. + certificate_names (list[str], optional): + A list of certificate names. If there is not at least one resource that matches + each of the elements of `certificate_names`, then an error is returned. This + cannot be provided in conjunction with the `certificate_ids` parameter. + filter (Filter, optional): + A filter to include only resources that match the specified criteria. + limit (int, optional): + Limit the number of resources in the response. If not specified, defaults to + 1000. + offset (int, optional): + The offset of the first resource to return from a collection. + sort (list[Property], optional): + Sort the response by the specified Properties. Can also be a single element. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + continuation_token=continuation_token, + certificate_ids=certificate_ids, + certificate_group_ids=certificate_group_ids, + certificate_group_names=certificate_group_names, + certificate_names=certificate_names, + filter=filter, + limit=limit, + offset=offset, + sort=sort, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._certificate_groups_api.api214_certificate_groups_certificates_get_with_http_info + _process_references(certificates, ['certificate_ids', 'certificate_names'], kwargs) + _process_references(certificate_groups, ['certificate_group_ids', 'certificate_group_names'], kwargs) + return self._call_api(endpoint, kwargs) + + def post_certificate_groups_certificates( + self, + certificates=None, # type: List[models.ReferenceType] + certificate_groups=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + certificate_ids=None, # type: List[str] + certificate_group_ids=None, # type: List[str] + certificate_group_names=None, # type: List[str] + certificate_names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.CertificateGroupCertificateResponse + """ + Add one or more certificates to one or more certificate groups on the array. + + Args: + certificates (list[FixedReference], optional): + A list of certificates to query for. Overrides certificate_ids and certificate_names keyword arguments. + certificate_groups (list[FixedReference], optional): + A list of certificate_groups to query for. Overrides certificate_group_ids and certificate_group_names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + certificate_ids (list[str], optional): + A list of certificate ids. If there is not at least one resource that matches + each of the elements of `certificate_ids`, then an error is returned. This + cannot be provided in conjunction with the `certificate_names` parameter. + certificate_group_ids (list[str], optional): + A list of certificate group ids. If there is not at least one resource that + matches each of the elements of `certificate_group_ids`, then an error is + returned. This cannot be provided in conjunction with the + `certificate_group_names` parameter. + certificate_group_names (list[str], optional): + A list of certificate group names. If there is not at least one resource that + matches each of the elements of `certificate_group_names`, then an error is + returned. This cannot be provided in conjunction with the + `certificate_group_ids` parameter. + certificate_names (list[str], optional): + A list of certificate names. If there is not at least one resource that matches + each of the elements of `certificate_names`, then an error is returned. This + cannot be provided in conjunction with the `certificate_ids` parameter. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + certificate_ids=certificate_ids, + certificate_group_ids=certificate_group_ids, + certificate_group_names=certificate_group_names, + certificate_names=certificate_names, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._certificate_groups_api.api214_certificate_groups_certificates_post_with_http_info + _process_references(certificates, ['certificate_ids', 'certificate_names'], kwargs) + _process_references(certificate_groups, ['certificate_group_ids', 'certificate_group_names'], kwargs) + return self._call_api(endpoint, kwargs) + + def delete_certificate_groups( + self, + references=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + ids=None, # type: List[str] + names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> None + """ + Delete one or more certificate groups from the array. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides ids and names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + ids (list[str], optional): + A list of resource IDs. If after filtering, there is not at least one resource + that matches each of the elements of `ids`, then an error is returned. This + cannot be provided together with the `name` or `names` query parameters. + names (list[str], optional): + A list of resource names. If there is not at least one resource that matches + each of the elements of `names`, then an error is returned. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + ids=ids, + names=names, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._certificate_groups_api.api214_certificate_groups_delete_with_http_info + _process_references(references, ['ids', 'names'], kwargs) + return self._call_api(endpoint, kwargs) + + def get_certificate_groups( + self, + references=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + continuation_token=None, # type: str + filter=None, # type: str + ids=None, # type: List[str] + limit=None, # type: int + names=None, # type: List[str] + offset=None, # type: int + sort=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.CertificateGroupGetResponse + """ + Display all array certificate groups. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides ids and names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + continuation_token (str, optional): + An opaque token to iterate over a collection of resources. + filter (Filter, optional): + A filter to include only resources that match the specified criteria. + ids (list[str], optional): + A list of resource IDs. If after filtering, there is not at least one resource + that matches each of the elements of `ids`, then an error is returned. This + cannot be provided together with the `name` or `names` query parameters. + limit (int, optional): + Limit the number of resources in the response. If not specified, defaults to + 1000. + names (list[str], optional): + A list of resource names. If there is not at least one resource that matches + each of the elements of `names`, then an error is returned. + offset (int, optional): + The offset of the first resource to return from a collection. + sort (list[Property], optional): + Sort the response by the specified Properties. Can also be a single element. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + continuation_token=continuation_token, + filter=filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + sort=sort, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._certificate_groups_api.api214_certificate_groups_get_with_http_info + _process_references(references, ['ids', 'names'], kwargs) + return self._call_api(endpoint, kwargs) + + def post_certificate_groups( + self, + references=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.CertificateGroupResponse + """ + Create one or more certificate groups on the array. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + names (list[str], optional): + A list of resource names. If there is not at least one resource that matches + each of the elements of `names`, then an error is returned. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + names=names, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._certificate_groups_api.api214_certificate_groups_post_with_http_info + _process_references(references, ['names'], kwargs) + return self._call_api(endpoint, kwargs) + + def get_certificate_groups_uses( + self, + references=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + continuation_token=None, # type: str + filter=None, # type: str + ids=None, # type: List[str] + limit=None, # type: int + names=None, # type: List[str] + offset=None, # type: int + sort=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.CertificateGroupUseGetResponse + """ + List how certificate groups are being used and by what. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides ids and names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + continuation_token (str, optional): + An opaque token to iterate over a collection of resources. + filter (Filter, optional): + A filter to include only resources that match the specified criteria. + ids (list[str], optional): + A list of resource IDs. If after filtering, there is not at least one resource + that matches each of the elements of `ids`, then an error is returned. This + cannot be provided together with the `name` or `names` query parameters. + limit (int, optional): + Limit the number of resources in the response. If not specified, defaults to + 1000. + names (list[str], optional): + A list of resource names. If there is not at least one resource that matches + each of the elements of `names`, then an error is returned. + offset (int, optional): + The offset of the first resource to return from a collection. + sort (list[Property], optional): + Sort the response by the specified Properties. Can also be a single element. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + continuation_token=continuation_token, + filter=filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + sort=sort, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._certificate_groups_api.api214_certificate_groups_uses_get_with_http_info + _process_references(references, ['ids', 'names'], kwargs) + return self._call_api(endpoint, kwargs) + + def delete_certificates_certificate_groups( + self, + certificates=None, # type: List[models.ReferenceType] + certificate_groups=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + certificate_ids=None, # type: List[str] + certificate_group_ids=None, # type: List[str] + certificate_group_names=None, # type: List[str] + certificate_names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> None + """ + Remove one or more certificates from one or more certificate groups. + + Args: + certificates (list[FixedReference], optional): + A list of certificates to query for. Overrides certificate_ids and certificate_names keyword arguments. + certificate_groups (list[FixedReference], optional): + A list of certificate_groups to query for. Overrides certificate_group_ids and certificate_group_names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + certificate_ids (list[str], optional): + A list of certificate ids. If there is not at least one resource that matches + each of the elements of `certificate_ids`, then an error is returned. This + cannot be provided in conjunction with the `certificate_names` parameter. + certificate_group_ids (list[str], optional): + A list of certificate group ids. If there is not at least one resource that + matches each of the elements of `certificate_group_ids`, then an error is + returned. This cannot be provided in conjunction with the + `certificate_group_names` parameter. + certificate_group_names (list[str], optional): + A list of certificate group names. If there is not at least one resource that + matches each of the elements of `certificate_group_names`, then an error is + returned. This cannot be provided in conjunction with the + `certificate_group_ids` parameter. + certificate_names (list[str], optional): + A list of certificate names. If there is not at least one resource that matches + each of the elements of `certificate_names`, then an error is returned. This + cannot be provided in conjunction with the `certificate_ids` parameter. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + certificate_ids=certificate_ids, + certificate_group_ids=certificate_group_ids, + certificate_group_names=certificate_group_names, + certificate_names=certificate_names, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._certificates_api.api214_certificates_certificate_groups_delete_with_http_info + _process_references(certificates, ['certificate_ids', 'certificate_names'], kwargs) + _process_references(certificate_groups, ['certificate_group_ids', 'certificate_group_names'], kwargs) + return self._call_api(endpoint, kwargs) + + def get_certificates_certificate_groups( + self, + certificates=None, # type: List[models.ReferenceType] + certificate_groups=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + continuation_token=None, # type: str + certificate_ids=None, # type: List[str] + certificate_group_ids=None, # type: List[str] + certificate_group_names=None, # type: List[str] + certificate_names=None, # type: List[str] + filter=None, # type: str + limit=None, # type: int + offset=None, # type: int + sort=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.CertificateCertificateGroupGetResp + """ + List membership associations between groups and certificates. + + Args: + certificates (list[FixedReference], optional): + A list of certificates to query for. Overrides certificate_ids and certificate_names keyword arguments. + certificate_groups (list[FixedReference], optional): + A list of certificate_groups to query for. Overrides certificate_group_ids and certificate_group_names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + continuation_token (str, optional): + An opaque token to iterate over a collection of resources. + certificate_ids (list[str], optional): + A list of certificate ids. If there is not at least one resource that matches + each of the elements of `certificate_ids`, then an error is returned. This + cannot be provided in conjunction with the `certificate_names` parameter. + certificate_group_ids (list[str], optional): + A list of certificate group ids. If there is not at least one resource that + matches each of the elements of `certificate_group_ids`, then an error is + returned. This cannot be provided in conjunction with the + `certificate_group_names` parameter. + certificate_group_names (list[str], optional): + A list of certificate group names. If there is not at least one resource that + matches each of the elements of `certificate_group_names`, then an error is + returned. This cannot be provided in conjunction with the + `certificate_group_ids` parameter. + certificate_names (list[str], optional): + A list of certificate names. If there is not at least one resource that matches + each of the elements of `certificate_names`, then an error is returned. This + cannot be provided in conjunction with the `certificate_ids` parameter. + filter (Filter, optional): + A filter to include only resources that match the specified criteria. + limit (int, optional): + Limit the number of resources in the response. If not specified, defaults to + 1000. + offset (int, optional): + The offset of the first resource to return from a collection. + sort (list[Property], optional): + Sort the response by the specified Properties. Can also be a single element. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + continuation_token=continuation_token, + certificate_ids=certificate_ids, + certificate_group_ids=certificate_group_ids, + certificate_group_names=certificate_group_names, + certificate_names=certificate_names, + filter=filter, + limit=limit, + offset=offset, + sort=sort, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._certificates_api.api214_certificates_certificate_groups_get_with_http_info + _process_references(certificates, ['certificate_ids', 'certificate_names'], kwargs) + _process_references(certificate_groups, ['certificate_group_ids', 'certificate_group_names'], kwargs) + return self._call_api(endpoint, kwargs) + + def post_certificates_certificate_groups( + self, + certificates=None, # type: List[models.ReferenceType] + certificate_groups=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + certificate_ids=None, # type: List[str] + certificate_group_ids=None, # type: List[str] + certificate_group_names=None, # type: List[str] + certificate_names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.CertificateCertificateGroupResponse + """ + Add one or more certificates to one or more certificate groups. + + Args: + certificates (list[FixedReference], optional): + A list of certificates to query for. Overrides certificate_ids and certificate_names keyword arguments. + certificate_groups (list[FixedReference], optional): + A list of certificate_groups to query for. Overrides certificate_group_ids and certificate_group_names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + certificate_ids (list[str], optional): + A list of certificate ids. If there is not at least one resource that matches + each of the elements of `certificate_ids`, then an error is returned. This + cannot be provided in conjunction with the `certificate_names` parameter. + certificate_group_ids (list[str], optional): + A list of certificate group ids. If there is not at least one resource that + matches each of the elements of `certificate_group_ids`, then an error is + returned. This cannot be provided in conjunction with the + `certificate_group_names` parameter. + certificate_group_names (list[str], optional): + A list of certificate group names. If there is not at least one resource that + matches each of the elements of `certificate_group_names`, then an error is + returned. This cannot be provided in conjunction with the + `certificate_group_ids` parameter. + certificate_names (list[str], optional): + A list of certificate names. If there is not at least one resource that matches + each of the elements of `certificate_names`, then an error is returned. This + cannot be provided in conjunction with the `certificate_ids` parameter. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + certificate_ids=certificate_ids, + certificate_group_ids=certificate_group_ids, + certificate_group_names=certificate_group_names, + certificate_names=certificate_names, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._certificates_api.api214_certificates_certificate_groups_post_with_http_info + _process_references(certificates, ['certificate_ids', 'certificate_names'], kwargs) + _process_references(certificate_groups, ['certificate_group_ids', 'certificate_group_names'], kwargs) + return self._call_api(endpoint, kwargs) + + def delete_certificates( + self, + references=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + ids=None, # type: List[str] + names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> None + """ + Delete a CA certificate from the array. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides ids and names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + ids (list[str], optional): + A list of resource IDs. If after filtering, there is not at least one resource + that matches each of the elements of `ids`, then an error is returned. This + cannot be provided together with the `name` or `names` query parameters. + names (list[str], optional): + A list of resource names. If there is not at least one resource that matches + each of the elements of `names`, then an error is returned. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + ids=ids, + names=names, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._certificates_api.api214_certificates_delete_with_http_info + _process_references(references, ['ids', 'names'], kwargs) + return self._call_api(endpoint, kwargs) + + def get_certificates( + self, + references=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + continuation_token=None, # type: str + filter=None, # type: str + ids=None, # type: List[str] + limit=None, # type: int + names=None, # type: List[str] + offset=None, # type: int + sort=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.CertificateGetResponse + """ + List array certificates and their attributes. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides ids and names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + continuation_token (str, optional): + An opaque token to iterate over a collection of resources. + filter (Filter, optional): + A filter to include only resources that match the specified criteria. + ids (list[str], optional): + A list of resource IDs. If after filtering, there is not at least one resource + that matches each of the elements of `ids`, then an error is returned. This + cannot be provided together with the `name` or `names` query parameters. + limit (int, optional): + Limit the number of resources in the response. If not specified, defaults to + 1000. + names (list[str], optional): + A list of resource names. If there is not at least one resource that matches + each of the elements of `names`, then an error is returned. + offset (int, optional): + The offset of the first resource to return from a collection. + sort (list[Property], optional): + Sort the response by the specified Properties. Can also be a single element. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + continuation_token=continuation_token, + filter=filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + sort=sort, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._certificates_api.api214_certificates_get_with_http_info + _process_references(references, ['ids', 'names'], kwargs) + return self._call_api(endpoint, kwargs) + + def patch_certificates( + self, + references=None, # type: List[models.ReferenceType] + certificate=None, # type: models.CertificatePatch + x_request_id=None, # type: str + ids=None, # type: List[str] + names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.CertificateResponse + """ + Modify SSL certificate attributes such as passphrases and intermediate + certificates. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides ids and names keyword arguments. + + certificate (CertificatePatch, required): + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + ids (list[str], optional): + A list of resource IDs. If after filtering, there is not at least one resource + that matches each of the elements of `ids`, then an error is returned. This + cannot be provided together with the `name` or `names` query parameters. + names (list[str], optional): + A list of resource names. If there is not at least one resource that matches + each of the elements of `names`, then an error is returned. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + certificate=certificate, + x_request_id=x_request_id, + ids=ids, + names=names, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._certificates_api.api214_certificates_patch_with_http_info + _process_references(references, ['ids', 'names'], kwargs) + return self._call_api(endpoint, kwargs) + + def post_certificates( + self, + references=None, # type: List[models.ReferenceType] + certificate=None, # type: models.CertificatePost + x_request_id=None, # type: str + names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.CertificateResponse + """ + Upload a CA certificate to the array. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides names keyword arguments. + + certificate (CertificatePost, required): + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + names (list[str], optional): + A list of resource names. If there is not at least one resource that matches + each of the elements of `names`, then an error is returned. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + certificate=certificate, + x_request_id=x_request_id, + names=names, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._certificates_api.api214_certificates_post_with_http_info + _process_references(references, ['names'], kwargs) + return self._call_api(endpoint, kwargs) + + def get_certificates_uses( + self, + references=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + continuation_token=None, # type: str + filter=None, # type: str + ids=None, # type: List[str] + limit=None, # type: int + names=None, # type: List[str] + offset=None, # type: int + sort=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.CertificateUseGetResponse + """ + List how certificates are being used and by what. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides ids and names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + continuation_token (str, optional): + An opaque token to iterate over a collection of resources. + filter (Filter, optional): + A filter to include only resources that match the specified criteria. + ids (list[str], optional): + A list of resource IDs. If after filtering, there is not at least one resource + that matches each of the elements of `ids`, then an error is returned. This + cannot be provided together with the `name` or `names` query parameters. + limit (int, optional): + Limit the number of resources in the response. If not specified, defaults to + 1000. + names (list[str], optional): + A list of resource names. If there is not at least one resource that matches + each of the elements of `names`, then an error is returned. + offset (int, optional): + The offset of the first resource to return from a collection. + sort (list[Property], optional): + Sort the response by the specified Properties. Can also be a single element. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + continuation_token=continuation_token, + filter=filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + sort=sort, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._certificates_api.api214_certificates_uses_get_with_http_info + _process_references(references, ['ids', 'names'], kwargs) + return self._call_api(endpoint, kwargs) + + def get_arrays_clients_performance( + self, + references=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + filter=None, # type: str + limit=None, # type: int + names=None, # type: List[str] + sort=None, # type: List[str] + total_only=None, # type: bool + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.ClientPerformanceGetResponse + """ + List NFS client I/O performance metrics. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + filter (Filter, optional): + A filter to include only resources that match the specified criteria. + limit (int, optional): + Limit the number of resources in the response. If not specified, defaults to + 1000. + names (list[str], optional): + A list of resource names. If there is not at least one resource that matches + each of the elements of `names`, then an error is returned. + sort (list[Property], optional): + Sort the response by the specified Properties. Can also be a single element. + total_only (bool, optional): + Only return the total record for the specified items. The total record will be + the total of all items after filtering. The `items` list will be empty. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + filter=filter, + limit=limit, + names=names, + sort=sort, + total_only=total_only, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._clients_api.api214_arrays_clients_performance_get_with_http_info + _process_references(references, ['names'], kwargs) + return self._call_api(endpoint, kwargs) + + def get_directory_services( + self, + references=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + continuation_token=None, # type: str + filter=None, # type: str + ids=None, # type: List[str] + limit=None, # type: int + names=None, # type: List[str] + offset=None, # type: int + sort=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.DirectoryServiceGetResponse + """ + List directory service configuration information for the array. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides ids and names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + continuation_token (str, optional): + An opaque token to iterate over a collection of resources. + filter (Filter, optional): + A filter to include only resources that match the specified criteria. + ids (list[str], optional): + A list of resource IDs. If after filtering, there is not at least one resource + that matches each of the elements of `ids`, then an error is returned. This + cannot be provided together with the `name` or `names` query parameters. + limit (int, optional): + Limit the number of resources in the response. If not specified, defaults to + 1000. + names (list[str], optional): + A list of resource names. If there is not at least one resource that matches + each of the elements of `names`, then an error is returned. + offset (int, optional): + The offset of the first resource to return from a collection. + sort (list[Property], optional): + Sort the response by the specified Properties. Can also be a single element. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + continuation_token=continuation_token, + filter=filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + sort=sort, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._directory_services_api.api214_directory_services_get_with_http_info + _process_references(references, ['ids', 'names'], kwargs) + return self._call_api(endpoint, kwargs) + + def patch_directory_services( + self, + references=None, # type: List[models.ReferenceType] + directory_service=None, # type: models.DirectoryService + x_request_id=None, # type: str + ids=None, # type: List[str] + names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.DirectoryServiceResponse + """ + Modifies and tests the directory service configuration. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides ids and names keyword arguments. + + directory_service (DirectoryService, required): + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + ids (list[str], optional): + A list of resource IDs. If after filtering, there is not at least one resource + that matches each of the elements of `ids`, then an error is returned. This + cannot be provided together with the `name` or `names` query parameters. + names (list[str], optional): + A list of resource names. If there is not at least one resource that matches + each of the elements of `names`, then an error is returned. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + directory_service=directory_service, + x_request_id=x_request_id, + ids=ids, + names=names, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._directory_services_api.api214_directory_services_patch_with_http_info + _process_references(references, ['ids', 'names'], kwargs) + return self._call_api(endpoint, kwargs) + + def delete_directory_services_roles( + self, + references=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + names=None, # type: List[str] + ids=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> None + """ + Delete an RBAC group configuration setting for manageability. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides names and ids keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + names (list[str], optional): + A list of resource names. If there is not at least one resource that matches + each of the elements of `names`, then an error is returned. + ids (list[str], optional): + A list of resource IDs. If after filtering, there is not at least one resource + that matches each of the elements of `ids`, then an error is returned. This + cannot be provided together with the `name` or `names` query parameters. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + names=names, + ids=ids, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._directory_services_api.api214_directory_services_roles_delete_with_http_info + _process_references(references, ['names', 'ids'], kwargs) + return self._call_api(endpoint, kwargs) + + def get_directory_services_roles( + self, + references=None, # type: List[models.ReferenceType] + roles=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + continuation_token=None, # type: str + filter=None, # type: str + limit=None, # type: int + offset=None, # type: int + names=None, # type: List[str] + ids=None, # type: List[str] + role_ids=None, # type: List[str] + role_names=None, # type: List[str] + sort=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.DirectoryServiceRolesGetResponse + """ + Return array's RBAC group configuration settings for manageability. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides names and ids keyword arguments. + roles (list[FixedReference], optional): + A list of roles to query for. Overrides role_ids and role_names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + continuation_token (str, optional): + An opaque token to iterate over a collection of resources. + filter (Filter, optional): + A filter to include only resources that match the specified criteria. + limit (int, optional): + Limit the number of resources in the response. If not specified, defaults to + 1000. + offset (int, optional): + The offset of the first resource to return from a collection. + names (list[str], optional): + A list of resource IDs. If after filtering, there is not at least one resource + that matches each of the elements of `names`, then an error is returned. This + cannot be provided together with the `ids`, `role_names`, or `role_ids` query + parameters. + ids (list[str], optional): + A list of resource IDs. If after filtering, there is not at least one resource + that matches each of the elements of `ids`, then an error is returned. This + cannot be provided together with the `names`, `role_names`, or `role_ids` query + parameters. + role_ids (list[str], optional): + A list of role_ids. If after filtering, there is not at least one resource that + matches each of the elements of `role_ids`, then an error is returned. This + cannot be provided together with the `ids`, `names` or `role_names` query + parameters. This query parameter is deprecated for use with directory service + roles. If this parameter is used to query or modify directory service roles, but + more than 1 configuration exists with a given role id, an error will be returned + in order to avoid ambiguous operation. + role_names (list[str], optional): + A list of role_names. If there is not at least one resource that matches each of + the elements of `role_names`, then an error is returned. This cannot be provided + together with the `ids`, `names`, or `role_ids` query parameters. This query + parameter is deprecated for use with directory service roles. If this parameter + is used to query or modify directory service roles, but more than 1 + configuration exists with a given role name, an error will be returned in order + to avoid ambiguous operation. + sort (list[Property], optional): + Sort the response by the specified Properties. Can also be a single element. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + continuation_token=continuation_token, + filter=filter, + limit=limit, + offset=offset, + names=names, + ids=ids, + role_ids=role_ids, + role_names=role_names, + sort=sort, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._directory_services_api.api214_directory_services_roles_get_with_http_info + _process_references(references, ['names', 'ids'], kwargs) + _process_references(roles, ['role_ids', 'role_names'], kwargs) + return self._call_api(endpoint, kwargs) + + def patch_directory_services_roles( + self, + references=None, # type: List[models.ReferenceType] + roles=None, # type: List[models.ReferenceType] + directory_service_roles=None, # type: models.DirectoryServiceRole + x_request_id=None, # type: str + names=None, # type: List[str] + ids=None, # type: List[str] + role_ids=None, # type: List[str] + role_names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.DirectoryServiceRolesResponse + """ + Update an RBAC group configuration setting for manageability. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides names and ids keyword arguments. + roles (list[FixedReference], optional): + A list of roles to query for. Overrides role_ids and role_names keyword arguments. + + directory_service_roles (DirectoryServiceRole, required): + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + names (list[str], optional): + A list of resource IDs. If after filtering, there is not at least one resource + that matches each of the elements of `names`, then an error is returned. This + cannot be provided together with the `ids`, `role_names`, or `role_ids` query + parameters. + ids (list[str], optional): + A list of resource IDs. If after filtering, there is not at least one resource + that matches each of the elements of `ids`, then an error is returned. This + cannot be provided together with the `names`, `role_names`, or `role_ids` query + parameters. + role_ids (list[str], optional): + A list of role_ids. If after filtering, there is not at least one resource that + matches each of the elements of `role_ids`, then an error is returned. This + cannot be provided together with the `ids`, `names` or `role_names` query + parameters. This query parameter is deprecated for use with directory service + roles. If this parameter is used to query or modify directory service roles, but + more than 1 configuration exists with a given role id, an error will be returned + in order to avoid ambiguous operation. + role_names (list[str], optional): + A list of role_names. If there is not at least one resource that matches each of + the elements of `role_names`, then an error is returned. This cannot be provided + together with the `ids`, `names`, or `role_ids` query parameters. This query + parameter is deprecated for use with directory service roles. If this parameter + is used to query or modify directory service roles, but more than 1 + configuration exists with a given role name, an error will be returned in order + to avoid ambiguous operation. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + directory_service_roles=directory_service_roles, + x_request_id=x_request_id, + names=names, + ids=ids, + role_ids=role_ids, + role_names=role_names, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._directory_services_api.api214_directory_services_roles_patch_with_http_info + _process_references(references, ['names', 'ids'], kwargs) + _process_references(roles, ['role_ids', 'role_names'], kwargs) + return self._call_api(endpoint, kwargs) + + def post_directory_services_roles( + self, + references=None, # type: List[models.ReferenceType] + directory_service_roles=None, # type: models.DirectoryServiceRole + x_request_id=None, # type: str + names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.DirectoryServiceRolesResponse + """ + Create an RBAC group configuration setting for manageability. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides names keyword arguments. + + directory_service_roles (DirectoryServiceRole, required): + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + names (list[str], optional): + A list of resource names. If there is not at least one resource that matches + each of the elements of `names`, then an error is returned. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + directory_service_roles=directory_service_roles, + x_request_id=x_request_id, + names=names, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._directory_services_api.api214_directory_services_roles_post_with_http_info + _process_references(references, ['names'], kwargs) + return self._call_api(endpoint, kwargs) + + def get_directory_services_test( + self, + references=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + filter=None, # type: str + ids=None, # type: List[str] + limit=None, # type: int + names=None, # type: List[str] + sort=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.TestResultGetResponse + """ + Test the configured directory services on the array. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides ids and names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + filter (Filter, optional): + A filter to include only resources that match the specified criteria. + ids (list[str], optional): + A list of resource IDs. If after filtering, there is not at least one resource + that matches each of the elements of `ids`, then an error is returned. This + cannot be provided together with the `name` or `names` query parameters. + limit (int, optional): + Limit the number of resources in the response. If not specified, defaults to + 1000. + names (list[str], optional): + A list of resource names. If there is not at least one resource that matches + each of the elements of `names`, then an error is returned. + sort (list[Property], optional): + Sort the response by the specified Properties. Can also be a single element. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + filter=filter, + ids=ids, + limit=limit, + names=names, + sort=sort, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._directory_services_api.api214_directory_services_test_get_with_http_info + _process_references(references, ['ids', 'names'], kwargs) + return self._call_api(endpoint, kwargs) + + def patch_directory_services_test( + self, + references=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + filter=None, # type: str + ids=None, # type: List[str] + names=None, # type: List[str] + sort=None, # type: List[str] + directory_service=None, # type: models.DirectoryService + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.TestResultResponse + """ + Test the configured directory services on the array. Optionally, provide + modifications which will be used to perform the tests, but will not be applied + to the current configuration. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides ids and names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + filter (Filter, optional): + A filter to include only resources that match the specified criteria. + ids (list[str], optional): + A list of resource IDs. If after filtering, there is not at least one resource + that matches each of the elements of `ids`, then an error is returned. This + cannot be provided together with the `name` or `names` query parameters. + names (list[str], optional): + A list of resource names. If there is not at least one resource that matches + each of the elements of `names`, then an error is returned. + sort (list[Property], optional): + Sort the response by the specified Properties. Can also be a single element. + directory_service (DirectoryService, optional): + An optional directory service configuration that, if provided, will be used to + overwrite aspects of the existing directory service objects when performing + tests. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + filter=filter, + ids=ids, + names=names, + sort=sort, + directory_service=directory_service, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._directory_services_api.api214_directory_services_test_patch_with_http_info + _process_references(references, ['ids', 'names'], kwargs) + return self._call_api(endpoint, kwargs) + + def get_dns( + self, + references=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + continuation_token=None, # type: str + filter=None, # type: str + ids=None, # type: List[str] + limit=None, # type: int + names=None, # type: List[str] + offset=None, # type: int + sort=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.DnsGetResponse + """ + List DNS attributes for the array's administrative network. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides ids and names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + continuation_token (str, optional): + An opaque token to iterate over a collection of resources. + filter (Filter, optional): + A filter to include only resources that match the specified criteria. + ids (list[str], optional): + A list of resource IDs. If after filtering, there is not at least one resource + that matches each of the elements of `ids`, then an error is returned. This + cannot be provided together with the `name` or `names` query parameters. + limit (int, optional): + Limit the number of resources in the response. If not specified, defaults to + 1000. + names (list[str], optional): + A list of resource names. If there is not at least one resource that matches + each of the elements of `names`, then an error is returned. + offset (int, optional): + The offset of the first resource to return from a collection. + sort (list[Property], optional): + Sort the response by the specified Properties. Can also be a single element. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + continuation_token=continuation_token, + filter=filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + sort=sort, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._dns_api.api214_dns_get_with_http_info + _process_references(references, ['ids', 'names'], kwargs) + return self._call_api(endpoint, kwargs) + + def patch_dns( + self, + references=None, # type: List[models.ReferenceType] + dns=None, # type: models.Dns + x_request_id=None, # type: str + ids=None, # type: List[str] + names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.DnsResponse + """ + Modify DNS attributes. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides ids and names keyword arguments. + + dns (Dns, required): + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + ids (list[str], optional): + A list of resource IDs. If after filtering, there is not at least one resource + that matches each of the elements of `ids`, then an error is returned. This + cannot be provided together with the `name` or `names` query parameters. + names (list[str], optional): + A list of resource names. If there is not at least one resource that matches + each of the elements of `names`, then an error is returned. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + dns=dns, + x_request_id=x_request_id, + ids=ids, + names=names, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._dns_api.api214_dns_patch_with_http_info + _process_references(references, ['ids', 'names'], kwargs) + return self._call_api(endpoint, kwargs) + + def get_drives( + self, + references=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + continuation_token=None, # type: str + filter=None, # type: str + ids=None, # type: List[str] + limit=None, # type: int + names=None, # type: List[str] + offset=None, # type: int + sort=None, # type: List[str] + total_only=None, # type: bool + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.DriveGetResponse + """ + List array drive information. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides ids and names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + continuation_token (str, optional): + An opaque token to iterate over a collection of resources. + filter (Filter, optional): + A filter to include only resources that match the specified criteria. + ids (list[str], optional): + A list of resource IDs. If after filtering, there is not at least one resource + that matches each of the elements of `ids`, then an error is returned. This + cannot be provided together with the `name` or `names` query parameters. + limit (int, optional): + Limit the number of resources in the response. If not specified, defaults to + 1000. + names (list[str], optional): + A list of resource names. If there is not at least one resource that matches + each of the elements of `names`, then an error is returned. + offset (int, optional): + The offset of the first resource to return from a collection. + sort (list[Property], optional): + Sort the response by the specified Properties. Can also be a single element. + total_only (bool, optional): + Only return the total record for the specified items. The total record will be + the total of all items after filtering. The `items` list will be empty. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + continuation_token=continuation_token, + filter=filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + sort=sort, + total_only=total_only, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._drives_api.api214_drives_get_with_http_info + _process_references(references, ['ids', 'names'], kwargs) + return self._call_api(endpoint, kwargs) + + def delete_file_system_replica_links( + self, + references=None, # type: List[models.ReferenceType] + local_file_systems=None, # type: List[models.ReferenceType] + remote_file_systems=None, # type: List[models.ReferenceType] + remotes=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + ids=None, # type: List[str] + local_file_system_ids=None, # type: List[str] + local_file_system_names=None, # type: List[str] + remote_file_system_ids=None, # type: List[str] + remote_file_system_names=None, # type: List[str] + remote_ids=None, # type: List[str] + remote_names=None, # type: List[str] + cancel_in_progress_transfers=None, # type: bool + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> None + """ + Delete a file system replication link. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides ids keyword arguments. + local_file_systems (list[FixedReference], optional): + A list of local_file_systems to query for. Overrides local_file_system_ids and local_file_system_names keyword arguments. + remote_file_systems (list[FixedReference], optional): + A list of remote_file_systems to query for. Overrides remote_file_system_ids and remote_file_system_names keyword arguments. + remotes (list[FixedReference], optional): + A list of remotes to query for. Overrides remote_ids and remote_names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + ids (list[str], optional): + A list of resource IDs. If after filtering, there is not at least one resource + that matches each of the elements of `ids`, then an error is returned. This + cannot be provided together with the `name` or `names` query parameters. + local_file_system_ids (list[str], optional): + A list of local file system IDs. If after filtering, there is not at least one + resource that matches each of the elements, then an error is returned. This + cannot be provided together with the `local_file_system_names` query parameter. + local_file_system_names (list[str], optional): + A list of local file system names. If there is not at least one resource that + matches each of the elements, then an error is returned. This cannot be provided + together with `local_file_system_ids` query parameter. + remote_file_system_ids (list[str], optional): + A list of remote file system IDs. If there is not at least one resource that + matches each of the elements, then an error is returned. This cannot be provided + together with the `remote_file_system_names` query parameter. + remote_file_system_names (list[str], optional): + A list of remote file system names. If there is not at least one resource that + matches each of the elements, then an error is returned. This cannot be provided + together with the `remote_file_system_ids` query parameter. + remote_ids (list[str], optional): + A list of remote array IDs. If after filtering, there is not at least one + resource that matches each of the elements, then an error is returned. This + cannot be provided together with the `remote_names` query parameter. + remote_names (list[str], optional): + A list of remote array names. If there is not at least one resource that matches + each of the elements, then an error is returned. This cannot be provided + together with `remote_ids` query parameter. + cancel_in_progress_transfers (bool, optional): + This parameter must be set to `true` in order to delete a file system + replication link (which can cancel any in-progress replication transfers). + Setting this parameter to `true` is acknowledgement that any in-progress + replication transfers on the specified links will be cancelled when this request + is fulfilled. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + ids=ids, + local_file_system_ids=local_file_system_ids, + local_file_system_names=local_file_system_names, + remote_file_system_ids=remote_file_system_ids, + remote_file_system_names=remote_file_system_names, + remote_ids=remote_ids, + remote_names=remote_names, + cancel_in_progress_transfers=cancel_in_progress_transfers, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._file_system_replica_links_api.api214_file_system_replica_links_delete_with_http_info + _process_references(references, ['ids'], kwargs) + _process_references(local_file_systems, ['local_file_system_ids', 'local_file_system_names'], kwargs) + _process_references(remote_file_systems, ['remote_file_system_ids', 'remote_file_system_names'], kwargs) + _process_references(remotes, ['remote_ids', 'remote_names'], kwargs) + return self._call_api(endpoint, kwargs) + + def get_file_system_replica_links( + self, + references=None, # type: List[models.ReferenceType] + local_file_systems=None, # type: List[models.ReferenceType] + remote_file_systems=None, # type: List[models.ReferenceType] + remotes=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + continuation_token=None, # type: str + filter=None, # type: str + ids=None, # type: List[str] + limit=None, # type: int + local_file_system_ids=None, # type: List[str] + local_file_system_names=None, # type: List[str] + offset=None, # type: int + remote_file_system_ids=None, # type: List[str] + remote_file_system_names=None, # type: List[str] + remote_ids=None, # type: List[str] + remote_names=None, # type: List[str] + sort=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.FileSystemReplicaLinkGetResponse + """ + List file system replication link. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides ids keyword arguments. + local_file_systems (list[FixedReference], optional): + A list of local_file_systems to query for. Overrides local_file_system_ids and local_file_system_names keyword arguments. + remote_file_systems (list[FixedReference], optional): + A list of remote_file_systems to query for. Overrides remote_file_system_ids and remote_file_system_names keyword arguments. + remotes (list[FixedReference], optional): + A list of remotes to query for. Overrides remote_ids and remote_names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + continuation_token (str, optional): + An opaque token to iterate over a collection of resources. + filter (Filter, optional): + A filter to include only resources that match the specified criteria. + ids (list[str], optional): + A list of resource IDs. If after filtering, there is not at least one resource + that matches each of the elements of `ids`, then an error is returned. This + cannot be provided together with the `name` or `names` query parameters. + limit (int, optional): + Limit the number of resources in the response. If not specified, defaults to + 1000. + local_file_system_ids (list[str], optional): + A list of local file system IDs. If after filtering, there is not at least one + resource that matches each of the elements, then an error is returned. This + cannot be provided together with the `local_file_system_names` query parameter. + local_file_system_names (list[str], optional): + A list of local file system names. If there is not at least one resource that + matches each of the elements, then an error is returned. This cannot be provided + together with `local_file_system_ids` query parameter. + offset (int, optional): + The offset of the first resource to return from a collection. + remote_file_system_ids (list[str], optional): + A list of remote file system IDs. If there is not at least one resource that + matches each of the elements, then an error is returned. This cannot be provided + together with the `remote_file_system_names` query parameter. + remote_file_system_names (list[str], optional): + A list of remote file system names. If there is not at least one resource that + matches each of the elements, then an error is returned. This cannot be provided + together with the `remote_file_system_ids` query parameter. + remote_ids (list[str], optional): + A list of remote array IDs. If after filtering, there is not at least one + resource that matches each of the elements, then an error is returned. This + cannot be provided together with the `remote_names` query parameter. + remote_names (list[str], optional): + A list of remote array names. If there is not at least one resource that matches + each of the elements, then an error is returned. This cannot be provided + together with `remote_ids` query parameter. + sort (list[Property], optional): + Sort the response by the specified Properties. Can also be a single element. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + continuation_token=continuation_token, + filter=filter, + ids=ids, + limit=limit, + local_file_system_ids=local_file_system_ids, + local_file_system_names=local_file_system_names, + offset=offset, + remote_file_system_ids=remote_file_system_ids, + remote_file_system_names=remote_file_system_names, + remote_ids=remote_ids, + remote_names=remote_names, + sort=sort, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._file_system_replica_links_api.api214_file_system_replica_links_get_with_http_info + _process_references(references, ['ids'], kwargs) + _process_references(local_file_systems, ['local_file_system_ids', 'local_file_system_names'], kwargs) + _process_references(remote_file_systems, ['remote_file_system_ids', 'remote_file_system_names'], kwargs) + _process_references(remotes, ['remote_ids', 'remote_names'], kwargs) + return self._call_api(endpoint, kwargs) + + def delete_file_system_replica_links_policies( + self, + local_file_systems=None, # type: List[models.ReferenceType] + members=None, # type: List[models.ReferenceType] + policies=None, # type: List[models.ReferenceType] + remotes=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + local_file_system_ids=None, # type: List[str] + local_file_system_names=None, # type: List[str] + member_ids=None, # type: List[str] + policy_ids=None, # type: List[str] + policy_names=None, # type: List[str] + remote_ids=None, # type: List[str] + remote_names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> None + """ + Remove a policy from a file system replication link. + + Args: + local_file_systems (list[FixedReference], optional): + A list of local_file_systems to query for. Overrides local_file_system_ids and local_file_system_names keyword arguments. + members (list[FixedReference], optional): + A list of members to query for. Overrides member_ids keyword arguments. + policies (list[FixedReference], optional): + A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + remotes (list[FixedReference], optional): + A list of remotes to query for. Overrides remote_ids and remote_names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + local_file_system_ids (list[str], optional): + A list of local file system IDs. If after filtering, there is not at least one + resource that matches each of the elements, then an error is returned. This + cannot be provided together with the `local_file_system_names` query parameter. + local_file_system_names (list[str], optional): + A list of local file system names. If there is not at least one resource that + matches each of the elements, then an error is returned. This cannot be provided + together with `local_file_system_ids` query parameter. + member_ids (list[str], optional): + A list of member IDs. If after filtering, there is not at least one resource + that matches each of the elements of `member_ids`, then an error is returned. + This cannot be provided together with the `member_names` query parameter. + policy_ids (list[str], optional): + A list of policy IDs. If after filtering, there is not at least one resource + that matches each of the elements of `policy_ids`, then an error is returned. + This cannot be provided together with the `policy_names` query parameter. + policy_names (list[str], optional): + A list of policy names. + remote_ids (list[str], optional): + A list of remote array IDs. If after filtering, there is not at least one + resource that matches each of the elements, then an error is returned. This + cannot be provided together with the `remote_names` query parameter. + remote_names (list[str], optional): + A list of remote array names. If there is not at least one resource that matches + each of the elements, then an error is returned. This cannot be provided + together with `remote_ids` query parameter. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + local_file_system_ids=local_file_system_ids, + local_file_system_names=local_file_system_names, + member_ids=member_ids, + policy_ids=policy_ids, + policy_names=policy_names, + remote_ids=remote_ids, + remote_names=remote_names, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._file_system_replica_links_api.api214_file_system_replica_links_policies_delete_with_http_info + _process_references(local_file_systems, ['local_file_system_ids', 'local_file_system_names'], kwargs) + _process_references(members, ['member_ids'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _process_references(remotes, ['remote_ids', 'remote_names'], kwargs) + return self._call_api(endpoint, kwargs) + + def get_file_system_replica_links_policies( + self, + local_file_systems=None, # type: List[models.ReferenceType] + members=None, # type: List[models.ReferenceType] + policies=None, # type: List[models.ReferenceType] + remotes=None, # type: List[models.ReferenceType] + remote_file_systems=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + continuation_token=None, # type: str + filter=None, # type: str + limit=None, # type: int + local_file_system_ids=None, # type: List[str] + local_file_system_names=None, # type: List[str] + member_ids=None, # type: List[str] + offset=None, # type: int + policy_ids=None, # type: List[str] + policy_names=None, # type: List[str] + remote_ids=None, # type: List[str] + remote_file_system_ids=None, # type: List[str] + remote_file_system_names=None, # type: List[str] + remote_names=None, # type: List[str] + sort=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.PolicyMemberWithRemoteGetResponse + """ + List file system replication link policies. + + Args: + local_file_systems (list[FixedReference], optional): + A list of local_file_systems to query for. Overrides local_file_system_ids and local_file_system_names keyword arguments. + members (list[FixedReference], optional): + A list of members to query for. Overrides member_ids keyword arguments. + policies (list[FixedReference], optional): + A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + remotes (list[FixedReference], optional): + A list of remotes to query for. Overrides remote_ids and remote_names keyword arguments. + remote_file_systems (list[FixedReference], optional): + A list of remote_file_systems to query for. Overrides remote_file_system_ids and remote_file_system_names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + continuation_token (str, optional): + An opaque token to iterate over a collection of resources. + filter (Filter, optional): + A filter to include only resources that match the specified criteria. + limit (int, optional): + Limit the number of resources in the response. If not specified, defaults to + 1000. + local_file_system_ids (list[str], optional): + A list of local file system IDs. If after filtering, there is not at least one + resource that matches each of the elements, then an error is returned. This + cannot be provided together with the `local_file_system_names` query parameter. + local_file_system_names (list[str], optional): + A list of local file system names. If there is not at least one resource that + matches each of the elements, then an error is returned. This cannot be provided + together with `local_file_system_ids` query parameter. + member_ids (list[str], optional): + A list of member IDs. If after filtering, there is not at least one resource + that matches each of the elements of `member_ids`, then an error is returned. + This cannot be provided together with the `member_names` query parameter. + offset (int, optional): + The offset of the first resource to return from a collection. + policy_ids (list[str], optional): + A list of policy IDs. If after filtering, there is not at least one resource + that matches each of the elements of `policy_ids`, then an error is returned. + This cannot be provided together with the `policy_names` query parameter. + policy_names (list[str], optional): + A list of policy names. + remote_ids (list[str], optional): + A list of remote array IDs. If after filtering, there is not at least one + resource that matches each of the elements, then an error is returned. This + cannot be provided together with the `remote_names` query parameter. + remote_file_system_ids (list[str], optional): + A list of remote file system IDs. If there is not at least one resource that + matches each of the elements, then an error is returned. This cannot be provided + together with the `remote_file_system_names` query parameter. + remote_file_system_names (list[str], optional): + A list of remote file system names. If there is not at least one resource that + matches each of the elements, then an error is returned. This cannot be provided + together with the `remote_file_system_ids` query parameter. + remote_names (list[str], optional): + A list of remote array names. If there is not at least one resource that matches + each of the elements, then an error is returned. This cannot be provided + together with `remote_ids` query parameter. + sort (list[Property], optional): + Sort the response by the specified Properties. Can also be a single element. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + continuation_token=continuation_token, + filter=filter, + limit=limit, + local_file_system_ids=local_file_system_ids, + local_file_system_names=local_file_system_names, + member_ids=member_ids, + offset=offset, + policy_ids=policy_ids, + policy_names=policy_names, + remote_ids=remote_ids, + remote_file_system_ids=remote_file_system_ids, + remote_file_system_names=remote_file_system_names, + remote_names=remote_names, + sort=sort, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._file_system_replica_links_api.api214_file_system_replica_links_policies_get_with_http_info + _process_references(local_file_systems, ['local_file_system_ids', 'local_file_system_names'], kwargs) + _process_references(members, ['member_ids'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _process_references(remotes, ['remote_ids', 'remote_names'], kwargs) + _process_references(remote_file_systems, ['remote_file_system_ids', 'remote_file_system_names'], kwargs) + return self._call_api(endpoint, kwargs) + + def post_file_system_replica_links_policies( + self, + local_file_systems=None, # type: List[models.ReferenceType] + members=None, # type: List[models.ReferenceType] + policies=None, # type: List[models.ReferenceType] + remotes=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + local_file_system_ids=None, # type: List[str] + local_file_system_names=None, # type: List[str] + member_ids=None, # type: List[str] + policy_ids=None, # type: List[str] + policy_names=None, # type: List[str] + remote_ids=None, # type: List[str] + remote_names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.PolicyMemberWithRemoteResponse + """ + Add a policy to a file system replication link. + + Args: + local_file_systems (list[FixedReference], optional): + A list of local_file_systems to query for. Overrides local_file_system_ids and local_file_system_names keyword arguments. + members (list[FixedReference], optional): + A list of members to query for. Overrides member_ids keyword arguments. + policies (list[FixedReference], optional): + A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + remotes (list[FixedReference], optional): + A list of remotes to query for. Overrides remote_ids and remote_names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + local_file_system_ids (list[str], optional): + A list of local file system IDs. If after filtering, there is not at least one + resource that matches each of the elements, then an error is returned. This + cannot be provided together with the `local_file_system_names` query parameter. + local_file_system_names (list[str], optional): + A list of local file system names. If there is not at least one resource that + matches each of the elements, then an error is returned. This cannot be provided + together with `local_file_system_ids` query parameter. + member_ids (list[str], optional): + A list of member IDs. If after filtering, there is not at least one resource + that matches each of the elements of `member_ids`, then an error is returned. + This cannot be provided together with the `member_names` query parameter. + policy_ids (list[str], optional): + A list of policy IDs. If after filtering, there is not at least one resource + that matches each of the elements of `policy_ids`, then an error is returned. + This cannot be provided together with the `policy_names` query parameter. + policy_names (list[str], optional): + A list of policy names. + remote_ids (list[str], optional): + A list of remote array IDs. If after filtering, there is not at least one + resource that matches each of the elements, then an error is returned. This + cannot be provided together with the `remote_names` query parameter. + remote_names (list[str], optional): + A list of remote array names. If there is not at least one resource that matches + each of the elements, then an error is returned. This cannot be provided + together with `remote_ids` query parameter. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + local_file_system_ids=local_file_system_ids, + local_file_system_names=local_file_system_names, + member_ids=member_ids, + policy_ids=policy_ids, + policy_names=policy_names, + remote_ids=remote_ids, + remote_names=remote_names, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._file_system_replica_links_api.api214_file_system_replica_links_policies_post_with_http_info + _process_references(local_file_systems, ['local_file_system_ids', 'local_file_system_names'], kwargs) + _process_references(members, ['member_ids'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _process_references(remotes, ['remote_ids', 'remote_names'], kwargs) + return self._call_api(endpoint, kwargs) + + def post_file_system_replica_links( + self, + references=None, # type: List[models.ReferenceType] + local_file_systems=None, # type: List[models.ReferenceType] + remote_file_systems=None, # type: List[models.ReferenceType] + remotes=None, # type: List[models.ReferenceType] + file_system_replica_link=None, # type: models.FileSystemReplicaLink + x_request_id=None, # type: str + ids=None, # type: List[str] + local_file_system_ids=None, # type: List[str] + local_file_system_names=None, # type: List[str] + remote_file_system_names=None, # type: List[str] + remote_ids=None, # type: List[str] + remote_names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.FileSystemReplicaLinkResponse + """ + Create a file system replication link. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides ids keyword arguments. + local_file_systems (list[FixedReference], optional): + A list of local_file_systems to query for. Overrides local_file_system_ids and local_file_system_names keyword arguments. + remote_file_systems (list[FixedReference], optional): + A list of remote_file_systems to query for. Overrides remote_file_system_names keyword arguments. + remotes (list[FixedReference], optional): + A list of remotes to query for. Overrides remote_ids and remote_names keyword arguments. + + file_system_replica_link (FileSystemReplicaLink, required): + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + ids (list[str], optional): + A list of resource IDs. If after filtering, there is not at least one resource + that matches each of the elements of `ids`, then an error is returned. This + cannot be provided together with the `name` or `names` query parameters. + local_file_system_ids (list[str], optional): + A list of local file system IDs. If after filtering, there is not at least one + resource that matches each of the elements, then an error is returned. This + cannot be provided together with the `local_file_system_names` query parameter. + local_file_system_names (list[str], optional): + A list of local file system names. If there is not at least one resource that + matches each of the elements, then an error is returned. This cannot be provided + together with `local_file_system_ids` query parameter. + remote_file_system_names (list[str], optional): + A list of remote file system names. If there is not at least one resource that + matches each of the elements, then an error is returned. This cannot be provided + together with the `remote_file_system_ids` query parameter. + remote_ids (list[str], optional): + A list of remote array IDs. If after filtering, there is not at least one + resource that matches each of the elements, then an error is returned. This + cannot be provided together with the `remote_names` query parameter. + remote_names (list[str], optional): + A list of remote array names. If there is not at least one resource that matches + each of the elements, then an error is returned. This cannot be provided + together with `remote_ids` query parameter. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + file_system_replica_link=file_system_replica_link, + x_request_id=x_request_id, + ids=ids, + local_file_system_ids=local_file_system_ids, + local_file_system_names=local_file_system_names, + remote_file_system_names=remote_file_system_names, + remote_ids=remote_ids, + remote_names=remote_names, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._file_system_replica_links_api.api214_file_system_replica_links_post_with_http_info + _process_references(references, ['ids'], kwargs) + _process_references(local_file_systems, ['local_file_system_ids', 'local_file_system_names'], kwargs) + _process_references(remote_file_systems, ['remote_file_system_names'], kwargs) + _process_references(remotes, ['remote_ids', 'remote_names'], kwargs) + return self._call_api(endpoint, kwargs) + + def get_file_system_replica_links_transfer( + self, + references=None, # type: List[models.ReferenceType] + names_or_owners=None, # type: List[models.ReferenceType] + remotes=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + continuation_token=None, # type: str + filter=None, # type: str + ids=None, # type: List[str] + limit=None, # type: int + names_or_owner_names=None, # type: List[str] + offset=None, # type: int + remote_ids=None, # type: List[str] + remote_names=None, # type: List[str] + sort=None, # type: List[str] + total_only=None, # type: bool + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.FileSystemSnapshotGetTransferResponse + """ + List the transfer status details for file system replication. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides ids keyword arguments. + names_or_owners (list[FixedReference], optional): + A list of names_or_owners to query for. Overrides names_or_owner_names keyword arguments. + remotes (list[FixedReference], optional): + A list of remotes to query for. Overrides remote_ids and remote_names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + continuation_token (str, optional): + An opaque token to iterate over a collection of resources. + filter (Filter, optional): + A filter to include only resources that match the specified criteria. + ids (list[str], optional): + A list of resource IDs. If after filtering, there is not at least one resource + that matches each of the elements of `ids`, then an error is returned. This + cannot be provided together with the `name` or `names` query parameters. + limit (int, optional): + Limit the number of resources in the response. If not specified, defaults to + 1000. + names_or_owner_names (list[str], optional): + A list of resource names. Either the names of the snapshots or the owning file + systems. + offset (int, optional): + The offset of the first resource to return from a collection. + remote_ids (list[str], optional): + A list of remote array IDs. If after filtering, there is not at least one + resource that matches each of the elements, then an error is returned. This + cannot be provided together with the `remote_names` query parameter. + remote_names (list[str], optional): + A list of remote array names. If there is not at least one resource that matches + each of the elements, then an error is returned. This cannot be provided + together with `remote_ids` query parameter. + sort (list[Property], optional): + Sort the response by the specified Properties. Can also be a single element. + total_only (bool, optional): + Only return the total record for the specified items. The total record will be + the total of all items after filtering. The `items` list will be empty. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + continuation_token=continuation_token, + filter=filter, + ids=ids, + limit=limit, + names_or_owner_names=names_or_owner_names, + offset=offset, + remote_ids=remote_ids, + remote_names=remote_names, + sort=sort, + total_only=total_only, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._file_system_replica_links_api.api214_file_system_replica_links_transfer_get_with_http_info + _process_references(references, ['ids'], kwargs) + _process_references(names_or_owners, ['names_or_owner_names'], kwargs) + _process_references(remotes, ['remote_ids', 'remote_names'], kwargs) + return self._call_api(endpoint, kwargs) + + def delete_file_system_snapshots( + self, + references=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + ids=None, # type: List[str] + names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> None + """ + Delete a file system snapshot. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides ids and names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + ids (list[str], optional): + A list of resource IDs. If after filtering, there is not at least one resource + that matches each of the elements of `ids`, then an error is returned. This + cannot be provided together with the `name` or `names` query parameters. + names (list[str], optional): + A list of resource names. If there is not at least one resource that matches + each of the elements of `names`, then an error is returned. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + ids=ids, + names=names, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._file_system_snapshots_api.api214_file_system_snapshots_delete_with_http_info + _process_references(references, ['ids', 'names'], kwargs) + return self._call_api(endpoint, kwargs) + + def get_file_system_snapshots( + self, + references=None, # type: List[models.ReferenceType] + names_or_owners=None, # type: List[models.ReferenceType] + owners=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + continuation_token=None, # type: str + destroyed=None, # type: bool + filter=None, # type: str + ids=None, # type: List[str] + limit=None, # type: int + names_or_owner_names=None, # type: List[str] + offset=None, # type: int + owner_ids=None, # type: List[str] + sort=None, # type: List[str] + total_only=None, # type: bool + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.FileSystemSnapshotGetResponse + """ + List file system snapshots. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides ids keyword arguments. + names_or_owners (list[FixedReference], optional): + A list of names_or_owners to query for. Overrides names_or_owner_names keyword arguments. + owners (list[FixedReference], optional): + A list of owners to query for. Overrides owner_ids keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + continuation_token (str, optional): + An opaque token to iterate over a collection of resources. + destroyed (bool, optional): + If set to `true`, lists only destroyed objects that are in the eradication + pending state. If set to `false`, lists only objects that are not destroyed. If + not set, lists both objects that are destroyed and those that are not destroyed. + If object name(s) are specified in the `names` parameter, then each object + referenced must exist. If `destroyed` is set to `true`, then each object + referenced must also be destroyed. If `destroyed` is set to `false`, then each + object referenced must also not be destroyed. An error is returned if any of + these conditions are not met. + filter (Filter, optional): + A filter to include only resources that match the specified criteria. + ids (list[str], optional): + A list of resource IDs. If after filtering, there is not at least one resource + that matches each of the elements of `ids`, then an error is returned. This + cannot be provided together with the `name` or `names` query parameters. + limit (int, optional): + Limit the number of resources in the response. If not specified, defaults to + 1000. + names_or_owner_names (list[str], optional): + A list of resource names. Either the names of the snapshots or the owning file + systems. + offset (int, optional): + The offset of the first resource to return from a collection. + owner_ids (list[str], optional): + A list of owning file system IDs. If after filtering, there is not at least one + resource that matches each of the elements of owner IDs, then an error is + returned. This cannot be provided together with the `ids`, + `names_or_owner_names`, or `names_or_sources` query parameters. + sort (list[Property], optional): + Sort the response by the specified Properties. Can also be a single element. + total_only (bool, optional): + Only return the total record for the specified items. The total record will be + the total of all items after filtering. The `items` list will be empty. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + continuation_token=continuation_token, + destroyed=destroyed, + filter=filter, + ids=ids, + limit=limit, + names_or_owner_names=names_or_owner_names, + offset=offset, + owner_ids=owner_ids, + sort=sort, + total_only=total_only, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._file_system_snapshots_api.api214_file_system_snapshots_get_with_http_info + _process_references(references, ['ids'], kwargs) + _process_references(names_or_owners, ['names_or_owner_names'], kwargs) + _process_references(owners, ['owner_ids'], kwargs) + return self._call_api(endpoint, kwargs) + + def patch_file_system_snapshots( + self, + references=None, # type: List[models.ReferenceType] + file_system_snapshot=None, # type: models.FileSystemSnapshot + x_request_id=None, # type: str + ids=None, # type: List[str] + latest_replica=None, # type: bool + names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.FileSystemSnapshotResponse + """ + Modify file system snapshot attributes. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides ids and names keyword arguments. + + file_system_snapshot (FileSystemSnapshot, required): + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + ids (list[str], optional): + A list of resource IDs. If after filtering, there is not at least one resource + that matches each of the elements of `ids`, then an error is returned. This + cannot be provided together with the `name` or `names` query parameters. + latest_replica (bool, optional): + Used when destroying a snapshot. If not present or `false`, and the snapshot is + the latest replicated snapshot, then destroy will fail. If `true` or the + snapshot is not the latest replicated snapshot, then destroy will be successful. + names (list[str], optional): + A list of resource names. If there is not at least one resource that matches + each of the elements of `names`, then an error is returned. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + file_system_snapshot=file_system_snapshot, + x_request_id=x_request_id, + ids=ids, + latest_replica=latest_replica, + names=names, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._file_system_snapshots_api.api214_file_system_snapshots_patch_with_http_info + _process_references(references, ['ids', 'names'], kwargs) + return self._call_api(endpoint, kwargs) + + def delete_file_system_snapshots_policies( + self, + members=None, # type: List[models.ReferenceType] + policies=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + member_ids=None, # type: List[str] + member_names=None, # type: List[str] + policy_ids=None, # type: List[str] + policy_names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> None + """ + Remove snapshot scheduling policies from a file system. + + Args: + members (list[FixedReference], optional): + A list of members to query for. Overrides member_ids and member_names keyword arguments. + policies (list[FixedReference], optional): + A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + member_ids (list[str], optional): + A list of member IDs. If after filtering, there is not at least one resource + that matches each of the elements of `member_ids`, then an error is returned. + This cannot be provided together with the `member_names` query parameter. + member_names (list[str], optional): + A list of member names. + policy_ids (list[str], optional): + A list of policy IDs. If after filtering, there is not at least one resource + that matches each of the elements of `policy_ids`, then an error is returned. + This cannot be provided together with the `policy_names` query parameter. + policy_names (list[str], optional): + A list of policy names. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + member_ids=member_ids, + member_names=member_names, + policy_ids=policy_ids, + policy_names=policy_names, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._file_system_snapshots_api.api214_file_system_snapshots_policies_delete_with_http_info + _process_references(members, ['member_ids', 'member_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + return self._call_api(endpoint, kwargs) + + def get_file_system_snapshots_policies( + self, + members=None, # type: List[models.ReferenceType] + policies=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + continuation_token=None, # type: str + filter=None, # type: str + limit=None, # type: int + member_ids=None, # type: List[str] + member_names=None, # type: List[str] + offset=None, # type: int + policy_ids=None, # type: List[str] + policy_names=None, # type: List[str] + sort=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.PolicyFileSystemSnapshotGetResponse + """ + List file system snapshots mapped to snapshot scheduling policies. + + Args: + members (list[FixedReference], optional): + A list of members to query for. Overrides member_ids and member_names keyword arguments. + policies (list[FixedReference], optional): + A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + continuation_token (str, optional): + An opaque token to iterate over a collection of resources. + filter (Filter, optional): + A filter to include only resources that match the specified criteria. + limit (int, optional): + Limit the number of resources in the response. If not specified, defaults to + 1000. + member_ids (list[str], optional): + A list of member IDs. If after filtering, there is not at least one resource + that matches each of the elements of `member_ids`, then an error is returned. + This cannot be provided together with the `member_names` query parameter. + member_names (list[str], optional): + A list of member names. + offset (int, optional): + The offset of the first resource to return from a collection. + policy_ids (list[str], optional): + A list of policy IDs. If after filtering, there is not at least one resource + that matches each of the elements of `policy_ids`, then an error is returned. + This cannot be provided together with the `policy_names` query parameter. + policy_names (list[str], optional): + A list of policy names. + sort (list[Property], optional): + Sort the response by the specified Properties. Can also be a single element. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + continuation_token=continuation_token, + filter=filter, + limit=limit, + member_ids=member_ids, + member_names=member_names, + offset=offset, + policy_ids=policy_ids, + policy_names=policy_names, + sort=sort, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._file_system_snapshots_api.api214_file_system_snapshots_policies_get_with_http_info + _process_references(members, ['member_ids', 'member_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + return self._call_api(endpoint, kwargs) + + def post_file_system_snapshots( + self, + sources=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + source_ids=None, # type: List[str] + source_names=None, # type: List[str] + send=None, # type: bool + targets=None, # type: List[str] + file_system_snapshot=None, # type: models.FileSystemSnapshotPost + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.FileSystemSnapshotResponse + """ + Create a snapshot for a specified source file system. If a source file system is + not specified, creates snapshots for all file systems on the array. + + Args: + sources (list[FixedReference], optional): + A list of sources to query for. Overrides source_ids and source_names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + source_ids (list[str], optional): + A list of source file system IDs. If after filtering, there is not at least one + resource that matches each of the elements of `source_ids`, then an error is + returned. This cannot be provided together with the `names_or_sources` or + `sources` query parameters. + source_names (list[str], optional): + A list of names for the source of the object. If there is not at least one + resource that matches each of the elements of `source_names`, an error is + returned. + send (bool, optional): + Whether to replicate created snapshots immediately to other arrays. If it's + `false`, created snapshots may still be replicated to other arrays according to + policy. + targets (list[str], optional): + The target arrays to replicate created snapshots to. Only valid when `send` is + `true`. + file_system_snapshot (FileSystemSnapshotPost, optional): + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + source_ids=source_ids, + source_names=source_names, + send=send, + targets=targets, + file_system_snapshot=file_system_snapshot, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._file_system_snapshots_api.api214_file_system_snapshots_post_with_http_info + _process_references(sources, ['source_ids', 'source_names'], kwargs) + return self._call_api(endpoint, kwargs) + + def delete_file_system_snapshots_transfer( + self, + references=None, # type: List[models.ReferenceType] + remotes=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + ids=None, # type: List[str] + names=None, # type: List[str] + remote_names=None, # type: List[str] + remote_ids=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> None + """ + Delete file system snapshot transfers from the source array to the target array. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides ids and names keyword arguments. + remotes (list[FixedReference], optional): + A list of remotes to query for. Overrides remote_names and remote_ids keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + ids (list[str], optional): + A list of resource IDs. If after filtering, there is not at least one resource + that matches each of the elements of `ids`, then an error is returned. This + cannot be provided together with the `name` or `names` query parameters. + names (list[str], optional): + A list of resource names. If there is not at least one resource that matches + each of the elements of `names`, then an error is returned. + remote_names (list[str], optional): + A list of remote array names. If there is not at least one resource that matches + each of the elements, then an error is returned. This cannot be provided + together with `remote_ids` query parameter. + remote_ids (list[str], optional): + A list of remote array IDs. If after filtering, there is not at least one + resource that matches each of the elements, then an error is returned. This + cannot be provided together with the `remote_names` query parameter. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + ids=ids, + names=names, + remote_names=remote_names, + remote_ids=remote_ids, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._file_system_snapshots_api.api214_file_system_snapshots_transfer_delete_with_http_info + _process_references(references, ['ids', 'names'], kwargs) + _process_references(remotes, ['remote_names', 'remote_ids'], kwargs) + return self._call_api(endpoint, kwargs) + + def get_file_system_snapshots_transfer( + self, + references=None, # type: List[models.ReferenceType] + names_or_owners=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + continuation_token=None, # type: str + filter=None, # type: str + ids=None, # type: List[str] + limit=None, # type: int + names_or_owner_names=None, # type: List[str] + offset=None, # type: int + sort=None, # type: List[str] + total_only=None, # type: bool + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.FileSystemSnapshotGetTransferResponse + """ + List file system snapshot transfers from the source array to the target array. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides ids keyword arguments. + names_or_owners (list[FixedReference], optional): + A list of names_or_owners to query for. Overrides names_or_owner_names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + continuation_token (str, optional): + An opaque token to iterate over a collection of resources. + filter (Filter, optional): + A filter to include only resources that match the specified criteria. + ids (list[str], optional): + A list of resource IDs. If after filtering, there is not at least one resource + that matches each of the elements of `ids`, then an error is returned. This + cannot be provided together with the `name` or `names` query parameters. + limit (int, optional): + Limit the number of resources in the response. If not specified, defaults to + 1000. + names_or_owner_names (list[str], optional): + A list of resource names. Either the names of the snapshots or the owning file + systems. + offset (int, optional): + The offset of the first resource to return from a collection. + sort (list[Property], optional): + Sort the response by the specified Properties. Can also be a single element. + total_only (bool, optional): + Only return the total record for the specified items. The total record will be + the total of all items after filtering. The `items` list will be empty. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + continuation_token=continuation_token, + filter=filter, + ids=ids, + limit=limit, + names_or_owner_names=names_or_owner_names, + offset=offset, + sort=sort, + total_only=total_only, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._file_system_snapshots_api.api214_file_system_snapshots_transfer_get_with_http_info + _process_references(references, ['ids'], kwargs) + _process_references(names_or_owners, ['names_or_owner_names'], kwargs) + return self._call_api(endpoint, kwargs) + + def delete_file_systems_audit_policies( + self, + members=None, # type: List[models.ReferenceType] + policies=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + member_ids=None, # type: List[str] + member_names=None, # type: List[str] + policy_ids=None, # type: List[str] + policy_names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> None + """ + Remove the audit policy mapped to a file system. + + Args: + members (list[FixedReference], optional): + A list of members to query for. Overrides member_ids and member_names keyword arguments. + policies (list[FixedReference], optional): + A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + member_ids (list[str], optional): + A list of member IDs. If after filtering, there is not at least one resource + that matches each of the elements of `member_ids`, then an error is returned. + This cannot be provided together with the `member_names` query parameter. + member_names (list[str], optional): + A list of member names. + policy_ids (list[str], optional): + A list of policy IDs. If after filtering, there is not at least one resource + that matches each of the elements of `policy_ids`, then an error is returned. + This cannot be provided together with the `policy_names` query parameter. + policy_names (list[str], optional): + A list of policy names. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + member_ids=member_ids, + member_names=member_names, + policy_ids=policy_ids, + policy_names=policy_names, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._file_systems_api.api214_file_systems_audit_policies_delete_with_http_info + _process_references(members, ['member_ids', 'member_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + return self._call_api(endpoint, kwargs) + + def get_file_systems_audit_policies( + self, + members=None, # type: List[models.ReferenceType] + policies=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + continuation_token=None, # type: str + filter=None, # type: str + limit=None, # type: int + member_ids=None, # type: List[str] + member_names=None, # type: List[str] + offset=None, # type: int + policy_ids=None, # type: List[str] + policy_names=None, # type: List[str] + sort=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.AuditFileSystemsPoliciesMembersGetResponse + """ + List file systems mapped to a audit policy. + + Args: + members (list[FixedReference], optional): + A list of members to query for. Overrides member_ids and member_names keyword arguments. + policies (list[FixedReference], optional): + A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + continuation_token (str, optional): + An opaque token to iterate over a collection of resources. + filter (Filter, optional): + A filter to include only resources that match the specified criteria. + limit (int, optional): + Limit the number of resources in the response. If not specified, defaults to + 1000. + member_ids (list[str], optional): + A list of member IDs. If after filtering, there is not at least one resource + that matches each of the elements of `member_ids`, then an error is returned. + This cannot be provided together with the `member_names` query parameter. + member_names (list[str], optional): + A list of member names. + offset (int, optional): + The offset of the first resource to return from a collection. + policy_ids (list[str], optional): + A list of policy IDs. If after filtering, there is not at least one resource + that matches each of the elements of `policy_ids`, then an error is returned. + This cannot be provided together with the `policy_names` query parameter. + policy_names (list[str], optional): + A list of policy names. + sort (list[Property], optional): + Sort the response by the specified Properties. Can also be a single element. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + continuation_token=continuation_token, + filter=filter, + limit=limit, + member_ids=member_ids, + member_names=member_names, + offset=offset, + policy_ids=policy_ids, + policy_names=policy_names, + sort=sort, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._file_systems_api.api214_file_systems_audit_policies_get_with_http_info + _process_references(members, ['member_ids', 'member_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + return self._call_api(endpoint, kwargs) + + def post_file_systems_audit_policies( + self, + members=None, # type: List[models.ReferenceType] + policies=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + member_ids=None, # type: List[str] + member_names=None, # type: List[str] + policy_ids=None, # type: List[str] + policy_names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.AuditFileSystemsPoliciesMembersResponse + """ + Map a audit policy to a file system. + + Args: + members (list[FixedReference], optional): + A list of members to query for. Overrides member_ids and member_names keyword arguments. + policies (list[FixedReference], optional): + A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + member_ids (list[str], optional): + A list of member IDs. If after filtering, there is not at least one resource + that matches each of the elements of `member_ids`, then an error is returned. + This cannot be provided together with the `member_names` query parameter. + member_names (list[str], optional): + A list of member names. + policy_ids (list[str], optional): + A list of policy IDs. If after filtering, there is not at least one resource + that matches each of the elements of `policy_ids`, then an error is returned. + This cannot be provided together with the `policy_names` query parameter. + policy_names (list[str], optional): + A list of policy names. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + member_ids=member_ids, + member_names=member_names, + policy_ids=policy_ids, + policy_names=policy_names, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._file_systems_api.api214_file_systems_audit_policies_post_with_http_info + _process_references(members, ['member_ids', 'member_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + return self._call_api(endpoint, kwargs) + + def delete_file_systems( + self, + references=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + ids=None, # type: List[str] + names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> None + """ + Deletes a file system. Deleting a file system is equivalent to eradication. A + file system's `destroyed` parameter must be set to `true` before a file system + can be deleted. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides ids and names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + ids (list[str], optional): + A list of resource IDs. If after filtering, there is not at least one resource + that matches each of the elements of `ids`, then an error is returned. This + cannot be provided together with the `name` or `names` query parameters. + names (list[str], optional): + A list of resource names. If there is not at least one resource that matches + each of the elements of `names`, then an error is returned. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + ids=ids, + names=names, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._file_systems_api.api214_file_systems_delete_with_http_info + _process_references(references, ['ids', 'names'], kwargs) + return self._call_api(endpoint, kwargs) + + def get_file_systems( + self, + references=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + continuation_token=None, # type: str + destroyed=None, # type: bool + filter=None, # type: str + ids=None, # type: List[str] + limit=None, # type: int + names=None, # type: List[str] + offset=None, # type: int + sort=None, # type: List[str] + total_only=None, # type: bool + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.FileSystemGetResponse + """ + List one or more file systems on the array. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides ids and names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + continuation_token (str, optional): + An opaque token to iterate over a collection of resources. + destroyed (bool, optional): + If set to `true`, lists only destroyed objects that are in the eradication + pending state. If set to `false`, lists only objects that are not destroyed. If + not set, lists both objects that are destroyed and those that are not destroyed. + If object name(s) are specified in the `names` parameter, then each object + referenced must exist. If `destroyed` is set to `true`, then each object + referenced must also be destroyed. If `destroyed` is set to `false`, then each + object referenced must also not be destroyed. An error is returned if any of + these conditions are not met. + filter (Filter, optional): + A filter to include only resources that match the specified criteria. + ids (list[str], optional): + A list of resource IDs. If after filtering, there is not at least one resource + that matches each of the elements of `ids`, then an error is returned. This + cannot be provided together with the `name` or `names` query parameters. + limit (int, optional): + Limit the number of resources in the response. If not specified, defaults to + 1000. + names (list[str], optional): + A list of resource names. If there is not at least one resource that matches + each of the elements of `names`, then an error is returned. + offset (int, optional): + The offset of the first resource to return from a collection. + sort (list[Property], optional): + Sort the response by the specified Properties. Can also be a single element. + total_only (bool, optional): + Only return the total record for the specified items. The total record will be + the total of all items after filtering. The `items` list will be empty. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + continuation_token=continuation_token, + destroyed=destroyed, + filter=filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + sort=sort, + total_only=total_only, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._file_systems_api.api214_file_systems_get_with_http_info + _process_references(references, ['ids', 'names'], kwargs) + return self._call_api(endpoint, kwargs) + + def get_file_systems_groups_performance( + self, + file_systems=None, # type: List[models.ReferenceType] + groups=None, # type: List[models.ReferenceType] + references=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + file_system_ids=None, # type: List[str] + file_system_names=None, # type: List[str] + filter=None, # type: str + gids=None, # type: List[str] + group_names=None, # type: List[str] + limit=None, # type: int + names=None, # type: List[str] + sort=None, # type: List[str] + total_only=None, # type: bool + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.FileSystemGroupsPerformanceGetResponse + """ + List a group’s I/O performance metrics on a file system. + + Args: + file_systems (list[FixedReference], optional): + A list of file_systems to query for. Overrides file_system_ids and file_system_names keyword arguments. + groups (list[FixedReference], optional): + A list of groups to query for. Overrides group_names keyword arguments. + references (list[FixedReference], optional): + A list of references to query for. Overrides names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + file_system_ids (list[str], optional): + A list of file system IDs. If after filtering, there is not at least one + resource that matches each of the elements of `file_system_ids`, then an error + is returned. This cannot be provided together with the `file_system_names` query + parameter. + file_system_names (list[str], optional): + A list of file system names. If there is not at least one resource that matches + each of the elements of `file_system_names`, then an error is returned. + filter (Filter, optional): + A filter to include only resources that match the specified criteria. + gids (list[str], optional): + A list of group IDs. This cannot be provided together with `group_names` query + parameter. + group_names (list[str], optional): + A list of group names. This cannot be provided together with `gids` query + parameter. + limit (int, optional): + Limit the number of resources in the response. If not specified, defaults to + 1000. + names (list[str], optional): + A list of resource names. If there is not at least one resource that matches + each of the elements of `names`, then an error is returned. + sort (list[Property], optional): + Sort the response by the specified Properties. Can also be a single element. + total_only (bool, optional): + Only return the total record for the specified items. The total record will be + the total of all items after filtering. The `items` list will be empty. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + file_system_ids=file_system_ids, + file_system_names=file_system_names, + filter=filter, + gids=gids, + group_names=group_names, + limit=limit, + names=names, + sort=sort, + total_only=total_only, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._file_systems_api.api214_file_systems_groups_performance_get_with_http_info + _process_references(file_systems, ['file_system_ids', 'file_system_names'], kwargs) + _process_references(groups, ['group_names'], kwargs) + _process_references(references, ['names'], kwargs) + return self._call_api(endpoint, kwargs) + + def get_file_systems_locks_clients( + self, + x_request_id=None, # type: str + continuation_token=None, # type: str + filter=None, # type: str + limit=None, # type: int + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.FileSystemClientsGetResponse + """ + Lists all clients that hold active file locks. + + Args: + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + continuation_token (str, optional): + An opaque token to iterate over a collection of resources. + filter (Filter, optional): + A filter to include only resources that match the specified criteria. + limit (int, optional): + Limit the number of resources in the response. If not specified, defaults to + 1000. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + continuation_token=continuation_token, + filter=filter, + limit=limit, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._file_systems_api.api214_file_systems_locks_clients_get_with_http_info + return self._call_api(endpoint, kwargs) + + def delete_file_systems_locks( + self, + clients=None, # type: List[models.ReferenceType] + file_systems=None, # type: List[models.ReferenceType] + references=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + client_names=None, # type: List[str] + file_system_ids=None, # type: List[str] + file_system_names=None, # type: List[str] + inodes=None, # type: List[float] + names=None, # type: List[str] + paths=None, # type: List[str] + recursive=None, # type: bool + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> None + """ + Invalidates file locks. It can be used to either delete an individual lock by + name or multiple locks filtered by parameters. E.g. to delete locks held by a + client on specific file, parameters `client_names`, `file_system_ids` or + `file_system_names` and `path` must be specified. When `names` is specified, no + other query parameter can be specified. + + Args: + clients (list[FixedReference], optional): + A list of clients to query for. Overrides client_names keyword arguments. + file_systems (list[FixedReference], optional): + A list of file_systems to query for. Overrides file_system_ids and file_system_names keyword arguments. + references (list[FixedReference], optional): + A list of references to query for. Overrides names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + client_names (list[str], optional): + A list of ip addresses of clients. For IPv6 both the extended format + (x:x:x:x:x:x:x:x) and the shortened format are supported. + file_system_ids (list[str], optional): + A list of file system IDs. If after filtering, there is not at least one + resource that matches each of the elements of `file_system_ids`, then an error + is returned. This cannot be provided together with the `file_system_names` query + parameter. + file_system_names (list[str], optional): + A list of file system names. If there is not at least one resource that matches + each of the elements of `file_system_names`, then an error is returned. + inodes (list[float], optional): + A list of inodes used for filtering file locks query by inodes. This may only be + specified if `file_system_ids` or `file_system_names` is also specified. This + cannot be provided together with the `paths` query parameter. + names (list[str], optional): + A list of resource names. If there is not at least one resource that matches + each of the elements of `names`, then an error is returned. + paths (list[str], optional): + A list of paths used for filtering file locks query by paths. This may only be + specified if `file_system_ids` or `file_system_names` is also specified. This + cannot be provided together with the `inodes` query parameter. + recursive (bool, optional): + Flag used to indicate that the action should be done recursively. If set to + `true` and used e.g. with `path` pointing to a directory, the operation will + delete all locks in given directory and subdirectories recursively. For more + fine grained control over deleted locks, use delete by name. If not specified, + defaults to `false`. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + client_names=client_names, + file_system_ids=file_system_ids, + file_system_names=file_system_names, + inodes=inodes, + names=names, + paths=paths, + recursive=recursive, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._file_systems_api.api214_file_systems_locks_delete_with_http_info + _process_references(clients, ['client_names'], kwargs) + _process_references(file_systems, ['file_system_ids', 'file_system_names'], kwargs) + _process_references(references, ['names'], kwargs) + return self._call_api(endpoint, kwargs) + + def get_file_systems_locks( + self, + clients=None, # type: List[models.ReferenceType] + file_systems=None, # type: List[models.ReferenceType] + references=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + continuation_token=None, # type: str + client_names=None, # type: List[str] + file_system_ids=None, # type: List[str] + file_system_names=None, # type: List[str] + filter=None, # type: str + inodes=None, # type: List[float] + limit=None, # type: int + names=None, # type: List[str] + paths=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.FileLockGetResponse + """ + Lists all active file locks that satisfy the conditions specified by the + parameters. + + Args: + clients (list[FixedReference], optional): + A list of clients to query for. Overrides client_names keyword arguments. + file_systems (list[FixedReference], optional): + A list of file_systems to query for. Overrides file_system_ids and file_system_names keyword arguments. + references (list[FixedReference], optional): + A list of references to query for. Overrides names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + continuation_token (str, optional): + An opaque token to iterate over a collection of resources. + client_names (list[str], optional): + A list of ip addresses of clients. For IPv6 both the extended format + (x:x:x:x:x:x:x:x) and the shortened format are supported. + file_system_ids (list[str], optional): + A list of file system IDs. If after filtering, there is not at least one + resource that matches each of the elements of `file_system_ids`, then an error + is returned. This cannot be provided together with the `file_system_names` query + parameter. + file_system_names (list[str], optional): + A list of file system names. If there is not at least one resource that matches + each of the elements of `file_system_names`, then an error is returned. + filter (Filter, optional): + A filter to include only resources that match the specified criteria. + inodes (list[float], optional): + A list of inodes used for filtering file locks query by inodes. This may only be + specified if `file_system_ids` or `file_system_names` is also specified. This + cannot be provided together with the `paths` query parameter. + limit (int, optional): + Limit the number of resources in the response. If not specified, defaults to + 1000. + names (list[str], optional): + A list of resource names. If there is not at least one resource that matches + each of the elements of `names`, then an error is returned. + paths (list[str], optional): + A list of paths used for filtering file locks query by paths. This may only be + specified if `file_system_ids` or `file_system_names` is also specified. This + cannot be provided together with the `inodes` query parameter. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + continuation_token=continuation_token, + client_names=client_names, + file_system_ids=file_system_ids, + file_system_names=file_system_names, + filter=filter, + inodes=inodes, + limit=limit, + names=names, + paths=paths, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._file_systems_api.api214_file_systems_locks_get_with_http_info + _process_references(clients, ['client_names'], kwargs) + _process_references(file_systems, ['file_system_ids', 'file_system_names'], kwargs) + _process_references(references, ['names'], kwargs) + return self._call_api(endpoint, kwargs) + + def post_file_systems_locks_nlm_reclamations( + self, + x_request_id=None, # type: str + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.FileLockNlmReclamationResponse + """ + NLM reclamation is a system-wide operation, affecting all clients, and so only + one may be in progress at a time. Attempting to initiate reclamation while one + is in progress will result in an error. When NLM reclamation is initiated, all + NLM locks are deleted and client applications are notified that they can + reacquire their locks within a grace period. + + Args: + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._file_systems_api.api214_file_systems_locks_nlm_reclamations_post_with_http_info + return self._call_api(endpoint, kwargs) + + def patch_file_systems( + self, + references=None, # type: List[models.ReferenceType] + file_system=None, # type: models.FileSystemPatch + x_request_id=None, # type: str + delete_link_on_eradication=None, # type: bool + discard_detailed_permissions=None, # type: bool + discard_non_snapshotted_data=None, # type: bool + ids=None, # type: List[str] + ignore_usage=None, # type: bool + names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.FileSystemResponse + """ + Modify a file system’s attributes including its export protocols and limits. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides ids and names keyword arguments. + + file_system (FileSystemPatch, required): + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + delete_link_on_eradication (bool, optional): + If set to `true`, the file system can be destroyed, even if it has a replica + link. If set to `false`, the file system cannot be destroyed if it has a replica + link. Defaults to `false`. + discard_detailed_permissions (bool, optional): + This parameter must be set to `true` in order to change a file system's + `access_control_style` from a style that supports more detailed access control + lists to a style that only supports less detailed mode bits as a form of + permission control. This parameter may not be set to `true` any other time. + Setting this parameter to `true` is acknowledgement that any more detailed + access control lists currently set within the file system will be lost, and NFS + permission controls will only be enforced at the granularity level of NFS mode + bits. + discard_non_snapshotted_data (bool, optional): + This parameter must be set to `true` in order to restore a file system from a + snapshot or to demote a file system (which restores the file system from the + common baseline snapshot). Setting this parameter to `true` is acknowledgement + that any non-snapshotted data currently in the file system will be irretrievably + lost. + ids (list[str], optional): + A list of resource IDs. If after filtering, there is not at least one resource + that matches each of the elements of `ids`, then an error is returned. This + cannot be provided together with the `name` or `names` query parameters. + ignore_usage (bool, optional): + Allow update operations that lead to a `hard_limit_enabled` object store + account, bucket, or file system with usage over its limiting value. For object + store accounts and buckets, the limiting value is that of `quota_limit`, and for + file systems it is that of `provisioned`. The operation can be either setting + `hard_limit_enabled` when usage is higher than the limiting value, modifying the + limiting value to a value under usage when `hard_limit_enabled` or recovering a + destroyed bucket of an object store account that cause account's space usage to + go over its hard `quota_limit`. + names (list[str], optional): + A list of resource names. If there is not at least one resource that matches + each of the elements of `names`, then an error is returned. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + file_system=file_system, + x_request_id=x_request_id, + delete_link_on_eradication=delete_link_on_eradication, + discard_detailed_permissions=discard_detailed_permissions, + discard_non_snapshotted_data=discard_non_snapshotted_data, + ids=ids, + ignore_usage=ignore_usage, + names=names, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._file_systems_api.api214_file_systems_patch_with_http_info + _process_references(references, ['ids', 'names'], kwargs) + return self._call_api(endpoint, kwargs) + + def get_file_systems_performance( + self, + references=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + continuation_token=None, # type: str + end_time=None, # type: int + filter=None, # type: str + ids=None, # type: List[str] + limit=None, # type: int + names=None, # type: List[str] + offset=None, # type: int + protocol=None, # type: str + resolution=None, # type: int + sort=None, # type: List[str] + start_time=None, # type: int + total_only=None, # type: bool + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.FileSystemPerformanceGetResponse + """ + Displays the performance metrics for a file system. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides ids and names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + continuation_token (str, optional): + An opaque token to iterate over a collection of resources. + end_time (int, optional): + When the time window ends (in milliseconds since epoch). + filter (Filter, optional): + A filter to include only resources that match the specified criteria. + ids (list[str], optional): + A list of resource IDs. If after filtering, there is not at least one resource + that matches each of the elements of `ids`, then an error is returned. This + cannot be provided together with the `name` or `names` query parameters. + limit (int, optional): + Limit the number of resources in the response. If not specified, defaults to + 1000. + names (list[str], optional): + A list of resource names. If there is not at least one resource that matches + each of the elements of `names`, then an error is returned. + offset (int, optional): + The offset of the first resource to return from a collection. + protocol (str, optional): + Display the performance of a specified protocol. Valid values are `all`, `HTTP`, + `SMB`, `NFS`, and `S3`. If not specified, defaults to `all`, which will provide + the combined performance of all available protocols. + resolution (int, optional): + The desired ms between samples. Available resolutions may depend on data type, + `start_time` and `end_time`. In general `1000`, `30000`, `300000`, `1800000`, + `7200000`, and `86400000` are possible values. + sort (list[Property], optional): + Sort the response by the specified Properties. Can also be a single element. + start_time (int, optional): + When the time window starts (in milliseconds since epoch). + total_only (bool, optional): + Only return the total record for the specified items. The total record will be + the total of all items after filtering. The `items` list will be empty. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + continuation_token=continuation_token, + end_time=end_time, + filter=filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + protocol=protocol, + resolution=resolution, + sort=sort, + start_time=start_time, + total_only=total_only, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._file_systems_api.api214_file_systems_performance_get_with_http_info + _process_references(references, ['ids', 'names'], kwargs) + return self._call_api(endpoint, kwargs) + + def get_file_systems_policies_all( + self, + members=None, # type: List[models.ReferenceType] + policies=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + continuation_token=None, # type: str + filter=None, # type: str + limit=None, # type: int + member_ids=None, # type: List[str] + member_names=None, # type: List[str] + offset=None, # type: int + policy_ids=None, # type: List[str] + policy_names=None, # type: List[str] + sort=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.PolicyMemberGetResponse + """ + List file system policies. + + Args: + members (list[FixedReference], optional): + A list of members to query for. Overrides member_ids and member_names keyword arguments. + policies (list[FixedReference], optional): + A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + continuation_token (str, optional): + An opaque token to iterate over a collection of resources. + filter (Filter, optional): + A filter to include only resources that match the specified criteria. + limit (int, optional): + Limit the number of resources in the response. If not specified, defaults to + 1000. + member_ids (list[str], optional): + A list of member IDs. If after filtering, there is not at least one resource + that matches each of the elements of `member_ids`, then an error is returned. + This cannot be provided together with the `member_names` query parameter. + member_names (list[str], optional): + A list of member names. + offset (int, optional): + The offset of the first resource to return from a collection. + policy_ids (list[str], optional): + A list of policy IDs. If after filtering, there is not at least one resource + that matches each of the elements of `policy_ids`, then an error is returned. + This cannot be provided together with the `policy_names` query parameter. + policy_names (list[str], optional): + A list of policy names. + sort (list[Property], optional): + Sort the response by the specified Properties. Can also be a single element. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + continuation_token=continuation_token, + filter=filter, + limit=limit, + member_ids=member_ids, + member_names=member_names, + offset=offset, + policy_ids=policy_ids, + policy_names=policy_names, + sort=sort, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._file_systems_api.api214_file_systems_policies_all_get_with_http_info + _process_references(members, ['member_ids', 'member_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + return self._call_api(endpoint, kwargs) + + def delete_file_systems_policies( + self, + members=None, # type: List[models.ReferenceType] + policies=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + member_ids=None, # type: List[str] + member_names=None, # type: List[str] + policy_ids=None, # type: List[str] + policy_names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> None + """ + Remove a snapshot scheduling policy from a file system. + + Args: + members (list[FixedReference], optional): + A list of members to query for. Overrides member_ids and member_names keyword arguments. + policies (list[FixedReference], optional): + A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + member_ids (list[str], optional): + A list of member IDs. If after filtering, there is not at least one resource + that matches each of the elements of `member_ids`, then an error is returned. + This cannot be provided together with the `member_names` query parameter. + member_names (list[str], optional): + A list of member names. + policy_ids (list[str], optional): + A list of policy IDs. If after filtering, there is not at least one resource + that matches each of the elements of `policy_ids`, then an error is returned. + This cannot be provided together with the `policy_names` query parameter. + policy_names (list[str], optional): + A list of policy names. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + member_ids=member_ids, + member_names=member_names, + policy_ids=policy_ids, + policy_names=policy_names, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._file_systems_api.api214_file_systems_policies_delete_with_http_info + _process_references(members, ['member_ids', 'member_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + return self._call_api(endpoint, kwargs) + + def get_file_systems_policies( + self, + members=None, # type: List[models.ReferenceType] + policies=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + continuation_token=None, # type: str + filter=None, # type: str + limit=None, # type: int + member_ids=None, # type: List[str] + member_names=None, # type: List[str] + offset=None, # type: int + policy_ids=None, # type: List[str] + policy_names=None, # type: List[str] + sort=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.PolicyMemberGetResponse + """ + List file system snapshot scheduling policies. + + Args: + members (list[FixedReference], optional): + A list of members to query for. Overrides member_ids and member_names keyword arguments. + policies (list[FixedReference], optional): + A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + continuation_token (str, optional): + An opaque token to iterate over a collection of resources. + filter (Filter, optional): + A filter to include only resources that match the specified criteria. + limit (int, optional): + Limit the number of resources in the response. If not specified, defaults to + 1000. + member_ids (list[str], optional): + A list of member IDs. If after filtering, there is not at least one resource + that matches each of the elements of `member_ids`, then an error is returned. + This cannot be provided together with the `member_names` query parameter. + member_names (list[str], optional): + A list of member names. + offset (int, optional): + The offset of the first resource to return from a collection. + policy_ids (list[str], optional): + A list of policy IDs. If after filtering, there is not at least one resource + that matches each of the elements of `policy_ids`, then an error is returned. + This cannot be provided together with the `policy_names` query parameter. + policy_names (list[str], optional): + A list of policy names. + sort (list[Property], optional): + Sort the response by the specified Properties. Can also be a single element. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + continuation_token=continuation_token, + filter=filter, + limit=limit, + member_ids=member_ids, + member_names=member_names, + offset=offset, + policy_ids=policy_ids, + policy_names=policy_names, + sort=sort, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._file_systems_api.api214_file_systems_policies_get_with_http_info + _process_references(members, ['member_ids', 'member_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + return self._call_api(endpoint, kwargs) + + def post_file_systems_policies( + self, + members=None, # type: List[models.ReferenceType] + policies=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + member_ids=None, # type: List[str] + member_names=None, # type: List[str] + policy_ids=None, # type: List[str] + policy_names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.PolicyMemberResponse + """ + Apply a snapshot scheduling policy to a file system. Only one file system can be + mapped to a policy at a time. + + Args: + members (list[FixedReference], optional): + A list of members to query for. Overrides member_ids and member_names keyword arguments. + policies (list[FixedReference], optional): + A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + member_ids (list[str], optional): + A list of member IDs. If after filtering, there is not at least one resource + that matches each of the elements of `member_ids`, then an error is returned. + This cannot be provided together with the `member_names` query parameter. + member_names (list[str], optional): + A list of member names. + policy_ids (list[str], optional): + A list of policy IDs. If after filtering, there is not at least one resource + that matches each of the elements of `policy_ids`, then an error is returned. + This cannot be provided together with the `policy_names` query parameter. + policy_names (list[str], optional): + A list of policy names. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + member_ids=member_ids, + member_names=member_names, + policy_ids=policy_ids, + policy_names=policy_names, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._file_systems_api.api214_file_systems_policies_post_with_http_info + _process_references(members, ['member_ids', 'member_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + return self._call_api(endpoint, kwargs) + + def post_file_systems( + self, + references=None, # type: List[models.ReferenceType] + names=None, # type: List[str] + file_system=None, # type: models.FileSystemPost + x_request_id=None, # type: str + discard_non_snapshotted_data=None, # type: bool + overwrite=None, # type: bool + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.FileSystemResponse + """ + Create a file system on the current array. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides names keyword arguments. + + names (list[str], required): + A list of resource names. + file_system (FileSystemPost, required): + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + discard_non_snapshotted_data (bool, optional): + This parameter must be set to `true` in order to restore a file system from a + snapshot or to demote a file system (which restores the file system from the + common baseline snapshot). Setting this parameter to `true` is acknowledgement + that any non-snapshotted data currently in the file system will be irretrievably + lost. + overwrite (bool, optional): + When used for snapshot restore, overwrites (`true`) an existing file system. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + names=names, + file_system=file_system, + x_request_id=x_request_id, + discard_non_snapshotted_data=discard_non_snapshotted_data, + overwrite=overwrite, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._file_systems_api.api214_file_systems_post_with_http_info + _process_references(references, ['names'], kwargs) + return self._call_api(endpoint, kwargs) + + def delete_file_systems_sessions( + self, + clients=None, # type: List[models.ReferenceType] + references=None, # type: List[models.ReferenceType] + users=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + client_names=None, # type: List[str] + disruptive=None, # type: bool + names=None, # type: List[str] + protocols=None, # type: List[str] + user_names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> None + """ + Delete sessions. It can be used to either delete an individual session by name + or multiple sessions filtered by parameters. E.g. to delete SMBv3 sessions held + by specific client, `protocols` and `client_names` must be specified. To prevent + accidental deletes, setting flag `disruptive` to `true` is required when only a + single query parameter is part of the query. E.g. to delete all SMBv3 sessions, + query parameters `protocols` and `disruptive` must be set. When `names` is + specified, no other query parameter can be specified. + + Args: + clients (list[FixedReference], optional): + A list of clients to query for. Overrides client_names keyword arguments. + references (list[FixedReference], optional): + A list of references to query for. Overrides names keyword arguments. + users (list[FixedReference], optional): + A list of users to query for. Overrides user_names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + client_names (list[str], optional): + A list of ip addresses of clients. For IPv6 both the extended format + (x:x:x:x:x:x:x:x) and the shortened format are supported. + disruptive (bool, optional): + If set to `true`, a wide scope of sessions may be deleted in a single action + using a single query parameter from `user_names`, `client_names`, or + `protocols`. Otherwise, multiple query parameters must be specified to narrow + the impact of deletion and avoid potential for accidental disruption of clients. + names (list[str], optional): + A list of resource names. If there is not at least one resource that matches + each of the elements of `names`, then an error is returned. + protocols (list[str], optional): + A list of file protocols. Valid values include `nfs` and `smb`. + user_names (list[str], optional): + A list of user names. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + client_names=client_names, + disruptive=disruptive, + names=names, + protocols=protocols, + user_names=user_names, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._file_systems_api.api214_file_systems_sessions_delete_with_http_info + _process_references(clients, ['client_names'], kwargs) + _process_references(references, ['names'], kwargs) + _process_references(users, ['user_names'], kwargs) + return self._call_api(endpoint, kwargs) + + def get_file_systems_sessions( + self, + clients=None, # type: List[models.ReferenceType] + references=None, # type: List[models.ReferenceType] + users=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + continuation_token=None, # type: str + client_names=None, # type: List[str] + limit=None, # type: int + names=None, # type: List[str] + protocols=None, # type: List[str] + user_names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.FileSessionGetResponse + """ + Lists all active sessions that satisfy the conditions specified by the + parameters. + + Args: + clients (list[FixedReference], optional): + A list of clients to query for. Overrides client_names keyword arguments. + references (list[FixedReference], optional): + A list of references to query for. Overrides names keyword arguments. + users (list[FixedReference], optional): + A list of users to query for. Overrides user_names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + continuation_token (str, optional): + An opaque token to iterate over a collection of resources. + client_names (list[str], optional): + A list of ip addresses of clients. For IPv6 both the extended format + (x:x:x:x:x:x:x:x) and the shortened format are supported. + limit (int, optional): + Limit the number of resources in the response. If not specified, defaults to + 1000. + names (list[str], optional): + A list of resource names. If there is not at least one resource that matches + each of the elements of `names`, then an error is returned. + protocols (list[str], optional): + A list of file protocols. Valid values include `nfs` and `smb`. + user_names (list[str], optional): + A list of user names. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + continuation_token=continuation_token, + client_names=client_names, + limit=limit, + names=names, + protocols=protocols, + user_names=user_names, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._file_systems_api.api214_file_systems_sessions_get_with_http_info + _process_references(clients, ['client_names'], kwargs) + _process_references(references, ['names'], kwargs) + _process_references(users, ['user_names'], kwargs) + return self._call_api(endpoint, kwargs) + + def get_file_systems_users_performance( + self, + file_systems=None, # type: List[models.ReferenceType] + references=None, # type: List[models.ReferenceType] + users=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + file_system_ids=None, # type: List[str] + file_system_names=None, # type: List[str] + filter=None, # type: str + limit=None, # type: int + names=None, # type: List[str] + sort=None, # type: List[str] + total_only=None, # type: bool + uids=None, # type: List[int] + user_names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.FileSystemUsersPerformanceGetResponse + """ + List a user’s I/O performance metrics on a file system. + + Args: + file_systems (list[FixedReference], optional): + A list of file_systems to query for. Overrides file_system_ids and file_system_names keyword arguments. + references (list[FixedReference], optional): + A list of references to query for. Overrides names keyword arguments. + users (list[FixedReference], optional): + A list of users to query for. Overrides user_names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + file_system_ids (list[str], optional): + A list of file system IDs. If after filtering, there is not at least one + resource that matches each of the elements of `file_system_ids`, then an error + is returned. This cannot be provided together with the `file_system_names` query + parameter. + file_system_names (list[str], optional): + A list of file system names. If there is not at least one resource that matches + each of the elements of `file_system_names`, then an error is returned. + filter (Filter, optional): + A filter to include only resources that match the specified criteria. + limit (int, optional): + Limit the number of resources in the response. If not specified, defaults to + 1000. + names (list[str], optional): + A list of resource names. If there is not at least one resource that matches + each of the elements of `names`, then an error is returned. + sort (list[Property], optional): + Sort the response by the specified Properties. Can also be a single element. + total_only (bool, optional): + Only return the total record for the specified items. The total record will be + the total of all items after filtering. The `items` list will be empty. + uids (list[int], optional): + A list of user IDs. This cannot be provided together with `user_names` query + parameter. + user_names (list[str], optional): + A list of user names. This cannot be provided together with `uids` query + parameter. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + file_system_ids=file_system_ids, + file_system_names=file_system_names, + filter=filter, + limit=limit, + names=names, + sort=sort, + total_only=total_only, + uids=uids, + user_names=user_names, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._file_systems_api.api214_file_systems_users_performance_get_with_http_info + _process_references(file_systems, ['file_system_ids', 'file_system_names'], kwargs) + _process_references(references, ['names'], kwargs) + _process_references(users, ['user_names'], kwargs) + return self._call_api(endpoint, kwargs) + + def get_hardware( + self, + references=None, # type: List[models.ReferenceType] + continuation_token=None, # type: str + filter=None, # type: str + limit=None, # type: int + offset=None, # type: int + sort=None, # type: List[str] + ids=None, # type: List[str] + names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.HardwareGetResponse + """ + List hardware slots and bays and the status of installed components. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides ids and names keyword arguments. + + continuation_token (str, optional): + An opaque token to iterate over a collection of resources. + filter (Filter, optional): + A filter to include only resources that match the specified criteria. + limit (int, optional): + Limit the number of resources in the response. If not specified, defaults to + 1000. + offset (int, optional): + The offset of the first resource to return from a collection. + sort (list[Property], optional): + Sort the response by the specified Properties. Can also be a single element. + ids (list[str], optional): + A list of resource IDs. If after filtering, there is not at least one resource + that matches each of the elements of `ids`, then an error is returned. This + cannot be provided together with the `name` or `names` query parameters. + names (list[str], optional): + A list of resource names. If there is not at least one resource that matches + each of the elements of `names`, then an error is returned. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + continuation_token=continuation_token, + filter=filter, + limit=limit, + offset=offset, + sort=sort, + ids=ids, + names=names, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._hardware_api.api214_hardware_get_with_http_info + _process_references(references, ['ids', 'names'], kwargs) + return self._call_api(endpoint, kwargs) + + def patch_hardware( + self, + references=None, # type: List[models.ReferenceType] + hardware=None, # type: models.Hardware + x_request_id=None, # type: str + ids=None, # type: List[str] + names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.HardwareResponse + """ + Controls the visual identification light of the specified hardware component. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides ids and names keyword arguments. + + hardware (Hardware, required): + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + ids (list[str], optional): + A list of resource IDs. If after filtering, there is not at least one resource + that matches each of the elements of `ids`, then an error is returned. This + cannot be provided together with the `name` or `names` query parameters. + names (list[str], optional): + A list of resource names. If there is not at least one resource that matches + each of the elements of `names`, then an error is returned. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + hardware=hardware, + x_request_id=x_request_id, + ids=ids, + names=names, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._hardware_api.api214_hardware_patch_with_http_info + _process_references(references, ['ids', 'names'], kwargs) + return self._call_api(endpoint, kwargs) + + def get_hardware_connectors( + self, + references=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + continuation_token=None, # type: str + filter=None, # type: str + limit=None, # type: int + offset=None, # type: int + sort=None, # type: List[str] + ids=None, # type: List[str] + names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.HardwareConnectorGetResponse + """ + List array connection information. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides ids and names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + continuation_token (str, optional): + An opaque token to iterate over a collection of resources. + filter (Filter, optional): + A filter to include only resources that match the specified criteria. + limit (int, optional): + Limit the number of resources in the response. If not specified, defaults to + 1000. + offset (int, optional): + The offset of the first resource to return from a collection. + sort (list[Property], optional): + Sort the response by the specified Properties. Can also be a single element. + ids (list[str], optional): + A list of resource IDs. If after filtering, there is not at least one resource + that matches each of the elements of `ids`, then an error is returned. This + cannot be provided together with the `name` or `names` query parameters. + names (list[str], optional): + A list of resource names. If there is not at least one resource that matches + each of the elements of `names`, then an error is returned. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + continuation_token=continuation_token, + filter=filter, + limit=limit, + offset=offset, + sort=sort, + ids=ids, + names=names, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._hardware_connectors_api.api214_hardware_connectors_get_with_http_info + _process_references(references, ['ids', 'names'], kwargs) + return self._call_api(endpoint, kwargs) + + def patch_hardware_connectors( + self, + references=None, # type: List[models.ReferenceType] + hardware_connector=None, # type: models.HardwareConnector + x_request_id=None, # type: str + ids=None, # type: List[str] + names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.HardwareConnectorResponse + """ + Modify array connection information. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides ids and names keyword arguments. + + hardware_connector (HardwareConnector, required): + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + ids (list[str], optional): + A list of resource IDs. If after filtering, there is not at least one resource + that matches each of the elements of `ids`, then an error is returned. This + cannot be provided together with the `name` or `names` query parameters. + names (list[str], optional): + A list of resource names. If there is not at least one resource that matches + each of the elements of `names`, then an error is returned. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + hardware_connector=hardware_connector, + x_request_id=x_request_id, + ids=ids, + names=names, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._hardware_connectors_api.api214_hardware_connectors_patch_with_http_info + _process_references(references, ['ids', 'names'], kwargs) + return self._call_api(endpoint, kwargs) + + def get_hardware_connectors_performance( + self, + references=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + end_time=None, # type: int + filter=None, # type: str + ids=None, # type: List[str] + limit=None, # type: int + names=None, # type: List[str] + offset=None, # type: int + resolution=None, # type: int + sort=None, # type: List[str] + start_time=None, # type: int + total_only=None, # type: bool + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.HardwareConnectorPerformanceGetResponse + """ + Displays network statistics, historical bandwidth, and error reporting for all + specified hardware connectors. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides ids and names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + end_time (int, optional): + When the time window ends (in milliseconds since epoch). + filter (Filter, optional): + A filter to include only resources that match the specified criteria. + ids (list[str], optional): + A list of resource IDs. If after filtering, there is not at least one resource + that matches each of the elements of `ids`, then an error is returned. This + cannot be provided together with the `name` or `names` query parameters. + limit (int, optional): + Limit the number of resources in the response. If not specified, defaults to + 1000. + names (list[str], optional): + A list of resource names. If there is not at least one resource that matches + each of the elements of `names`, then an error is returned. + offset (int, optional): + The offset of the first resource to return from a collection. + resolution (int, optional): + The desired ms between samples. Available resolutions may depend on data type, + `start_time` and `end_time`. In general `1000`, `30000`, `300000`, `1800000`, + `7200000`, and `86400000` are possible values. + sort (list[Property], optional): + Sort the response by the specified Properties. Can also be a single element. + start_time (int, optional): + When the time window starts (in milliseconds since epoch). + total_only (bool, optional): + Only return the total record for the specified items. The total record will be + the total of all items after filtering. The `items` list will be empty. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + end_time=end_time, + filter=filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + resolution=resolution, + sort=sort, + start_time=start_time, + total_only=total_only, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._hardware_connectors_api.api214_hardware_connectors_performance_get_with_http_info + _process_references(references, ['ids', 'names'], kwargs) + return self._call_api(endpoint, kwargs) + + def delete_keytabs( + self, + references=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + ids=None, # type: List[str] + names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> None + """ + Delete a Kerberos keytab file. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides ids and names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + ids (list[str], optional): + A list of resource IDs. If after filtering, there is not at least one resource + that matches each of the elements of `ids`, then an error is returned. This + cannot be provided together with the `name` or `names` query parameters. + names (list[str], optional): + A list of resource names. If there is not at least one resource that matches + each of the elements of `names`, then an error is returned. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + ids=ids, + names=names, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._keytabs_api.api214_keytabs_delete_with_http_info + _process_references(references, ['ids', 'names'], kwargs) + return self._call_api(endpoint, kwargs) + + def get_keytabs_download( + self, + keytabs=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + keytab_ids=None, # type: List[str] + keytab_names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.KeytabFileResponse + """ + Download a Kerberos keytab file. The file can be downloaded in the native binary + format or a base64 encoded format. If not specified, defaults to binary. + + Args: + keytabs (list[FixedReference], optional): + A list of keytabs to query for. Overrides keytab_ids and keytab_names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + keytab_ids (list[str], optional): + A list of keytab IDs. If after filtering, there is not at least one resource + that matches each of the elements, then an error is returned. This cannot be + provided together with the `keytab_names` query parameter. + keytab_names (list[str], optional): + A list of keytab names. If there is not at least one resource that matches each + of the elements, then an error is returned. This cannot be provided together + with `keytab_ids` query parameter. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + keytab_ids=keytab_ids, + keytab_names=keytab_names, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._keytabs_api.api214_keytabs_download_get_with_http_info + _process_references(keytabs, ['keytab_ids', 'keytab_names'], kwargs) + return self._call_api(endpoint, kwargs) + + def get_keytabs( + self, + references=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + continuation_token=None, # type: str + filter=None, # type: str + ids=None, # type: List[str] + limit=None, # type: int + names=None, # type: List[str] + offset=None, # type: int + sort=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.KeytabGetResponse + """ + List a Kerberos keytab file and its configuration information. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides ids and names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + continuation_token (str, optional): + An opaque token to iterate over a collection of resources. + filter (Filter, optional): + A filter to include only resources that match the specified criteria. + ids (list[str], optional): + A list of resource IDs. If after filtering, there is not at least one resource + that matches each of the elements of `ids`, then an error is returned. This + cannot be provided together with the `name` or `names` query parameters. + limit (int, optional): + Limit the number of resources in the response. If not specified, defaults to + 1000. + names (list[str], optional): + A list of resource names. If there is not at least one resource that matches + each of the elements of `names`, then an error is returned. + offset (int, optional): + The offset of the first resource to return from a collection. + sort (list[Property], optional): + Sort the response by the specified Properties. Can also be a single element. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + continuation_token=continuation_token, + filter=filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + sort=sort, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._keytabs_api.api214_keytabs_get_with_http_info + _process_references(references, ['ids', 'names'], kwargs) + return self._call_api(endpoint, kwargs) + + def post_keytabs( + self, + keytab=None, # type: models.KeytabPost + x_request_id=None, # type: str + name_prefixes=None, # type: str + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.KeytabResponse + """ + Import a Kerberos keytab file from a Key Distribution Center. + + Args: + + keytab (KeytabPost, required): + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + name_prefixes (str, optional): + The prefix to use for the names of all Kerberos keytab objects that are being + created. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + keytab=keytab, + x_request_id=x_request_id, + name_prefixes=name_prefixes, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._keytabs_api.api214_keytabs_post_with_http_info + return self._call_api(endpoint, kwargs) + + def post_keytabs_upload( + self, + keytab_file=None, # type: models.ERRORUNKNOWN + x_request_id=None, # type: str + name_prefixes=None, # type: str + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.KeytabFileResponse + """ + Upload a Kerberos keytab file to the array. The file can be uploaded in the + native binary format or a base64 encoded format. If not specified, defaults to + binary. The procedure to upload a file may vary depending on the type of REST + client. + + Args: + + keytab_file (ERRORUNKNOWN, required): + The keytab file to upload. + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + name_prefixes (str, optional): + The prefix to use for the names of all Kerberos keytab objects that are being + created. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + keytab_file=keytab_file, + x_request_id=x_request_id, + name_prefixes=name_prefixes, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._keytabs_api.api214_keytabs_upload_post_with_http_info + return self._call_api(endpoint, kwargs) + + def delete_kmip( + self, + references=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + names=None, # type: List[str] + ids=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> None + """ + Deletes a KMIP server configuration. A server can only be deleted when not in + use by the array. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides names and ids keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + names (list[str], optional): + A list of resource names. If there is not at least one resource that matches + each of the elements of `names`, then an error is returned. + ids (list[str], optional): + A list of resource IDs. If after filtering, there is not at least one resource + that matches each of the elements of `ids`, then an error is returned. This + cannot be provided together with the `name` or `names` query parameters. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + names=names, + ids=ids, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._kmip_api.api214_kmip_delete_with_http_info + _process_references(references, ['names', 'ids'], kwargs) + return self._call_api(endpoint, kwargs) + + def get_kmip( + self, + references=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + names=None, # type: List[str] + ids=None, # type: List[str] + filter=None, # type: str + limit=None, # type: int + offset=None, # type: int + sort=None, # type: List[str] + continuation_token=None, # type: str + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.KmipServerResponse + """ + Displays a list of KMIP server configurations. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides names and ids keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + names (list[str], optional): + A list of resource names. If there is not at least one resource that matches + each of the elements of `names`, then an error is returned. + ids (list[str], optional): + A list of resource IDs. If after filtering, there is not at least one resource + that matches each of the elements of `ids`, then an error is returned. This + cannot be provided together with the `name` or `names` query parameters. + filter (Filter, optional): + A filter to include only resources that match the specified criteria. + limit (int, optional): + Limit the number of resources in the response. If not specified, defaults to + 1000. + offset (int, optional): + The offset of the first resource to return from a collection. + sort (list[Property], optional): + Sort the response by the specified Properties. Can also be a single element. + continuation_token (str, optional): + An opaque token to iterate over a collection of resources. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + names=names, + ids=ids, + filter=filter, + limit=limit, + offset=offset, + sort=sort, + continuation_token=continuation_token, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._kmip_api.api214_kmip_get_with_http_info + _process_references(references, ['names', 'ids'], kwargs) + return self._call_api(endpoint, kwargs) + + def patch_kmip( + self, + references=None, # type: List[models.ReferenceType] + kmip_server=None, # type: models.KmipServer + x_request_id=None, # type: str + names=None, # type: List[str] + ids=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.KmipServerResponse + """ + Modifies KMIP server properties - URI, certificate, certificate group. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides names and ids keyword arguments. + + kmip_server (KmipServer, required): + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + names (list[str], optional): + A list of resource names. If there is not at least one resource that matches + each of the elements of `names`, then an error is returned. + ids (list[str], optional): + A list of resource IDs. If after filtering, there is not at least one resource + that matches each of the elements of `ids`, then an error is returned. This + cannot be provided together with the `name` or `names` query parameters. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + kmip_server=kmip_server, + x_request_id=x_request_id, + names=names, + ids=ids, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._kmip_api.api214_kmip_patch_with_http_info + _process_references(references, ['names', 'ids'], kwargs) + return self._call_api(endpoint, kwargs) + + def post_kmip( + self, + references=None, # type: List[models.ReferenceType] + kmip_server=None, # type: models.KmipServer + x_request_id=None, # type: str + names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.KmipServerResponse + """ + Creates a KMIP server configuration. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides names keyword arguments. + + kmip_server (KmipServer, required): + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + names (list[str], optional): + A list of resource names. If there is not at least one resource that matches + each of the elements of `names`, then an error is returned. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + kmip_server=kmip_server, + x_request_id=x_request_id, + names=names, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._kmip_api.api214_kmip_post_with_http_info + _process_references(references, ['names'], kwargs) + return self._call_api(endpoint, kwargs) + + def get_kmip_test( + self, + references=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + names=None, # type: List[str] + ids=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.TestResultResponse + """ + Displays a detailed result of of KMIP server test. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides names and ids keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + names (list[str], optional): + A list of resource names. If there is not at least one resource that matches + each of the elements of `names`, then an error is returned. + ids (list[str], optional): + A list of resource IDs. If after filtering, there is not at least one resource + that matches each of the elements of `ids`, then an error is returned. This + cannot be provided together with the `name` or `names` query parameters. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + names=names, + ids=ids, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._kmip_api.api214_kmip_test_get_with_http_info + _process_references(references, ['names', 'ids'], kwargs) + return self._call_api(endpoint, kwargs) + + def delete_lifecycle_rules( + self, + buckets=None, # type: List[models.ReferenceType] + references=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + bucket_ids=None, # type: List[str] + bucket_names=None, # type: List[str] + ids=None, # type: List[str] + names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> None + """ + Deletes individual lifecycle rules by name or id, or deletes all rules for a + bucket. If `ids` is specified, `bucket_names` or `bucket_ids` is also required. + If `bucket_names` or `bucket_ids` are specified without `ids`, delete all the + rules for the bucket. + + Args: + buckets (list[FixedReference], optional): + A list of buckets to query for. Overrides bucket_ids and bucket_names keyword arguments. + references (list[FixedReference], optional): + A list of references to query for. Overrides ids and names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + bucket_ids (list[str], optional): + A list of bucket IDs. If after filtering, there is not at least one resource + that matches each of the elements of `bucket_ids`, then an error is returned. + This cannot be provided together with the `bucket_names` query parameter. This + can be provided with the `ids` query parameter but not with `names`. + bucket_names (list[str], optional): + A list of bucket names. If there is not at least one resource that matches each + of the elements of `bucket_names`, then an error is returned. This cannot be + provided together with the `bucket_ids` query parameter. This can be provided + with the `ids` query parameter but not with `names`. + ids (list[str], optional): + A list of resource IDs. If after filtering, there is not at least one resource + that matches each of the elements of `ids`, then an error is returned. This + cannot be provided together with the `name` or `names` query parameters. + names (list[str], optional): + A list of resource names. If there is not at least one resource that matches + each of the elements of `names`, then an error is returned. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + bucket_ids=bucket_ids, + bucket_names=bucket_names, + ids=ids, + names=names, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._lifecycle_rules_api.api214_lifecycle_rules_delete_with_http_info + _process_references(buckets, ['bucket_ids', 'bucket_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + return self._call_api(endpoint, kwargs) + + def get_lifecycle_rules( + self, + buckets=None, # type: List[models.ReferenceType] + references=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + bucket_ids=None, # type: List[str] + bucket_names=None, # type: List[str] + continuation_token=None, # type: str + filter=None, # type: str + ids=None, # type: List[str] + limit=None, # type: int + names=None, # type: List[str] + offset=None, # type: int + sort=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.LifecycleRuleGetResponse + """ + Returns a list of lifecycle rules. If `names` is specified, list the individual + rules. If `ids` is specified, `bucket_names` or `bucket_ids` is also required. + If `bucket_names` or `bucket_ids` are specified without `ids`, list all the + rules for the bucket. + + Args: + buckets (list[FixedReference], optional): + A list of buckets to query for. Overrides bucket_ids and bucket_names keyword arguments. + references (list[FixedReference], optional): + A list of references to query for. Overrides ids and names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + bucket_ids (list[str], optional): + A list of bucket IDs. If after filtering, there is not at least one resource + that matches each of the elements of `bucket_ids`, then an error is returned. + This cannot be provided together with the `bucket_names` query parameter. This + can be provided with the `ids` query parameter but not with `names`. + bucket_names (list[str], optional): + A list of bucket names. If there is not at least one resource that matches each + of the elements of `bucket_names`, then an error is returned. This cannot be + provided together with the `bucket_ids` query parameter. This can be provided + with the `ids` query parameter but not with `names`. + continuation_token (str, optional): + An opaque token to iterate over a collection of resources. + filter (Filter, optional): + A filter to include only resources that match the specified criteria. + ids (list[str], optional): + A list of resource IDs. If after filtering, there is not at least one resource + that matches each of the elements of `ids`, then an error is returned. This + cannot be provided together with the `name` or `names` query parameters. + limit (int, optional): + Limit the number of resources in the response. If not specified, defaults to + 1000. + names (list[str], optional): + A list of resource names. If there is not at least one resource that matches + each of the elements of `names`, then an error is returned. + offset (int, optional): + The offset of the first resource to return from a collection. + sort (list[Property], optional): + Sort the response by the specified Properties. Can also be a single element. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + bucket_ids=bucket_ids, + bucket_names=bucket_names, + continuation_token=continuation_token, + filter=filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + sort=sort, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._lifecycle_rules_api.api214_lifecycle_rules_get_with_http_info + _process_references(buckets, ['bucket_ids', 'bucket_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + return self._call_api(endpoint, kwargs) + + def patch_lifecycle_rules( + self, + buckets=None, # type: List[models.ReferenceType] + references=None, # type: List[models.ReferenceType] + lifecycle=None, # type: models.LifecycleRulePatch + x_request_id=None, # type: str + bucket_ids=None, # type: List[str] + bucket_names=None, # type: List[str] + ids=None, # type: List[str] + names=None, # type: List[str] + confirm_date=None, # type: bool + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.LifecycleRuleResponse + """ + Modify an existing lifecycle rule by name or id. If `ids` is specified, + `bucket_names` or `bucket_ids` is also required. + + Args: + buckets (list[FixedReference], optional): + A list of buckets to query for. Overrides bucket_ids and bucket_names keyword arguments. + references (list[FixedReference], optional): + A list of references to query for. Overrides ids and names keyword arguments. + + lifecycle (LifecycleRulePatch, required): + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + bucket_ids (list[str], optional): + A list of bucket IDs. If after filtering, there is not at least one resource + that matches each of the elements of `bucket_ids`, then an error is returned. + This cannot be provided together with the `bucket_names` query parameter. This + can be provided with the `ids` query parameter but not with `names`. + bucket_names (list[str], optional): + A list of bucket names. If there is not at least one resource that matches each + of the elements of `bucket_names`, then an error is returned. This cannot be + provided together with the `bucket_ids` query parameter. This can be provided + with the `ids` query parameter but not with `names`. + ids (list[str], optional): + A list of resource IDs. If after filtering, there is not at least one resource + that matches each of the elements of `ids`, then an error is returned. This + cannot be provided together with the `name` or `names` query parameters. + names (list[str], optional): + A list of resource names. If there is not at least one resource that matches + each of the elements of `names`, then an error is returned. + confirm_date (bool, optional): + If set to `true`, then confirm the date of `keep_current_version_until` is + correct. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + lifecycle=lifecycle, + x_request_id=x_request_id, + bucket_ids=bucket_ids, + bucket_names=bucket_names, + ids=ids, + names=names, + confirm_date=confirm_date, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._lifecycle_rules_api.api214_lifecycle_rules_patch_with_http_info + _process_references(buckets, ['bucket_ids', 'bucket_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + return self._call_api(endpoint, kwargs) + + def post_lifecycle_rules( + self, + rule=None, # type: models.LifecycleRulePost + x_request_id=None, # type: str + confirm_date=None, # type: bool + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.LifecycleRuleResponse + """ + Creates a lifecycle rule. `bucket` and `keep_previous_version_for` are required. + If `rule_id` is not specified, it will be automatically generated in the format + \"fbRuleIdX\". + + Args: + + rule (LifecycleRulePost, required): + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + confirm_date (bool, optional): + If set to `true`, then confirm the date of `keep_current_version_until` is + correct. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + rule=rule, + x_request_id=x_request_id, + confirm_date=confirm_date, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._lifecycle_rules_api.api214_lifecycle_rules_post_with_http_info + return self._call_api(endpoint, kwargs) + + def delete_link_aggregation_groups( + self, + references=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + ids=None, # type: List[str] + names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> None + """ + Remove a link aggregation group to unbind the ports. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides ids and names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + ids (list[str], optional): + A list of resource IDs. If after filtering, there is not at least one resource + that matches each of the elements of `ids`, then an error is returned. This + cannot be provided together with the `name` or `names` query parameters. + names (list[str], optional): + A list of resource names. If there is not at least one resource that matches + each of the elements of `names`, then an error is returned. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + ids=ids, + names=names, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._link_aggregation_groups_api.api214_link_aggregation_groups_delete_with_http_info + _process_references(references, ['ids', 'names'], kwargs) + return self._call_api(endpoint, kwargs) + + def get_link_aggregation_groups( + self, + references=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + continuation_token=None, # type: str + filter=None, # type: str + ids=None, # type: List[str] + limit=None, # type: int + names=None, # type: List[str] + offset=None, # type: int + sort=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.LinkAggregationGroupGetResponse + """ + List the status and attributes of the Ethernet ports in the configured link + aggregation groups. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides ids and names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + continuation_token (str, optional): + An opaque token to iterate over a collection of resources. + filter (Filter, optional): + A filter to include only resources that match the specified criteria. + ids (list[str], optional): + A list of resource IDs. If after filtering, there is not at least one resource + that matches each of the elements of `ids`, then an error is returned. This + cannot be provided together with the `name` or `names` query parameters. + limit (int, optional): + Limit the number of resources in the response. If not specified, defaults to + 1000. + names (list[str], optional): + A list of resource names. If there is not at least one resource that matches + each of the elements of `names`, then an error is returned. + offset (int, optional): + The offset of the first resource to return from a collection. + sort (list[Property], optional): + Sort the response by the specified Properties. Can also be a single element. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + continuation_token=continuation_token, + filter=filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + sort=sort, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._link_aggregation_groups_api.api214_link_aggregation_groups_get_with_http_info + _process_references(references, ['ids', 'names'], kwargs) + return self._call_api(endpoint, kwargs) + + def patch_link_aggregation_groups( + self, + references=None, # type: List[models.ReferenceType] + link_aggregation_group=None, # type: models.Linkaggregationgroup + x_request_id=None, # type: str + ids=None, # type: List[str] + names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.LinkAggregationGroupResponse + """ + Modify link aggregation groups by adding and removing Ethernet ports. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides ids and names keyword arguments. + + link_aggregation_group (Linkaggregationgroup, required): + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + ids (list[str], optional): + A list of resource IDs. If after filtering, there is not at least one resource + that matches each of the elements of `ids`, then an error is returned. This + cannot be provided together with the `name` or `names` query parameters. + names (list[str], optional): + A list of resource names. If there is not at least one resource that matches + each of the elements of `names`, then an error is returned. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + link_aggregation_group=link_aggregation_group, + x_request_id=x_request_id, + ids=ids, + names=names, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._link_aggregation_groups_api.api214_link_aggregation_groups_patch_with_http_info + _process_references(references, ['ids', 'names'], kwargs) + return self._call_api(endpoint, kwargs) + + def post_link_aggregation_groups( + self, + references=None, # type: List[models.ReferenceType] + link_aggregation_group=None, # type: models.LinkAggregationGroup + names=None, # type: List[str] + x_request_id=None, # type: str + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.LinkAggregationGroupResponse + """ + Create a link aggregation group of Ethernet ports on the array. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides names keyword arguments. + + link_aggregation_group (LinkAggregationGroup, required): + names (list[str], required): + A list of resource names. + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + link_aggregation_group=link_aggregation_group, + names=names, + x_request_id=x_request_id, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._link_aggregation_groups_api.api214_link_aggregation_groups_post_with_http_info + _process_references(references, ['names'], kwargs) + return self._call_api(endpoint, kwargs) + + def get_logs_async_download( + self, + references=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.file + """ + Download the files which contain a history of log events from the array to + provide to Pure Technical Services for analysis. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + names (list[str], optional): + A list of resource names. If there is not at least one resource that matches + each of the elements of `names`, then an error is returned. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + names=names, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._logs_api.api214_logs_async_download_get_with_http_info + _process_references(references, ['names'], kwargs) + return self._call_api(endpoint, kwargs) + + def get_logs_async( + self, + references=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + continuation_token=None, # type: str + filter=None, # type: str + ids=None, # type: List[str] + limit=None, # type: int + names=None, # type: List[str] + offset=None, # type: int + sort=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.LogsAsyncGetResponse + """ + List the attributes and status of preparation for a history of log events from + the array to provide to Pure Technical Services for analysis. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides ids and names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + continuation_token (str, optional): + An opaque token to iterate over a collection of resources. + filter (Filter, optional): + A filter to include only resources that match the specified criteria. + ids (list[str], optional): + A list of resource IDs. If after filtering, there is not at least one resource + that matches each of the elements of `ids`, then an error is returned. This + cannot be provided together with the `name` or `names` query parameters. + limit (int, optional): + Limit the number of resources in the response. If not specified, defaults to + 1000. + names (list[str], optional): + A list of resource names. If there is not at least one resource that matches + each of the elements of `names`, then an error is returned. + offset (int, optional): + The offset of the first resource to return from a collection. + sort (list[Property], optional): + Sort the response by the specified Properties. Can also be a single element. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + continuation_token=continuation_token, + filter=filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + sort=sort, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._logs_api.api214_logs_async_get_with_http_info + _process_references(references, ['ids', 'names'], kwargs) + return self._call_api(endpoint, kwargs) + + def patch_logs_async( + self, + logs_async=None, # type: models.LogsAsync + x_request_id=None, # type: str + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.LogsAsyncResponse + """ + Start the preparation for a history of log events from the array to provide to + Pure Technical Services for analysis. + + Args: + + logs_async (LogsAsync, required): + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + logs_async=logs_async, + x_request_id=x_request_id, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._logs_api.api214_logs_async_patch_with_http_info + return self._call_api(endpoint, kwargs) + + def get_logs( + self, + x_request_id=None, # type: str + end_time=None, # type: int + start_time=None, # type: int + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.file + """ + Download a history of log events from the array to provide to Pure Technical + Services for analysis. + + Args: + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + end_time (int, optional): + When the time window ends (in milliseconds since epoch). + start_time (int, optional): + When the time window starts (in milliseconds since epoch). + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + end_time=end_time, + start_time=start_time, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._logs_api.api214_logs_get_with_http_info + return self._call_api(endpoint, kwargs) + + def delete_network_interfaces( + self, + references=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + ids=None, # type: List[str] + names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> None + """ + Remove a data VIP. Once removed, any clients connected through the data VIP will + lose their connection to the file system. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides ids and names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + ids (list[str], optional): + A list of resource IDs. If after filtering, there is not at least one resource + that matches each of the elements of `ids`, then an error is returned. This + cannot be provided together with the `name` or `names` query parameters. + names (list[str], optional): + A list of resource names. If there is not at least one resource that matches + each of the elements of `names`, then an error is returned. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + ids=ids, + names=names, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._network_interfaces_api.api214_network_interfaces_delete_with_http_info + _process_references(references, ['ids', 'names'], kwargs) + return self._call_api(endpoint, kwargs) + + def get_network_interfaces( + self, + references=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + continuation_token=None, # type: str + filter=None, # type: str + ids=None, # type: List[str] + limit=None, # type: int + names=None, # type: List[str] + offset=None, # type: int + sort=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.NetworkInterfaceGetResponse + """ + List network interfaces and their attributes. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides ids and names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + continuation_token (str, optional): + An opaque token to iterate over a collection of resources. + filter (Filter, optional): + A filter to include only resources that match the specified criteria. + ids (list[str], optional): + A list of resource IDs. If after filtering, there is not at least one resource + that matches each of the elements of `ids`, then an error is returned. This + cannot be provided together with the `name` or `names` query parameters. + limit (int, optional): + Limit the number of resources in the response. If not specified, defaults to + 1000. + names (list[str], optional): + A list of resource names. If there is not at least one resource that matches + each of the elements of `names`, then an error is returned. + offset (int, optional): + The offset of the first resource to return from a collection. + sort (list[Property], optional): + Sort the response by the specified Properties. Can also be a single element. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + continuation_token=continuation_token, + filter=filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + sort=sort, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._network_interfaces_api.api214_network_interfaces_get_with_http_info + _process_references(references, ['ids', 'names'], kwargs) + return self._call_api(endpoint, kwargs) + + def patch_network_interfaces( + self, + references=None, # type: List[models.ReferenceType] + network_interface=None, # type: models.NetworkInterfacePatch + x_request_id=None, # type: str + ids=None, # type: List[str] + names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.NetworkInterfaceResponse + """ + Modify the attributes of a data VIP. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides ids and names keyword arguments. + + network_interface (NetworkInterfacePatch, required): + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + ids (list[str], optional): + A list of resource IDs. If after filtering, there is not at least one resource + that matches each of the elements of `ids`, then an error is returned. This + cannot be provided together with the `name` or `names` query parameters. + names (list[str], optional): + A list of resource names. If there is not at least one resource that matches + each of the elements of `names`, then an error is returned. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + network_interface=network_interface, + x_request_id=x_request_id, + ids=ids, + names=names, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._network_interfaces_api.api214_network_interfaces_patch_with_http_info + _process_references(references, ['ids', 'names'], kwargs) + return self._call_api(endpoint, kwargs) + + def get_network_interfaces_ping( + self, + destination=None, # type: str + x_request_id=None, # type: str + packet_size=None, # type: int + count=None, # type: int + component_name=None, # type: str + source=None, # type: str + print_latency=None, # type: bool + resolve_hostname=None, # type: bool + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.NetworkInterfacePingGetResponse + """ + Display network interface ping result. + + Args: + + destination (str, required): + A destination specified by user to run the network diagnosis against. Can be a + hostname or an IP. + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + packet_size (int, optional): + Used by ping to specify the number of data bytes to be sent per packet. If not + specified, defaults to 56. + count (int, optional): + Used by ping to specify the number of packets to send. If not specified, + defaults to 1. + component_name (str, optional): + Used by ping and trace to specify where to run the operation. Valid values are + controllers and blades from hardware list. If not specified, defaults to all + available controllers and selected blades. + source (str, optional): + Used by ping and trace to specify the property where to start to run the + specified operation. The property can be subnet or IP. + print_latency (bool, optional): + Used by ping to specify whether or not to print the full user-to-user latency. + If not specified, defaults to false. + resolve_hostname (bool, optional): + Used by ping and trace to specify whether or not to map IP addresses to host + names. If not specified, defaults to true. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + destination=destination, + x_request_id=x_request_id, + packet_size=packet_size, + count=count, + component_name=component_name, + source=source, + print_latency=print_latency, + resolve_hostname=resolve_hostname, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._network_interfaces_api.api214_network_interfaces_ping_get_with_http_info + return self._call_api(endpoint, kwargs) + + def post_network_interfaces( + self, + references=None, # type: List[models.ReferenceType] + network_interface=None, # type: models.NetworkInterface + names=None, # type: List[str] + x_request_id=None, # type: str + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.NetworkInterfaceResponse + """ + Create a data VIP to export a file system. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides names keyword arguments. + + network_interface (NetworkInterface, required): + names (list[str], required): + A list of resource names. + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + network_interface=network_interface, + names=names, + x_request_id=x_request_id, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._network_interfaces_api.api214_network_interfaces_post_with_http_info + _process_references(references, ['names'], kwargs) + return self._call_api(endpoint, kwargs) + + def get_network_interfaces_trace( + self, + destination=None, # type: str + x_request_id=None, # type: str + fragment_packet=None, # type: bool + method=None, # type: str + discover_mtu=None, # type: bool + component_name=None, # type: str + source=None, # type: str + port=None, # type: str + resolve_hostname=None, # type: bool + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.NetworkInterfaceTraceGetResponse + """ + Display network interface trace result. + + Args: + + destination (str, required): + A destination specified by user to run the network diagnosis against. Can be a + hostname or an IP. + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + fragment_packet (bool, optional): + Used by trace to specify whether or not to fragment packets. If not specified, + defaults to true. + method (str, optional): + Used by trace to specify which method to use for trace operations. Valid values + are `icmp`, `tcp`, and `udp`. If not specified, defaults to 'udp'. + discover_mtu (bool, optional): + Used by trace to specify whether or not to discover the MTU along the path being + traced. If not specified, defaults to false. + component_name (str, optional): + Used by ping and trace to specify where to run the operation. Valid values are + controllers and blades from hardware list. If not specified, defaults to all + available controllers and selected blades. + source (str, optional): + Used by ping and trace to specify the property where to start to run the + specified operation. The property can be subnet or IP. + port (str, optional): + Used by trace to specify a destination port. + resolve_hostname (bool, optional): + Used by ping and trace to specify whether or not to map IP addresses to host + names. If not specified, defaults to true. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + destination=destination, + x_request_id=x_request_id, + fragment_packet=fragment_packet, + method=method, + discover_mtu=discover_mtu, + component_name=component_name, + source=source, + port=port, + resolve_hostname=resolve_hostname, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._network_interfaces_api.api214_network_interfaces_trace_get_with_http_info + return self._call_api(endpoint, kwargs) + + def delete_object_store_access_keys( + self, + references=None, # type: List[models.ReferenceType] + names=None, # type: List[str] + x_request_id=None, # type: str + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> None + """ + Delete an object store access key. Once an access key has been deleted, it + cannot be recovered. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides names keyword arguments. + + names (list[str], required): + A list of resource names. + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + names=names, + x_request_id=x_request_id, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._object_store_access_keys_api.api214_object_store_access_keys_delete_with_http_info + _process_references(references, ['names'], kwargs) + return self._call_api(endpoint, kwargs) + + def get_object_store_access_keys( + self, + references=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + continuation_token=None, # type: str + filter=None, # type: str + limit=None, # type: int + names=None, # type: List[str] + offset=None, # type: int + sort=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.ObjectStoreAccessKeyGetResponse + """ + List object store access keys. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + continuation_token (str, optional): + An opaque token to iterate over a collection of resources. + filter (Filter, optional): + A filter to include only resources that match the specified criteria. + limit (int, optional): + Limit the number of resources in the response. If not specified, defaults to + 1000. + names (list[str], optional): + A list of resource names. If there is not at least one resource that matches + each of the elements of `names`, then an error is returned. + offset (int, optional): + The offset of the first resource to return from a collection. + sort (list[Property], optional): + Sort the response by the specified Properties. Can also be a single element. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + continuation_token=continuation_token, + filter=filter, + limit=limit, + names=names, + offset=offset, + sort=sort, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._object_store_access_keys_api.api214_object_store_access_keys_get_with_http_info + _process_references(references, ['names'], kwargs) + return self._call_api(endpoint, kwargs) + + def patch_object_store_access_keys( + self, + references=None, # type: List[models.ReferenceType] + names=None, # type: List[str] + object_store_access_key=None, # type: models.ObjectStoreAccessKey + x_request_id=None, # type: str + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.ObjectStoreAccessKeyResponse + """ + Enable or disable object store access keys. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides names keyword arguments. + + names (list[str], required): + A list of resource names. + object_store_access_key (ObjectStoreAccessKey, required): + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + names=names, + object_store_access_key=object_store_access_key, + x_request_id=x_request_id, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._object_store_access_keys_api.api214_object_store_access_keys_patch_with_http_info + _process_references(references, ['names'], kwargs) + return self._call_api(endpoint, kwargs) + + def post_object_store_access_keys( + self, + references=None, # type: List[models.ReferenceType] + object_store_access_key=None, # type: models.ObjectStoreAccessKeyPost + x_request_id=None, # type: str + names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.ObjectStoreAccessKeyResponse + """ + Create or import object store access keys. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides names keyword arguments. + + object_store_access_key (ObjectStoreAccessKeyPost, required): + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + names (list[str], optional): + A list of resource names to import. To import a set of credentials, this field + must be specified with the `secret_access_key` body parameter. If both of these + are not specified, the system will generate a new set of credentials. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + object_store_access_key=object_store_access_key, + x_request_id=x_request_id, + names=names, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._object_store_access_keys_api.api214_object_store_access_keys_post_with_http_info + _process_references(references, ['names'], kwargs) + return self._call_api(endpoint, kwargs) + + def delete_object_store_accounts( + self, + references=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + ids=None, # type: List[str] + names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> None + """ + Delete an object store account. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides ids and names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + ids (list[str], optional): + A list of resource IDs. If after filtering, there is not at least one resource + that matches each of the elements of `ids`, then an error is returned. This + cannot be provided together with the `name` or `names` query parameters. + names (list[str], optional): + A list of resource names. If there is not at least one resource that matches + each of the elements of `names`, then an error is returned. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + ids=ids, + names=names, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._object_store_accounts_api.api214_object_store_accounts_delete_with_http_info + _process_references(references, ['ids', 'names'], kwargs) + return self._call_api(endpoint, kwargs) + + def get_object_store_accounts( + self, + references=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + continuation_token=None, # type: str + filter=None, # type: str + ids=None, # type: List[str] + limit=None, # type: int + names=None, # type: List[str] + offset=None, # type: int + sort=None, # type: List[str] + total_only=None, # type: bool + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.ObjectStoreAccountGetResponse + """ + List object store accounts and their attributes. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides ids and names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + continuation_token (str, optional): + An opaque token to iterate over a collection of resources. + filter (Filter, optional): + A filter to include only resources that match the specified criteria. + ids (list[str], optional): + A list of resource IDs. If after filtering, there is not at least one resource + that matches each of the elements of `ids`, then an error is returned. This + cannot be provided together with the `name` or `names` query parameters. + limit (int, optional): + Limit the number of resources in the response. If not specified, defaults to + 1000. + names (list[str], optional): + A list of resource names. If there is not at least one resource that matches + each of the elements of `names`, then an error is returned. + offset (int, optional): + The offset of the first resource to return from a collection. + sort (list[Property], optional): + Sort the response by the specified Properties. Can also be a single element. + total_only (bool, optional): + Only return the total record for the specified items. The total record will be + the total of all items after filtering. The `items` list will be empty. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + continuation_token=continuation_token, + filter=filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + sort=sort, + total_only=total_only, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._object_store_accounts_api.api214_object_store_accounts_get_with_http_info + _process_references(references, ['ids', 'names'], kwargs) + return self._call_api(endpoint, kwargs) + + def patch_object_store_accounts( + self, + references=None, # type: List[models.ReferenceType] + object_store_account=None, # type: models.ObjectStoreAccountPatch + x_request_id=None, # type: str + ids=None, # type: List[str] + ignore_usage=None, # type: bool + names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.ObjectStoreAccountResponse + """ + Modify object store account attributes such as quota limit and bucket defaults. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides ids and names keyword arguments. + + object_store_account (ObjectStoreAccountPatch, required): + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + ids (list[str], optional): + A list of resource IDs. If after filtering, there is not at least one resource + that matches each of the elements of `ids`, then an error is returned. This + cannot be provided together with the `name` or `names` query parameters. + ignore_usage (bool, optional): + Allow update operations that lead to a `hard_limit_enabled` object store + account, bucket, or file system with usage over its limiting value. For object + store accounts and buckets, the limiting value is that of `quota_limit`, and for + file systems it is that of `provisioned`. The operation can be either setting + `hard_limit_enabled` when usage is higher than the limiting value, modifying the + limiting value to a value under usage when `hard_limit_enabled` or recovering a + destroyed bucket of an object store account that cause account's space usage to + go over its hard `quota_limit`. + names (list[str], optional): + A list of resource names. If there is not at least one resource that matches + each of the elements of `names`, then an error is returned. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + object_store_account=object_store_account, + x_request_id=x_request_id, + ids=ids, + ignore_usage=ignore_usage, + names=names, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._object_store_accounts_api.api214_object_store_accounts_patch_with_http_info + _process_references(references, ['ids', 'names'], kwargs) + return self._call_api(endpoint, kwargs) + + def post_object_store_accounts( + self, + references=None, # type: List[models.ReferenceType] + names=None, # type: List[str] + x_request_id=None, # type: str + object_store_account=None, # type: models.ObjectStoreAccountPost + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.ObjectStoreAccountResponse + """ + Create an object store account. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides names keyword arguments. + + names (list[str], required): + A list of resource names. + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + object_store_account (ObjectStoreAccountPost, optional): + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + names=names, + x_request_id=x_request_id, + object_store_account=object_store_account, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._object_store_accounts_api.api214_object_store_accounts_post_with_http_info + _process_references(references, ['names'], kwargs) + return self._call_api(endpoint, kwargs) + + def delete_object_store_remote_credentials( + self, + references=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + ids=None, # type: List[str] + names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> None + """ + Delete object store remote credentials. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides ids and names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + ids (list[str], optional): + A list of resource IDs. If after filtering, there is not at least one resource + that matches each of the elements of `ids`, then an error is returned. This + cannot be provided together with the `name` or `names` query parameters. + names (list[str], optional): + A list of resource names. If there is not at least one resource that matches + each of the elements of `names`, then an error is returned. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + ids=ids, + names=names, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._object_store_remote_credentials_api.api214_object_store_remote_credentials_delete_with_http_info + _process_references(references, ['ids', 'names'], kwargs) + return self._call_api(endpoint, kwargs) + + def get_object_store_remote_credentials( + self, + references=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + continuation_token=None, # type: str + filter=None, # type: str + ids=None, # type: List[str] + limit=None, # type: int + names=None, # type: List[str] + offset=None, # type: int + sort=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.ObjectStoreRemoteCredentialGetResp + """ + List object store remote credentials used by bucket replica links to access + buckets on remote arrays or targets. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides ids and names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + continuation_token (str, optional): + An opaque token to iterate over a collection of resources. + filter (Filter, optional): + A filter to include only resources that match the specified criteria. + ids (list[str], optional): + A list of resource IDs. If after filtering, there is not at least one resource + that matches each of the elements of `ids`, then an error is returned. This + cannot be provided together with the `name` or `names` query parameters. + limit (int, optional): + Limit the number of resources in the response. If not specified, defaults to + 1000. + names (list[str], optional): + A list of resource names. If there is not at least one resource that matches + each of the elements of `names`, then an error is returned. + offset (int, optional): + The offset of the first resource to return from a collection. + sort (list[Property], optional): + Sort the response by the specified Properties. Can also be a single element. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + continuation_token=continuation_token, + filter=filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + sort=sort, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._object_store_remote_credentials_api.api214_object_store_remote_credentials_get_with_http_info + _process_references(references, ['ids', 'names'], kwargs) + return self._call_api(endpoint, kwargs) + + def patch_object_store_remote_credentials( + self, + references=None, # type: List[models.ReferenceType] + remote_credentials=None, # type: models.ObjectStoreRemoteCredentials + x_request_id=None, # type: str + ids=None, # type: List[str] + names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.ObjectStoreRemoteCredentialsResp + """ + Rename and/or change the access key/secret key pair for object store remote + credentials. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides ids and names keyword arguments. + + remote_credentials (ObjectStoreRemoteCredentials, required): + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + ids (list[str], optional): + A list of resource IDs. If after filtering, there is not at least one resource + that matches each of the elements of `ids`, then an error is returned. This + cannot be provided together with the `name` or `names` query parameters. + names (list[str], optional): + A list of resource names. If there is not at least one resource that matches + each of the elements of `names`, then an error is returned. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + remote_credentials=remote_credentials, + x_request_id=x_request_id, + ids=ids, + names=names, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._object_store_remote_credentials_api.api214_object_store_remote_credentials_patch_with_http_info + _process_references(references, ['ids', 'names'], kwargs) + return self._call_api(endpoint, kwargs) + + def post_object_store_remote_credentials( + self, + references=None, # type: List[models.ReferenceType] + names=None, # type: List[str] + remote_credentials=None, # type: models.ObjectStoreRemoteCredentialsPost + x_request_id=None, # type: str + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.ObjectStoreRemoteCredentialsResp + """ + Create object store remote credentials to set up bucket replicat links to a + remote array or target. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides names keyword arguments. + + names (list[str], required): + A list of resource names. + remote_credentials (ObjectStoreRemoteCredentialsPost, required): + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + names=names, + remote_credentials=remote_credentials, + x_request_id=x_request_id, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._object_store_remote_credentials_api.api214_object_store_remote_credentials_post_with_http_info + _process_references(references, ['names'], kwargs) + return self._call_api(endpoint, kwargs) + + def delete_object_store_users( + self, + references=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + ids=None, # type: List[str] + names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> None + """ + Delete an object store user. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides ids and names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + ids (list[str], optional): + A list of resource IDs. If after filtering, there is not at least one resource + that matches each of the elements of `ids`, then an error is returned. This + cannot be provided together with the `name` or `names` query parameters. + names (list[str], optional): + A list of resource names. If there is not at least one resource that matches + each of the elements of `names`, then an error is returned. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + ids=ids, + names=names, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._object_store_users_api.api214_object_store_users_delete_with_http_info + _process_references(references, ['ids', 'names'], kwargs) + return self._call_api(endpoint, kwargs) + + def get_object_store_users( + self, + references=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + continuation_token=None, # type: str + filter=None, # type: str + ids=None, # type: List[str] + limit=None, # type: int + names=None, # type: List[str] + offset=None, # type: int + sort=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.ObjectStoreUserGetResponse + """ + List object store users and their attributes. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides ids and names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + continuation_token (str, optional): + An opaque token to iterate over a collection of resources. + filter (Filter, optional): + A filter to include only resources that match the specified criteria. + ids (list[str], optional): + A list of resource IDs. If after filtering, there is not at least one resource + that matches each of the elements of `ids`, then an error is returned. This + cannot be provided together with the `name` or `names` query parameters. + limit (int, optional): + Limit the number of resources in the response. If not specified, defaults to + 1000. + names (list[str], optional): + A list of resource names. If there is not at least one resource that matches + each of the elements of `names`, then an error is returned. + offset (int, optional): + The offset of the first resource to return from a collection. + sort (list[Property], optional): + Sort the response by the specified Properties. Can also be a single element. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + continuation_token=continuation_token, + filter=filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + sort=sort, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._object_store_users_api.api214_object_store_users_get_with_http_info + _process_references(references, ['ids', 'names'], kwargs) + return self._call_api(endpoint, kwargs) + + def delete_object_store_users_object_store_access_policies( + self, + members=None, # type: List[models.ReferenceType] + policies=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + member_ids=None, # type: List[str] + member_names=None, # type: List[str] + policy_ids=None, # type: List[str] + policy_names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> None + """ + Revoke an object store user’s access policy. + + Args: + members (list[FixedReference], optional): + A list of members to query for. Overrides member_ids and member_names keyword arguments. + policies (list[FixedReference], optional): + A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + member_ids (list[str], optional): + A list of member IDs. If after filtering, there is not at least one resource + that matches each of the elements of `member_ids`, then an error is returned. + This cannot be provided together with the `member_names` query parameter. + member_names (list[str], optional): + A list of member names. + policy_ids (list[str], optional): + A list of policy IDs. If after filtering, there is not at least one resource + that matches each of the elements of `policy_ids`, then an error is returned. + This cannot be provided together with the `policy_names` query parameter. + policy_names (list[str], optional): + A list of policy names. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + member_ids=member_ids, + member_names=member_names, + policy_ids=policy_ids, + policy_names=policy_names, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._object_store_users_api.api214_object_store_users_object_store_access_policies_delete_with_http_info + _process_references(members, ['member_ids', 'member_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + return self._call_api(endpoint, kwargs) + + def get_object_store_users_object_store_access_policies( + self, + members=None, # type: List[models.ReferenceType] + policies=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + continuation_token=None, # type: str + filter=None, # type: str + limit=None, # type: int + member_ids=None, # type: List[str] + member_names=None, # type: List[str] + offset=None, # type: int + policy_ids=None, # type: List[str] + policy_names=None, # type: List[str] + sort=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.PolicyMemberGetResponse + """ + List object store users and their access policies. + + Args: + members (list[FixedReference], optional): + A list of members to query for. Overrides member_ids and member_names keyword arguments. + policies (list[FixedReference], optional): + A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + continuation_token (str, optional): + An opaque token to iterate over a collection of resources. + filter (Filter, optional): + A filter to include only resources that match the specified criteria. + limit (int, optional): + Limit the number of resources in the response. If not specified, defaults to + 1000. + member_ids (list[str], optional): + A list of member IDs. If after filtering, there is not at least one resource + that matches each of the elements of `member_ids`, then an error is returned. + This cannot be provided together with the `member_names` query parameter. + member_names (list[str], optional): + A list of member names. + offset (int, optional): + The offset of the first resource to return from a collection. + policy_ids (list[str], optional): + A list of policy IDs. If after filtering, there is not at least one resource + that matches each of the elements of `policy_ids`, then an error is returned. + This cannot be provided together with the `policy_names` query parameter. + policy_names (list[str], optional): + A list of policy names. + sort (list[Property], optional): + Sort the response by the specified Properties. Can also be a single element. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + continuation_token=continuation_token, + filter=filter, + limit=limit, + member_ids=member_ids, + member_names=member_names, + offset=offset, + policy_ids=policy_ids, + policy_names=policy_names, + sort=sort, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._object_store_users_api.api214_object_store_users_object_store_access_policies_get_with_http_info + _process_references(members, ['member_ids', 'member_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + return self._call_api(endpoint, kwargs) + + def post_object_store_users_object_store_access_policies( + self, + members=None, # type: List[models.ReferenceType] + policies=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + member_ids=None, # type: List[str] + member_names=None, # type: List[str] + policy_ids=None, # type: List[str] + policy_names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.PolicyMemberResponse + """ + Grant access policies to an object store user. + + Args: + members (list[FixedReference], optional): + A list of members to query for. Overrides member_ids and member_names keyword arguments. + policies (list[FixedReference], optional): + A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + member_ids (list[str], optional): + A list of member IDs. If after filtering, there is not at least one resource + that matches each of the elements of `member_ids`, then an error is returned. + This cannot be provided together with the `member_names` query parameter. + member_names (list[str], optional): + A list of member names. + policy_ids (list[str], optional): + A list of policy IDs. If after filtering, there is not at least one resource + that matches each of the elements of `policy_ids`, then an error is returned. + This cannot be provided together with the `policy_names` query parameter. + policy_names (list[str], optional): + A list of policy names. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + member_ids=member_ids, + member_names=member_names, + policy_ids=policy_ids, + policy_names=policy_names, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._object_store_users_api.api214_object_store_users_object_store_access_policies_post_with_http_info + _process_references(members, ['member_ids', 'member_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + return self._call_api(endpoint, kwargs) + + def post_object_store_users( + self, + references=None, # type: List[models.ReferenceType] + names=None, # type: List[str] + x_request_id=None, # type: str + full_access=None, # type: bool + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.ObjectStoreUserResponse + """ + Create object store users to administer object storage for an object store + account. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides names keyword arguments. + + names (list[str], required): + A list of resource names. + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + full_access (bool, optional): + If set to `true`, creates an object store user with full permissions. If set to + `false`, creates an object store user with no permission. If not specified, + defaults to `false`. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + names=names, + x_request_id=x_request_id, + full_access=full_access, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._object_store_users_api.api214_object_store_users_post_with_http_info + _process_references(references, ['names'], kwargs) + return self._call_api(endpoint, kwargs) + + def delete_object_store_virtual_hosts( + self, + references=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + ids=None, # type: List[str] + names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> None + """ + Delete an object store virtual host. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides ids and names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + ids (list[str], optional): + A list of resource IDs. If after filtering, there is not at least one resource + that matches each of the elements of `ids`, then an error is returned. This + cannot be provided together with the `name` or `names` query parameters. + names (list[str], optional): + A list of resource names. If there is not at least one resource that matches + each of the elements of `names`, then an error is returned. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + ids=ids, + names=names, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._object_store_virtual_hosts_api.api214_object_store_virtual_hosts_delete_with_http_info + _process_references(references, ['ids', 'names'], kwargs) + return self._call_api(endpoint, kwargs) + + def get_object_store_virtual_hosts( + self, + references=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + continuation_token=None, # type: str + filter=None, # type: str + ids=None, # type: List[str] + limit=None, # type: int + names=None, # type: List[str] + offset=None, # type: int + sort=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.ObjectStoreVirtualHostGetResponse + """ + List object store virtual hosts. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides ids and names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + continuation_token (str, optional): + An opaque token to iterate over a collection of resources. + filter (Filter, optional): + A filter to include only resources that match the specified criteria. + ids (list[str], optional): + A list of resource IDs. If after filtering, there is not at least one resource + that matches each of the elements of `ids`, then an error is returned. This + cannot be provided together with the `name` or `names` query parameters. + limit (int, optional): + Limit the number of resources in the response. If not specified, defaults to + 1000. + names (list[str], optional): + A list of resource names. If there is not at least one resource that matches + each of the elements of `names`, then an error is returned. + offset (int, optional): + The offset of the first resource to return from a collection. + sort (list[Property], optional): + Sort the response by the specified Properties. Can also be a single element. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + continuation_token=continuation_token, + filter=filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + sort=sort, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._object_store_virtual_hosts_api.api214_object_store_virtual_hosts_get_with_http_info + _process_references(references, ['ids', 'names'], kwargs) + return self._call_api(endpoint, kwargs) + + def post_object_store_virtual_hosts( + self, + references=None, # type: List[models.ReferenceType] + names=None, # type: List[str] + x_request_id=None, # type: str + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.ObjectStoreVirtualHostResponse + """ + Create an object store virtual host. An example of a hostname is + buckethost.example.com. A hostname cannot exceed 255 characters in length, it + cannot be an IP address, only 10 hostnames are supported, supersets or subsets + of existing hostnames with the same root are not allowed. The default hostname + is s3.amazonaws.com and it cannot be deleted. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides names keyword arguments. + + names (list[str], required): + A list of resource names. + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + names=names, + x_request_id=x_request_id, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._object_store_virtual_hosts_api.api214_object_store_virtual_hosts_post_with_http_info + _process_references(references, ['names'], kwargs) + return self._call_api(endpoint, kwargs) + + def delete_audit_file_systems_policies( + self, + references=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + ids=None, # type: List[str] + names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> None + """ + Delete one or more audit policies. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides ids and names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + ids (list[str], optional): + A list of resource IDs. If after filtering, there is not at least one resource + that matches each of the elements of `ids`, then an error is returned. This + cannot be provided together with the `name` or `names` query parameters. + names (list[str], optional): + A list of resource names. If there is not at least one resource that matches + each of the elements of `names`, then an error is returned. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + ids=ids, + names=names, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._policies___audit_for_file_systems_api.api214_audit_file_systems_policies_delete_with_http_info + _process_references(references, ['ids', 'names'], kwargs) + return self._call_api(endpoint, kwargs) + + def get_audit_file_systems_policies( + self, + references=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + continuation_token=None, # type: str + filter=None, # type: str + ids=None, # type: List[str] + limit=None, # type: int + names=None, # type: List[str] + offset=None, # type: int + sort=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.AuditFileSystemsPoliciesGetResponse + """ + Displays a list of audit policies for file systems. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides ids and names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + continuation_token (str, optional): + An opaque token to iterate over a collection of resources. + filter (Filter, optional): + A filter to include only resources that match the specified criteria. + ids (list[str], optional): + A list of resource IDs. If after filtering, there is not at least one resource + that matches each of the elements of `ids`, then an error is returned. This + cannot be provided together with the `name` or `names` query parameters. + limit (int, optional): + Limit the number of resources in the response. If not specified, defaults to + 1000. + names (list[str], optional): + A list of resource names. If there is not at least one resource that matches + each of the elements of `names`, then an error is returned. + offset (int, optional): + The offset of the first resource to return from a collection. + sort (list[Property], optional): + Sort the response by the specified Properties. Can also be a single element. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + continuation_token=continuation_token, + filter=filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + sort=sort, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._policies___audit_for_file_systems_api.api214_audit_file_systems_policies_get_with_http_info + _process_references(references, ['ids', 'names'], kwargs) + return self._call_api(endpoint, kwargs) + + def delete_audit_file_systems_policies_members( + self, + members=None, # type: List[models.ReferenceType] + policies=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + member_ids=None, # type: List[str] + member_names=None, # type: List[str] + policy_ids=None, # type: List[str] + policy_names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> None + """ + Remove the audit policy mapped to a file system. + + Args: + members (list[FixedReference], optional): + A list of members to query for. Overrides member_ids and member_names keyword arguments. + policies (list[FixedReference], optional): + A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + member_ids (list[str], optional): + A list of member IDs. If after filtering, there is not at least one resource + that matches each of the elements of `member_ids`, then an error is returned. + This cannot be provided together with the `member_names` query parameter. + member_names (list[str], optional): + A list of member names. + policy_ids (list[str], optional): + A list of policy IDs. If after filtering, there is not at least one resource + that matches each of the elements of `policy_ids`, then an error is returned. + This cannot be provided together with the `policy_names` query parameter. + policy_names (list[str], optional): + A list of policy names. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + member_ids=member_ids, + member_names=member_names, + policy_ids=policy_ids, + policy_names=policy_names, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._policies___audit_for_file_systems_api.api214_audit_file_systems_policies_members_delete_with_http_info + _process_references(members, ['member_ids', 'member_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + return self._call_api(endpoint, kwargs) + + def get_audit_file_systems_policies_members( + self, + members=None, # type: List[models.ReferenceType] + policies=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + continuation_token=None, # type: str + filter=None, # type: str + limit=None, # type: int + member_ids=None, # type: List[str] + member_names=None, # type: List[str] + offset=None, # type: int + policy_ids=None, # type: List[str] + policy_names=None, # type: List[str] + sort=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.AuditFileSystemsPoliciesMembersGetResponse + """ + List file systems mapped to a audit policy. + + Args: + members (list[FixedReference], optional): + A list of members to query for. Overrides member_ids and member_names keyword arguments. + policies (list[FixedReference], optional): + A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + continuation_token (str, optional): + An opaque token to iterate over a collection of resources. + filter (Filter, optional): + A filter to include only resources that match the specified criteria. + limit (int, optional): + Limit the number of resources in the response. If not specified, defaults to + 1000. + member_ids (list[str], optional): + A list of member IDs. If after filtering, there is not at least one resource + that matches each of the elements of `member_ids`, then an error is returned. + This cannot be provided together with the `member_names` query parameter. + member_names (list[str], optional): + A list of member names. + offset (int, optional): + The offset of the first resource to return from a collection. + policy_ids (list[str], optional): + A list of policy IDs. If after filtering, there is not at least one resource + that matches each of the elements of `policy_ids`, then an error is returned. + This cannot be provided together with the `policy_names` query parameter. + policy_names (list[str], optional): + A list of policy names. + sort (list[Property], optional): + Sort the response by the specified Properties. Can also be a single element. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + continuation_token=continuation_token, + filter=filter, + limit=limit, + member_ids=member_ids, + member_names=member_names, + offset=offset, + policy_ids=policy_ids, + policy_names=policy_names, + sort=sort, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._policies___audit_for_file_systems_api.api214_audit_file_systems_policies_members_get_with_http_info + _process_references(members, ['member_ids', 'member_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + return self._call_api(endpoint, kwargs) + + def post_audit_file_systems_policies_members( + self, + members=None, # type: List[models.ReferenceType] + policies=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + member_ids=None, # type: List[str] + member_names=None, # type: List[str] + policy_ids=None, # type: List[str] + policy_names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.AuditFileSystemsPoliciesMembersResponse + """ + Map a file system to a audit policy. + + Args: + members (list[FixedReference], optional): + A list of members to query for. Overrides member_ids and member_names keyword arguments. + policies (list[FixedReference], optional): + A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + member_ids (list[str], optional): + A list of member IDs. If after filtering, there is not at least one resource + that matches each of the elements of `member_ids`, then an error is returned. + This cannot be provided together with the `member_names` query parameter. + member_names (list[str], optional): + A list of member names. + policy_ids (list[str], optional): + A list of policy IDs. If after filtering, there is not at least one resource + that matches each of the elements of `policy_ids`, then an error is returned. + This cannot be provided together with the `policy_names` query parameter. + policy_names (list[str], optional): + A list of policy names. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + member_ids=member_ids, + member_names=member_names, + policy_ids=policy_ids, + policy_names=policy_names, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._policies___audit_for_file_systems_api.api214_audit_file_systems_policies_members_post_with_http_info + _process_references(members, ['member_ids', 'member_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + return self._call_api(endpoint, kwargs) + + def patch_audit_file_systems_policies( + self, + references=None, # type: List[models.ReferenceType] + policy=None, # type: models.AuditFileSystemsPoliciesPatch + x_request_id=None, # type: str + ids=None, # type: List[str] + names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.AuditFileSystemsPoliciesResponse + """ + Modify an existing audit policy's attributes. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides ids and names keyword arguments. + + policy (AuditFileSystemsPoliciesPatch, required): + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + ids (list[str], optional): + A list of resource IDs. If after filtering, there is not at least one resource + that matches each of the elements of `ids`, then an error is returned. This + cannot be provided together with the `name` or `names` query parameters. + names (list[str], optional): + A list of resource names. If there is not at least one resource that matches + each of the elements of `names`, then an error is returned. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + policy=policy, + x_request_id=x_request_id, + ids=ids, + names=names, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._policies___audit_for_file_systems_api.api214_audit_file_systems_policies_patch_with_http_info + _process_references(references, ['ids', 'names'], kwargs) + return self._call_api(endpoint, kwargs) + + def post_audit_file_systems_policies( + self, + references=None, # type: List[models.ReferenceType] + names=None, # type: List[str] + x_request_id=None, # type: str + policy=None, # type: models.AuditFileSystemsPoliciesPost + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.AuditFileSystemsPoliciesResponse + """ + Create a new audit policy for file systems. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides names keyword arguments. + + names (list[str], required): + A list of resource names. + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + policy (AuditFileSystemsPoliciesPost, optional): + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + names=names, + x_request_id=x_request_id, + policy=policy, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._policies___audit_for_file_systems_api.api214_audit_file_systems_policies_post_with_http_info + _process_references(references, ['names'], kwargs) + return self._call_api(endpoint, kwargs) + + def get_network_access_policies( + self, + references=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + continuation_token=None, # type: str + filter=None, # type: str + ids=None, # type: List[str] + limit=None, # type: int + names=None, # type: List[str] + offset=None, # type: int + sort=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.NetworkAccessPolicyGetResponse + """ + Displays a list of network access policies. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides ids and names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + continuation_token (str, optional): + An opaque token to iterate over a collection of resources. + filter (Filter, optional): + A filter to include only resources that match the specified criteria. + ids (list[str], optional): + A list of resource IDs. If after filtering, there is not at least one resource + that matches each of the elements of `ids`, then an error is returned. This + cannot be provided together with the `name` or `names` query parameters. + limit (int, optional): + Limit the number of resources in the response. If not specified, defaults to + 1000. + names (list[str], optional): + A list of resource names. If there is not at least one resource that matches + each of the elements of `names`, then an error is returned. + offset (int, optional): + The offset of the first resource to return from a collection. + sort (list[Property], optional): + Sort the response by the specified Properties. Can also be a single element. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + continuation_token=continuation_token, + filter=filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + sort=sort, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._policies___network_access_api.api214_network_access_policies_get_with_http_info + _process_references(references, ['ids', 'names'], kwargs) + return self._call_api(endpoint, kwargs) + + def get_network_access_policies_members( + self, + members=None, # type: List[models.ReferenceType] + policies=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + continuation_token=None, # type: str + filter=None, # type: str + limit=None, # type: int + member_ids=None, # type: List[str] + member_names=None, # type: List[str] + offset=None, # type: int + policy_ids=None, # type: List[str] + policy_names=None, # type: List[str] + sort=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.PolicyMemberGetResponse + """ + List network access policies mapped to different configurations on the array. + + Args: + members (list[FixedReference], optional): + A list of members to query for. Overrides member_ids and member_names keyword arguments. + policies (list[FixedReference], optional): + A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + continuation_token (str, optional): + An opaque token to iterate over a collection of resources. + filter (Filter, optional): + A filter to include only resources that match the specified criteria. + limit (int, optional): + Limit the number of resources in the response. If not specified, defaults to + 1000. + member_ids (list[str], optional): + A list of member IDs. If after filtering, there is not at least one resource + that matches each of the elements of `member_ids`, then an error is returned. + This cannot be provided together with the `member_names` query parameter. + member_names (list[str], optional): + A list of member names. + offset (int, optional): + The offset of the first resource to return from a collection. + policy_ids (list[str], optional): + A list of policy IDs. If after filtering, there is not at least one resource + that matches each of the elements of `policy_ids`, then an error is returned. + This cannot be provided together with the `policy_names` query parameter. + policy_names (list[str], optional): + A list of policy names. + sort (list[Property], optional): + Sort the response by the specified Properties. Can also be a single element. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + continuation_token=continuation_token, + filter=filter, + limit=limit, + member_ids=member_ids, + member_names=member_names, + offset=offset, + policy_ids=policy_ids, + policy_names=policy_names, + sort=sort, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._policies___network_access_api.api214_network_access_policies_members_get_with_http_info + _process_references(members, ['member_ids', 'member_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + return self._call_api(endpoint, kwargs) + + def patch_network_access_policies( + self, + references=None, # type: List[models.ReferenceType] + policy=None, # type: models.NetworkAccessPolicy + x_request_id=None, # type: str + ids=None, # type: List[str] + names=None, # type: List[str] + versions=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.NetworkAccessPolicyResponse + """ + Modify an existing network access policy's attributes. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides ids and names keyword arguments. + + policy (NetworkAccessPolicy, required): + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + ids (list[str], optional): + A list of resource IDs. If after filtering, there is not at least one resource + that matches each of the elements of `ids`, then an error is returned. This + cannot be provided together with the `name` or `names` query parameters. + names (list[str], optional): + A list of resource names. If there is not at least one resource that matches + each of the elements of `names`, then an error is returned. + versions (list[str], optional): + A list of versions. This is an optional query param used for concurrency + control. The ordering should match the names or ids query param. This will fail + with a 412 Precondition failed if the resource was changed and the current + version of the resource doesn't match the value in the query param. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + policy=policy, + x_request_id=x_request_id, + ids=ids, + names=names, + versions=versions, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._policies___network_access_api.api214_network_access_policies_patch_with_http_info + _process_references(references, ['ids', 'names'], kwargs) + return self._call_api(endpoint, kwargs) + + def delete_network_access_policies_rules( + self, + references=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + ids=None, # type: List[str] + names=None, # type: List[str] + versions=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> None + """ + Delete one or more network access policy rules. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides ids and names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + ids (list[str], optional): + A list of resource IDs. If after filtering, there is not at least one resource + that matches each of the elements of `ids`, then an error is returned. This + cannot be provided together with the `name` or `names` query parameters. + names (list[str], optional): + A list of resource names. If there is not at least one resource that matches + each of the elements of `names`, then an error is returned. + versions (list[str], optional): + A list of versions. This is an optional query param used for concurrency + control. The ordering should match the names or ids query param. This will fail + with a 412 Precondition failed if the resource was changed and the current + version of the resource doesn't match the value in the query param. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + ids=ids, + names=names, + versions=versions, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._policies___network_access_api.api214_network_access_policies_rules_delete_with_http_info + _process_references(references, ['ids', 'names'], kwargs) + return self._call_api(endpoint, kwargs) + + def get_network_access_policies_rules( + self, + references=None, # type: List[models.ReferenceType] + policies=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + continuation_token=None, # type: str + filter=None, # type: str + ids=None, # type: List[str] + limit=None, # type: int + names=None, # type: List[str] + offset=None, # type: int + policy_ids=None, # type: List[str] + policy_names=None, # type: List[str] + sort=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.NetworkAccessPolicyRuleGetResponse + """ + Displays a list of network access policy rules. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides ids and names keyword arguments. + policies (list[FixedReference], optional): + A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + continuation_token (str, optional): + An opaque token to iterate over a collection of resources. + filter (Filter, optional): + A filter to include only resources that match the specified criteria. + ids (list[str], optional): + A list of resource IDs. If after filtering, there is not at least one resource + that matches each of the elements of `ids`, then an error is returned. This + cannot be provided together with the `name` or `names` query parameters. + limit (int, optional): + Limit the number of resources in the response. If not specified, defaults to + 1000. + names (list[str], optional): + A list of resource names. If there is not at least one resource that matches + each of the elements of `names`, then an error is returned. + offset (int, optional): + The offset of the first resource to return from a collection. + policy_ids (list[str], optional): + A list of policy IDs. If after filtering, there is not at least one resource + that matches each of the elements of `policy_ids`, then an error is returned. + This cannot be provided together with the `policy_names` query parameter. + policy_names (list[str], optional): + A list of policy names. + sort (list[Property], optional): + Sort the response by the specified Properties. Can also be a single element. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + continuation_token=continuation_token, + filter=filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + policy_ids=policy_ids, + policy_names=policy_names, + sort=sort, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._policies___network_access_api.api214_network_access_policies_rules_get_with_http_info + _process_references(references, ['ids', 'names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + return self._call_api(endpoint, kwargs) + + def patch_network_access_policies_rules( + self, + references=None, # type: List[models.ReferenceType] + rule=None, # type: models.NetworkAccessPolicyRule + x_request_id=None, # type: str + before_rule_id=None, # type: str + before_rule_name=None, # type: str + ids=None, # type: List[str] + names=None, # type: List[str] + versions=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.NetworkAccessPolicyRuleResponse + """ + Modify an existing network access policy rule. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides ids and names keyword arguments. + + rule (NetworkAccessPolicyRule, required): + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + before_rule_id (str, optional): + The id of the rule to insert or move a rule before. This cannot be provided + together with the `before_rule_name` query parameter. + before_rule_name (str, optional): + The name of the rule to insert or move a rule before. This cannot be provided + together with the `before_rule_id` query parameter. + ids (list[str], optional): + A list of resource IDs. If after filtering, there is not at least one resource + that matches each of the elements of `ids`, then an error is returned. This + cannot be provided together with the `name` or `names` query parameters. + names (list[str], optional): + A list of resource names. If there is not at least one resource that matches + each of the elements of `names`, then an error is returned. + versions (list[str], optional): + A list of versions. This is an optional query param used for concurrency + control. The ordering should match the names or ids query param. This will fail + with a 412 Precondition failed if the resource was changed and the current + version of the resource doesn't match the value in the query param. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + rule=rule, + x_request_id=x_request_id, + before_rule_id=before_rule_id, + before_rule_name=before_rule_name, + ids=ids, + names=names, + versions=versions, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._policies___network_access_api.api214_network_access_policies_rules_patch_with_http_info + _process_references(references, ['ids', 'names'], kwargs) + return self._call_api(endpoint, kwargs) + + def post_network_access_policies_rules( + self, + policies=None, # type: List[models.ReferenceType] + rule=None, # type: models.NetworkAccessPolicyRulePost + x_request_id=None, # type: str + before_rule_id=None, # type: str + before_rule_name=None, # type: str + policy_ids=None, # type: List[str] + policy_names=None, # type: List[str] + versions=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.NetworkAccessPolicyRuleResponse + """ + Create a new network access policy rule. Either `policy_ids` or `policy_names` + parameter is required. + + Args: + policies (list[FixedReference], optional): + A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + + rule (NetworkAccessPolicyRulePost, required): + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + before_rule_id (str, optional): + The id of the rule to insert or move a rule before. This cannot be provided + together with the `before_rule_name` query parameter. + before_rule_name (str, optional): + The name of the rule to insert or move a rule before. This cannot be provided + together with the `before_rule_id` query parameter. + policy_ids (list[str], optional): + A list of policy IDs. If after filtering, there is not at least one resource + that matches each of the elements of `policy_ids`, then an error is returned. + This cannot be provided together with the `policy_names` query parameter. + policy_names (list[str], optional): + A list of policy names. + versions (list[str], optional): + A list of versions. This is an optional query param used for concurrency + control. The ordering should match the names or ids query param. This will fail + with a 412 Precondition failed if the resource was changed and the current + version of the resource doesn't match the value in the query param. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + rule=rule, + x_request_id=x_request_id, + before_rule_id=before_rule_id, + before_rule_name=before_rule_name, + policy_ids=policy_ids, + policy_names=policy_names, + versions=versions, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._policies___network_access_api.api214_network_access_policies_rules_post_with_http_info + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + return self._call_api(endpoint, kwargs) + + def delete_nfs_export_policies( + self, + references=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + ids=None, # type: List[str] + names=None, # type: List[str] + versions=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> None + """ + Delete one or more NFS export policies. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides ids and names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + ids (list[str], optional): + A list of resource IDs. If after filtering, there is not at least one resource + that matches each of the elements of `ids`, then an error is returned. This + cannot be provided together with the `name` or `names` query parameters. + names (list[str], optional): + A list of resource names. If there is not at least one resource that matches + each of the elements of `names`, then an error is returned. + versions (list[str], optional): + A list of versions. This is an optional query param used for concurrency + control. The ordering should match the names or ids query param. This will fail + with a 412 Precondition failed if the resource was changed and the current + version of the resource doesn't match the value in the query param. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + ids=ids, + names=names, + versions=versions, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._policies___nfs_api.api214_nfs_export_policies_delete_with_http_info + _process_references(references, ['ids', 'names'], kwargs) + return self._call_api(endpoint, kwargs) + + def get_nfs_export_policies( + self, + references=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + continuation_token=None, # type: str + filter=None, # type: str + ids=None, # type: List[str] + limit=None, # type: int + names=None, # type: List[str] + offset=None, # type: int + sort=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.NfsExportPolicyGetResponse + """ + Displays a list of NFS export policies. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides ids and names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + continuation_token (str, optional): + An opaque token to iterate over a collection of resources. + filter (Filter, optional): + A filter to include only resources that match the specified criteria. + ids (list[str], optional): + A list of resource IDs. If after filtering, there is not at least one resource + that matches each of the elements of `ids`, then an error is returned. This + cannot be provided together with the `name` or `names` query parameters. + limit (int, optional): + Limit the number of resources in the response. If not specified, defaults to + 1000. + names (list[str], optional): + A list of resource names. If there is not at least one resource that matches + each of the elements of `names`, then an error is returned. + offset (int, optional): + The offset of the first resource to return from a collection. + sort (list[Property], optional): + Sort the response by the specified Properties. Can also be a single element. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + continuation_token=continuation_token, + filter=filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + sort=sort, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._policies___nfs_api.api214_nfs_export_policies_get_with_http_info + _process_references(references, ['ids', 'names'], kwargs) + return self._call_api(endpoint, kwargs) + + def patch_nfs_export_policies( + self, + references=None, # type: List[models.ReferenceType] + policy=None, # type: models.NfsExportPolicy + x_request_id=None, # type: str + ids=None, # type: List[str] + names=None, # type: List[str] + versions=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.NfsExportPolicyResponse + """ + Modify an existing NFS export policy's attributes. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides ids and names keyword arguments. + + policy (NfsExportPolicy, required): + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + ids (list[str], optional): + A list of resource IDs. If after filtering, there is not at least one resource + that matches each of the elements of `ids`, then an error is returned. This + cannot be provided together with the `name` or `names` query parameters. + names (list[str], optional): + A list of resource names. If there is not at least one resource that matches + each of the elements of `names`, then an error is returned. + versions (list[str], optional): + A list of versions. This is an optional query param used for concurrency + control. The ordering should match the names or ids query param. This will fail + with a 412 Precondition failed if the resource was changed and the current + version of the resource doesn't match the value in the query param. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + policy=policy, + x_request_id=x_request_id, + ids=ids, + names=names, + versions=versions, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._policies___nfs_api.api214_nfs_export_policies_patch_with_http_info + _process_references(references, ['ids', 'names'], kwargs) + return self._call_api(endpoint, kwargs) + + def post_nfs_export_policies( + self, + references=None, # type: List[models.ReferenceType] + names=None, # type: List[str] + x_request_id=None, # type: str + policy=None, # type: models.NfsExportPolicyPost + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.NfsExportPolicyResponse + """ + Create a new NFS export policy. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides names keyword arguments. + + names (list[str], required): + A list of resource names. + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + policy (NfsExportPolicyPost, optional): + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + names=names, + x_request_id=x_request_id, + policy=policy, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._policies___nfs_api.api214_nfs_export_policies_post_with_http_info + _process_references(references, ['names'], kwargs) + return self._call_api(endpoint, kwargs) + + def delete_nfs_export_policies_rules( + self, + references=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + ids=None, # type: List[str] + names=None, # type: List[str] + versions=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> None + """ + Delete one or more NFS export policy rules. One of the following is required: + `ids` or `names`. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides ids and names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + ids (list[str], optional): + A list of resource IDs. If after filtering, there is not at least one resource + that matches each of the elements of `ids`, then an error is returned. This + cannot be provided together with the `name` or `names` query parameters. + names (list[str], optional): + A list of resource names. If there is not at least one resource that matches + each of the elements of `names`, then an error is returned. + versions (list[str], optional): + A list of versions. This is an optional query param used for concurrency + control. The ordering should match the names or ids query param. This will fail + with a 412 Precondition failed if the resource was changed and the current + version of the resource doesn't match the value in the query param. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + ids=ids, + names=names, + versions=versions, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._policies___nfs_api.api214_nfs_export_policies_rules_delete_with_http_info + _process_references(references, ['ids', 'names'], kwargs) + return self._call_api(endpoint, kwargs) + + def get_nfs_export_policies_rules( + self, + references=None, # type: List[models.ReferenceType] + policies=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + continuation_token=None, # type: str + filter=None, # type: str + ids=None, # type: List[str] + limit=None, # type: int + names=None, # type: List[str] + offset=None, # type: int + policy_ids=None, # type: List[str] + policy_names=None, # type: List[str] + sort=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.NfsExportPolicyRuleGetResponse + """ + Displays a list of NFS export policy rules. The default sort is by policy name, + then index. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides ids and names keyword arguments. + policies (list[FixedReference], optional): + A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + continuation_token (str, optional): + An opaque token to iterate over a collection of resources. + filter (Filter, optional): + A filter to include only resources that match the specified criteria. + ids (list[str], optional): + A list of resource IDs. If after filtering, there is not at least one resource + that matches each of the elements of `ids`, then an error is returned. This + cannot be provided together with the `name` or `names` query parameters. + limit (int, optional): + Limit the number of resources in the response. If not specified, defaults to + 1000. + names (list[str], optional): + A list of resource names. If there is not at least one resource that matches + each of the elements of `names`, then an error is returned. + offset (int, optional): + The offset of the first resource to return from a collection. + policy_ids (list[str], optional): + A list of policy IDs. If after filtering, there is not at least one resource + that matches each of the elements of `policy_ids`, then an error is returned. + This cannot be provided together with the `policy_names` query parameter. + policy_names (list[str], optional): + A list of policy names. + sort (list[Property], optional): + Sort the response by the specified Properties. Can also be a single element. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + continuation_token=continuation_token, + filter=filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + policy_ids=policy_ids, + policy_names=policy_names, + sort=sort, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._policies___nfs_api.api214_nfs_export_policies_rules_get_with_http_info + _process_references(references, ['ids', 'names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + return self._call_api(endpoint, kwargs) + + def patch_nfs_export_policies_rules( + self, + references=None, # type: List[models.ReferenceType] + rule=None, # type: models.NfsExportPolicyRule + x_request_id=None, # type: str + before_rule_id=None, # type: str + before_rule_name=None, # type: str + ids=None, # type: List[str] + names=None, # type: List[str] + versions=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.NfsExportPolicyRuleResponse + """ + Modify an existing NFS export policy rule. If `before_rule_id` or + `before_rule_name` are specified, the rule will be moved before that rule. Rules + are ordered in three groups; ip addresses, other and `*` and can only be moved + within the appropriate group. One of the following is required: `ids` or + `names`. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides ids and names keyword arguments. + + rule (NfsExportPolicyRule, required): + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + before_rule_id (str, optional): + The id of the rule to insert or move a rule before. This cannot be provided + together with the `before_rule_name` query parameter. + before_rule_name (str, optional): + The name of the rule to insert or move a rule before. This cannot be provided + together with the `before_rule_id` query parameter. + ids (list[str], optional): + A list of resource IDs. If after filtering, there is not at least one resource + that matches each of the elements of `ids`, then an error is returned. This + cannot be provided together with the `name` or `names` query parameters. + names (list[str], optional): + A list of resource names. If there is not at least one resource that matches + each of the elements of `names`, then an error is returned. + versions (list[str], optional): + A list of versions. This is an optional query param used for concurrency + control. The ordering should match the names or ids query param. This will fail + with a 412 Precondition failed if the resource was changed and the current + version of the resource doesn't match the value in the query param. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + rule=rule, + x_request_id=x_request_id, + before_rule_id=before_rule_id, + before_rule_name=before_rule_name, + ids=ids, + names=names, + versions=versions, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._policies___nfs_api.api214_nfs_export_policies_rules_patch_with_http_info + _process_references(references, ['ids', 'names'], kwargs) + return self._call_api(endpoint, kwargs) + + def post_nfs_export_policies_rules( + self, + policies=None, # type: List[models.ReferenceType] + rule=None, # type: models.NfsExportPolicyRule + x_request_id=None, # type: str + before_rule_id=None, # type: str + before_rule_name=None, # type: str + policy_ids=None, # type: List[str] + policy_names=None, # type: List[str] + versions=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.NfsExportPolicyRuleResponse + """ + Add a NFS export policy rule. Rules are ordered in three groups; ip addresses, + other and `*`. The new rule will be added at the end of the appropriate group if + neither `before_rule_id` and `before_rule_name` are specified. Rules can only be + inserted into the appropriate group. Either `policy_ids` or `policy_names` + parameter is required. + + Args: + policies (list[FixedReference], optional): + A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + + rule (NfsExportPolicyRule, required): + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + before_rule_id (str, optional): + The id of the rule to insert or move a rule before. This cannot be provided + together with the `before_rule_name` query parameter. + before_rule_name (str, optional): + The name of the rule to insert or move a rule before. This cannot be provided + together with the `before_rule_id` query parameter. + policy_ids (list[str], optional): + A list of policy IDs. If after filtering, there is not at least one resource + that matches each of the elements of `policy_ids`, then an error is returned. + This cannot be provided together with the `policy_names` query parameter. + policy_names (list[str], optional): + A list of policy names. + versions (list[str], optional): + A list of versions. This is an optional query param used for concurrency + control. The ordering should match the names or ids query param. This will fail + with a 412 Precondition failed if the resource was changed and the current + version of the resource doesn't match the value in the query param. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + rule=rule, + x_request_id=x_request_id, + before_rule_id=before_rule_id, + before_rule_name=before_rule_name, + policy_ids=policy_ids, + policy_names=policy_names, + versions=versions, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._policies___nfs_api.api214_nfs_export_policies_rules_post_with_http_info + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + return self._call_api(endpoint, kwargs) + + def delete_object_store_access_policies( + self, + references=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + ids=None, # type: List[str] + names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> None + """ + Delete one or more access policies. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides ids and names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + ids (list[str], optional): + A list of resource IDs. If after filtering, there is not at least one resource + that matches each of the elements of `ids`, then an error is returned. This + cannot be provided together with the `name` or `names` query parameters. + names (list[str], optional): + A list of resource names. If there is not at least one resource that matches + each of the elements of `names`, then an error is returned. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + ids=ids, + names=names, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._policies___object_store_access_api.api214_object_store_access_policies_delete_with_http_info + _process_references(references, ['ids', 'names'], kwargs) + return self._call_api(endpoint, kwargs) + + def get_object_store_access_policies( + self, + references=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + continuation_token=None, # type: str + exclude_rules=None, # type: bool + filter=None, # type: str + ids=None, # type: List[str] + limit=None, # type: int + names=None, # type: List[str] + offset=None, # type: int + sort=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.ObjectStoreAccessPolicyGetResponse + """ + List access policies and their attributes. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides ids and names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + continuation_token (str, optional): + An opaque token to iterate over a collection of resources. + exclude_rules (bool, optional): + If true, the rules field in each policy will be null. If false, each returned + policy will include its list of rules in the response. If not specified, + defaults to `false`. + filter (Filter, optional): + A filter to include only resources that match the specified criteria. + ids (list[str], optional): + A list of resource IDs. If after filtering, there is not at least one resource + that matches each of the elements of `ids`, then an error is returned. This + cannot be provided together with the `name` or `names` query parameters. + limit (int, optional): + Limit the number of resources in the response. If not specified, defaults to + 1000. + names (list[str], optional): + A list of resource names. If there is not at least one resource that matches + each of the elements of `names`, then an error is returned. + offset (int, optional): + The offset of the first resource to return from a collection. + sort (list[Property], optional): + Sort the response by the specified Properties. Can also be a single element. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + continuation_token=continuation_token, + exclude_rules=exclude_rules, + filter=filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + sort=sort, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._policies___object_store_access_api.api214_object_store_access_policies_get_with_http_info + _process_references(references, ['ids', 'names'], kwargs) + return self._call_api(endpoint, kwargs) + + def delete_object_store_access_policies_object_store_users( + self, + members=None, # type: List[models.ReferenceType] + policies=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + member_ids=None, # type: List[str] + member_names=None, # type: List[str] + policy_ids=None, # type: List[str] + policy_names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> None + """ + Revokes an object store user's access policy. + + Args: + members (list[FixedReference], optional): + A list of members to query for. Overrides member_ids and member_names keyword arguments. + policies (list[FixedReference], optional): + A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + member_ids (list[str], optional): + A list of member IDs. If after filtering, there is not at least one resource + that matches each of the elements of `member_ids`, then an error is returned. + This cannot be provided together with the `member_names` query parameter. + member_names (list[str], optional): + A list of member names. + policy_ids (list[str], optional): + A list of policy IDs. If after filtering, there is not at least one resource + that matches each of the elements of `policy_ids`, then an error is returned. + This cannot be provided together with the `policy_names` query parameter. + policy_names (list[str], optional): + A list of policy names. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + member_ids=member_ids, + member_names=member_names, + policy_ids=policy_ids, + policy_names=policy_names, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._policies___object_store_access_api.api214_object_store_access_policies_object_store_users_delete_with_http_info + _process_references(members, ['member_ids', 'member_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + return self._call_api(endpoint, kwargs) + + def get_object_store_access_policies_object_store_users( + self, + members=None, # type: List[models.ReferenceType] + policies=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + continuation_token=None, # type: str + filter=None, # type: str + limit=None, # type: int + member_ids=None, # type: List[str] + member_names=None, # type: List[str] + offset=None, # type: int + policy_ids=None, # type: List[str] + policy_names=None, # type: List[str] + sort=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.PolicyMemberGetResponse + """ + List object store users and their access policies. + + Args: + members (list[FixedReference], optional): + A list of members to query for. Overrides member_ids and member_names keyword arguments. + policies (list[FixedReference], optional): + A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + continuation_token (str, optional): + An opaque token to iterate over a collection of resources. + filter (Filter, optional): + A filter to include only resources that match the specified criteria. + limit (int, optional): + Limit the number of resources in the response. If not specified, defaults to + 1000. + member_ids (list[str], optional): + A list of member IDs. If after filtering, there is not at least one resource + that matches each of the elements of `member_ids`, then an error is returned. + This cannot be provided together with the `member_names` query parameter. + member_names (list[str], optional): + A list of member names. + offset (int, optional): + The offset of the first resource to return from a collection. + policy_ids (list[str], optional): + A list of policy IDs. If after filtering, there is not at least one resource + that matches each of the elements of `policy_ids`, then an error is returned. + This cannot be provided together with the `policy_names` query parameter. + policy_names (list[str], optional): + A list of policy names. + sort (list[Property], optional): + Sort the response by the specified Properties. Can also be a single element. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + continuation_token=continuation_token, + filter=filter, + limit=limit, + member_ids=member_ids, + member_names=member_names, + offset=offset, + policy_ids=policy_ids, + policy_names=policy_names, + sort=sort, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._policies___object_store_access_api.api214_object_store_access_policies_object_store_users_get_with_http_info + _process_references(members, ['member_ids', 'member_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + return self._call_api(endpoint, kwargs) + + def post_object_store_access_policies_object_store_users( + self, + members=None, # type: List[models.ReferenceType] + policies=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + member_ids=None, # type: List[str] + member_names=None, # type: List[str] + policy_ids=None, # type: List[str] + policy_names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.PolicyMemberResponse + """ + Grant access policies to an object store user. + + Args: + members (list[FixedReference], optional): + A list of members to query for. Overrides member_ids and member_names keyword arguments. + policies (list[FixedReference], optional): + A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + member_ids (list[str], optional): + A list of member IDs. If after filtering, there is not at least one resource + that matches each of the elements of `member_ids`, then an error is returned. + This cannot be provided together with the `member_names` query parameter. + member_names (list[str], optional): + A list of member names. + policy_ids (list[str], optional): + A list of policy IDs. If after filtering, there is not at least one resource + that matches each of the elements of `policy_ids`, then an error is returned. + This cannot be provided together with the `policy_names` query parameter. + policy_names (list[str], optional): + A list of policy names. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + member_ids=member_ids, + member_names=member_names, + policy_ids=policy_ids, + policy_names=policy_names, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._policies___object_store_access_api.api214_object_store_access_policies_object_store_users_post_with_http_info + _process_references(members, ['member_ids', 'member_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + return self._call_api(endpoint, kwargs) + + def patch_object_store_access_policies( + self, + references=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + enforce_action_restrictions=None, # type: bool + ids=None, # type: List[str] + names=None, # type: List[str] + policy=None, # type: models.ObjectStoreAccessPolicyPatch + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.ObjectStoreAccessPolicyResponse + """ + Modify the rules of an object store access policy. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides ids and names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + enforce_action_restrictions (bool, optional): + Certain combinations of actions and other rule elements are inherently ignored + if specified together in a rule. If set to `true`, operations which attempt to + set these combinations will fail. If set to `false`, such operations will + instead be allowed. Defaults to `true`. + ids (list[str], optional): + A list of resource IDs. If after filtering, there is not at least one resource + that matches each of the elements of `ids`, then an error is returned. This + cannot be provided together with the `name` or `names` query parameters. + names (list[str], optional): + A list of resource names. If there is not at least one resource that matches + each of the elements of `names`, then an error is returned. + policy (ObjectStoreAccessPolicyPatch, optional): + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + enforce_action_restrictions=enforce_action_restrictions, + ids=ids, + names=names, + policy=policy, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._policies___object_store_access_api.api214_object_store_access_policies_patch_with_http_info + _process_references(references, ['ids', 'names'], kwargs) + return self._call_api(endpoint, kwargs) + + def post_object_store_access_policies( + self, + references=None, # type: List[models.ReferenceType] + names=None, # type: List[str] + x_request_id=None, # type: str + enforce_action_restrictions=None, # type: bool + policy=None, # type: models.ObjectStoreAccessPolicyPost + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.ObjectStoreAccessPolicyResponse + """ + Create a new access policy. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides names keyword arguments. + + names (list[str], required): + A list of resource names. + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + enforce_action_restrictions (bool, optional): + Certain combinations of actions and other rule elements are inherently ignored + if specified together in a rule. If set to `true`, operations which attempt to + set these combinations will fail. If set to `false`, such operations will + instead be allowed. Defaults to `true`. + policy (ObjectStoreAccessPolicyPost, optional): + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + names=names, + x_request_id=x_request_id, + enforce_action_restrictions=enforce_action_restrictions, + policy=policy, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._policies___object_store_access_api.api214_object_store_access_policies_post_with_http_info + _process_references(references, ['names'], kwargs) + return self._call_api(endpoint, kwargs) + + def delete_object_store_access_policies_rules( + self, + references=None, # type: List[models.ReferenceType] + policies=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + names=None, # type: List[str] + policy_ids=None, # type: List[str] + policy_names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> None + """ + Delete one or more access policy rules. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides names keyword arguments. + policies (list[FixedReference], optional): + A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + names (list[str], optional): + A list of resource names. If there is not at least one resource that matches + each of the elements of `names`, then an error is returned. + policy_ids (list[str], optional): + A list of policy IDs. If after filtering, there is not at least one resource + that matches each of the elements of `policy_ids`, then an error is returned. + This cannot be provided together with the `policy_names` query parameter. + policy_names (list[str], optional): + A list of policy names. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + names=names, + policy_ids=policy_ids, + policy_names=policy_names, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._policies___object_store_access_api.api214_object_store_access_policies_rules_delete_with_http_info + _process_references(references, ['names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + return self._call_api(endpoint, kwargs) + + def get_object_store_access_policies_rules( + self, + references=None, # type: List[models.ReferenceType] + policies=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + continuation_token=None, # type: str + filter=None, # type: str + limit=None, # type: int + names=None, # type: List[str] + offset=None, # type: int + policy_ids=None, # type: List[str] + policy_names=None, # type: List[str] + sort=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.ObjectStoreAccessPolicyRuleGetResponse + """ + List access policy rules and their attributes. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides names keyword arguments. + policies (list[FixedReference], optional): + A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + continuation_token (str, optional): + An opaque token to iterate over a collection of resources. + filter (Filter, optional): + A filter to include only resources that match the specified criteria. + limit (int, optional): + Limit the number of resources in the response. If not specified, defaults to + 1000. + names (list[str], optional): + A list of resource names. If there is not at least one resource that matches + each of the elements of `names`, then an error is returned. + offset (int, optional): + The offset of the first resource to return from a collection. + policy_ids (list[str], optional): + A list of policy IDs. If after filtering, there is not at least one resource + that matches each of the elements of `policy_ids`, then an error is returned. + This cannot be provided together with the `policy_names` query parameter. + policy_names (list[str], optional): + A list of policy names. + sort (list[Property], optional): + Sort the response by the specified Properties. Can also be a single element. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + continuation_token=continuation_token, + filter=filter, + limit=limit, + names=names, + offset=offset, + policy_ids=policy_ids, + policy_names=policy_names, + sort=sort, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._policies___object_store_access_api.api214_object_store_access_policies_rules_get_with_http_info + _process_references(references, ['names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + return self._call_api(endpoint, kwargs) + + def patch_object_store_access_policies_rules( + self, + references=None, # type: List[models.ReferenceType] + policies=None, # type: List[models.ReferenceType] + rule=None, # type: models.PolicyRuleObjectAccessPost + x_request_id=None, # type: str + enforce_action_restrictions=None, # type: bool + names=None, # type: List[str] + policy_ids=None, # type: List[str] + policy_names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.ObjectStoreAccessPolicyRuleResponse + """ + Modify an access policy rule's attributes. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides names keyword arguments. + policies (list[FixedReference], optional): + A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + + rule (PolicyRuleObjectAccessPost, required): + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + enforce_action_restrictions (bool, optional): + Certain combinations of actions and other rule elements are inherently ignored + if specified together in a rule. If set to `true`, operations which attempt to + set these combinations will fail. If set to `false`, such operations will + instead be allowed. Defaults to `true`. + names (list[str], optional): + A list of resource names. If there is not at least one resource that matches + each of the elements of `names`, then an error is returned. + policy_ids (list[str], optional): + A list of policy IDs. If after filtering, there is not at least one resource + that matches each of the elements of `policy_ids`, then an error is returned. + This cannot be provided together with the `policy_names` query parameter. + policy_names (list[str], optional): + A list of policy names. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + rule=rule, + x_request_id=x_request_id, + enforce_action_restrictions=enforce_action_restrictions, + names=names, + policy_ids=policy_ids, + policy_names=policy_names, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._policies___object_store_access_api.api214_object_store_access_policies_rules_patch_with_http_info + _process_references(references, ['names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + return self._call_api(endpoint, kwargs) + + def post_object_store_access_policies_rules( + self, + references=None, # type: List[models.ReferenceType] + policies=None, # type: List[models.ReferenceType] + names=None, # type: List[str] + rule=None, # type: models.PolicyRuleObjectAccessPost + x_request_id=None, # type: str + enforce_action_restrictions=None, # type: bool + policy_ids=None, # type: List[str] + policy_names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.ObjectStoreAccessPolicyRuleResponse + """ + Create a new access policy rule. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides names keyword arguments. + policies (list[FixedReference], optional): + A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + + names (list[str], required): + A list of resource names. + rule (PolicyRuleObjectAccessPost, required): + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + enforce_action_restrictions (bool, optional): + Certain combinations of actions and other rule elements are inherently ignored + if specified together in a rule. If set to `true`, operations which attempt to + set these combinations will fail. If set to `false`, such operations will + instead be allowed. Defaults to `true`. + policy_ids (list[str], optional): + A list of policy IDs. If after filtering, there is not at least one resource + that matches each of the elements of `policy_ids`, then an error is returned. + This cannot be provided together with the `policy_names` query parameter. + policy_names (list[str], optional): + A list of policy names. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + names=names, + rule=rule, + x_request_id=x_request_id, + enforce_action_restrictions=enforce_action_restrictions, + policy_ids=policy_ids, + policy_names=policy_names, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._policies___object_store_access_api.api214_object_store_access_policies_rules_post_with_http_info + _process_references(references, ['names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + return self._call_api(endpoint, kwargs) + + def get_object_store_access_policy_actions( + self, + references=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + continuation_token=None, # type: str + filter=None, # type: str + limit=None, # type: int + names=None, # type: List[str] + offset=None, # type: int + sort=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.ObjectStoreAccessPolicyActionGetResponse + """ + List valid actions for access policy rules. Each action is either a valid AWS S3 + action (prefixed by `s3:`) or our special wildcard action (`s3:*`). Each action, + when included in a rule, may restrict which other properties may be set for that + rule. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + continuation_token (str, optional): + An opaque token to iterate over a collection of resources. + filter (Filter, optional): + A filter to include only resources that match the specified criteria. + limit (int, optional): + Limit the number of resources in the response. If not specified, defaults to + 1000. + names (list[str], optional): + A list of resource names. If there is not at least one resource that matches + each of the elements of `names`, then an error is returned. + offset (int, optional): + The offset of the first resource to return from a collection. + sort (list[Property], optional): + Sort the response by the specified Properties. Can also be a single element. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + continuation_token=continuation_token, + filter=filter, + limit=limit, + names=names, + offset=offset, + sort=sort, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._policies___object_store_access_api.api214_object_store_access_policy_actions_get_with_http_info + _process_references(references, ['names'], kwargs) + return self._call_api(endpoint, kwargs) + + def delete_smb_client_policies( + self, + references=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + ids=None, # type: List[str] + names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> None + """ + Delete one or more SMB Client policies. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides ids and names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + ids (list[str], optional): + A list of resource IDs. If after filtering, there is not at least one resource + that matches each of the elements of `ids`, then an error is returned. This + cannot be provided together with the `name` or `names` query parameters. + names (list[str], optional): + A list of resource names. If there is not at least one resource that matches + each of the elements of `names`, then an error is returned. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + ids=ids, + names=names, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._policies___smb_client_api.api214_smb_client_policies_delete_with_http_info + _process_references(references, ['ids', 'names'], kwargs) + return self._call_api(endpoint, kwargs) + + def get_smb_client_policies( + self, + references=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + continuation_token=None, # type: str + filter=None, # type: str + ids=None, # type: List[str] + limit=None, # type: int + names=None, # type: List[str] + offset=None, # type: int + sort=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.SmbClientPolicyGetResponse + """ + Display SMB Client policies and their attributes. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides ids and names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + continuation_token (str, optional): + An opaque token to iterate over a collection of resources. + filter (Filter, optional): + A filter to include only resources that match the specified criteria. + ids (list[str], optional): + A list of resource IDs. If after filtering, there is not at least one resource + that matches each of the elements of `ids`, then an error is returned. This + cannot be provided together with the `name` or `names` query parameters. + limit (int, optional): + Limit the number of resources in the response. If not specified, defaults to + 1000. + names (list[str], optional): + A list of resource names. If there is not at least one resource that matches + each of the elements of `names`, then an error is returned. + offset (int, optional): + The offset of the first resource to return from a collection. + sort (list[Property], optional): + Sort the response by the specified Properties. Can also be a single element. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + continuation_token=continuation_token, + filter=filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + sort=sort, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._policies___smb_client_api.api214_smb_client_policies_get_with_http_info + _process_references(references, ['ids', 'names'], kwargs) + return self._call_api(endpoint, kwargs) + + def patch_smb_client_policies( + self, + references=None, # type: List[models.ReferenceType] + policy=None, # type: models.SmbClientPolicy + x_request_id=None, # type: str + ids=None, # type: List[str] + names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.SmbClientPolicyResponse + """ + Modify an existing SMB Client policy's attributes. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides ids and names keyword arguments. + + policy (SmbClientPolicy, required): + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + ids (list[str], optional): + A list of resource IDs. If after filtering, there is not at least one resource + that matches each of the elements of `ids`, then an error is returned. This + cannot be provided together with the `name` or `names` query parameters. + names (list[str], optional): + A list of resource names. If there is not at least one resource that matches + each of the elements of `names`, then an error is returned. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + policy=policy, + x_request_id=x_request_id, + ids=ids, + names=names, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._policies___smb_client_api.api214_smb_client_policies_patch_with_http_info + _process_references(references, ['ids', 'names'], kwargs) + return self._call_api(endpoint, kwargs) + + def post_smb_client_policies( + self, + references=None, # type: List[models.ReferenceType] + names=None, # type: List[str] + x_request_id=None, # type: str + policy=None, # type: models.SmbClientPolicyPost + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.SmbClientPolicyResponse + """ + Create a new SMB Client policy. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides names keyword arguments. + + names (list[str], required): + A list of resource names. + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + policy (SmbClientPolicyPost, optional): + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + names=names, + x_request_id=x_request_id, + policy=policy, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._policies___smb_client_api.api214_smb_client_policies_post_with_http_info + _process_references(references, ['names'], kwargs) + return self._call_api(endpoint, kwargs) + + def delete_smb_client_policies_rules( + self, + references=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + ids=None, # type: List[str] + names=None, # type: List[str] + versions=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> None + """ + Delete one or more SMB Client policy rules. One of the following is required: + `ids` or `names`. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides ids and names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + ids (list[str], optional): + A list of resource IDs. If after filtering, there is not at least one resource + that matches each of the elements of `ids`, then an error is returned. This + cannot be provided together with the `name` or `names` query parameters. + names (list[str], optional): + A list of resource names. If there is not at least one resource that matches + each of the elements of `names`, then an error is returned. + versions (list[str], optional): + A list of versions. This is an optional query param used for concurrency + control. The ordering should match the names or ids query param. This will fail + with a 412 Precondition failed if the resource was changed and the current + version of the resource doesn't match the value in the query param. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + ids=ids, + names=names, + versions=versions, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._policies___smb_client_api.api214_smb_client_policies_rules_delete_with_http_info + _process_references(references, ['ids', 'names'], kwargs) + return self._call_api(endpoint, kwargs) + + def get_smb_client_policies_rules( + self, + references=None, # type: List[models.ReferenceType] + policies=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + continuation_token=None, # type: str + filter=None, # type: str + ids=None, # type: List[str] + limit=None, # type: int + names=None, # type: List[str] + offset=None, # type: int + policy_ids=None, # type: List[str] + policy_names=None, # type: List[str] + sort=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.SmbClientPolicyRuleGetResponse + """ + Displays a list of SMB Client policy rules. The default sort is by policy name, + then index. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides ids and names keyword arguments. + policies (list[FixedReference], optional): + A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + continuation_token (str, optional): + An opaque token to iterate over a collection of resources. + filter (Filter, optional): + A filter to include only resources that match the specified criteria. + ids (list[str], optional): + A list of resource IDs. If after filtering, there is not at least one resource + that matches each of the elements of `ids`, then an error is returned. This + cannot be provided together with the `name` or `names` query parameters. + limit (int, optional): + Limit the number of resources in the response. If not specified, defaults to + 1000. + names (list[str], optional): + A list of resource names. If there is not at least one resource that matches + each of the elements of `names`, then an error is returned. + offset (int, optional): + The offset of the first resource to return from a collection. + policy_ids (list[str], optional): + A list of policy IDs. If after filtering, there is not at least one resource + that matches each of the elements of `policy_ids`, then an error is returned. + This cannot be provided together with the `policy_names` query parameter. + policy_names (list[str], optional): + A list of policy names. + sort (list[Property], optional): + Sort the response by the specified Properties. Can also be a single element. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + continuation_token=continuation_token, + filter=filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + policy_ids=policy_ids, + policy_names=policy_names, + sort=sort, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._policies___smb_client_api.api214_smb_client_policies_rules_get_with_http_info + _process_references(references, ['ids', 'names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + return self._call_api(endpoint, kwargs) + + def patch_smb_client_policies_rules( + self, + references=None, # type: List[models.ReferenceType] + rule=None, # type: models.SmbClientPolicyRule + x_request_id=None, # type: str + before_rule_id=None, # type: str + before_rule_name=None, # type: str + ids=None, # type: List[str] + names=None, # type: List[str] + versions=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.SmbClientPolicyRuleResponse + """ + Modify an existing SMB Client policy rule. If `before_rule_id` or + `before_rule_name` are specified, the rule will be moved before that rule. Rules + are ordered in three groups; ip addresses, other and `*` and can only be moved + within the appropriate group. One of the following is required: `ids` or + `names`. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides ids and names keyword arguments. + + rule (SmbClientPolicyRule, required): + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + before_rule_id (str, optional): + The id of the rule to insert or move a rule before. This cannot be provided + together with the `before_rule_name` query parameter. + before_rule_name (str, optional): + The name of the rule to insert or move a rule before. This cannot be provided + together with the `before_rule_id` query parameter. + ids (list[str], optional): + A list of resource IDs. If after filtering, there is not at least one resource + that matches each of the elements of `ids`, then an error is returned. This + cannot be provided together with the `name` or `names` query parameters. + names (list[str], optional): + A list of resource names. If there is not at least one resource that matches + each of the elements of `names`, then an error is returned. + versions (list[str], optional): + A list of versions. This is an optional query param used for concurrency + control. The ordering should match the names or ids query param. This will fail + with a 412 Precondition failed if the resource was changed and the current + version of the resource doesn't match the value in the query param. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + rule=rule, + x_request_id=x_request_id, + before_rule_id=before_rule_id, + before_rule_name=before_rule_name, + ids=ids, + names=names, + versions=versions, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._policies___smb_client_api.api214_smb_client_policies_rules_patch_with_http_info + _process_references(references, ['ids', 'names'], kwargs) + return self._call_api(endpoint, kwargs) + + def post_smb_client_policies_rules( + self, + policies=None, # type: List[models.ReferenceType] + rule=None, # type: models.SmbClientPolicyRulePost + x_request_id=None, # type: str + before_rule_id=None, # type: str + before_rule_name=None, # type: str + policy_ids=None, # type: List[str] + policy_names=None, # type: List[str] + versions=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.SmbClientPolicyRuleResponse + """ + Add an SMB Client policy rule. Rules are ordered in three groups; ip addresses, + other and `*`. The new rule will be added at the end of the appropriate group if + neither `before_rule_id` nor `before_rule_name` are specified. Rules can only be + inserted into the appropriate group. The `policy_ids` or `policy_names` + parameter is required, but they cannot be set together. + + Args: + policies (list[FixedReference], optional): + A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + + rule (SmbClientPolicyRulePost, required): + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + before_rule_id (str, optional): + The id of the rule to insert or move a rule before. This cannot be provided + together with the `before_rule_name` query parameter. + before_rule_name (str, optional): + The name of the rule to insert or move a rule before. This cannot be provided + together with the `before_rule_id` query parameter. + policy_ids (list[str], optional): + A list of policy IDs. If after filtering, there is not at least one resource + that matches each of the elements of `policy_ids`, then an error is returned. + This cannot be provided together with the `policy_names` query parameter. + policy_names (list[str], optional): + A list of policy names. + versions (list[str], optional): + A list of versions. This is an optional query param used for concurrency + control. The ordering should match the names or ids query param. This will fail + with a 412 Precondition failed if the resource was changed and the current + version of the resource doesn't match the value in the query param. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + rule=rule, + x_request_id=x_request_id, + before_rule_id=before_rule_id, + before_rule_name=before_rule_name, + policy_ids=policy_ids, + policy_names=policy_names, + versions=versions, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._policies___smb_client_api.api214_smb_client_policies_rules_post_with_http_info + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + return self._call_api(endpoint, kwargs) + + def delete_smb_share_policies( + self, + references=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + ids=None, # type: List[str] + names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> None + """ + Delete one or more SMB Share policies. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides ids and names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + ids (list[str], optional): + A list of resource IDs. If after filtering, there is not at least one resource + that matches each of the elements of `ids`, then an error is returned. This + cannot be provided together with the `name` or `names` query parameters. + names (list[str], optional): + A list of resource names. If there is not at least one resource that matches + each of the elements of `names`, then an error is returned. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + ids=ids, + names=names, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._policies___smb_share_api.api214_smb_share_policies_delete_with_http_info + _process_references(references, ['ids', 'names'], kwargs) + return self._call_api(endpoint, kwargs) + + def get_smb_share_policies( + self, + references=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + continuation_token=None, # type: str + filter=None, # type: str + ids=None, # type: List[str] + limit=None, # type: int + names=None, # type: List[str] + offset=None, # type: int + sort=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.SmbSharePolicyGetResponse + """ + Display SMB Share policies and their attributes. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides ids and names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + continuation_token (str, optional): + An opaque token to iterate over a collection of resources. + filter (Filter, optional): + A filter to include only resources that match the specified criteria. + ids (list[str], optional): + A list of resource IDs. If after filtering, there is not at least one resource + that matches each of the elements of `ids`, then an error is returned. This + cannot be provided together with the `name` or `names` query parameters. + limit (int, optional): + Limit the number of resources in the response. If not specified, defaults to + 1000. + names (list[str], optional): + A list of resource names. If there is not at least one resource that matches + each of the elements of `names`, then an error is returned. + offset (int, optional): + The offset of the first resource to return from a collection. + sort (list[Property], optional): + Sort the response by the specified Properties. Can also be a single element. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + continuation_token=continuation_token, + filter=filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + sort=sort, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._policies___smb_share_api.api214_smb_share_policies_get_with_http_info + _process_references(references, ['ids', 'names'], kwargs) + return self._call_api(endpoint, kwargs) + + def patch_smb_share_policies( + self, + references=None, # type: List[models.ReferenceType] + policy=None, # type: models.SmbSharePolicy + x_request_id=None, # type: str + ids=None, # type: List[str] + names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.SmbSharePolicyResponse + """ + Modify an existing SMB Share policy's attributes. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides ids and names keyword arguments. + + policy (SmbSharePolicy, required): + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + ids (list[str], optional): + A list of resource IDs. If after filtering, there is not at least one resource + that matches each of the elements of `ids`, then an error is returned. This + cannot be provided together with the `name` or `names` query parameters. + names (list[str], optional): + A list of resource names. If there is not at least one resource that matches + each of the elements of `names`, then an error is returned. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + policy=policy, + x_request_id=x_request_id, + ids=ids, + names=names, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._policies___smb_share_api.api214_smb_share_policies_patch_with_http_info + _process_references(references, ['ids', 'names'], kwargs) + return self._call_api(endpoint, kwargs) + + def post_smb_share_policies( + self, + references=None, # type: List[models.ReferenceType] + names=None, # type: List[str] + x_request_id=None, # type: str + policy=None, # type: models.SmbSharePolicyPost + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.SmbSharePolicyResponse + """ + Create a new SMB Share policy. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides names keyword arguments. + + names (list[str], required): + A list of resource names. + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + policy (SmbSharePolicyPost, optional): + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + names=names, + x_request_id=x_request_id, + policy=policy, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._policies___smb_share_api.api214_smb_share_policies_post_with_http_info + _process_references(references, ['names'], kwargs) + return self._call_api(endpoint, kwargs) + + def delete_smb_share_policies_rules( + self, + references=None, # type: List[models.ReferenceType] + policies=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + ids=None, # type: List[str] + names=None, # type: List[str] + policy_ids=None, # type: List[str] + policy_names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> None + """ + Delete one or more SMB Share policy rules. One of the following is required: + `ids` or `names`. If `names` is provided, the `policy_ids` or `policy_names` + parameter is also required. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides ids and names keyword arguments. + policies (list[FixedReference], optional): + A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + ids (list[str], optional): + A list of resource IDs. If after filtering, there is not at least one resource + that matches each of the elements of `ids`, then an error is returned. This + cannot be provided together with the `name` or `names` query parameters. + names (list[str], optional): + A list of resource names. If there is not at least one resource that matches + each of the elements of `names`, then an error is returned. + policy_ids (list[str], optional): + A list of policy IDs. If after filtering, there is not at least one resource + that matches each of the elements of `policy_ids`, then an error is returned. + This cannot be provided together with the `policy_names` query parameter. + policy_names (list[str], optional): + A list of policy names. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + ids=ids, + names=names, + policy_ids=policy_ids, + policy_names=policy_names, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._policies___smb_share_api.api214_smb_share_policies_rules_delete_with_http_info + _process_references(references, ['ids', 'names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + return self._call_api(endpoint, kwargs) + + def get_smb_share_policies_rules( + self, + references=None, # type: List[models.ReferenceType] + policies=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + continuation_token=None, # type: str + filter=None, # type: str + ids=None, # type: List[str] + limit=None, # type: int + names=None, # type: List[str] + offset=None, # type: int + policy_ids=None, # type: List[str] + policy_names=None, # type: List[str] + sort=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.SmbSharePolicyRuleGetResponse + """ + Displays a list of SMB Share policy rules. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides ids and names keyword arguments. + policies (list[FixedReference], optional): + A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + continuation_token (str, optional): + An opaque token to iterate over a collection of resources. + filter (Filter, optional): + A filter to include only resources that match the specified criteria. + ids (list[str], optional): + A list of resource IDs. If after filtering, there is not at least one resource + that matches each of the elements of `ids`, then an error is returned. This + cannot be provided together with the `name` or `names` query parameters. + limit (int, optional): + Limit the number of resources in the response. If not specified, defaults to + 1000. + names (list[str], optional): + A list of resource names. If there is not at least one resource that matches + each of the elements of `names`, then an error is returned. + offset (int, optional): + The offset of the first resource to return from a collection. + policy_ids (list[str], optional): + A list of policy IDs. If after filtering, there is not at least one resource + that matches each of the elements of `policy_ids`, then an error is returned. + This cannot be provided together with the `policy_names` query parameter. + policy_names (list[str], optional): + A list of policy names. + sort (list[Property], optional): + Sort the response by the specified Properties. Can also be a single element. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + continuation_token=continuation_token, + filter=filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + policy_ids=policy_ids, + policy_names=policy_names, + sort=sort, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._policies___smb_share_api.api214_smb_share_policies_rules_get_with_http_info + _process_references(references, ['ids', 'names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + return self._call_api(endpoint, kwargs) + + def patch_smb_share_policies_rules( + self, + references=None, # type: List[models.ReferenceType] + policies=None, # type: List[models.ReferenceType] + rule=None, # type: models.SmbSharePolicyRule + x_request_id=None, # type: str + ids=None, # type: List[str] + names=None, # type: List[str] + policy_ids=None, # type: List[str] + policy_names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.SmbSharePolicyRuleResponse + """ + Modify an existing SMB Share policy rule. One of the following is required: + `ids` or `names`. If `names` is provided, the `policy_ids` or `policy_names` + parameter is also required. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides ids and names keyword arguments. + policies (list[FixedReference], optional): + A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + + rule (SmbSharePolicyRule, required): + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + ids (list[str], optional): + A list of resource IDs. If after filtering, there is not at least one resource + that matches each of the elements of `ids`, then an error is returned. This + cannot be provided together with the `name` or `names` query parameters. + names (list[str], optional): + A list of resource names. If there is not at least one resource that matches + each of the elements of `names`, then an error is returned. + policy_ids (list[str], optional): + A list of policy IDs. If after filtering, there is not at least one resource + that matches each of the elements of `policy_ids`, then an error is returned. + This cannot be provided together with the `policy_names` query parameter. + policy_names (list[str], optional): + A list of policy names. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + rule=rule, + x_request_id=x_request_id, + ids=ids, + names=names, + policy_ids=policy_ids, + policy_names=policy_names, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._policies___smb_share_api.api214_smb_share_policies_rules_patch_with_http_info + _process_references(references, ['ids', 'names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + return self._call_api(endpoint, kwargs) + + def post_smb_share_policies_rules( + self, + policies=None, # type: List[models.ReferenceType] + rule=None, # type: models.SmbSharePolicyRulePost + x_request_id=None, # type: str + policy_ids=None, # type: List[str] + policy_names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.SmbSharePolicyRuleResponse + """ + Add an SMB Share policy rule. The `policy_ids` or `policy_names` parameter is + required, but they cannot be set together. + + Args: + policies (list[FixedReference], optional): + A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + + rule (SmbSharePolicyRulePost, required): + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + policy_ids (list[str], optional): + A list of policy IDs. If after filtering, there is not at least one resource + that matches each of the elements of `policy_ids`, then an error is returned. + This cannot be provided together with the `policy_names` query parameter. + policy_names (list[str], optional): + A list of policy names. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + rule=rule, + x_request_id=x_request_id, + policy_ids=policy_ids, + policy_names=policy_names, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._policies___smb_share_api.api214_smb_share_policies_rules_post_with_http_info + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + return self._call_api(endpoint, kwargs) + + def delete_policies( + self, + references=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + ids=None, # type: List[str] + names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> None + """ + Delete one or more snapshot scheduling policies. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides ids and names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + ids (list[str], optional): + A list of resource IDs. If after filtering, there is not at least one resource + that matches each of the elements of `ids`, then an error is returned. This + cannot be provided together with the `name` or `names` query parameters. + names (list[str], optional): + A list of resource names. If there is not at least one resource that matches + each of the elements of `names`, then an error is returned. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + ids=ids, + names=names, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._policies___snapshot_api.api214_policies_delete_with_http_info + _process_references(references, ['ids', 'names'], kwargs) + return self._call_api(endpoint, kwargs) + + def delete_policies_file_system_replica_links( + self, + local_file_systems=None, # type: List[models.ReferenceType] + members=None, # type: List[models.ReferenceType] + policies=None, # type: List[models.ReferenceType] + remotes=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + local_file_system_ids=None, # type: List[str] + local_file_system_names=None, # type: List[str] + member_ids=None, # type: List[str] + policy_ids=None, # type: List[str] + policy_names=None, # type: List[str] + remote_ids=None, # type: List[str] + remote_names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> None + """ + Remove a snapshot scheduling policy mapped to a file system replica link. + + Args: + local_file_systems (list[FixedReference], optional): + A list of local_file_systems to query for. Overrides local_file_system_ids and local_file_system_names keyword arguments. + members (list[FixedReference], optional): + A list of members to query for. Overrides member_ids keyword arguments. + policies (list[FixedReference], optional): + A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + remotes (list[FixedReference], optional): + A list of remotes to query for. Overrides remote_ids and remote_names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + local_file_system_ids (list[str], optional): + A list of local file system IDs. If after filtering, there is not at least one + resource that matches each of the elements, then an error is returned. This + cannot be provided together with the `local_file_system_names` query parameter. + local_file_system_names (list[str], optional): + A list of local file system names. If there is not at least one resource that + matches each of the elements, then an error is returned. This cannot be provided + together with `local_file_system_ids` query parameter. + member_ids (list[str], optional): + A list of member IDs. If after filtering, there is not at least one resource + that matches each of the elements of `member_ids`, then an error is returned. + This cannot be provided together with the `member_names` query parameter. + policy_ids (list[str], optional): + A list of policy IDs. If after filtering, there is not at least one resource + that matches each of the elements of `policy_ids`, then an error is returned. + This cannot be provided together with the `policy_names` query parameter. + policy_names (list[str], optional): + A list of policy names. + remote_ids (list[str], optional): + A list of remote array IDs. If after filtering, there is not at least one + resource that matches each of the elements, then an error is returned. This + cannot be provided together with the `remote_names` query parameter. + remote_names (list[str], optional): + A list of remote array names. If there is not at least one resource that matches + each of the elements, then an error is returned. This cannot be provided + together with `remote_ids` query parameter. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + local_file_system_ids=local_file_system_ids, + local_file_system_names=local_file_system_names, + member_ids=member_ids, + policy_ids=policy_ids, + policy_names=policy_names, + remote_ids=remote_ids, + remote_names=remote_names, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._policies___snapshot_api.api214_policies_file_system_replica_links_delete_with_http_info + _process_references(local_file_systems, ['local_file_system_ids', 'local_file_system_names'], kwargs) + _process_references(members, ['member_ids'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _process_references(remotes, ['remote_ids', 'remote_names'], kwargs) + return self._call_api(endpoint, kwargs) + + def get_policies_file_system_replica_links( + self, + local_file_systems=None, # type: List[models.ReferenceType] + members=None, # type: List[models.ReferenceType] + policies=None, # type: List[models.ReferenceType] + remotes=None, # type: List[models.ReferenceType] + remote_file_systems=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + continuation_token=None, # type: str + filter=None, # type: str + limit=None, # type: int + local_file_system_ids=None, # type: List[str] + local_file_system_names=None, # type: List[str] + member_ids=None, # type: List[str] + offset=None, # type: int + policy_ids=None, # type: List[str] + policy_names=None, # type: List[str] + remote_ids=None, # type: List[str] + remote_file_system_ids=None, # type: List[str] + remote_file_system_names=None, # type: List[str] + remote_names=None, # type: List[str] + sort=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.PolicyMemberWithRemoteGetResponse + """ + List snapshot scheduling policies for file system replica links. + + Args: + local_file_systems (list[FixedReference], optional): + A list of local_file_systems to query for. Overrides local_file_system_ids and local_file_system_names keyword arguments. + members (list[FixedReference], optional): + A list of members to query for. Overrides member_ids keyword arguments. + policies (list[FixedReference], optional): + A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + remotes (list[FixedReference], optional): + A list of remotes to query for. Overrides remote_ids and remote_names keyword arguments. + remote_file_systems (list[FixedReference], optional): + A list of remote_file_systems to query for. Overrides remote_file_system_ids and remote_file_system_names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + continuation_token (str, optional): + An opaque token to iterate over a collection of resources. + filter (Filter, optional): + A filter to include only resources that match the specified criteria. + limit (int, optional): + Limit the number of resources in the response. If not specified, defaults to + 1000. + local_file_system_ids (list[str], optional): + A list of local file system IDs. If after filtering, there is not at least one + resource that matches each of the elements, then an error is returned. This + cannot be provided together with the `local_file_system_names` query parameter. + local_file_system_names (list[str], optional): + A list of local file system names. If there is not at least one resource that + matches each of the elements, then an error is returned. This cannot be provided + together with `local_file_system_ids` query parameter. + member_ids (list[str], optional): + A list of member IDs. If after filtering, there is not at least one resource + that matches each of the elements of `member_ids`, then an error is returned. + This cannot be provided together with the `member_names` query parameter. + offset (int, optional): + The offset of the first resource to return from a collection. + policy_ids (list[str], optional): + A list of policy IDs. If after filtering, there is not at least one resource + that matches each of the elements of `policy_ids`, then an error is returned. + This cannot be provided together with the `policy_names` query parameter. + policy_names (list[str], optional): + A list of policy names. + remote_ids (list[str], optional): + A list of remote array IDs. If after filtering, there is not at least one + resource that matches each of the elements, then an error is returned. This + cannot be provided together with the `remote_names` query parameter. + remote_file_system_ids (list[str], optional): + A list of remote file system IDs. If there is not at least one resource that + matches each of the elements, then an error is returned. This cannot be provided + together with the `remote_file_system_names` query parameter. + remote_file_system_names (list[str], optional): + A list of remote file system names. If there is not at least one resource that + matches each of the elements, then an error is returned. This cannot be provided + together with the `remote_file_system_ids` query parameter. + remote_names (list[str], optional): + A list of remote array names. If there is not at least one resource that matches + each of the elements, then an error is returned. This cannot be provided + together with `remote_ids` query parameter. + sort (list[Property], optional): + Sort the response by the specified Properties. Can also be a single element. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + continuation_token=continuation_token, + filter=filter, + limit=limit, + local_file_system_ids=local_file_system_ids, + local_file_system_names=local_file_system_names, + member_ids=member_ids, + offset=offset, + policy_ids=policy_ids, + policy_names=policy_names, + remote_ids=remote_ids, + remote_file_system_ids=remote_file_system_ids, + remote_file_system_names=remote_file_system_names, + remote_names=remote_names, + sort=sort, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._policies___snapshot_api.api214_policies_file_system_replica_links_get_with_http_info + _process_references(local_file_systems, ['local_file_system_ids', 'local_file_system_names'], kwargs) + _process_references(members, ['member_ids'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _process_references(remotes, ['remote_ids', 'remote_names'], kwargs) + _process_references(remote_file_systems, ['remote_file_system_ids', 'remote_file_system_names'], kwargs) + return self._call_api(endpoint, kwargs) + + def post_policies_file_system_replica_links( + self, + local_file_systems=None, # type: List[models.ReferenceType] + members=None, # type: List[models.ReferenceType] + policies=None, # type: List[models.ReferenceType] + remotes=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + local_file_system_ids=None, # type: List[str] + local_file_system_names=None, # type: List[str] + member_ids=None, # type: List[str] + policy_ids=None, # type: List[str] + policy_names=None, # type: List[str] + remote_ids=None, # type: List[str] + remote_names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.PolicyMemberWithRemoteResponse + """ + Add a snapshot scheduling policy to a file system replica link. + + Args: + local_file_systems (list[FixedReference], optional): + A list of local_file_systems to query for. Overrides local_file_system_ids and local_file_system_names keyword arguments. + members (list[FixedReference], optional): + A list of members to query for. Overrides member_ids keyword arguments. + policies (list[FixedReference], optional): + A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + remotes (list[FixedReference], optional): + A list of remotes to query for. Overrides remote_ids and remote_names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + local_file_system_ids (list[str], optional): + A list of local file system IDs. If after filtering, there is not at least one + resource that matches each of the elements, then an error is returned. This + cannot be provided together with the `local_file_system_names` query parameter. + local_file_system_names (list[str], optional): + A list of local file system names. If there is not at least one resource that + matches each of the elements, then an error is returned. This cannot be provided + together with `local_file_system_ids` query parameter. + member_ids (list[str], optional): + A list of member IDs. If after filtering, there is not at least one resource + that matches each of the elements of `member_ids`, then an error is returned. + This cannot be provided together with the `member_names` query parameter. + policy_ids (list[str], optional): + A list of policy IDs. If after filtering, there is not at least one resource + that matches each of the elements of `policy_ids`, then an error is returned. + This cannot be provided together with the `policy_names` query parameter. + policy_names (list[str], optional): + A list of policy names. + remote_ids (list[str], optional): + A list of remote array IDs. If after filtering, there is not at least one + resource that matches each of the elements, then an error is returned. This + cannot be provided together with the `remote_names` query parameter. + remote_names (list[str], optional): + A list of remote array names. If there is not at least one resource that matches + each of the elements, then an error is returned. This cannot be provided + together with `remote_ids` query parameter. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + local_file_system_ids=local_file_system_ids, + local_file_system_names=local_file_system_names, + member_ids=member_ids, + policy_ids=policy_ids, + policy_names=policy_names, + remote_ids=remote_ids, + remote_names=remote_names, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._policies___snapshot_api.api214_policies_file_system_replica_links_post_with_http_info + _process_references(local_file_systems, ['local_file_system_ids', 'local_file_system_names'], kwargs) + _process_references(members, ['member_ids'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _process_references(remotes, ['remote_ids', 'remote_names'], kwargs) + return self._call_api(endpoint, kwargs) + + def delete_policies_file_system_snapshots( + self, + members=None, # type: List[models.ReferenceType] + policies=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + member_ids=None, # type: List[str] + member_names=None, # type: List[str] + policy_ids=None, # type: List[str] + policy_names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> None + """ + Remove the snapshot scheduling policy mapped to a file system. + + Args: + members (list[FixedReference], optional): + A list of members to query for. Overrides member_ids and member_names keyword arguments. + policies (list[FixedReference], optional): + A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + member_ids (list[str], optional): + A list of member IDs. If after filtering, there is not at least one resource + that matches each of the elements of `member_ids`, then an error is returned. + This cannot be provided together with the `member_names` query parameter. + member_names (list[str], optional): + A list of member names. + policy_ids (list[str], optional): + A list of policy IDs. If after filtering, there is not at least one resource + that matches each of the elements of `policy_ids`, then an error is returned. + This cannot be provided together with the `policy_names` query parameter. + policy_names (list[str], optional): + A list of policy names. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + member_ids=member_ids, + member_names=member_names, + policy_ids=policy_ids, + policy_names=policy_names, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._policies___snapshot_api.api214_policies_file_system_snapshots_delete_with_http_info + _process_references(members, ['member_ids', 'member_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + return self._call_api(endpoint, kwargs) + + def get_policies_file_system_snapshots( + self, + members=None, # type: List[models.ReferenceType] + policies=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + continuation_token=None, # type: str + filter=None, # type: str + limit=None, # type: int + member_ids=None, # type: List[str] + member_names=None, # type: List[str] + offset=None, # type: int + policy_ids=None, # type: List[str] + policy_names=None, # type: List[str] + sort=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.PolicyFileSystemSnapshotGetResponse + """ + List file system snapshots mapped to a snapshot scheduling policy. + + Args: + members (list[FixedReference], optional): + A list of members to query for. Overrides member_ids and member_names keyword arguments. + policies (list[FixedReference], optional): + A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + continuation_token (str, optional): + An opaque token to iterate over a collection of resources. + filter (Filter, optional): + A filter to include only resources that match the specified criteria. + limit (int, optional): + Limit the number of resources in the response. If not specified, defaults to + 1000. + member_ids (list[str], optional): + A list of member IDs. If after filtering, there is not at least one resource + that matches each of the elements of `member_ids`, then an error is returned. + This cannot be provided together with the `member_names` query parameter. + member_names (list[str], optional): + A list of member names. + offset (int, optional): + The offset of the first resource to return from a collection. + policy_ids (list[str], optional): + A list of policy IDs. If after filtering, there is not at least one resource + that matches each of the elements of `policy_ids`, then an error is returned. + This cannot be provided together with the `policy_names` query parameter. + policy_names (list[str], optional): + A list of policy names. + sort (list[Property], optional): + Sort the response by the specified Properties. Can also be a single element. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + continuation_token=continuation_token, + filter=filter, + limit=limit, + member_ids=member_ids, + member_names=member_names, + offset=offset, + policy_ids=policy_ids, + policy_names=policy_names, + sort=sort, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._policies___snapshot_api.api214_policies_file_system_snapshots_get_with_http_info + _process_references(members, ['member_ids', 'member_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + return self._call_api(endpoint, kwargs) + + def delete_policies_file_systems( + self, + members=None, # type: List[models.ReferenceType] + policies=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + member_ids=None, # type: List[str] + member_names=None, # type: List[str] + policy_ids=None, # type: List[str] + policy_names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> None + """ + Remove the snapshot scheduling policy mapped to a file system. + + Args: + members (list[FixedReference], optional): + A list of members to query for. Overrides member_ids and member_names keyword arguments. + policies (list[FixedReference], optional): + A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + member_ids (list[str], optional): + A list of member IDs. If after filtering, there is not at least one resource + that matches each of the elements of `member_ids`, then an error is returned. + This cannot be provided together with the `member_names` query parameter. + member_names (list[str], optional): + A list of member names. + policy_ids (list[str], optional): + A list of policy IDs. If after filtering, there is not at least one resource + that matches each of the elements of `policy_ids`, then an error is returned. + This cannot be provided together with the `policy_names` query parameter. + policy_names (list[str], optional): + A list of policy names. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + member_ids=member_ids, + member_names=member_names, + policy_ids=policy_ids, + policy_names=policy_names, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._policies___snapshot_api.api214_policies_file_systems_delete_with_http_info + _process_references(members, ['member_ids', 'member_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + return self._call_api(endpoint, kwargs) + + def get_policies_file_systems( + self, + members=None, # type: List[models.ReferenceType] + policies=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + continuation_token=None, # type: str + filter=None, # type: str + limit=None, # type: int + member_ids=None, # type: List[str] + member_names=None, # type: List[str] + offset=None, # type: int + policy_ids=None, # type: List[str] + policy_names=None, # type: List[str] + sort=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.PolicyMemberGetResponse + """ + List file systems mapped to a snapshot scheduling policy. + + Args: + members (list[FixedReference], optional): + A list of members to query for. Overrides member_ids and member_names keyword arguments. + policies (list[FixedReference], optional): + A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + continuation_token (str, optional): + An opaque token to iterate over a collection of resources. + filter (Filter, optional): + A filter to include only resources that match the specified criteria. + limit (int, optional): + Limit the number of resources in the response. If not specified, defaults to + 1000. + member_ids (list[str], optional): + A list of member IDs. If after filtering, there is not at least one resource + that matches each of the elements of `member_ids`, then an error is returned. + This cannot be provided together with the `member_names` query parameter. + member_names (list[str], optional): + A list of member names. + offset (int, optional): + The offset of the first resource to return from a collection. + policy_ids (list[str], optional): + A list of policy IDs. If after filtering, there is not at least one resource + that matches each of the elements of `policy_ids`, then an error is returned. + This cannot be provided together with the `policy_names` query parameter. + policy_names (list[str], optional): + A list of policy names. + sort (list[Property], optional): + Sort the response by the specified Properties. Can also be a single element. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + continuation_token=continuation_token, + filter=filter, + limit=limit, + member_ids=member_ids, + member_names=member_names, + offset=offset, + policy_ids=policy_ids, + policy_names=policy_names, + sort=sort, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._policies___snapshot_api.api214_policies_file_systems_get_with_http_info + _process_references(members, ['member_ids', 'member_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + return self._call_api(endpoint, kwargs) + + def post_policies_file_systems( + self, + members=None, # type: List[models.ReferenceType] + policies=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + member_ids=None, # type: List[str] + member_names=None, # type: List[str] + policy_ids=None, # type: List[str] + policy_names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.PolicyMemberResponse + """ + Map a file system to a snapshot scheduling policy. + + Args: + members (list[FixedReference], optional): + A list of members to query for. Overrides member_ids and member_names keyword arguments. + policies (list[FixedReference], optional): + A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + member_ids (list[str], optional): + A list of member IDs. If after filtering, there is not at least one resource + that matches each of the elements of `member_ids`, then an error is returned. + This cannot be provided together with the `member_names` query parameter. + member_names (list[str], optional): + A list of member names. + policy_ids (list[str], optional): + A list of policy IDs. If after filtering, there is not at least one resource + that matches each of the elements of `policy_ids`, then an error is returned. + This cannot be provided together with the `policy_names` query parameter. + policy_names (list[str], optional): + A list of policy names. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + member_ids=member_ids, + member_names=member_names, + policy_ids=policy_ids, + policy_names=policy_names, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._policies___snapshot_api.api214_policies_file_systems_post_with_http_info + _process_references(members, ['member_ids', 'member_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + return self._call_api(endpoint, kwargs) + + def get_policies( + self, + references=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + continuation_token=None, # type: str + filter=None, # type: str + ids=None, # type: List[str] + limit=None, # type: int + names=None, # type: List[str] + offset=None, # type: int + sort=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.PolicyGetResponse + """ + Display snapshot scheduling policies and their attributes. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides ids and names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + continuation_token (str, optional): + An opaque token to iterate over a collection of resources. + filter (Filter, optional): + A filter to include only resources that match the specified criteria. + ids (list[str], optional): + A list of resource IDs. If after filtering, there is not at least one resource + that matches each of the elements of `ids`, then an error is returned. This + cannot be provided together with the `name` or `names` query parameters. + limit (int, optional): + Limit the number of resources in the response. If not specified, defaults to + 1000. + names (list[str], optional): + A list of resource names. If there is not at least one resource that matches + each of the elements of `names`, then an error is returned. + offset (int, optional): + The offset of the first resource to return from a collection. + sort (list[Property], optional): + Sort the response by the specified Properties. Can also be a single element. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + continuation_token=continuation_token, + filter=filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + sort=sort, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._policies___snapshot_api.api214_policies_get_with_http_info + _process_references(references, ['ids', 'names'], kwargs) + return self._call_api(endpoint, kwargs) + + def get_policies_members( + self, + local_file_systems=None, # type: List[models.ReferenceType] + members=None, # type: List[models.ReferenceType] + policies=None, # type: List[models.ReferenceType] + remotes=None, # type: List[models.ReferenceType] + remote_file_systems=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + continuation_token=None, # type: str + filter=None, # type: str + limit=None, # type: int + local_file_system_ids=None, # type: List[str] + local_file_system_names=None, # type: List[str] + member_ids=None, # type: List[str] + member_names=None, # type: List[str] + member_types=None, # type: List[models.ModelsFB214ResourceTypeYaml] + offset=None, # type: int + policy_ids=None, # type: List[str] + policy_names=None, # type: List[str] + remote_ids=None, # type: List[str] + remote_file_system_ids=None, # type: List[str] + remote_file_system_names=None, # type: List[str] + remote_names=None, # type: List[str] + sort=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.PolicyMemberWithRemoteGetResponse + """ + List snapshot scheduling policies mapped to file systems, snapshots, and file + system replica links. + + Args: + local_file_systems (list[FixedReference], optional): + A list of local_file_systems to query for. Overrides local_file_system_ids and local_file_system_names keyword arguments. + members (list[FixedReference], optional): + A list of members to query for. Overrides member_ids and member_names keyword arguments. + policies (list[FixedReference], optional): + A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + remotes (list[FixedReference], optional): + A list of remotes to query for. Overrides remote_ids and remote_names keyword arguments. + remote_file_systems (list[FixedReference], optional): + A list of remote_file_systems to query for. Overrides remote_file_system_ids and remote_file_system_names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + continuation_token (str, optional): + An opaque token to iterate over a collection of resources. + filter (Filter, optional): + A filter to include only resources that match the specified criteria. + limit (int, optional): + Limit the number of resources in the response. If not specified, defaults to + 1000. + local_file_system_ids (list[str], optional): + A list of local file system IDs. If after filtering, there is not at least one + resource that matches each of the elements, then an error is returned. This + cannot be provided together with the `local_file_system_names` query parameter. + local_file_system_names (list[str], optional): + A list of local file system names. If there is not at least one resource that + matches each of the elements, then an error is returned. This cannot be provided + together with `local_file_system_ids` query parameter. + member_ids (list[str], optional): + A list of member IDs. If after filtering, there is not at least one resource + that matches each of the elements of `member_ids`, then an error is returned. + This cannot be provided together with the `member_names` query parameter. + member_names (list[str], optional): + A list of member names. + member_types (list[ModelsFB214ResourceTypeYaml], optional): + A list of member types. Valid values are `file-systems`, `file-system- + snapshots`, `file-system-replica-links`, and `object-store-users`. Different + endpoints may accept different subsets of these values. + offset (int, optional): + The offset of the first resource to return from a collection. + policy_ids (list[str], optional): + A list of policy IDs. If after filtering, there is not at least one resource + that matches each of the elements of `policy_ids`, then an error is returned. + This cannot be provided together with the `policy_names` query parameter. + policy_names (list[str], optional): + A list of policy names. + remote_ids (list[str], optional): + A list of remote array IDs. If after filtering, there is not at least one + resource that matches each of the elements, then an error is returned. This + cannot be provided together with the `remote_names` query parameter. + remote_file_system_ids (list[str], optional): + A list of remote file system IDs. If there is not at least one resource that + matches each of the elements, then an error is returned. This cannot be provided + together with the `remote_file_system_names` query parameter. + remote_file_system_names (list[str], optional): + A list of remote file system names. If there is not at least one resource that + matches each of the elements, then an error is returned. This cannot be provided + together with the `remote_file_system_ids` query parameter. + remote_names (list[str], optional): + A list of remote array names. If there is not at least one resource that matches + each of the elements, then an error is returned. This cannot be provided + together with `remote_ids` query parameter. + sort (list[Property], optional): + Sort the response by the specified Properties. Can also be a single element. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + continuation_token=continuation_token, + filter=filter, + limit=limit, + local_file_system_ids=local_file_system_ids, + local_file_system_names=local_file_system_names, + member_ids=member_ids, + member_names=member_names, + member_types=member_types, + offset=offset, + policy_ids=policy_ids, + policy_names=policy_names, + remote_ids=remote_ids, + remote_file_system_ids=remote_file_system_ids, + remote_file_system_names=remote_file_system_names, + remote_names=remote_names, + sort=sort, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._policies___snapshot_api.api214_policies_members_get_with_http_info + _process_references(local_file_systems, ['local_file_system_ids', 'local_file_system_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _process_references(remotes, ['remote_ids', 'remote_names'], kwargs) + _process_references(remote_file_systems, ['remote_file_system_ids', 'remote_file_system_names'], kwargs) + return self._call_api(endpoint, kwargs) + + def patch_policies( + self, + references=None, # type: List[models.ReferenceType] + policy=None, # type: models.PolicyPatch + x_request_id=None, # type: str + ids=None, # type: List[str] + destroy_snapshots=None, # type: bool + names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.PolicyResponse + """ + Modify a snapshot scheduling policy’s attributes for when and how often + snapshots are created and how long they are retained. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides ids and names keyword arguments. + + policy (PolicyPatch, required): + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + ids (list[str], optional): + A list of resource IDs. If after filtering, there is not at least one resource + that matches each of the elements of `ids`, then an error is returned. This + cannot be provided together with the `name` or `names` query parameters. + destroy_snapshots (bool, optional): + This parameter must be set to `true` in order to modify a policy such that local + or remote snapshots would be destroyed. + names (list[str], optional): + A list of resource names. If there is not at least one resource that matches + each of the elements of `names`, then an error is returned. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + policy=policy, + x_request_id=x_request_id, + ids=ids, + destroy_snapshots=destroy_snapshots, + names=names, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._policies___snapshot_api.api214_policies_patch_with_http_info + _process_references(references, ['ids', 'names'], kwargs) + return self._call_api(endpoint, kwargs) + + def post_policies( + self, + references=None, # type: List[models.ReferenceType] + names=None, # type: List[str] + x_request_id=None, # type: str + policy=None, # type: models.Policy + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.PolicyResponse + """ + Create a new snapshot scheduling policy with rule attributes to capture file + system snapshots for a set period of time and frequency, as well as how long + snapshots are retained before being destroyed and eradicated. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides names keyword arguments. + + names (list[str], required): + A list of resource names. + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + policy (Policy, optional): + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + names=names, + x_request_id=x_request_id, + policy=policy, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._policies___snapshot_api.api214_policies_post_with_http_info + _process_references(references, ['names'], kwargs) + return self._call_api(endpoint, kwargs) + + def delete_admins_ssh_certificate_authority_policies( + self, + members=None, # type: List[models.ReferenceType] + policies=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + member_ids=None, # type: List[str] + member_names=None, # type: List[str] + policy_ids=None, # type: List[str] + policy_names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> None + """ + Remove a SSH Certificate Authority policy from a specific user. + + Args: + members (list[FixedReference], optional): + A list of members to query for. Overrides member_ids and member_names keyword arguments. + policies (list[FixedReference], optional): + A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + member_ids (list[str], optional): + A list of member IDs. If after filtering, there is not at least one resource + that matches each of the elements of `member_ids`, then an error is returned. + This cannot be provided together with the `member_names` query parameter. + member_names (list[str], optional): + A list of member names. + policy_ids (list[str], optional): + A list of policy IDs. If after filtering, there is not at least one resource + that matches each of the elements of `policy_ids`, then an error is returned. + This cannot be provided together with the `policy_names` query parameter. + policy_names (list[str], optional): + A list of policy names. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + member_ids=member_ids, + member_names=member_names, + policy_ids=policy_ids, + policy_names=policy_names, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._policies___ssh_certificate_authority_api.api214_admins_ssh_certificate_authority_policies_delete_with_http_info + _process_references(members, ['member_ids', 'member_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + return self._call_api(endpoint, kwargs) + + def get_admins_ssh_certificate_authority_policies( + self, + members=None, # type: List[models.ReferenceType] + policies=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + continuation_token=None, # type: str + filter=None, # type: str + limit=None, # type: int + member_ids=None, # type: List[str] + member_names=None, # type: List[str] + offset=None, # type: int + policy_ids=None, # type: List[str] + policy_names=None, # type: List[str] + sort=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.PolicyMemberGetResponse + """ + List SSH Certificate Authority policies mapped to specific users. + + Args: + members (list[FixedReference], optional): + A list of members to query for. Overrides member_ids and member_names keyword arguments. + policies (list[FixedReference], optional): + A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + continuation_token (str, optional): + An opaque token to iterate over a collection of resources. + filter (Filter, optional): + A filter to include only resources that match the specified criteria. + limit (int, optional): + Limit the number of resources in the response. If not specified, defaults to + 1000. + member_ids (list[str], optional): + A list of member IDs. If after filtering, there is not at least one resource + that matches each of the elements of `member_ids`, then an error is returned. + This cannot be provided together with the `member_names` query parameter. + member_names (list[str], optional): + A list of member names. + offset (int, optional): + The offset of the first resource to return from a collection. + policy_ids (list[str], optional): + A list of policy IDs. If after filtering, there is not at least one resource + that matches each of the elements of `policy_ids`, then an error is returned. + This cannot be provided together with the `policy_names` query parameter. + policy_names (list[str], optional): + A list of policy names. + sort (list[Property], optional): + Sort the response by the specified Properties. Can also be a single element. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + continuation_token=continuation_token, + filter=filter, + limit=limit, + member_ids=member_ids, + member_names=member_names, + offset=offset, + policy_ids=policy_ids, + policy_names=policy_names, + sort=sort, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._policies___ssh_certificate_authority_api.api214_admins_ssh_certificate_authority_policies_get_with_http_info + _process_references(members, ['member_ids', 'member_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + return self._call_api(endpoint, kwargs) + + def post_admins_ssh_certificate_authority_policies( + self, + members=None, # type: List[models.ReferenceType] + policies=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + member_ids=None, # type: List[str] + member_names=None, # type: List[str] + policy_ids=None, # type: List[str] + policy_names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.PolicyMemberResponse + """ + Map a SSH Certificate Authority policy to a specific user. + + Args: + members (list[FixedReference], optional): + A list of members to query for. Overrides member_ids and member_names keyword arguments. + policies (list[FixedReference], optional): + A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + member_ids (list[str], optional): + A list of member IDs. If after filtering, there is not at least one resource + that matches each of the elements of `member_ids`, then an error is returned. + This cannot be provided together with the `member_names` query parameter. + member_names (list[str], optional): + A list of member names. + policy_ids (list[str], optional): + A list of policy IDs. If after filtering, there is not at least one resource + that matches each of the elements of `policy_ids`, then an error is returned. + This cannot be provided together with the `policy_names` query parameter. + policy_names (list[str], optional): + A list of policy names. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + member_ids=member_ids, + member_names=member_names, + policy_ids=policy_ids, + policy_names=policy_names, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._policies___ssh_certificate_authority_api.api214_admins_ssh_certificate_authority_policies_post_with_http_info + _process_references(members, ['member_ids', 'member_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + return self._call_api(endpoint, kwargs) + + def delete_arrays_ssh_certificate_authority_policies( + self, + members=None, # type: List[models.ReferenceType] + policies=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + member_ids=None, # type: List[str] + member_names=None, # type: List[str] + policy_ids=None, # type: List[str] + policy_names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> None + """ + Remove a SSH Certificate Authority policy from being a default for admins. + + Args: + members (list[FixedReference], optional): + A list of members to query for. Overrides member_ids and member_names keyword arguments. + policies (list[FixedReference], optional): + A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + member_ids (list[str], optional): + A list of member IDs. If after filtering, there is not at least one resource + that matches each of the elements of `member_ids`, then an error is returned. + This cannot be provided together with the `member_names` query parameter. + member_names (list[str], optional): + A list of member names. + policy_ids (list[str], optional): + A list of policy IDs. If after filtering, there is not at least one resource + that matches each of the elements of `policy_ids`, then an error is returned. + This cannot be provided together with the `policy_names` query parameter. + policy_names (list[str], optional): + A list of policy names. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + member_ids=member_ids, + member_names=member_names, + policy_ids=policy_ids, + policy_names=policy_names, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._policies___ssh_certificate_authority_api.api214_arrays_ssh_certificate_authority_policies_delete_with_http_info + _process_references(members, ['member_ids', 'member_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + return self._call_api(endpoint, kwargs) + + def get_arrays_ssh_certificate_authority_policies( + self, + members=None, # type: List[models.ReferenceType] + policies=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + continuation_token=None, # type: str + filter=None, # type: str + limit=None, # type: int + member_ids=None, # type: List[str] + member_names=None, # type: List[str] + offset=None, # type: int + policy_ids=None, # type: List[str] + policy_names=None, # type: List[str] + sort=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.PolicyMemberGetResponse + """ + List SSH Certificate Authority policies mapped as defaults for admins. + + Args: + members (list[FixedReference], optional): + A list of members to query for. Overrides member_ids and member_names keyword arguments. + policies (list[FixedReference], optional): + A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + continuation_token (str, optional): + An opaque token to iterate over a collection of resources. + filter (Filter, optional): + A filter to include only resources that match the specified criteria. + limit (int, optional): + Limit the number of resources in the response. If not specified, defaults to + 1000. + member_ids (list[str], optional): + A list of member IDs. If after filtering, there is not at least one resource + that matches each of the elements of `member_ids`, then an error is returned. + This cannot be provided together with the `member_names` query parameter. + member_names (list[str], optional): + A list of member names. + offset (int, optional): + The offset of the first resource to return from a collection. + policy_ids (list[str], optional): + A list of policy IDs. If after filtering, there is not at least one resource + that matches each of the elements of `policy_ids`, then an error is returned. + This cannot be provided together with the `policy_names` query parameter. + policy_names (list[str], optional): + A list of policy names. + sort (list[Property], optional): + Sort the response by the specified Properties. Can also be a single element. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + continuation_token=continuation_token, + filter=filter, + limit=limit, + member_ids=member_ids, + member_names=member_names, + offset=offset, + policy_ids=policy_ids, + policy_names=policy_names, + sort=sort, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._policies___ssh_certificate_authority_api.api214_arrays_ssh_certificate_authority_policies_get_with_http_info + _process_references(members, ['member_ids', 'member_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + return self._call_api(endpoint, kwargs) + + def post_arrays_ssh_certificate_authority_policies( + self, + members=None, # type: List[models.ReferenceType] + policies=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + member_ids=None, # type: List[str] + member_names=None, # type: List[str] + policy_ids=None, # type: List[str] + policy_names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.PolicyMemberResponse + """ + Map a SSH Certificate Authority policy as a default for admins. + + Args: + members (list[FixedReference], optional): + A list of members to query for. Overrides member_ids and member_names keyword arguments. + policies (list[FixedReference], optional): + A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + member_ids (list[str], optional): + A list of member IDs. If after filtering, there is not at least one resource + that matches each of the elements of `member_ids`, then an error is returned. + This cannot be provided together with the `member_names` query parameter. + member_names (list[str], optional): + A list of member names. + policy_ids (list[str], optional): + A list of policy IDs. If after filtering, there is not at least one resource + that matches each of the elements of `policy_ids`, then an error is returned. + This cannot be provided together with the `policy_names` query parameter. + policy_names (list[str], optional): + A list of policy names. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + member_ids=member_ids, + member_names=member_names, + policy_ids=policy_ids, + policy_names=policy_names, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._policies___ssh_certificate_authority_api.api214_arrays_ssh_certificate_authority_policies_post_with_http_info + _process_references(members, ['member_ids', 'member_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + return self._call_api(endpoint, kwargs) + + def delete_ssh_certificate_authority_policies_admins( + self, + members=None, # type: List[models.ReferenceType] + policies=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + member_ids=None, # type: List[str] + member_names=None, # type: List[str] + policy_ids=None, # type: List[str] + policy_names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> None + """ + Remove a SSH Certificate Authority policy from a specific user. + + Args: + members (list[FixedReference], optional): + A list of members to query for. Overrides member_ids and member_names keyword arguments. + policies (list[FixedReference], optional): + A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + member_ids (list[str], optional): + A list of member IDs. If after filtering, there is not at least one resource + that matches each of the elements of `member_ids`, then an error is returned. + This cannot be provided together with the `member_names` query parameter. + member_names (list[str], optional): + A list of member names. + policy_ids (list[str], optional): + A list of policy IDs. If after filtering, there is not at least one resource + that matches each of the elements of `policy_ids`, then an error is returned. + This cannot be provided together with the `policy_names` query parameter. + policy_names (list[str], optional): + A list of policy names. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + member_ids=member_ids, + member_names=member_names, + policy_ids=policy_ids, + policy_names=policy_names, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._policies___ssh_certificate_authority_api.api214_ssh_certificate_authority_policies_admins_delete_with_http_info + _process_references(members, ['member_ids', 'member_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + return self._call_api(endpoint, kwargs) + + def get_ssh_certificate_authority_policies_admins( + self, + members=None, # type: List[models.ReferenceType] + policies=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + continuation_token=None, # type: str + filter=None, # type: str + limit=None, # type: int + member_ids=None, # type: List[str] + member_names=None, # type: List[str] + offset=None, # type: int + policy_ids=None, # type: List[str] + policy_names=None, # type: List[str] + sort=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.PolicyMemberGetResponse + """ + List SSH Certificate Authority policies mapped to specific users. + + Args: + members (list[FixedReference], optional): + A list of members to query for. Overrides member_ids and member_names keyword arguments. + policies (list[FixedReference], optional): + A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + continuation_token (str, optional): + An opaque token to iterate over a collection of resources. + filter (Filter, optional): + A filter to include only resources that match the specified criteria. + limit (int, optional): + Limit the number of resources in the response. If not specified, defaults to + 1000. + member_ids (list[str], optional): + A list of member IDs. If after filtering, there is not at least one resource + that matches each of the elements of `member_ids`, then an error is returned. + This cannot be provided together with the `member_names` query parameter. + member_names (list[str], optional): + A list of member names. + offset (int, optional): + The offset of the first resource to return from a collection. + policy_ids (list[str], optional): + A list of policy IDs. If after filtering, there is not at least one resource + that matches each of the elements of `policy_ids`, then an error is returned. + This cannot be provided together with the `policy_names` query parameter. + policy_names (list[str], optional): + A list of policy names. + sort (list[Property], optional): + Sort the response by the specified Properties. Can also be a single element. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + continuation_token=continuation_token, + filter=filter, + limit=limit, + member_ids=member_ids, + member_names=member_names, + offset=offset, + policy_ids=policy_ids, + policy_names=policy_names, + sort=sort, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._policies___ssh_certificate_authority_api.api214_ssh_certificate_authority_policies_admins_get_with_http_info + _process_references(members, ['member_ids', 'member_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + return self._call_api(endpoint, kwargs) + + def post_ssh_certificate_authority_policies_admins( + self, + members=None, # type: List[models.ReferenceType] + policies=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + member_ids=None, # type: List[str] + member_names=None, # type: List[str] + policy_ids=None, # type: List[str] + policy_names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.PolicyMemberResponse + """ + Map a SSH Certificate Authority policy to a specific user. + + Args: + members (list[FixedReference], optional): + A list of members to query for. Overrides member_ids and member_names keyword arguments. + policies (list[FixedReference], optional): + A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + member_ids (list[str], optional): + A list of member IDs. If after filtering, there is not at least one resource + that matches each of the elements of `member_ids`, then an error is returned. + This cannot be provided together with the `member_names` query parameter. + member_names (list[str], optional): + A list of member names. + policy_ids (list[str], optional): + A list of policy IDs. If after filtering, there is not at least one resource + that matches each of the elements of `policy_ids`, then an error is returned. + This cannot be provided together with the `policy_names` query parameter. + policy_names (list[str], optional): + A list of policy names. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + member_ids=member_ids, + member_names=member_names, + policy_ids=policy_ids, + policy_names=policy_names, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._policies___ssh_certificate_authority_api.api214_ssh_certificate_authority_policies_admins_post_with_http_info + _process_references(members, ['member_ids', 'member_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + return self._call_api(endpoint, kwargs) + + def delete_ssh_certificate_authority_policies_arrays( + self, + members=None, # type: List[models.ReferenceType] + policies=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + member_ids=None, # type: List[str] + member_names=None, # type: List[str] + policy_ids=None, # type: List[str] + policy_names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> None + """ + Remove a SSH Certificate Authority policy from being a default for admins. + + Args: + members (list[FixedReference], optional): + A list of members to query for. Overrides member_ids and member_names keyword arguments. + policies (list[FixedReference], optional): + A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + member_ids (list[str], optional): + A list of member IDs. If after filtering, there is not at least one resource + that matches each of the elements of `member_ids`, then an error is returned. + This cannot be provided together with the `member_names` query parameter. + member_names (list[str], optional): + A list of member names. + policy_ids (list[str], optional): + A list of policy IDs. If after filtering, there is not at least one resource + that matches each of the elements of `policy_ids`, then an error is returned. + This cannot be provided together with the `policy_names` query parameter. + policy_names (list[str], optional): + A list of policy names. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + member_ids=member_ids, + member_names=member_names, + policy_ids=policy_ids, + policy_names=policy_names, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._policies___ssh_certificate_authority_api.api214_ssh_certificate_authority_policies_arrays_delete_with_http_info + _process_references(members, ['member_ids', 'member_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + return self._call_api(endpoint, kwargs) + + def get_ssh_certificate_authority_policies_arrays( + self, + members=None, # type: List[models.ReferenceType] + policies=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + continuation_token=None, # type: str + filter=None, # type: str + limit=None, # type: int + member_ids=None, # type: List[str] + member_names=None, # type: List[str] + offset=None, # type: int + policy_ids=None, # type: List[str] + policy_names=None, # type: List[str] + sort=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.PolicyMemberGetResponse + """ + List SSH Certificate Authority policies mapped as defaults for admins. + + Args: + members (list[FixedReference], optional): + A list of members to query for. Overrides member_ids and member_names keyword arguments. + policies (list[FixedReference], optional): + A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + continuation_token (str, optional): + An opaque token to iterate over a collection of resources. + filter (Filter, optional): + A filter to include only resources that match the specified criteria. + limit (int, optional): + Limit the number of resources in the response. If not specified, defaults to + 1000. + member_ids (list[str], optional): + A list of member IDs. If after filtering, there is not at least one resource + that matches each of the elements of `member_ids`, then an error is returned. + This cannot be provided together with the `member_names` query parameter. + member_names (list[str], optional): + A list of member names. + offset (int, optional): + The offset of the first resource to return from a collection. + policy_ids (list[str], optional): + A list of policy IDs. If after filtering, there is not at least one resource + that matches each of the elements of `policy_ids`, then an error is returned. + This cannot be provided together with the `policy_names` query parameter. + policy_names (list[str], optional): + A list of policy names. + sort (list[Property], optional): + Sort the response by the specified Properties. Can also be a single element. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + continuation_token=continuation_token, + filter=filter, + limit=limit, + member_ids=member_ids, + member_names=member_names, + offset=offset, + policy_ids=policy_ids, + policy_names=policy_names, + sort=sort, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._policies___ssh_certificate_authority_api.api214_ssh_certificate_authority_policies_arrays_get_with_http_info + _process_references(members, ['member_ids', 'member_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + return self._call_api(endpoint, kwargs) + + def post_ssh_certificate_authority_policies_arrays( + self, + members=None, # type: List[models.ReferenceType] + policies=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + member_ids=None, # type: List[str] + member_names=None, # type: List[str] + policy_ids=None, # type: List[str] + policy_names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.PolicyMemberResponse + """ + Map a SSH Certificate Authority policy as a default for admins. + + Args: + members (list[FixedReference], optional): + A list of members to query for. Overrides member_ids and member_names keyword arguments. + policies (list[FixedReference], optional): + A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + member_ids (list[str], optional): + A list of member IDs. If after filtering, there is not at least one resource + that matches each of the elements of `member_ids`, then an error is returned. + This cannot be provided together with the `member_names` query parameter. + member_names (list[str], optional): + A list of member names. + policy_ids (list[str], optional): + A list of policy IDs. If after filtering, there is not at least one resource + that matches each of the elements of `policy_ids`, then an error is returned. + This cannot be provided together with the `policy_names` query parameter. + policy_names (list[str], optional): + A list of policy names. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + member_ids=member_ids, + member_names=member_names, + policy_ids=policy_ids, + policy_names=policy_names, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._policies___ssh_certificate_authority_api.api214_ssh_certificate_authority_policies_arrays_post_with_http_info + _process_references(members, ['member_ids', 'member_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + return self._call_api(endpoint, kwargs) + + def delete_ssh_certificate_authority_policies( + self, + references=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + ids=None, # type: List[str] + names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> None + """ + Deletes SSH Certificate Authority configurations. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides ids and names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + ids (list[str], optional): + A list of resource IDs. If after filtering, there is not at least one resource + that matches each of the elements of `ids`, then an error is returned. This + cannot be provided together with the `name` or `names` query parameters. + names (list[str], optional): + A list of resource names. If there is not at least one resource that matches + each of the elements of `names`, then an error is returned. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + ids=ids, + names=names, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._policies___ssh_certificate_authority_api.api214_ssh_certificate_authority_policies_delete_with_http_info + _process_references(references, ['ids', 'names'], kwargs) + return self._call_api(endpoint, kwargs) + + def get_ssh_certificate_authority_policies( + self, + references=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + continuation_token=None, # type: str + filter=None, # type: str + ids=None, # type: List[str] + names=None, # type: List[str] + limit=None, # type: int + offset=None, # type: int + sort=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.SshCertificateAuthorityPolicyGetResponse + """ + List SSH Certificate Authority configurations + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides ids and names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + continuation_token (str, optional): + An opaque token to iterate over a collection of resources. + filter (Filter, optional): + A filter to include only resources that match the specified criteria. + ids (list[str], optional): + A list of resource IDs. If after filtering, there is not at least one resource + that matches each of the elements of `ids`, then an error is returned. This + cannot be provided together with the `name` or `names` query parameters. + names (list[str], optional): + A list of resource names. If there is not at least one resource that matches + each of the elements of `names`, then an error is returned. + limit (int, optional): + Limit the number of resources in the response. If not specified, defaults to + 1000. + offset (int, optional): + The offset of the first resource to return from a collection. + sort (list[Property], optional): + Sort the response by the specified Properties. Can also be a single element. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + continuation_token=continuation_token, + filter=filter, + ids=ids, + names=names, + limit=limit, + offset=offset, + sort=sort, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._policies___ssh_certificate_authority_api.api214_ssh_certificate_authority_policies_get_with_http_info + _process_references(references, ['ids', 'names'], kwargs) + return self._call_api(endpoint, kwargs) + + def get_ssh_certificate_authority_policies_members( + self, + members=None, # type: List[models.ReferenceType] + policies=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + continuation_token=None, # type: str + filter=None, # type: str + limit=None, # type: int + member_ids=None, # type: List[str] + member_names=None, # type: List[str] + offset=None, # type: int + policy_ids=None, # type: List[str] + policy_names=None, # type: List[str] + sort=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.PolicyMemberGetResponse + """ + List SSH Certificate Authority policies mapped to the admin default settings, or + to one or more specific users. + + Args: + members (list[FixedReference], optional): + A list of members to query for. Overrides member_ids and member_names keyword arguments. + policies (list[FixedReference], optional): + A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + continuation_token (str, optional): + An opaque token to iterate over a collection of resources. + filter (Filter, optional): + A filter to include only resources that match the specified criteria. + limit (int, optional): + Limit the number of resources in the response. If not specified, defaults to + 1000. + member_ids (list[str], optional): + A list of member IDs. If after filtering, there is not at least one resource + that matches each of the elements of `member_ids`, then an error is returned. + This cannot be provided together with the `member_names` query parameter. + member_names (list[str], optional): + A list of member names. + offset (int, optional): + The offset of the first resource to return from a collection. + policy_ids (list[str], optional): + A list of policy IDs. If after filtering, there is not at least one resource + that matches each of the elements of `policy_ids`, then an error is returned. + This cannot be provided together with the `policy_names` query parameter. + policy_names (list[str], optional): + A list of policy names. + sort (list[Property], optional): + Sort the response by the specified Properties. Can also be a single element. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + continuation_token=continuation_token, + filter=filter, + limit=limit, + member_ids=member_ids, + member_names=member_names, + offset=offset, + policy_ids=policy_ids, + policy_names=policy_names, + sort=sort, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._policies___ssh_certificate_authority_api.api214_ssh_certificate_authority_policies_members_get_with_http_info + _process_references(members, ['member_ids', 'member_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + return self._call_api(endpoint, kwargs) + + def patch_ssh_certificate_authority_policies( + self, + references=None, # type: List[models.ReferenceType] + policy=None, # type: models.SshCertificateAuthorityPolicy + x_request_id=None, # type: str + ids=None, # type: List[str] + names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.SshCertificateAuthorityPolicyResponse + """ + Modifies one or more attributes of SSH Certificate Authority configurations. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides ids and names keyword arguments. + + policy (SshCertificateAuthorityPolicy, required): + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + ids (list[str], optional): + A list of resource IDs. If after filtering, there is not at least one resource + that matches each of the elements of `ids`, then an error is returned. This + cannot be provided together with the `name` or `names` query parameters. + names (list[str], optional): + A list of resource names. If there is not at least one resource that matches + each of the elements of `names`, then an error is returned. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + policy=policy, + x_request_id=x_request_id, + ids=ids, + names=names, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._policies___ssh_certificate_authority_api.api214_ssh_certificate_authority_policies_patch_with_http_info + _process_references(references, ['ids', 'names'], kwargs) + return self._call_api(endpoint, kwargs) + + def post_ssh_certificate_authority_policies( + self, + references=None, # type: List[models.ReferenceType] + names=None, # type: List[str] + policy=None, # type: models.SshCertificateAuthorityPolicyPost + x_request_id=None, # type: str + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.SshCertificateAuthorityPolicyResponse + """ + Creates SSH Certificate Authority configurations. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides names keyword arguments. + + names (list[str], required): + A list of resource names. + policy (SshCertificateAuthorityPolicyPost, required): + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + names=names, + policy=policy, + x_request_id=x_request_id, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._policies___ssh_certificate_authority_api.api214_ssh_certificate_authority_policies_post_with_http_info + _process_references(references, ['names'], kwargs) + return self._call_api(endpoint, kwargs) + + def get_policies_all( + self, + references=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + continuation_token=None, # type: str + filter=None, # type: str + ids=None, # type: List[str] + limit=None, # type: int + names=None, # type: List[str] + offset=None, # type: int + sort=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.PolicyBaseGetResponse + """ + List all policies of all types. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides ids and names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + continuation_token (str, optional): + An opaque token to iterate over a collection of resources. + filter (Filter, optional): + A filter to include only resources that match the specified criteria. + ids (list[str], optional): + A list of resource IDs. If after filtering, there is not at least one resource + that matches each of the elements of `ids`, then an error is returned. This + cannot be provided together with the `name` or `names` query parameters. + limit (int, optional): + Limit the number of resources in the response. If not specified, defaults to + 1000. + names (list[str], optional): + A list of resource names. If there is not at least one resource that matches + each of the elements of `names`, then an error is returned. + offset (int, optional): + The offset of the first resource to return from a collection. + sort (list[Property], optional): + Sort the response by the specified Properties. Can also be a single element. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + continuation_token=continuation_token, + filter=filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + sort=sort, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._policies__all_api.api214_policies_all_get_with_http_info + _process_references(references, ['ids', 'names'], kwargs) + return self._call_api(endpoint, kwargs) + + def get_policies_all_members( + self, + local_file_systems=None, # type: List[models.ReferenceType] + members=None, # type: List[models.ReferenceType] + policies=None, # type: List[models.ReferenceType] + remotes=None, # type: List[models.ReferenceType] + remote_file_systems=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + continuation_token=None, # type: str + filter=None, # type: str + limit=None, # type: int + local_file_system_ids=None, # type: List[str] + local_file_system_names=None, # type: List[str] + member_ids=None, # type: List[str] + member_names=None, # type: List[str] + member_types=None, # type: List[models.ModelsFB214ResourceTypeYaml] + offset=None, # type: int + policy_ids=None, # type: List[str] + policy_names=None, # type: List[str] + remote_ids=None, # type: List[str] + remote_file_system_ids=None, # type: List[str] + remote_file_system_names=None, # type: List[str] + remote_names=None, # type: List[str] + sort=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.PolicyMemberWithRemoteGetResponse + """ + List policies (of all types) mapped to other entities (file systems, snapshots, + file system replica links, and object store users). + + Args: + local_file_systems (list[FixedReference], optional): + A list of local_file_systems to query for. Overrides local_file_system_ids and local_file_system_names keyword arguments. + members (list[FixedReference], optional): + A list of members to query for. Overrides member_ids and member_names keyword arguments. + policies (list[FixedReference], optional): + A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + remotes (list[FixedReference], optional): + A list of remotes to query for. Overrides remote_ids and remote_names keyword arguments. + remote_file_systems (list[FixedReference], optional): + A list of remote_file_systems to query for. Overrides remote_file_system_ids and remote_file_system_names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + continuation_token (str, optional): + An opaque token to iterate over a collection of resources. + filter (Filter, optional): + A filter to include only resources that match the specified criteria. + limit (int, optional): + Limit the number of resources in the response. If not specified, defaults to + 1000. + local_file_system_ids (list[str], optional): + A list of local file system IDs. If after filtering, there is not at least one + resource that matches each of the elements, then an error is returned. This + cannot be provided together with the `local_file_system_names` query parameter. + local_file_system_names (list[str], optional): + A list of local file system names. If there is not at least one resource that + matches each of the elements, then an error is returned. This cannot be provided + together with `local_file_system_ids` query parameter. + member_ids (list[str], optional): + A list of member IDs. If after filtering, there is not at least one resource + that matches each of the elements of `member_ids`, then an error is returned. + This cannot be provided together with the `member_names` query parameter. + member_names (list[str], optional): + A list of member names. + member_types (list[ModelsFB214ResourceTypeYaml], optional): + A list of member types. Valid values are `file-systems`, `file-system- + snapshots`, `file-system-replica-links`, and `object-store-users`. Different + endpoints may accept different subsets of these values. + offset (int, optional): + The offset of the first resource to return from a collection. + policy_ids (list[str], optional): + A list of policy IDs. If after filtering, there is not at least one resource + that matches each of the elements of `policy_ids`, then an error is returned. + This cannot be provided together with the `policy_names` query parameter. + policy_names (list[str], optional): + A list of policy names. + remote_ids (list[str], optional): + A list of remote array IDs. If after filtering, there is not at least one + resource that matches each of the elements, then an error is returned. This + cannot be provided together with the `remote_names` query parameter. + remote_file_system_ids (list[str], optional): + A list of remote file system IDs. If there is not at least one resource that + matches each of the elements, then an error is returned. This cannot be provided + together with the `remote_file_system_names` query parameter. + remote_file_system_names (list[str], optional): + A list of remote file system names. If there is not at least one resource that + matches each of the elements, then an error is returned. This cannot be provided + together with the `remote_file_system_ids` query parameter. + remote_names (list[str], optional): + A list of remote array names. If there is not at least one resource that matches + each of the elements, then an error is returned. This cannot be provided + together with `remote_ids` query parameter. + sort (list[Property], optional): + Sort the response by the specified Properties. Can also be a single element. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + continuation_token=continuation_token, + filter=filter, + limit=limit, + local_file_system_ids=local_file_system_ids, + local_file_system_names=local_file_system_names, + member_ids=member_ids, + member_names=member_names, + member_types=member_types, + offset=offset, + policy_ids=policy_ids, + policy_names=policy_names, + remote_ids=remote_ids, + remote_file_system_ids=remote_file_system_ids, + remote_file_system_names=remote_file_system_names, + remote_names=remote_names, + sort=sort, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._policies__all_api.api214_policies_all_members_get_with_http_info + _process_references(local_file_systems, ['local_file_system_ids', 'local_file_system_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _process_references(remotes, ['remote_ids', 'remote_names'], kwargs) + _process_references(remote_file_systems, ['remote_file_system_ids', 'remote_file_system_names'], kwargs) + return self._call_api(endpoint, kwargs) + + def delete_public_keys( + self, + references=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + ids=None, # type: List[str] + names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> None + """ + Deletes public key configurations. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides ids and names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + ids (list[str], optional): + A list of resource IDs. If after filtering, there is not at least one resource + that matches each of the elements of `ids`, then an error is returned. This + cannot be provided together with the `name` or `names` query parameters. + names (list[str], optional): + A list of resource names. If there is not at least one resource that matches + each of the elements of `names`, then an error is returned. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + ids=ids, + names=names, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._public_keys_api.api214_public_keys_delete_with_http_info + _process_references(references, ['ids', 'names'], kwargs) + return self._call_api(endpoint, kwargs) + + def get_public_keys( + self, + references=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + continuation_token=None, # type: str + filter=None, # type: str + ids=None, # type: List[str] + names=None, # type: List[str] + limit=None, # type: int + offset=None, # type: int + sort=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.PublicKeyGetResponse + """ + List public key configurations. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides ids and names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + continuation_token (str, optional): + An opaque token to iterate over a collection of resources. + filter (Filter, optional): + A filter to include only resources that match the specified criteria. + ids (list[str], optional): + A list of resource IDs. If after filtering, there is not at least one resource + that matches each of the elements of `ids`, then an error is returned. This + cannot be provided together with the `name` or `names` query parameters. + names (list[str], optional): + A list of resource names. If there is not at least one resource that matches + each of the elements of `names`, then an error is returned. + limit (int, optional): + Limit the number of resources in the response. If not specified, defaults to + 1000. + offset (int, optional): + The offset of the first resource to return from a collection. + sort (list[Property], optional): + Sort the response by the specified Properties. Can also be a single element. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + continuation_token=continuation_token, + filter=filter, + ids=ids, + names=names, + limit=limit, + offset=offset, + sort=sort, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._public_keys_api.api214_public_keys_get_with_http_info + _process_references(references, ['ids', 'names'], kwargs) + return self._call_api(endpoint, kwargs) + + def post_public_keys( + self, + references=None, # type: List[models.ReferenceType] + names=None, # type: List[str] + public_key=None, # type: models.PublicKeyPost + x_request_id=None, # type: str + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.PublicKeyResponse + """ + Creates public key configurations. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides names keyword arguments. + + names (list[str], required): + A list of resource names. + public_key (PublicKeyPost, required): + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + names=names, + public_key=public_key, + x_request_id=x_request_id, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._public_keys_api.api214_public_keys_post_with_http_info + _process_references(references, ['names'], kwargs) + return self._call_api(endpoint, kwargs) + + def get_public_keys_uses( + self, + references=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + continuation_token=None, # type: str + filter=None, # type: str + ids=None, # type: List[str] + limit=None, # type: int + names=None, # type: List[str] + offset=None, # type: int + sort=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.PublicKeyUseGetResponse + """ + List how public keys are being used and by what. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides ids and names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + continuation_token (str, optional): + An opaque token to iterate over a collection of resources. + filter (Filter, optional): + A filter to include only resources that match the specified criteria. + ids (list[str], optional): + A list of resource IDs. If after filtering, there is not at least one resource + that matches each of the elements of `ids`, then an error is returned. This + cannot be provided together with the `name` or `names` query parameters. + limit (int, optional): + Limit the number of resources in the response. If not specified, defaults to + 1000. + names (list[str], optional): + A list of resource names. If there is not at least one resource that matches + each of the elements of `names`, then an error is returned. + offset (int, optional): + The offset of the first resource to return from a collection. + sort (list[Property], optional): + Sort the response by the specified Properties. Can also be a single element. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + continuation_token=continuation_token, + filter=filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + sort=sort, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._public_keys_api.api214_public_keys_uses_get_with_http_info + _process_references(references, ['ids', 'names'], kwargs) + return self._call_api(endpoint, kwargs) + + def delete_quotas_groups( + self, + file_systems=None, # type: List[models.ReferenceType] + groups=None, # type: List[models.ReferenceType] + references=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + file_system_names=None, # type: List[str] + file_system_ids=None, # type: List[str] + gids=None, # type: List[int] + group_names=None, # type: List[str] + names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> None + """ + Delete a hard limit quota for a group. + + Args: + file_systems (list[FixedReference], optional): + A list of file_systems to query for. Overrides file_system_names and file_system_ids keyword arguments. + groups (list[FixedReference], optional): + A list of groups to query for. Overrides group_names keyword arguments. + references (list[FixedReference], optional): + A list of references to query for. Overrides names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + file_system_names (list[str], optional): + A list of file system names. If there is not at least one resource that matches + each of the elements of `file_system_names`, then an error is returned. + file_system_ids (list[str], optional): + A list of file system IDs. If after filtering, there is not at least one + resource that matches each of the elements of `file_system_ids`, then an error + is returned. This cannot be provided together with the `file_system_names` query + parameter. + gids (list[int], optional): + A list of group IDs. If there is not at least one resource that matches each of + the elements of `gids`, then an error is returned. This cannot be provided + together with `group_names` query parameter. + group_names (list[str], optional): + A list of group names. If there is not at least one resource that matches each + of the elements of `group_names`, then an error is returned. This cannot be + provided together with `gids` query parameter. + names (list[str], optional): + A list of resource names. If there is not at least one resource that matches + each of the elements of `names`, then an error is returned. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + file_system_names=file_system_names, + file_system_ids=file_system_ids, + gids=gids, + group_names=group_names, + names=names, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._quotas_api.api214_quotas_groups_delete_with_http_info + _process_references(file_systems, ['file_system_names', 'file_system_ids'], kwargs) + _process_references(groups, ['group_names'], kwargs) + _process_references(references, ['names'], kwargs) + return self._call_api(endpoint, kwargs) + + def get_quotas_groups( + self, + file_systems=None, # type: List[models.ReferenceType] + groups=None, # type: List[models.ReferenceType] + references=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + continuation_token=None, # type: str + file_system_ids=None, # type: List[str] + file_system_names=None, # type: List[str] + filter=None, # type: str + gids=None, # type: List[int] + group_names=None, # type: List[str] + limit=None, # type: int + names=None, # type: List[str] + offset=None, # type: int + sort=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.GroupQuotaGetResponse + """ + List groups with hard limit quotas. + + Args: + file_systems (list[FixedReference], optional): + A list of file_systems to query for. Overrides file_system_ids and file_system_names keyword arguments. + groups (list[FixedReference], optional): + A list of groups to query for. Overrides group_names keyword arguments. + references (list[FixedReference], optional): + A list of references to query for. Overrides names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + continuation_token (str, optional): + An opaque token to iterate over a collection of resources. + file_system_ids (list[str], optional): + A list of file system IDs. If after filtering, there is not at least one + resource that matches each of the elements of `file_system_ids`, then an error + is returned. This cannot be provided together with the `file_system_names` query + parameter. + file_system_names (list[str], optional): + A list of file system names. If there is not at least one resource that matches + each of the elements of `file_system_names`, then an error is returned. + filter (Filter, optional): + A filter to include only resources that match the specified criteria. + gids (list[int], optional): + A list of group IDs. If there is not at least one resource that matches each of + the elements of `gids`, then an error is returned. This cannot be provided + together with `group_names` query parameter. + group_names (list[str], optional): + A list of group names. If there is not at least one resource that matches each + of the elements of `group_names`, then an error is returned. This cannot be + provided together with `gids` query parameter. + limit (int, optional): + Limit the number of resources in the response. If not specified, defaults to + 1000. + names (list[str], optional): + A list of resource names. If there is not at least one resource that matches + each of the elements of `names`, then an error is returned. + offset (int, optional): + The offset of the first resource to return from a collection. + sort (list[Property], optional): + Sort the response by the specified Properties. Can also be a single element. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + continuation_token=continuation_token, + file_system_ids=file_system_ids, + file_system_names=file_system_names, + filter=filter, + gids=gids, + group_names=group_names, + limit=limit, + names=names, + offset=offset, + sort=sort, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._quotas_api.api214_quotas_groups_get_with_http_info + _process_references(file_systems, ['file_system_ids', 'file_system_names'], kwargs) + _process_references(groups, ['group_names'], kwargs) + _process_references(references, ['names'], kwargs) + return self._call_api(endpoint, kwargs) + + def patch_quotas_groups( + self, + file_systems=None, # type: List[models.ReferenceType] + groups=None, # type: List[models.ReferenceType] + references=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + file_system_names=None, # type: List[str] + file_system_ids=None, # type: List[str] + gids=None, # type: List[int] + group_names=None, # type: List[str] + names=None, # type: List[str] + quota=None, # type: models.GroupQuotaPatch + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.GroupQuotaResponse + """ + Modify a quota for a group. Note that if you modify a group's quota to a lower + value and that group's usage has already exceeded the new value, writes will + automatically halt until usage decreases below the new quota setting. + + Args: + file_systems (list[FixedReference], optional): + A list of file_systems to query for. Overrides file_system_names and file_system_ids keyword arguments. + groups (list[FixedReference], optional): + A list of groups to query for. Overrides group_names keyword arguments. + references (list[FixedReference], optional): + A list of references to query for. Overrides names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + file_system_names (list[str], optional): + A list of file system names. If there is not at least one resource that matches + each of the elements of `file_system_names`, then an error is returned. + file_system_ids (list[str], optional): + A list of file system IDs. If after filtering, there is not at least one + resource that matches each of the elements of `file_system_ids`, then an error + is returned. This cannot be provided together with the `file_system_names` query + parameter. + gids (list[int], optional): + A list of group IDs. If there is not at least one resource that matches each of + the elements of `gids`, then an error is returned. This cannot be provided + together with `group_names` query parameter. + group_names (list[str], optional): + A list of group names. If there is not at least one resource that matches each + of the elements of `group_names`, then an error is returned. This cannot be + provided together with `gids` query parameter. + names (list[str], optional): + A list of resource names. If there is not at least one resource that matches + each of the elements of `names`, then an error is returned. + quota (GroupQuotaPatch, optional): + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + file_system_names=file_system_names, + file_system_ids=file_system_ids, + gids=gids, + group_names=group_names, + names=names, + quota=quota, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._quotas_api.api214_quotas_groups_patch_with_http_info + _process_references(file_systems, ['file_system_names', 'file_system_ids'], kwargs) + _process_references(groups, ['group_names'], kwargs) + _process_references(references, ['names'], kwargs) + return self._call_api(endpoint, kwargs) + + def post_quotas_groups( + self, + file_systems=None, # type: List[models.ReferenceType] + groups=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + file_system_ids=None, # type: List[str] + file_system_names=None, # type: List[str] + gids=None, # type: List[int] + group_names=None, # type: List[str] + quota=None, # type: models.GroupQuotaPost + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.GroupQuotaResponse + """ + Create a hard limit quota for a group. + + Args: + file_systems (list[FixedReference], optional): + A list of file_systems to query for. Overrides file_system_ids and file_system_names keyword arguments. + groups (list[FixedReference], optional): + A list of groups to query for. Overrides group_names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + file_system_ids (list[str], optional): + A list of file system IDs. If after filtering, there is not at least one + resource that matches each of the elements of `file_system_ids`, then an error + is returned. This cannot be provided together with the `file_system_names` query + parameter. + file_system_names (list[str], optional): + A list of file system names. If there is not at least one resource that matches + each of the elements of `file_system_names`, then an error is returned. + gids (list[int], optional): + A list of group IDs. If there is not at least one resource that matches each of + the elements of `gids`, then an error is returned. This cannot be provided + together with `group_names` query parameter. + group_names (list[str], optional): + A list of group names. If there is not at least one resource that matches each + of the elements of `group_names`, then an error is returned. This cannot be + provided together with `gids` query parameter. + quota (GroupQuotaPost, optional): + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + file_system_ids=file_system_ids, + file_system_names=file_system_names, + gids=gids, + group_names=group_names, + quota=quota, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._quotas_api.api214_quotas_groups_post_with_http_info + _process_references(file_systems, ['file_system_ids', 'file_system_names'], kwargs) + _process_references(groups, ['group_names'], kwargs) + return self._call_api(endpoint, kwargs) + + def get_quotas_settings( + self, + references=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + ids=None, # type: List[str] + names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.QuotaSettingGetResponse + """ + List notification attributes of a group or user quota. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides ids and names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + ids (list[str], optional): + A list of resource IDs. If after filtering, there is not at least one resource + that matches each of the elements of `ids`, then an error is returned. This + cannot be provided together with the `name` or `names` query parameters. + names (list[str], optional): + A list of resource names. If there is not at least one resource that matches + each of the elements of `names`, then an error is returned. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + ids=ids, + names=names, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._quotas_api.api214_quotas_settings_get_with_http_info + _process_references(references, ['ids', 'names'], kwargs) + return self._call_api(endpoint, kwargs) + + def patch_quotas_settings( + self, + quota_setting=None, # type: models.QuotaSetting + x_request_id=None, # type: str + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.QuotaSettingResponse + """ + Modify the notification attributes of a group or user quota. + + Args: + + quota_setting (QuotaSetting, required): + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + quota_setting=quota_setting, + x_request_id=x_request_id, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._quotas_api.api214_quotas_settings_patch_with_http_info + return self._call_api(endpoint, kwargs) + + def delete_quotas_users( + self, + file_systems=None, # type: List[models.ReferenceType] + references=None, # type: List[models.ReferenceType] + users=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + file_system_names=None, # type: List[str] + file_system_ids=None, # type: List[str] + names=None, # type: List[str] + uids=None, # type: List[int] + user_names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> None + """ + Delete a hard limit file system quota for a user. + + Args: + file_systems (list[FixedReference], optional): + A list of file_systems to query for. Overrides file_system_names and file_system_ids keyword arguments. + references (list[FixedReference], optional): + A list of references to query for. Overrides names keyword arguments. + users (list[FixedReference], optional): + A list of users to query for. Overrides user_names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + file_system_names (list[str], optional): + A list of file system names. If there is not at least one resource that matches + each of the elements of `file_system_names`, then an error is returned. + file_system_ids (list[str], optional): + A list of file system IDs. If after filtering, there is not at least one + resource that matches each of the elements of `file_system_ids`, then an error + is returned. This cannot be provided together with the `file_system_names` query + parameter. + names (list[str], optional): + A list of resource names. If there is not at least one resource that matches + each of the elements of `names`, then an error is returned. + uids (list[int], optional): + A list of user IDs. If there is not at least one resource that matches each of + the elements of `uids`, then an error is returned. This cannot be provided + together with `user_names` query parameter. + user_names (list[str], optional): + A list of user names. If there is not at least one resource that matches each of + the elements of `user_names`, then an error is returned. This cannot be provided + together with `uids` query parameter. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + file_system_names=file_system_names, + file_system_ids=file_system_ids, + names=names, + uids=uids, + user_names=user_names, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._quotas_api.api214_quotas_users_delete_with_http_info + _process_references(file_systems, ['file_system_names', 'file_system_ids'], kwargs) + _process_references(references, ['names'], kwargs) + _process_references(users, ['user_names'], kwargs) + return self._call_api(endpoint, kwargs) + + def get_quotas_users( + self, + file_systems=None, # type: List[models.ReferenceType] + references=None, # type: List[models.ReferenceType] + users=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + continuation_token=None, # type: str + file_system_ids=None, # type: List[str] + file_system_names=None, # type: List[str] + filter=None, # type: str + limit=None, # type: int + names=None, # type: List[str] + offset=None, # type: int + sort=None, # type: List[str] + uids=None, # type: List[int] + user_names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.UserQuotaGetResponse + """ + List users with hard limit file system quotas. + + Args: + file_systems (list[FixedReference], optional): + A list of file_systems to query for. Overrides file_system_ids and file_system_names keyword arguments. + references (list[FixedReference], optional): + A list of references to query for. Overrides names keyword arguments. + users (list[FixedReference], optional): + A list of users to query for. Overrides user_names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + continuation_token (str, optional): + An opaque token to iterate over a collection of resources. + file_system_ids (list[str], optional): + A list of file system IDs. If after filtering, there is not at least one + resource that matches each of the elements of `file_system_ids`, then an error + is returned. This cannot be provided together with the `file_system_names` query + parameter. + file_system_names (list[str], optional): + A list of file system names. If there is not at least one resource that matches + each of the elements of `file_system_names`, then an error is returned. + filter (Filter, optional): + A filter to include only resources that match the specified criteria. + limit (int, optional): + Limit the number of resources in the response. If not specified, defaults to + 1000. + names (list[str], optional): + A list of resource names. If there is not at least one resource that matches + each of the elements of `names`, then an error is returned. + offset (int, optional): + The offset of the first resource to return from a collection. + sort (list[Property], optional): + Sort the response by the specified Properties. Can also be a single element. + uids (list[int], optional): + A list of user IDs. If there is not at least one resource that matches each of + the elements of `uids`, then an error is returned. This cannot be provided + together with `user_names` query parameter. + user_names (list[str], optional): + A list of user names. If there is not at least one resource that matches each of + the elements of `user_names`, then an error is returned. This cannot be provided + together with `uids` query parameter. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + continuation_token=continuation_token, + file_system_ids=file_system_ids, + file_system_names=file_system_names, + filter=filter, + limit=limit, + names=names, + offset=offset, + sort=sort, + uids=uids, + user_names=user_names, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._quotas_api.api214_quotas_users_get_with_http_info + _process_references(file_systems, ['file_system_ids', 'file_system_names'], kwargs) + _process_references(references, ['names'], kwargs) + _process_references(users, ['user_names'], kwargs) + return self._call_api(endpoint, kwargs) + + def patch_quotas_users( + self, + file_systems=None, # type: List[models.ReferenceType] + references=None, # type: List[models.ReferenceType] + users=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + file_system_names=None, # type: List[str] + file_system_ids=None, # type: List[str] + names=None, # type: List[str] + uids=None, # type: List[int] + user_names=None, # type: List[str] + quota=None, # type: models.UserQuotaPatch + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.UserQuotaResponse + """ + Modify the attributes of a hard limit file system quota. Note that if you modify + a user's quota to a lower value and that user’s usage has already exceeded the + new value, writes will automatically halt until usage decreases below the new + quota setting. + + Args: + file_systems (list[FixedReference], optional): + A list of file_systems to query for. Overrides file_system_names and file_system_ids keyword arguments. + references (list[FixedReference], optional): + A list of references to query for. Overrides names keyword arguments. + users (list[FixedReference], optional): + A list of users to query for. Overrides user_names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + file_system_names (list[str], optional): + A list of file system names. If there is not at least one resource that matches + each of the elements of `file_system_names`, then an error is returned. + file_system_ids (list[str], optional): + A list of file system IDs. If after filtering, there is not at least one + resource that matches each of the elements of `file_system_ids`, then an error + is returned. This cannot be provided together with the `file_system_names` query + parameter. + names (list[str], optional): + A list of resource names. If there is not at least one resource that matches + each of the elements of `names`, then an error is returned. + uids (list[int], optional): + A list of user IDs. If there is not at least one resource that matches each of + the elements of `uids`, then an error is returned. This cannot be provided + together with `user_names` query parameter. + user_names (list[str], optional): + A list of user names. If there is not at least one resource that matches each of + the elements of `user_names`, then an error is returned. This cannot be provided + together with `uids` query parameter. + quota (UserQuotaPatch, optional): + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + file_system_names=file_system_names, + file_system_ids=file_system_ids, + names=names, + uids=uids, + user_names=user_names, + quota=quota, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._quotas_api.api214_quotas_users_patch_with_http_info + _process_references(file_systems, ['file_system_names', 'file_system_ids'], kwargs) + _process_references(references, ['names'], kwargs) + _process_references(users, ['user_names'], kwargs) + return self._call_api(endpoint, kwargs) + + def post_quotas_users( + self, + file_systems=None, # type: List[models.ReferenceType] + users=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + file_system_ids=None, # type: List[str] + file_system_names=None, # type: List[str] + uids=None, # type: List[int] + user_names=None, # type: List[str] + quota=None, # type: models.UserQuotaPost + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.UserQuotaResponse + """ + Create a hard limit file system quota for a user. + + Args: + file_systems (list[FixedReference], optional): + A list of file_systems to query for. Overrides file_system_ids and file_system_names keyword arguments. + users (list[FixedReference], optional): + A list of users to query for. Overrides user_names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + file_system_ids (list[str], optional): + A list of file system IDs. If after filtering, there is not at least one + resource that matches each of the elements of `file_system_ids`, then an error + is returned. This cannot be provided together with the `file_system_names` query + parameter. + file_system_names (list[str], optional): + A list of file system names. If there is not at least one resource that matches + each of the elements of `file_system_names`, then an error is returned. + uids (list[int], optional): + A list of user IDs. If there is not at least one resource that matches each of + the elements of `uids`, then an error is returned. This cannot be provided + together with `user_names` query parameter. + user_names (list[str], optional): + A list of user names. If there is not at least one resource that matches each of + the elements of `user_names`, then an error is returned. This cannot be provided + together with `uids` query parameter. + quota (UserQuotaPost, optional): + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + file_system_ids=file_system_ids, + file_system_names=file_system_names, + uids=uids, + user_names=user_names, + quota=quota, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._quotas_api.api214_quotas_users_post_with_http_info + _process_references(file_systems, ['file_system_ids', 'file_system_names'], kwargs) + _process_references(users, ['user_names'], kwargs) + return self._call_api(endpoint, kwargs) + + def get_rapid_data_locking( + self, + x_request_id=None, # type: str + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.RapidDataLockingResponse + """ + Displays the status of the Rapid Data Locking feature. + + Args: + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._rdl_api.api214_rapid_data_locking_get_with_http_info + return self._call_api(endpoint, kwargs) + + def patch_rapid_data_locking( + self, + rapid_data_locking=None, # type: models.RapidDataLocking + x_request_id=None, # type: str + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.RapidDataLockingResponse + """ + Modifies the Rapid Data Locking feature. Note that the feature can only be + enabled if there are no file systems nor buckets created on the array. Once + enabled, the feature cannot be modified. + + Args: + + rapid_data_locking (RapidDataLocking, required): + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + rapid_data_locking=rapid_data_locking, + x_request_id=x_request_id, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._rdl_api.api214_rapid_data_locking_patch_with_http_info + return self._call_api(endpoint, kwargs) + + def post_rapid_data_locking_rotate( + self, + x_request_id=None, # type: str + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> None + """ + Rotates the external keys on the associated EKM appliance. + + Args: + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._rdl_api.api214_rapid_data_locking_rotate_post_with_http_info + return self._call_api(endpoint, kwargs) + + def get_rapid_data_locking_test( + self, + x_request_id=None, # type: str + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.TestResultResponse + """ + Displays a detailed result of a Rapid Data Locking test. + + Args: + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._rdl_api.api214_rapid_data_locking_test_get_with_http_info + return self._call_api(endpoint, kwargs) + + def get_roles( + self, + references=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + continuation_token=None, # type: str + ids=None, # type: List[str] + filter=None, # type: str + limit=None, # type: int + names=None, # type: List[str] + offset=None, # type: int + sort=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.RoleGetResponse + """ + List roles and permission attributes for role-based access control (RBAC). + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides ids and names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + continuation_token (str, optional): + An opaque token to iterate over a collection of resources. + ids (list[str], optional): + A list of resource IDs. If after filtering, there is not at least one resource + that matches each of the elements of `ids`, then an error is returned. This + cannot be provided together with the `name` or `names` query parameters. + filter (Filter, optional): + A filter to include only resources that match the specified criteria. + limit (int, optional): + Limit the number of resources in the response. If not specified, defaults to + 1000. + names (list[str], optional): + A list of resource names. If there is not at least one resource that matches + each of the elements of `names`, then an error is returned. + offset (int, optional): + The offset of the first resource to return from a collection. + sort (list[Property], optional): + Sort the response by the specified Properties. Can also be a single element. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + continuation_token=continuation_token, + ids=ids, + filter=filter, + limit=limit, + names=names, + offset=offset, + sort=sort, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._roles_api.api214_roles_get_with_http_info + _process_references(references, ['ids', 'names'], kwargs) + return self._call_api(endpoint, kwargs) + + def get_sessions( + self, + references=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + continuation_token=None, # type: str + filter=None, # type: str + ids=None, # type: List[str] + limit=None, # type: int + names=None, # type: List[str] + offset=None, # type: int + sort=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.SessionGetResponse + """ + Displays session data for user login events performed in the Purity//FB GUI, + CLI, and REST API. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides ids and names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + continuation_token (str, optional): + An opaque token to iterate over a collection of resources. + filter (Filter, optional): + A filter to include only resources that match the specified criteria. + ids (list[str], optional): + A list of resource IDs. If after filtering, there is not at least one resource + that matches each of the elements of `ids`, then an error is returned. This + cannot be provided together with the `name` or `names` query parameters. + limit (int, optional): + Limit the number of resources in the response. If not specified, defaults to + 1000. + names (list[str], optional): + A list of resource names. If there is not at least one resource that matches + each of the elements of `names`, then an error is returned. + offset (int, optional): + The offset of the first resource to return from a collection. + sort (list[Property], optional): + Sort the response by the specified Properties. Can also be a single element. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + continuation_token=continuation_token, + filter=filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + sort=sort, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._sessions_api.api214_sessions_get_with_http_info + _process_references(references, ['ids', 'names'], kwargs) + return self._call_api(endpoint, kwargs) + + def get_smtp_servers( + self, + references=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + continuation_token=None, # type: str + filter=None, # type: str + ids=None, # type: List[str] + limit=None, # type: int + names=None, # type: List[str] + offset=None, # type: int + sort=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.SmtpServerGetResponse + """ + List SMTP server attributes for the array network. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides ids and names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + continuation_token (str, optional): + An opaque token to iterate over a collection of resources. + filter (Filter, optional): + A filter to include only resources that match the specified criteria. + ids (list[str], optional): + A list of resource IDs. If after filtering, there is not at least one resource + that matches each of the elements of `ids`, then an error is returned. This + cannot be provided together with the `name` or `names` query parameters. + limit (int, optional): + Limit the number of resources in the response. If not specified, defaults to + 1000. + names (list[str], optional): + A list of resource names. If there is not at least one resource that matches + each of the elements of `names`, then an error is returned. + offset (int, optional): + The offset of the first resource to return from a collection. + sort (list[Property], optional): + Sort the response by the specified Properties. Can also be a single element. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + continuation_token=continuation_token, + filter=filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + sort=sort, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._smtp_api.api214_smtp_servers_get_with_http_info + _process_references(references, ['ids', 'names'], kwargs) + return self._call_api(endpoint, kwargs) + + def patch_smtp_servers( + self, + smtp=None, # type: models.SmtpServer + x_request_id=None, # type: str + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.SmtpServerResponse + """ + Modify SMTP server attributes such as the relay host and sender domain. + + Args: + + smtp (SmtpServer, required): + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + smtp=smtp, + x_request_id=x_request_id, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._smtp_api.api214_smtp_servers_patch_with_http_info + return self._call_api(endpoint, kwargs) + + def get_snmp_agents( + self, + references=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + continuation_token=None, # type: str + filter=None, # type: str + ids=None, # type: List[str] + limit=None, # type: int + names=None, # type: List[str] + offset=None, # type: int + sort=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.SnmpAgentGetResponse + """ + List SNMP agent attributes. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides ids and names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + continuation_token (str, optional): + An opaque token to iterate over a collection of resources. + filter (Filter, optional): + A filter to include only resources that match the specified criteria. + ids (list[str], optional): + A list of resource IDs. If after filtering, there is not at least one resource + that matches each of the elements of `ids`, then an error is returned. This + cannot be provided together with the `name` or `names` query parameters. + limit (int, optional): + Limit the number of resources in the response. If not specified, defaults to + 1000. + names (list[str], optional): + A list of resource names. If there is not at least one resource that matches + each of the elements of `names`, then an error is returned. + offset (int, optional): + The offset of the first resource to return from a collection. + sort (list[Property], optional): + Sort the response by the specified Properties. Can also be a single element. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + continuation_token=continuation_token, + filter=filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + sort=sort, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._snmp_agents_api.api214_snmp_agents_get_with_http_info + _process_references(references, ['ids', 'names'], kwargs) + return self._call_api(endpoint, kwargs) + + def get_snmp_agents_mib( + self, + x_request_id=None, # type: str + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.SnmpAgentMibResponse + """ + List the SNMP MIB text. + + Args: + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._snmp_agents_api.api214_snmp_agents_mib_get_with_http_info + return self._call_api(endpoint, kwargs) + + def patch_snmp_agents( + self, + snmp_agent=None, # type: models.SnmpAgent + x_request_id=None, # type: str + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.SnmpAgentResponse + """ + Modify SNMP agent attributes. + + Args: + + snmp_agent (SnmpAgent, required): + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + snmp_agent=snmp_agent, + x_request_id=x_request_id, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._snmp_agents_api.api214_snmp_agents_patch_with_http_info + return self._call_api(endpoint, kwargs) + + def delete_snmp_managers( + self, + references=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + ids=None, # type: List[str] + names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> None + """ + Remove an SNMP manager. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides ids and names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + ids (list[str], optional): + A list of resource IDs. If after filtering, there is not at least one resource + that matches each of the elements of `ids`, then an error is returned. This + cannot be provided together with the `name` or `names` query parameters. + names (list[str], optional): + A list of resource names. If there is not at least one resource that matches + each of the elements of `names`, then an error is returned. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + ids=ids, + names=names, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._snmp_managers_api.api214_snmp_managers_delete_with_http_info + _process_references(references, ['ids', 'names'], kwargs) + return self._call_api(endpoint, kwargs) + + def get_snmp_managers( + self, + references=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + continuation_token=None, # type: str + ids=None, # type: List[str] + filter=None, # type: str + limit=None, # type: int + names=None, # type: List[str] + offset=None, # type: int + sort=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.SnmpManagerGetResponse + """ + List SNMP managers and their attributes. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides ids and names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + continuation_token (str, optional): + An opaque token to iterate over a collection of resources. + ids (list[str], optional): + A list of resource IDs. If after filtering, there is not at least one resource + that matches each of the elements of `ids`, then an error is returned. This + cannot be provided together with the `name` or `names` query parameters. + filter (Filter, optional): + A filter to include only resources that match the specified criteria. + limit (int, optional): + Limit the number of resources in the response. If not specified, defaults to + 1000. + names (list[str], optional): + A list of resource names. If there is not at least one resource that matches + each of the elements of `names`, then an error is returned. + offset (int, optional): + The offset of the first resource to return from a collection. + sort (list[Property], optional): + Sort the response by the specified Properties. Can also be a single element. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + continuation_token=continuation_token, + ids=ids, + filter=filter, + limit=limit, + names=names, + offset=offset, + sort=sort, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._snmp_managers_api.api214_snmp_managers_get_with_http_info + _process_references(references, ['ids', 'names'], kwargs) + return self._call_api(endpoint, kwargs) + + def patch_snmp_managers( + self, + references=None, # type: List[models.ReferenceType] + snmp_manager=None, # type: models.SnmpManager + x_request_id=None, # type: str + ids=None, # type: List[str] + names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.SnmpManagerResponse + """ + Modify SNMP manager attributes such as versions. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides ids and names keyword arguments. + + snmp_manager (SnmpManager, required): + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + ids (list[str], optional): + A list of resource IDs. If after filtering, there is not at least one resource + that matches each of the elements of `ids`, then an error is returned. This + cannot be provided together with the `name` or `names` query parameters. + names (list[str], optional): + A list of resource names. If there is not at least one resource that matches + each of the elements of `names`, then an error is returned. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + snmp_manager=snmp_manager, + x_request_id=x_request_id, + ids=ids, + names=names, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._snmp_managers_api.api214_snmp_managers_patch_with_http_info + _process_references(references, ['ids', 'names'], kwargs) + return self._call_api(endpoint, kwargs) + + def post_snmp_managers( + self, + references=None, # type: List[models.ReferenceType] + snmp_manager=None, # type: models.SnmpManagerPost + names=None, # type: List[str] + x_request_id=None, # type: str + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.SnmpManagerResponse + """ + Create an SNMP manager. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides names keyword arguments. + + snmp_manager (SnmpManagerPost, required): + names (list[str], required): + A list of resource names. + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + snmp_manager=snmp_manager, + names=names, + x_request_id=x_request_id, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._snmp_managers_api.api214_snmp_managers_post_with_http_info + _process_references(references, ['names'], kwargs) + return self._call_api(endpoint, kwargs) + + def get_snmp_managers_test( + self, + references=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + continuation_token=None, # type: str + ids=None, # type: List[str] + filter=None, # type: str + limit=None, # type: int + names=None, # type: List[str] + offset=None, # type: int + sort=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.TestResultGetResponse + """ + Test if the configuration of an SNMP manager is valid. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides ids and names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + continuation_token (str, optional): + An opaque token to iterate over a collection of resources. + ids (list[str], optional): + A list of resource IDs. If after filtering, there is not at least one resource + that matches each of the elements of `ids`, then an error is returned. This + cannot be provided together with the `name` or `names` query parameters. + filter (Filter, optional): + A filter to include only resources that match the specified criteria. + limit (int, optional): + Limit the number of resources in the response. If not specified, defaults to + 1000. + names (list[str], optional): + A list of resource names. If there is not at least one resource that matches + each of the elements of `names`, then an error is returned. + offset (int, optional): + The offset of the first resource to return from a collection. + sort (list[Property], optional): + Sort the response by the specified Properties. Can also be a single element. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + continuation_token=continuation_token, + ids=ids, + filter=filter, + limit=limit, + names=names, + offset=offset, + sort=sort, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._snmp_managers_api.api214_snmp_managers_test_get_with_http_info + _process_references(references, ['ids', 'names'], kwargs) + return self._call_api(endpoint, kwargs) + + def delete_subnets( + self, + references=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + ids=None, # type: List[str] + names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> None + """ + Remove an array subnet. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides ids and names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + ids (list[str], optional): + A list of resource IDs. If after filtering, there is not at least one resource + that matches each of the elements of `ids`, then an error is returned. This + cannot be provided together with the `name` or `names` query parameters. + names (list[str], optional): + A list of resource names. If there is not at least one resource that matches + each of the elements of `names`, then an error is returned. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + ids=ids, + names=names, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._subnets_api.api214_subnets_delete_with_http_info + _process_references(references, ['ids', 'names'], kwargs) + return self._call_api(endpoint, kwargs) + + def get_subnets( + self, + references=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + continuation_token=None, # type: str + filter=None, # type: str + ids=None, # type: List[str] + limit=None, # type: int + names=None, # type: List[str] + offset=None, # type: int + sort=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.SubnetGetResponse + """ + List the array’s subnets. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides ids and names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + continuation_token (str, optional): + An opaque token to iterate over a collection of resources. + filter (Filter, optional): + A filter to include only resources that match the specified criteria. + ids (list[str], optional): + A list of resource IDs. If after filtering, there is not at least one resource + that matches each of the elements of `ids`, then an error is returned. This + cannot be provided together with the `name` or `names` query parameters. + limit (int, optional): + Limit the number of resources in the response. If not specified, defaults to + 1000. + names (list[str], optional): + A list of resource names. If there is not at least one resource that matches + each of the elements of `names`, then an error is returned. + offset (int, optional): + The offset of the first resource to return from a collection. + sort (list[Property], optional): + Sort the response by the specified Properties. Can also be a single element. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + continuation_token=continuation_token, + filter=filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + sort=sort, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._subnets_api.api214_subnets_get_with_http_info + _process_references(references, ['ids', 'names'], kwargs) + return self._call_api(endpoint, kwargs) + + def patch_subnets( + self, + references=None, # type: List[models.ReferenceType] + subnet=None, # type: models.Subnet + x_request_id=None, # type: str + ids=None, # type: List[str] + names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.SubnetResponse + """ + Modify array subnet attributes. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides ids and names keyword arguments. + + subnet (Subnet, required): + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + ids (list[str], optional): + A list of resource IDs. If after filtering, there is not at least one resource + that matches each of the elements of `ids`, then an error is returned. This + cannot be provided together with the `name` or `names` query parameters. + names (list[str], optional): + A list of resource names. If there is not at least one resource that matches + each of the elements of `names`, then an error is returned. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + subnet=subnet, + x_request_id=x_request_id, + ids=ids, + names=names, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._subnets_api.api214_subnets_patch_with_http_info + _process_references(references, ['ids', 'names'], kwargs) + return self._call_api(endpoint, kwargs) + + def post_subnets( + self, + references=None, # type: List[models.ReferenceType] + subnet=None, # type: models.Subnet + names=None, # type: List[str] + x_request_id=None, # type: str + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.SubnetResponse + """ + Create an array subnet. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides names keyword arguments. + + subnet (Subnet, required): + names (list[str], required): + A list of resource names. + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + subnet=subnet, + names=names, + x_request_id=x_request_id, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._subnets_api.api214_subnets_post_with_http_info + _process_references(references, ['names'], kwargs) + return self._call_api(endpoint, kwargs) + + def get_support( + self, + references=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + ids=None, # type: List[str] + names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.SupportGetResponse + """ + List Phone Home and Remote Assistance settings. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides ids and names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + ids (list[str], optional): + A list of resource IDs. If after filtering, there is not at least one resource + that matches each of the elements of `ids`, then an error is returned. This + cannot be provided together with the `name` or `names` query parameters. + names (list[str], optional): + A list of resource names. If there is not at least one resource that matches + each of the elements of `names`, then an error is returned. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + ids=ids, + names=names, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._support_api.api214_support_get_with_http_info + _process_references(references, ['ids', 'names'], kwargs) + return self._call_api(endpoint, kwargs) + + def patch_support( + self, + support=None, # type: models.Support + x_request_id=None, # type: str + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.SupportResponse + """ + Modify Phone Home and Remote Assistance settings. + + Args: + + support (Support, required): + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + support=support, + x_request_id=x_request_id, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._support_api.api214_support_patch_with_http_info + return self._call_api(endpoint, kwargs) + + def get_support_test( + self, + x_request_id=None, # type: str + filter=None, # type: str + sort=None, # type: List[str] + test_type=None, # type: str + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.TestResultGetResponse + """ + Test if the Phone Home and Remote Assistance settings are functioning properly. + + Args: + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + filter (Filter, optional): + A filter to include only resources that match the specified criteria. + sort (list[Property], optional): + Sort the response by the specified Properties. Can also be a single element. + test_type (str, optional): + Specify the type of test. Valid values are `all`, `phonehome` and `remote- + assist`. If not specified, defaults to `all`. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + filter=filter, + sort=sort, + test_type=test_type, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._support_api.api214_support_test_get_with_http_info + return self._call_api(endpoint, kwargs) + + def delete_syslog_servers( + self, + references=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + ids=None, # type: List[str] + names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> None + """ + Delete a configured syslog server and stop forwarding syslog messages. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides ids and names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + ids (list[str], optional): + A list of resource IDs. If after filtering, there is not at least one resource + that matches each of the elements of `ids`, then an error is returned. This + cannot be provided together with the `name` or `names` query parameters. + names (list[str], optional): + Performs the operation on the unique name specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + ids=ids, + names=names, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._syslog_api.api214_syslog_servers_delete_with_http_info + _process_references(references, ['ids', 'names'], kwargs) + return self._call_api(endpoint, kwargs) + + def get_syslog_servers( + self, + references=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + continuation_token=None, # type: str + filter=None, # type: str + ids=None, # type: List[str] + limit=None, # type: int + names=None, # type: List[str] + offset=None, # type: int + sort=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.SyslogServerGetResponse + """ + Return a list of configured syslog servers. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides ids and names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + continuation_token (str, optional): + An opaque token to iterate over a collection of resources. + filter (Filter, optional): + A filter to include only resources that match the specified criteria. + ids (list[str], optional): + A list of resource IDs. If after filtering, there is not at least one resource + that matches each of the elements of `ids`, then an error is returned. This + cannot be provided together with the `name` or `names` query parameters. + limit (int, optional): + Limit the number of resources in the response. If not specified, defaults to + 1000. + names (list[str], optional): + Performs the operation on the unique name specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. + offset (int, optional): + The offset of the first resource to return from a collection. + sort (list[Property], optional): + Sort the response by the specified Properties. Can also be a single element. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + continuation_token=continuation_token, + filter=filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + sort=sort, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._syslog_api.api214_syslog_servers_get_with_http_info + _process_references(references, ['ids', 'names'], kwargs) + return self._call_api(endpoint, kwargs) + + def patch_syslog_servers( + self, + references=None, # type: List[models.ReferenceType] + syslog_server=None, # type: models.SyslogServerPatch + x_request_id=None, # type: str + ids=None, # type: List[str] + names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.SyslogServerResponse + """ + Modify the URI or services of a configured syslog server. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides ids and names keyword arguments. + + syslog_server (SyslogServerPatch, required): + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + ids (list[str], optional): + A list of resource IDs. If after filtering, there is not at least one resource + that matches each of the elements of `ids`, then an error is returned. This + cannot be provided together with the `name` or `names` query parameters. + names (list[str], optional): + Performs the operation on the unique name specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + syslog_server=syslog_server, + x_request_id=x_request_id, + ids=ids, + names=names, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._syslog_api.api214_syslog_servers_patch_with_http_info + _process_references(references, ['ids', 'names'], kwargs) + return self._call_api(endpoint, kwargs) + + def post_syslog_servers( + self, + references=None, # type: List[models.ReferenceType] + syslog_server=None, # type: models.SyslogServerPost + x_request_id=None, # type: str + names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.SyslogServerResponse + """ + Configure a new syslog server. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides names keyword arguments. + + syslog_server (SyslogServerPost, required): + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + names (list[str], optional): + Performs the operation on the unique name specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + syslog_server=syslog_server, + x_request_id=x_request_id, + names=names, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._syslog_api.api214_syslog_servers_post_with_http_info + _process_references(references, ['names'], kwargs) + return self._call_api(endpoint, kwargs) + + def get_syslog_servers_settings( + self, + references=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + continuation_token=None, # type: str + filter=None, # type: str + ids=None, # type: List[str] + limit=None, # type: int + names=None, # type: List[str] + offset=None, # type: int + sort=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.SyslogServerSettingsGetResponse + """ + List the certificate or certificate group associated with the syslog servers. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides ids and names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + continuation_token (str, optional): + An opaque token to iterate over a collection of resources. + filter (Filter, optional): + A filter to include only resources that match the specified criteria. + ids (list[str], optional): + A list of resource IDs. If after filtering, there is not at least one resource + that matches each of the elements of `ids`, then an error is returned. This + cannot be provided together with the `name` or `names` query parameters. + limit (int, optional): + Limit the number of resources in the response. If not specified, defaults to + 1000. + names (list[str], optional): + A list of resource names. If there is not at least one resource that matches + each of the elements of `names`, then an error is returned. + offset (int, optional): + The offset of the first resource to return from a collection. + sort (list[Property], optional): + Sort the response by the specified Properties. Can also be a single element. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + continuation_token=continuation_token, + filter=filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + sort=sort, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._syslog_api.api214_syslog_servers_settings_get_with_http_info + _process_references(references, ['ids', 'names'], kwargs) + return self._call_api(endpoint, kwargs) + + def patch_syslog_servers_settings( + self, + references=None, # type: List[models.ReferenceType] + syslog_server_settings=None, # type: models.SyslogServerSettings + x_request_id=None, # type: str + ids=None, # type: List[str] + names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.SyslogServerSettingsResponse + """ + Modify the certificate or certificate group associated with the syslog servers. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides ids and names keyword arguments. + + syslog_server_settings (SyslogServerSettings, required): + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + ids (list[str], optional): + A list of resource IDs. If after filtering, there is not at least one resource + that matches each of the elements of `ids`, then an error is returned. This + cannot be provided together with the `name` or `names` query parameters. + names (list[str], optional): + A list of resource names. If there is not at least one resource that matches + each of the elements of `names`, then an error is returned. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + syslog_server_settings=syslog_server_settings, + x_request_id=x_request_id, + ids=ids, + names=names, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._syslog_api.api214_syslog_servers_settings_patch_with_http_info + _process_references(references, ['ids', 'names'], kwargs) + return self._call_api(endpoint, kwargs) + + def get_syslog_servers_test( + self, + x_request_id=None, # type: str + continuation_token=None, # type: str + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.TestResultGetResponse + """ + Send test messages to conifgured remote syslog servers. + + Args: + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + continuation_token (str, optional): + An opaque token to iterate over a collection of resources. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + continuation_token=continuation_token, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._syslog_api.api214_syslog_servers_test_get_with_http_info + return self._call_api(endpoint, kwargs) + + def delete_targets( + self, + references=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + ids=None, # type: List[str] + names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> None + """ + Delete the connection to the target for replication. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides ids and names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + ids (list[str], optional): + A list of resource IDs. If after filtering, there is not at least one resource + that matches each of the elements of `ids`, then an error is returned. This + cannot be provided together with the `name` or `names` query parameters. + names (list[str], optional): + A list of resource names. If there is not at least one resource that matches + each of the elements of `names`, then an error is returned. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + ids=ids, + names=names, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._targets_api.api214_targets_delete_with_http_info + _process_references(references, ['ids', 'names'], kwargs) + return self._call_api(endpoint, kwargs) + + def get_targets( + self, + references=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + continuation_token=None, # type: str + filter=None, # type: str + ids=None, # type: List[str] + limit=None, # type: int + names=None, # type: List[str] + offset=None, # type: int + sort=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.TargetGetResponse + """ + List targets used for replication. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides ids and names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + continuation_token (str, optional): + An opaque token to iterate over a collection of resources. + filter (Filter, optional): + A filter to include only resources that match the specified criteria. + ids (list[str], optional): + A list of resource IDs. If after filtering, there is not at least one resource + that matches each of the elements of `ids`, then an error is returned. This + cannot be provided together with the `name` or `names` query parameters. + limit (int, optional): + Limit the number of resources in the response. If not specified, defaults to + 1000. + names (list[str], optional): + A list of resource names. If there is not at least one resource that matches + each of the elements of `names`, then an error is returned. + offset (int, optional): + The offset of the first resource to return from a collection. + sort (list[Property], optional): + Sort the response by the specified Properties. Can also be a single element. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + continuation_token=continuation_token, + filter=filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + sort=sort, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._targets_api.api214_targets_get_with_http_info + _process_references(references, ['ids', 'names'], kwargs) + return self._call_api(endpoint, kwargs) + + def patch_targets( + self, + references=None, # type: List[models.ReferenceType] + target=None, # type: models.Target + x_request_id=None, # type: str + ids=None, # type: List[str] + names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.TargetResponse + """ + Modify the target attributes for replication. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides ids and names keyword arguments. + + target (Target, required): + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + ids (list[str], optional): + A list of resource IDs. If after filtering, there is not at least one resource + that matches each of the elements of `ids`, then an error is returned. This + cannot be provided together with the `name` or `names` query parameters. + names (list[str], optional): + A list of resource names. If there is not at least one resource that matches + each of the elements of `names`, then an error is returned. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + target=target, + x_request_id=x_request_id, + ids=ids, + names=names, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._targets_api.api214_targets_patch_with_http_info + _process_references(references, ['ids', 'names'], kwargs) + return self._call_api(endpoint, kwargs) + + def get_targets_performance_replication( + self, + references=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + continuation_token=None, # type: str + end_time=None, # type: int + filter=None, # type: str + ids=None, # type: List[str] + limit=None, # type: int + names=None, # type: List[str] + offset=None, # type: int + resolution=None, # type: int + sort=None, # type: List[str] + start_time=None, # type: int + total_only=None, # type: bool + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.ResourcePerformanceReplicationGetResponse + """ + List replication performance metrics for targets. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides ids and names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + continuation_token (str, optional): + An opaque token to iterate over a collection of resources. + end_time (int, optional): + When the time window ends (in milliseconds since epoch). + filter (Filter, optional): + A filter to include only resources that match the specified criteria. + ids (list[str], optional): + A list of resource IDs. If after filtering, there is not at least one resource + that matches each of the elements of `ids`, then an error is returned. This + cannot be provided together with the `name` or `names` query parameters. + limit (int, optional): + Limit the number of resources in the response. If not specified, defaults to + 1000. + names (list[str], optional): + A list of resource names. If there is not at least one resource that matches + each of the elements of `names`, then an error is returned. + offset (int, optional): + The offset of the first resource to return from a collection. + resolution (int, optional): + The desired ms between samples. Available resolutions may depend on data type, + `start_time` and `end_time`. In general `1000`, `30000`, `300000`, `1800000`, + `7200000`, and `86400000` are possible values. + sort (list[Property], optional): + Sort the response by the specified Properties. Can also be a single element. + start_time (int, optional): + When the time window starts (in milliseconds since epoch). + total_only (bool, optional): + Only return the total record for the specified items. The total record will be + the total of all items after filtering. The `items` list will be empty. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + continuation_token=continuation_token, + end_time=end_time, + filter=filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + resolution=resolution, + sort=sort, + start_time=start_time, + total_only=total_only, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._targets_api.api214_targets_performance_replication_get_with_http_info + _process_references(references, ['ids', 'names'], kwargs) + return self._call_api(endpoint, kwargs) + + def post_targets( + self, + references=None, # type: List[models.ReferenceType] + names=None, # type: List[str] + target=None, # type: models.TargetPost + x_request_id=None, # type: str + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.TargetResponse + """ + Add a target for replication. + + Args: + references (list[FixedReference], optional): + A list of references to query for. Overrides names keyword arguments. + + names (list[str], required): + A list of resource names. + target (TargetPost, required): + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + names=names, + target=target, + x_request_id=x_request_id, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._targets_api.api214_targets_post_with_http_info + _process_references(references, ['names'], kwargs) + return self._call_api(endpoint, kwargs) + + def get_usage_groups( + self, + file_systems=None, # type: List[models.ReferenceType] + groups=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + continuation_token=None, # type: str + file_system_ids=None, # type: List[str] + file_system_names=None, # type: List[str] + filter=None, # type: str + gids=None, # type: List[int] + group_names=None, # type: List[str] + limit=None, # type: int + offset=None, # type: int + sort=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.GroupQuotaGetResponse + """ + List groups with hard limit quotas and their file system usage. + + Args: + file_systems (list[FixedReference], optional): + A list of file_systems to query for. Overrides file_system_ids and file_system_names keyword arguments. + groups (list[FixedReference], optional): + A list of groups to query for. Overrides group_names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + continuation_token (str, optional): + An opaque token to iterate over a collection of resources. + file_system_ids (list[str], optional): + A list of file system IDs. If after filtering, there is not at least one + resource that matches each of the elements of `file_system_ids`, then an error + is returned. This cannot be provided together with the `file_system_names` query + parameter. + file_system_names (list[str], optional): + A list of file system names. If there is not at least one resource that matches + each of the elements of `file_system_names`, then an error is returned. + filter (Filter, optional): + A filter to include only resources that match the specified criteria. + gids (list[int], optional): + A list of group IDs. If there is not at least one resource that matches each of + the elements of `gids`, then an error is returned. This cannot be provided + together with `group_names` query parameter. + group_names (list[str], optional): + A list of group names. If there is not at least one resource that matches each + of the elements of `group_names`, then an error is returned. This cannot be + provided together with `gids` query parameter. + limit (int, optional): + Limit the number of resources in the response. If not specified, defaults to + 1000. + offset (int, optional): + The offset of the first resource to return from a collection. + sort (list[Property], optional): + Sort the response by the specified Properties. Can also be a single element. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + continuation_token=continuation_token, + file_system_ids=file_system_ids, + file_system_names=file_system_names, + filter=filter, + gids=gids, + group_names=group_names, + limit=limit, + offset=offset, + sort=sort, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._usage_api.api214_usage_groups_get_with_http_info + _process_references(file_systems, ['file_system_ids', 'file_system_names'], kwargs) + _process_references(groups, ['group_names'], kwargs) + return self._call_api(endpoint, kwargs) + + def get_usage_users( + self, + file_systems=None, # type: List[models.ReferenceType] + users=None, # type: List[models.ReferenceType] + x_request_id=None, # type: str + continuation_token=None, # type: str + file_system_ids=None, # type: List[str] + file_system_names=None, # type: List[str] + filter=None, # type: str + limit=None, # type: int + offset=None, # type: int + sort=None, # type: List[str] + uids=None, # type: List[int] + user_names=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.UserQuotaGetResponse + """ + List users with hard limit quotas and their file system usage. + + Args: + file_systems (list[FixedReference], optional): + A list of file_systems to query for. Overrides file_system_ids and file_system_names keyword arguments. + users (list[FixedReference], optional): + A list of users to query for. Overrides user_names keyword arguments. + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + continuation_token (str, optional): + An opaque token to iterate over a collection of resources. + file_system_ids (list[str], optional): + A list of file system IDs. If after filtering, there is not at least one + resource that matches each of the elements of `file_system_ids`, then an error + is returned. This cannot be provided together with the `file_system_names` query + parameter. + file_system_names (list[str], optional): + A list of file system names. If there is not at least one resource that matches + each of the elements of `file_system_names`, then an error is returned. + filter (Filter, optional): + A filter to include only resources that match the specified criteria. + limit (int, optional): + Limit the number of resources in the response. If not specified, defaults to + 1000. + offset (int, optional): + The offset of the first resource to return from a collection. + sort (list[Property], optional): + Sort the response by the specified Properties. Can also be a single element. + uids (list[int], optional): + A list of user IDs. If there is not at least one resource that matches each of + the elements of `uids`, then an error is returned. This cannot be provided + together with `user_names` query parameter. + user_names (list[str], optional): + A list of user names. If there is not at least one resource that matches each of + the elements of `user_names`, then an error is returned. This cannot be provided + together with `uids` query parameter. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + continuation_token=continuation_token, + file_system_ids=file_system_ids, + file_system_names=file_system_names, + filter=filter, + limit=limit, + offset=offset, + sort=sort, + uids=uids, + user_names=user_names, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._usage_api.api214_usage_users_get_with_http_info + _process_references(file_systems, ['file_system_ids', 'file_system_names'], kwargs) + _process_references(users, ['user_names'], kwargs) + return self._call_api(endpoint, kwargs) + + def get_support_verification_keys( + self, + x_request_id=None, # type: str + continuation_token=None, # type: str + filter=None, # type: str + limit=None, # type: int + offset=None, # type: int + sort=None, # type: List[str] + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.VerificationKeyGetResponse + """ + List the key used to verify the signed challenges that are used by Pure Support + to access the FlashBlade. + + Args: + + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + continuation_token (str, optional): + An opaque token to iterate over a collection of resources. + filter (Filter, optional): + A filter to include only resources that match the specified criteria. + limit (int, optional): + Limit the number of resources in the response. If not specified, defaults to + 1000. + offset (int, optional): + The offset of the first resource to return from a collection. + sort (list[Property], optional): + Sort the response by the specified Properties. Can also be a single element. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + x_request_id=x_request_id, + continuation_token=continuation_token, + filter=filter, + limit=limit, + offset=offset, + sort=sort, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._verification_keys_api.api214_support_verification_keys_get_with_http_info + return self._call_api(endpoint, kwargs) + + def patch_support_verification_keys( + self, + key=None, # type: models.VerificationKeyPatch + x_request_id=None, # type: str + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> models.VerificationKeyResponse + """ + Update the key used to verify the signed challenges that are used by Pure + Support to access the FlashBlade. + + Args: + + key (VerificationKeyPatch, required): + x_request_id (str, optional): + A header to provide to track the API call. Generated by the server if not + provided. + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + key=key, + x_request_id=x_request_id, + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._verification_keys_api.api214_support_verification_keys_patch_with_http_info + return self._call_api(endpoint, kwargs) + + def get_versions( + self, + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> dict + """ + Get available API versions. No authentication is required to access this + endpoint. The response will be a ValidResponse with version ids listed as items. + + Args: + + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._authorization_api.api_api_version_get_with_http_info + return self._call_api(endpoint, kwargs, response_creator=self._create_api_versions_response) + + def logout( + self, + async_req=False, # type: bool + _return_http_data_only=False, # type: bool + _preload_content=True, # type: bool + _request_timeout=None, # type: Optional[int] + ): + # type: (...) -> None + """ + Invalidate a REST session token. + + Args: + + async_req (bool, optional): + Request runs in separate thread and method returns + multiprocessing.pool.ApplyResult. + _return_http_data_only (bool, optional): + Returns only data field. + _preload_content (bool, optional): + Response is converted into objects. + _request_timeout (int, optional): + Total request timeout in seconds. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs = dict( + async_req=async_req, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None} + endpoint = self._authorization_api.api_logout_post_with_http_info + res = self._call_api(endpoint, kwargs, response_creator=self._create_logout_response) + # Note: The normal behavior when a call returns a 401 or 403 authentication error status + # is to reset the authentication token and retry. This effectively logs the client in again. + # Setting _retries to 0 prevents this behavior for any future calls with this client. + self._retries = 0 + return res + + + def _get_base_url(self, target): + return 'https://{}'.format(target) + + def _get_api_token_endpoint(self, target): + return self._get_base_url(target) + '/api/login' + + def _get_api_token_dispose_endpoint(self, target): + return self._get_base_url(target) + '/api/logout' + + def _set_agent_header(self): + """ + Set the user-agent header of the internal client. + """ + self._api_client.set_default_header(Headers.user_agent, self._api_client.user_agent) + + def _set_auth_header(self, refresh=False): + """ + Set the authorization or x-auth-token header of the internal client with the access + token. + + Args: + refresh (bool, optional): Whether to retrieve a new access token. + Defaults to False. + + Raises: + PureError: If there was an error retrieving the access token. + """ + if isinstance(self._token_man, TokenManager): + self._api_client.set_default_header(Headers.authorization, + self._token_man.get_header(refresh=refresh)) + else: + self._api_client.set_default_header(Headers.x_auth_token, + self._token_man.get_session_token(refresh=refresh)) + + def _call_api(self, api_function, kwargs, response_creator=None): + """ + Call the API function and process the response. May call the API + repeatedly if the request failed for a reason that may not persist in + the next call. + + Args: + api_function (function): Swagger-generated function to call. + kwargs (dict): kwargs to pass to the function. + response_creator: optional method to generate a ValidResponse from a non-standard endpoint. + If None, use the standard _create_valid_response method. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs['_request_timeout'] = self._timeout + retries = self._retries + while True: + try: + response = api_function(**kwargs) + # Call was successful (200) + if response_creator: + return response_creator(response, api_function, kwargs) + else: + return self._create_valid_response(response, api_function, kwargs) + except ApiException as error: + # If no chance for retries, return the error + if retries == 0: + return self._create_error_response(error) + # If bad request or not found, return the error (it will never work) + elif error.status in [400, 404]: + return self._create_error_response(error) + # If authentication error, reset access token and retry + elif error.status in [401, 403]: + self._set_auth_header(refresh=True) + # If rate limit error, wait the proper time and try again + elif error.status == 429: + # If the the minute limit hit, wait that long + if (int(error.headers.get(Headers.x_ratelimit_remaining_min)) + == int(error.headers.get(Headers.x_ratelimit_min))): + time.sleep(60) + # Otherwise it was the second limit and only wait a second + time.sleep(1) + # If some internal server error we know nothing about, return + elif error.status == 500: + return self._create_error_response(error) + # If internal server errors that has to do with timeouts, try again + elif error.status > 500: + pass + # If error with the swagger client, raise the error + else: + raise PureError(error) + retries = retries - 1 + + def _create_valid_response(self, response, endpoint, kwargs): + """ + Create a ValidResponse from a Swagger response. + + Args: + response (tuple): + Body, status, header tuple as returned from Swagger client. + endpoint (function): + The function of the Swagger client that was called. + kwargs (dict): + The processed kwargs that were passed to the endpoint function. + + Returns: + ValidResponse + """ + body, status, headers = response + continuation_token = getattr(body, "continuation_token", None) + total_item_count = getattr(body, "total_item_count", None) + total = getattr(body, "total", None) + more_items_remaining = getattr(body, "more_items_remaining", None) + items = None + + if body is not None: + # if body is a file then should be a singleton list + body_items = [body] if type(body) == str else body.items + items = iter(ItemIterator(self, endpoint, kwargs, + continuation_token, total_item_count, + body_items, + headers.get(Headers.x_request_id, None), + more_items_remaining or False, None)) + return ValidResponse(status, continuation_token, total_item_count, + items, headers, total, more_items_remaining) + + + def _create_api_versions_response(self, response, endpoint, kwargs): + """ + Create a ValidResponse from an ApiVersion Swagger response. + + Args: + response (tuple): + Body, status, header tuple as returned from Swagger client. + endpoint (function): + The function of the Swagger client that was called. + kwargs (dict): + The processed kwargs that were passed to the endpoint function. + + Returns: + ValidResponse + """ + body, status, headers = response + continuation_token = None + total_item_count = None + total = None + more_items_remaining = None + items = None + + if body is not None: + # if body is a file then should be a singleton list + body_items = [body] if type(body) == str else body.versions + items = iter(ItemIterator(self, endpoint, kwargs, + continuation_token, total_item_count, + body_items, + headers.get(Headers.x_request_id, None), + more_items_remaining or False, None)) + response = ValidResponse(status, continuation_token, total_item_count, + items, headers, total, more_items_remaining) + return response + + + def _create_logout_response(self, response, endpoint, kwargs): + """ + A logout response only contains the status field. + """ + body, status, headers = response + continuation_token = None + total_item_count = None + total = None + more_items_remaining = None + items = None + return ValidResponse(status, continuation_token, total_item_count, + items, headers, total, more_items_remaining) + + + def _create_error_response(self, error): + """ + Create an ErrorResponse from a Swagger error. + + Args: + error (ApiException): + Error returned by Swagger client. + + Returns: + ErrorResponse + """ + status = error.status + try: + body = json.loads(error.body) + except Exception: + body = {} + if status in [403, 429]: + # Parse differently if the error message came from kong + errors = [ApiError(None, body.get(Responses.message, None))] + else: + errors = [ApiError(err.get(Responses.context, None), + err.get(Responses.message, None)) + for err in body.get(Responses.errors, {})] + return ErrorResponse(status, errors, headers=error.headers) + + +def _process_references(references, params, kwargs): + """ + Process reference objects into a list of ids or names. + Removes ids and names arguments. + + Args: + references (list[FixedReference]): + The references from which to extract ids or names. + params (list[Parameter]): + The parameters to be overridden. + kwargs (dict): + The kwargs to process. + + Raises: + PureError: If a reference does not have an id or name. + """ + if references is not None: + if not isinstance(references, list): + references = [references] + for param in params: + kwargs.pop(param, None) + all_have_id = all(getattr(ref, 'id', None) is not None for ref in references) + all_have_name = all(getattr(ref, 'name', None) is not None for ref in references) + id_param = [param for param in params if param.endswith("ids")] + name_param = [param for param in params if param.endswith("names")] + if all_have_id and len(id_param) > 0: + kwargs[id_param[0]] = [getattr(ref, 'id') for ref in references] + elif all_have_name and len(name_param) > 0: + kwargs[name_param[0]] = [getattr(ref, 'name') for ref in references] + else: + raise PureError('Invalid reference for {}'.format(", ".join(params))) diff --git a/pypureclient/flashblade/FB_2_14/configuration.py b/pypureclient/flashblade/FB_2_14/configuration.py new file mode 100644 index 000000000..0538bb09b --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/configuration.py @@ -0,0 +1,249 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import copy +import logging +import multiprocessing +import sys +import urllib3 + +import six +from six.moves import http_client as httplib + + +class TypeWithDefault(type): + def __init__(cls, name, bases, dct): + super(TypeWithDefault, cls).__init__(name, bases, dct) + cls._default = None + + def __call__(cls): + if cls._default is None: + cls._default = type.__call__(cls) + return copy.copy(cls._default) + + def set_default(cls, default): + cls._default = copy.copy(default) + + +class Configuration(six.with_metaclass(TypeWithDefault, object)): + + def __init__(self): + """Constructor""" + # Default Base url + self.host = "http://[array]" + # Temp file folder for downloading files + self.temp_folder_path = None + + # Authentication Settings + # dict to store API key(s) + self.api_key = {} + # dict to store API prefix (e.g. Bearer) + self.api_key_prefix = {} + # Username for HTTP basic authentication + self.username = "" + # Password for HTTP basic authentication + self.password = "" + + # Logging Settings + self.logger = {} + self.logger["package_logger"] = logging.getLogger("pypureclient.flashblade.FB_2_14") + self.logger["urllib3_logger"] = logging.getLogger("urllib3") + # Log format + self.logger_format = '%(asctime)s %(levelname)s %(message)s' + # Log stream handler + self.logger_stream_handler = None + # Log file handler + self.logger_file_handler = None + # Debug file location + self.logger_file = None + # Debug switch + self.debug = False + + # SSL/TLS verification + # Set this to false to skip verifying SSL certificate when calling API + # from https server. + self.verify_ssl = True + # Set this to customize the certificate file to verify the peer. + self.ssl_ca_cert = None + # client certificate file + self.cert_file = None + # client key file + self.key_file = None + # Set this to True/False to enable/disable SSL hostname verification. + self.assert_hostname = None + + # urllib3 connection pool's maximum number of connections saved + # per pool. urllib3 uses 1 connection as default value, but this is + # not the best value when you are making a lot of possibly parallel + # requests to the same host, which is often the case here. + # cpu_count * 5 is used as default value to increase performance. + self.connection_pool_maxsize = multiprocessing.cpu_count() * 5 + + # Proxy URL + self.proxy = None + # Safe chars for path_param + self.safe_chars_for_path_param = '' + + @property + def logger_file(self): + """The logger file. + + If the logger_file is None, then add stream handler and remove file + handler. Otherwise, add file handler and remove stream handler. + + :param value: The logger_file path. + :type: str + """ + return self.__logger_file + + @logger_file.setter + def logger_file(self, value): + """The logger file. + + If the logger_file is None, then add stream handler and remove file + handler. Otherwise, add file handler and remove stream handler. + + :param value: The logger_file path. + :type: str + """ + self.__logger_file = value + if self.__logger_file: + # If set logging file, + # then add file handler and remove stream handler. + self.logger_file_handler = logging.FileHandler(self.__logger_file) + self.logger_file_handler.setFormatter(self.logger_formatter) + for _, logger in six.iteritems(self.logger): + logger.addHandler(self.logger_file_handler) + if self.logger_stream_handler: + logger.removeHandler(self.logger_stream_handler) + else: + # If not set logging file, + # then add stream handler and remove file handler. + self.logger_stream_handler = logging.StreamHandler() + self.logger_stream_handler.setFormatter(self.logger_formatter) + for _, logger in six.iteritems(self.logger): + logger.addHandler(self.logger_stream_handler) + if self.logger_file_handler: + logger.removeHandler(self.logger_file_handler) + + @property + def debug(self): + """Debug status + + :param value: The debug status, True or False. + :type: bool + """ + return self.__debug + + @debug.setter + def debug(self, value): + """Debug status + + :param value: The debug status, True or False. + :type: bool + """ + self.__debug = value + if self.__debug: + # if debug status is True, turn on debug logging + for _, logger in six.iteritems(self.logger): + logger.setLevel(logging.DEBUG) + # turn on httplib debug + httplib.HTTPConnection.debuglevel = 1 + else: + # if debug status is False, turn off debug logging, + # setting log level to default `logging.WARNING` + for _, logger in six.iteritems(self.logger): + logger.setLevel(logging.WARNING) + # turn off httplib debug + httplib.HTTPConnection.debuglevel = 0 + + @property + def logger_format(self): + """The logger format. + + The logger_formatter will be updated when sets logger_format. + + :param value: The format string. + :type: str + """ + return self.__logger_format + + @logger_format.setter + def logger_format(self, value): + """The logger format. + + The logger_formatter will be updated when sets logger_format. + + :param value: The format string. + :type: str + """ + self.__logger_format = value + self.logger_formatter = logging.Formatter(self.__logger_format) + + def get_api_key_with_prefix(self, identifier): + """Gets API key (with prefix if set). + + :param identifier: The identifier of apiKey. + :return: The token for api key authentication. + """ + if (self.api_key.get(identifier) and + self.api_key_prefix.get(identifier)): + return self.api_key_prefix[identifier] + ' ' + self.api_key[identifier] + elif self.api_key.get(identifier): + return self.api_key[identifier] + + def get_basic_auth_token(self): + """Gets HTTP basic authentication header (string). + + :return: The token for basic HTTP authentication. + """ + return urllib3.util.make_headers( + basic_auth=self.username + ':' + self.password + ).get('authorization') + + def auth_settings(self): + """Gets Auth Settings dict for api client. + + :return: The Auth Settings information dict. + """ + return { + 'ApiToken': + { + 'type': 'api_key', + 'in': 'header', + 'key': 'api-token', + 'value': self.get_api_key_with_prefix('api-token') + }, + 'AuthorizationHeader': + { + 'type': 'api_key', + 'in': 'header', + 'key': 'x-auth-token', + 'value': self.get_api_key_with_prefix('x-auth-token') + }, + + } + + def to_debug_report(self): + """Gets the essential information for debugging. + + :return: The report for debugging. + """ + return "Python SDK Debug Report:\n"\ + "OS: {env}\n"\ + "Python Version: {pyversion}\n"\ + "Version of the API: 2.14\n"\ + "SDK Package Version: 2.14".\ + format(env=sys.platform, pyversion=sys.version) diff --git a/pypureclient/flashblade/FB_2_14/models/__init__.py b/pypureclient/flashblade/FB_2_14/models/__init__.py new file mode 100644 index 000000000..ac114b538 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/__init__.py @@ -0,0 +1,485 @@ +# coding: utf-8 + +from __future__ import absolute_import + + +class ReferenceType(object): + """Class just for type annotations. + + It's used for reference arg on api function. This allows user to pass collections of Model objects + to the method without transforming them to ids or names. + + Should be Protocol type when the typing module will get support of it. + """ + def __init__(self): + self.id = '' + self.name = '' + + +def quoteString(s): + r"""Quote string according to + https://wiki.purestorage.com/display/UXReviewers/Filtering + + >>> quote("a") + "'a'" + >>> quote("a\\b") + "'a\\\\b'" + >>> quote("a\\b") + "'a\\\\b'" + >>> quote("a'b") + "'a\\'b'" + >>> quote(None) + None + """ + if s is None: + return None + quoted = str(s).replace("\\", "\\\\").replace("'", "\\'") + return "'{}'".format(quoted) + + +def quoteStrings(s): + if s is None: + return None + return [quoteString(x) for x in s] + + +# import models into model package +from .active_directory import ActiveDirectory +from .active_directory_directory_servers import ActiveDirectoryDirectoryServers +from .active_directory_get_response import ActiveDirectoryGetResponse +from .active_directory_patch import ActiveDirectoryPatch +from .active_directory_post import ActiveDirectoryPost +from .active_directory_response import ActiveDirectoryResponse +from .admin import Admin +from .admin_api_token import AdminApiToken +from .admin_api_token_get_response import AdminApiTokenGetResponse +from .admin_api_token_response import AdminApiTokenResponse +from .admin_cache import AdminCache +from .admin_cache_get_response import AdminCacheGetResponse +from .admin_get_response import AdminGetResponse +from .admin_patch import AdminPatch +from .admin_response import AdminResponse +from .admin_setting import AdminSetting +from .admin_settings_get_response import AdminSettingsGetResponse +from .admin_settings_response import AdminSettingsResponse +from .alert import Alert +from .alert_get_response import AlertGetResponse +from .alert_response import AlertResponse +from .alert_watcher import AlertWatcher +from .alert_watcher_get_response import AlertWatcherGetResponse +from .alert_watcher_post import AlertWatcherPost +from .alert_watcher_response import AlertWatcherResponse +from .api_client import ApiClient +from .api_clients_post import ApiClientsPost +from .api_clients_response import ApiClientsResponse +from .api_token import ApiToken +from .api_version import ApiVersion +from .array import Array +from .array_connection import ArrayConnection +from .array_connection_get_response import ArrayConnectionGetResponse +from .array_connection_key import ArrayConnectionKey +from .array_connection_key_get_response import ArrayConnectionKeyGetResponse +from .array_connection_key_response import ArrayConnectionKeyResponse +from .array_connection_path import ArrayConnectionPath +from .array_connection_path_get_response import ArrayConnectionPathGetResponse +from .array_connection_post import ArrayConnectionPost +from .array_connection_response import ArrayConnectionResponse +from .array_encryption import ArrayEncryption +from .array_encryption_data_at_rest import ArrayEncryptionDataAtRest +from .array_eradication_config import ArrayEradicationConfig +from .array_factory_reset_token import ArrayFactoryResetToken +from .array_factory_reset_token_get_response import ArrayFactoryResetTokenGetResponse +from .array_factory_reset_token_response import ArrayFactoryResetTokenResponse +from .array_get_response import ArrayGetResponse +from .array_http_specific_performance import ArrayHttpSpecificPerformance +from .array_http_specific_performance_get import ArrayHttpSpecificPerformanceGet +from .array_nfs_specific_performance import ArrayNfsSpecificPerformance +from .array_nfs_specific_performance_get import ArrayNfsSpecificPerformanceGet +from .array_performance import ArrayPerformance +from .array_performance_get_response import ArrayPerformanceGetResponse +from .array_performance_replication_get_resp import ArrayPerformanceReplicationGetResp +from .array_response import ArrayResponse +from .array_s3_specific_performance import ArrayS3SpecificPerformance +from .array_s3_specific_performance_get_resp import ArrayS3SpecificPerformanceGetResp +from .array_space import ArraySpace +from .array_space_get_response import ArraySpaceGetResponse +from .arrays_supported_time_zones_get_response import ArraysSupportedTimeZonesGetResponse +from .audit import Audit +from .audit_file_systems_policies import AuditFileSystemsPolicies +from .audit_file_systems_policies_get_response import AuditFileSystemsPoliciesGetResponse +from .audit_file_systems_policies_members_get_response import AuditFileSystemsPoliciesMembersGetResponse +from .audit_file_systems_policies_members_response import AuditFileSystemsPoliciesMembersResponse +from .audit_file_systems_policies_patch import AuditFileSystemsPoliciesPatch +from .audit_file_systems_policies_post import AuditFileSystemsPoliciesPost +from .audit_file_systems_policies_response import AuditFileSystemsPoliciesResponse +from .audit_file_systems_policy import AuditFileSystemsPolicy +from .audit_get_response import AuditGetResponse +from .audit_response import AuditResponse +from .blade import Blade +from .blade_get_response import BladeGetResponse +from .bucket import Bucket +from .bucket_access_policy import BucketAccessPolicy +from .bucket_access_policy_get_response import BucketAccessPolicyGetResponse +from .bucket_access_policy_post import BucketAccessPolicyPost +from .bucket_access_policy_response import BucketAccessPolicyResponse +from .bucket_access_policy_rule import BucketAccessPolicyRule +from .bucket_access_policy_rule_bulk_manage import BucketAccessPolicyRuleBulkManage +from .bucket_access_policy_rule_get_response import BucketAccessPolicyRuleGetResponse +from .bucket_access_policy_rule_post import BucketAccessPolicyRulePost +from .bucket_access_policy_rule_principal import BucketAccessPolicyRulePrincipal +from .bucket_access_policy_rule_response import BucketAccessPolicyRuleResponse +from .bucket_defaults import BucketDefaults +from .bucket_defaults_readonly import BucketDefaultsReadonly +from .bucket_eradication_config import BucketEradicationConfig +from .bucket_get_response import BucketGetResponse +from .bucket_patch import BucketPatch +from .bucket_performance import BucketPerformance +from .bucket_performance_get_response import BucketPerformanceGetResponse +from .bucket_post import BucketPost +from .bucket_replica_link import BucketReplicaLink +from .bucket_replica_link_get_response import BucketReplicaLinkGetResponse +from .bucket_replica_link_post import BucketReplicaLinkPost +from .bucket_replica_link_response import BucketReplicaLinkResponse +from .bucket_response import BucketResponse +from .bucket_s3_specific_performance import BucketS3SpecificPerformance +from .bucket_s3_specific_performance_get_resp import BucketS3SpecificPerformanceGetResp +from .built_in import BuiltIn +from .built_in_no_id import BuiltInNoId +from .built_in_relationship import BuiltInRelationship +from .certificate import Certificate +from .certificate_certificate_group_get_resp import CertificateCertificateGroupGetResp +from .certificate_certificate_group_response import CertificateCertificateGroupResponse +from .certificate_get_response import CertificateGetResponse +from .certificate_group import CertificateGroup +from .certificate_group_certificate_get_resp import CertificateGroupCertificateGetResp +from .certificate_group_certificate_response import CertificateGroupCertificateResponse +from .certificate_group_get_response import CertificateGroupGetResponse +from .certificate_group_response import CertificateGroupResponse +from .certificate_group_use import CertificateGroupUse +from .certificate_group_use_get_response import CertificateGroupUseGetResponse +from .certificate_patch import CertificatePatch +from .certificate_post import CertificatePost +from .certificate_response import CertificateResponse +from .certificate_use import CertificateUse +from .certificate_use_get_response import CertificateUseGetResponse +from .client_performance import ClientPerformance +from .client_performance_get_response import ClientPerformanceGetResponse +from .connection_relationship_performance_replication import ConnectionRelationshipPerformanceReplication +from .connection_relationship_performance_replication_get_resp import ConnectionRelationshipPerformanceReplicationGetResp +from .continuous_replication_performance import ContinuousReplicationPerformance +from .cross_origin_resource_sharing_policy import CrossOriginResourceSharingPolicy +from .cross_origin_resource_sharing_policy_get_response import CrossOriginResourceSharingPolicyGetResponse +from .cross_origin_resource_sharing_policy_patch import CrossOriginResourceSharingPolicyPatch +from .cross_origin_resource_sharing_policy_response import CrossOriginResourceSharingPolicyResponse +from .cross_origin_resource_sharing_policy_rule import CrossOriginResourceSharingPolicyRule +from .cross_origin_resource_sharing_policy_rule_bulk_manage import CrossOriginResourceSharingPolicyRuleBulkManage +from .cross_origin_resource_sharing_policy_rule_get_response import CrossOriginResourceSharingPolicyRuleGetResponse +from .cross_origin_resource_sharing_policy_rule_post import CrossOriginResourceSharingPolicyRulePost +from .cross_origin_resource_sharing_policy_rule_response import CrossOriginResourceSharingPolicyRuleResponse +from .direction import Direction +from .directory_service import DirectoryService +from .directory_service_get_response import DirectoryServiceGetResponse +from .directory_service_management import DirectoryServiceManagement +from .directory_service_nfs import DirectoryServiceNfs +from .directory_service_response import DirectoryServiceResponse +from .directory_service_role import DirectoryServiceRole +from .directory_service_roles_get_response import DirectoryServiceRolesGetResponse +from .directory_service_roles_response import DirectoryServiceRolesResponse +from .directory_service_smb import DirectoryServiceSmb +from .dns import Dns +from .dns_get_response import DnsGetResponse +from .dns_response import DnsResponse +from .drive import Drive +from .drive_get_response import DriveGetResponse +from .eula import Eula +from .eula_get_response import EulaGetResponse +from .eula_response import EulaResponse +from .eula_signature import EulaSignature +from .file_info import FileInfo +from .file_lock import FileLock +from .file_lock_get_response import FileLockGetResponse +from .file_lock_nlm_reclamation_response import FileLockNlmReclamationResponse +from .file_lock_range import FileLockRange +from .file_lock_response import FileLockResponse +from .file_session import FileSession +from .file_session_get_response import FileSessionGetResponse +from .file_session_response import FileSessionResponse +from .file_system import FileSystem +from .file_system_client import FileSystemClient +from .file_system_clients_get_response import FileSystemClientsGetResponse +from .file_system_clients_response import FileSystemClientsResponse +from .file_system_get_response import FileSystemGetResponse +from .file_system_group_performance import FileSystemGroupPerformance +from .file_system_groups_performance_get_response import FileSystemGroupsPerformanceGetResponse +from .file_system_lock_nlm_reclamation import FileSystemLockNlmReclamation +from .file_system_patch import FileSystemPatch +from .file_system_performance import FileSystemPerformance +from .file_system_performance_get_response import FileSystemPerformanceGetResponse +from .file_system_post import FileSystemPost +from .file_system_replica_link import FileSystemReplicaLink +from .file_system_replica_link_get_response import FileSystemReplicaLinkGetResponse +from .file_system_replica_link_response import FileSystemReplicaLinkResponse +from .file_system_response import FileSystemResponse +from .file_system_snapshot import FileSystemSnapshot +from .file_system_snapshot_get_response import FileSystemSnapshotGetResponse +from .file_system_snapshot_get_transfer_response import FileSystemSnapshotGetTransferResponse +from .file_system_snapshot_post import FileSystemSnapshotPost +from .file_system_snapshot_response import FileSystemSnapshotResponse +from .file_system_snapshot_transfer import FileSystemSnapshotTransfer +from .file_system_snapshot_transfer_response import FileSystemSnapshotTransferResponse +from .file_system_user_performance import FileSystemUserPerformance +from .file_system_users_performance_get_response import FileSystemUsersPerformanceGetResponse +from .fixed_location_reference import FixedLocationReference +from .fixed_reference import FixedReference +from .fixed_reference_name_only import FixedReferenceNameOnly +from .fixed_reference_no_id import FixedReferenceNoId +from .fixed_reference_no_resource_type import FixedReferenceNoResourceType +from .fixed_reference_with_remote import FixedReferenceWithRemote +from .group import Group +from .group_quota import GroupQuota +from .group_quota_get_response import GroupQuotaGetResponse +from .group_quota_patch import GroupQuotaPatch +from .group_quota_post import GroupQuotaPost +from .group_quota_response import GroupQuotaResponse +from .hardware import Hardware +from .hardware_connector import HardwareConnector +from .hardware_connector_get_response import HardwareConnectorGetResponse +from .hardware_connector_performance import HardwareConnectorPerformance +from .hardware_connector_performance_get_response import HardwareConnectorPerformanceGetResponse +from .hardware_connector_response import HardwareConnectorResponse +from .hardware_get_response import HardwareGetResponse +from .hardware_response import HardwareResponse +from .http import Http +from .inline_response400 import InlineResponse400 +from .inline_response401 import InlineResponse401 +from .keytab import Keytab +from .keytab_file_base64 import KeytabFileBase64 +from .keytab_file_binary import KeytabFileBinary +from .keytab_file_response import KeytabFileResponse +from .keytab_get_response import KeytabGetResponse +from .keytab_post import KeytabPost +from .keytab_response import KeytabResponse +from .kmip_server import KmipServer +from .kmip_server_response import KmipServerResponse +from .lifecycle_rule import LifecycleRule +from .lifecycle_rule_config_extension import LifecycleRuleConfigExtension +from .lifecycle_rule_get_response import LifecycleRuleGetResponse +from .lifecycle_rule_patch import LifecycleRulePatch +from .lifecycle_rule_post import LifecycleRulePost +from .lifecycle_rule_response import LifecycleRuleResponse +from .link_aggregation_group import LinkAggregationGroup +from .link_aggregation_group_get_response import LinkAggregationGroupGetResponse +from .link_aggregation_group_response import LinkAggregationGroupResponse +from .linkaggregationgroup import Linkaggregationgroup +from .location_reference import LocationReference +from .login import Login +from .login_banner_get_response import LoginBannerGetResponse +from .logs_async import LogsAsync +from .logs_async_get_response import LogsAsyncGetResponse +from .logs_async_response import LogsAsyncResponse +from .member import Member +from .member_link import MemberLink +from .multi_protocol import MultiProtocol +from .multi_protocol_post import MultiProtocolPost +from .network_access_policy import NetworkAccessPolicy +from .network_access_policy_get_response import NetworkAccessPolicyGetResponse +from .network_access_policy_response import NetworkAccessPolicyResponse +from .network_access_policy_rule import NetworkAccessPolicyRule +from .network_access_policy_rule_base import NetworkAccessPolicyRuleBase +from .network_access_policy_rule_get_response import NetworkAccessPolicyRuleGetResponse +from .network_access_policy_rule_in_policy import NetworkAccessPolicyRuleInPolicy +from .network_access_policy_rule_post import NetworkAccessPolicyRulePost +from .network_access_policy_rule_post_base import NetworkAccessPolicyRulePostBase +from .network_access_policy_rule_response import NetworkAccessPolicyRuleResponse +from .network_interface import NetworkInterface +from .network_interface_get_response import NetworkInterfaceGetResponse +from .network_interface_patch import NetworkInterfacePatch +from .network_interface_ping import NetworkInterfacePing +from .network_interface_ping_get_response import NetworkInterfacePingGetResponse +from .network_interface_ping_response import NetworkInterfacePingResponse +from .network_interface_response import NetworkInterfaceResponse +from .network_interface_trace import NetworkInterfaceTrace +from .network_interface_trace_get_response import NetworkInterfaceTraceGetResponse +from .network_interface_trace_response import NetworkInterfaceTraceResponse +from .nfs import Nfs +from .nfs_export_policy import NfsExportPolicy +from .nfs_export_policy_get_response import NfsExportPolicyGetResponse +from .nfs_export_policy_post import NfsExportPolicyPost +from .nfs_export_policy_response import NfsExportPolicyResponse +from .nfs_export_policy_rule import NfsExportPolicyRule +from .nfs_export_policy_rule_base import NfsExportPolicyRuleBase +from .nfs_export_policy_rule_get_response import NfsExportPolicyRuleGetResponse +from .nfs_export_policy_rule_in_policy import NfsExportPolicyRuleInPolicy +from .nfs_export_policy_rule_response import NfsExportPolicyRuleResponse +from .nfs_patch import NfsPatch +from .oauth_token_response import OauthTokenResponse +from .object_backlog import ObjectBacklog +from .object_lock_config_base import ObjectLockConfigBase +from .object_lock_config_request_body import ObjectLockConfigRequestBody +from .object_lock_config_response import ObjectLockConfigResponse +from .object_store_access_key import ObjectStoreAccessKey +from .object_store_access_key_get_response import ObjectStoreAccessKeyGetResponse +from .object_store_access_key_post import ObjectStoreAccessKeyPost +from .object_store_access_key_response import ObjectStoreAccessKeyResponse +from .object_store_access_policy import ObjectStoreAccessPolicy +from .object_store_access_policy_action import ObjectStoreAccessPolicyAction +from .object_store_access_policy_action_get_response import ObjectStoreAccessPolicyActionGetResponse +from .object_store_access_policy_action_response import ObjectStoreAccessPolicyActionResponse +from .object_store_access_policy_get_response import ObjectStoreAccessPolicyGetResponse +from .object_store_access_policy_patch import ObjectStoreAccessPolicyPatch +from .object_store_access_policy_post import ObjectStoreAccessPolicyPost +from .object_store_access_policy_response import ObjectStoreAccessPolicyResponse +from .object_store_access_policy_rule import ObjectStoreAccessPolicyRule +from .object_store_access_policy_rule_get_response import ObjectStoreAccessPolicyRuleGetResponse +from .object_store_access_policy_rule_response import ObjectStoreAccessPolicyRuleResponse +from .object_store_account import ObjectStoreAccount +from .object_store_account_get_response import ObjectStoreAccountGetResponse +from .object_store_account_patch import ObjectStoreAccountPatch +from .object_store_account_post import ObjectStoreAccountPost +from .object_store_account_response import ObjectStoreAccountResponse +from .object_store_remote_credential_get_resp import ObjectStoreRemoteCredentialGetResp +from .object_store_remote_credentials import ObjectStoreRemoteCredentials +from .object_store_remote_credentials_post import ObjectStoreRemoteCredentialsPost +from .object_store_remote_credentials_resp import ObjectStoreRemoteCredentialsResp +from .object_store_user import ObjectStoreUser +from .object_store_user_get_response import ObjectStoreUserGetResponse +from .object_store_user_response import ObjectStoreUserResponse +from .object_store_virtual_host import ObjectStoreVirtualHost +from .object_store_virtual_host_get_response import ObjectStoreVirtualHostGetResponse +from .object_store_virtual_host_response import ObjectStoreVirtualHostResponse +from .page_info import PageInfo +from .permission import Permission +from .policy import Policy +from .policy_base import PolicyBase +from .policy_base_get_response import PolicyBaseGetResponse +from .policy_base_renameable import PolicyBaseRenameable +from .policy_base_response import PolicyBaseResponse +from .policy_file_system_snapshot import PolicyFileSystemSnapshot +from .policy_file_system_snapshot_get_response import PolicyFileSystemSnapshotGetResponse +from .policy_file_system_snapshot_response import PolicyFileSystemSnapshotResponse +from .policy_get_response import PolicyGetResponse +from .policy_local_member import PolicyLocalMember +from .policy_member import PolicyMember +from .policy_member_get_response import PolicyMemberGetResponse +from .policy_member_response import PolicyMemberResponse +from .policy_member_with_remote import PolicyMemberWithRemote +from .policy_member_with_remote_get_response import PolicyMemberWithRemoteGetResponse +from .policy_member_with_remote_response import PolicyMemberWithRemoteResponse +from .policy_patch import PolicyPatch +from .policy_response import PolicyResponse +from .policy_rule import PolicyRule +from .policy_rule_index import PolicyRuleIndex +from .policy_rule_index_in_policy import PolicyRuleIndexInPolicy +from .policy_rule_object_access import PolicyRuleObjectAccess +from .policy_rule_object_access_bulk_manage import PolicyRuleObjectAccessBulkManage +from .policy_rule_object_access_condition import PolicyRuleObjectAccessCondition +from .policy_rule_object_access_post import PolicyRuleObjectAccessPost +from .public_access_config import PublicAccessConfig +from .public_key import PublicKey +from .public_key_get_response import PublicKeyGetResponse +from .public_key_post import PublicKeyPost +from .public_key_response import PublicKeyResponse +from .public_key_use import PublicKeyUse +from .public_key_use_get_response import PublicKeyUseGetResponse +from .public_key_use_response import PublicKeyUseResponse +from .quota_setting import QuotaSetting +from .quota_setting_get_response import QuotaSettingGetResponse +from .quota_setting_response import QuotaSettingResponse +from .rapid_data_locking import RapidDataLocking +from .rapid_data_locking_response import RapidDataLockingResponse +from .reference import Reference +from .reference_writable import ReferenceWritable +from .relationship_performance_replication import RelationshipPerformanceReplication +from .replica_link_built_in import ReplicaLinkBuiltIn +from .replication_performance import ReplicationPerformance +from .resource import Resource +from .resource_performance_replication import ResourcePerformanceReplication +from .resource_performance_replication_get_response import ResourcePerformanceReplicationGetResponse +from .resource_type import ResourceType +from .role import Role +from .role_get_response import RoleGetResponse +from .smtp import SMTP +from .session import Session +from .session_get_response import SessionGetResponse +from .smb import Smb +from .smb_client_policy import SmbClientPolicy +from .smb_client_policy_get_response import SmbClientPolicyGetResponse +from .smb_client_policy_post import SmbClientPolicyPost +from .smb_client_policy_response import SmbClientPolicyResponse +from .smb_client_policy_rule import SmbClientPolicyRule +from .smb_client_policy_rule_base import SmbClientPolicyRuleBase +from .smb_client_policy_rule_get_response import SmbClientPolicyRuleGetResponse +from .smb_client_policy_rule_in_policy import SmbClientPolicyRuleInPolicy +from .smb_client_policy_rule_post import SmbClientPolicyRulePost +from .smb_client_policy_rule_post_base import SmbClientPolicyRulePostBase +from .smb_client_policy_rule_post_in_policy import SmbClientPolicyRulePostInPolicy +from .smb_client_policy_rule_response import SmbClientPolicyRuleResponse +from .smb_post import SmbPost +from .smb_share_policy import SmbSharePolicy +from .smb_share_policy_get_response import SmbSharePolicyGetResponse +from .smb_share_policy_post import SmbSharePolicyPost +from .smb_share_policy_response import SmbSharePolicyResponse +from .smb_share_policy_rule import SmbSharePolicyRule +from .smb_share_policy_rule_get_response import SmbSharePolicyRuleGetResponse +from .smb_share_policy_rule_post import SmbSharePolicyRulePost +from .smb_share_policy_rule_response import SmbSharePolicyRuleResponse +from .smtp_server import SmtpServer +from .smtp_server_get_response import SmtpServerGetResponse +from .smtp_server_response import SmtpServerResponse +from .snmp_agent import SnmpAgent +from .snmp_agent_get_response import SnmpAgentGetResponse +from .snmp_agent_mib import SnmpAgentMib +from .snmp_agent_mib_response import SnmpAgentMibResponse +from .snmp_agent_response import SnmpAgentResponse +from .snmp_manager import SnmpManager +from .snmp_manager_get_response import SnmpManagerGetResponse +from .snmp_manager_post import SnmpManagerPost +from .snmp_manager_response import SnmpManagerResponse +from .snmp_manager_test import SnmpManagerTest +from .snmp_v2c import SnmpV2c +from .snmp_v3 import SnmpV3 +from .snmp_v3_post import SnmpV3Post +from .space import Space +from .space_extended import SpaceExtended +from .ssh_certificate_authority_policy import SshCertificateAuthorityPolicy +from .ssh_certificate_authority_policy_get_response import SshCertificateAuthorityPolicyGetResponse +from .ssh_certificate_authority_policy_post import SshCertificateAuthorityPolicyPost +from .ssh_certificate_authority_policy_response import SshCertificateAuthorityPolicyResponse +from .subnet import Subnet +from .subnet_get_response import SubnetGetResponse +from .subnet_response import SubnetResponse +from .support import Support +from .support_get_response import SupportGetResponse +from .support_remote_assist_paths import SupportRemoteAssistPaths +from .support_response import SupportResponse +from .syslog_server import SyslogServer +from .syslog_server_get_response import SyslogServerGetResponse +from .syslog_server_patch import SyslogServerPatch +from .syslog_server_post import SyslogServerPost +from .syslog_server_post_or_patch import SyslogServerPostOrPatch +from .syslog_server_response import SyslogServerResponse +from .syslog_server_settings import SyslogServerSettings +from .syslog_server_settings_get_response import SyslogServerSettingsGetResponse +from .syslog_server_settings_response import SyslogServerSettingsResponse +from .target import Target +from .target_get_response import TargetGetResponse +from .target_post import TargetPost +from .target_response import TargetResponse +from .test_result import TestResult +from .test_result_get_response import TestResultGetResponse +from .test_result_response import TestResultResponse +from .throttle import Throttle +from .time_window import TimeWindow +from .time_zone import TimeZone +from .user import User +from .user_no_id import UserNoId +from .user_quota import UserQuota +from .user_quota_get_response import UserQuotaGetResponse +from .user_quota_patch import UserQuotaPatch +from .user_quota_post import UserQuotaPost +from .user_quota_response import UserQuotaResponse +from .verification_key import VerificationKey +from .verification_key_get_response import VerificationKeyGetResponse +from .verification_key_patch import VerificationKeyPatch +from .verification_key_response import VerificationKeyResponse +from .version import Version diff --git a/pypureclient/flashblade/FB_2_14/models/active_directory.py b/pypureclient/flashblade/FB_2_14/models/active_directory.py new file mode 100644 index 000000000..a1d6bbedd --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/active_directory.py @@ -0,0 +1,165 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class ActiveDirectory(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'name': 'str', + 'id': 'str', + 'computer_name': 'str', + 'directory_servers': 'list[str]', + 'domain': 'str', + 'encryption_types': 'list[str]', + 'join_ou': 'str', + 'kerberos_servers': 'list[str]', + 'service_principal_names': 'list[str]', + 'global_catalog_servers': 'list[str]' + } + + attribute_map = { + 'name': 'name', + 'id': 'id', + 'computer_name': 'computer_name', + 'directory_servers': 'directory_servers', + 'domain': 'domain', + 'encryption_types': 'encryption_types', + 'join_ou': 'join_ou', + 'kerberos_servers': 'kerberos_servers', + 'service_principal_names': 'service_principal_names', + 'global_catalog_servers': 'global_catalog_servers' + } + + required_args = { + } + + def __init__( + self, + name=None, # type: str + id=None, # type: str + computer_name=None, # type: str + directory_servers=None, # type: List[str] + domain=None, # type: str + encryption_types=None, # type: List[str] + join_ou=None, # type: str + kerberos_servers=None, # type: List[str] + service_principal_names=None, # type: List[str] + global_catalog_servers=None, # type: List[str] + ): + """ + Keyword args: + name (str): Name of the object (e.g., a file system or snapshot). + id (str): A non-modifiable, globally unique ID chosen by the system. + computer_name (str): The common name of the computer account to be created in the Active Directory domain. If not specified, defaults to the name of the Active Directory configuration. + directory_servers (list[str]): A list of directory servers that will be used for lookups related to user authorization. Accepted server formats are IP address and DNS name with optional @domain suffix. If the suffix is ommited, the joined domain is assumed. All specified servers must be registered to the domain appropriately in the array's configured DNS and will only be communicated with over the secure LDAP (LDAPS) protocol. + domain (str): The Active Directory domain to join. + encryption_types (list[str]): The encryption types that are supported for use by clients for Kerberos authentication. + join_ou (str): The relative distinguished name of the organizational unit in which the computer account was created when joining the domain. + kerberos_servers (list[str]): A list of key distribution servers to use for Kerberos protocol. Accepted server formats are IP address and DNS name. All specified servers must be registered to the domain appropriately in the array's configured DNS. + service_principal_names (list[str]): A list of service principal names registered for the machine account, which can be used for the creation of keys for Kerberos authentication. + global_catalog_servers (list[str]): A list of global catalog servers that will be used for lookups related to user authorization. Accepted server formats are IP address and DNS name with optional @domain suffix. If the suffix is ommited, the joined domain is assumed. All specified servers must be registered to the domain appropriately in the array's configured DNS and will only be communicated with over the secure LDAP (LDAPS) protocol. + """ + if name is not None: + self.name = name + if id is not None: + self.id = id + if computer_name is not None: + self.computer_name = computer_name + if directory_servers is not None: + self.directory_servers = directory_servers + if domain is not None: + self.domain = domain + if encryption_types is not None: + self.encryption_types = encryption_types + if join_ou is not None: + self.join_ou = join_ou + if kerberos_servers is not None: + self.kerberos_servers = kerberos_servers + if service_principal_names is not None: + self.service_principal_names = service_principal_names + if global_catalog_servers is not None: + self.global_catalog_servers = global_catalog_servers + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `ActiveDirectory`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(ActiveDirectory, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ActiveDirectory): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/active_directory_directory_servers.py b/pypureclient/flashblade/FB_2_14/models/active_directory_directory_servers.py new file mode 100644 index 000000000..7e2c5fd71 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/active_directory_directory_servers.py @@ -0,0 +1,117 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class ActiveDirectoryDirectoryServers(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'directory_servers': 'list[str]', + 'global_catalog_servers': 'list[str]' + } + + attribute_map = { + 'directory_servers': 'directory_servers', + 'global_catalog_servers': 'global_catalog_servers' + } + + required_args = { + } + + def __init__( + self, + directory_servers=None, # type: List[str] + global_catalog_servers=None, # type: List[str] + ): + """ + Keyword args: + directory_servers (list[str]): A list of directory servers that will be used for lookups related to user authorization. Accepted server formats are IP address and DNS name with optional @domain suffix. If the suffix is ommited, the joined domain is assumed. All specified servers must be registered to the domain appropriately in the array's configured DNS and will only be communicated with over the secure LDAP (LDAPS) protocol. The specified list can have a maximum length of 50. + global_catalog_servers (list[str]): A list of global catalog servers that will be used for lookups related to user authorization. Accepted server formats are IP address and DNS name with optional @domain suffix. If the suffix is ommited, the joined domain is assumed. All specified servers must be registered to the domain appropriately in the array's configured DNS and will only be communicated with over the secure LDAP (LDAPS) protocol. The specified list can have a maximum length of 50. + """ + if directory_servers is not None: + self.directory_servers = directory_servers + if global_catalog_servers is not None: + self.global_catalog_servers = global_catalog_servers + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `ActiveDirectoryDirectoryServers`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(ActiveDirectoryDirectoryServers, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ActiveDirectoryDirectoryServers): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/active_directory_get_response.py b/pypureclient/flashblade/FB_2_14/models/active_directory_get_response.py new file mode 100644 index 000000000..1a7c2d5e7 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/active_directory_get_response.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class ActiveDirectoryGetResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'continuation_token': 'str', + 'total_item_count': 'int', + 'items': 'list[ActiveDirectory]' + } + + attribute_map = { + 'continuation_token': 'continuation_token', + 'total_item_count': 'total_item_count', + 'items': 'items' + } + + required_args = { + } + + def __init__( + self, + continuation_token=None, # type: str + total_item_count=None, # type: int + items=None, # type: List[models.ActiveDirectory] + ): + """ + Keyword args: + continuation_token (str): Continuation token that can be provided in the `continuation_token` query param to get the next page of data. If you use the `continuation_token` to page through data you are guaranteed to get all items exactly once regardless of how items are modified. If an item is added or deleted during the pagination then it may or may not be returned. The `continuation_token` is generated if the `limit` is less than the remaining number of items, and the default sort is used (no sort is specified). + total_item_count (int): Total number of items after applying `filter` params. + items (list[ActiveDirectory]): A list of Active Directory computer account configuration objects. + """ + if continuation_token is not None: + self.continuation_token = continuation_token + if total_item_count is not None: + self.total_item_count = total_item_count + if items is not None: + self.items = items + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `ActiveDirectoryGetResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(ActiveDirectoryGetResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ActiveDirectoryGetResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/active_directory_patch.py b/pypureclient/flashblade/FB_2_14/models/active_directory_patch.py new file mode 100644 index 000000000..369d0882b --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/active_directory_patch.py @@ -0,0 +1,147 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class ActiveDirectoryPatch(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'directory_servers': 'list[str]', + 'encryption_types': 'list[str]', + 'fqdns': 'list[str]', + 'join_ou': 'str', + 'kerberos_servers': 'list[str]', + 'service_principal_names': 'list[str]', + 'global_catalog_servers': 'list[str]' + } + + attribute_map = { + 'directory_servers': 'directory_servers', + 'encryption_types': 'encryption_types', + 'fqdns': 'fqdns', + 'join_ou': 'join_ou', + 'kerberos_servers': 'kerberos_servers', + 'service_principal_names': 'service_principal_names', + 'global_catalog_servers': 'global_catalog_servers' + } + + required_args = { + } + + def __init__( + self, + directory_servers=None, # type: List[str] + encryption_types=None, # type: List[str] + fqdns=None, # type: List[str] + join_ou=None, # type: str + kerberos_servers=None, # type: List[str] + service_principal_names=None, # type: List[str] + global_catalog_servers=None, # type: List[str] + ): + """ + Keyword args: + directory_servers (list[str]): A list of directory servers that will be used for lookups related to user authorization. Accepted server formats are IP address and DNS name with optional @domain suffix. If the suffix is ommited, the joined domain is assumed. All specified servers must be registered to the domain appropriately in the array's configured DNS and will only be communicated with over the secure LDAP (LDAPS) protocol. The specified list can have a maximum length of 50. + encryption_types (list[str]): The encryption types that will be supported for use by clients for Kerberos authentication. Valid values include `aes256-cts-hmac-sha1-96`, `aes128-cts-hmac-sha1-96`, and `arcfour-hmac`. + fqdns (list[str]): A list of fully qualified domain names to use to register service principal names for the machine account. If specified, every service principal that is supported by the array will be registered for each fully qualified domain name specified. If neither `fqdns` nor `service_principal_names` is specified, the default `service_principal_names` are constructed using the `computer_name` and `domain` fields. Cannot be provided in combination with `service_principal_names`. + join_ou (str): The relative distinguished name of the organizational unit in which the computer account should be created when joining the domain. + kerberos_servers (list[str]): A list of key distribution servers to use for Kerberos protocol. Accepted server formats are IP address and DNS name. All specified servers must be registered to the domain appropriately in the array's configured DNS. If not specified, servers are resolved for the domain in DNS. The specified list can have a maximum length of 5. + service_principal_names (list[str]): A list of service principal names to register for the machine account, which can be used for the creation of keys for Kerberos authentication. If neither `service_principal_names` nor `fqdns` is specified, the default `service_principal_names` are constructed using the `computer_name` and `domain` fields. Cannot be provided in combination with `fqdns`. + global_catalog_servers (list[str]): A list of global catalog servers that will be used for lookups related to user authorization. Accepted server formats are IP address and DNS name with optional @domain suffix. If the suffix is ommited, the joined domain is assumed. All specified servers must be registered to the domain appropriately in the array's configured DNS and will only be communicated with over the secure LDAP (LDAPS) protocol. The specified list can have a maximum length of 50. + """ + if directory_servers is not None: + self.directory_servers = directory_servers + if encryption_types is not None: + self.encryption_types = encryption_types + if fqdns is not None: + self.fqdns = fqdns + if join_ou is not None: + self.join_ou = join_ou + if kerberos_servers is not None: + self.kerberos_servers = kerberos_servers + if service_principal_names is not None: + self.service_principal_names = service_principal_names + if global_catalog_servers is not None: + self.global_catalog_servers = global_catalog_servers + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `ActiveDirectoryPatch`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(ActiveDirectoryPatch, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ActiveDirectoryPatch): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/active_directory_post.py b/pypureclient/flashblade/FB_2_14/models/active_directory_post.py new file mode 100644 index 000000000..b21cc19eb --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/active_directory_post.py @@ -0,0 +1,177 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class ActiveDirectoryPost(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'computer_name': 'str', + 'directory_servers': 'list[str]', + 'domain': 'str', + 'encryption_types': 'list[str]', + 'fqdns': 'list[str]', + 'join_ou': 'str', + 'kerberos_servers': 'list[str]', + 'password': 'str', + 'service_principal_names': 'list[str]', + 'user': 'str', + 'global_catalog_servers': 'list[str]' + } + + attribute_map = { + 'computer_name': 'computer_name', + 'directory_servers': 'directory_servers', + 'domain': 'domain', + 'encryption_types': 'encryption_types', + 'fqdns': 'fqdns', + 'join_ou': 'join_ou', + 'kerberos_servers': 'kerberos_servers', + 'password': 'password', + 'service_principal_names': 'service_principal_names', + 'user': 'user', + 'global_catalog_servers': 'global_catalog_servers' + } + + required_args = { + 'domain', + 'password', + 'user', + } + + def __init__( + self, + domain, # type: str + password, # type: str + user, # type: str + computer_name=None, # type: str + directory_servers=None, # type: List[str] + encryption_types=None, # type: List[str] + fqdns=None, # type: List[str] + join_ou=None, # type: str + kerberos_servers=None, # type: List[str] + service_principal_names=None, # type: List[str] + global_catalog_servers=None, # type: List[str] + ): + """ + Keyword args: + computer_name (str): The common name of the computer account to be created in the Active Directory domain. If not specified, defaults to the name of the Active Directory configuration. + directory_servers (list[str]): A list of directory servers that will be used for lookups related to user authorization. Accepted server formats are IP address and DNS name with optional @domain suffix. If the suffix is ommited, the joined domain is assumed. All specified servers must be registered to the domain appropriately in the array's configured DNS and will only be communicated with over the secure LDAP (LDAPS) protocol. The specified list can have a maximum length of 50. + domain (str, required): The Active Directory domain to join. + encryption_types (list[str]): The encryption types that will be supported for use by clients for Kerberos authentication. Defaults to `aes256-cts-hmac-sha1-96`. Valid values include `aes256-cts-hmac-sha1-96`, `aes128-cts-hmac-sha1-96`, and `arcfour-hmac`. Cannot be provided if using an existing machine account. + fqdns (list[str]): A list of fully qualified domain names to use to register service principal names for the machine account. If specified, every service principal that is supported by the array will be registered for each fully qualified domain name specified. If neither `fqdns` nor `service_principal_names` is specified, the default `service_principal_names` are constructed using the `computer_name` and `domain` fields. Cannot be provided in combination with `service_principal_names`. Cannot be provided if using an existing machine account. + join_ou (str): The relative distinguished name of the organizational unit in which the computer account should be created when joining the domain. Cannot be provided if using an existing machine account. If not specified, defaults to `CN=Computers`. + kerberos_servers (list[str]): A list of key distribution servers to use for Kerberos protocol. Accepted server formats are IP address and DNS name. All specified servers must be registered to the domain appropriately in the array's configured DNS. If not specified, servers are resolved for the domain in DNS. The specified list can have a maximum length of 5. + password (str, required): The login password of the user with privileges to create the computer account in the domain. If using an existing computer account, the user must have privileges to read attributes from the computer account and reset the password on that account. This is not persisted on the array. + service_principal_names (list[str]): A list of service principal names to register for the machine account, which can be used for the creation of keys for Kerberos authentication. If neither `service_principal_names` nor `fqdns` is specified, the default `service_principal_names` are constructed using the `computer_name` and `domain` fields. Cannot be provided in combination with `fqdns`. Cannot be provided if using an existing machine account. + user (str, required): The login name of the user with privileges to create the computer account in the domain. If using an existing computer account, the user must have privileges to read attributes from the computer account and reset the password on that account. This is not persisted on the array. + global_catalog_servers (list[str]): A list of global catalog servers that will be used for lookups related to user authorization. Accepted server formats are IP address and DNS name with optional @domain suffix. If the suffix is ommited, the joined domain is assumed. All specified servers must be registered to the domain appropriately in the array's configured DNS and will only be communicated with over the secure LDAP (LDAPS) protocol. The specified list can have a maximum length of 50. + """ + if computer_name is not None: + self.computer_name = computer_name + if directory_servers is not None: + self.directory_servers = directory_servers + self.domain = domain + if encryption_types is not None: + self.encryption_types = encryption_types + if fqdns is not None: + self.fqdns = fqdns + if join_ou is not None: + self.join_ou = join_ou + if kerberos_servers is not None: + self.kerberos_servers = kerberos_servers + self.password = password + if service_principal_names is not None: + self.service_principal_names = service_principal_names + self.user = user + if global_catalog_servers is not None: + self.global_catalog_servers = global_catalog_servers + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `ActiveDirectoryPost`".format(key)) + if key == "domain" and value is None: + raise ValueError("Invalid value for `domain`, must not be `None`") + if key == "password" and value is None: + raise ValueError("Invalid value for `password`, must not be `None`") + if key == "user" and value is None: + raise ValueError("Invalid value for `user`, must not be `None`") + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(ActiveDirectoryPost, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ActiveDirectoryPost): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/active_directory_response.py b/pypureclient/flashblade/FB_2_14/models/active_directory_response.py new file mode 100644 index 000000000..e18d9a891 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/active_directory_response.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class ActiveDirectoryResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'items': 'list[ActiveDirectory]' + } + + attribute_map = { + 'items': 'items' + } + + required_args = { + } + + def __init__( + self, + items=None, # type: List[models.ActiveDirectory] + ): + """ + Keyword args: + items (list[ActiveDirectory]): A list of Active Directory computer account configuration objects. + """ + if items is not None: + self.items = items + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `ActiveDirectoryResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(ActiveDirectoryResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ActiveDirectoryResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/admin.py b/pypureclient/flashblade/FB_2_14/models/admin.py new file mode 100644 index 000000000..4e19ae8ea --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/admin.py @@ -0,0 +1,153 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class Admin(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'name': 'str', + 'id': 'str', + 'api_token': 'ApiToken', + 'is_local': 'bool', + 'public_key': 'str', + 'role': 'Reference', + 'locked': 'bool', + 'lockout_remaining': 'int' + } + + attribute_map = { + 'name': 'name', + 'id': 'id', + 'api_token': 'api_token', + 'is_local': 'is_local', + 'public_key': 'public_key', + 'role': 'role', + 'locked': 'locked', + 'lockout_remaining': 'lockout_remaining' + } + + required_args = { + } + + def __init__( + self, + name=None, # type: str + id=None, # type: str + api_token=None, # type: models.ApiToken + is_local=None, # type: bool + public_key=None, # type: str + role=None, # type: models.Reference + locked=None, # type: bool + lockout_remaining=None, # type: int + ): + """ + Keyword args: + name (str): Name of the object (e.g., a file system or snapshot). + id (str): A non-modifiable, globally unique ID chosen by the system. + api_token (ApiToken) + is_local (bool): Returns a value of `true` if the user is local to the machine, otherwise `false`. + public_key (str): Public key for SSH access. Supported key types are `Ed25519` and `RSA`. + role (Reference): A reference to this administrator's management role. + locked (bool): Returns a value of `true` if the user is currently locked out, otherwise `false`. Can be patched to false to unlock a user. This field is only visible to `array_admin` roles. For all other users, the value is always `null`. + lockout_remaining (int): The remaining lockout period, in milliseconds, if the user is locked out. This field is only visible to `array_admin` roles. For all other users, the value is always `null`. + """ + if name is not None: + self.name = name + if id is not None: + self.id = id + if api_token is not None: + self.api_token = api_token + if is_local is not None: + self.is_local = is_local + if public_key is not None: + self.public_key = public_key + if role is not None: + self.role = role + if locked is not None: + self.locked = locked + if lockout_remaining is not None: + self.lockout_remaining = lockout_remaining + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `Admin`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(Admin, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, Admin): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/admin_api_token.py b/pypureclient/flashblade/FB_2_14/models/admin_api_token.py new file mode 100644 index 000000000..d6a1d2d7e --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/admin_api_token.py @@ -0,0 +1,117 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class AdminApiToken(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'admin': 'Reference', + 'api_token': 'ApiToken' + } + + attribute_map = { + 'admin': 'admin', + 'api_token': 'api_token' + } + + required_args = { + } + + def __init__( + self, + admin=None, # type: models.Reference + api_token=None, # type: models.ApiToken + ): + """ + Keyword args: + admin (Reference): A reference to the admin to whom this token belongs. + api_token (ApiToken) + """ + if admin is not None: + self.admin = admin + if api_token is not None: + self.api_token = api_token + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `AdminApiToken`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(AdminApiToken, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, AdminApiToken): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/admin_api_token_get_response.py b/pypureclient/flashblade/FB_2_14/models/admin_api_token_get_response.py new file mode 100644 index 000000000..3e609a807 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/admin_api_token_get_response.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class AdminApiTokenGetResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'continuation_token': 'str', + 'total_item_count': 'int', + 'items': 'list[AdminApiToken]' + } + + attribute_map = { + 'continuation_token': 'continuation_token', + 'total_item_count': 'total_item_count', + 'items': 'items' + } + + required_args = { + } + + def __init__( + self, + continuation_token=None, # type: str + total_item_count=None, # type: int + items=None, # type: List[models.AdminApiToken] + ): + """ + Keyword args: + continuation_token (str): Continuation token that can be provided in the `continuation_token` query param to get the next page of data. If you use the `continuation_token` to page through data you are guaranteed to get all items exactly once regardless of how items are modified. If an item is added or deleted during the pagination then it may or may not be returned. The `continuation_token` is generated if the `limit` is less than the remaining number of items, and the default sort is used (no sort is specified). + total_item_count (int): Total number of items after applying `filter` params. + items (list[AdminApiToken]): A list of administrator API tokens. + """ + if continuation_token is not None: + self.continuation_token = continuation_token + if total_item_count is not None: + self.total_item_count = total_item_count + if items is not None: + self.items = items + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `AdminApiTokenGetResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(AdminApiTokenGetResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, AdminApiTokenGetResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/admin_api_token_response.py b/pypureclient/flashblade/FB_2_14/models/admin_api_token_response.py new file mode 100644 index 000000000..855f5f226 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/admin_api_token_response.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class AdminApiTokenResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'items': 'list[AdminApiToken]' + } + + attribute_map = { + 'items': 'items' + } + + required_args = { + } + + def __init__( + self, + items=None, # type: List[models.AdminApiToken] + ): + """ + Keyword args: + items (list[AdminApiToken]): A list of administrator API tokens. + """ + if items is not None: + self.items = items + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `AdminApiTokenResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(AdminApiTokenResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, AdminApiTokenResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/admin_cache.py b/pypureclient/flashblade/FB_2_14/models/admin_cache.py new file mode 100644 index 000000000..9ee2417c2 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/admin_cache.py @@ -0,0 +1,129 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class AdminCache(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'name': 'str', + 'id': 'str', + 'role': 'FixedReference', + 'time': 'int' + } + + attribute_map = { + 'name': 'name', + 'id': 'id', + 'role': 'role', + 'time': 'time' + } + + required_args = { + } + + def __init__( + self, + name=None, # type: str + id=None, # type: str + role=None, # type: models.FixedReference + time=None, # type: int + ): + """ + Keyword args: + name (str): Name of the object (e.g., a file system or snapshot). + id (str): A non-modifiable, globally unique ID chosen by the system. + role (FixedReference): A reference to the `role` of this user. + time (int): Time the role was cached in milliseconds since UNIX epoch. + """ + if name is not None: + self.name = name + if id is not None: + self.id = id + if role is not None: + self.role = role + if time is not None: + self.time = time + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `AdminCache`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(AdminCache, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, AdminCache): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/admin_cache_get_response.py b/pypureclient/flashblade/FB_2_14/models/admin_cache_get_response.py new file mode 100644 index 000000000..789a1d7f4 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/admin_cache_get_response.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class AdminCacheGetResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'continuation_token': 'str', + 'total_item_count': 'int', + 'items': 'list[AdminCache]' + } + + attribute_map = { + 'continuation_token': 'continuation_token', + 'total_item_count': 'total_item_count', + 'items': 'items' + } + + required_args = { + } + + def __init__( + self, + continuation_token=None, # type: str + total_item_count=None, # type: int + items=None, # type: List[models.AdminCache] + ): + """ + Keyword args: + continuation_token (str): Continuation token that can be provided in the `continuation_token` query param to get the next page of data. If you use the `continuation_token` to page through data you are guaranteed to get all items exactly once regardless of how items are modified. If an item is added or deleted during the pagination then it may or may not be returned. The `continuation_token` is generated if the `limit` is less than the remaining number of items, and the default sort is used (no sort is specified). + total_item_count (int): Total number of items after applying `filter` params. + items (list[AdminCache]): A list of admin cache entries. + """ + if continuation_token is not None: + self.continuation_token = continuation_token + if total_item_count is not None: + self.total_item_count = total_item_count + if items is not None: + self.items = items + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `AdminCacheGetResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(AdminCacheGetResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, AdminCacheGetResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/admin_get_response.py b/pypureclient/flashblade/FB_2_14/models/admin_get_response.py new file mode 100644 index 000000000..d6d996fed --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/admin_get_response.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class AdminGetResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'continuation_token': 'str', + 'total_item_count': 'int', + 'items': 'list[Admin]' + } + + attribute_map = { + 'continuation_token': 'continuation_token', + 'total_item_count': 'total_item_count', + 'items': 'items' + } + + required_args = { + } + + def __init__( + self, + continuation_token=None, # type: str + total_item_count=None, # type: int + items=None, # type: List[models.Admin] + ): + """ + Keyword args: + continuation_token (str): Continuation token that can be provided in the `continuation_token` query param to get the next page of data. If you use the `continuation_token` to page through data you are guaranteed to get all items exactly once regardless of how items are modified. If an item is added or deleted during the pagination then it may or may not be returned. The `continuation_token` is generated if the `limit` is less than the remaining number of items, and the default sort is used (no sort is specified). + total_item_count (int): Total number of items after applying `filter` params. + items (list[Admin]): A list of administrative account objects. + """ + if continuation_token is not None: + self.continuation_token = continuation_token + if total_item_count is not None: + self.total_item_count = total_item_count + if items is not None: + self.items = items + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `AdminGetResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(AdminGetResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, AdminGetResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/admin_patch.py b/pypureclient/flashblade/FB_2_14/models/admin_patch.py new file mode 100644 index 000000000..1ced2e01b --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/admin_patch.py @@ -0,0 +1,129 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class AdminPatch(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'old_password': 'str', + 'password': 'str', + 'public_key': 'str', + 'locked': 'bool' + } + + attribute_map = { + 'old_password': 'old_password', + 'password': 'password', + 'public_key': 'public_key', + 'locked': 'locked' + } + + required_args = { + } + + def __init__( + self, + old_password=None, # type: str + password=None, # type: str + public_key=None, # type: str + locked=None, # type: bool + ): + """ + Keyword args: + old_password (str): Old user password. + password (str): New user password. + public_key (str): Public key for SSH access. Supported key types are `Ed25519` and `RSA`. + locked (bool): If set to `false`, the specified user is unlocked. Setting to `true` is not allowed. + """ + if old_password is not None: + self.old_password = old_password + if password is not None: + self.password = password + if public_key is not None: + self.public_key = public_key + if locked is not None: + self.locked = locked + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `AdminPatch`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(AdminPatch, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, AdminPatch): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/admin_response.py b/pypureclient/flashblade/FB_2_14/models/admin_response.py new file mode 100644 index 000000000..7b9337ed7 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/admin_response.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class AdminResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'items': 'list[Admin]' + } + + attribute_map = { + 'items': 'items' + } + + required_args = { + } + + def __init__( + self, + items=None, # type: List[models.Admin] + ): + """ + Keyword args: + items (list[Admin]): A list of administrative account objects. + """ + if items is not None: + self.items = items + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `AdminResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(AdminResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, AdminResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/admin_setting.py b/pypureclient/flashblade/FB_2_14/models/admin_setting.py new file mode 100644 index 000000000..9b36f2848 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/admin_setting.py @@ -0,0 +1,138 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class AdminSetting(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'lockout_duration': 'int', + 'max_login_attempts': 'int', + 'min_password_length': 'int' + } + + attribute_map = { + 'lockout_duration': 'lockout_duration', + 'max_login_attempts': 'max_login_attempts', + 'min_password_length': 'min_password_length' + } + + required_args = { + } + + def __init__( + self, + lockout_duration=None, # type: int + max_login_attempts=None, # type: int + min_password_length=None, # type: int + ): + """ + Keyword args: + lockout_duration (int): The lockout duration, in milliseconds, if a user has reached the maximum number of login attempts. Ranges from 1 second to 90 days. Default value is `null`. Use 0 to reset the value to `null`. + max_login_attempts (int): The maximum number of failed login attempts allowed before the user is locked out. Default value is `null`. Use 0 to reset the value to `null`. + min_password_length (int): The minimum password length. If not specified, defaults to 1 character. + """ + if lockout_duration is not None: + self.lockout_duration = lockout_duration + if max_login_attempts is not None: + self.max_login_attempts = max_login_attempts + if min_password_length is not None: + self.min_password_length = min_password_length + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `AdminSetting`".format(key)) + if key == "lockout_duration" and value is not None: + if value > 7776000000: + raise ValueError("Invalid value for `lockout_duration`, value must be less than or equal to `7776000000`") + if value < 0: + raise ValueError("Invalid value for `lockout_duration`, must be a value greater than or equal to `0`") + if key == "max_login_attempts" and value is not None: + if value > 100: + raise ValueError("Invalid value for `max_login_attempts`, value must be less than or equal to `100`") + if value < 0: + raise ValueError("Invalid value for `max_login_attempts`, must be a value greater than or equal to `0`") + if key == "min_password_length" and value is not None: + if value > 100: + raise ValueError("Invalid value for `min_password_length`, value must be less than or equal to `100`") + if value < 1: + raise ValueError("Invalid value for `min_password_length`, must be a value greater than or equal to `1`") + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(AdminSetting, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, AdminSetting): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/admin_settings_get_response.py b/pypureclient/flashblade/FB_2_14/models/admin_settings_get_response.py new file mode 100644 index 000000000..4323e76b5 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/admin_settings_get_response.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class AdminSettingsGetResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'continuation_token': 'str', + 'total_item_count': 'int', + 'items': 'list[AdminSetting]' + } + + attribute_map = { + 'continuation_token': 'continuation_token', + 'total_item_count': 'total_item_count', + 'items': 'items' + } + + required_args = { + } + + def __init__( + self, + continuation_token=None, # type: str + total_item_count=None, # type: int + items=None, # type: List[models.AdminSetting] + ): + """ + Keyword args: + continuation_token (str): Continuation token that can be provided in the `continuation_token` query param to get the next page of data. If you use the `continuation_token` to page through data you are guaranteed to get all items exactly once regardless of how items are modified. If an item is added or deleted during the pagination then it may or may not be returned. The `continuation_token` is generated if the `limit` is less than the remaining number of items, and the default sort is used (no sort is specified). + total_item_count (int): Total number of items after applying `filter` params. + items (list[AdminSetting]): Returns global admin settings. + """ + if continuation_token is not None: + self.continuation_token = continuation_token + if total_item_count is not None: + self.total_item_count = total_item_count + if items is not None: + self.items = items + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `AdminSettingsGetResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(AdminSettingsGetResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, AdminSettingsGetResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/admin_settings_response.py b/pypureclient/flashblade/FB_2_14/models/admin_settings_response.py new file mode 100644 index 000000000..11264d473 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/admin_settings_response.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class AdminSettingsResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'items': 'list[AdminSetting]' + } + + attribute_map = { + 'items': 'items' + } + + required_args = { + } + + def __init__( + self, + items=None, # type: List[models.AdminSetting] + ): + """ + Keyword args: + items (list[AdminSetting]): Returns global admin settings. + """ + if items is not None: + self.items = items + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `AdminSettingsResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(AdminSettingsResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, AdminSettingsResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/alert.py b/pypureclient/flashblade/FB_2_14/models/alert.py new file mode 100644 index 000000000..0720fdf71 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/alert.py @@ -0,0 +1,207 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class Alert(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'name': 'str', + 'id': 'str', + 'action': 'str', + 'code': 'int', + 'component_name': 'str', + 'component_type': 'str', + 'created': 'int', + 'description': 'str', + 'flagged': 'bool', + 'index': 'int', + 'knowledge_base_url': 'str', + 'notified': 'int', + 'severity': 'str', + 'state': 'str', + 'summary': 'str', + 'updated': 'int', + 'variables': 'dict(str, str)' + } + + attribute_map = { + 'name': 'name', + 'id': 'id', + 'action': 'action', + 'code': 'code', + 'component_name': 'component_name', + 'component_type': 'component_type', + 'created': 'created', + 'description': 'description', + 'flagged': 'flagged', + 'index': 'index', + 'knowledge_base_url': 'knowledge_base_url', + 'notified': 'notified', + 'severity': 'severity', + 'state': 'state', + 'summary': 'summary', + 'updated': 'updated', + 'variables': 'variables' + } + + required_args = { + } + + def __init__( + self, + name=None, # type: str + id=None, # type: str + action=None, # type: str + code=None, # type: int + component_name=None, # type: str + component_type=None, # type: str + created=None, # type: int + description=None, # type: str + flagged=None, # type: bool + index=None, # type: int + knowledge_base_url=None, # type: str + notified=None, # type: int + severity=None, # type: str + state=None, # type: str + summary=None, # type: str + updated=None, # type: int + variables=None, # type: dict(str, str) + ): + """ + Keyword args: + name (str): Name of the object (e.g., a file system or snapshot). + id (str): A non-modifiable, globally unique ID chosen by the system. + action (str): The action of the alert. + code (int): Alert code. + component_name (str): The component name of the alert. + component_type (str): The component type of the alert. + created (int): The creation timestamp of the alert. + description (str): The description of the alert. + flagged (bool): Flagged state of the alert. + index (int): The unique index of the alert. + knowledge_base_url (str): URL of the relevant Knowledge Base page. + notified (int): The last notification timestamp of the alert. + severity (str): Severity of the alert. Valid values are `info`, `warning`, and `critical`. + state (str): The current state of the alert. Valid values are `open`, `closing`, `closed`, and `waiting to downgrade`. + summary (str): The summary of the alert. + updated (int): The last updated timestamp of the alert. + variables (dict(str, str)): Key-value pairs of additional information of the alert. + """ + if name is not None: + self.name = name + if id is not None: + self.id = id + if action is not None: + self.action = action + if code is not None: + self.code = code + if component_name is not None: + self.component_name = component_name + if component_type is not None: + self.component_type = component_type + if created is not None: + self.created = created + if description is not None: + self.description = description + if flagged is not None: + self.flagged = flagged + if index is not None: + self.index = index + if knowledge_base_url is not None: + self.knowledge_base_url = knowledge_base_url + if notified is not None: + self.notified = notified + if severity is not None: + self.severity = severity + if state is not None: + self.state = state + if summary is not None: + self.summary = summary + if updated is not None: + self.updated = updated + if variables is not None: + self.variables = variables + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `Alert`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(Alert, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, Alert): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/alert_get_response.py b/pypureclient/flashblade/FB_2_14/models/alert_get_response.py new file mode 100644 index 000000000..e501a1ca5 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/alert_get_response.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class AlertGetResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'continuation_token': 'str', + 'total_item_count': 'int', + 'items': 'list[Alert]' + } + + attribute_map = { + 'continuation_token': 'continuation_token', + 'total_item_count': 'total_item_count', + 'items': 'items' + } + + required_args = { + } + + def __init__( + self, + continuation_token=None, # type: str + total_item_count=None, # type: int + items=None, # type: List[models.Alert] + ): + """ + Keyword args: + continuation_token (str): Continuation token that can be provided in the `continuation_token` query param to get the next page of data. If you use the `continuation_token` to page through data you are guaranteed to get all items exactly once regardless of how items are modified. If an item is added or deleted during the pagination then it may or may not be returned. The `continuation_token` is generated if the `limit` is less than the remaining number of items, and the default sort is used (no sort is specified). + total_item_count (int): Total number of items after applying `filter` params. + items (list[Alert]): A list of alert objects. + """ + if continuation_token is not None: + self.continuation_token = continuation_token + if total_item_count is not None: + self.total_item_count = total_item_count + if items is not None: + self.items = items + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `AlertGetResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(AlertGetResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, AlertGetResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/alert_response.py b/pypureclient/flashblade/FB_2_14/models/alert_response.py new file mode 100644 index 000000000..3cfe4f0f2 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/alert_response.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class AlertResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'items': 'list[Alert]' + } + + attribute_map = { + 'items': 'items' + } + + required_args = { + } + + def __init__( + self, + items=None, # type: List[models.Alert] + ): + """ + Keyword args: + items (list[Alert]): A list of alert objects. + """ + if items is not None: + self.items = items + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `AlertResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(AlertResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, AlertResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/alert_watcher.py b/pypureclient/flashblade/FB_2_14/models/alert_watcher.py new file mode 100644 index 000000000..23690f40c --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/alert_watcher.py @@ -0,0 +1,129 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class AlertWatcher(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'name': 'str', + 'id': 'str', + 'enabled': 'bool', + 'minimum_notification_severity': 'str' + } + + attribute_map = { + 'name': 'name', + 'id': 'id', + 'enabled': 'enabled', + 'minimum_notification_severity': 'minimum_notification_severity' + } + + required_args = { + } + + def __init__( + self, + name=None, # type: str + id=None, # type: str + enabled=None, # type: bool + minimum_notification_severity=None, # type: str + ): + """ + Keyword args: + name (str): Name of the object (e.g., a file system or snapshot). + id (str): A non-modifiable, globally unique ID chosen by the system. + enabled (bool): Is email notification enabled? If not specified, defaults to `true`. + minimum_notification_severity (str): The minimum severity that an alert must have in order for emails to be sent to the watcher. Possible values include `info`, `warning`, and `critical`. + """ + if name is not None: + self.name = name + if id is not None: + self.id = id + if enabled is not None: + self.enabled = enabled + if minimum_notification_severity is not None: + self.minimum_notification_severity = minimum_notification_severity + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `AlertWatcher`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(AlertWatcher, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, AlertWatcher): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/alert_watcher_get_response.py b/pypureclient/flashblade/FB_2_14/models/alert_watcher_get_response.py new file mode 100644 index 000000000..a9ece6e16 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/alert_watcher_get_response.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class AlertWatcherGetResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'continuation_token': 'str', + 'total_item_count': 'int', + 'items': 'list[AlertWatcher]' + } + + attribute_map = { + 'continuation_token': 'continuation_token', + 'total_item_count': 'total_item_count', + 'items': 'items' + } + + required_args = { + } + + def __init__( + self, + continuation_token=None, # type: str + total_item_count=None, # type: int + items=None, # type: List[models.AlertWatcher] + ): + """ + Keyword args: + continuation_token (str): Continuation token that can be provided in the `continuation_token` query param to get the next page of data. If you use the `continuation_token` to page through data you are guaranteed to get all items exactly once regardless of how items are modified. If an item is added or deleted during the pagination then it may or may not be returned. The `continuation_token` is generated if the `limit` is less than the remaining number of items, and the default sort is used (no sort is specified). + total_item_count (int): Total number of items after applying `filter` params. + items (list[AlertWatcher]): A list of alert watcher objects. + """ + if continuation_token is not None: + self.continuation_token = continuation_token + if total_item_count is not None: + self.total_item_count = total_item_count + if items is not None: + self.items = items + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `AlertWatcherGetResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(AlertWatcherGetResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, AlertWatcherGetResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/alert_watcher_post.py b/pypureclient/flashblade/FB_2_14/models/alert_watcher_post.py new file mode 100644 index 000000000..c7b991028 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/alert_watcher_post.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class AlertWatcherPost(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'minimum_notification_severity': 'str' + } + + attribute_map = { + 'minimum_notification_severity': 'minimum_notification_severity' + } + + required_args = { + } + + def __init__( + self, + minimum_notification_severity=None, # type: str + ): + """ + Keyword args: + minimum_notification_severity (str): The minimum severity that an alert must have in order for emails to be sent to the watcher. Possible values include `info`, `warning`, and `critical`. If not specified, defaults to `info`. + """ + if minimum_notification_severity is not None: + self.minimum_notification_severity = minimum_notification_severity + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `AlertWatcherPost`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(AlertWatcherPost, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, AlertWatcherPost): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/alert_watcher_response.py b/pypureclient/flashblade/FB_2_14/models/alert_watcher_response.py new file mode 100644 index 000000000..83e03d4b7 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/alert_watcher_response.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class AlertWatcherResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'items': 'list[AlertWatcher]' + } + + attribute_map = { + 'items': 'items' + } + + required_args = { + } + + def __init__( + self, + items=None, # type: List[models.AlertWatcher] + ): + """ + Keyword args: + items (list[AlertWatcher]): A list of alert watcher objects. + """ + if items is not None: + self.items = items + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `AlertWatcherResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(AlertWatcherResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, AlertWatcherResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/api_client.py b/pypureclient/flashblade/FB_2_14/models/api_client.py new file mode 100644 index 000000000..81ba4a251 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/api_client.py @@ -0,0 +1,153 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class ApiClient(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'name': 'str', + 'id': 'str', + 'access_token_ttl_in_ms': 'int', + 'enabled': 'bool', + 'issuer': 'str', + 'key_id': 'str', + 'max_role': 'FixedReference', + 'public_key': 'str' + } + + attribute_map = { + 'name': 'name', + 'id': 'id', + 'access_token_ttl_in_ms': 'access_token_ttl_in_ms', + 'enabled': 'enabled', + 'issuer': 'issuer', + 'key_id': 'key_id', + 'max_role': 'max_role', + 'public_key': 'public_key' + } + + required_args = { + } + + def __init__( + self, + name=None, # type: str + id=None, # type: str + access_token_ttl_in_ms=None, # type: int + enabled=None, # type: bool + issuer=None, # type: str + key_id=None, # type: str + max_role=None, # type: models.FixedReference + public_key=None, # type: str + ): + """ + Keyword args: + name (str): Name of the object (e.g., a file system or snapshot). + id (str): A non-modifiable, globally unique ID chosen by the system. + access_token_ttl_in_ms (int): The TTL (Time To Live) duration for which the exchanged access token is valid. Measured in milliseconds. + enabled (bool): If `true`, the API client is permitted to exchange ID Tokens for access tokens. API clients are disabled by default. + issuer (str): The name of the identity provider that will be issuing ID Tokens for this API client. This string represents the JWT `iss` (issuer) claim in ID Tokens issued for this API client. + key_id (str): The unique identifier for the associated public key of this API client. This string must match the JWT `kid` (key ID) claim in ID Tokens issued for this API client. + max_role (FixedReference): The maximum role allowed for ID Tokens issued by this API client. The bearer of an access token will be authorized to perform actions within the intersection of this `max_role` and the role of the array user specified as the JWT `sub` (subject) claim. The `max_role` field is a reference to a `role`. Valid `role`s are `readonly`, `ops_admin`, `array_admin`, and `storage_admin`. Users with the `readonly` (Read Only) role can perform operations that convey the state of the array. Read Only users cannot alter the state of the array. Users with the `ops_admin` (Ops Admin) role can perform the same operations as Read Only users plus enable and disable remote assistance sessions. Ops Admin users cannot alter the state of the array. Users with the `storage_admin` (Storage Admin) role can perform the same operations as Read Only users plus storage related operations, such as administering file systems, snapshots, and buckets. Storage Admin users cannot perform operations that deal with global and system configurations. Users with the `array_admin` (Array Admin) role can perform the same operations as Storage Admin users plus array-wide changes dealing with global and system configurations. In other words, Array Admin users can perform all operations. + public_key (str): The API client's PEM formatted (Base64 encoded) RSA public key. + """ + if name is not None: + self.name = name + if id is not None: + self.id = id + if access_token_ttl_in_ms is not None: + self.access_token_ttl_in_ms = access_token_ttl_in_ms + if enabled is not None: + self.enabled = enabled + if issuer is not None: + self.issuer = issuer + if key_id is not None: + self.key_id = key_id + if max_role is not None: + self.max_role = max_role + if public_key is not None: + self.public_key = public_key + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `ApiClient`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(ApiClient, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ApiClient): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/api_clients_post.py b/pypureclient/flashblade/FB_2_14/models/api_clients_post.py new file mode 100644 index 000000000..a24f80f36 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/api_clients_post.py @@ -0,0 +1,133 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class ApiClientsPost(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'access_token_ttl_in_ms': 'int', + 'issuer': 'str', + 'max_role': 'ReferenceWritable', + 'public_key': 'str' + } + + attribute_map = { + 'access_token_ttl_in_ms': 'access_token_ttl_in_ms', + 'issuer': 'issuer', + 'max_role': 'max_role', + 'public_key': 'public_key' + } + + required_args = { + 'max_role', + 'public_key', + } + + def __init__( + self, + max_role, # type: models.ReferenceWritable + public_key, # type: str + access_token_ttl_in_ms=None, # type: int + issuer=None, # type: str + ): + """ + Keyword args: + access_token_ttl_in_ms (int): The TTL (Time To Live) duration for which the exchanged access token is valid. Measured in milliseconds. If not specified, defaults to `86400000`. + issuer (str): The name of the identity provider that will be issuing ID Tokens for this API client. The `iss` claim in the JWT issued must match this string. If not specified, defaults to the API client name. + max_role (ReferenceWritable, required): The maximum role allowed for ID Tokens issued by this API client. The bearer of an access token will be authorized to perform actions within the intersection of this `max_role` and the role of the array user specified as the JWT `sub` (subject) claim. The `max_role` field is a reference to a `role`. Valid `role`s are `readonly`, `ops_admin`, `array_admin`, and `storage_admin`. Users with the `readonly` (Read Only) role can perform operations that convey the state of the array. Read Only users cannot alter the state of the array. Users with the `ops_admin` (Ops Admin) role can perform the same operations as Read Only users plus enable and disable remote assistance sessions. Ops Admin users cannot alter the state of the array. Users with the `storage_admin` (Storage Admin) role can perform the same operations as Read Only users plus storage related operations, such as administering volumes, hosts, and host groups. Storage Admin users cannot perform operations that deal with global and system configurations. Users with the `array_admin` (Array Admin) role can perform the same operations as Storage Admin users plus array-wide changes dealing with global and system configurations. In other words, Array Admin users can perform all operations. + public_key (str, required): The API client's PEM formatted (Base64 encoded) RSA public key. It must include the `-----BEGIN PUBLIC KEY-----` and `-----END PUBLIC KEY-----` lines. + """ + if access_token_ttl_in_ms is not None: + self.access_token_ttl_in_ms = access_token_ttl_in_ms + if issuer is not None: + self.issuer = issuer + self.max_role = max_role + self.public_key = public_key + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `ApiClientsPost`".format(key)) + if key == "max_role" and value is None: + raise ValueError("Invalid value for `max_role`, must not be `None`") + if key == "public_key" and value is None: + raise ValueError("Invalid value for `public_key`, must not be `None`") + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(ApiClientsPost, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ApiClientsPost): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/api_clients_response.py b/pypureclient/flashblade/FB_2_14/models/api_clients_response.py new file mode 100644 index 000000000..94f2737df --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/api_clients_response.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class ApiClientsResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'items': 'list[ApiClient]' + } + + attribute_map = { + 'items': 'items' + } + + required_args = { + } + + def __init__( + self, + items=None, # type: List[models.ApiClient] + ): + """ + Keyword args: + items (list[ApiClient]) + """ + if items is not None: + self.items = items + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `ApiClientsResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(ApiClientsResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ApiClientsResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/api_token.py b/pypureclient/flashblade/FB_2_14/models/api_token.py new file mode 100644 index 000000000..d41fd2813 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/api_token.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class ApiToken(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'created_at': 'int', + 'expires_at': 'int', + 'token': 'str' + } + + attribute_map = { + 'created_at': 'created_at', + 'expires_at': 'expires_at', + 'token': 'token' + } + + required_args = { + } + + def __init__( + self, + created_at=None, # type: int + expires_at=None, # type: int + token=None, # type: str + ): + """ + Keyword args: + created_at (int): Creation time in milliseconds since the UNIX epoch. + expires_at (int): Expiration time in milliseconds since the UNIX epoch. + token (str): An Admin API token. A newly-created token is visible as the result of the POST operation which created it. An existing token is visible when `expose_api_token` is `true` and it is being requested by the user to whom it belongs. In all other cases, the token will be masked. + """ + if created_at is not None: + self.created_at = created_at + if expires_at is not None: + self.expires_at = expires_at + if token is not None: + self.token = token + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `ApiToken`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(ApiToken, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ApiToken): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/api_version.py b/pypureclient/flashblade/FB_2_14/models/api_version.py new file mode 100644 index 000000000..4874b3c1d --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/api_version.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class ApiVersion(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'versions': 'list[str]' + } + + attribute_map = { + 'versions': 'versions' + } + + required_args = { + } + + def __init__( + self, + versions=None, # type: List[str] + ): + """ + Keyword args: + versions (list[str]): A list of supported API versions. + """ + if versions is not None: + self.versions = versions + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `ApiVersion`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(ApiVersion, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ApiVersion): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/array.py b/pypureclient/flashblade/FB_2_14/models/array.py new file mode 100644 index 000000000..bd0968104 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/array.py @@ -0,0 +1,201 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class Array(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'name': 'str', + 'id': 'str', + 'as_of': 'int', + 'banner': 'str', + 'idle_timeout': 'int', + 'ntp_servers': 'list[str]', + 'os': 'str', + 'revision': 'str', + 'time_zone': 'str', + 'version': 'str', + 'smb_mode': 'str', + 'eradication_config': 'ArrayEradicationConfig', + 'product_type': 'str', + 'security_update': 'str', + 'encryption': 'ArrayEncryption', + 'network_access_policy': 'FixedReference' + } + + attribute_map = { + 'name': 'name', + 'id': 'id', + 'as_of': '_as_of', + 'banner': 'banner', + 'idle_timeout': 'idle_timeout', + 'ntp_servers': 'ntp_servers', + 'os': 'os', + 'revision': 'revision', + 'time_zone': 'time_zone', + 'version': 'version', + 'smb_mode': 'smb_mode', + 'eradication_config': 'eradication_config', + 'product_type': 'product_type', + 'security_update': 'security_update', + 'encryption': 'encryption', + 'network_access_policy': 'network_access_policy' + } + + required_args = { + } + + def __init__( + self, + name=None, # type: str + id=None, # type: str + as_of=None, # type: int + banner=None, # type: str + idle_timeout=None, # type: int + ntp_servers=None, # type: List[str] + os=None, # type: str + revision=None, # type: str + time_zone=None, # type: str + version=None, # type: str + smb_mode=None, # type: str + eradication_config=None, # type: models.ArrayEradicationConfig + product_type=None, # type: str + security_update=None, # type: str + encryption=None, # type: models.ArrayEncryption + network_access_policy=None, # type: models.FixedReference + ): + """ + Keyword args: + name (str): A name chosen by the user. Can be changed. Must be locally unique. + id (str): A non-modifiable, globally unique ID chosen by the system. + as_of (int): Array time in milliseconds since UNIX epoch. + banner (str): A string to be shown when logging in to the array. + idle_timeout (int): Idle timeout in milliseconds. Valid values are in the range of 300000 and 10800000. Setting this value to 0 disables timeouts. + ntp_servers (list[str]) + os (str): Valid values are `Purity//FA` and `Purity//FB`. + revision (str) + time_zone (str): The time zone to use for the array. In particular this affects the CLI formatting and the default snapshot policy time zone. + version (str) + smb_mode (str): The current SMB mode of the array. This controls the type of authentication that is used by the array for SMB. Possible values include `ad-auto`, `ad-rfc2307`, `guest`, and `native`. Modifying this value requires the assistance of Pure Storage Support. + eradication_config (ArrayEradicationConfig) + product_type (str): For `FlashBlade//S` arrays, the value is determined by the blades in the system. The value will be `FlashBlade` for all older arrays. Valid values are `FlashBlade`, `FlashBlade//S`, `FlashBlade//S200`, and `FlashBladeS500`. + security_update (str): The name of the installed security update that currently applies to the system. This field will be `null` if either no security update has been installed, or if the most recently installed security update is no longer needed by the current FlashBlade software due to the current software fully incorporating the update. + encryption (ArrayEncryption) + network_access_policy (FixedReference): The network access policy governing which clients are allowed or denied access to different array interfaces. + """ + if name is not None: + self.name = name + if id is not None: + self.id = id + if as_of is not None: + self.as_of = as_of + if banner is not None: + self.banner = banner + if idle_timeout is not None: + self.idle_timeout = idle_timeout + if ntp_servers is not None: + self.ntp_servers = ntp_servers + if os is not None: + self.os = os + if revision is not None: + self.revision = revision + if time_zone is not None: + self.time_zone = time_zone + if version is not None: + self.version = version + if smb_mode is not None: + self.smb_mode = smb_mode + if eradication_config is not None: + self.eradication_config = eradication_config + if product_type is not None: + self.product_type = product_type + if security_update is not None: + self.security_update = security_update + if encryption is not None: + self.encryption = encryption + if network_access_policy is not None: + self.network_access_policy = network_access_policy + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `Array`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(Array, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, Array): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/array_connection.py b/pypureclient/flashblade/FB_2_14/models/array_connection.py new file mode 100644 index 000000000..8e5d58c83 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/array_connection.py @@ -0,0 +1,159 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class ArrayConnection(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'id': 'str', + 'ca_certificate_group': 'FixedReference', + 'encrypted': 'bool', + 'management_address': 'str', + 'remote': 'FixedReferenceNoResourceType', + 'replication_addresses': 'list[str]', + 'status': 'str', + 'version': 'str', + 'throttle': 'Throttle' + } + + attribute_map = { + 'id': 'id', + 'ca_certificate_group': 'ca_certificate_group', + 'encrypted': 'encrypted', + 'management_address': 'management_address', + 'remote': 'remote', + 'replication_addresses': 'replication_addresses', + 'status': 'status', + 'version': 'version', + 'throttle': 'throttle' + } + + required_args = { + } + + def __init__( + self, + id=None, # type: str + ca_certificate_group=None, # type: models.FixedReference + encrypted=None, # type: bool + management_address=None, # type: str + remote=None, # type: models.FixedReferenceNoResourceType + replication_addresses=None, # type: List[str] + status=None, # type: str + version=None, # type: str + throttle=None, # type: models.Throttle + ): + """ + Keyword args: + id (str): A non-modifiable, globally unique ID chosen by the system. + ca_certificate_group (FixedReference): The group of CA certificates that can be used, in addition to well-known Certificate Authority certificates, in order to establish a secure connection to the target array. Defaults to a reference to the `_default_replication_certs` group if `secure_connection` is `true`, or `null` otherwise. + encrypted (bool): If this is set to `true`, then all customer data replicated over the connection will be sent over an encrypted connection using TLS, or will not be sent if a secure connection cannot be established. If this is set to `false`, then all customer data replicated over the connection will be sent over an unencrypted connection. Defaults to `false`. + management_address (str): Management address of the target array. Settable on POST only. + remote (FixedReferenceNoResourceType): The remote array. + replication_addresses (list[str]): IP addresses and/or FQDNs of the target arrays. Settable on POST only. If not set on POST, will be set to all the replication addresses available on the target array at the time of the POST. + status (str): Status of the connection. Valid values are `connected`, `partially_connected`, `connecting`, and `incompatible`. `connected` - The connection is OK. `partially_connected` - Some replication addresses are working, but others are not. `connecting` - No connection exists and the array is trying to reconnect. `incompatible` - The target array is not compatible. + version (str): The version of the target array. + throttle (Throttle) + """ + if id is not None: + self.id = id + if ca_certificate_group is not None: + self.ca_certificate_group = ca_certificate_group + if encrypted is not None: + self.encrypted = encrypted + if management_address is not None: + self.management_address = management_address + if remote is not None: + self.remote = remote + if replication_addresses is not None: + self.replication_addresses = replication_addresses + if status is not None: + self.status = status + if version is not None: + self.version = version + if throttle is not None: + self.throttle = throttle + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `ArrayConnection`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(ArrayConnection, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ArrayConnection): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/array_connection_get_response.py b/pypureclient/flashblade/FB_2_14/models/array_connection_get_response.py new file mode 100644 index 000000000..86aaeb0ad --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/array_connection_get_response.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class ArrayConnectionGetResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'continuation_token': 'str', + 'total_item_count': 'int', + 'items': 'list[ArrayConnection]' + } + + attribute_map = { + 'continuation_token': 'continuation_token', + 'total_item_count': 'total_item_count', + 'items': 'items' + } + + required_args = { + } + + def __init__( + self, + continuation_token=None, # type: str + total_item_count=None, # type: int + items=None, # type: List[models.ArrayConnection] + ): + """ + Keyword args: + continuation_token (str): Continuation token that can be provided in the `continuation_token` query param to get the next page of data. If you use the `continuation_token` to page through data you are guaranteed to get all items exactly once regardless of how items are modified. If an item is added or deleted during the pagination then it may or may not be returned. The `continuation_token` is generated if the `limit` is less than the remaining number of items, and the default sort is used (no sort is specified). + total_item_count (int): Total number of items after applying `filter` params. + items (list[ArrayConnection]) + """ + if continuation_token is not None: + self.continuation_token = continuation_token + if total_item_count is not None: + self.total_item_count = total_item_count + if items is not None: + self.items = items + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `ArrayConnectionGetResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(ArrayConnectionGetResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ArrayConnectionGetResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/array_connection_key.py b/pypureclient/flashblade/FB_2_14/models/array_connection_key.py new file mode 100644 index 000000000..57ffd11fa --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/array_connection_key.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class ArrayConnectionKey(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'connection_key': 'str', + 'created': 'int', + 'expires': 'int' + } + + attribute_map = { + 'connection_key': 'connection_key', + 'created': 'created', + 'expires': 'expires' + } + + required_args = { + } + + def __init__( + self, + connection_key=None, # type: str + created=None, # type: int + expires=None, # type: int + ): + """ + Keyword args: + connection_key (str): Connection-key, used on another array to connect to this array. After creation, listing will only show ****. + created (int): Creation time in milliseconds since UNIX epoch. + expires (int): Expiration time in milliseconds since UNIX epoch. + """ + if connection_key is not None: + self.connection_key = connection_key + if created is not None: + self.created = created + if expires is not None: + self.expires = expires + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `ArrayConnectionKey`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(ArrayConnectionKey, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ArrayConnectionKey): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/array_connection_key_get_response.py b/pypureclient/flashblade/FB_2_14/models/array_connection_key_get_response.py new file mode 100644 index 000000000..a00aa1337 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/array_connection_key_get_response.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class ArrayConnectionKeyGetResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'continuation_token': 'str', + 'total_item_count': 'int', + 'items': 'list[ArrayConnectionKey]' + } + + attribute_map = { + 'continuation_token': 'continuation_token', + 'total_item_count': 'total_item_count', + 'items': 'items' + } + + required_args = { + } + + def __init__( + self, + continuation_token=None, # type: str + total_item_count=None, # type: int + items=None, # type: List[models.ArrayConnectionKey] + ): + """ + Keyword args: + continuation_token (str): Continuation token that can be provided in the `continuation_token` query param to get the next page of data. If you use the `continuation_token` to page through data you are guaranteed to get all items exactly once regardless of how items are modified. If an item is added or deleted during the pagination then it may or may not be returned. The `continuation_token` is generated if the `limit` is less than the remaining number of items, and the default sort is used (no sort is specified). + total_item_count (int): Total number of items after applying `filter` params. + items (list[ArrayConnectionKey]) + """ + if continuation_token is not None: + self.continuation_token = continuation_token + if total_item_count is not None: + self.total_item_count = total_item_count + if items is not None: + self.items = items + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `ArrayConnectionKeyGetResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(ArrayConnectionKeyGetResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ArrayConnectionKeyGetResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/array_connection_key_response.py b/pypureclient/flashblade/FB_2_14/models/array_connection_key_response.py new file mode 100644 index 000000000..9bb7fe7a1 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/array_connection_key_response.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class ArrayConnectionKeyResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'items': 'list[ArrayConnectionKey]' + } + + attribute_map = { + 'items': 'items' + } + + required_args = { + } + + def __init__( + self, + items=None, # type: List[models.ArrayConnectionKey] + ): + """ + Keyword args: + items (list[ArrayConnectionKey]) + """ + if items is not None: + self.items = items + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `ArrayConnectionKeyResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(ArrayConnectionKeyResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ArrayConnectionKeyResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/array_connection_path.py b/pypureclient/flashblade/FB_2_14/models/array_connection_path.py new file mode 100644 index 000000000..2a424a488 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/array_connection_path.py @@ -0,0 +1,141 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class ArrayConnectionPath(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'id': 'str', + 'destination': 'str', + 'remote': 'FixedReferenceNoResourceType', + 'source': 'str', + 'status': 'str', + 'status_details': 'str' + } + + attribute_map = { + 'id': 'id', + 'destination': 'destination', + 'remote': 'remote', + 'source': 'source', + 'status': 'status', + 'status_details': 'status_details' + } + + required_args = { + } + + def __init__( + self, + id=None, # type: str + destination=None, # type: str + remote=None, # type: models.FixedReferenceNoResourceType + source=None, # type: str + status=None, # type: str + status_details=None, # type: str + ): + """ + Keyword args: + id (str): A non-modifiable, globally unique ID chosen by the system. + destination (str): IP address with the port of the target array. + remote (FixedReferenceNoResourceType): The remote array. + source (str): IP address of the source array. + status (str): Status of the connection. Valid values are `connected` and `connecting`. `connected` - The connection is OK. `connecting` - No connection exists and the array is trying to reconnect. + status_details (str): Additional information describing any issues encountered when connecting, or `null` if the `status` is `connected`. + """ + if id is not None: + self.id = id + if destination is not None: + self.destination = destination + if remote is not None: + self.remote = remote + if source is not None: + self.source = source + if status is not None: + self.status = status + if status_details is not None: + self.status_details = status_details + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `ArrayConnectionPath`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(ArrayConnectionPath, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ArrayConnectionPath): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/array_connection_path_get_response.py b/pypureclient/flashblade/FB_2_14/models/array_connection_path_get_response.py new file mode 100644 index 000000000..1197ba26d --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/array_connection_path_get_response.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class ArrayConnectionPathGetResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'continuation_token': 'str', + 'total_item_count': 'int', + 'items': 'list[ArrayConnectionPath]' + } + + attribute_map = { + 'continuation_token': 'continuation_token', + 'total_item_count': 'total_item_count', + 'items': 'items' + } + + required_args = { + } + + def __init__( + self, + continuation_token=None, # type: str + total_item_count=None, # type: int + items=None, # type: List[models.ArrayConnectionPath] + ): + """ + Keyword args: + continuation_token (str): Continuation token that can be provided in the `continuation_token` query param to get the next page of data. If you use the `continuation_token` to page through data you are guaranteed to get all items exactly once regardless of how items are modified. If an item is added or deleted during the pagination then it may or may not be returned. The `continuation_token` is generated if the `limit` is less than the remaining number of items, and the default sort is used (no sort is specified). + total_item_count (int): Total number of items after applying `filter` params. + items (list[ArrayConnectionPath]) + """ + if continuation_token is not None: + self.continuation_token = continuation_token + if total_item_count is not None: + self.total_item_count = total_item_count + if items is not None: + self.items = items + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `ArrayConnectionPathGetResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(ArrayConnectionPathGetResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ArrayConnectionPathGetResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/array_connection_post.py b/pypureclient/flashblade/FB_2_14/models/array_connection_post.py new file mode 100644 index 000000000..1467ee8cd --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/array_connection_post.py @@ -0,0 +1,165 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class ArrayConnectionPost(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'id': 'str', + 'ca_certificate_group': 'FixedReference', + 'encrypted': 'bool', + 'management_address': 'str', + 'remote': 'FixedReferenceNoResourceType', + 'replication_addresses': 'list[str]', + 'status': 'str', + 'version': 'str', + 'connection_key': 'str', + 'throttle': 'Throttle' + } + + attribute_map = { + 'id': 'id', + 'ca_certificate_group': 'ca_certificate_group', + 'encrypted': 'encrypted', + 'management_address': 'management_address', + 'remote': 'remote', + 'replication_addresses': 'replication_addresses', + 'status': 'status', + 'version': 'version', + 'connection_key': 'connection_key', + 'throttle': 'throttle' + } + + required_args = { + } + + def __init__( + self, + id=None, # type: str + ca_certificate_group=None, # type: models.FixedReference + encrypted=None, # type: bool + management_address=None, # type: str + remote=None, # type: models.FixedReferenceNoResourceType + replication_addresses=None, # type: List[str] + status=None, # type: str + version=None, # type: str + connection_key=None, # type: str + throttle=None, # type: models.Throttle + ): + """ + Keyword args: + id (str): A non-modifiable, globally unique ID chosen by the system. + ca_certificate_group (FixedReference): The group of CA certificates that can be used, in addition to well-known Certificate Authority certificates, in order to establish a secure connection to the target array. Defaults to a reference to the `_default_replication_certs` group if `secure_connection` is `true`, or `null` otherwise. + encrypted (bool): If this is set to `true`, then all customer data replicated over the connection will be sent over an encrypted connection using TLS, or will not be sent if a secure connection cannot be established. If this is set to `false`, then all customer data replicated over the connection will be sent over an unencrypted connection. Defaults to `false`. + management_address (str): Management address of the target array. Settable on POST only. + remote (FixedReferenceNoResourceType): The remote array. + replication_addresses (list[str]): IP addresses and/or FQDNs of the target arrays. Settable on POST only. If not set on POST, will be set to all the replication addresses available on the target array at the time of the POST. + status (str): Status of the connection. Valid values are `connected`, `partially_connected`, `connecting`, and `incompatible`. `connected` - The connection is OK. `partially_connected` - Some replication addresses are working, but others are not. `connecting` - No connection exists and the array is trying to reconnect. `incompatible` - The target array is not compatible. + version (str): The version of the target array. + connection_key (str): The connection key of the target array. Settable on POST only. + throttle (Throttle) + """ + if id is not None: + self.id = id + if ca_certificate_group is not None: + self.ca_certificate_group = ca_certificate_group + if encrypted is not None: + self.encrypted = encrypted + if management_address is not None: + self.management_address = management_address + if remote is not None: + self.remote = remote + if replication_addresses is not None: + self.replication_addresses = replication_addresses + if status is not None: + self.status = status + if version is not None: + self.version = version + if connection_key is not None: + self.connection_key = connection_key + if throttle is not None: + self.throttle = throttle + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `ArrayConnectionPost`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(ArrayConnectionPost, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ArrayConnectionPost): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/array_connection_response.py b/pypureclient/flashblade/FB_2_14/models/array_connection_response.py new file mode 100644 index 000000000..4de4c5279 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/array_connection_response.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class ArrayConnectionResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'items': 'list[ArrayConnection]' + } + + attribute_map = { + 'items': 'items' + } + + required_args = { + } + + def __init__( + self, + items=None, # type: List[models.ArrayConnection] + ): + """ + Keyword args: + items (list[ArrayConnection]) + """ + if items is not None: + self.items = items + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `ArrayConnectionResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(ArrayConnectionResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ArrayConnectionResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/array_encryption.py b/pypureclient/flashblade/FB_2_14/models/array_encryption.py new file mode 100644 index 000000000..f6d460966 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/array_encryption.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class ArrayEncryption(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'data_at_rest': 'ArrayEncryptionDataAtRest' + } + + attribute_map = { + 'data_at_rest': 'data_at_rest' + } + + required_args = { + } + + def __init__( + self, + data_at_rest=None, # type: models.ArrayEncryptionDataAtRest + ): + """ + Keyword args: + data_at_rest (ArrayEncryptionDataAtRest) + """ + if data_at_rest is not None: + self.data_at_rest = data_at_rest + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `ArrayEncryption`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(ArrayEncryption, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ArrayEncryption): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/array_encryption_data_at_rest.py b/pypureclient/flashblade/FB_2_14/models/array_encryption_data_at_rest.py new file mode 100644 index 000000000..ae959f3af --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/array_encryption_data_at_rest.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class ArrayEncryptionDataAtRest(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'algorithms': 'list[str]', + 'enabled': 'bool', + 'entropy_source': 'str' + } + + attribute_map = { + 'algorithms': 'algorithms', + 'enabled': 'enabled', + 'entropy_source': 'entropy_source' + } + + required_args = { + } + + def __init__( + self, + algorithms=None, # type: List[str] + enabled=None, # type: bool + entropy_source=None, # type: str + ): + """ + Keyword args: + algorithms (list[str]): The algorithms used to encrypt data at rest on the array. + enabled (bool): Returns a value of `true` if Data at Rest Encryption is enabled. + entropy_source (str): The entropy source used to generate the Data at Rest Encryption key on the array. + """ + if algorithms is not None: + self.algorithms = algorithms + if enabled is not None: + self.enabled = enabled + if entropy_source is not None: + self.entropy_source = entropy_source + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `ArrayEncryptionDataAtRest`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(ArrayEncryptionDataAtRest, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ArrayEncryptionDataAtRest): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/array_eradication_config.py b/pypureclient/flashblade/FB_2_14/models/array_eradication_config.py new file mode 100644 index 000000000..79f716b72 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/array_eradication_config.py @@ -0,0 +1,117 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class ArrayEradicationConfig(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'eradication_delay': 'int', + 'manual_eradication': 'str' + } + + attribute_map = { + 'eradication_delay': 'eradication_delay', + 'manual_eradication': 'manual_eradication' + } + + required_args = { + } + + def __init__( + self, + eradication_delay=None, # type: int + manual_eradication=None, # type: str + ): + """ + Keyword args: + eradication_delay (int): The file eradication delay is in milliseconds. Automatically eradicate destroyed filesystems and snapshots after the delay time. Valid values are `86400000` and any multiple of `86400000` in the range of `86400000` and `2592000000`. Any other values will be rounded down to the nearest multiple of `86400000`. + manual_eradication (str): Manual eradication status is applied on the array level. If status is all-disabled, you cannot eradicate buckets and file systems. If status is file-disabled then you can not eradicate files systems. If status is object-disabled then you can not eradicate buckets. If status is all-enabled then you can eradicate file systems and buckets. Values include `all-enabled`, `file-disabled`, `object-disabled`, and `all-disabled`. + """ + if eradication_delay is not None: + self.eradication_delay = eradication_delay + if manual_eradication is not None: + self.manual_eradication = manual_eradication + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `ArrayEradicationConfig`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(ArrayEradicationConfig, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ArrayEradicationConfig): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/array_factory_reset_token.py b/pypureclient/flashblade/FB_2_14/models/array_factory_reset_token.py new file mode 100644 index 000000000..76ca2cfe9 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/array_factory_reset_token.py @@ -0,0 +1,117 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class ArrayFactoryResetToken(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'name': 'str', + 'token': 'int' + } + + attribute_map = { + 'name': 'name', + 'token': 'token' + } + + required_args = { + } + + def __init__( + self, + name=None, # type: str + token=None, # type: int + ): + """ + Keyword args: + name (str): Name of the object (e.g., a file system or snapshot). + token (int): A random 7-digit number required as input to perform a factory reset of the array. + """ + if name is not None: + self.name = name + if token is not None: + self.token = token + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `ArrayFactoryResetToken`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(ArrayFactoryResetToken, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ArrayFactoryResetToken): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/array_factory_reset_token_get_response.py b/pypureclient/flashblade/FB_2_14/models/array_factory_reset_token_get_response.py new file mode 100644 index 000000000..73b8607b9 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/array_factory_reset_token_get_response.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class ArrayFactoryResetTokenGetResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'continuation_token': 'str', + 'total_item_count': 'int', + 'items': 'list[ArrayFactoryResetToken]' + } + + attribute_map = { + 'continuation_token': 'continuation_token', + 'total_item_count': 'total_item_count', + 'items': 'items' + } + + required_args = { + } + + def __init__( + self, + continuation_token=None, # type: str + total_item_count=None, # type: int + items=None, # type: List[models.ArrayFactoryResetToken] + ): + """ + Keyword args: + continuation_token (str): Continuation token that can be provided in the `continuation_token` query param to get the next page of data. If you use the `continuation_token` to page through data you are guaranteed to get all items exactly once regardless of how items are modified. If an item is added or deleted during the pagination then it may or may not be returned. The `continuation_token` is generated if the `limit` is less than the remaining number of items, and the default sort is used (no sort is specified). + total_item_count (int): Total number of items after applying `filter` params. + items (list[ArrayFactoryResetToken]) + """ + if continuation_token is not None: + self.continuation_token = continuation_token + if total_item_count is not None: + self.total_item_count = total_item_count + if items is not None: + self.items = items + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `ArrayFactoryResetTokenGetResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(ArrayFactoryResetTokenGetResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ArrayFactoryResetTokenGetResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/array_factory_reset_token_response.py b/pypureclient/flashblade/FB_2_14/models/array_factory_reset_token_response.py new file mode 100644 index 000000000..9ae3d2dfc --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/array_factory_reset_token_response.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class ArrayFactoryResetTokenResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'items': 'list[ArrayFactoryResetToken]' + } + + attribute_map = { + 'items': 'items' + } + + required_args = { + } + + def __init__( + self, + items=None, # type: List[models.ArrayFactoryResetToken] + ): + """ + Keyword args: + items (list[ArrayFactoryResetToken]) + """ + if items is not None: + self.items = items + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `ArrayFactoryResetTokenResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(ArrayFactoryResetTokenResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ArrayFactoryResetTokenResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/array_get_response.py b/pypureclient/flashblade/FB_2_14/models/array_get_response.py new file mode 100644 index 000000000..c8860b169 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/array_get_response.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class ArrayGetResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'continuation_token': 'str', + 'total_item_count': 'int', + 'items': 'list[Array]' + } + + attribute_map = { + 'continuation_token': 'continuation_token', + 'total_item_count': 'total_item_count', + 'items': 'items' + } + + required_args = { + } + + def __init__( + self, + continuation_token=None, # type: str + total_item_count=None, # type: int + items=None, # type: List[models.Array] + ): + """ + Keyword args: + continuation_token (str): Continuation token that can be provided in the `continuation_token` query param to get the next page of data. If you use the `continuation_token` to page through data you are guaranteed to get all items exactly once regardless of how items are modified. If an item is added or deleted during the pagination then it may or may not be returned. The `continuation_token` is generated if the `limit` is less than the remaining number of items, and the default sort is used (no sort is specified). + total_item_count (int): Total number of items after applying `filter` params. + items (list[Array]): A list of array objects. + """ + if continuation_token is not None: + self.continuation_token = continuation_token + if total_item_count is not None: + self.total_item_count = total_item_count + if items is not None: + self.items = items + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `ArrayGetResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(ArrayGetResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ArrayGetResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/array_http_specific_performance.py b/pypureclient/flashblade/FB_2_14/models/array_http_specific_performance.py new file mode 100644 index 000000000..768fa9e22 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/array_http_specific_performance.py @@ -0,0 +1,213 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class ArrayHttpSpecificPerformance(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'name': 'str', + 'id': 'str', + 'others_per_sec': 'float', + 'read_dirs_per_sec': 'float', + 'read_files_per_sec': 'float', + 'write_dirs_per_sec': 'float', + 'write_files_per_sec': 'float', + 'time': 'int', + 'usec_per_other_op': 'float', + 'usec_per_read_dir_op': 'float', + 'usec_per_read_file_op': 'float', + 'usec_per_write_dir_op': 'float', + 'usec_per_write_file_op': 'float' + } + + attribute_map = { + 'name': 'name', + 'id': 'id', + 'others_per_sec': 'others_per_sec', + 'read_dirs_per_sec': 'read_dirs_per_sec', + 'read_files_per_sec': 'read_files_per_sec', + 'write_dirs_per_sec': 'write_dirs_per_sec', + 'write_files_per_sec': 'write_files_per_sec', + 'time': 'time', + 'usec_per_other_op': 'usec_per_other_op', + 'usec_per_read_dir_op': 'usec_per_read_dir_op', + 'usec_per_read_file_op': 'usec_per_read_file_op', + 'usec_per_write_dir_op': 'usec_per_write_dir_op', + 'usec_per_write_file_op': 'usec_per_write_file_op' + } + + required_args = { + } + + def __init__( + self, + name=None, # type: str + id=None, # type: str + others_per_sec=None, # type: float + read_dirs_per_sec=None, # type: float + read_files_per_sec=None, # type: float + write_dirs_per_sec=None, # type: float + write_files_per_sec=None, # type: float + time=None, # type: int + usec_per_other_op=None, # type: float + usec_per_read_dir_op=None, # type: float + usec_per_read_file_op=None, # type: float + usec_per_write_dir_op=None, # type: float + usec_per_write_file_op=None, # type: float + ): + """ + Keyword args: + name (str): Name of the object (e.g., a file system or snapshot). + id (str): A non-modifiable, globally unique ID chosen by the system. + others_per_sec (float): Other operations processed per second. + read_dirs_per_sec (float): Read directory requests processed per second. + read_files_per_sec (float): Read file requests processed per second. + write_dirs_per_sec (float): Write directory requests processed per second. + write_files_per_sec (float): Write file requests processed per second. + time (int): Sample time in milliseconds since UNIX epoch. + usec_per_other_op (float): Average time, measured in microseconds, it takes the array to process other operations. + usec_per_read_dir_op (float): Average time, measured in microseconds, it takes the array to process a read directory request. + usec_per_read_file_op (float): Average time, measured in microseconds, it takes the array to process a read file request. + usec_per_write_dir_op (float): Average time, measured in microseconds, it takes the array to process a write directory request. + usec_per_write_file_op (float): Average time, measured in microseconds, it takes the array to process a write file request. + """ + if name is not None: + self.name = name + if id is not None: + self.id = id + if others_per_sec is not None: + self.others_per_sec = others_per_sec + if read_dirs_per_sec is not None: + self.read_dirs_per_sec = read_dirs_per_sec + if read_files_per_sec is not None: + self.read_files_per_sec = read_files_per_sec + if write_dirs_per_sec is not None: + self.write_dirs_per_sec = write_dirs_per_sec + if write_files_per_sec is not None: + self.write_files_per_sec = write_files_per_sec + if time is not None: + self.time = time + if usec_per_other_op is not None: + self.usec_per_other_op = usec_per_other_op + if usec_per_read_dir_op is not None: + self.usec_per_read_dir_op = usec_per_read_dir_op + if usec_per_read_file_op is not None: + self.usec_per_read_file_op = usec_per_read_file_op + if usec_per_write_dir_op is not None: + self.usec_per_write_dir_op = usec_per_write_dir_op + if usec_per_write_file_op is not None: + self.usec_per_write_file_op = usec_per_write_file_op + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `ArrayHttpSpecificPerformance`".format(key)) + if key == "others_per_sec" and value is not None: + if value < 0.0: + raise ValueError("Invalid value for `others_per_sec`, must be a value greater than or equal to `0.0`") + if key == "read_dirs_per_sec" and value is not None: + if value < 0.0: + raise ValueError("Invalid value for `read_dirs_per_sec`, must be a value greater than or equal to `0.0`") + if key == "read_files_per_sec" and value is not None: + if value < 0.0: + raise ValueError("Invalid value for `read_files_per_sec`, must be a value greater than or equal to `0.0`") + if key == "write_dirs_per_sec" and value is not None: + if value < 0.0: + raise ValueError("Invalid value for `write_dirs_per_sec`, must be a value greater than or equal to `0.0`") + if key == "write_files_per_sec" and value is not None: + if value < 0.0: + raise ValueError("Invalid value for `write_files_per_sec`, must be a value greater than or equal to `0.0`") + if key == "usec_per_other_op" and value is not None: + if value < 0.0: + raise ValueError("Invalid value for `usec_per_other_op`, must be a value greater than or equal to `0.0`") + if key == "usec_per_read_dir_op" and value is not None: + if value < 0.0: + raise ValueError("Invalid value for `usec_per_read_dir_op`, must be a value greater than or equal to `0.0`") + if key == "usec_per_read_file_op" and value is not None: + if value < 0.0: + raise ValueError("Invalid value for `usec_per_read_file_op`, must be a value greater than or equal to `0.0`") + if key == "usec_per_write_dir_op" and value is not None: + if value < 0.0: + raise ValueError("Invalid value for `usec_per_write_dir_op`, must be a value greater than or equal to `0.0`") + if key == "usec_per_write_file_op" and value is not None: + if value < 0.0: + raise ValueError("Invalid value for `usec_per_write_file_op`, must be a value greater than or equal to `0.0`") + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(ArrayHttpSpecificPerformance, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ArrayHttpSpecificPerformance): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/array_http_specific_performance_get.py b/pypureclient/flashblade/FB_2_14/models/array_http_specific_performance_get.py new file mode 100644 index 000000000..3c0ed868c --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/array_http_specific_performance_get.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class ArrayHttpSpecificPerformanceGet(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'continuation_token': 'str', + 'total_item_count': 'int', + 'items': 'list[ArrayHttpSpecificPerformance]' + } + + attribute_map = { + 'continuation_token': 'continuation_token', + 'total_item_count': 'total_item_count', + 'items': 'items' + } + + required_args = { + } + + def __init__( + self, + continuation_token=None, # type: str + total_item_count=None, # type: int + items=None, # type: List[models.ArrayHttpSpecificPerformance] + ): + """ + Keyword args: + continuation_token (str): Continuation token that can be provided in the `continuation_token` query param to get the next page of data. If you use the `continuation_token` to page through data you are guaranteed to get all items exactly once regardless of how items are modified. If an item is added or deleted during the pagination then it may or may not be returned. The `continuation_token` is generated if the `limit` is less than the remaining number of items, and the default sort is used (no sort is specified). + total_item_count (int): Total number of items after applying `filter` params. + items (list[ArrayHttpSpecificPerformance]): A list of http specific array performance metrics objects. + """ + if continuation_token is not None: + self.continuation_token = continuation_token + if total_item_count is not None: + self.total_item_count = total_item_count + if items is not None: + self.items = items + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `ArrayHttpSpecificPerformanceGet`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(ArrayHttpSpecificPerformanceGet, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ArrayHttpSpecificPerformanceGet): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/array_nfs_specific_performance.py b/pypureclient/flashblade/FB_2_14/models/array_nfs_specific_performance.py new file mode 100644 index 000000000..b73a9cab0 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/array_nfs_specific_performance.py @@ -0,0 +1,555 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class ArrayNfsSpecificPerformance(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'name': 'str', + 'id': 'str', + 'accesses_per_sec': 'float', + 'aggregate_file_metadata_creates_per_sec': 'float', + 'aggregate_file_metadata_modifies_per_sec': 'float', + 'aggregate_file_metadata_reads_per_sec': 'float', + 'aggregate_other_per_sec': 'float', + 'aggregate_share_metadata_reads_per_sec': 'float', + 'aggregate_usec_per_file_metadata_create_op': 'float', + 'aggregate_usec_per_file_metadata_modify_op': 'float', + 'aggregate_usec_per_file_metadata_read_op': 'float', + 'aggregate_usec_per_other_op': 'float', + 'aggregate_usec_per_share_metadata_read_op': 'float', + 'creates_per_sec': 'float', + 'fsinfos_per_sec': 'float', + 'fsstats_per_sec': 'float', + 'getattrs_per_sec': 'float', + 'links_per_sec': 'float', + 'lookups_per_sec': 'float', + 'mkdirs_per_sec': 'float', + 'pathconfs_per_sec': 'float', + 'reads_per_sec': 'float', + 'readdirs_per_sec': 'float', + 'readdirpluses_per_sec': 'float', + 'readlinks_per_sec': 'float', + 'removes_per_sec': 'float', + 'renames_per_sec': 'float', + 'rmdirs_per_sec': 'float', + 'setattrs_per_sec': 'float', + 'symlinks_per_sec': 'float', + 'time': 'int', + 'writes_per_sec': 'float', + 'usec_per_access_op': 'float', + 'usec_per_create_op': 'float', + 'usec_per_fsinfo_op': 'float', + 'usec_per_fsstat_op': 'float', + 'usec_per_getattr_op': 'float', + 'usec_per_link_op': 'float', + 'usec_per_lookup_op': 'float', + 'usec_per_mkdir_op': 'float', + 'usec_per_pathconf_op': 'float', + 'usec_per_read_op': 'float', + 'usec_per_readdir_op': 'float', + 'usec_per_readdirplus_op': 'float', + 'usec_per_readlink_op': 'float', + 'usec_per_remove_op': 'float', + 'usec_per_rename_op': 'float', + 'usec_per_rmdir_op': 'float', + 'usec_per_setattr_op': 'float', + 'usec_per_symlink_op': 'float', + 'usec_per_write_op': 'float' + } + + attribute_map = { + 'name': 'name', + 'id': 'id', + 'accesses_per_sec': 'accesses_per_sec', + 'aggregate_file_metadata_creates_per_sec': 'aggregate_file_metadata_creates_per_sec', + 'aggregate_file_metadata_modifies_per_sec': 'aggregate_file_metadata_modifies_per_sec', + 'aggregate_file_metadata_reads_per_sec': 'aggregate_file_metadata_reads_per_sec', + 'aggregate_other_per_sec': 'aggregate_other_per_sec', + 'aggregate_share_metadata_reads_per_sec': 'aggregate_share_metadata_reads_per_sec', + 'aggregate_usec_per_file_metadata_create_op': 'aggregate_usec_per_file_metadata_create_op', + 'aggregate_usec_per_file_metadata_modify_op': 'aggregate_usec_per_file_metadata_modify_op', + 'aggregate_usec_per_file_metadata_read_op': 'aggregate_usec_per_file_metadata_read_op', + 'aggregate_usec_per_other_op': 'aggregate_usec_per_other_op', + 'aggregate_usec_per_share_metadata_read_op': 'aggregate_usec_per_share_metadata_read_op', + 'creates_per_sec': 'creates_per_sec', + 'fsinfos_per_sec': 'fsinfos_per_sec', + 'fsstats_per_sec': 'fsstats_per_sec', + 'getattrs_per_sec': 'getattrs_per_sec', + 'links_per_sec': 'links_per_sec', + 'lookups_per_sec': 'lookups_per_sec', + 'mkdirs_per_sec': 'mkdirs_per_sec', + 'pathconfs_per_sec': 'pathconfs_per_sec', + 'reads_per_sec': 'reads_per_sec', + 'readdirs_per_sec': 'readdirs_per_sec', + 'readdirpluses_per_sec': 'readdirpluses_per_sec', + 'readlinks_per_sec': 'readlinks_per_sec', + 'removes_per_sec': 'removes_per_sec', + 'renames_per_sec': 'renames_per_sec', + 'rmdirs_per_sec': 'rmdirs_per_sec', + 'setattrs_per_sec': 'setattrs_per_sec', + 'symlinks_per_sec': 'symlinks_per_sec', + 'time': 'time', + 'writes_per_sec': 'writes_per_sec', + 'usec_per_access_op': 'usec_per_access_op', + 'usec_per_create_op': 'usec_per_create_op', + 'usec_per_fsinfo_op': 'usec_per_fsinfo_op', + 'usec_per_fsstat_op': 'usec_per_fsstat_op', + 'usec_per_getattr_op': 'usec_per_getattr_op', + 'usec_per_link_op': 'usec_per_link_op', + 'usec_per_lookup_op': 'usec_per_lookup_op', + 'usec_per_mkdir_op': 'usec_per_mkdir_op', + 'usec_per_pathconf_op': 'usec_per_pathconf_op', + 'usec_per_read_op': 'usec_per_read_op', + 'usec_per_readdir_op': 'usec_per_readdir_op', + 'usec_per_readdirplus_op': 'usec_per_readdirplus_op', + 'usec_per_readlink_op': 'usec_per_readlink_op', + 'usec_per_remove_op': 'usec_per_remove_op', + 'usec_per_rename_op': 'usec_per_rename_op', + 'usec_per_rmdir_op': 'usec_per_rmdir_op', + 'usec_per_setattr_op': 'usec_per_setattr_op', + 'usec_per_symlink_op': 'usec_per_symlink_op', + 'usec_per_write_op': 'usec_per_write_op' + } + + required_args = { + } + + def __init__( + self, + name=None, # type: str + id=None, # type: str + accesses_per_sec=None, # type: float + aggregate_file_metadata_creates_per_sec=None, # type: float + aggregate_file_metadata_modifies_per_sec=None, # type: float + aggregate_file_metadata_reads_per_sec=None, # type: float + aggregate_other_per_sec=None, # type: float + aggregate_share_metadata_reads_per_sec=None, # type: float + aggregate_usec_per_file_metadata_create_op=None, # type: float + aggregate_usec_per_file_metadata_modify_op=None, # type: float + aggregate_usec_per_file_metadata_read_op=None, # type: float + aggregate_usec_per_other_op=None, # type: float + aggregate_usec_per_share_metadata_read_op=None, # type: float + creates_per_sec=None, # type: float + fsinfos_per_sec=None, # type: float + fsstats_per_sec=None, # type: float + getattrs_per_sec=None, # type: float + links_per_sec=None, # type: float + lookups_per_sec=None, # type: float + mkdirs_per_sec=None, # type: float + pathconfs_per_sec=None, # type: float + reads_per_sec=None, # type: float + readdirs_per_sec=None, # type: float + readdirpluses_per_sec=None, # type: float + readlinks_per_sec=None, # type: float + removes_per_sec=None, # type: float + renames_per_sec=None, # type: float + rmdirs_per_sec=None, # type: float + setattrs_per_sec=None, # type: float + symlinks_per_sec=None, # type: float + time=None, # type: int + writes_per_sec=None, # type: float + usec_per_access_op=None, # type: float + usec_per_create_op=None, # type: float + usec_per_fsinfo_op=None, # type: float + usec_per_fsstat_op=None, # type: float + usec_per_getattr_op=None, # type: float + usec_per_link_op=None, # type: float + usec_per_lookup_op=None, # type: float + usec_per_mkdir_op=None, # type: float + usec_per_pathconf_op=None, # type: float + usec_per_read_op=None, # type: float + usec_per_readdir_op=None, # type: float + usec_per_readdirplus_op=None, # type: float + usec_per_readlink_op=None, # type: float + usec_per_remove_op=None, # type: float + usec_per_rename_op=None, # type: float + usec_per_rmdir_op=None, # type: float + usec_per_setattr_op=None, # type: float + usec_per_symlink_op=None, # type: float + usec_per_write_op=None, # type: float + ): + """ + Keyword args: + name (str): Name of the object (e.g., a file system or snapshot). + id (str): A non-modifiable, globally unique ID chosen by the system. + accesses_per_sec (float): ACCESS requests processed per second. + aggregate_file_metadata_creates_per_sec (float): Sum of file-level or directory-level create-like metadata requests per second. Includes CREATE, LINK, MKDIR, and SYMLINK. + aggregate_file_metadata_modifies_per_sec (float): Sum of file-level or directory-level modify-like and delete-like metadata requests per second. Includes REMOVE, RENAME, RMDIR, and SETATTR. + aggregate_file_metadata_reads_per_sec (float): Sum of file-level or directory-level read-like metadata requests per second. Includes GETATTR, LOOKUP, PATHCONF, READDIR, READDIRPLUS, and READLINK. + aggregate_other_per_sec (float): Sum of all other requests processed per second. This includes COMMIT, MKNOD, NULL, NLM operations, and operations which are supported for NFSv4.1 but not NFSv3. + aggregate_share_metadata_reads_per_sec (float): Sum of share-level read-like metadata requests per second. Includes ACCESS, FSINFO, and FSSTAT. + aggregate_usec_per_file_metadata_create_op (float): Average time, measured in microseconds, it takes the array to process a file-level or directory-level create-like metadata request. Includes CREATE, LINK, MKDIR, and SYMLINK. + aggregate_usec_per_file_metadata_modify_op (float): Average time, measured in microseconds, it takes the array to process a file-level or directory-level modify-like or delete-like metadata request. Includes REMOVE, RENAME, RMDIR, and SETATTR. + aggregate_usec_per_file_metadata_read_op (float): Average time, measured in microseconds, it takes the array to process a file-level or directory-level read-like metadata request. Includes GETATTR, LOOKUP, PATHCONF, READDIR, READDIRPLUS, and READLINK. + aggregate_usec_per_other_op (float): Average time, measured in microseconds, it takes the array to process all other requests. This includes COMMIT, MKNOD, NULL, NLM operations, and operations which are supported for NFSv4.1 but not NFSv3. + aggregate_usec_per_share_metadata_read_op (float): Average time, measured in microseconds, it takes the array to process a share-level read-like metadata request. Includes ACCESS, FSINFO, and FSSTAT. + creates_per_sec (float): CREATE requests processed per second. + fsinfos_per_sec (float): FSINFO requests processed per second. + fsstats_per_sec (float): FSSTAT requests processed per second. + getattrs_per_sec (float): GETATTR requests processed per second. + links_per_sec (float): LINK requests processed per second. + lookups_per_sec (float): LOOKUP requests processed per second. + mkdirs_per_sec (float): MKDIR requests processed per second. + pathconfs_per_sec (float): PATHCONF requests processed per second. + reads_per_sec (float): READ requests processed per second. + readdirs_per_sec (float): READDIR requests processed per second. + readdirpluses_per_sec (float): READDIRPLUS requests processed per second. + readlinks_per_sec (float): READLINK requests processed per second. + removes_per_sec (float): REMOVE requests processed per second. + renames_per_sec (float): RENAME requests processed per second. + rmdirs_per_sec (float): RMDIR requests processed per second. + setattrs_per_sec (float): SETATTR requests processed per second. + symlinks_per_sec (float): SYMLINK requests processed per second. + time (int): Sample time in milliseconds since UNIX epoch. + writes_per_sec (float): WRITE requests processed per second. + usec_per_access_op (float): Average time, measured in microseconds, it takes the array to process an ACCESS request. + usec_per_create_op (float): Average time, measured in microseconds, it takes the array to process a CREATE request. + usec_per_fsinfo_op (float): Average time, measured in microseconds, it takes the array to process an FSINFO request. + usec_per_fsstat_op (float): Average time, measured in microseconds, it takes the array to process an FSSTAT request. + usec_per_getattr_op (float): Average time, measured in microseconds, it takes the array to process a GETATTR request. + usec_per_link_op (float): Average time, measured in microseconds, it takes the array to process a LINK request. + usec_per_lookup_op (float): Average time, measured in microseconds, it takes the array to process a LOOKUP request. + usec_per_mkdir_op (float): Average time, measured in microseconds, it takes the array to process a MKDIR request. + usec_per_pathconf_op (float): Average time, measured in microseconds, it takes the array to process a PATHCONF request. + usec_per_read_op (float): Average time, measured in microseconds, it takes the array to process a READ request. + usec_per_readdir_op (float): Average time, measured in microseconds, it takes the array to process a READDIR request. + usec_per_readdirplus_op (float): Average time, measured in microseconds, it takes the array to process a READDIRPLUS request. + usec_per_readlink_op (float): Average time, measured in microseconds, it takes the array to process a READLINK request. + usec_per_remove_op (float): Average time, measured in microseconds, it takes the array to process a REMOVE request. + usec_per_rename_op (float): Average time, measured in microseconds, it takes the array to process a RENAME request. + usec_per_rmdir_op (float): Average time, measured in microseconds, it takes the array to process an RMDIR request. + usec_per_setattr_op (float): Average time, measured in microseconds, it takes the array to process a SETATTR request. + usec_per_symlink_op (float): Average time, measured in microseconds, it takes the array to process a SYMLINK request. + usec_per_write_op (float): Average time, measured in microseconds, it takes the array to process a WRITE request. + """ + if name is not None: + self.name = name + if id is not None: + self.id = id + if accesses_per_sec is not None: + self.accesses_per_sec = accesses_per_sec + if aggregate_file_metadata_creates_per_sec is not None: + self.aggregate_file_metadata_creates_per_sec = aggregate_file_metadata_creates_per_sec + if aggregate_file_metadata_modifies_per_sec is not None: + self.aggregate_file_metadata_modifies_per_sec = aggregate_file_metadata_modifies_per_sec + if aggregate_file_metadata_reads_per_sec is not None: + self.aggregate_file_metadata_reads_per_sec = aggregate_file_metadata_reads_per_sec + if aggregate_other_per_sec is not None: + self.aggregate_other_per_sec = aggregate_other_per_sec + if aggregate_share_metadata_reads_per_sec is not None: + self.aggregate_share_metadata_reads_per_sec = aggregate_share_metadata_reads_per_sec + if aggregate_usec_per_file_metadata_create_op is not None: + self.aggregate_usec_per_file_metadata_create_op = aggregate_usec_per_file_metadata_create_op + if aggregate_usec_per_file_metadata_modify_op is not None: + self.aggregate_usec_per_file_metadata_modify_op = aggregate_usec_per_file_metadata_modify_op + if aggregate_usec_per_file_metadata_read_op is not None: + self.aggregate_usec_per_file_metadata_read_op = aggregate_usec_per_file_metadata_read_op + if aggregate_usec_per_other_op is not None: + self.aggregate_usec_per_other_op = aggregate_usec_per_other_op + if aggregate_usec_per_share_metadata_read_op is not None: + self.aggregate_usec_per_share_metadata_read_op = aggregate_usec_per_share_metadata_read_op + if creates_per_sec is not None: + self.creates_per_sec = creates_per_sec + if fsinfos_per_sec is not None: + self.fsinfos_per_sec = fsinfos_per_sec + if fsstats_per_sec is not None: + self.fsstats_per_sec = fsstats_per_sec + if getattrs_per_sec is not None: + self.getattrs_per_sec = getattrs_per_sec + if links_per_sec is not None: + self.links_per_sec = links_per_sec + if lookups_per_sec is not None: + self.lookups_per_sec = lookups_per_sec + if mkdirs_per_sec is not None: + self.mkdirs_per_sec = mkdirs_per_sec + if pathconfs_per_sec is not None: + self.pathconfs_per_sec = pathconfs_per_sec + if reads_per_sec is not None: + self.reads_per_sec = reads_per_sec + if readdirs_per_sec is not None: + self.readdirs_per_sec = readdirs_per_sec + if readdirpluses_per_sec is not None: + self.readdirpluses_per_sec = readdirpluses_per_sec + if readlinks_per_sec is not None: + self.readlinks_per_sec = readlinks_per_sec + if removes_per_sec is not None: + self.removes_per_sec = removes_per_sec + if renames_per_sec is not None: + self.renames_per_sec = renames_per_sec + if rmdirs_per_sec is not None: + self.rmdirs_per_sec = rmdirs_per_sec + if setattrs_per_sec is not None: + self.setattrs_per_sec = setattrs_per_sec + if symlinks_per_sec is not None: + self.symlinks_per_sec = symlinks_per_sec + if time is not None: + self.time = time + if writes_per_sec is not None: + self.writes_per_sec = writes_per_sec + if usec_per_access_op is not None: + self.usec_per_access_op = usec_per_access_op + if usec_per_create_op is not None: + self.usec_per_create_op = usec_per_create_op + if usec_per_fsinfo_op is not None: + self.usec_per_fsinfo_op = usec_per_fsinfo_op + if usec_per_fsstat_op is not None: + self.usec_per_fsstat_op = usec_per_fsstat_op + if usec_per_getattr_op is not None: + self.usec_per_getattr_op = usec_per_getattr_op + if usec_per_link_op is not None: + self.usec_per_link_op = usec_per_link_op + if usec_per_lookup_op is not None: + self.usec_per_lookup_op = usec_per_lookup_op + if usec_per_mkdir_op is not None: + self.usec_per_mkdir_op = usec_per_mkdir_op + if usec_per_pathconf_op is not None: + self.usec_per_pathconf_op = usec_per_pathconf_op + if usec_per_read_op is not None: + self.usec_per_read_op = usec_per_read_op + if usec_per_readdir_op is not None: + self.usec_per_readdir_op = usec_per_readdir_op + if usec_per_readdirplus_op is not None: + self.usec_per_readdirplus_op = usec_per_readdirplus_op + if usec_per_readlink_op is not None: + self.usec_per_readlink_op = usec_per_readlink_op + if usec_per_remove_op is not None: + self.usec_per_remove_op = usec_per_remove_op + if usec_per_rename_op is not None: + self.usec_per_rename_op = usec_per_rename_op + if usec_per_rmdir_op is not None: + self.usec_per_rmdir_op = usec_per_rmdir_op + if usec_per_setattr_op is not None: + self.usec_per_setattr_op = usec_per_setattr_op + if usec_per_symlink_op is not None: + self.usec_per_symlink_op = usec_per_symlink_op + if usec_per_write_op is not None: + self.usec_per_write_op = usec_per_write_op + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `ArrayNfsSpecificPerformance`".format(key)) + if key == "accesses_per_sec" and value is not None: + if value < 0.0: + raise ValueError("Invalid value for `accesses_per_sec`, must be a value greater than or equal to `0.0`") + if key == "aggregate_file_metadata_creates_per_sec" and value is not None: + if value < 0.0: + raise ValueError("Invalid value for `aggregate_file_metadata_creates_per_sec`, must be a value greater than or equal to `0.0`") + if key == "aggregate_file_metadata_modifies_per_sec" and value is not None: + if value < 0.0: + raise ValueError("Invalid value for `aggregate_file_metadata_modifies_per_sec`, must be a value greater than or equal to `0.0`") + if key == "aggregate_file_metadata_reads_per_sec" and value is not None: + if value < 0.0: + raise ValueError("Invalid value for `aggregate_file_metadata_reads_per_sec`, must be a value greater than or equal to `0.0`") + if key == "aggregate_other_per_sec" and value is not None: + if value < 0.0: + raise ValueError("Invalid value for `aggregate_other_per_sec`, must be a value greater than or equal to `0.0`") + if key == "aggregate_share_metadata_reads_per_sec" and value is not None: + if value < 0.0: + raise ValueError("Invalid value for `aggregate_share_metadata_reads_per_sec`, must be a value greater than or equal to `0.0`") + if key == "aggregate_usec_per_file_metadata_create_op" and value is not None: + if value < 0.0: + raise ValueError("Invalid value for `aggregate_usec_per_file_metadata_create_op`, must be a value greater than or equal to `0.0`") + if key == "aggregate_usec_per_file_metadata_modify_op" and value is not None: + if value < 0.0: + raise ValueError("Invalid value for `aggregate_usec_per_file_metadata_modify_op`, must be a value greater than or equal to `0.0`") + if key == "aggregate_usec_per_file_metadata_read_op" and value is not None: + if value < 0.0: + raise ValueError("Invalid value for `aggregate_usec_per_file_metadata_read_op`, must be a value greater than or equal to `0.0`") + if key == "aggregate_usec_per_other_op" and value is not None: + if value < 0.0: + raise ValueError("Invalid value for `aggregate_usec_per_other_op`, must be a value greater than or equal to `0.0`") + if key == "aggregate_usec_per_share_metadata_read_op" and value is not None: + if value < 0.0: + raise ValueError("Invalid value for `aggregate_usec_per_share_metadata_read_op`, must be a value greater than or equal to `0.0`") + if key == "creates_per_sec" and value is not None: + if value < 0.0: + raise ValueError("Invalid value for `creates_per_sec`, must be a value greater than or equal to `0.0`") + if key == "fsinfos_per_sec" and value is not None: + if value < 0.0: + raise ValueError("Invalid value for `fsinfos_per_sec`, must be a value greater than or equal to `0.0`") + if key == "fsstats_per_sec" and value is not None: + if value < 0.0: + raise ValueError("Invalid value for `fsstats_per_sec`, must be a value greater than or equal to `0.0`") + if key == "getattrs_per_sec" and value is not None: + if value < 0.0: + raise ValueError("Invalid value for `getattrs_per_sec`, must be a value greater than or equal to `0.0`") + if key == "links_per_sec" and value is not None: + if value < 0.0: + raise ValueError("Invalid value for `links_per_sec`, must be a value greater than or equal to `0.0`") + if key == "lookups_per_sec" and value is not None: + if value < 0.0: + raise ValueError("Invalid value for `lookups_per_sec`, must be a value greater than or equal to `0.0`") + if key == "mkdirs_per_sec" and value is not None: + if value < 0.0: + raise ValueError("Invalid value for `mkdirs_per_sec`, must be a value greater than or equal to `0.0`") + if key == "pathconfs_per_sec" and value is not None: + if value < 0.0: + raise ValueError("Invalid value for `pathconfs_per_sec`, must be a value greater than or equal to `0.0`") + if key == "reads_per_sec" and value is not None: + if value < 0.0: + raise ValueError("Invalid value for `reads_per_sec`, must be a value greater than or equal to `0.0`") + if key == "readdirs_per_sec" and value is not None: + if value < 0.0: + raise ValueError("Invalid value for `readdirs_per_sec`, must be a value greater than or equal to `0.0`") + if key == "readdirpluses_per_sec" and value is not None: + if value < 0.0: + raise ValueError("Invalid value for `readdirpluses_per_sec`, must be a value greater than or equal to `0.0`") + if key == "readlinks_per_sec" and value is not None: + if value < 0.0: + raise ValueError("Invalid value for `readlinks_per_sec`, must be a value greater than or equal to `0.0`") + if key == "removes_per_sec" and value is not None: + if value < 0.0: + raise ValueError("Invalid value for `removes_per_sec`, must be a value greater than or equal to `0.0`") + if key == "renames_per_sec" and value is not None: + if value < 0.0: + raise ValueError("Invalid value for `renames_per_sec`, must be a value greater than or equal to `0.0`") + if key == "rmdirs_per_sec" and value is not None: + if value < 0.0: + raise ValueError("Invalid value for `rmdirs_per_sec`, must be a value greater than or equal to `0.0`") + if key == "setattrs_per_sec" and value is not None: + if value < 0.0: + raise ValueError("Invalid value for `setattrs_per_sec`, must be a value greater than or equal to `0.0`") + if key == "symlinks_per_sec" and value is not None: + if value < 0.0: + raise ValueError("Invalid value for `symlinks_per_sec`, must be a value greater than or equal to `0.0`") + if key == "writes_per_sec" and value is not None: + if value < 0.0: + raise ValueError("Invalid value for `writes_per_sec`, must be a value greater than or equal to `0.0`") + if key == "usec_per_access_op" and value is not None: + if value < 0.0: + raise ValueError("Invalid value for `usec_per_access_op`, must be a value greater than or equal to `0.0`") + if key == "usec_per_create_op" and value is not None: + if value < 0.0: + raise ValueError("Invalid value for `usec_per_create_op`, must be a value greater than or equal to `0.0`") + if key == "usec_per_fsinfo_op" and value is not None: + if value < 0.0: + raise ValueError("Invalid value for `usec_per_fsinfo_op`, must be a value greater than or equal to `0.0`") + if key == "usec_per_fsstat_op" and value is not None: + if value < 0.0: + raise ValueError("Invalid value for `usec_per_fsstat_op`, must be a value greater than or equal to `0.0`") + if key == "usec_per_getattr_op" and value is not None: + if value < 0.0: + raise ValueError("Invalid value for `usec_per_getattr_op`, must be a value greater than or equal to `0.0`") + if key == "usec_per_link_op" and value is not None: + if value < 0.0: + raise ValueError("Invalid value for `usec_per_link_op`, must be a value greater than or equal to `0.0`") + if key == "usec_per_lookup_op" and value is not None: + if value < 0.0: + raise ValueError("Invalid value for `usec_per_lookup_op`, must be a value greater than or equal to `0.0`") + if key == "usec_per_mkdir_op" and value is not None: + if value < 0.0: + raise ValueError("Invalid value for `usec_per_mkdir_op`, must be a value greater than or equal to `0.0`") + if key == "usec_per_pathconf_op" and value is not None: + if value < 0.0: + raise ValueError("Invalid value for `usec_per_pathconf_op`, must be a value greater than or equal to `0.0`") + if key == "usec_per_read_op" and value is not None: + if value < 0.0: + raise ValueError("Invalid value for `usec_per_read_op`, must be a value greater than or equal to `0.0`") + if key == "usec_per_readdir_op" and value is not None: + if value < 0.0: + raise ValueError("Invalid value for `usec_per_readdir_op`, must be a value greater than or equal to `0.0`") + if key == "usec_per_readdirplus_op" and value is not None: + if value < 0.0: + raise ValueError("Invalid value for `usec_per_readdirplus_op`, must be a value greater than or equal to `0.0`") + if key == "usec_per_readlink_op" and value is not None: + if value < 0.0: + raise ValueError("Invalid value for `usec_per_readlink_op`, must be a value greater than or equal to `0.0`") + if key == "usec_per_remove_op" and value is not None: + if value < 0.0: + raise ValueError("Invalid value for `usec_per_remove_op`, must be a value greater than or equal to `0.0`") + if key == "usec_per_rename_op" and value is not None: + if value < 0.0: + raise ValueError("Invalid value for `usec_per_rename_op`, must be a value greater than or equal to `0.0`") + if key == "usec_per_rmdir_op" and value is not None: + if value < 0.0: + raise ValueError("Invalid value for `usec_per_rmdir_op`, must be a value greater than or equal to `0.0`") + if key == "usec_per_setattr_op" and value is not None: + if value < 0.0: + raise ValueError("Invalid value for `usec_per_setattr_op`, must be a value greater than or equal to `0.0`") + if key == "usec_per_symlink_op" and value is not None: + if value < 0.0: + raise ValueError("Invalid value for `usec_per_symlink_op`, must be a value greater than or equal to `0.0`") + if key == "usec_per_write_op" and value is not None: + if value < 0.0: + raise ValueError("Invalid value for `usec_per_write_op`, must be a value greater than or equal to `0.0`") + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(ArrayNfsSpecificPerformance, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ArrayNfsSpecificPerformance): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/array_nfs_specific_performance_get.py b/pypureclient/flashblade/FB_2_14/models/array_nfs_specific_performance_get.py new file mode 100644 index 000000000..4cae04ff9 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/array_nfs_specific_performance_get.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class ArrayNfsSpecificPerformanceGet(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'continuation_token': 'str', + 'total_item_count': 'int', + 'items': 'list[ArrayNfsSpecificPerformance]' + } + + attribute_map = { + 'continuation_token': 'continuation_token', + 'total_item_count': 'total_item_count', + 'items': 'items' + } + + required_args = { + } + + def __init__( + self, + continuation_token=None, # type: str + total_item_count=None, # type: int + items=None, # type: List[models.ArrayNfsSpecificPerformance] + ): + """ + Keyword args: + continuation_token (str): Continuation token that can be provided in the `continuation_token` query param to get the next page of data. If you use the `continuation_token` to page through data you are guaranteed to get all items exactly once regardless of how items are modified. If an item is added or deleted during the pagination then it may or may not be returned. The `continuation_token` is generated if the `limit` is less than the remaining number of items, and the default sort is used (no sort is specified). + total_item_count (int): Total number of items after applying `filter` params. + items (list[ArrayNfsSpecificPerformance]): A list of NFS specific array performance metrics objects. + """ + if continuation_token is not None: + self.continuation_token = continuation_token + if total_item_count is not None: + self.total_item_count = total_item_count + if items is not None: + self.items = items + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `ArrayNfsSpecificPerformanceGet`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(ArrayNfsSpecificPerformanceGet, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ArrayNfsSpecificPerformanceGet): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/array_performance.py b/pypureclient/flashblade/FB_2_14/models/array_performance.py new file mode 100644 index 000000000..fcd2a9195 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/array_performance.py @@ -0,0 +1,222 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class ArrayPerformance(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'name': 'str', + 'id': 'str', + 'bytes_per_op': 'float', + 'bytes_per_read': 'float', + 'bytes_per_write': 'float', + 'others_per_sec': 'float', + 'read_bytes_per_sec': 'float', + 'reads_per_sec': 'float', + 'time': 'int', + 'usec_per_other_op': 'float', + 'usec_per_read_op': 'float', + 'usec_per_write_op': 'float', + 'write_bytes_per_sec': 'float', + 'writes_per_sec': 'float' + } + + attribute_map = { + 'name': 'name', + 'id': 'id', + 'bytes_per_op': 'bytes_per_op', + 'bytes_per_read': 'bytes_per_read', + 'bytes_per_write': 'bytes_per_write', + 'others_per_sec': 'others_per_sec', + 'read_bytes_per_sec': 'read_bytes_per_sec', + 'reads_per_sec': 'reads_per_sec', + 'time': 'time', + 'usec_per_other_op': 'usec_per_other_op', + 'usec_per_read_op': 'usec_per_read_op', + 'usec_per_write_op': 'usec_per_write_op', + 'write_bytes_per_sec': 'write_bytes_per_sec', + 'writes_per_sec': 'writes_per_sec' + } + + required_args = { + } + + def __init__( + self, + name=None, # type: str + id=None, # type: str + bytes_per_op=None, # type: float + bytes_per_read=None, # type: float + bytes_per_write=None, # type: float + others_per_sec=None, # type: float + read_bytes_per_sec=None, # type: float + reads_per_sec=None, # type: float + time=None, # type: int + usec_per_other_op=None, # type: float + usec_per_read_op=None, # type: float + usec_per_write_op=None, # type: float + write_bytes_per_sec=None, # type: float + writes_per_sec=None, # type: float + ): + """ + Keyword args: + name (str): Name of the object (e.g., a file system or snapshot). + id (str): A non-modifiable, globally unique ID chosen by the system. + bytes_per_op (float): Average operation size (read bytes+write bytes/read ops+write ops). + bytes_per_read (float): Average read size in bytes per read operation. + bytes_per_write (float): Average write size in bytes per write operation. + others_per_sec (float): Other operations processed per second. + read_bytes_per_sec (float): Bytes read per second. + reads_per_sec (float): Read requests processed per second. + time (int): Sample time in milliseconds since UNIX epoch. + usec_per_other_op (float): Average time, measured in microseconds, it takes the array to process other operations. + usec_per_read_op (float): Average time, measured in microseconds, it takes the array to process a read request. + usec_per_write_op (float): Average time, measured in microseconds, it takes the array to process a write request. + write_bytes_per_sec (float): Bytes written per second. + writes_per_sec (float): Write requests processed per second. + """ + if name is not None: + self.name = name + if id is not None: + self.id = id + if bytes_per_op is not None: + self.bytes_per_op = bytes_per_op + if bytes_per_read is not None: + self.bytes_per_read = bytes_per_read + if bytes_per_write is not None: + self.bytes_per_write = bytes_per_write + if others_per_sec is not None: + self.others_per_sec = others_per_sec + if read_bytes_per_sec is not None: + self.read_bytes_per_sec = read_bytes_per_sec + if reads_per_sec is not None: + self.reads_per_sec = reads_per_sec + if time is not None: + self.time = time + if usec_per_other_op is not None: + self.usec_per_other_op = usec_per_other_op + if usec_per_read_op is not None: + self.usec_per_read_op = usec_per_read_op + if usec_per_write_op is not None: + self.usec_per_write_op = usec_per_write_op + if write_bytes_per_sec is not None: + self.write_bytes_per_sec = write_bytes_per_sec + if writes_per_sec is not None: + self.writes_per_sec = writes_per_sec + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `ArrayPerformance`".format(key)) + if key == "bytes_per_op" and value is not None: + if value < 0.0: + raise ValueError("Invalid value for `bytes_per_op`, must be a value greater than or equal to `0.0`") + if key == "bytes_per_read" and value is not None: + if value < 0.0: + raise ValueError("Invalid value for `bytes_per_read`, must be a value greater than or equal to `0.0`") + if key == "bytes_per_write" and value is not None: + if value < 0.0: + raise ValueError("Invalid value for `bytes_per_write`, must be a value greater than or equal to `0.0`") + if key == "others_per_sec" and value is not None: + if value < 0.0: + raise ValueError("Invalid value for `others_per_sec`, must be a value greater than or equal to `0.0`") + if key == "read_bytes_per_sec" and value is not None: + if value < 0.0: + raise ValueError("Invalid value for `read_bytes_per_sec`, must be a value greater than or equal to `0.0`") + if key == "reads_per_sec" and value is not None: + if value < 0.0: + raise ValueError("Invalid value for `reads_per_sec`, must be a value greater than or equal to `0.0`") + if key == "usec_per_other_op" and value is not None: + if value < 0.0: + raise ValueError("Invalid value for `usec_per_other_op`, must be a value greater than or equal to `0.0`") + if key == "usec_per_read_op" and value is not None: + if value < 0.0: + raise ValueError("Invalid value for `usec_per_read_op`, must be a value greater than or equal to `0.0`") + if key == "usec_per_write_op" and value is not None: + if value < 0.0: + raise ValueError("Invalid value for `usec_per_write_op`, must be a value greater than or equal to `0.0`") + if key == "write_bytes_per_sec" and value is not None: + if value < 0.0: + raise ValueError("Invalid value for `write_bytes_per_sec`, must be a value greater than or equal to `0.0`") + if key == "writes_per_sec" and value is not None: + if value < 0.0: + raise ValueError("Invalid value for `writes_per_sec`, must be a value greater than or equal to `0.0`") + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(ArrayPerformance, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ArrayPerformance): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/array_performance_get_response.py b/pypureclient/flashblade/FB_2_14/models/array_performance_get_response.py new file mode 100644 index 000000000..5f456623f --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/array_performance_get_response.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class ArrayPerformanceGetResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'continuation_token': 'str', + 'total_item_count': 'int', + 'items': 'list[ArrayPerformance]' + } + + attribute_map = { + 'continuation_token': 'continuation_token', + 'total_item_count': 'total_item_count', + 'items': 'items' + } + + required_args = { + } + + def __init__( + self, + continuation_token=None, # type: str + total_item_count=None, # type: int + items=None, # type: List[models.ArrayPerformance] + ): + """ + Keyword args: + continuation_token (str): Continuation token that can be provided in the `continuation_token` query param to get the next page of data. If you use the `continuation_token` to page through data you are guaranteed to get all items exactly once regardless of how items are modified. If an item is added or deleted during the pagination then it may or may not be returned. The `continuation_token` is generated if the `limit` is less than the remaining number of items, and the default sort is used (no sort is specified). + total_item_count (int): Total number of items after applying `filter` params. + items (list[ArrayPerformance]): A list of array performance metrics objects. + """ + if continuation_token is not None: + self.continuation_token = continuation_token + if total_item_count is not None: + self.total_item_count = total_item_count + if items is not None: + self.items = items + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `ArrayPerformanceGetResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(ArrayPerformanceGetResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ArrayPerformanceGetResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/array_performance_replication_get_resp.py b/pypureclient/flashblade/FB_2_14/models/array_performance_replication_get_resp.py new file mode 100644 index 000000000..a3d30652a --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/array_performance_replication_get_resp.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class ArrayPerformanceReplicationGetResp(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'continuation_token': 'str', + 'total_item_count': 'int', + 'items': 'list[RelationshipPerformanceReplication]' + } + + attribute_map = { + 'continuation_token': 'continuation_token', + 'total_item_count': 'total_item_count', + 'items': 'items' + } + + required_args = { + } + + def __init__( + self, + continuation_token=None, # type: str + total_item_count=None, # type: int + items=None, # type: List[models.RelationshipPerformanceReplication] + ): + """ + Keyword args: + continuation_token (str): Continuation token that can be provided in the `continuation_token` query param to get the next page of data. If you use the `continuation_token` to page through data you are guaranteed to get all items exactly once regardless of how items are modified. If an item is added or deleted during the pagination then it may or may not be returned. The `continuation_token` is generated if the `limit` is less than the remaining number of items, and the default sort is used (no sort is specified). + total_item_count (int): Total number of items after applying `filter` params. + items (list[RelationshipPerformanceReplication]) + """ + if continuation_token is not None: + self.continuation_token = continuation_token + if total_item_count is not None: + self.total_item_count = total_item_count + if items is not None: + self.items = items + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `ArrayPerformanceReplicationGetResp`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(ArrayPerformanceReplicationGetResp, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ArrayPerformanceReplicationGetResp): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/array_response.py b/pypureclient/flashblade/FB_2_14/models/array_response.py new file mode 100644 index 000000000..670f9eec4 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/array_response.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class ArrayResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'items': 'list[Array]' + } + + attribute_map = { + 'items': 'items' + } + + required_args = { + } + + def __init__( + self, + items=None, # type: List[models.Array] + ): + """ + Keyword args: + items (list[Array]): A list of array objects. + """ + if items is not None: + self.items = items + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `ArrayResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(ArrayResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ArrayResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/array_s3_specific_performance.py b/pypureclient/flashblade/FB_2_14/models/array_s3_specific_performance.py new file mode 100644 index 000000000..f10f0854d --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/array_s3_specific_performance.py @@ -0,0 +1,213 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class ArrayS3SpecificPerformance(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'name': 'str', + 'id': 'str', + 'others_per_sec': 'float', + 'read_buckets_per_sec': 'float', + 'read_objects_per_sec': 'float', + 'write_buckets_per_sec': 'float', + 'write_objects_per_sec': 'float', + 'time': 'int', + 'usec_per_other_op': 'float', + 'usec_per_read_bucket_op': 'float', + 'usec_per_read_object_op': 'float', + 'usec_per_write_bucket_op': 'float', + 'usec_per_write_object_op': 'float' + } + + attribute_map = { + 'name': 'name', + 'id': 'id', + 'others_per_sec': 'others_per_sec', + 'read_buckets_per_sec': 'read_buckets_per_sec', + 'read_objects_per_sec': 'read_objects_per_sec', + 'write_buckets_per_sec': 'write_buckets_per_sec', + 'write_objects_per_sec': 'write_objects_per_sec', + 'time': 'time', + 'usec_per_other_op': 'usec_per_other_op', + 'usec_per_read_bucket_op': 'usec_per_read_bucket_op', + 'usec_per_read_object_op': 'usec_per_read_object_op', + 'usec_per_write_bucket_op': 'usec_per_write_bucket_op', + 'usec_per_write_object_op': 'usec_per_write_object_op' + } + + required_args = { + } + + def __init__( + self, + name=None, # type: str + id=None, # type: str + others_per_sec=None, # type: float + read_buckets_per_sec=None, # type: float + read_objects_per_sec=None, # type: float + write_buckets_per_sec=None, # type: float + write_objects_per_sec=None, # type: float + time=None, # type: int + usec_per_other_op=None, # type: float + usec_per_read_bucket_op=None, # type: float + usec_per_read_object_op=None, # type: float + usec_per_write_bucket_op=None, # type: float + usec_per_write_object_op=None, # type: float + ): + """ + Keyword args: + name (str): Name of the object (e.g., a file system or snapshot). + id (str): A non-modifiable, globally unique ID chosen by the system. + others_per_sec (float): Other operations processed per second. + read_buckets_per_sec (float): Read buckets requests processed per second. + read_objects_per_sec (float): Read object requests processed per second. + write_buckets_per_sec (float): Write buckets requests processed per second. + write_objects_per_sec (float): Write object requests processed per second. + time (int): Sample time in milliseconds since UNIX epoch. + usec_per_other_op (float): Average time, measured in microseconds, it takes the array to process other operations. + usec_per_read_bucket_op (float): Average time, measured in microseconds, it takes the array to process a read bucket request. + usec_per_read_object_op (float): Average time, measured in microseconds, it takes the array to process a read object request. + usec_per_write_bucket_op (float): Average time, measured in microseconds, it takes the array to process a write bucket request. + usec_per_write_object_op (float): Average time, measured in microseconds, it takes the array to process a write object request. + """ + if name is not None: + self.name = name + if id is not None: + self.id = id + if others_per_sec is not None: + self.others_per_sec = others_per_sec + if read_buckets_per_sec is not None: + self.read_buckets_per_sec = read_buckets_per_sec + if read_objects_per_sec is not None: + self.read_objects_per_sec = read_objects_per_sec + if write_buckets_per_sec is not None: + self.write_buckets_per_sec = write_buckets_per_sec + if write_objects_per_sec is not None: + self.write_objects_per_sec = write_objects_per_sec + if time is not None: + self.time = time + if usec_per_other_op is not None: + self.usec_per_other_op = usec_per_other_op + if usec_per_read_bucket_op is not None: + self.usec_per_read_bucket_op = usec_per_read_bucket_op + if usec_per_read_object_op is not None: + self.usec_per_read_object_op = usec_per_read_object_op + if usec_per_write_bucket_op is not None: + self.usec_per_write_bucket_op = usec_per_write_bucket_op + if usec_per_write_object_op is not None: + self.usec_per_write_object_op = usec_per_write_object_op + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `ArrayS3SpecificPerformance`".format(key)) + if key == "others_per_sec" and value is not None: + if value < 0.0: + raise ValueError("Invalid value for `others_per_sec`, must be a value greater than or equal to `0.0`") + if key == "read_buckets_per_sec" and value is not None: + if value < 0.0: + raise ValueError("Invalid value for `read_buckets_per_sec`, must be a value greater than or equal to `0.0`") + if key == "read_objects_per_sec" and value is not None: + if value < 0.0: + raise ValueError("Invalid value for `read_objects_per_sec`, must be a value greater than or equal to `0.0`") + if key == "write_buckets_per_sec" and value is not None: + if value < 0.0: + raise ValueError("Invalid value for `write_buckets_per_sec`, must be a value greater than or equal to `0.0`") + if key == "write_objects_per_sec" and value is not None: + if value < 0.0: + raise ValueError("Invalid value for `write_objects_per_sec`, must be a value greater than or equal to `0.0`") + if key == "usec_per_other_op" and value is not None: + if value < 0.0: + raise ValueError("Invalid value for `usec_per_other_op`, must be a value greater than or equal to `0.0`") + if key == "usec_per_read_bucket_op" and value is not None: + if value < 0.0: + raise ValueError("Invalid value for `usec_per_read_bucket_op`, must be a value greater than or equal to `0.0`") + if key == "usec_per_read_object_op" and value is not None: + if value < 0.0: + raise ValueError("Invalid value for `usec_per_read_object_op`, must be a value greater than or equal to `0.0`") + if key == "usec_per_write_bucket_op" and value is not None: + if value < 0.0: + raise ValueError("Invalid value for `usec_per_write_bucket_op`, must be a value greater than or equal to `0.0`") + if key == "usec_per_write_object_op" and value is not None: + if value < 0.0: + raise ValueError("Invalid value for `usec_per_write_object_op`, must be a value greater than or equal to `0.0`") + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(ArrayS3SpecificPerformance, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ArrayS3SpecificPerformance): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/array_s3_specific_performance_get_resp.py b/pypureclient/flashblade/FB_2_14/models/array_s3_specific_performance_get_resp.py new file mode 100644 index 000000000..71494352d --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/array_s3_specific_performance_get_resp.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class ArrayS3SpecificPerformanceGetResp(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'continuation_token': 'str', + 'total_item_count': 'int', + 'items': 'list[ArrayS3SpecificPerformance]' + } + + attribute_map = { + 'continuation_token': 'continuation_token', + 'total_item_count': 'total_item_count', + 'items': 'items' + } + + required_args = { + } + + def __init__( + self, + continuation_token=None, # type: str + total_item_count=None, # type: int + items=None, # type: List[models.ArrayS3SpecificPerformance] + ): + """ + Keyword args: + continuation_token (str): Continuation token that can be provided in the `continuation_token` query param to get the next page of data. If you use the `continuation_token` to page through data you are guaranteed to get all items exactly once regardless of how items are modified. If an item is added or deleted during the pagination then it may or may not be returned. The `continuation_token` is generated if the `limit` is less than the remaining number of items, and the default sort is used (no sort is specified). + total_item_count (int): Total number of items after applying `filter` params. + items (list[ArrayS3SpecificPerformance]): A list of S3 specific array performance metrics objects. + """ + if continuation_token is not None: + self.continuation_token = continuation_token + if total_item_count is not None: + self.total_item_count = total_item_count + if items is not None: + self.items = items + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `ArrayS3SpecificPerformanceGetResp`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(ArrayS3SpecificPerformanceGetResp, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ArrayS3SpecificPerformanceGetResp): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/array_space.py b/pypureclient/flashblade/FB_2_14/models/array_space.py new file mode 100644 index 000000000..5bd02be31 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/array_space.py @@ -0,0 +1,141 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class ArraySpace(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'name': 'str', + 'id': 'str', + 'capacity': 'int', + 'parity': 'float', + 'space': 'Space', + 'time': 'int' + } + + attribute_map = { + 'name': 'name', + 'id': 'id', + 'capacity': 'capacity', + 'parity': 'parity', + 'space': 'space', + 'time': 'time' + } + + required_args = { + } + + def __init__( + self, + name=None, # type: str + id=None, # type: str + capacity=None, # type: int + parity=None, # type: float + space=None, # type: models.Space + time=None, # type: int + ): + """ + Keyword args: + name (str): Name of the object (e.g., a file system or snapshot). + id (str): A non-modifiable, globally unique ID chosen by the system. + capacity (int): Usable capacity in bytes. + parity (float): A representation of data redundancy on the array. Data redundancy is rebuilt automatically by the system whenever parity is less than 1.0. + space (Space) + time (int): Sample time in milliseconds since UNIX epoch. + """ + if name is not None: + self.name = name + if id is not None: + self.id = id + if capacity is not None: + self.capacity = capacity + if parity is not None: + self.parity = parity + if space is not None: + self.space = space + if time is not None: + self.time = time + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `ArraySpace`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(ArraySpace, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ArraySpace): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/array_space_get_response.py b/pypureclient/flashblade/FB_2_14/models/array_space_get_response.py new file mode 100644 index 000000000..012470890 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/array_space_get_response.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class ArraySpaceGetResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'continuation_token': 'str', + 'total_item_count': 'int', + 'items': 'list[ArraySpace]' + } + + attribute_map = { + 'continuation_token': 'continuation_token', + 'total_item_count': 'total_item_count', + 'items': 'items' + } + + required_args = { + } + + def __init__( + self, + continuation_token=None, # type: str + total_item_count=None, # type: int + items=None, # type: List[models.ArraySpace] + ): + """ + Keyword args: + continuation_token (str): Continuation token that can be provided in the `continuation_token` query param to get the next page of data. If you use the `continuation_token` to page through data you are guaranteed to get all items exactly once regardless of how items are modified. If an item is added or deleted during the pagination then it may or may not be returned. The `continuation_token` is generated if the `limit` is less than the remaining number of items, and the default sort is used (no sort is specified). + total_item_count (int): Total number of items after applying `filter` params. + items (list[ArraySpace]): A list of array space metrics objects. + """ + if continuation_token is not None: + self.continuation_token = continuation_token + if total_item_count is not None: + self.total_item_count = total_item_count + if items is not None: + self.items = items + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `ArraySpaceGetResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(ArraySpaceGetResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ArraySpaceGetResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/arrays_supported_time_zones_get_response.py b/pypureclient/flashblade/FB_2_14/models/arrays_supported_time_zones_get_response.py new file mode 100644 index 000000000..a13172457 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/arrays_supported_time_zones_get_response.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class ArraysSupportedTimeZonesGetResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'continuation_token': 'str', + 'total_item_count': 'int', + 'items': 'list[TimeZone]' + } + + attribute_map = { + 'continuation_token': 'continuation_token', + 'total_item_count': 'total_item_count', + 'items': 'items' + } + + required_args = { + } + + def __init__( + self, + continuation_token=None, # type: str + total_item_count=None, # type: int + items=None, # type: List[models.TimeZone] + ): + """ + Keyword args: + continuation_token (str): Continuation token that can be provided in the `continuation_token` query param to get the next page of data. If you use the `continuation_token` to page through data you are guaranteed to get all items exactly once regardless of how items are modified. If an item is added or deleted during the pagination then it may or may not be returned. The `continuation_token` is generated if the `limit` is less than the remaining number of items, and the default sort is used (no sort is specified). + total_item_count (int): Total number of items after applying `filter` params. + items (list[TimeZone]) + """ + if continuation_token is not None: + self.continuation_token = continuation_token + if total_item_count is not None: + self.total_item_count = total_item_count + if items is not None: + self.items = items + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `ArraysSupportedTimeZonesGetResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(ArraysSupportedTimeZonesGetResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ArraysSupportedTimeZonesGetResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/audit.py b/pypureclient/flashblade/FB_2_14/models/audit.py new file mode 100644 index 000000000..5f6646756 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/audit.py @@ -0,0 +1,165 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class Audit(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'name': 'str', + 'id': 'str', + 'arguments': 'str', + 'command': 'str', + 'ip_address': 'str', + 'subcommand': 'str', + 'time': 'int', + 'user': 'str', + 'user_agent': 'str', + 'user_interface': 'str' + } + + attribute_map = { + 'name': 'name', + 'id': 'id', + 'arguments': 'arguments', + 'command': 'command', + 'ip_address': 'ip_address', + 'subcommand': 'subcommand', + 'time': 'time', + 'user': 'user', + 'user_agent': 'user_agent', + 'user_interface': 'user_interface' + } + + required_args = { + } + + def __init__( + self, + name=None, # type: str + id=None, # type: str + arguments=None, # type: str + command=None, # type: str + ip_address=None, # type: str + subcommand=None, # type: str + time=None, # type: int + user=None, # type: str + user_agent=None, # type: str + user_interface=None, # type: str + ): + """ + Keyword args: + name (str): Name of the object (e.g., a file system or snapshot). + id (str): A non-modifiable, globally unique ID chosen by the system. + arguments (str) + command (str) + ip_address (str) + subcommand (str) + time (int) + user (str) + user_agent (str) + user_interface (str): The user interface through which the user session event was performed. Valid values are `CLI`, `GUI`, and `REST`. + """ + if name is not None: + self.name = name + if id is not None: + self.id = id + if arguments is not None: + self.arguments = arguments + if command is not None: + self.command = command + if ip_address is not None: + self.ip_address = ip_address + if subcommand is not None: + self.subcommand = subcommand + if time is not None: + self.time = time + if user is not None: + self.user = user + if user_agent is not None: + self.user_agent = user_agent + if user_interface is not None: + self.user_interface = user_interface + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `Audit`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(Audit, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, Audit): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/audit_file_systems_policies.py b/pypureclient/flashblade/FB_2_14/models/audit_file_systems_policies.py new file mode 100644 index 000000000..10bcba8b2 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/audit_file_systems_policies.py @@ -0,0 +1,147 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class AuditFileSystemsPolicies(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'name': 'str', + 'id': 'str', + 'enabled': 'bool', + 'is_local': 'bool', + 'location': 'FixedReference', + 'policy_type': 'str', + 'log_targets': 'list[Reference]' + } + + attribute_map = { + 'name': 'name', + 'id': 'id', + 'enabled': 'enabled', + 'is_local': 'is_local', + 'location': 'location', + 'policy_type': 'policy_type', + 'log_targets': 'log_targets' + } + + required_args = { + } + + def __init__( + self, + name=None, # type: str + id=None, # type: str + enabled=None, # type: bool + is_local=None, # type: bool + location=None, # type: models.FixedReference + policy_type=None, # type: str + log_targets=None, # type: List[models.Reference] + ): + """ + Keyword args: + name (str): A name chosen by the user. Can be changed. Must be locally unique. + id (str): A non-modifiable, globally unique ID chosen by the system. + enabled (bool): If `true`, the policy is enabled. If not specified, defaults to `true`. + is_local (bool): Whether the policy is defined on the local array. + location (FixedReference): Reference to the array where the policy is defined. + policy_type (str): Type of the policy. Valid values are `audit`, `bucket-access`, `cross-origin-resource-sharing`, `network-access`, `nfs`, `object-access`, `smb-client`, `smb-share`, and `snapshot`. + log_targets (list[Reference]): List of targets which will be utilized for audit log storage. These may either be file system targets or remote syslog server targets. + """ + if name is not None: + self.name = name + if id is not None: + self.id = id + if enabled is not None: + self.enabled = enabled + if is_local is not None: + self.is_local = is_local + if location is not None: + self.location = location + if policy_type is not None: + self.policy_type = policy_type + if log_targets is not None: + self.log_targets = log_targets + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `AuditFileSystemsPolicies`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(AuditFileSystemsPolicies, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, AuditFileSystemsPolicies): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/audit_file_systems_policies_get_response.py b/pypureclient/flashblade/FB_2_14/models/audit_file_systems_policies_get_response.py new file mode 100644 index 000000000..855ecaa33 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/audit_file_systems_policies_get_response.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class AuditFileSystemsPoliciesGetResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'continuation_token': 'str', + 'total_item_count': 'int', + 'items': 'list[AuditFileSystemsPolicy]' + } + + attribute_map = { + 'continuation_token': 'continuation_token', + 'total_item_count': 'total_item_count', + 'items': 'items' + } + + required_args = { + } + + def __init__( + self, + continuation_token=None, # type: str + total_item_count=None, # type: int + items=None, # type: List[models.AuditFileSystemsPolicy] + ): + """ + Keyword args: + continuation_token (str): Continuation token that can be provided in the `continuation_token` query param to get the next page of data. If you use the `continuation_token` to page through data you are guaranteed to get all items exactly once regardless of how items are modified. If an item is added or deleted during the pagination then it may or may not be returned. The `continuation_token` is generated if the `limit` is less than the remaining number of items, and the default sort is used (no sort is specified). + total_item_count (int): Total number of items after applying `filter` params. + items (list[AuditFileSystemsPolicy]): A list of audit policy objects. + """ + if continuation_token is not None: + self.continuation_token = continuation_token + if total_item_count is not None: + self.total_item_count = total_item_count + if items is not None: + self.items = items + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `AuditFileSystemsPoliciesGetResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(AuditFileSystemsPoliciesGetResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, AuditFileSystemsPoliciesGetResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/audit_file_systems_policies_members_get_response.py b/pypureclient/flashblade/FB_2_14/models/audit_file_systems_policies_members_get_response.py new file mode 100644 index 000000000..69656404a --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/audit_file_systems_policies_members_get_response.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class AuditFileSystemsPoliciesMembersGetResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'continuation_token': 'str', + 'total_item_count': 'int', + 'items': 'list[PolicyMember]' + } + + attribute_map = { + 'continuation_token': 'continuation_token', + 'total_item_count': 'total_item_count', + 'items': 'items' + } + + required_args = { + } + + def __init__( + self, + continuation_token=None, # type: str + total_item_count=None, # type: int + items=None, # type: List[models.PolicyMember] + ): + """ + Keyword args: + continuation_token (str): Continuation token that can be provided in the `continuation_token` query param to get the next page of data. If you use the `continuation_token` to page through data you are guaranteed to get all items exactly once regardless of how items are modified. If an item is added or deleted during the pagination then it may or may not be returned. The `continuation_token` is generated if the `limit` is less than the remaining number of items, and the default sort is used (no sort is specified). + total_item_count (int): Total number of items after applying `filter` params. + items (list[PolicyMember]): A list of members for audit policies. + """ + if continuation_token is not None: + self.continuation_token = continuation_token + if total_item_count is not None: + self.total_item_count = total_item_count + if items is not None: + self.items = items + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `AuditFileSystemsPoliciesMembersGetResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(AuditFileSystemsPoliciesMembersGetResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, AuditFileSystemsPoliciesMembersGetResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/audit_file_systems_policies_members_response.py b/pypureclient/flashblade/FB_2_14/models/audit_file_systems_policies_members_response.py new file mode 100644 index 000000000..0db9fb765 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/audit_file_systems_policies_members_response.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class AuditFileSystemsPoliciesMembersResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'items': 'list[PolicyMember]' + } + + attribute_map = { + 'items': 'items' + } + + required_args = { + } + + def __init__( + self, + items=None, # type: List[models.PolicyMember] + ): + """ + Keyword args: + items (list[PolicyMember]): A list of members for audit policies. + """ + if items is not None: + self.items = items + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `AuditFileSystemsPoliciesMembersResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(AuditFileSystemsPoliciesMembersResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, AuditFileSystemsPoliciesMembersResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/audit_file_systems_policies_patch.py b/pypureclient/flashblade/FB_2_14/models/audit_file_systems_policies_patch.py new file mode 100644 index 000000000..3287c9015 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/audit_file_systems_policies_patch.py @@ -0,0 +1,159 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class AuditFileSystemsPoliciesPatch(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'name': 'str', + 'id': 'str', + 'enabled': 'bool', + 'is_local': 'bool', + 'location': 'FixedReference', + 'policy_type': 'str', + 'log_targets': 'list[Reference]', + 'add_log_targets': 'list[Reference]', + 'remove_log_targets': 'list[Reference]' + } + + attribute_map = { + 'name': 'name', + 'id': 'id', + 'enabled': 'enabled', + 'is_local': 'is_local', + 'location': 'location', + 'policy_type': 'policy_type', + 'log_targets': 'log_targets', + 'add_log_targets': 'add_log_targets', + 'remove_log_targets': 'remove_log_targets' + } + + required_args = { + } + + def __init__( + self, + name=None, # type: str + id=None, # type: str + enabled=None, # type: bool + is_local=None, # type: bool + location=None, # type: models.FixedReference + policy_type=None, # type: str + log_targets=None, # type: List[models.Reference] + add_log_targets=None, # type: List[models.Reference] + remove_log_targets=None, # type: List[models.Reference] + ): + """ + Keyword args: + name (str): A name chosen by the user. Can be changed. Must be locally unique. + id (str): A non-modifiable, globally unique ID chosen by the system. + enabled (bool): If `true`, the policy is enabled. If not specified, defaults to `true`. + is_local (bool): Whether the policy is defined on the local array. + location (FixedReference): Reference to the array where the policy is defined. + policy_type (str): Type of the policy. Valid values are `audit`, `bucket-access`, `cross-origin-resource-sharing`, `network-access`, `nfs`, `object-access`, `smb-client`, `smb-share`, and `snapshot`. + log_targets (list[Reference]): List of targets which will be utilized for audit log storage. These may either be file system targets or remote syslog server targets. + add_log_targets (list[Reference]): The log targets which will be added to the existing `log_targets` list for the audit policy. These new log targets will be appended to the end of the existing list. The `add_log_targets` field can not be used with `log_targets` field. + remove_log_targets (list[Reference]): The log targets which will be removed from the existing `log_targets` list for the audit policy. The `remove_log_targets` field can not be used with `log_targets` field. + """ + if name is not None: + self.name = name + if id is not None: + self.id = id + if enabled is not None: + self.enabled = enabled + if is_local is not None: + self.is_local = is_local + if location is not None: + self.location = location + if policy_type is not None: + self.policy_type = policy_type + if log_targets is not None: + self.log_targets = log_targets + if add_log_targets is not None: + self.add_log_targets = add_log_targets + if remove_log_targets is not None: + self.remove_log_targets = remove_log_targets + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `AuditFileSystemsPoliciesPatch`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(AuditFileSystemsPoliciesPatch, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, AuditFileSystemsPoliciesPatch): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/audit_file_systems_policies_post.py b/pypureclient/flashblade/FB_2_14/models/audit_file_systems_policies_post.py new file mode 100644 index 000000000..0ec0abb2d --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/audit_file_systems_policies_post.py @@ -0,0 +1,147 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class AuditFileSystemsPoliciesPost(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'name': 'str', + 'id': 'str', + 'enabled': 'bool', + 'is_local': 'bool', + 'location': 'FixedReference', + 'policy_type': 'str', + 'log_targets': 'list[Reference]' + } + + attribute_map = { + 'name': 'name', + 'id': 'id', + 'enabled': 'enabled', + 'is_local': 'is_local', + 'location': 'location', + 'policy_type': 'policy_type', + 'log_targets': 'log_targets' + } + + required_args = { + } + + def __init__( + self, + name=None, # type: str + id=None, # type: str + enabled=None, # type: bool + is_local=None, # type: bool + location=None, # type: models.FixedReference + policy_type=None, # type: str + log_targets=None, # type: List[models.Reference] + ): + """ + Keyword args: + name (str): Name of the object (e.g., a file system or snapshot). + id (str): A non-modifiable, globally unique ID chosen by the system. + enabled (bool): If `true`, the policy is enabled. If not specified, defaults to `true`. + is_local (bool): Whether the policy is defined on the local array. + location (FixedReference): Reference to the array where the policy is defined. + policy_type (str): Type of the policy. Valid values are `audit`, `bucket-access`, `cross-origin-resource-sharing`, `network-access`, `nfs`, `object-access`, `smb-client`, `smb-share`, and `snapshot`. + log_targets (list[Reference]): List of targets which will be utilized for audit log storage. These may either be file system targets or remote syslog server targets. + """ + if name is not None: + self.name = name + if id is not None: + self.id = id + if enabled is not None: + self.enabled = enabled + if is_local is not None: + self.is_local = is_local + if location is not None: + self.location = location + if policy_type is not None: + self.policy_type = policy_type + if log_targets is not None: + self.log_targets = log_targets + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `AuditFileSystemsPoliciesPost`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(AuditFileSystemsPoliciesPost, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, AuditFileSystemsPoliciesPost): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/audit_file_systems_policies_response.py b/pypureclient/flashblade/FB_2_14/models/audit_file_systems_policies_response.py new file mode 100644 index 000000000..abc676264 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/audit_file_systems_policies_response.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class AuditFileSystemsPoliciesResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'items': 'list[AuditFileSystemsPolicy]' + } + + attribute_map = { + 'items': 'items' + } + + required_args = { + } + + def __init__( + self, + items=None, # type: List[models.AuditFileSystemsPolicy] + ): + """ + Keyword args: + items (list[AuditFileSystemsPolicy]): A list of audit policy objects. + """ + if items is not None: + self.items = items + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `AuditFileSystemsPoliciesResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(AuditFileSystemsPoliciesResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, AuditFileSystemsPoliciesResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/audit_file_systems_policy.py b/pypureclient/flashblade/FB_2_14/models/audit_file_systems_policy.py new file mode 100644 index 000000000..ac09499e3 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/audit_file_systems_policy.py @@ -0,0 +1,147 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class AuditFileSystemsPolicy(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'name': 'str', + 'id': 'str', + 'enabled': 'bool', + 'is_local': 'bool', + 'location': 'FixedReference', + 'policy_type': 'str', + 'log_targets': 'list[Reference]' + } + + attribute_map = { + 'name': 'name', + 'id': 'id', + 'enabled': 'enabled', + 'is_local': 'is_local', + 'location': 'location', + 'policy_type': 'policy_type', + 'log_targets': 'log_targets' + } + + required_args = { + } + + def __init__( + self, + name=None, # type: str + id=None, # type: str + enabled=None, # type: bool + is_local=None, # type: bool + location=None, # type: models.FixedReference + policy_type=None, # type: str + log_targets=None, # type: List[models.Reference] + ): + """ + Keyword args: + name (str): A name chosen by the user. Can be changed. Must be locally unique. + id (str): A non-modifiable, globally unique ID chosen by the system. + enabled (bool): If `true`, the policy is enabled. If not specified, defaults to `true`. + is_local (bool): Whether the policy is defined on the local array. + location (FixedReference): Reference to the array where the policy is defined. + policy_type (str): Type of the policy. Valid values are `audit`, `bucket-access`, `cross-origin-resource-sharing`, `network-access`, `nfs`, `object-access`, `smb-client`, `smb-share`, and `snapshot`. + log_targets (list[Reference]): List of targets which will be utilized for audit log storage. These may either be file system targets or remote syslog server targets. + """ + if name is not None: + self.name = name + if id is not None: + self.id = id + if enabled is not None: + self.enabled = enabled + if is_local is not None: + self.is_local = is_local + if location is not None: + self.location = location + if policy_type is not None: + self.policy_type = policy_type + if log_targets is not None: + self.log_targets = log_targets + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `AuditFileSystemsPolicy`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(AuditFileSystemsPolicy, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, AuditFileSystemsPolicy): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/audit_get_response.py b/pypureclient/flashblade/FB_2_14/models/audit_get_response.py new file mode 100644 index 000000000..f129e60b9 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/audit_get_response.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class AuditGetResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'continuation_token': 'str', + 'total_item_count': 'int', + 'items': 'list[Audit]' + } + + attribute_map = { + 'continuation_token': 'continuation_token', + 'total_item_count': 'total_item_count', + 'items': 'items' + } + + required_args = { + } + + def __init__( + self, + continuation_token=None, # type: str + total_item_count=None, # type: int + items=None, # type: List[models.Audit] + ): + """ + Keyword args: + continuation_token (str): Continuation token that can be provided in the `continuation_token` query param to get the next page of data. If you use the `continuation_token` to page through data you are guaranteed to get all items exactly once regardless of how items are modified. If an item is added or deleted during the pagination then it may or may not be returned. The `continuation_token` is generated if the `limit` is less than the remaining number of items, and the default sort is used (no sort is specified). + total_item_count (int): Total number of items after applying `filter` params. + items (list[Audit]) + """ + if continuation_token is not None: + self.continuation_token = continuation_token + if total_item_count is not None: + self.total_item_count = total_item_count + if items is not None: + self.items = items + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `AuditGetResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(AuditGetResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, AuditGetResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/audit_response.py b/pypureclient/flashblade/FB_2_14/models/audit_response.py new file mode 100644 index 000000000..4ff3e12e6 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/audit_response.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class AuditResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'items': 'list[Audit]' + } + + attribute_map = { + 'items': 'items' + } + + required_args = { + } + + def __init__( + self, + items=None, # type: List[models.Audit] + ): + """ + Keyword args: + items (list[Audit]) + """ + if items is not None: + self.items = items + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `AuditResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(AuditResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, AuditResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/blade.py b/pypureclient/flashblade/FB_2_14/models/blade.py new file mode 100644 index 000000000..7b400af21 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/blade.py @@ -0,0 +1,147 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class Blade(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'name': 'str', + 'id': 'str', + 'details': 'str', + 'progress': 'float', + 'raw_capacity': 'int', + 'status': 'str', + 'target': 'str' + } + + attribute_map = { + 'name': 'name', + 'id': 'id', + 'details': 'details', + 'progress': 'progress', + 'raw_capacity': 'raw_capacity', + 'status': 'status', + 'target': 'target' + } + + required_args = { + } + + def __init__( + self, + name=None, # type: str + id=None, # type: str + details=None, # type: str + progress=None, # type: float + raw_capacity=None, # type: int + status=None, # type: str + target=None, # type: str + ): + """ + Keyword args: + name (str): Name of the object (e.g., a file system or snapshot). + id (str): A non-modifiable, globally unique ID chosen by the system. + details (str) + progress (float) + raw_capacity (int) + status (str): Valid values are `critical`, `evacuated`, `evacuating`, `healthy`, `identifying`, `unhealthy`, `unknown`, and `unused`. + target (str) + """ + if name is not None: + self.name = name + if id is not None: + self.id = id + if details is not None: + self.details = details + if progress is not None: + self.progress = progress + if raw_capacity is not None: + self.raw_capacity = raw_capacity + if status is not None: + self.status = status + if target is not None: + self.target = target + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `Blade`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(Blade, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, Blade): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/blade_get_response.py b/pypureclient/flashblade/FB_2_14/models/blade_get_response.py new file mode 100644 index 000000000..87ed9a1c8 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/blade_get_response.py @@ -0,0 +1,129 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class BladeGetResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'continuation_token': 'str', + 'total_item_count': 'int', + 'total': 'object', + 'items': 'list[Blade]' + } + + attribute_map = { + 'continuation_token': 'continuation_token', + 'total_item_count': 'total_item_count', + 'total': 'total', + 'items': 'items' + } + + required_args = { + } + + def __init__( + self, + continuation_token=None, # type: str + total_item_count=None, # type: int + total=None, # type: object + items=None, # type: List[models.Blade] + ): + """ + Keyword args: + continuation_token (str): Continuation token that can be provided in the `continuation_token` query param to get the next page of data. If you use the `continuation_token` to page through data you are guaranteed to get all items exactly once regardless of how items are modified. If an item is added or deleted during the pagination then it may or may not be returned. The `continuation_token` is generated if the `limit` is less than the remaining number of items, and the default sort is used (no sort is specified). + total_item_count (int): Total number of items after applying `filter` params. + total (object) + items (list[Blade]): A list of blade objects. + """ + if continuation_token is not None: + self.continuation_token = continuation_token + if total_item_count is not None: + self.total_item_count = total_item_count + if total is not None: + self.total = total + if items is not None: + self.items = items + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `BladeGetResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(BladeGetResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, BladeGetResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/bucket.py b/pypureclient/flashblade/FB_2_14/models/bucket.py new file mode 100644 index 000000000..c37a3f882 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/bucket.py @@ -0,0 +1,213 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class Bucket(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'name': 'str', + 'id': 'str', + 'account': 'FixedReference', + 'created': 'int', + 'destroyed': 'bool', + 'object_count': 'int', + 'space': 'Space', + 'time_remaining': 'int', + 'versioning': 'str', + 'bucket_type': 'str', + 'eradication_config': 'BucketEradicationConfig', + 'hard_limit_enabled': 'bool', + 'object_lock_config': 'ObjectLockConfigResponse', + 'quota_limit': 'int', + 'retention_lock': 'str', + 'public_access_config': 'PublicAccessConfig', + 'public_status': 'str', + 'time_remaining_status': 'str' + } + + attribute_map = { + 'name': 'name', + 'id': 'id', + 'account': 'account', + 'created': 'created', + 'destroyed': 'destroyed', + 'object_count': 'object_count', + 'space': 'space', + 'time_remaining': 'time_remaining', + 'versioning': 'versioning', + 'bucket_type': 'bucket_type', + 'eradication_config': 'eradication_config', + 'hard_limit_enabled': 'hard_limit_enabled', + 'object_lock_config': 'object_lock_config', + 'quota_limit': 'quota_limit', + 'retention_lock': 'retention_lock', + 'public_access_config': 'public_access_config', + 'public_status': 'public_status', + 'time_remaining_status': 'time_remaining_status' + } + + required_args = { + } + + def __init__( + self, + name=None, # type: str + id=None, # type: str + account=None, # type: models.FixedReference + created=None, # type: int + destroyed=None, # type: bool + object_count=None, # type: int + space=None, # type: models.Space + time_remaining=None, # type: int + versioning=None, # type: str + bucket_type=None, # type: str + eradication_config=None, # type: models.BucketEradicationConfig + hard_limit_enabled=None, # type: bool + object_lock_config=None, # type: models.ObjectLockConfigResponse + quota_limit=None, # type: int + retention_lock=None, # type: str + public_access_config=None, # type: models.PublicAccessConfig + public_status=None, # type: str + time_remaining_status=None, # type: str + ): + """ + Keyword args: + name (str): Name of the object (e.g., a file system or snapshot). + id (str): A non-modifiable, globally unique ID chosen by the system. + account (FixedReference) + created (int): Creation timestamp of the object. + destroyed (bool): Is the bucket destroyed? + object_count (int): The count of objects within the bucket. + space (Space): The space specification of the bucket. + time_remaining (int): Time in milliseconds before the bucket is eradicated. `null` if not destroyed or legal hold was found or the remaining time until eradication is not known yet. + versioning (str): The versioning state for objects within the bucket. Valid values are `none`, `enabled`, and `suspended`. + bucket_type (str): The bucket type for the bucket. + eradication_config (BucketEradicationConfig) + hard_limit_enabled (bool): If set to `true`, the bucket's size, as defined by `quota_limit`, is used as a hard limit quota. If set to `false`, a hard limit quota will not be applied to the bucket, but soft quota alerts will still be sent if the bucket has a value set for `quota_limit`. + object_lock_config (ObjectLockConfigResponse) + quota_limit (int): The effective quota limit applied against the size of the bucket, displayed in bytes. If unset, the bucket is unlimited in size. + retention_lock (str): If set to `ratcheted`, then `object_lock_config.default_retention_mode` cannot be changed if set to `compliance`. In this case, the value of `object_lock_config.default_retention` can only be increased and `object_lock_config.default_retention_mode` cannot be changed once set to `compliance`. Valid values are `unlocked` and `ratcheted`. Contact Pure Technical Services to change `ratcheted` to `unlocked`. + public_access_config (PublicAccessConfig) + public_status (str): Bucket's public status. Valid values include `bucket-and-objects-not-public`, `only-authorized-users-of-this-account` and `public`. + time_remaining_status (str): Status of the `time_remaining` field. `calculating` means the bucket is `retention-based`, has been destroyed and the `time_remaining` is being calculated by a background process `legal-hold` means the bucket is `retention-based`, has been destroyed and will never be eradicated, because an object with legal hold status was found inside. null otherwise, i.e. when either the bucket is not destroyed or it's destroyed and the `time_remaining` has been determined. + """ + if name is not None: + self.name = name + if id is not None: + self.id = id + if account is not None: + self.account = account + if created is not None: + self.created = created + if destroyed is not None: + self.destroyed = destroyed + if object_count is not None: + self.object_count = object_count + if space is not None: + self.space = space + if time_remaining is not None: + self.time_remaining = time_remaining + if versioning is not None: + self.versioning = versioning + if bucket_type is not None: + self.bucket_type = bucket_type + if eradication_config is not None: + self.eradication_config = eradication_config + if hard_limit_enabled is not None: + self.hard_limit_enabled = hard_limit_enabled + if object_lock_config is not None: + self.object_lock_config = object_lock_config + if quota_limit is not None: + self.quota_limit = quota_limit + if retention_lock is not None: + self.retention_lock = retention_lock + if public_access_config is not None: + self.public_access_config = public_access_config + if public_status is not None: + self.public_status = public_status + if time_remaining_status is not None: + self.time_remaining_status = time_remaining_status + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `Bucket`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(Bucket, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, Bucket): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/bucket_access_policy.py b/pypureclient/flashblade/FB_2_14/models/bucket_access_policy.py new file mode 100644 index 000000000..4cad2e0f9 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/bucket_access_policy.py @@ -0,0 +1,153 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class BucketAccessPolicy(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'name': 'str', + 'id': 'str', + 'enabled': 'bool', + 'is_local': 'bool', + 'location': 'FixedReference', + 'policy_type': 'str', + 'bucket': 'FixedReference', + 'rules': 'list[BucketAccessPolicyRule]' + } + + attribute_map = { + 'name': 'name', + 'id': 'id', + 'enabled': 'enabled', + 'is_local': 'is_local', + 'location': 'location', + 'policy_type': 'policy_type', + 'bucket': 'bucket', + 'rules': 'rules' + } + + required_args = { + } + + def __init__( + self, + name=None, # type: str + id=None, # type: str + enabled=None, # type: bool + is_local=None, # type: bool + location=None, # type: models.FixedReference + policy_type=None, # type: str + bucket=None, # type: models.FixedReference + rules=None, # type: List[models.BucketAccessPolicyRule] + ): + """ + Keyword args: + name (str): Name of the object (e.g., a file system or snapshot). + id (str): A non-modifiable, globally unique ID chosen by the system. + enabled (bool): If `true`, the policy is enabled. If not specified, defaults to `true`. + is_local (bool): Whether the policy is defined on the local array. + location (FixedReference): Reference to the array where the policy is defined. + policy_type (str): Type of the policy. Valid values are `audit`, `bucket-access`, `cross-origin-resource-sharing`, `network-access`, `nfs`, `object-access`, `smb-client`, `smb-share`, and `snapshot`. + bucket (FixedReference): The bucket to which this policy belongs. + rules (list[BucketAccessPolicyRule]) + """ + if name is not None: + self.name = name + if id is not None: + self.id = id + if enabled is not None: + self.enabled = enabled + if is_local is not None: + self.is_local = is_local + if location is not None: + self.location = location + if policy_type is not None: + self.policy_type = policy_type + if bucket is not None: + self.bucket = bucket + if rules is not None: + self.rules = rules + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `BucketAccessPolicy`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(BucketAccessPolicy, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, BucketAccessPolicy): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/bucket_access_policy_get_response.py b/pypureclient/flashblade/FB_2_14/models/bucket_access_policy_get_response.py new file mode 100644 index 000000000..83bccac1d --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/bucket_access_policy_get_response.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class BucketAccessPolicyGetResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'continuation_token': 'str', + 'total_item_count': 'int', + 'items': 'list[BucketAccessPolicy]' + } + + attribute_map = { + 'continuation_token': 'continuation_token', + 'total_item_count': 'total_item_count', + 'items': 'items' + } + + required_args = { + } + + def __init__( + self, + continuation_token=None, # type: str + total_item_count=None, # type: int + items=None, # type: List[models.BucketAccessPolicy] + ): + """ + Keyword args: + continuation_token (str): Continuation token that can be provided in the `continuation_token` query param to get the next page of data. If you use the `continuation_token` to page through data you are guaranteed to get all items exactly once regardless of how items are modified. If an item is added or deleted during the pagination then it may or may not be returned. The `continuation_token` is generated if the `limit` is less than the remaining number of items, and the default sort is used (no sort is specified). + total_item_count (int): Total number of items after applying `filter` params. + items (list[BucketAccessPolicy]): A list of bucket policy objects. + """ + if continuation_token is not None: + self.continuation_token = continuation_token + if total_item_count is not None: + self.total_item_count = total_item_count + if items is not None: + self.items = items + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `BucketAccessPolicyGetResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(BucketAccessPolicyGetResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, BucketAccessPolicyGetResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/bucket_access_policy_post.py b/pypureclient/flashblade/FB_2_14/models/bucket_access_policy_post.py new file mode 100644 index 000000000..a731bcd3e --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/bucket_access_policy_post.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class BucketAccessPolicyPost(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'rules': 'list[BucketAccessPolicyRuleBulkManage]' + } + + attribute_map = { + 'rules': 'rules' + } + + required_args = { + } + + def __init__( + self, + rules=None, # type: List[models.BucketAccessPolicyRuleBulkManage] + ): + """ + Keyword args: + rules (list[BucketAccessPolicyRuleBulkManage]) + """ + if rules is not None: + self.rules = rules + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `BucketAccessPolicyPost`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(BucketAccessPolicyPost, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, BucketAccessPolicyPost): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/bucket_access_policy_response.py b/pypureclient/flashblade/FB_2_14/models/bucket_access_policy_response.py new file mode 100644 index 000000000..10464675b --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/bucket_access_policy_response.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class BucketAccessPolicyResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'items': 'list[BucketAccessPolicy]' + } + + attribute_map = { + 'items': 'items' + } + + required_args = { + } + + def __init__( + self, + items=None, # type: List[models.BucketAccessPolicy] + ): + """ + Keyword args: + items (list[BucketAccessPolicy]): A list of bucket policy objects. + """ + if items is not None: + self.items = items + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `BucketAccessPolicyResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(BucketAccessPolicyResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, BucketAccessPolicyResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/bucket_access_policy_rule.py b/pypureclient/flashblade/FB_2_14/models/bucket_access_policy_rule.py new file mode 100644 index 000000000..be4472c0d --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/bucket_access_policy_rule.py @@ -0,0 +1,141 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class BucketAccessPolicyRule(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'name': 'str', + 'actions': 'list[str]', + 'effect': 'str', + 'principals': 'BucketAccessPolicyRulePrincipal', + 'resources': 'list[str]', + 'policy': 'FixedReference' + } + + attribute_map = { + 'name': 'name', + 'actions': 'actions', + 'effect': 'effect', + 'principals': 'principals', + 'resources': 'resources', + 'policy': 'policy' + } + + required_args = { + } + + def __init__( + self, + name=None, # type: str + actions=None, # type: List[str] + effect=None, # type: str + principals=None, # type: models.BucketAccessPolicyRulePrincipal + resources=None, # type: List[str] + policy=None, # type: models.FixedReference + ): + """ + Keyword args: + name (str): Name of the object (e.g., a file system or snapshot). + actions (list[str]): The list of actions granted by this rule. Each included action may restrict other properties of the rule. The only currently supported action is `s3:GetObject`. + effect (str): Effect of this rule. When `allow`, the rule allows the given actions to be performed on the given resources, subject to the given conditions. The only currently supported effect is `allow`. + principals (BucketAccessPolicyRulePrincipal): The principals to which this rule applies. Currently, only all principals are supported. + resources (list[str]): The list of resources which this rule applies to. The only currently supported resource is all objects in a bucket to which the parent policy belongs. + policy (FixedReference): The policy to which this rule belongs. + """ + if name is not None: + self.name = name + if actions is not None: + self.actions = actions + if effect is not None: + self.effect = effect + if principals is not None: + self.principals = principals + if resources is not None: + self.resources = resources + if policy is not None: + self.policy = policy + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `BucketAccessPolicyRule`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(BucketAccessPolicyRule, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, BucketAccessPolicyRule): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/bucket_access_policy_rule_bulk_manage.py b/pypureclient/flashblade/FB_2_14/models/bucket_access_policy_rule_bulk_manage.py new file mode 100644 index 000000000..14d276d0c --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/bucket_access_policy_rule_bulk_manage.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class BucketAccessPolicyRuleBulkManage(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'actions': 'list[str]', + 'effect': 'str', + 'principals': 'BucketAccessPolicyRulePrincipal', + 'resources': 'list[str]', + 'name': 'str' + } + + attribute_map = { + 'actions': 'actions', + 'effect': 'effect', + 'principals': 'principals', + 'resources': 'resources', + 'name': 'name' + } + + required_args = { + } + + def __init__( + self, + actions=None, # type: List[str] + effect=None, # type: str + principals=None, # type: models.BucketAccessPolicyRulePrincipal + resources=None, # type: List[str] + name=None, # type: str + ): + """ + Keyword args: + actions (list[str]): The list of actions granted by this rule. Each included action may restrict other properties of the rule. The only currently supported action is `s3:GetObject`. + effect (str): Effect of this rule. When `allow`, the rule allows the given actions to be performed on the given resources, subject to the given conditions. The only currently supported effect is `allow`. + principals (BucketAccessPolicyRulePrincipal): The principals to which this rule applies. Currently, only all principals are supported. + resources (list[str]): The list of resources which this rule applies to. The only currently supported resource is all objects in a bucket to which the parent policy belongs. + name (str): Name of the object (e.g., a file system or snapshot). + """ + if actions is not None: + self.actions = actions + if effect is not None: + self.effect = effect + if principals is not None: + self.principals = principals + if resources is not None: + self.resources = resources + if name is not None: + self.name = name + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `BucketAccessPolicyRuleBulkManage`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(BucketAccessPolicyRuleBulkManage, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, BucketAccessPolicyRuleBulkManage): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/bucket_access_policy_rule_get_response.py b/pypureclient/flashblade/FB_2_14/models/bucket_access_policy_rule_get_response.py new file mode 100644 index 000000000..55cfdcc09 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/bucket_access_policy_rule_get_response.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class BucketAccessPolicyRuleGetResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'continuation_token': 'str', + 'total_item_count': 'int', + 'items': 'list[BucketAccessPolicyRule]' + } + + attribute_map = { + 'continuation_token': 'continuation_token', + 'total_item_count': 'total_item_count', + 'items': 'items' + } + + required_args = { + } + + def __init__( + self, + continuation_token=None, # type: str + total_item_count=None, # type: int + items=None, # type: List[models.BucketAccessPolicyRule] + ): + """ + Keyword args: + continuation_token (str): Continuation token that can be provided in the `continuation_token` query param to get the next page of data. If you use the `continuation_token` to page through data you are guaranteed to get all items exactly once regardless of how items are modified. If an item is added or deleted during the pagination then it may or may not be returned. The `continuation_token` is generated if the `limit` is less than the remaining number of items, and the default sort is used (no sort is specified). + total_item_count (int): Total number of items after applying `filter` params. + items (list[BucketAccessPolicyRule]) + """ + if continuation_token is not None: + self.continuation_token = continuation_token + if total_item_count is not None: + self.total_item_count = total_item_count + if items is not None: + self.items = items + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `BucketAccessPolicyRuleGetResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(BucketAccessPolicyRuleGetResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, BucketAccessPolicyRuleGetResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/bucket_access_policy_rule_post.py b/pypureclient/flashblade/FB_2_14/models/bucket_access_policy_rule_post.py new file mode 100644 index 000000000..a0674af8f --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/bucket_access_policy_rule_post.py @@ -0,0 +1,129 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class BucketAccessPolicyRulePost(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'actions': 'list[str]', + 'effect': 'str', + 'principals': 'BucketAccessPolicyRulePrincipal', + 'resources': 'list[str]' + } + + attribute_map = { + 'actions': 'actions', + 'effect': 'effect', + 'principals': 'principals', + 'resources': 'resources' + } + + required_args = { + } + + def __init__( + self, + actions=None, # type: List[str] + effect=None, # type: str + principals=None, # type: models.BucketAccessPolicyRulePrincipal + resources=None, # type: List[str] + ): + """ + Keyword args: + actions (list[str]): The list of actions granted by this rule. Each included action may restrict other properties of the rule. The only currently supported action is `s3:GetObject`. + effect (str): Effect of this rule. When `allow`, the rule allows the given actions to be performed on the given resources, subject to the given conditions. The only currently supported effect is `allow`. + principals (BucketAccessPolicyRulePrincipal): The principals to which this rule applies. Currently, only all principals are supported. + resources (list[str]): The list of resources which this rule applies to. The only currently supported resource is all objects in a bucket to which the parent policy belongs. + """ + if actions is not None: + self.actions = actions + if effect is not None: + self.effect = effect + if principals is not None: + self.principals = principals + if resources is not None: + self.resources = resources + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `BucketAccessPolicyRulePost`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(BucketAccessPolicyRulePost, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, BucketAccessPolicyRulePost): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/bucket_access_policy_rule_principal.py b/pypureclient/flashblade/FB_2_14/models/bucket_access_policy_rule_principal.py new file mode 100644 index 000000000..4f04e4e8a --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/bucket_access_policy_rule_principal.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class BucketAccessPolicyRulePrincipal(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'all': 'bool' + } + + attribute_map = { + 'all': 'all' + } + + required_args = { + } + + def __init__( + self, + all=None, # type: bool + ): + """ + Keyword args: + all (bool): If `true`, the rule will apply to all object store users regardless of their origin or principal. + """ + if all is not None: + self.all = all + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `BucketAccessPolicyRulePrincipal`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(BucketAccessPolicyRulePrincipal, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, BucketAccessPolicyRulePrincipal): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/bucket_access_policy_rule_response.py b/pypureclient/flashblade/FB_2_14/models/bucket_access_policy_rule_response.py new file mode 100644 index 000000000..9fa68c645 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/bucket_access_policy_rule_response.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class BucketAccessPolicyRuleResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'items': 'list[BucketAccessPolicyRule]' + } + + attribute_map = { + 'items': 'items' + } + + required_args = { + } + + def __init__( + self, + items=None, # type: List[models.BucketAccessPolicyRule] + ): + """ + Keyword args: + items (list[BucketAccessPolicyRule]) + """ + if items is not None: + self.items = items + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `BucketAccessPolicyRuleResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(BucketAccessPolicyRuleResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, BucketAccessPolicyRuleResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/bucket_defaults.py b/pypureclient/flashblade/FB_2_14/models/bucket_defaults.py new file mode 100644 index 000000000..0ca9fef2e --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/bucket_defaults.py @@ -0,0 +1,117 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class BucketDefaults(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'hard_limit_enabled': 'bool', + 'quota_limit': 'str' + } + + attribute_map = { + 'hard_limit_enabled': 'hard_limit_enabled', + 'quota_limit': 'quota_limit' + } + + required_args = { + } + + def __init__( + self, + hard_limit_enabled=None, # type: bool + quota_limit=None, # type: str + ): + """ + Keyword args: + hard_limit_enabled (bool): The value of this field will be used to configure the `hard_limit_enabled` field of newly created buckets associated with this object store account, if the bucket creation does not specify its own value. If not specified, defaults to `false`. + quota_limit (str): The value of this field will be used to configure the `quota_limit` field of newly created buckets associated with this object store account, if the bucket creation does not specify its own value. If set to an empty string (`\"\"`), the bucket default is unlimited in size. If not specified, defaults to unlimited. + """ + if hard_limit_enabled is not None: + self.hard_limit_enabled = hard_limit_enabled + if quota_limit is not None: + self.quota_limit = quota_limit + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `BucketDefaults`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(BucketDefaults, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, BucketDefaults): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/bucket_defaults_readonly.py b/pypureclient/flashblade/FB_2_14/models/bucket_defaults_readonly.py new file mode 100644 index 000000000..8a89638c0 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/bucket_defaults_readonly.py @@ -0,0 +1,117 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class BucketDefaultsReadonly(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'hard_limit_enabled': 'bool', + 'quota_limit': 'int' + } + + attribute_map = { + 'hard_limit_enabled': 'hard_limit_enabled', + 'quota_limit': 'quota_limit' + } + + required_args = { + } + + def __init__( + self, + hard_limit_enabled=None, # type: bool + quota_limit=None, # type: int + ): + """ + Keyword args: + hard_limit_enabled (bool): The value of this field will be used to configure the `hard_limit_enabled` field of newly created buckets associated with this object store account, if the bucket creation does not specify its own value. If not specified, defaults to `false`. + quota_limit (int): The value of this field will be used to configure the `quota_limit` field of newly created buckets associated with this object store account, if the bucket creation does not specify its own value. If unset, the bucket default is unlimited in size. + """ + if hard_limit_enabled is not None: + self.hard_limit_enabled = hard_limit_enabled + if quota_limit is not None: + self.quota_limit = quota_limit + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `BucketDefaultsReadonly`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(BucketDefaultsReadonly, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, BucketDefaultsReadonly): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/bucket_eradication_config.py b/pypureclient/flashblade/FB_2_14/models/bucket_eradication_config.py new file mode 100644 index 000000000..60ace59a5 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/bucket_eradication_config.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class BucketEradicationConfig(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'eradication_delay': 'int', + 'manual_eradication': 'str', + 'eradication_mode': 'str' + } + + attribute_map = { + 'eradication_delay': 'eradication_delay', + 'manual_eradication': 'manual_eradication', + 'eradication_mode': 'eradication_mode' + } + + required_args = { + } + + def __init__( + self, + eradication_delay=None, # type: int + manual_eradication=None, # type: str + eradication_mode=None, # type: str + ): + """ + Keyword args: + eradication_delay (int): Minimum eradication delay in milliseconds. Automatically eradicate destroyed buckets after the delay time passes unless automatic eradication is delayed due to other configuration values. + manual_eradication (str): The manual eradication status of the bucket. If `disabled`, the bucket cannot be eradicated after it has been destroyed, unless it is empty. If `enabled`, the bucket can be eradicated. Valid values are `disabled` and `enabled`. + eradication_mode (str): The eradication mode of the bucket. If it's `permission-based` the bucket can be eradicated based on user permissions. If it's `retention-based` the bucket can never be eradicated as long as there are locked objects still being retained. Valid values are `permission-based` and `retention-based`. + """ + if eradication_delay is not None: + self.eradication_delay = eradication_delay + if manual_eradication is not None: + self.manual_eradication = manual_eradication + if eradication_mode is not None: + self.eradication_mode = eradication_mode + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `BucketEradicationConfig`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(BucketEradicationConfig, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, BucketEradicationConfig): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/bucket_get_response.py b/pypureclient/flashblade/FB_2_14/models/bucket_get_response.py new file mode 100644 index 000000000..0654c6977 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/bucket_get_response.py @@ -0,0 +1,129 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class BucketGetResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'continuation_token': 'str', + 'total_item_count': 'int', + 'items': 'list[Bucket]', + 'total': 'Bucket' + } + + attribute_map = { + 'continuation_token': 'continuation_token', + 'total_item_count': 'total_item_count', + 'items': 'items', + 'total': 'total' + } + + required_args = { + } + + def __init__( + self, + continuation_token=None, # type: str + total_item_count=None, # type: int + items=None, # type: List[models.Bucket] + total=None, # type: models.Bucket + ): + """ + Keyword args: + continuation_token (str): Continuation token that can be provided in the `continuation_token` query param to get the next page of data. If you use the `continuation_token` to page through data you are guaranteed to get all items exactly once regardless of how items are modified. If an item is added or deleted during the pagination then it may or may not be returned. The `continuation_token` is generated if the `limit` is less than the remaining number of items, and the default sort is used (no sort is specified). + total_item_count (int): Total number of items after applying `filter` params. + items (list[Bucket]): A list of bucket objects. + total (Bucket) + """ + if continuation_token is not None: + self.continuation_token = continuation_token + if total_item_count is not None: + self.total_item_count = total_item_count + if items is not None: + self.items = items + if total is not None: + self.total = total + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `BucketGetResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(BucketGetResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, BucketGetResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/bucket_patch.py b/pypureclient/flashblade/FB_2_14/models/bucket_patch.py new file mode 100644 index 000000000..f90524369 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/bucket_patch.py @@ -0,0 +1,153 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class BucketPatch(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'destroyed': 'bool', + 'hard_limit_enabled': 'bool', + 'object_lock_config': 'ObjectLockConfigRequestBody', + 'quota_limit': 'str', + 'retention_lock': 'str', + 'versioning': 'str', + 'public_access_config': 'PublicAccessConfig', + 'eradication_config': 'BucketEradicationConfig' + } + + attribute_map = { + 'destroyed': 'destroyed', + 'hard_limit_enabled': 'hard_limit_enabled', + 'object_lock_config': 'object_lock_config', + 'quota_limit': 'quota_limit', + 'retention_lock': 'retention_lock', + 'versioning': 'versioning', + 'public_access_config': 'public_access_config', + 'eradication_config': 'eradication_config' + } + + required_args = { + } + + def __init__( + self, + destroyed=None, # type: bool + hard_limit_enabled=None, # type: bool + object_lock_config=None, # type: models.ObjectLockConfigRequestBody + quota_limit=None, # type: str + retention_lock=None, # type: str + versioning=None, # type: str + public_access_config=None, # type: models.PublicAccessConfig + eradication_config=None, # type: models.BucketEradicationConfig + ): + """ + Keyword args: + destroyed (bool): Is the bucket destroyed? + hard_limit_enabled (bool): If set to `true`, the bucket's size, as defined by `quota_limit`, is used as a hard limit quota. If set to `false`, a hard limit quota will not be applied to the bucket, but soft quota alerts will still be sent if the bucket has a value set for `quota_limit`. + object_lock_config (ObjectLockConfigRequestBody) + quota_limit (str): The effective quota limit applied against the size of the bucket, displayed in bytes. If set to an empty string (`\"\"`), the bucket is unlimited in size. + retention_lock (str): If set to `ratcheted`, then `object_lock_config.default_retention_mode` cannot be changed if set to `compliance`. In this case, the value of `object_lock_config.default_retention` can only be increased and `object_lock_config.default_retention_mode` cannot be changed once set to `compliance`. Valid values are `unlocked` and `ratcheted`. Contact Pure Technical Services to change `ratcheted` to `unlocked`. + versioning (str): The versioning state for objects within the bucket. Valid values are `none`, `enabled`, and `suspended`. + public_access_config (PublicAccessConfig) + eradication_config (BucketEradicationConfig) + """ + if destroyed is not None: + self.destroyed = destroyed + if hard_limit_enabled is not None: + self.hard_limit_enabled = hard_limit_enabled + if object_lock_config is not None: + self.object_lock_config = object_lock_config + if quota_limit is not None: + self.quota_limit = quota_limit + if retention_lock is not None: + self.retention_lock = retention_lock + if versioning is not None: + self.versioning = versioning + if public_access_config is not None: + self.public_access_config = public_access_config + if eradication_config is not None: + self.eradication_config = eradication_config + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `BucketPatch`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(BucketPatch, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, BucketPatch): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/bucket_performance.py b/pypureclient/flashblade/FB_2_14/models/bucket_performance.py new file mode 100644 index 000000000..9918303d1 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/bucket_performance.py @@ -0,0 +1,222 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class BucketPerformance(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'name': 'str', + 'id': 'str', + 'bytes_per_op': 'float', + 'bytes_per_read': 'float', + 'bytes_per_write': 'float', + 'others_per_sec': 'float', + 'read_bytes_per_sec': 'float', + 'reads_per_sec': 'float', + 'time': 'int', + 'usec_per_other_op': 'float', + 'usec_per_read_op': 'float', + 'usec_per_write_op': 'float', + 'write_bytes_per_sec': 'float', + 'writes_per_sec': 'float' + } + + attribute_map = { + 'name': 'name', + 'id': 'id', + 'bytes_per_op': 'bytes_per_op', + 'bytes_per_read': 'bytes_per_read', + 'bytes_per_write': 'bytes_per_write', + 'others_per_sec': 'others_per_sec', + 'read_bytes_per_sec': 'read_bytes_per_sec', + 'reads_per_sec': 'reads_per_sec', + 'time': 'time', + 'usec_per_other_op': 'usec_per_other_op', + 'usec_per_read_op': 'usec_per_read_op', + 'usec_per_write_op': 'usec_per_write_op', + 'write_bytes_per_sec': 'write_bytes_per_sec', + 'writes_per_sec': 'writes_per_sec' + } + + required_args = { + } + + def __init__( + self, + name=None, # type: str + id=None, # type: str + bytes_per_op=None, # type: float + bytes_per_read=None, # type: float + bytes_per_write=None, # type: float + others_per_sec=None, # type: float + read_bytes_per_sec=None, # type: float + reads_per_sec=None, # type: float + time=None, # type: int + usec_per_other_op=None, # type: float + usec_per_read_op=None, # type: float + usec_per_write_op=None, # type: float + write_bytes_per_sec=None, # type: float + writes_per_sec=None, # type: float + ): + """ + Keyword args: + name (str): Name of the object (e.g., a file system or snapshot). + id (str): A non-modifiable, globally unique ID chosen by the system. + bytes_per_op (float): Average operation size (read bytes+write bytes/read ops+write ops). + bytes_per_read (float): Average read size in bytes per read operation. + bytes_per_write (float): Average write size in bytes per write operation. + others_per_sec (float): Other operations processed per second. + read_bytes_per_sec (float): Bytes read per second. + reads_per_sec (float): Read requests processed per second. + time (int): Sample time in milliseconds since UNIX epoch. + usec_per_other_op (float): Average time, measured in microseconds, it takes the array to process other operations. + usec_per_read_op (float): Average time, measured in microseconds, it takes the array to process a read request. + usec_per_write_op (float): Average time, measured in microseconds, it takes the array to process a write request. + write_bytes_per_sec (float): Bytes written per second. + writes_per_sec (float): Write requests processed per second. + """ + if name is not None: + self.name = name + if id is not None: + self.id = id + if bytes_per_op is not None: + self.bytes_per_op = bytes_per_op + if bytes_per_read is not None: + self.bytes_per_read = bytes_per_read + if bytes_per_write is not None: + self.bytes_per_write = bytes_per_write + if others_per_sec is not None: + self.others_per_sec = others_per_sec + if read_bytes_per_sec is not None: + self.read_bytes_per_sec = read_bytes_per_sec + if reads_per_sec is not None: + self.reads_per_sec = reads_per_sec + if time is not None: + self.time = time + if usec_per_other_op is not None: + self.usec_per_other_op = usec_per_other_op + if usec_per_read_op is not None: + self.usec_per_read_op = usec_per_read_op + if usec_per_write_op is not None: + self.usec_per_write_op = usec_per_write_op + if write_bytes_per_sec is not None: + self.write_bytes_per_sec = write_bytes_per_sec + if writes_per_sec is not None: + self.writes_per_sec = writes_per_sec + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `BucketPerformance`".format(key)) + if key == "bytes_per_op" and value is not None: + if value < 0.0: + raise ValueError("Invalid value for `bytes_per_op`, must be a value greater than or equal to `0.0`") + if key == "bytes_per_read" and value is not None: + if value < 0.0: + raise ValueError("Invalid value for `bytes_per_read`, must be a value greater than or equal to `0.0`") + if key == "bytes_per_write" and value is not None: + if value < 0.0: + raise ValueError("Invalid value for `bytes_per_write`, must be a value greater than or equal to `0.0`") + if key == "others_per_sec" and value is not None: + if value < 0.0: + raise ValueError("Invalid value for `others_per_sec`, must be a value greater than or equal to `0.0`") + if key == "read_bytes_per_sec" and value is not None: + if value < 0.0: + raise ValueError("Invalid value for `read_bytes_per_sec`, must be a value greater than or equal to `0.0`") + if key == "reads_per_sec" and value is not None: + if value < 0.0: + raise ValueError("Invalid value for `reads_per_sec`, must be a value greater than or equal to `0.0`") + if key == "usec_per_other_op" and value is not None: + if value < 0.0: + raise ValueError("Invalid value for `usec_per_other_op`, must be a value greater than or equal to `0.0`") + if key == "usec_per_read_op" and value is not None: + if value < 0.0: + raise ValueError("Invalid value for `usec_per_read_op`, must be a value greater than or equal to `0.0`") + if key == "usec_per_write_op" and value is not None: + if value < 0.0: + raise ValueError("Invalid value for `usec_per_write_op`, must be a value greater than or equal to `0.0`") + if key == "write_bytes_per_sec" and value is not None: + if value < 0.0: + raise ValueError("Invalid value for `write_bytes_per_sec`, must be a value greater than or equal to `0.0`") + if key == "writes_per_sec" and value is not None: + if value < 0.0: + raise ValueError("Invalid value for `writes_per_sec`, must be a value greater than or equal to `0.0`") + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(BucketPerformance, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, BucketPerformance): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/bucket_performance_get_response.py b/pypureclient/flashblade/FB_2_14/models/bucket_performance_get_response.py new file mode 100644 index 000000000..86bdabd6a --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/bucket_performance_get_response.py @@ -0,0 +1,129 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class BucketPerformanceGetResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'continuation_token': 'str', + 'total_item_count': 'int', + 'items': 'list[BucketPerformance]', + 'total': 'list[BucketPerformance]' + } + + attribute_map = { + 'continuation_token': 'continuation_token', + 'total_item_count': 'total_item_count', + 'items': 'items', + 'total': 'total' + } + + required_args = { + } + + def __init__( + self, + continuation_token=None, # type: str + total_item_count=None, # type: int + items=None, # type: List[models.BucketPerformance] + total=None, # type: List[models.BucketPerformance] + ): + """ + Keyword args: + continuation_token (str): Continuation token that can be provided in the `continuation_token` query param to get the next page of data. If you use the `continuation_token` to page through data you are guaranteed to get all items exactly once regardless of how items are modified. If an item is added or deleted during the pagination then it may or may not be returned. The `continuation_token` is generated if the `limit` is less than the remaining number of items, and the default sort is used (no sort is specified). + total_item_count (int): Total number of items after applying `filter` params. + items (list[BucketPerformance]): A list of bucket performance objects. + total (list[BucketPerformance]): Total of all records after filtering. If `total_only` query param is `true`, then no items will be returned. + """ + if continuation_token is not None: + self.continuation_token = continuation_token + if total_item_count is not None: + self.total_item_count = total_item_count + if items is not None: + self.items = items + if total is not None: + self.total = total + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `BucketPerformanceGetResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(BucketPerformanceGetResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, BucketPerformanceGetResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/bucket_post.py b/pypureclient/flashblade/FB_2_14/models/bucket_post.py new file mode 100644 index 000000000..5fbb016d4 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/bucket_post.py @@ -0,0 +1,147 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class BucketPost(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'account': 'ReferenceWritable', + 'bucket_type': 'str', + 'hard_limit_enabled': 'bool', + 'object_lock_config': 'ObjectLockConfigRequestBody', + 'quota_limit': 'str', + 'retention_lock': 'str', + 'eradication_config': 'BucketEradicationConfig' + } + + attribute_map = { + 'account': 'account', + 'bucket_type': 'bucket_type', + 'hard_limit_enabled': 'hard_limit_enabled', + 'object_lock_config': 'object_lock_config', + 'quota_limit': 'quota_limit', + 'retention_lock': 'retention_lock', + 'eradication_config': 'eradication_config' + } + + required_args = { + } + + def __init__( + self, + account=None, # type: models.ReferenceWritable + bucket_type=None, # type: str + hard_limit_enabled=None, # type: bool + object_lock_config=None, # type: models.ObjectLockConfigRequestBody + quota_limit=None, # type: str + retention_lock=None, # type: str + eradication_config=None, # type: models.BucketEradicationConfig + ): + """ + Keyword args: + account (ReferenceWritable): The account name for bucket creation. + bucket_type (str): The bucket type for the bucket. Valid values are `classic`, and `multi-site-writable`. Default value is `multi-site-writable`. + hard_limit_enabled (bool): If set to `true`, the bucket's size, as defined by `quota_limit`, is used as a hard limit quota. If set to `false`, a hard limit quota will not be applied to the bucket, but soft quota alerts will still be sent if the bucket has a value set for `quota_limit`. If not specified, defaults to the value of `bucket_defaults.hard_limit_enabled` of the object store account this bucket is associated with. + object_lock_config (ObjectLockConfigRequestBody) + quota_limit (str): The effective quota limit applied against the size of the bucket, displayed in bytes. If set to an empty string (`\"\"`), the bucket is unlimited in size. If not specified, defaults to the value of `bucket_defaults.quota_limit` of the object store account this bucket is associated with. + retention_lock (str): If set to `ratcheted`, then `object_lock_config.default_retention_mode` cannot be changed if set to `compliance`. In this case, the value of `object_lock_config.default_retention` can only be increased and `object_lock_config.default_retention_mode` cannot be changed once set to `compliance`. Valid values are `unlocked` and `ratcheted`. If not specified, defaults to `unlocked`. + eradication_config (BucketEradicationConfig) + """ + if account is not None: + self.account = account + if bucket_type is not None: + self.bucket_type = bucket_type + if hard_limit_enabled is not None: + self.hard_limit_enabled = hard_limit_enabled + if object_lock_config is not None: + self.object_lock_config = object_lock_config + if quota_limit is not None: + self.quota_limit = quota_limit + if retention_lock is not None: + self.retention_lock = retention_lock + if eradication_config is not None: + self.eradication_config = eradication_config + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `BucketPost`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(BucketPost, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, BucketPost): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/bucket_replica_link.py b/pypureclient/flashblade/FB_2_14/models/bucket_replica_link.py new file mode 100644 index 000000000..aab301b22 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/bucket_replica_link.py @@ -0,0 +1,183 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class BucketReplicaLink(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'id': 'str', + 'direction': 'Direction', + 'lag': 'int', + 'status_details': 'str', + 'local_bucket': 'FixedReference', + 'paused': 'bool', + 'recovery_point': 'int', + 'remote': 'FixedReference', + 'remote_bucket': 'FixedReferenceNameOnly', + 'remote_credentials': 'ReferenceWritable', + 'status': 'str', + 'cascading_enabled': 'bool', + 'object_backlog': 'ObjectBacklog' + } + + attribute_map = { + 'id': 'id', + 'direction': 'direction', + 'lag': 'lag', + 'status_details': 'status_details', + 'local_bucket': 'local_bucket', + 'paused': 'paused', + 'recovery_point': 'recovery_point', + 'remote': 'remote', + 'remote_bucket': 'remote_bucket', + 'remote_credentials': 'remote_credentials', + 'status': 'status', + 'cascading_enabled': 'cascading_enabled', + 'object_backlog': 'object_backlog' + } + + required_args = { + } + + def __init__( + self, + id=None, # type: str + direction=None, # type: models.Direction + lag=None, # type: int + status_details=None, # type: str + local_bucket=None, # type: models.FixedReference + paused=None, # type: bool + recovery_point=None, # type: int + remote=None, # type: models.FixedReference + remote_bucket=None, # type: models.FixedReferenceNameOnly + remote_credentials=None, # type: models.ReferenceWritable + status=None, # type: str + cascading_enabled=None, # type: bool + object_backlog=None, # type: models.ObjectBacklog + ): + """ + Keyword args: + id (str): A non-modifiable, globally unique ID chosen by the system. + direction (Direction) + lag (int): Duration in milliseconds that represents how far behind the replication target is from the source. This is the time difference between current time and `recovery_point`. + status_details (str): Detailed information about the status of the replica link when it is unhealthy. + local_bucket (FixedReference): Reference to a local bucket. + paused (bool): Is the replica link paused? + recovery_point (int): Time, in milliseconds since UNIX epoch, where all object changes before this time are guaranteed to have been replicated. Changes after this time may have been replicated. + remote (FixedReference): Reference to the associated remote, which can either be a `target` or remote `array`. If it is an `array`, then the `resource-type` field will not be populated. + remote_bucket (FixedReferenceNameOnly): Reference to a remote bucket. + remote_credentials (ReferenceWritable): Reference to a remote-credentials object to access the remote bucket. + status (str): Status of the replica link. Values include `replicating`, `paused`, and `unhealthy`. + cascading_enabled (bool): If set to `true`, objects replicated to this bucket via a replica link from another array will also be replicated by this link to the remote bucket. Defaults to `false`. + object_backlog (ObjectBacklog): The number of pending operations and their size that are currently in the backlog. + """ + if id is not None: + self.id = id + if direction is not None: + self.direction = direction + if lag is not None: + self.lag = lag + if status_details is not None: + self.status_details = status_details + if local_bucket is not None: + self.local_bucket = local_bucket + if paused is not None: + self.paused = paused + if recovery_point is not None: + self.recovery_point = recovery_point + if remote is not None: + self.remote = remote + if remote_bucket is not None: + self.remote_bucket = remote_bucket + if remote_credentials is not None: + self.remote_credentials = remote_credentials + if status is not None: + self.status = status + if cascading_enabled is not None: + self.cascading_enabled = cascading_enabled + if object_backlog is not None: + self.object_backlog = object_backlog + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `BucketReplicaLink`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(BucketReplicaLink, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, BucketReplicaLink): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/bucket_replica_link_get_response.py b/pypureclient/flashblade/FB_2_14/models/bucket_replica_link_get_response.py new file mode 100644 index 000000000..3e3046b46 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/bucket_replica_link_get_response.py @@ -0,0 +1,129 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class BucketReplicaLinkGetResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'continuation_token': 'str', + 'total_item_count': 'int', + 'items': 'list[BucketReplicaLink]', + 'total': 'BucketReplicaLink' + } + + attribute_map = { + 'continuation_token': 'continuation_token', + 'total_item_count': 'total_item_count', + 'items': 'items', + 'total': 'total' + } + + required_args = { + } + + def __init__( + self, + continuation_token=None, # type: str + total_item_count=None, # type: int + items=None, # type: List[models.BucketReplicaLink] + total=None, # type: models.BucketReplicaLink + ): + """ + Keyword args: + continuation_token (str): Continuation token that can be provided in the `continuation_token` query param to get the next page of data. If you use the `continuation_token` to page through data you are guaranteed to get all items exactly once regardless of how items are modified. If an item is added or deleted during the pagination then it may or may not be returned. The `continuation_token` is generated if the `limit` is less than the remaining number of items, and the default sort is used (no sort is specified). + total_item_count (int): Total number of items after applying `filter` params. + items (list[BucketReplicaLink]): A list of object store bucket replica link objects. + total (BucketReplicaLink): If `total_only` query param is `true`, then it will be a total of all records after filtering and no items will be returned. If `total_only` is `false`, then it will be a total of all records on this page. + """ + if continuation_token is not None: + self.continuation_token = continuation_token + if total_item_count is not None: + self.total_item_count = total_item_count + if items is not None: + self.items = items + if total is not None: + self.total = total + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `BucketReplicaLinkGetResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(BucketReplicaLinkGetResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, BucketReplicaLinkGetResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/bucket_replica_link_post.py b/pypureclient/flashblade/FB_2_14/models/bucket_replica_link_post.py new file mode 100644 index 000000000..f714cc7a3 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/bucket_replica_link_post.py @@ -0,0 +1,117 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class BucketReplicaLinkPost(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'paused': 'bool', + 'cascading_enabled': 'bool' + } + + attribute_map = { + 'paused': 'paused', + 'cascading_enabled': 'cascading_enabled' + } + + required_args = { + } + + def __init__( + self, + paused=None, # type: bool + cascading_enabled=None, # type: bool + ): + """ + Keyword args: + paused (bool): Create link in the paused state? Defaults to `false`. + cascading_enabled (bool): If set to `true`, objects replicated to this bucket via a replica link from another array will also be replicated by this link to the remote bucket. Defaults to `false`. + """ + if paused is not None: + self.paused = paused + if cascading_enabled is not None: + self.cascading_enabled = cascading_enabled + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `BucketReplicaLinkPost`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(BucketReplicaLinkPost, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, BucketReplicaLinkPost): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/bucket_replica_link_response.py b/pypureclient/flashblade/FB_2_14/models/bucket_replica_link_response.py new file mode 100644 index 000000000..d7a8924b0 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/bucket_replica_link_response.py @@ -0,0 +1,117 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class BucketReplicaLinkResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'items': 'list[BucketReplicaLink]', + 'total': 'BucketReplicaLink' + } + + attribute_map = { + 'items': 'items', + 'total': 'total' + } + + required_args = { + } + + def __init__( + self, + items=None, # type: List[models.BucketReplicaLink] + total=None, # type: models.BucketReplicaLink + ): + """ + Keyword args: + items (list[BucketReplicaLink]): A list of object store bucket replica link objects. + total (BucketReplicaLink): If `total_only` query param is `true`, then it will be a total of all records after filtering and no items will be returned. If `total_only` is `false`, then it will be a total of all records on this page. + """ + if items is not None: + self.items = items + if total is not None: + self.total = total + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `BucketReplicaLinkResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(BucketReplicaLinkResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, BucketReplicaLinkResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/bucket_response.py b/pypureclient/flashblade/FB_2_14/models/bucket_response.py new file mode 100644 index 000000000..fd9c4e061 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/bucket_response.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class BucketResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'items': 'list[Bucket]' + } + + attribute_map = { + 'items': 'items' + } + + required_args = { + } + + def __init__( + self, + items=None, # type: List[models.Bucket] + ): + """ + Keyword args: + items (list[Bucket]): A list of bucket objects. + """ + if items is not None: + self.items = items + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `BucketResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(BucketResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, BucketResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/bucket_s3_specific_performance.py b/pypureclient/flashblade/FB_2_14/models/bucket_s3_specific_performance.py new file mode 100644 index 000000000..353e4b20e --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/bucket_s3_specific_performance.py @@ -0,0 +1,213 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class BucketS3SpecificPerformance(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'name': 'str', + 'id': 'str', + 'others_per_sec': 'float', + 'read_buckets_per_sec': 'float', + 'read_objects_per_sec': 'float', + 'write_buckets_per_sec': 'float', + 'write_objects_per_sec': 'float', + 'time': 'int', + 'usec_per_other_op': 'float', + 'usec_per_read_bucket_op': 'float', + 'usec_per_read_object_op': 'float', + 'usec_per_write_bucket_op': 'float', + 'usec_per_write_object_op': 'float' + } + + attribute_map = { + 'name': 'name', + 'id': 'id', + 'others_per_sec': 'others_per_sec', + 'read_buckets_per_sec': 'read_buckets_per_sec', + 'read_objects_per_sec': 'read_objects_per_sec', + 'write_buckets_per_sec': 'write_buckets_per_sec', + 'write_objects_per_sec': 'write_objects_per_sec', + 'time': 'time', + 'usec_per_other_op': 'usec_per_other_op', + 'usec_per_read_bucket_op': 'usec_per_read_bucket_op', + 'usec_per_read_object_op': 'usec_per_read_object_op', + 'usec_per_write_bucket_op': 'usec_per_write_bucket_op', + 'usec_per_write_object_op': 'usec_per_write_object_op' + } + + required_args = { + } + + def __init__( + self, + name=None, # type: str + id=None, # type: str + others_per_sec=None, # type: float + read_buckets_per_sec=None, # type: float + read_objects_per_sec=None, # type: float + write_buckets_per_sec=None, # type: float + write_objects_per_sec=None, # type: float + time=None, # type: int + usec_per_other_op=None, # type: float + usec_per_read_bucket_op=None, # type: float + usec_per_read_object_op=None, # type: float + usec_per_write_bucket_op=None, # type: float + usec_per_write_object_op=None, # type: float + ): + """ + Keyword args: + name (str): Name of the object (e.g., a file system or snapshot). + id (str): A non-modifiable, globally unique ID chosen by the system. + others_per_sec (float): Other operations processed per second. + read_buckets_per_sec (float): Read buckets requests processed per second. + read_objects_per_sec (float): Read object requests processed per second. + write_buckets_per_sec (float): Write buckets requests processed per second. + write_objects_per_sec (float): Write object requests processed per second. + time (int): Sample time in milliseconds since UNIX epoch. + usec_per_other_op (float): Average time, measured in microseconds, it takes the array to process other operations. + usec_per_read_bucket_op (float): Average time, measured in microseconds, it takes the array to process a read bucket request. + usec_per_read_object_op (float): Average time, measured in microseconds, it takes the array to process a read object request. + usec_per_write_bucket_op (float): Average time, measured in microseconds, it takes the array to process a write bucket request. + usec_per_write_object_op (float): Average time, measured in microseconds, it takes the array to process a write object request. + """ + if name is not None: + self.name = name + if id is not None: + self.id = id + if others_per_sec is not None: + self.others_per_sec = others_per_sec + if read_buckets_per_sec is not None: + self.read_buckets_per_sec = read_buckets_per_sec + if read_objects_per_sec is not None: + self.read_objects_per_sec = read_objects_per_sec + if write_buckets_per_sec is not None: + self.write_buckets_per_sec = write_buckets_per_sec + if write_objects_per_sec is not None: + self.write_objects_per_sec = write_objects_per_sec + if time is not None: + self.time = time + if usec_per_other_op is not None: + self.usec_per_other_op = usec_per_other_op + if usec_per_read_bucket_op is not None: + self.usec_per_read_bucket_op = usec_per_read_bucket_op + if usec_per_read_object_op is not None: + self.usec_per_read_object_op = usec_per_read_object_op + if usec_per_write_bucket_op is not None: + self.usec_per_write_bucket_op = usec_per_write_bucket_op + if usec_per_write_object_op is not None: + self.usec_per_write_object_op = usec_per_write_object_op + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `BucketS3SpecificPerformance`".format(key)) + if key == "others_per_sec" and value is not None: + if value < 0.0: + raise ValueError("Invalid value for `others_per_sec`, must be a value greater than or equal to `0.0`") + if key == "read_buckets_per_sec" and value is not None: + if value < 0.0: + raise ValueError("Invalid value for `read_buckets_per_sec`, must be a value greater than or equal to `0.0`") + if key == "read_objects_per_sec" and value is not None: + if value < 0.0: + raise ValueError("Invalid value for `read_objects_per_sec`, must be a value greater than or equal to `0.0`") + if key == "write_buckets_per_sec" and value is not None: + if value < 0.0: + raise ValueError("Invalid value for `write_buckets_per_sec`, must be a value greater than or equal to `0.0`") + if key == "write_objects_per_sec" and value is not None: + if value < 0.0: + raise ValueError("Invalid value for `write_objects_per_sec`, must be a value greater than or equal to `0.0`") + if key == "usec_per_other_op" and value is not None: + if value < 0.0: + raise ValueError("Invalid value for `usec_per_other_op`, must be a value greater than or equal to `0.0`") + if key == "usec_per_read_bucket_op" and value is not None: + if value < 0.0: + raise ValueError("Invalid value for `usec_per_read_bucket_op`, must be a value greater than or equal to `0.0`") + if key == "usec_per_read_object_op" and value is not None: + if value < 0.0: + raise ValueError("Invalid value for `usec_per_read_object_op`, must be a value greater than or equal to `0.0`") + if key == "usec_per_write_bucket_op" and value is not None: + if value < 0.0: + raise ValueError("Invalid value for `usec_per_write_bucket_op`, must be a value greater than or equal to `0.0`") + if key == "usec_per_write_object_op" and value is not None: + if value < 0.0: + raise ValueError("Invalid value for `usec_per_write_object_op`, must be a value greater than or equal to `0.0`") + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(BucketS3SpecificPerformance, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, BucketS3SpecificPerformance): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/bucket_s3_specific_performance_get_resp.py b/pypureclient/flashblade/FB_2_14/models/bucket_s3_specific_performance_get_resp.py new file mode 100644 index 000000000..6e5c02368 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/bucket_s3_specific_performance_get_resp.py @@ -0,0 +1,129 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class BucketS3SpecificPerformanceGetResp(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'continuation_token': 'str', + 'total_item_count': 'int', + 'items': 'list[BucketS3SpecificPerformance]', + 'total': 'list[BucketS3SpecificPerformance]' + } + + attribute_map = { + 'continuation_token': 'continuation_token', + 'total_item_count': 'total_item_count', + 'items': 'items', + 'total': 'total' + } + + required_args = { + } + + def __init__( + self, + continuation_token=None, # type: str + total_item_count=None, # type: int + items=None, # type: List[models.BucketS3SpecificPerformance] + total=None, # type: List[models.BucketS3SpecificPerformance] + ): + """ + Keyword args: + continuation_token (str): Continuation token that can be provided in the `continuation_token` query param to get the next page of data. If you use the `continuation_token` to page through data you are guaranteed to get all items exactly once regardless of how items are modified. If an item is added or deleted during the pagination then it may or may not be returned. The `continuation_token` is generated if the `limit` is less than the remaining number of items, and the default sort is used (no sort is specified). + total_item_count (int): Total number of items after applying `filter` params. + items (list[BucketS3SpecificPerformance]): A list of S3 specific bucket performance metrics objects. + total (list[BucketS3SpecificPerformance]): Total of all records after filtering. If `total_only` query param is `true`, then no items will be returned. + """ + if continuation_token is not None: + self.continuation_token = continuation_token + if total_item_count is not None: + self.total_item_count = total_item_count + if items is not None: + self.items = items + if total is not None: + self.total = total + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `BucketS3SpecificPerformanceGetResp`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(BucketS3SpecificPerformanceGetResp, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, BucketS3SpecificPerformanceGetResp): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/built_in.py b/pypureclient/flashblade/FB_2_14/models/built_in.py new file mode 100644 index 000000000..968a6fa63 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/built_in.py @@ -0,0 +1,117 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class BuiltIn(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'name': 'str', + 'id': 'str' + } + + attribute_map = { + 'name': 'name', + 'id': 'id' + } + + required_args = { + } + + def __init__( + self, + name=None, # type: str + id=None, # type: str + ): + """ + Keyword args: + name (str): Name of the object (e.g., a file system or snapshot). + id (str): A non-modifiable, globally unique ID chosen by the system. + """ + if name is not None: + self.name = name + if id is not None: + self.id = id + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `BuiltIn`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(BuiltIn, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, BuiltIn): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/built_in_no_id.py b/pypureclient/flashblade/FB_2_14/models/built_in_no_id.py new file mode 100644 index 000000000..d3d86e4bc --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/built_in_no_id.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class BuiltInNoId(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'name': 'str' + } + + attribute_map = { + 'name': 'name' + } + + required_args = { + } + + def __init__( + self, + name=None, # type: str + ): + """ + Keyword args: + name (str): Name of the object (e.g., a file system or snapshot). + """ + if name is not None: + self.name = name + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `BuiltInNoId`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(BuiltInNoId, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, BuiltInNoId): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/built_in_relationship.py b/pypureclient/flashblade/FB_2_14/models/built_in_relationship.py new file mode 100644 index 000000000..9e5348974 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/built_in_relationship.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class BuiltInRelationship(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'id': 'str' + } + + attribute_map = { + 'id': 'id' + } + + required_args = { + } + + def __init__( + self, + id=None, # type: str + ): + """ + Keyword args: + id (str): A non-modifiable, globally unique ID chosen by the system. + """ + if id is not None: + self.id = id + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `BuiltInRelationship`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(BuiltInRelationship, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, BuiltInRelationship): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/certificate.py b/pypureclient/flashblade/FB_2_14/models/certificate.py new file mode 100644 index 000000000..69a0db71d --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/certificate.py @@ -0,0 +1,219 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class Certificate(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'name': 'str', + 'id': 'str', + 'certificate': 'str', + 'certificate_type': 'str', + 'common_name': 'str', + 'country': 'str', + 'email': 'str', + 'intermediate_certificate': 'str', + 'issued_by': 'str', + 'issued_to': 'str', + 'key_size': 'int', + 'locality': 'str', + 'organization': 'str', + 'organizational_unit': 'str', + 'state': 'str', + 'status': 'str', + 'subject_alternative_names': 'list[str]', + 'valid_from': 'str', + 'valid_to': 'str' + } + + attribute_map = { + 'name': 'name', + 'id': 'id', + 'certificate': 'certificate', + 'certificate_type': 'certificate_type', + 'common_name': 'common_name', + 'country': 'country', + 'email': 'email', + 'intermediate_certificate': 'intermediate_certificate', + 'issued_by': 'issued_by', + 'issued_to': 'issued_to', + 'key_size': 'key_size', + 'locality': 'locality', + 'organization': 'organization', + 'organizational_unit': 'organizational_unit', + 'state': 'state', + 'status': 'status', + 'subject_alternative_names': 'subject_alternative_names', + 'valid_from': 'valid_from', + 'valid_to': 'valid_to' + } + + required_args = { + } + + def __init__( + self, + name=None, # type: str + id=None, # type: str + certificate=None, # type: str + certificate_type=None, # type: str + common_name=None, # type: str + country=None, # type: str + email=None, # type: str + intermediate_certificate=None, # type: str + issued_by=None, # type: str + issued_to=None, # type: str + key_size=None, # type: int + locality=None, # type: str + organization=None, # type: str + organizational_unit=None, # type: str + state=None, # type: str + status=None, # type: str + subject_alternative_names=None, # type: List[str] + valid_from=None, # type: str + valid_to=None, # type: str + ): + """ + Keyword args: + name (str): Name of the object (e.g., a file system or snapshot). + id (str): A non-modifiable, globally unique ID chosen by the system. + certificate (str): The text of the certificate. + certificate_type (str): The type of certificate. Possible values are `appliance` and `external`. Certificates of type `appliance` are used by the array to verify its identity to clients. Certificates of type `external` are used by the array to identify external servers to which it is configured to communicate. + common_name (str): FQDN or management IP address of the current array. + country (str): The country field listed in the certificate. + email (str): The email field listed in the certificate. + intermediate_certificate (str): Intermediate certificate chains. + issued_by (str): Who issued this certificate. + issued_to (str): Who this certificate was issued to. + key_size (int): The size of the private key for this certificate in bits. + locality (str): The locality field listed in the certificate. + organization (str): The organization field listed in the certificate. + organizational_unit (str): The organizational unit field listed in the certificate. + state (str): The state/province field listed in the certificate. + status (str): The type of certificate. Valid values are `self-signed` and `imported`. + subject_alternative_names (list[str]): The alternative names that are secured by this certificate. Alternative names may be IP addresses, DNS names, or URIs. + valid_from (str): The start date of when this certificate is valid. + valid_to (str): The end date of when this certificate is valid. + """ + if name is not None: + self.name = name + if id is not None: + self.id = id + if certificate is not None: + self.certificate = certificate + if certificate_type is not None: + self.certificate_type = certificate_type + if common_name is not None: + self.common_name = common_name + if country is not None: + self.country = country + if email is not None: + self.email = email + if intermediate_certificate is not None: + self.intermediate_certificate = intermediate_certificate + if issued_by is not None: + self.issued_by = issued_by + if issued_to is not None: + self.issued_to = issued_to + if key_size is not None: + self.key_size = key_size + if locality is not None: + self.locality = locality + if organization is not None: + self.organization = organization + if organizational_unit is not None: + self.organizational_unit = organizational_unit + if state is not None: + self.state = state + if status is not None: + self.status = status + if subject_alternative_names is not None: + self.subject_alternative_names = subject_alternative_names + if valid_from is not None: + self.valid_from = valid_from + if valid_to is not None: + self.valid_to = valid_to + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `Certificate`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(Certificate, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, Certificate): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/certificate_certificate_group_get_resp.py b/pypureclient/flashblade/FB_2_14/models/certificate_certificate_group_get_resp.py new file mode 100644 index 000000000..959a4c74c --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/certificate_certificate_group_get_resp.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class CertificateCertificateGroupGetResp(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'continuation_token': 'str', + 'total_item_count': 'int', + 'items': 'list[Member]' + } + + attribute_map = { + 'continuation_token': 'continuation_token', + 'total_item_count': 'total_item_count', + 'items': 'items' + } + + required_args = { + } + + def __init__( + self, + continuation_token=None, # type: str + total_item_count=None, # type: int + items=None, # type: List[models.Member] + ): + """ + Keyword args: + continuation_token (str): Continuation token that can be provided in the `continuation_token` query param to get the next page of data. If you use the `continuation_token` to page through data you are guaranteed to get all items exactly once regardless of how items are modified. If an item is added or deleted during the pagination then it may or may not be returned. The `continuation_token` is generated if the `limit` is less than the remaining number of items, and the default sort is used (no sort is specified). + total_item_count (int): Total number of items after applying `filter` params. + items (list[Member]): A list of certificate and certificate group relationships. + """ + if continuation_token is not None: + self.continuation_token = continuation_token + if total_item_count is not None: + self.total_item_count = total_item_count + if items is not None: + self.items = items + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `CertificateCertificateGroupGetResp`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(CertificateCertificateGroupGetResp, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CertificateCertificateGroupGetResp): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/certificate_certificate_group_response.py b/pypureclient/flashblade/FB_2_14/models/certificate_certificate_group_response.py new file mode 100644 index 000000000..795500373 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/certificate_certificate_group_response.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class CertificateCertificateGroupResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'items': 'list[Member]' + } + + attribute_map = { + 'items': 'items' + } + + required_args = { + } + + def __init__( + self, + items=None, # type: List[models.Member] + ): + """ + Keyword args: + items (list[Member]): A list of certificate and certificate group relationships. + """ + if items is not None: + self.items = items + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `CertificateCertificateGroupResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(CertificateCertificateGroupResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CertificateCertificateGroupResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/certificate_get_response.py b/pypureclient/flashblade/FB_2_14/models/certificate_get_response.py new file mode 100644 index 000000000..aaa8120e1 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/certificate_get_response.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class CertificateGetResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'continuation_token': 'str', + 'total_item_count': 'int', + 'items': 'list[Certificate]' + } + + attribute_map = { + 'continuation_token': 'continuation_token', + 'total_item_count': 'total_item_count', + 'items': 'items' + } + + required_args = { + } + + def __init__( + self, + continuation_token=None, # type: str + total_item_count=None, # type: int + items=None, # type: List[models.Certificate] + ): + """ + Keyword args: + continuation_token (str): Continuation token that can be provided in the `continuation_token` query param to get the next page of data. If you use the `continuation_token` to page through data you are guaranteed to get all items exactly once regardless of how items are modified. If an item is added or deleted during the pagination then it may or may not be returned. The `continuation_token` is generated if the `limit` is less than the remaining number of items, and the default sort is used (no sort is specified). + total_item_count (int): Total number of items after applying `filter` params. + items (list[Certificate]): A list of certificate objects. + """ + if continuation_token is not None: + self.continuation_token = continuation_token + if total_item_count is not None: + self.total_item_count = total_item_count + if items is not None: + self.items = items + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `CertificateGetResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(CertificateGetResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CertificateGetResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/certificate_group.py b/pypureclient/flashblade/FB_2_14/models/certificate_group.py new file mode 100644 index 000000000..e408e7bbf --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/certificate_group.py @@ -0,0 +1,117 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class CertificateGroup(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'name': 'str', + 'id': 'str' + } + + attribute_map = { + 'name': 'name', + 'id': 'id' + } + + required_args = { + } + + def __init__( + self, + name=None, # type: str + id=None, # type: str + ): + """ + Keyword args: + name (str): Name of the object (e.g., a file system or snapshot). + id (str): A non-modifiable, globally unique ID chosen by the system. + """ + if name is not None: + self.name = name + if id is not None: + self.id = id + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `CertificateGroup`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(CertificateGroup, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CertificateGroup): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/certificate_group_certificate_get_resp.py b/pypureclient/flashblade/FB_2_14/models/certificate_group_certificate_get_resp.py new file mode 100644 index 000000000..e93030d4e --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/certificate_group_certificate_get_resp.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class CertificateGroupCertificateGetResp(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'continuation_token': 'str', + 'total_item_count': 'int', + 'items': 'list[Member]' + } + + attribute_map = { + 'continuation_token': 'continuation_token', + 'total_item_count': 'total_item_count', + 'items': 'items' + } + + required_args = { + } + + def __init__( + self, + continuation_token=None, # type: str + total_item_count=None, # type: int + items=None, # type: List[models.Member] + ): + """ + Keyword args: + continuation_token (str): Continuation token that can be provided in the `continuation_token` query param to get the next page of data. If you use the `continuation_token` to page through data you are guaranteed to get all items exactly once regardless of how items are modified. If an item is added or deleted during the pagination then it may or may not be returned. The `continuation_token` is generated if the `limit` is less than the remaining number of items, and the default sort is used (no sort is specified). + total_item_count (int): Total number of items after applying `filter` params. + items (list[Member]): A list of certificate and certificate group relationships. + """ + if continuation_token is not None: + self.continuation_token = continuation_token + if total_item_count is not None: + self.total_item_count = total_item_count + if items is not None: + self.items = items + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `CertificateGroupCertificateGetResp`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(CertificateGroupCertificateGetResp, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CertificateGroupCertificateGetResp): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/certificate_group_certificate_response.py b/pypureclient/flashblade/FB_2_14/models/certificate_group_certificate_response.py new file mode 100644 index 000000000..f30731291 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/certificate_group_certificate_response.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class CertificateGroupCertificateResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'items': 'list[Member]' + } + + attribute_map = { + 'items': 'items' + } + + required_args = { + } + + def __init__( + self, + items=None, # type: List[models.Member] + ): + """ + Keyword args: + items (list[Member]): A list of certificate and certificate group relationships. + """ + if items is not None: + self.items = items + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `CertificateGroupCertificateResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(CertificateGroupCertificateResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CertificateGroupCertificateResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/certificate_group_get_response.py b/pypureclient/flashblade/FB_2_14/models/certificate_group_get_response.py new file mode 100644 index 000000000..4e54b2728 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/certificate_group_get_response.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class CertificateGroupGetResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'continuation_token': 'str', + 'total_item_count': 'int', + 'items': 'list[CertificateGroup]' + } + + attribute_map = { + 'continuation_token': 'continuation_token', + 'total_item_count': 'total_item_count', + 'items': 'items' + } + + required_args = { + } + + def __init__( + self, + continuation_token=None, # type: str + total_item_count=None, # type: int + items=None, # type: List[models.CertificateGroup] + ): + """ + Keyword args: + continuation_token (str): Continuation token that can be provided in the `continuation_token` query param to get the next page of data. If you use the `continuation_token` to page through data you are guaranteed to get all items exactly once regardless of how items are modified. If an item is added or deleted during the pagination then it may or may not be returned. The `continuation_token` is generated if the `limit` is less than the remaining number of items, and the default sort is used (no sort is specified). + total_item_count (int): Total number of items after applying `filter` params. + items (list[CertificateGroup]): A list of certificate group objects. + """ + if continuation_token is not None: + self.continuation_token = continuation_token + if total_item_count is not None: + self.total_item_count = total_item_count + if items is not None: + self.items = items + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `CertificateGroupGetResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(CertificateGroupGetResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CertificateGroupGetResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/certificate_group_response.py b/pypureclient/flashblade/FB_2_14/models/certificate_group_response.py new file mode 100644 index 000000000..a95465337 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/certificate_group_response.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class CertificateGroupResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'items': 'list[CertificateGroup]' + } + + attribute_map = { + 'items': 'items' + } + + required_args = { + } + + def __init__( + self, + items=None, # type: List[models.CertificateGroup] + ): + """ + Keyword args: + items (list[CertificateGroup]): A list of certificate group objects. + """ + if items is not None: + self.items = items + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `CertificateGroupResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(CertificateGroupResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CertificateGroupResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/certificate_group_use.py b/pypureclient/flashblade/FB_2_14/models/certificate_group_use.py new file mode 100644 index 000000000..a47948fbc --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/certificate_group_use.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class CertificateGroupUse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'name': 'str', + 'id': 'str', + 'use': 'FixedReferenceWithRemote' + } + + attribute_map = { + 'name': 'name', + 'id': 'id', + 'use': 'use' + } + + required_args = { + } + + def __init__( + self, + name=None, # type: str + id=None, # type: str + use=None, # type: models.FixedReferenceWithRemote + ): + """ + Keyword args: + name (str): Name of the object (e.g., a file system or snapshot). + id (str): A non-modifiable, globally unique ID chosen by the system. + use (FixedReferenceWithRemote): A reference to an object using this certificate group. + """ + if name is not None: + self.name = name + if id is not None: + self.id = id + if use is not None: + self.use = use + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `CertificateGroupUse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(CertificateGroupUse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CertificateGroupUse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/certificate_group_use_get_response.py b/pypureclient/flashblade/FB_2_14/models/certificate_group_use_get_response.py new file mode 100644 index 000000000..393e18309 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/certificate_group_use_get_response.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class CertificateGroupUseGetResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'continuation_token': 'str', + 'total_item_count': 'int', + 'items': 'list[CertificateGroupUse]' + } + + attribute_map = { + 'continuation_token': 'continuation_token', + 'total_item_count': 'total_item_count', + 'items': 'items' + } + + required_args = { + } + + def __init__( + self, + continuation_token=None, # type: str + total_item_count=None, # type: int + items=None, # type: List[models.CertificateGroupUse] + ): + """ + Keyword args: + continuation_token (str): Continuation token that can be provided in the `continuation_token` query param to get the next page of data. If you use the `continuation_token` to page through data you are guaranteed to get all items exactly once regardless of how items are modified. If an item is added or deleted during the pagination then it may or may not be returned. The `continuation_token` is generated if the `limit` is less than the remaining number of items, and the default sort is used (no sort is specified). + total_item_count (int): Total number of items after applying `filter` params. + items (list[CertificateGroupUse]): A list of certificate group use objects. + """ + if continuation_token is not None: + self.continuation_token = continuation_token + if total_item_count is not None: + self.total_item_count = total_item_count + if items is not None: + self.items = items + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `CertificateGroupUseGetResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(CertificateGroupUseGetResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CertificateGroupUseGetResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/certificate_patch.py b/pypureclient/flashblade/FB_2_14/models/certificate_patch.py new file mode 100644 index 000000000..7607e5c5e --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/certificate_patch.py @@ -0,0 +1,141 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class CertificatePatch(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'name': 'str', + 'id': 'str', + 'certificate': 'str', + 'intermediate_certificate': 'str', + 'passphrase': 'str', + 'private_key': 'str' + } + + attribute_map = { + 'name': 'name', + 'id': 'id', + 'certificate': 'certificate', + 'intermediate_certificate': 'intermediate_certificate', + 'passphrase': 'passphrase', + 'private_key': 'private_key' + } + + required_args = { + } + + def __init__( + self, + name=None, # type: str + id=None, # type: str + certificate=None, # type: str + intermediate_certificate=None, # type: str + passphrase=None, # type: str + private_key=None, # type: str + ): + """ + Keyword args: + name (str): Name of the object (e.g., a file system or snapshot). + id (str): A non-modifiable, globally unique ID chosen by the system. + certificate (str): The text of the certificate. + intermediate_certificate (str): Intermediate certificate chains. + passphrase (str): The passphrase used to encrypt `private_key`. + private_key (str): The private key used to sign the certificate. + """ + if name is not None: + self.name = name + if id is not None: + self.id = id + if certificate is not None: + self.certificate = certificate + if intermediate_certificate is not None: + self.intermediate_certificate = intermediate_certificate + if passphrase is not None: + self.passphrase = passphrase + if private_key is not None: + self.private_key = private_key + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `CertificatePatch`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(CertificatePatch, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CertificatePatch): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/certificate_post.py b/pypureclient/flashblade/FB_2_14/models/certificate_post.py new file mode 100644 index 000000000..63a6ebe4e --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/certificate_post.py @@ -0,0 +1,207 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class CertificatePost(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'name': 'str', + 'certificate': 'str', + 'certificate_type': 'str', + 'common_name': 'str', + 'country': 'str', + 'email': 'str', + 'intermediate_certificate': 'str', + 'issued_by': 'str', + 'issued_to': 'str', + 'key_size': 'int', + 'locality': 'str', + 'organization': 'str', + 'organizational_unit': 'str', + 'state': 'str', + 'status': 'str', + 'valid_from': 'str', + 'valid_to': 'str' + } + + attribute_map = { + 'name': 'name', + 'certificate': 'certificate', + 'certificate_type': 'certificate_type', + 'common_name': 'common_name', + 'country': 'country', + 'email': 'email', + 'intermediate_certificate': 'intermediate_certificate', + 'issued_by': 'issued_by', + 'issued_to': 'issued_to', + 'key_size': 'key_size', + 'locality': 'locality', + 'organization': 'organization', + 'organizational_unit': 'organizational_unit', + 'state': 'state', + 'status': 'status', + 'valid_from': 'valid_from', + 'valid_to': 'valid_to' + } + + required_args = { + } + + def __init__( + self, + name=None, # type: str + certificate=None, # type: str + certificate_type=None, # type: str + common_name=None, # type: str + country=None, # type: str + email=None, # type: str + intermediate_certificate=None, # type: str + issued_by=None, # type: str + issued_to=None, # type: str + key_size=None, # type: int + locality=None, # type: str + organization=None, # type: str + organizational_unit=None, # type: str + state=None, # type: str + status=None, # type: str + valid_from=None, # type: str + valid_to=None, # type: str + ): + """ + Keyword args: + name (str): Name of the object (e.g., a file system or snapshot). + certificate (str): The text of the certificate. + certificate_type (str): The type of certificate. Possible values are `appliance` and `external`. Certificates of type `appliance` are used by the array to verify its identity to clients. Certificates of type `external` are used by the array to identify external servers to which it is configured to communicate. + common_name (str): FQDN or management IP address of the current array. + country (str): The country field listed in the certificate. + email (str): The email field listed in the certificate. + intermediate_certificate (str): Intermediate certificate chains. + issued_by (str): Who issued this certificate. + issued_to (str): Who this certificate was issued to. + key_size (int): The size of the private key for this certificate in bits. + locality (str): The locality field listed in the certificate. + organization (str): The organization field listed in the certificate. + organizational_unit (str): The organizational unit field listed in the certificate. + state (str): The state/province field listed in the certificate. + status (str): The type of certificate. Valid values are `self-signed` and `imported`. + valid_from (str): The start date of when this certificate is valid. + valid_to (str): The end date of when this certificate is valid. + """ + if name is not None: + self.name = name + if certificate is not None: + self.certificate = certificate + if certificate_type is not None: + self.certificate_type = certificate_type + if common_name is not None: + self.common_name = common_name + if country is not None: + self.country = country + if email is not None: + self.email = email + if intermediate_certificate is not None: + self.intermediate_certificate = intermediate_certificate + if issued_by is not None: + self.issued_by = issued_by + if issued_to is not None: + self.issued_to = issued_to + if key_size is not None: + self.key_size = key_size + if locality is not None: + self.locality = locality + if organization is not None: + self.organization = organization + if organizational_unit is not None: + self.organizational_unit = organizational_unit + if state is not None: + self.state = state + if status is not None: + self.status = status + if valid_from is not None: + self.valid_from = valid_from + if valid_to is not None: + self.valid_to = valid_to + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `CertificatePost`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(CertificatePost, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CertificatePost): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/certificate_response.py b/pypureclient/flashblade/FB_2_14/models/certificate_response.py new file mode 100644 index 000000000..33905d6be --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/certificate_response.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class CertificateResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'items': 'list[Certificate]' + } + + attribute_map = { + 'items': 'items' + } + + required_args = { + } + + def __init__( + self, + items=None, # type: List[models.Certificate] + ): + """ + Keyword args: + items (list[Certificate]): A list of certificate objects. + """ + if items is not None: + self.items = items + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `CertificateResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(CertificateResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CertificateResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/certificate_use.py b/pypureclient/flashblade/FB_2_14/models/certificate_use.py new file mode 100644 index 000000000..f6600102b --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/certificate_use.py @@ -0,0 +1,129 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class CertificateUse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'name': 'str', + 'id': 'str', + 'group': 'FixedReference', + 'use': 'FixedReferenceWithRemote' + } + + attribute_map = { + 'name': 'name', + 'id': 'id', + 'group': 'group', + 'use': 'use' + } + + required_args = { + } + + def __init__( + self, + name=None, # type: str + id=None, # type: str + group=None, # type: models.FixedReference + use=None, # type: models.FixedReferenceWithRemote + ): + """ + Keyword args: + name (str): Name of the object (e.g., a file system or snapshot). + id (str): A non-modifiable, globally unique ID chosen by the system. + group (FixedReference): A reference to a certificate group that is being used, if any, where this certificate is a member of the certificate-group. This field is `null` if the referenced use object is not using a group, but is rather using this certificate directly. + use (FixedReferenceWithRemote): A reference to an object using this certificate. + """ + if name is not None: + self.name = name + if id is not None: + self.id = id + if group is not None: + self.group = group + if use is not None: + self.use = use + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `CertificateUse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(CertificateUse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CertificateUse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/certificate_use_get_response.py b/pypureclient/flashblade/FB_2_14/models/certificate_use_get_response.py new file mode 100644 index 000000000..d331afd0e --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/certificate_use_get_response.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class CertificateUseGetResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'continuation_token': 'str', + 'total_item_count': 'int', + 'items': 'list[CertificateUse]' + } + + attribute_map = { + 'continuation_token': 'continuation_token', + 'total_item_count': 'total_item_count', + 'items': 'items' + } + + required_args = { + } + + def __init__( + self, + continuation_token=None, # type: str + total_item_count=None, # type: int + items=None, # type: List[models.CertificateUse] + ): + """ + Keyword args: + continuation_token (str): Continuation token that can be provided in the `continuation_token` query param to get the next page of data. If you use the `continuation_token` to page through data you are guaranteed to get all items exactly once regardless of how items are modified. If an item is added or deleted during the pagination then it may or may not be returned. The `continuation_token` is generated if the `limit` is less than the remaining number of items, and the default sort is used (no sort is specified). + total_item_count (int): Total number of items after applying `filter` params. + items (list[CertificateUse]): A list of certificate use objects. + """ + if continuation_token is not None: + self.continuation_token = continuation_token + if total_item_count is not None: + self.total_item_count = total_item_count + if items is not None: + self.items = items + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `CertificateUseGetResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(CertificateUseGetResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CertificateUseGetResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/client_performance.py b/pypureclient/flashblade/FB_2_14/models/client_performance.py new file mode 100644 index 000000000..770f1e32a --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/client_performance.py @@ -0,0 +1,216 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class ClientPerformance(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'name': 'str', + 'bytes_per_op': 'int', + 'bytes_per_read': 'int', + 'bytes_per_write': 'int', + 'others_per_sec': 'int', + 'read_bytes_per_sec': 'int', + 'reads_per_sec': 'int', + 'time': 'int', + 'usec_per_other_op': 'int', + 'usec_per_read_op': 'int', + 'usec_per_write_op': 'int', + 'write_bytes_per_sec': 'int', + 'writes_per_sec': 'int' + } + + attribute_map = { + 'name': 'name', + 'bytes_per_op': 'bytes_per_op', + 'bytes_per_read': 'bytes_per_read', + 'bytes_per_write': 'bytes_per_write', + 'others_per_sec': 'others_per_sec', + 'read_bytes_per_sec': 'read_bytes_per_sec', + 'reads_per_sec': 'reads_per_sec', + 'time': 'time', + 'usec_per_other_op': 'usec_per_other_op', + 'usec_per_read_op': 'usec_per_read_op', + 'usec_per_write_op': 'usec_per_write_op', + 'write_bytes_per_sec': 'write_bytes_per_sec', + 'writes_per_sec': 'writes_per_sec' + } + + required_args = { + } + + def __init__( + self, + name=None, # type: str + bytes_per_op=None, # type: int + bytes_per_read=None, # type: int + bytes_per_write=None, # type: int + others_per_sec=None, # type: int + read_bytes_per_sec=None, # type: int + reads_per_sec=None, # type: int + time=None, # type: int + usec_per_other_op=None, # type: int + usec_per_read_op=None, # type: int + usec_per_write_op=None, # type: int + write_bytes_per_sec=None, # type: int + writes_per_sec=None, # type: int + ): + """ + Keyword args: + name (str): Name of the object (e.g., a file system or snapshot). + bytes_per_op (int): Average operation size (read bytes+write bytes/read ops+write ops). + bytes_per_read (int): Average read size in bytes per read operation. + bytes_per_write (int): Average write size in bytes per write operation. + others_per_sec (int): Other operations processed per second. + read_bytes_per_sec (int): Bytes read per second. + reads_per_sec (int): Read requests processed per second. + time (int): Sample time in milliseconds since UNIX epoch. + usec_per_other_op (int): Average time, measured in microseconds, it takes the client to process other operations. + usec_per_read_op (int): Average time, measured in microseconds, it takes the client to process a read request. + usec_per_write_op (int): Average time, measured in microseconds, it takes the client to process a write request. + write_bytes_per_sec (int): Bytes written per second. + writes_per_sec (int): Write requests processed per second. + """ + if name is not None: + self.name = name + if bytes_per_op is not None: + self.bytes_per_op = bytes_per_op + if bytes_per_read is not None: + self.bytes_per_read = bytes_per_read + if bytes_per_write is not None: + self.bytes_per_write = bytes_per_write + if others_per_sec is not None: + self.others_per_sec = others_per_sec + if read_bytes_per_sec is not None: + self.read_bytes_per_sec = read_bytes_per_sec + if reads_per_sec is not None: + self.reads_per_sec = reads_per_sec + if time is not None: + self.time = time + if usec_per_other_op is not None: + self.usec_per_other_op = usec_per_other_op + if usec_per_read_op is not None: + self.usec_per_read_op = usec_per_read_op + if usec_per_write_op is not None: + self.usec_per_write_op = usec_per_write_op + if write_bytes_per_sec is not None: + self.write_bytes_per_sec = write_bytes_per_sec + if writes_per_sec is not None: + self.writes_per_sec = writes_per_sec + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `ClientPerformance`".format(key)) + if key == "bytes_per_op" and value is not None: + if value < 0: + raise ValueError("Invalid value for `bytes_per_op`, must be a value greater than or equal to `0`") + if key == "bytes_per_read" and value is not None: + if value < 0: + raise ValueError("Invalid value for `bytes_per_read`, must be a value greater than or equal to `0`") + if key == "bytes_per_write" and value is not None: + if value < 0: + raise ValueError("Invalid value for `bytes_per_write`, must be a value greater than or equal to `0`") + if key == "others_per_sec" and value is not None: + if value < 0: + raise ValueError("Invalid value for `others_per_sec`, must be a value greater than or equal to `0`") + if key == "read_bytes_per_sec" and value is not None: + if value < 0: + raise ValueError("Invalid value for `read_bytes_per_sec`, must be a value greater than or equal to `0`") + if key == "reads_per_sec" and value is not None: + if value < 0: + raise ValueError("Invalid value for `reads_per_sec`, must be a value greater than or equal to `0`") + if key == "usec_per_other_op" and value is not None: + if value < 0: + raise ValueError("Invalid value for `usec_per_other_op`, must be a value greater than or equal to `0`") + if key == "usec_per_read_op" and value is not None: + if value < 0: + raise ValueError("Invalid value for `usec_per_read_op`, must be a value greater than or equal to `0`") + if key == "usec_per_write_op" and value is not None: + if value < 0: + raise ValueError("Invalid value for `usec_per_write_op`, must be a value greater than or equal to `0`") + if key == "write_bytes_per_sec" and value is not None: + if value < 0: + raise ValueError("Invalid value for `write_bytes_per_sec`, must be a value greater than or equal to `0`") + if key == "writes_per_sec" and value is not None: + if value < 0: + raise ValueError("Invalid value for `writes_per_sec`, must be a value greater than or equal to `0`") + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(ClientPerformance, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ClientPerformance): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/client_performance_get_response.py b/pypureclient/flashblade/FB_2_14/models/client_performance_get_response.py new file mode 100644 index 000000000..1a16fc9dd --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/client_performance_get_response.py @@ -0,0 +1,129 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class ClientPerformanceGetResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'continuation_token': 'str', + 'total_item_count': 'int', + 'items': 'list[ClientPerformance]', + 'total': 'list[ClientPerformance]' + } + + attribute_map = { + 'continuation_token': 'continuation_token', + 'total_item_count': 'total_item_count', + 'items': 'items', + 'total': 'total' + } + + required_args = { + } + + def __init__( + self, + continuation_token=None, # type: str + total_item_count=None, # type: int + items=None, # type: List[models.ClientPerformance] + total=None, # type: List[models.ClientPerformance] + ): + """ + Keyword args: + continuation_token (str): Continuation token that can be provided in the `continuation_token` query param to get the next page of data. If you use the `continuation_token` to page through data you are guaranteed to get all items exactly once regardless of how items are modified. If an item is added or deleted during the pagination then it may or may not be returned. The `continuation_token` is generated if the `limit` is less than the remaining number of items, and the default sort is used (no sort is specified). + total_item_count (int): Total number of items after applying `filter` params. + items (list[ClientPerformance]): A list of client performance metrics objects. + total (list[ClientPerformance]): Total of all records after filtering. If `total_only` query param is `true`, then no items will be returned. + """ + if continuation_token is not None: + self.continuation_token = continuation_token + if total_item_count is not None: + self.total_item_count = total_item_count + if items is not None: + self.items = items + if total is not None: + self.total = total + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `ClientPerformanceGetResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(ClientPerformanceGetResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ClientPerformanceGetResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/connection_relationship_performance_replication.py b/pypureclient/flashblade/FB_2_14/models/connection_relationship_performance_replication.py new file mode 100644 index 000000000..43d95b5bb --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/connection_relationship_performance_replication.py @@ -0,0 +1,141 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class ConnectionRelationshipPerformanceReplication(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'id': 'str', + 'periodic': 'ReplicationPerformance', + 'remote': 'FixedReferenceNoResourceType', + 'time': 'int', + 'aggregate': 'ReplicationPerformance', + 'continuous': 'ContinuousReplicationPerformance' + } + + attribute_map = { + 'id': 'id', + 'periodic': 'periodic', + 'remote': 'remote', + 'time': 'time', + 'aggregate': 'aggregate', + 'continuous': 'continuous' + } + + required_args = { + } + + def __init__( + self, + id=None, # type: str + periodic=None, # type: models.ReplicationPerformance + remote=None, # type: models.FixedReferenceNoResourceType + time=None, # type: int + aggregate=None, # type: models.ReplicationPerformance + continuous=None, # type: models.ContinuousReplicationPerformance + ): + """ + Keyword args: + id (str): A non-modifiable, globally unique ID chosen by the system. + periodic (ReplicationPerformance): Total bytes transmitted or received per second for periodic replication. Periodic replication includes file system replication, which is snapshot based. + remote (FixedReferenceNoResourceType): Reference to a remote array. + time (int): Sample time in milliseconds since UNIX epoch. + aggregate (ReplicationPerformance): Total bytes transmitted or received per second for all types of replication. + continuous (ContinuousReplicationPerformance): Object backlog information and total bytes transmitted or received per second for continuous replication. Continuous replication includes object replication. + """ + if id is not None: + self.id = id + if periodic is not None: + self.periodic = periodic + if remote is not None: + self.remote = remote + if time is not None: + self.time = time + if aggregate is not None: + self.aggregate = aggregate + if continuous is not None: + self.continuous = continuous + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `ConnectionRelationshipPerformanceReplication`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(ConnectionRelationshipPerformanceReplication, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ConnectionRelationshipPerformanceReplication): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/connection_relationship_performance_replication_get_resp.py b/pypureclient/flashblade/FB_2_14/models/connection_relationship_performance_replication_get_resp.py new file mode 100644 index 000000000..6121bed41 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/connection_relationship_performance_replication_get_resp.py @@ -0,0 +1,129 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class ConnectionRelationshipPerformanceReplicationGetResp(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'continuation_token': 'str', + 'total_item_count': 'int', + 'items': 'list[ConnectionRelationshipPerformanceReplication]', + 'total': 'list[ConnectionRelationshipPerformanceReplication]' + } + + attribute_map = { + 'continuation_token': 'continuation_token', + 'total_item_count': 'total_item_count', + 'items': 'items', + 'total': 'total' + } + + required_args = { + } + + def __init__( + self, + continuation_token=None, # type: str + total_item_count=None, # type: int + items=None, # type: List[models.ConnectionRelationshipPerformanceReplication] + total=None, # type: List[models.ConnectionRelationshipPerformanceReplication] + ): + """ + Keyword args: + continuation_token (str): Continuation token that can be provided in the `continuation_token` query param to get the next page of data. If you use the `continuation_token` to page through data you are guaranteed to get all items exactly once regardless of how items are modified. If an item is added or deleted during the pagination then it may or may not be returned. The `continuation_token` is generated if the `limit` is less than the remaining number of items, and the default sort is used (no sort is specified). + total_item_count (int): Total number of items after applying `filter` params. + items (list[ConnectionRelationshipPerformanceReplication]) + total (list[ConnectionRelationshipPerformanceReplication]): Total of all records after filtering. If `total_only` query param is `true`, then no items will be returned. + """ + if continuation_token is not None: + self.continuation_token = continuation_token + if total_item_count is not None: + self.total_item_count = total_item_count + if items is not None: + self.items = items + if total is not None: + self.total = total + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `ConnectionRelationshipPerformanceReplicationGetResp`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(ConnectionRelationshipPerformanceReplicationGetResp, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ConnectionRelationshipPerformanceReplicationGetResp): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/continuous_replication_performance.py b/pypureclient/flashblade/FB_2_14/models/continuous_replication_performance.py new file mode 100644 index 000000000..827ba9e25 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/continuous_replication_performance.py @@ -0,0 +1,129 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class ContinuousReplicationPerformance(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'transmitted_bytes_per_sec': 'float', + 'received_bytes_per_sec': 'float', + 'object_backlog': 'ObjectBacklog' + } + + attribute_map = { + 'transmitted_bytes_per_sec': 'transmitted_bytes_per_sec', + 'received_bytes_per_sec': 'received_bytes_per_sec', + 'object_backlog': 'object_backlog' + } + + required_args = { + } + + def __init__( + self, + transmitted_bytes_per_sec=None, # type: float + received_bytes_per_sec=None, # type: float + object_backlog=None, # type: models.ObjectBacklog + ): + """ + Keyword args: + transmitted_bytes_per_sec (float): Total bytes transmitted per second. + received_bytes_per_sec (float): Total bytes received per second. + object_backlog (ObjectBacklog): The total number of pending object operations and their size that are currently in the backlog. + """ + if transmitted_bytes_per_sec is not None: + self.transmitted_bytes_per_sec = transmitted_bytes_per_sec + if received_bytes_per_sec is not None: + self.received_bytes_per_sec = received_bytes_per_sec + if object_backlog is not None: + self.object_backlog = object_backlog + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `ContinuousReplicationPerformance`".format(key)) + if key == "transmitted_bytes_per_sec" and value is not None: + if value < 0.0: + raise ValueError("Invalid value for `transmitted_bytes_per_sec`, must be a value greater than or equal to `0.0`") + if key == "received_bytes_per_sec" and value is not None: + if value < 0.0: + raise ValueError("Invalid value for `received_bytes_per_sec`, must be a value greater than or equal to `0.0`") + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(ContinuousReplicationPerformance, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ContinuousReplicationPerformance): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/cross_origin_resource_sharing_policy.py b/pypureclient/flashblade/FB_2_14/models/cross_origin_resource_sharing_policy.py new file mode 100644 index 000000000..3074dbe8c --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/cross_origin_resource_sharing_policy.py @@ -0,0 +1,153 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class CrossOriginResourceSharingPolicy(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'name': 'str', + 'id': 'str', + 'enabled': 'bool', + 'is_local': 'bool', + 'location': 'FixedReference', + 'policy_type': 'str', + 'bucket': 'FixedReference', + 'rules': 'list[CrossOriginResourceSharingPolicyRule]' + } + + attribute_map = { + 'name': 'name', + 'id': 'id', + 'enabled': 'enabled', + 'is_local': 'is_local', + 'location': 'location', + 'policy_type': 'policy_type', + 'bucket': 'bucket', + 'rules': 'rules' + } + + required_args = { + } + + def __init__( + self, + name=None, # type: str + id=None, # type: str + enabled=None, # type: bool + is_local=None, # type: bool + location=None, # type: models.FixedReference + policy_type=None, # type: str + bucket=None, # type: models.FixedReference + rules=None, # type: List[models.CrossOriginResourceSharingPolicyRule] + ): + """ + Keyword args: + name (str): Name of the object (e.g., a file system or snapshot). + id (str): A non-modifiable, globally unique ID chosen by the system. + enabled (bool): If `true`, the policy is enabled. If not specified, defaults to `true`. + is_local (bool): Whether the policy is defined on the local array. + location (FixedReference): Reference to the array where the policy is defined. + policy_type (str): Type of the policy. Valid values are `audit`, `bucket-access`, `cross-origin-resource-sharing`, `network-access`, `nfs`, `object-access`, `smb-client`, `smb-share`, and `snapshot`. + bucket (FixedReference): The bucket to which this policy belongs. + rules (list[CrossOriginResourceSharingPolicyRule]) + """ + if name is not None: + self.name = name + if id is not None: + self.id = id + if enabled is not None: + self.enabled = enabled + if is_local is not None: + self.is_local = is_local + if location is not None: + self.location = location + if policy_type is not None: + self.policy_type = policy_type + if bucket is not None: + self.bucket = bucket + if rules is not None: + self.rules = rules + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `CrossOriginResourceSharingPolicy`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(CrossOriginResourceSharingPolicy, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CrossOriginResourceSharingPolicy): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/cross_origin_resource_sharing_policy_get_response.py b/pypureclient/flashblade/FB_2_14/models/cross_origin_resource_sharing_policy_get_response.py new file mode 100644 index 000000000..ca3d11869 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/cross_origin_resource_sharing_policy_get_response.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class CrossOriginResourceSharingPolicyGetResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'continuation_token': 'str', + 'total_item_count': 'int', + 'items': 'list[CrossOriginResourceSharingPolicy]' + } + + attribute_map = { + 'continuation_token': 'continuation_token', + 'total_item_count': 'total_item_count', + 'items': 'items' + } + + required_args = { + } + + def __init__( + self, + continuation_token=None, # type: str + total_item_count=None, # type: int + items=None, # type: List[models.CrossOriginResourceSharingPolicy] + ): + """ + Keyword args: + continuation_token (str): Continuation token that can be provided in the `continuation_token` query param to get the next page of data. If you use the `continuation_token` to page through data you are guaranteed to get all items exactly once regardless of how items are modified. If an item is added or deleted during the pagination then it may or may not be returned. The `continuation_token` is generated if the `limit` is less than the remaining number of items, and the default sort is used (no sort is specified). + total_item_count (int): Total number of items after applying `filter` params. + items (list[CrossOriginResourceSharingPolicy]): A list of cross origin resource sharing policy objects. + """ + if continuation_token is not None: + self.continuation_token = continuation_token + if total_item_count is not None: + self.total_item_count = total_item_count + if items is not None: + self.items = items + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `CrossOriginResourceSharingPolicyGetResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(CrossOriginResourceSharingPolicyGetResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CrossOriginResourceSharingPolicyGetResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/cross_origin_resource_sharing_policy_patch.py b/pypureclient/flashblade/FB_2_14/models/cross_origin_resource_sharing_policy_patch.py new file mode 100644 index 000000000..3ef1a18d6 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/cross_origin_resource_sharing_policy_patch.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class CrossOriginResourceSharingPolicyPatch(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'rules': 'list[CrossOriginResourceSharingPolicyRuleBulkManage]' + } + + attribute_map = { + 'rules': 'rules' + } + + required_args = { + } + + def __init__( + self, + rules=None, # type: List[models.CrossOriginResourceSharingPolicyRuleBulkManage] + ): + """ + Keyword args: + rules (list[CrossOriginResourceSharingPolicyRuleBulkManage]) + """ + if rules is not None: + self.rules = rules + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `CrossOriginResourceSharingPolicyPatch`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(CrossOriginResourceSharingPolicyPatch, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CrossOriginResourceSharingPolicyPatch): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/cross_origin_resource_sharing_policy_response.py b/pypureclient/flashblade/FB_2_14/models/cross_origin_resource_sharing_policy_response.py new file mode 100644 index 000000000..7561a40e0 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/cross_origin_resource_sharing_policy_response.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class CrossOriginResourceSharingPolicyResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'items': 'list[CrossOriginResourceSharingPolicy]' + } + + attribute_map = { + 'items': 'items' + } + + required_args = { + } + + def __init__( + self, + items=None, # type: List[models.CrossOriginResourceSharingPolicy] + ): + """ + Keyword args: + items (list[CrossOriginResourceSharingPolicy]): A list of cross origin resource sharing policy objects. + """ + if items is not None: + self.items = items + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `CrossOriginResourceSharingPolicyResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(CrossOriginResourceSharingPolicyResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CrossOriginResourceSharingPolicyResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/cross_origin_resource_sharing_policy_rule.py b/pypureclient/flashblade/FB_2_14/models/cross_origin_resource_sharing_policy_rule.py new file mode 100644 index 000000000..2bc7eff89 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/cross_origin_resource_sharing_policy_rule.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class CrossOriginResourceSharingPolicyRule(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'name': 'str', + 'allowed_headers': 'list[str]', + 'allowed_methods': 'list[str]', + 'allowed_origins': 'list[str]', + 'policy': 'FixedReference' + } + + attribute_map = { + 'name': 'name', + 'allowed_headers': 'allowed_headers', + 'allowed_methods': 'allowed_methods', + 'allowed_origins': 'allowed_origins', + 'policy': 'policy' + } + + required_args = { + } + + def __init__( + self, + name=None, # type: str + allowed_headers=None, # type: List[str] + allowed_methods=None, # type: List[str] + allowed_origins=None, # type: List[str] + policy=None, # type: models.FixedReference + ): + """ + Keyword args: + name (str): Name of the object (e.g., a file system or snapshot). + allowed_headers (list[str]): A list of headers that are permitted to be included in cross-origin requests to access a bucket. The only currently supported allowed header is `*`. + allowed_methods (list[str]): A list of HTTP methods that are permitted for cross-origin requests to access a bucket. The only currently supported combination of allowed methods is all methods `[\"GET\", \"PUT\", \"HEAD\", \"POST\", \"DELETE\"]`. + allowed_origins (list[str]): A list of origins (domains) that are permitted to make cross-origin requests to access a bucket. The only currently supported allowed origin is `*`. + policy (FixedReference): The policy to which this rule belongs. + """ + if name is not None: + self.name = name + if allowed_headers is not None: + self.allowed_headers = allowed_headers + if allowed_methods is not None: + self.allowed_methods = allowed_methods + if allowed_origins is not None: + self.allowed_origins = allowed_origins + if policy is not None: + self.policy = policy + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `CrossOriginResourceSharingPolicyRule`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(CrossOriginResourceSharingPolicyRule, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CrossOriginResourceSharingPolicyRule): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/cross_origin_resource_sharing_policy_rule_bulk_manage.py b/pypureclient/flashblade/FB_2_14/models/cross_origin_resource_sharing_policy_rule_bulk_manage.py new file mode 100644 index 000000000..9473388bd --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/cross_origin_resource_sharing_policy_rule_bulk_manage.py @@ -0,0 +1,129 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class CrossOriginResourceSharingPolicyRuleBulkManage(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'allowed_headers': 'list[str]', + 'allowed_methods': 'list[str]', + 'allowed_origins': 'list[str]', + 'name': 'str' + } + + attribute_map = { + 'allowed_headers': 'allowed_headers', + 'allowed_methods': 'allowed_methods', + 'allowed_origins': 'allowed_origins', + 'name': 'name' + } + + required_args = { + } + + def __init__( + self, + allowed_headers=None, # type: List[str] + allowed_methods=None, # type: List[str] + allowed_origins=None, # type: List[str] + name=None, # type: str + ): + """ + Keyword args: + allowed_headers (list[str]): A list of headers that are permitted to be included in cross-origin requests to access a bucket. The only currently supported allowed header is `*`. + allowed_methods (list[str]): A list of HTTP methods that are permitted for cross-origin requests to access a bucket. The only currently supported combination of allowed methods is all methods `[\"GET\", \"PUT\", \"HEAD\", \"POST\", \"DELETE\"]`. + allowed_origins (list[str]): A list of origins (domains) that are permitted to make cross-origin requests to access a bucket. The only currently supported allowed origin is `*`. + name (str): Name of the object (e.g., a file system or snapshot). + """ + if allowed_headers is not None: + self.allowed_headers = allowed_headers + if allowed_methods is not None: + self.allowed_methods = allowed_methods + if allowed_origins is not None: + self.allowed_origins = allowed_origins + if name is not None: + self.name = name + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `CrossOriginResourceSharingPolicyRuleBulkManage`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(CrossOriginResourceSharingPolicyRuleBulkManage, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CrossOriginResourceSharingPolicyRuleBulkManage): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/cross_origin_resource_sharing_policy_rule_get_response.py b/pypureclient/flashblade/FB_2_14/models/cross_origin_resource_sharing_policy_rule_get_response.py new file mode 100644 index 000000000..dab5c0cfd --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/cross_origin_resource_sharing_policy_rule_get_response.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class CrossOriginResourceSharingPolicyRuleGetResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'continuation_token': 'str', + 'total_item_count': 'int', + 'items': 'list[CrossOriginResourceSharingPolicyRule]' + } + + attribute_map = { + 'continuation_token': 'continuation_token', + 'total_item_count': 'total_item_count', + 'items': 'items' + } + + required_args = { + } + + def __init__( + self, + continuation_token=None, # type: str + total_item_count=None, # type: int + items=None, # type: List[models.CrossOriginResourceSharingPolicyRule] + ): + """ + Keyword args: + continuation_token (str): Continuation token that can be provided in the `continuation_token` query param to get the next page of data. If you use the `continuation_token` to page through data you are guaranteed to get all items exactly once regardless of how items are modified. If an item is added or deleted during the pagination then it may or may not be returned. The `continuation_token` is generated if the `limit` is less than the remaining number of items, and the default sort is used (no sort is specified). + total_item_count (int): Total number of items after applying `filter` params. + items (list[CrossOriginResourceSharingPolicyRule]) + """ + if continuation_token is not None: + self.continuation_token = continuation_token + if total_item_count is not None: + self.total_item_count = total_item_count + if items is not None: + self.items = items + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `CrossOriginResourceSharingPolicyRuleGetResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(CrossOriginResourceSharingPolicyRuleGetResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CrossOriginResourceSharingPolicyRuleGetResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/cross_origin_resource_sharing_policy_rule_post.py b/pypureclient/flashblade/FB_2_14/models/cross_origin_resource_sharing_policy_rule_post.py new file mode 100644 index 000000000..51270dc9d --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/cross_origin_resource_sharing_policy_rule_post.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class CrossOriginResourceSharingPolicyRulePost(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'allowed_headers': 'list[str]', + 'allowed_methods': 'list[str]', + 'allowed_origins': 'list[str]' + } + + attribute_map = { + 'allowed_headers': 'allowed_headers', + 'allowed_methods': 'allowed_methods', + 'allowed_origins': 'allowed_origins' + } + + required_args = { + } + + def __init__( + self, + allowed_headers=None, # type: List[str] + allowed_methods=None, # type: List[str] + allowed_origins=None, # type: List[str] + ): + """ + Keyword args: + allowed_headers (list[str]): A list of headers that are permitted to be included in cross-origin requests to access a bucket. The only currently supported allowed header is `*`. + allowed_methods (list[str]): A list of HTTP methods that are permitted for cross-origin requests to access a bucket. The only currently supported combination of allowed methods is all methods `[\"GET\", \"PUT\", \"HEAD\", \"POST\", \"DELETE\"]`. + allowed_origins (list[str]): A list of origins (domains) that are permitted to make cross-origin requests to access a bucket. The only currently supported allowed origin is `*`. + """ + if allowed_headers is not None: + self.allowed_headers = allowed_headers + if allowed_methods is not None: + self.allowed_methods = allowed_methods + if allowed_origins is not None: + self.allowed_origins = allowed_origins + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `CrossOriginResourceSharingPolicyRulePost`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(CrossOriginResourceSharingPolicyRulePost, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CrossOriginResourceSharingPolicyRulePost): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/cross_origin_resource_sharing_policy_rule_response.py b/pypureclient/flashblade/FB_2_14/models/cross_origin_resource_sharing_policy_rule_response.py new file mode 100644 index 000000000..21b9d3c39 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/cross_origin_resource_sharing_policy_rule_response.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class CrossOriginResourceSharingPolicyRuleResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'items': 'list[CrossOriginResourceSharingPolicyRule]' + } + + attribute_map = { + 'items': 'items' + } + + required_args = { + } + + def __init__( + self, + items=None, # type: List[models.CrossOriginResourceSharingPolicyRule] + ): + """ + Keyword args: + items (list[CrossOriginResourceSharingPolicyRule]) + """ + if items is not None: + self.items = items + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `CrossOriginResourceSharingPolicyRuleResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(CrossOriginResourceSharingPolicyRuleResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CrossOriginResourceSharingPolicyRuleResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/direction.py b/pypureclient/flashblade/FB_2_14/models/direction.py new file mode 100644 index 000000000..2d72f2b64 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/direction.py @@ -0,0 +1,105 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class Direction(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + } + + attribute_map = { + } + + required_args = { + } + + def __init__( + self, + ): + """ + Keyword args: + """ + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `Direction`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(Direction, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, Direction): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/directory_service.py b/pypureclient/flashblade/FB_2_14/models/directory_service.py new file mode 100644 index 000000000..549dbc1b8 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/directory_service.py @@ -0,0 +1,183 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class DirectoryService(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'name': 'str', + 'id': 'str', + 'base_dn': 'str', + 'bind_password': 'str', + 'bind_user': 'str', + 'ca_certificate': 'Reference', + 'ca_certificate_group': 'Reference', + 'enabled': 'bool', + 'management': 'DirectoryServiceManagement', + 'nfs': 'DirectoryServiceNfs', + 'services': 'list[str]', + 'smb': 'DirectoryServiceSmb', + 'uris': 'list[str]' + } + + attribute_map = { + 'name': 'name', + 'id': 'id', + 'base_dn': 'base_dn', + 'bind_password': 'bind_password', + 'bind_user': 'bind_user', + 'ca_certificate': 'ca_certificate', + 'ca_certificate_group': 'ca_certificate_group', + 'enabled': 'enabled', + 'management': 'management', + 'nfs': 'nfs', + 'services': 'services', + 'smb': 'smb', + 'uris': 'uris' + } + + required_args = { + } + + def __init__( + self, + name=None, # type: str + id=None, # type: str + base_dn=None, # type: str + bind_password=None, # type: str + bind_user=None, # type: str + ca_certificate=None, # type: models.Reference + ca_certificate_group=None, # type: models.Reference + enabled=None, # type: bool + management=None, # type: models.DirectoryServiceManagement + nfs=None, # type: models.DirectoryServiceNfs + services=None, # type: List[str] + smb=None, # type: models.DirectoryServiceSmb + uris=None, # type: List[str] + ): + """ + Keyword args: + name (str): Name of the object (e.g., a file system or snapshot). + id (str): A non-modifiable, globally unique ID chosen by the system. + base_dn (str): Base of the Distinguished Name (DN) of the directory service groups. + bind_password (str): Obfuscated password used to query the directory. + bind_user (str): Username used to query the directory. + ca_certificate (Reference): CA certificate used to validate the authenticity of the configured servers. + ca_certificate_group (Reference): A certificate group containing CA certificates that can be used to validate the authenticity of the configured servers. + enabled (bool): Is the directory service enabled or not? + management (DirectoryServiceManagement) + nfs (DirectoryServiceNfs) + services (list[str]): Services that the directory service configuration is used for. + smb (DirectoryServiceSmb) + uris (list[str]): List of URIs for the configured directory servers. + """ + if name is not None: + self.name = name + if id is not None: + self.id = id + if base_dn is not None: + self.base_dn = base_dn + if bind_password is not None: + self.bind_password = bind_password + if bind_user is not None: + self.bind_user = bind_user + if ca_certificate is not None: + self.ca_certificate = ca_certificate + if ca_certificate_group is not None: + self.ca_certificate_group = ca_certificate_group + if enabled is not None: + self.enabled = enabled + if management is not None: + self.management = management + if nfs is not None: + self.nfs = nfs + if services is not None: + self.services = services + if smb is not None: + self.smb = smb + if uris is not None: + self.uris = uris + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `DirectoryService`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(DirectoryService, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, DirectoryService): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/directory_service_get_response.py b/pypureclient/flashblade/FB_2_14/models/directory_service_get_response.py new file mode 100644 index 000000000..336f8901b --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/directory_service_get_response.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class DirectoryServiceGetResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'continuation_token': 'str', + 'total_item_count': 'int', + 'items': 'list[DirectoryService]' + } + + attribute_map = { + 'continuation_token': 'continuation_token', + 'total_item_count': 'total_item_count', + 'items': 'items' + } + + required_args = { + } + + def __init__( + self, + continuation_token=None, # type: str + total_item_count=None, # type: int + items=None, # type: List[models.DirectoryService] + ): + """ + Keyword args: + continuation_token (str): Continuation token that can be provided in the `continuation_token` query param to get the next page of data. If you use the `continuation_token` to page through data you are guaranteed to get all items exactly once regardless of how items are modified. If an item is added or deleted during the pagination then it may or may not be returned. The `continuation_token` is generated if the `limit` is less than the remaining number of items, and the default sort is used (no sort is specified). + total_item_count (int): Total number of items after applying `filter` params. + items (list[DirectoryService]) + """ + if continuation_token is not None: + self.continuation_token = continuation_token + if total_item_count is not None: + self.total_item_count = total_item_count + if items is not None: + self.items = items + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `DirectoryServiceGetResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(DirectoryServiceGetResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, DirectoryServiceGetResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/directory_service_management.py b/pypureclient/flashblade/FB_2_14/models/directory_service_management.py new file mode 100644 index 000000000..9b8b9628c --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/directory_service_management.py @@ -0,0 +1,117 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class DirectoryServiceManagement(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'user_login_attribute': 'str', + 'user_object_class': 'str' + } + + attribute_map = { + 'user_login_attribute': 'user_login_attribute', + 'user_object_class': 'user_object_class' + } + + required_args = { + } + + def __init__( + self, + user_login_attribute=None, # type: str + user_object_class=None, # type: str + ): + """ + Keyword args: + user_login_attribute (str): User login attribute in the structure of the configured LDAP servers. Typically the attribute field that holds the user's unique login name. Defaults to `sAMAccountName` for Active Directory servers, or `uid` for all other directory server types. + user_object_class (str): Value of the object class for a management LDAP user. Defaults to `User` for Active Directory servers, `posixAccount` or `shadowAccount` for OpenLDAP servers dependent on the server's group type, or `person` for all other directory servers. + """ + if user_login_attribute is not None: + self.user_login_attribute = user_login_attribute + if user_object_class is not None: + self.user_object_class = user_object_class + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `DirectoryServiceManagement`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(DirectoryServiceManagement, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, DirectoryServiceManagement): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/directory_service_nfs.py b/pypureclient/flashblade/FB_2_14/models/directory_service_nfs.py new file mode 100644 index 000000000..2430ed0a0 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/directory_service_nfs.py @@ -0,0 +1,117 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class DirectoryServiceNfs(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'nis_domains': 'list[str]', + 'nis_servers': 'list[str]' + } + + attribute_map = { + 'nis_domains': 'nis_domains', + 'nis_servers': 'nis_servers' + } + + required_args = { + } + + def __init__( + self, + nis_domains=None, # type: List[str] + nis_servers=None, # type: List[str] + ): + """ + Keyword args: + nis_domains (list[str]): NIS domains to search. + nis_servers (list[str]): A list of the IP addresses or hostnames of NIS servers to search. + """ + if nis_domains is not None: + self.nis_domains = nis_domains + if nis_servers is not None: + self.nis_servers = nis_servers + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `DirectoryServiceNfs`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(DirectoryServiceNfs, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, DirectoryServiceNfs): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/directory_service_response.py b/pypureclient/flashblade/FB_2_14/models/directory_service_response.py new file mode 100644 index 000000000..23e806aca --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/directory_service_response.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class DirectoryServiceResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'items': 'list[DirectoryService]' + } + + attribute_map = { + 'items': 'items' + } + + required_args = { + } + + def __init__( + self, + items=None, # type: List[models.DirectoryService] + ): + """ + Keyword args: + items (list[DirectoryService]) + """ + if items is not None: + self.items = items + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `DirectoryServiceResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(DirectoryServiceResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, DirectoryServiceResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/directory_service_role.py b/pypureclient/flashblade/FB_2_14/models/directory_service_role.py new file mode 100644 index 000000000..5daa91c66 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/directory_service_role.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class DirectoryServiceRole(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'group': 'str', + 'group_base': 'str', + 'id': 'str', + 'role': 'ReferenceWritable', + 'name': 'str' + } + + attribute_map = { + 'group': 'group', + 'group_base': 'group_base', + 'id': 'id', + 'role': 'role', + 'name': 'name' + } + + required_args = { + } + + def __init__( + self, + group=None, # type: str + group_base=None, # type: str + id=None, # type: str + role=None, # type: models.ReferenceWritable + name=None, # type: str + ): + """ + Keyword args: + group (str): Common Name (CN) of the directory service group containing users with authority level of the specified role name. + group_base (str): Specifies where the configured group is located in the directory tree. + id (str): A non-modifiable, globally unique ID chosen by the system. + role (ReferenceWritable): A reference to the role; can be any role that exists on the system. + name (str): Name of the role mapping object. + """ + if group is not None: + self.group = group + if group_base is not None: + self.group_base = group_base + if id is not None: + self.id = id + if role is not None: + self.role = role + if name is not None: + self.name = name + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `DirectoryServiceRole`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(DirectoryServiceRole, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, DirectoryServiceRole): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/directory_service_roles_get_response.py b/pypureclient/flashblade/FB_2_14/models/directory_service_roles_get_response.py new file mode 100644 index 000000000..7bef3a3d4 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/directory_service_roles_get_response.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class DirectoryServiceRolesGetResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'continuation_token': 'str', + 'total_item_count': 'int', + 'items': 'list[DirectoryServiceRole]' + } + + attribute_map = { + 'continuation_token': 'continuation_token', + 'total_item_count': 'total_item_count', + 'items': 'items' + } + + required_args = { + } + + def __init__( + self, + continuation_token=None, # type: str + total_item_count=None, # type: int + items=None, # type: List[models.DirectoryServiceRole] + ): + """ + Keyword args: + continuation_token (str): Continuation token that can be provided in the `continuation_token` query param to get the next page of data. If you use the `continuation_token` to page through data you are guaranteed to get all items exactly once regardless of how items are modified. If an item is added or deleted during the pagination then it may or may not be returned. The `continuation_token` is generated if the `limit` is less than the remaining number of items, and the default sort is used (no sort is specified). + total_item_count (int): Total number of items after applying `filter` params. + items (list[DirectoryServiceRole]) + """ + if continuation_token is not None: + self.continuation_token = continuation_token + if total_item_count is not None: + self.total_item_count = total_item_count + if items is not None: + self.items = items + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `DirectoryServiceRolesGetResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(DirectoryServiceRolesGetResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, DirectoryServiceRolesGetResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/directory_service_roles_response.py b/pypureclient/flashblade/FB_2_14/models/directory_service_roles_response.py new file mode 100644 index 000000000..f25fd4b16 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/directory_service_roles_response.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class DirectoryServiceRolesResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'items': 'list[DirectoryServiceRole]' + } + + attribute_map = { + 'items': 'items' + } + + required_args = { + } + + def __init__( + self, + items=None, # type: List[models.DirectoryServiceRole] + ): + """ + Keyword args: + items (list[DirectoryServiceRole]) + """ + if items is not None: + self.items = items + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `DirectoryServiceRolesResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(DirectoryServiceRolesResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, DirectoryServiceRolesResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/directory_service_smb.py b/pypureclient/flashblade/FB_2_14/models/directory_service_smb.py new file mode 100644 index 000000000..b5e71d39f --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/directory_service_smb.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class DirectoryServiceSmb(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'join_ou': 'str' + } + + attribute_map = { + 'join_ou': 'join_ou' + } + + required_args = { + } + + def __init__( + self, + join_ou=None, # type: str + ): + """ + Keyword args: + join_ou (str): Optional organizational unit where the machine account for the directory service will be created. + """ + if join_ou is not None: + self.join_ou = join_ou + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `DirectoryServiceSmb`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(DirectoryServiceSmb, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, DirectoryServiceSmb): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/dns.py b/pypureclient/flashblade/FB_2_14/models/dns.py new file mode 100644 index 000000000..c43454a08 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/dns.py @@ -0,0 +1,129 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class Dns(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'name': 'str', + 'id': 'str', + 'domain': 'str', + 'nameservers': 'list[str]' + } + + attribute_map = { + 'name': 'name', + 'id': 'id', + 'domain': 'domain', + 'nameservers': 'nameservers' + } + + required_args = { + } + + def __init__( + self, + name=None, # type: str + id=None, # type: str + domain=None, # type: str + nameservers=None, # type: List[str] + ): + """ + Keyword args: + name (str): Name of the object (e.g., a file system or snapshot). + id (str): A non-modifiable, globally unique ID chosen by the system. + domain (str): Domain suffix to be appended by the Array when performing DNS lookups. + nameservers (list[str]): List of DNS server IP addresses. + """ + if name is not None: + self.name = name + if id is not None: + self.id = id + if domain is not None: + self.domain = domain + if nameservers is not None: + self.nameservers = nameservers + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `Dns`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(Dns, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, Dns): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/dns_get_response.py b/pypureclient/flashblade/FB_2_14/models/dns_get_response.py new file mode 100644 index 000000000..ee3d06478 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/dns_get_response.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class DnsGetResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'continuation_token': 'str', + 'total_item_count': 'int', + 'items': 'list[Dns]' + } + + attribute_map = { + 'continuation_token': 'continuation_token', + 'total_item_count': 'total_item_count', + 'items': 'items' + } + + required_args = { + } + + def __init__( + self, + continuation_token=None, # type: str + total_item_count=None, # type: int + items=None, # type: List[models.Dns] + ): + """ + Keyword args: + continuation_token (str): Continuation token that can be provided in the `continuation_token` query param to get the next page of data. If you use the `continuation_token` to page through data you are guaranteed to get all items exactly once regardless of how items are modified. If an item is added or deleted during the pagination then it may or may not be returned. The `continuation_token` is generated if the `limit` is less than the remaining number of items, and the default sort is used (no sort is specified). + total_item_count (int): Total number of items after applying `filter` params. + items (list[Dns]): A list of dns objects. + """ + if continuation_token is not None: + self.continuation_token = continuation_token + if total_item_count is not None: + self.total_item_count = total_item_count + if items is not None: + self.items = items + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `DnsGetResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(DnsGetResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, DnsGetResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/dns_response.py b/pypureclient/flashblade/FB_2_14/models/dns_response.py new file mode 100644 index 000000000..151be91be --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/dns_response.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class DnsResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'items': 'list[Dns]' + } + + attribute_map = { + 'items': 'items' + } + + required_args = { + } + + def __init__( + self, + items=None, # type: List[models.Dns] + ): + """ + Keyword args: + items (list[Dns]): A list of dns objects. + """ + if items is not None: + self.items = items + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `DnsResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(DnsResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, DnsResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/drive.py b/pypureclient/flashblade/FB_2_14/models/drive.py new file mode 100644 index 000000000..bbca2099b --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/drive.py @@ -0,0 +1,152 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class Drive(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'name': 'str', + 'id': 'str', + 'details': 'str', + 'raw_capacity': 'int', + 'progress': 'float', + 'status': 'str', + 'type': 'str' + } + + attribute_map = { + 'name': 'name', + 'id': 'id', + 'details': 'details', + 'raw_capacity': 'raw_capacity', + 'progress': 'progress', + 'status': 'status', + 'type': 'type' + } + + required_args = { + } + + def __init__( + self, + name=None, # type: str + id=None, # type: str + details=None, # type: str + raw_capacity=None, # type: int + progress=None, # type: float + status=None, # type: str + type=None, # type: str + ): + """ + Keyword args: + name (str): Name of the object (e.g., a file system or snapshot). + id (str): A non-modifiable, globally unique ID chosen by the system. + details (str): Details about the status of the drive if not healthy. + raw_capacity (int) + progress (float): Reflects this drive's current progress toward completing a planned evacuation. If a planned evacuation is not occurring, the value will be `null`. + status (str): Current status of the drive. Valid values are `evacuated`, `evacuating`, `healthy`, `unhealthy`, `unused`, and `updating`. + type (str): The type of the module. Valid values are `DFM` and `DFMe`. + """ + if name is not None: + self.name = name + if id is not None: + self.id = id + if details is not None: + self.details = details + if raw_capacity is not None: + self.raw_capacity = raw_capacity + if progress is not None: + self.progress = progress + if status is not None: + self.status = status + if type is not None: + self.type = type + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `Drive`".format(key)) + if key == "progress" and value is not None: + if value > 1.0: + raise ValueError("Invalid value for `progress`, value must be less than or equal to `1.0`") + if value < 0.0: + raise ValueError("Invalid value for `progress`, must be a value greater than or equal to `0.0`") + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(Drive, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, Drive): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/drive_get_response.py b/pypureclient/flashblade/FB_2_14/models/drive_get_response.py new file mode 100644 index 000000000..c67ac718a --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/drive_get_response.py @@ -0,0 +1,129 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class DriveGetResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'continuation_token': 'str', + 'total_item_count': 'int', + 'total': 'object', + 'items': 'list[Drive]' + } + + attribute_map = { + 'continuation_token': 'continuation_token', + 'total_item_count': 'total_item_count', + 'total': 'total', + 'items': 'items' + } + + required_args = { + } + + def __init__( + self, + continuation_token=None, # type: str + total_item_count=None, # type: int + total=None, # type: object + items=None, # type: List[models.Drive] + ): + """ + Keyword args: + continuation_token (str): Continuation token that can be provided in the `continuation_token` query param to get the next page of data. If you use the `continuation_token` to page through data you are guaranteed to get all items exactly once regardless of how items are modified. If an item is added or deleted during the pagination then it may or may not be returned. The `continuation_token` is generated if the `limit` is less than the remaining number of items, and the default sort is used (no sort is specified). + total_item_count (int): Total number of items after applying `filter` params. + total (object) + items (list[Drive]): A list of drive objects. + """ + if continuation_token is not None: + self.continuation_token = continuation_token + if total_item_count is not None: + self.total_item_count = total_item_count + if total is not None: + self.total = total + if items is not None: + self.items = items + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `DriveGetResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(DriveGetResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, DriveGetResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/eula.py b/pypureclient/flashblade/FB_2_14/models/eula.py new file mode 100644 index 000000000..30b6b3d17 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/eula.py @@ -0,0 +1,117 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class Eula(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'agreement': 'str', + 'signature': 'EulaSignature' + } + + attribute_map = { + 'agreement': 'agreement', + 'signature': 'signature' + } + + required_args = { + } + + def __init__( + self, + agreement=None, # type: str + signature=None, # type: models.EulaSignature + ): + """ + Keyword args: + agreement (str): End User Agreement text. + signature (EulaSignature) + """ + if agreement is not None: + self.agreement = agreement + if signature is not None: + self.signature = signature + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `Eula`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(Eula, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, Eula): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/eula_get_response.py b/pypureclient/flashblade/FB_2_14/models/eula_get_response.py new file mode 100644 index 000000000..283f246bd --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/eula_get_response.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class EulaGetResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'continuation_token': 'str', + 'total_item_count': 'int', + 'items': 'list[Eula]' + } + + attribute_map = { + 'continuation_token': 'continuation_token', + 'total_item_count': 'total_item_count', + 'items': 'items' + } + + required_args = { + } + + def __init__( + self, + continuation_token=None, # type: str + total_item_count=None, # type: int + items=None, # type: List[models.Eula] + ): + """ + Keyword args: + continuation_token (str): Continuation token that can be provided in the `continuation_token` query param to get the next page of data. If you use the `continuation_token` to page through data you are guaranteed to get all items exactly once regardless of how items are modified. If an item is added or deleted during the pagination then it may or may not be returned. The `continuation_token` is generated if the `limit` is less than the remaining number of items, and the default sort is used (no sort is specified). + total_item_count (int): Total number of items after applying `filter` params. + items (list[Eula]) + """ + if continuation_token is not None: + self.continuation_token = continuation_token + if total_item_count is not None: + self.total_item_count = total_item_count + if items is not None: + self.items = items + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `EulaGetResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(EulaGetResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, EulaGetResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/eula_response.py b/pypureclient/flashblade/FB_2_14/models/eula_response.py new file mode 100644 index 000000000..724d83f59 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/eula_response.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class EulaResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'items': 'list[Eula]' + } + + attribute_map = { + 'items': 'items' + } + + required_args = { + } + + def __init__( + self, + items=None, # type: List[models.Eula] + ): + """ + Keyword args: + items (list[Eula]) + """ + if items is not None: + self.items = items + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `EulaResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(EulaResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, EulaResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/eula_signature.py b/pypureclient/flashblade/FB_2_14/models/eula_signature.py new file mode 100644 index 000000000..1cf34ae33 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/eula_signature.py @@ -0,0 +1,129 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class EulaSignature(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'accepted': 'int', + 'name': 'str', + 'title': 'str', + 'company': 'str' + } + + attribute_map = { + 'accepted': 'accepted', + 'name': 'name', + 'title': 'title', + 'company': 'company' + } + + required_args = { + } + + def __init__( + self, + accepted=None, # type: int + name=None, # type: str + title=None, # type: str + company=None, # type: str + ): + """ + Keyword args: + accepted (int): Accepted time in milliseconds since the UNIX epoch. + name (str): Name of the person who accepted the End User Agreement. This field is deprecated and the response will be `null`. Modification to this field will be ignored. + title (str): Title of the person who accepted the End User Agreement. This field is deprecated and the response will be `null`. Modification to this field will be ignored. + company (str): Company of the person who accepted the End User Agreement. This field is deprecated and the response will be `null`. Modification to this field will be ignored. + """ + if accepted is not None: + self.accepted = accepted + if name is not None: + self.name = name + if title is not None: + self.title = title + if company is not None: + self.company = company + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `EulaSignature`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(EulaSignature, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, EulaSignature): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/file_info.py b/pypureclient/flashblade/FB_2_14/models/file_info.py new file mode 100644 index 000000000..82370d407 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/file_info.py @@ -0,0 +1,117 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class FileInfo(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'name': 'str', + 'length': 'int' + } + + attribute_map = { + 'name': 'name', + 'length': 'length' + } + + required_args = { + } + + def __init__( + self, + name=None, # type: str + length=None, # type: int + ): + """ + Keyword args: + name (str): Name of the object (e.g., a file system or snapshot). + length (int): Length of the file (in bytes). + """ + if name is not None: + self.name = name + if length is not None: + self.length = length + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `FileInfo`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(FileInfo, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, FileInfo): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/file_lock.py b/pypureclient/flashblade/FB_2_14/models/file_lock.py new file mode 100644 index 000000000..cdae77cc3 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/file_lock.py @@ -0,0 +1,159 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class FileLock(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'name': 'str', + 'access_type': 'str', + 'client': 'FixedReferenceNoId', + 'created_at': 'int', + 'inode': 'int', + 'path': 'str', + 'protocol': 'str', + 'range': 'FileLockRange', + 'source': 'FixedReference' + } + + attribute_map = { + 'name': 'name', + 'access_type': 'access_type', + 'client': 'client', + 'created_at': 'created_at', + 'inode': 'inode', + 'path': 'path', + 'protocol': 'protocol', + 'range': 'range', + 'source': 'source' + } + + required_args = { + } + + def __init__( + self, + name=None, # type: str + access_type=None, # type: str + client=None, # type: models.FixedReferenceNoId + created_at=None, # type: int + inode=None, # type: int + path=None, # type: str + protocol=None, # type: str + range=None, # type: models.FileLockRange + source=None, # type: models.FixedReference + ): + """ + Keyword args: + name (str): Name of the object (e.g., a file system or snapshot). + access_type (str): Type of access the lock provides. Valid values are `shared`, `exclusive` and `no-access`. + client (FixedReferenceNoId): Reference to the file system client that holds the lock. + created_at (int): Creation timestamp of the lock. Measured in milliseconds since the UNIX epoch. + inode (int): The inode of the file where the lock is found relative to the specified `source`. + path (str): Path to the file where the lock is found relative to `source`. If it is longer than 1023 characters, it will be truncated and only the last 1023 characters will be returned. If multiple hard links exist to the file on which the lock is held, only one is returned. This field will be `null` if the path cannot be resolved. + protocol (str): The protocol utilized for obtaining and managing the lock. Valid values include `NLM`, `NFSv4.1` and `SMB`. + range (FileLockRange) + source (FixedReference): Reference to location where the path/inode can be found. + """ + if name is not None: + self.name = name + if access_type is not None: + self.access_type = access_type + if client is not None: + self.client = client + if created_at is not None: + self.created_at = created_at + if inode is not None: + self.inode = inode + if path is not None: + self.path = path + if protocol is not None: + self.protocol = protocol + if range is not None: + self.range = range + if source is not None: + self.source = source + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `FileLock`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(FileLock, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, FileLock): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/file_lock_get_response.py b/pypureclient/flashblade/FB_2_14/models/file_lock_get_response.py new file mode 100644 index 000000000..c62089b99 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/file_lock_get_response.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class FileLockGetResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'continuation_token': 'str', + 'total_item_count': 'int', + 'items': 'list[FileLock]' + } + + attribute_map = { + 'continuation_token': 'continuation_token', + 'total_item_count': 'total_item_count', + 'items': 'items' + } + + required_args = { + } + + def __init__( + self, + continuation_token=None, # type: str + total_item_count=None, # type: int + items=None, # type: List[models.FileLock] + ): + """ + Keyword args: + continuation_token (str): Continuation token that can be provided in the `continuation_token` query param to get the next page of data. If you use the `continuation_token` to page through data you are guaranteed to get all items exactly once regardless of how items are modified. If an item is added or deleted during the pagination then it may or may not be returned. The `continuation_token` is generated if the `limit` is less than the remaining number of items, and the default sort is used (no sort is specified). + total_item_count (int): Total number of items after applying `filter` params. + items (list[FileLock]): A list of file locks. + """ + if continuation_token is not None: + self.continuation_token = continuation_token + if total_item_count is not None: + self.total_item_count = total_item_count + if items is not None: + self.items = items + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `FileLockGetResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(FileLockGetResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, FileLockGetResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/file_lock_nlm_reclamation_response.py b/pypureclient/flashblade/FB_2_14/models/file_lock_nlm_reclamation_response.py new file mode 100644 index 000000000..f5720bc71 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/file_lock_nlm_reclamation_response.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class FileLockNlmReclamationResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'items': 'list[FileSystemLockNlmReclamation]' + } + + attribute_map = { + 'items': 'items' + } + + required_args = { + } + + def __init__( + self, + items=None, # type: List[models.FileSystemLockNlmReclamation] + ): + """ + Keyword args: + items (list[FileSystemLockNlmReclamation]) + """ + if items is not None: + self.items = items + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `FileLockNlmReclamationResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(FileLockNlmReclamationResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, FileLockNlmReclamationResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/file_lock_range.py b/pypureclient/flashblade/FB_2_14/models/file_lock_range.py new file mode 100644 index 000000000..ff40b26b0 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/file_lock_range.py @@ -0,0 +1,117 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class FileLockRange(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'length': 'int', + 'offset': 'int' + } + + attribute_map = { + 'length': 'length', + 'offset': 'offset' + } + + required_args = { + } + + def __init__( + self, + length=None, # type: int + offset=None, # type: int + ): + """ + Keyword args: + length (int) + offset (int) + """ + if length is not None: + self.length = length + if offset is not None: + self.offset = offset + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `FileLockRange`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(FileLockRange, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, FileLockRange): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/file_lock_response.py b/pypureclient/flashblade/FB_2_14/models/file_lock_response.py new file mode 100644 index 000000000..39aedb529 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/file_lock_response.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class FileLockResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'items': 'list[FileLock]' + } + + attribute_map = { + 'items': 'items' + } + + required_args = { + } + + def __init__( + self, + items=None, # type: List[models.FileLock] + ): + """ + Keyword args: + items (list[FileLock]): A list of file locks. + """ + if items is not None: + self.items = items + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `FileLockResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(FileLockResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, FileLockResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/file_session.py b/pypureclient/flashblade/FB_2_14/models/file_session.py new file mode 100644 index 000000000..328911799 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/file_session.py @@ -0,0 +1,165 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class FileSession(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'name': 'str', + 'authentication': 'str', + 'client': 'FixedReferenceNameOnly', + 'connection_time': 'int', + 'idle_time': 'int', + 'opens': 'int', + 'port': 'int', + 'protocol': 'str', + 'time': 'int', + 'user': 'UserNoId' + } + + attribute_map = { + 'name': 'name', + 'authentication': 'authentication', + 'client': 'client', + 'connection_time': 'connection_time', + 'idle_time': 'idle_time', + 'opens': 'opens', + 'port': 'port', + 'protocol': 'protocol', + 'time': 'time', + 'user': 'user' + } + + required_args = { + } + + def __init__( + self, + name=None, # type: str + authentication=None, # type: str + client=None, # type: models.FixedReferenceNameOnly + connection_time=None, # type: int + idle_time=None, # type: int + opens=None, # type: int + port=None, # type: int + protocol=None, # type: str + time=None, # type: int + user=None, # type: models.UserNoId + ): + """ + Keyword args: + name (str): Name of the object (e.g., a file system or snapshot). + authentication (str): Describes how was the user authenticated. Valid values include `KRB` and `NTLMv2`. + client (FixedReferenceNameOnly): Client that holds the session. + connection_time (int): Connection time in milliseconds since UNIX epoch. + idle_time (int): Duration in milliseconds that indicates how long the session has been idle. + opens (int): Number of opens for the given session. + port (int): Port number the client is connected from. + protocol (str): The protocol utilized for obtaining and managing the session. Valid values include `nfs` and `smb`. + time (int): Current time in milliseconds since UNIX epoch. + user (UserNoId): The user who has created the session. + """ + if name is not None: + self.name = name + if authentication is not None: + self.authentication = authentication + if client is not None: + self.client = client + if connection_time is not None: + self.connection_time = connection_time + if idle_time is not None: + self.idle_time = idle_time + if opens is not None: + self.opens = opens + if port is not None: + self.port = port + if protocol is not None: + self.protocol = protocol + if time is not None: + self.time = time + if user is not None: + self.user = user + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `FileSession`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(FileSession, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, FileSession): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/file_session_get_response.py b/pypureclient/flashblade/FB_2_14/models/file_session_get_response.py new file mode 100644 index 000000000..b7562c0af --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/file_session_get_response.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class FileSessionGetResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'continuation_token': 'str', + 'total_item_count': 'int', + 'items': 'list[FileSession]' + } + + attribute_map = { + 'continuation_token': 'continuation_token', + 'total_item_count': 'total_item_count', + 'items': 'items' + } + + required_args = { + } + + def __init__( + self, + continuation_token=None, # type: str + total_item_count=None, # type: int + items=None, # type: List[models.FileSession] + ): + """ + Keyword args: + continuation_token (str): Continuation token that can be provided in the `continuation_token` query param to get the next page of data. If you use the `continuation_token` to page through data you are guaranteed to get all items exactly once regardless of how items are modified. If an item is added or deleted during the pagination then it may or may not be returned. The `continuation_token` is generated if the `limit` is less than the remaining number of items, and the default sort is used (no sort is specified). + total_item_count (int): Total number of items after applying `filter` params. + items (list[FileSession]): A list of file sessions. + """ + if continuation_token is not None: + self.continuation_token = continuation_token + if total_item_count is not None: + self.total_item_count = total_item_count + if items is not None: + self.items = items + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `FileSessionGetResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(FileSessionGetResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, FileSessionGetResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/file_session_response.py b/pypureclient/flashblade/FB_2_14/models/file_session_response.py new file mode 100644 index 000000000..bfea5862d --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/file_session_response.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class FileSessionResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'items': 'list[FileSession]' + } + + attribute_map = { + 'items': 'items' + } + + required_args = { + } + + def __init__( + self, + items=None, # type: List[models.FileSession] + ): + """ + Keyword args: + items (list[FileSession]): A list of file sessions. + """ + if items is not None: + self.items = items + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `FileSessionResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(FileSessionResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, FileSessionResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/file_system.py b/pypureclient/flashblade/FB_2_14/models/file_system.py new file mode 100644 index 000000000..972b19b3d --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/file_system.py @@ -0,0 +1,231 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class FileSystem(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'name': 'str', + 'id': 'str', + 'created': 'int', + 'default_group_quota': 'int', + 'default_user_quota': 'int', + 'destroyed': 'bool', + 'fast_remove_directory_enabled': 'bool', + 'hard_limit_enabled': 'bool', + 'http': 'Http', + 'multi_protocol': 'MultiProtocol', + 'nfs': 'Nfs', + 'promotion_status': 'str', + 'provisioned': 'int', + 'requested_promotion_state': 'str', + 'smb': 'Smb', + 'snapshot_directory_enabled': 'bool', + 'source': 'LocationReference', + 'space': 'Space', + 'time_remaining': 'int', + 'writable': 'bool', + 'group_ownership': 'str' + } + + attribute_map = { + 'name': 'name', + 'id': 'id', + 'created': 'created', + 'default_group_quota': 'default_group_quota', + 'default_user_quota': 'default_user_quota', + 'destroyed': 'destroyed', + 'fast_remove_directory_enabled': 'fast_remove_directory_enabled', + 'hard_limit_enabled': 'hard_limit_enabled', + 'http': 'http', + 'multi_protocol': 'multi_protocol', + 'nfs': 'nfs', + 'promotion_status': 'promotion_status', + 'provisioned': 'provisioned', + 'requested_promotion_state': 'requested_promotion_state', + 'smb': 'smb', + 'snapshot_directory_enabled': 'snapshot_directory_enabled', + 'source': 'source', + 'space': 'space', + 'time_remaining': 'time_remaining', + 'writable': 'writable', + 'group_ownership': 'group_ownership' + } + + required_args = { + } + + def __init__( + self, + name=None, # type: str + id=None, # type: str + created=None, # type: int + default_group_quota=None, # type: int + default_user_quota=None, # type: int + destroyed=None, # type: bool + fast_remove_directory_enabled=None, # type: bool + hard_limit_enabled=None, # type: bool + http=None, # type: models.Http + multi_protocol=None, # type: models.MultiProtocol + nfs=None, # type: models.Nfs + promotion_status=None, # type: str + provisioned=None, # type: int + requested_promotion_state=None, # type: str + smb=None, # type: models.Smb + snapshot_directory_enabled=None, # type: bool + source=None, # type: models.LocationReference + space=None, # type: models.Space + time_remaining=None, # type: int + writable=None, # type: bool + group_ownership=None, # type: str + ): + """ + Keyword args: + name (str): Name of the object (e.g., a file system or snapshot). + id (str): A non-modifiable, globally unique ID chosen by the system. + created (int): Creation timestamp of the file system. + default_group_quota (int): The default space quota for a group writing to this file system. + default_user_quota (int): The default space quota for a user writing to this file system. + destroyed (bool): Returns a value of `true` if the file system has been destroyed and is pending eradication. The file system cannot be modified while it is in the destroyed state. The `time_remaining` value displays the amount of time left until the destroyed file system is permanently eradicated. Once eradication has begun, the file system can no longer be recovered. Before the `time_remaining` period has elapsed, the destroyed file system can be recovered through the PATCH method by setting `destroyed=false`. + fast_remove_directory_enabled (bool): If set to `true`, the file system, when mounted, will contain a directory that can be used for fast removal of other directories. Directories can be moved into the fast remove directory in order to have them deleted, and their space freed, more quickly than a normal removal operation. + hard_limit_enabled (bool): If set to `true`, the file system's size, as defined by `provisioned`, is used as a hard limit quota. + http (Http): HTTP configuration. + multi_protocol (MultiProtocol): Multi-protocol configuration. + nfs (Nfs) + promotion_status (str): Possible values are `promoted` and `demoted`. The current status of the file system with respect to replication. Changes via `requested_promotion_state`. The default for new file systems is `promoted`. + provisioned (int): The provisioned size of the file system, displayed in bytes. If set to an empty string (`\"\"`), the file system is unlimited in size. + requested_promotion_state (str): Possible values are `promoted` and `demoted`. The `demoted` state is used for replication targets and is only allowed to be set if the file system is in a replica-link relationship. The additional query param `discard-non-snapshotted-data` must be set to `true` when demoting a file system. The default for new file systems is `promoted`. + smb (Smb) + snapshot_directory_enabled (bool): If set to `true`, a hidden .snapshot directory will be present in each directory of the file system when it is mounted. The .snapshot directory allows clients read access to the contents of the snapshots that have been taken of a directory. If set to `false`, the .snapshot directory will not be present in any directories within a mounted file system. + source (LocationReference): A reference to the source file system. + space (Space) + time_remaining (int): Time in milliseconds before the file system is eradicated. `null` if not destroyed. + writable (bool): Whether the file system is writable or not. If `false`, this overrides any protocol or file permission settings and prevents changes. If `true`, then the protocol and file permission settings are evaluated. If not specified, defaults to `true`. Modifiable. + group_ownership (str): The group ownership for new files and directories in a file system. Possible values are `creator` and `parent-directory`. If `creator` is selected, the owning group of new files and directories is the primary group of the user who creates them. If `parent-directory` is selected, the owning group is the parent directory group. Note: Existing files and directories are unaffected by this change. + """ + if name is not None: + self.name = name + if id is not None: + self.id = id + if created is not None: + self.created = created + if default_group_quota is not None: + self.default_group_quota = default_group_quota + if default_user_quota is not None: + self.default_user_quota = default_user_quota + if destroyed is not None: + self.destroyed = destroyed + if fast_remove_directory_enabled is not None: + self.fast_remove_directory_enabled = fast_remove_directory_enabled + if hard_limit_enabled is not None: + self.hard_limit_enabled = hard_limit_enabled + if http is not None: + self.http = http + if multi_protocol is not None: + self.multi_protocol = multi_protocol + if nfs is not None: + self.nfs = nfs + if promotion_status is not None: + self.promotion_status = promotion_status + if provisioned is not None: + self.provisioned = provisioned + if requested_promotion_state is not None: + self.requested_promotion_state = requested_promotion_state + if smb is not None: + self.smb = smb + if snapshot_directory_enabled is not None: + self.snapshot_directory_enabled = snapshot_directory_enabled + if source is not None: + self.source = source + if space is not None: + self.space = space + if time_remaining is not None: + self.time_remaining = time_remaining + if writable is not None: + self.writable = writable + if group_ownership is not None: + self.group_ownership = group_ownership + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `FileSystem`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(FileSystem, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, FileSystem): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/file_system_client.py b/pypureclient/flashblade/FB_2_14/models/file_system_client.py new file mode 100644 index 000000000..9281e8bef --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/file_system_client.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class FileSystemClient(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'name': 'str' + } + + attribute_map = { + 'name': 'name' + } + + required_args = { + } + + def __init__( + self, + name=None, # type: str + ): + """ + Keyword args: + name (str): Name of the object (e.g., a file system or snapshot). + """ + if name is not None: + self.name = name + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `FileSystemClient`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(FileSystemClient, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, FileSystemClient): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/file_system_clients_get_response.py b/pypureclient/flashblade/FB_2_14/models/file_system_clients_get_response.py new file mode 100644 index 000000000..2184a2e04 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/file_system_clients_get_response.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class FileSystemClientsGetResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'continuation_token': 'str', + 'total_item_count': 'int', + 'items': 'list[FileSystemClient]' + } + + attribute_map = { + 'continuation_token': 'continuation_token', + 'total_item_count': 'total_item_count', + 'items': 'items' + } + + required_args = { + } + + def __init__( + self, + continuation_token=None, # type: str + total_item_count=None, # type: int + items=None, # type: List[models.FileSystemClient] + ): + """ + Keyword args: + continuation_token (str): Continuation token that can be provided in the `continuation_token` query param to get the next page of data. If you use the `continuation_token` to page through data you are guaranteed to get all items exactly once regardless of how items are modified. If an item is added or deleted during the pagination then it may or may not be returned. The `continuation_token` is generated if the `limit` is less than the remaining number of items, and the default sort is used (no sort is specified). + total_item_count (int): Total number of items after applying `filter` params. + items (list[FileSystemClient]): A list of file system clients. + """ + if continuation_token is not None: + self.continuation_token = continuation_token + if total_item_count is not None: + self.total_item_count = total_item_count + if items is not None: + self.items = items + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `FileSystemClientsGetResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(FileSystemClientsGetResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, FileSystemClientsGetResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/file_system_clients_response.py b/pypureclient/flashblade/FB_2_14/models/file_system_clients_response.py new file mode 100644 index 000000000..76263afd9 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/file_system_clients_response.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class FileSystemClientsResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'items': 'list[FileSystemClient]' + } + + attribute_map = { + 'items': 'items' + } + + required_args = { + } + + def __init__( + self, + items=None, # type: List[models.FileSystemClient] + ): + """ + Keyword args: + items (list[FileSystemClient]): A list of file system clients. + """ + if items is not None: + self.items = items + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `FileSystemClientsResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(FileSystemClientsResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, FileSystemClientsResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/file_system_get_response.py b/pypureclient/flashblade/FB_2_14/models/file_system_get_response.py new file mode 100644 index 000000000..afddb5bea --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/file_system_get_response.py @@ -0,0 +1,129 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class FileSystemGetResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'continuation_token': 'str', + 'total_item_count': 'int', + 'items': 'list[FileSystem]', + 'total': 'FileSystem' + } + + attribute_map = { + 'continuation_token': 'continuation_token', + 'total_item_count': 'total_item_count', + 'items': 'items', + 'total': 'total' + } + + required_args = { + } + + def __init__( + self, + continuation_token=None, # type: str + total_item_count=None, # type: int + items=None, # type: List[models.FileSystem] + total=None, # type: models.FileSystem + ): + """ + Keyword args: + continuation_token (str): Continuation token that can be provided in the `continuation_token` query param to get the next page of data. If you use the `continuation_token` to page through data you are guaranteed to get all items exactly once regardless of how items are modified. If an item is added or deleted during the pagination then it may or may not be returned. The `continuation_token` is generated if the `limit` is less than the remaining number of items, and the default sort is used (no sort is specified). + total_item_count (int): Total number of items after applying `filter` params. + items (list[FileSystem]): A list of file system objects. + total (FileSystem) + """ + if continuation_token is not None: + self.continuation_token = continuation_token + if total_item_count is not None: + self.total_item_count = total_item_count + if items is not None: + self.items = items + if total is not None: + self.total = total + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `FileSystemGetResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(FileSystemGetResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, FileSystemGetResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/file_system_group_performance.py b/pypureclient/flashblade/FB_2_14/models/file_system_group_performance.py new file mode 100644 index 000000000..7bbfda83e --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/file_system_group_performance.py @@ -0,0 +1,228 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class FileSystemGroupPerformance(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'name': 'str', + 'bytes_per_op': 'float', + 'bytes_per_read': 'float', + 'bytes_per_write': 'float', + 'file_system': 'FixedReference', + 'group': 'Group', + 'others_per_sec': 'float', + 'read_bytes_per_sec': 'float', + 'reads_per_sec': 'float', + 'time': 'int', + 'usec_per_other_op': 'float', + 'usec_per_read_op': 'float', + 'usec_per_write_op': 'float', + 'write_bytes_per_sec': 'float', + 'writes_per_sec': 'float' + } + + attribute_map = { + 'name': 'name', + 'bytes_per_op': 'bytes_per_op', + 'bytes_per_read': 'bytes_per_read', + 'bytes_per_write': 'bytes_per_write', + 'file_system': 'file_system', + 'group': 'group', + 'others_per_sec': 'others_per_sec', + 'read_bytes_per_sec': 'read_bytes_per_sec', + 'reads_per_sec': 'reads_per_sec', + 'time': 'time', + 'usec_per_other_op': 'usec_per_other_op', + 'usec_per_read_op': 'usec_per_read_op', + 'usec_per_write_op': 'usec_per_write_op', + 'write_bytes_per_sec': 'write_bytes_per_sec', + 'writes_per_sec': 'writes_per_sec' + } + + required_args = { + } + + def __init__( + self, + name=None, # type: str + bytes_per_op=None, # type: float + bytes_per_read=None, # type: float + bytes_per_write=None, # type: float + file_system=None, # type: models.FixedReference + group=None, # type: models.Group + others_per_sec=None, # type: float + read_bytes_per_sec=None, # type: float + reads_per_sec=None, # type: float + time=None, # type: int + usec_per_other_op=None, # type: float + usec_per_read_op=None, # type: float + usec_per_write_op=None, # type: float + write_bytes_per_sec=None, # type: float + writes_per_sec=None, # type: float + ): + """ + Keyword args: + name (str): Name of the object (e.g., a file system or snapshot). + bytes_per_op (float): Average operation size (read bytes+write bytes/read ops+write ops). + bytes_per_read (float): Average read size in bytes per read operation. + bytes_per_write (float): Average write size in bytes per write operation. + file_system (FixedReference): The file system on which the performance was measured. + group (Group): The group whose performance is represented. + others_per_sec (float): Other operations processed per second. + read_bytes_per_sec (float): Bytes read per second. + reads_per_sec (float): Read requests processed per second. + time (int): Sample time in milliseconds since UNIX epoch. + usec_per_other_op (float): Average time, measured in microseconds, it takes the array to process other operations. + usec_per_read_op (float): Average time, measured in microseconds, it takes the array to process a read request. + usec_per_write_op (float): Average time, measured in microseconds, it takes the array to process a write request. + write_bytes_per_sec (float): Bytes written per second. + writes_per_sec (float): Write requests processed per second. + """ + if name is not None: + self.name = name + if bytes_per_op is not None: + self.bytes_per_op = bytes_per_op + if bytes_per_read is not None: + self.bytes_per_read = bytes_per_read + if bytes_per_write is not None: + self.bytes_per_write = bytes_per_write + if file_system is not None: + self.file_system = file_system + if group is not None: + self.group = group + if others_per_sec is not None: + self.others_per_sec = others_per_sec + if read_bytes_per_sec is not None: + self.read_bytes_per_sec = read_bytes_per_sec + if reads_per_sec is not None: + self.reads_per_sec = reads_per_sec + if time is not None: + self.time = time + if usec_per_other_op is not None: + self.usec_per_other_op = usec_per_other_op + if usec_per_read_op is not None: + self.usec_per_read_op = usec_per_read_op + if usec_per_write_op is not None: + self.usec_per_write_op = usec_per_write_op + if write_bytes_per_sec is not None: + self.write_bytes_per_sec = write_bytes_per_sec + if writes_per_sec is not None: + self.writes_per_sec = writes_per_sec + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `FileSystemGroupPerformance`".format(key)) + if key == "bytes_per_op" and value is not None: + if value < 0.0: + raise ValueError("Invalid value for `bytes_per_op`, must be a value greater than or equal to `0.0`") + if key == "bytes_per_read" and value is not None: + if value < 0.0: + raise ValueError("Invalid value for `bytes_per_read`, must be a value greater than or equal to `0.0`") + if key == "bytes_per_write" and value is not None: + if value < 0.0: + raise ValueError("Invalid value for `bytes_per_write`, must be a value greater than or equal to `0.0`") + if key == "others_per_sec" and value is not None: + if value < 0.0: + raise ValueError("Invalid value for `others_per_sec`, must be a value greater than or equal to `0.0`") + if key == "read_bytes_per_sec" and value is not None: + if value < 0.0: + raise ValueError("Invalid value for `read_bytes_per_sec`, must be a value greater than or equal to `0.0`") + if key == "reads_per_sec" and value is not None: + if value < 0.0: + raise ValueError("Invalid value for `reads_per_sec`, must be a value greater than or equal to `0.0`") + if key == "usec_per_other_op" and value is not None: + if value < 0.0: + raise ValueError("Invalid value for `usec_per_other_op`, must be a value greater than or equal to `0.0`") + if key == "usec_per_read_op" and value is not None: + if value < 0.0: + raise ValueError("Invalid value for `usec_per_read_op`, must be a value greater than or equal to `0.0`") + if key == "usec_per_write_op" and value is not None: + if value < 0.0: + raise ValueError("Invalid value for `usec_per_write_op`, must be a value greater than or equal to `0.0`") + if key == "write_bytes_per_sec" and value is not None: + if value < 0.0: + raise ValueError("Invalid value for `write_bytes_per_sec`, must be a value greater than or equal to `0.0`") + if key == "writes_per_sec" and value is not None: + if value < 0.0: + raise ValueError("Invalid value for `writes_per_sec`, must be a value greater than or equal to `0.0`") + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(FileSystemGroupPerformance, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, FileSystemGroupPerformance): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/file_system_groups_performance_get_response.py b/pypureclient/flashblade/FB_2_14/models/file_system_groups_performance_get_response.py new file mode 100644 index 000000000..fdc663913 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/file_system_groups_performance_get_response.py @@ -0,0 +1,117 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class FileSystemGroupsPerformanceGetResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'items': 'list[FileSystemGroupPerformance]', + 'total': 'list[FileSystemGroupPerformance]' + } + + attribute_map = { + 'items': 'items', + 'total': 'total' + } + + required_args = { + } + + def __init__( + self, + items=None, # type: List[models.FileSystemGroupPerformance] + total=None, # type: List[models.FileSystemGroupPerformance] + ): + """ + Keyword args: + items (list[FileSystemGroupPerformance]): A list of file system group performance objects. + total (list[FileSystemGroupPerformance]): Total of all records after filtering. If `total_only` query param is `true`, then no items will be returned. + """ + if items is not None: + self.items = items + if total is not None: + self.total = total + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `FileSystemGroupsPerformanceGetResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(FileSystemGroupsPerformanceGetResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, FileSystemGroupsPerformanceGetResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/file_system_lock_nlm_reclamation.py b/pypureclient/flashblade/FB_2_14/models/file_system_lock_nlm_reclamation.py new file mode 100644 index 000000000..6e7d19140 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/file_system_lock_nlm_reclamation.py @@ -0,0 +1,117 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class FileSystemLockNlmReclamation(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'start': 'int', + 'end': 'int' + } + + attribute_map = { + 'start': 'start', + 'end': 'end' + } + + required_args = { + } + + def __init__( + self, + start=None, # type: int + end=None, # type: int + ): + """ + Keyword args: + start (int): Start time of the NLM reclamation in milliseconds since the UNIX epoch. + end (int): End time of the NLM reclamation in milliseconds since the UNIX epoch. + """ + if start is not None: + self.start = start + if end is not None: + self.end = end + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `FileSystemLockNlmReclamation`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(FileSystemLockNlmReclamation, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, FileSystemLockNlmReclamation): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/file_system_patch.py b/pypureclient/flashblade/FB_2_14/models/file_system_patch.py new file mode 100644 index 000000000..cc364d49b --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/file_system_patch.py @@ -0,0 +1,231 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class FileSystemPatch(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'name': 'str', + 'id': 'str', + 'created': 'int', + 'default_group_quota': 'int', + 'default_user_quota': 'int', + 'destroyed': 'bool', + 'fast_remove_directory_enabled': 'bool', + 'hard_limit_enabled': 'bool', + 'http': 'Http', + 'multi_protocol': 'MultiProtocol', + 'nfs': 'NfsPatch', + 'promotion_status': 'str', + 'provisioned': 'int', + 'requested_promotion_state': 'str', + 'smb': 'Smb', + 'snapshot_directory_enabled': 'bool', + 'source': 'FixedLocationReference', + 'space': 'TmpFB20Space', + 'time_remaining': 'int', + 'writable': 'bool', + 'group_ownership': 'str' + } + + attribute_map = { + 'name': 'name', + 'id': 'id', + 'created': 'created', + 'default_group_quota': 'default_group_quota', + 'default_user_quota': 'default_user_quota', + 'destroyed': 'destroyed', + 'fast_remove_directory_enabled': 'fast_remove_directory_enabled', + 'hard_limit_enabled': 'hard_limit_enabled', + 'http': 'http', + 'multi_protocol': 'multi_protocol', + 'nfs': 'nfs', + 'promotion_status': 'promotion_status', + 'provisioned': 'provisioned', + 'requested_promotion_state': 'requested_promotion_state', + 'smb': 'smb', + 'snapshot_directory_enabled': 'snapshot_directory_enabled', + 'source': 'source', + 'space': 'space', + 'time_remaining': 'time_remaining', + 'writable': 'writable', + 'group_ownership': 'group_ownership' + } + + required_args = { + } + + def __init__( + self, + name=None, # type: str + id=None, # type: str + created=None, # type: int + default_group_quota=None, # type: int + default_user_quota=None, # type: int + destroyed=None, # type: bool + fast_remove_directory_enabled=None, # type: bool + hard_limit_enabled=None, # type: bool + http=None, # type: models.Http + multi_protocol=None, # type: models.MultiProtocol + nfs=None, # type: models.NfsPatch + promotion_status=None, # type: str + provisioned=None, # type: int + requested_promotion_state=None, # type: str + smb=None, # type: models.Smb + snapshot_directory_enabled=None, # type: bool + source=None, # type: models.FixedLocationReference + space=None, # type: models.TmpFB20Space + time_remaining=None, # type: int + writable=None, # type: bool + group_ownership=None, # type: str + ): + """ + Keyword args: + name (str): Name of the object (e.g., a file system or snapshot). + id (str): A non-modifiable, globally unique ID chosen by the system. + created (int): Creation timestamp of the file system. + default_group_quota (int): The default space quota for a group writing to this file system. + default_user_quota (int): The default space quota for a user writing to this file system. + destroyed (bool): Returns a value of `true` if the file system has been destroyed and is pending eradication. The file system cannot be modified while it is in the destroyed state. The `time_remaining` value displays the amount of time left until the destroyed file system is permanently eradicated. Once eradication has begun, the file system can no longer be recovered. Before the `time_remaining` period has elapsed, the destroyed file system can be recovered through the PATCH method by setting `destroyed=false`. + fast_remove_directory_enabled (bool): If set to `true`, the file system, when mounted, will contain a directory that can be used for fast removal of other directories. Directories can be moved into the fast remove directory in order to have them deleted, and their space freed, more quickly than a normal removal operation. + hard_limit_enabled (bool): If set to `true`, the file system's size, as defined by `provisioned`, is used as a hard limit quota. + http (Http): HTTP configuration. + multi_protocol (MultiProtocol): Multi-protocol configuration. + nfs (NfsPatch): NFS configuration. + promotion_status (str): Possible values are `promoted` and `demoted`. The current status of the file system with respect to replication. Changes via `requested_promotion_state`. The default for new file systems is `promoted`. + provisioned (int): The provisioned size of the file system, displayed in bytes. If set to an empty string (`\"\"`), the file system is unlimited in size. + requested_promotion_state (str): Possible values are `promoted` and `demoted`. The `demoted` state is used for replication targets and is only allowed to be set if the file system is in a replica-link relationship. The additional query param `discard-non-snapshotted-data` must be set to `true` when demoting a file system. The default for new file systems is `promoted`. + smb (Smb): SMB configuration. + snapshot_directory_enabled (bool): If set to `true`, a hidden .snapshot directory will be present in each directory of the file system when it is mounted. The .snapshot directory allows clients read access to the contents of the snapshots that have been taken of a directory. If set to `false`, the .snapshot directory will not be present in any directories within a mounted file system. + source (FixedLocationReference): A reference to the source file system. + space (TmpFB20Space): The space usage of the file system. + time_remaining (int): Time in milliseconds before the file system is eradicated. `null` if not destroyed. + writable (bool): Whether the file system is writable or not. If `false`, this overrides any protocol or file permission settings and prevents changes. If `true`, then the protocol and file permission settings are evaluated. If not specified, defaults to `true`. Modifiable. + group_ownership (str): The group ownership for new files and directories in a file system. Possible values are `creator` and `parent-directory`. If `creator` is selected, the owning group of new files and directories is the primary group of the user who creates them. If `parent-directory` is selected, the owning group is the parent directory group. Note: Existing files and directories are unaffected by this change. + """ + if name is not None: + self.name = name + if id is not None: + self.id = id + if created is not None: + self.created = created + if default_group_quota is not None: + self.default_group_quota = default_group_quota + if default_user_quota is not None: + self.default_user_quota = default_user_quota + if destroyed is not None: + self.destroyed = destroyed + if fast_remove_directory_enabled is not None: + self.fast_remove_directory_enabled = fast_remove_directory_enabled + if hard_limit_enabled is not None: + self.hard_limit_enabled = hard_limit_enabled + if http is not None: + self.http = http + if multi_protocol is not None: + self.multi_protocol = multi_protocol + if nfs is not None: + self.nfs = nfs + if promotion_status is not None: + self.promotion_status = promotion_status + if provisioned is not None: + self.provisioned = provisioned + if requested_promotion_state is not None: + self.requested_promotion_state = requested_promotion_state + if smb is not None: + self.smb = smb + if snapshot_directory_enabled is not None: + self.snapshot_directory_enabled = snapshot_directory_enabled + if source is not None: + self.source = source + if space is not None: + self.space = space + if time_remaining is not None: + self.time_remaining = time_remaining + if writable is not None: + self.writable = writable + if group_ownership is not None: + self.group_ownership = group_ownership + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `FileSystemPatch`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(FileSystemPatch, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, FileSystemPatch): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/file_system_performance.py b/pypureclient/flashblade/FB_2_14/models/file_system_performance.py new file mode 100644 index 000000000..2e5a7c2fd --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/file_system_performance.py @@ -0,0 +1,222 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class FileSystemPerformance(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'name': 'str', + 'id': 'str', + 'bytes_per_op': 'float', + 'bytes_per_read': 'float', + 'bytes_per_write': 'float', + 'others_per_sec': 'float', + 'read_bytes_per_sec': 'float', + 'reads_per_sec': 'float', + 'time': 'int', + 'usec_per_other_op': 'float', + 'usec_per_read_op': 'float', + 'usec_per_write_op': 'float', + 'write_bytes_per_sec': 'float', + 'writes_per_sec': 'float' + } + + attribute_map = { + 'name': 'name', + 'id': 'id', + 'bytes_per_op': 'bytes_per_op', + 'bytes_per_read': 'bytes_per_read', + 'bytes_per_write': 'bytes_per_write', + 'others_per_sec': 'others_per_sec', + 'read_bytes_per_sec': 'read_bytes_per_sec', + 'reads_per_sec': 'reads_per_sec', + 'time': 'time', + 'usec_per_other_op': 'usec_per_other_op', + 'usec_per_read_op': 'usec_per_read_op', + 'usec_per_write_op': 'usec_per_write_op', + 'write_bytes_per_sec': 'write_bytes_per_sec', + 'writes_per_sec': 'writes_per_sec' + } + + required_args = { + } + + def __init__( + self, + name=None, # type: str + id=None, # type: str + bytes_per_op=None, # type: float + bytes_per_read=None, # type: float + bytes_per_write=None, # type: float + others_per_sec=None, # type: float + read_bytes_per_sec=None, # type: float + reads_per_sec=None, # type: float + time=None, # type: int + usec_per_other_op=None, # type: float + usec_per_read_op=None, # type: float + usec_per_write_op=None, # type: float + write_bytes_per_sec=None, # type: float + writes_per_sec=None, # type: float + ): + """ + Keyword args: + name (str): Name of the object (e.g., a file system or snapshot). + id (str): A non-modifiable, globally unique ID chosen by the system. + bytes_per_op (float): Average operation size (read bytes+write bytes/read ops+write ops). + bytes_per_read (float): Average read size in bytes per read operation. + bytes_per_write (float): Average write size in bytes per write operation. + others_per_sec (float): Other operations processed per second. + read_bytes_per_sec (float): Bytes read per second. + reads_per_sec (float): Read requests processed per second. + time (int): Sample time in milliseconds since UNIX epoch. + usec_per_other_op (float): Average time, measured in microseconds, it takes the array to process other operations. + usec_per_read_op (float): Average time, measured in microseconds, it takes the array to process a read request. + usec_per_write_op (float): Average time, measured in microseconds, it takes the array to process a write request. + write_bytes_per_sec (float): Bytes written per second. + writes_per_sec (float): Write requests processed per second. + """ + if name is not None: + self.name = name + if id is not None: + self.id = id + if bytes_per_op is not None: + self.bytes_per_op = bytes_per_op + if bytes_per_read is not None: + self.bytes_per_read = bytes_per_read + if bytes_per_write is not None: + self.bytes_per_write = bytes_per_write + if others_per_sec is not None: + self.others_per_sec = others_per_sec + if read_bytes_per_sec is not None: + self.read_bytes_per_sec = read_bytes_per_sec + if reads_per_sec is not None: + self.reads_per_sec = reads_per_sec + if time is not None: + self.time = time + if usec_per_other_op is not None: + self.usec_per_other_op = usec_per_other_op + if usec_per_read_op is not None: + self.usec_per_read_op = usec_per_read_op + if usec_per_write_op is not None: + self.usec_per_write_op = usec_per_write_op + if write_bytes_per_sec is not None: + self.write_bytes_per_sec = write_bytes_per_sec + if writes_per_sec is not None: + self.writes_per_sec = writes_per_sec + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `FileSystemPerformance`".format(key)) + if key == "bytes_per_op" and value is not None: + if value < 0.0: + raise ValueError("Invalid value for `bytes_per_op`, must be a value greater than or equal to `0.0`") + if key == "bytes_per_read" and value is not None: + if value < 0.0: + raise ValueError("Invalid value for `bytes_per_read`, must be a value greater than or equal to `0.0`") + if key == "bytes_per_write" and value is not None: + if value < 0.0: + raise ValueError("Invalid value for `bytes_per_write`, must be a value greater than or equal to `0.0`") + if key == "others_per_sec" and value is not None: + if value < 0.0: + raise ValueError("Invalid value for `others_per_sec`, must be a value greater than or equal to `0.0`") + if key == "read_bytes_per_sec" and value is not None: + if value < 0.0: + raise ValueError("Invalid value for `read_bytes_per_sec`, must be a value greater than or equal to `0.0`") + if key == "reads_per_sec" and value is not None: + if value < 0.0: + raise ValueError("Invalid value for `reads_per_sec`, must be a value greater than or equal to `0.0`") + if key == "usec_per_other_op" and value is not None: + if value < 0.0: + raise ValueError("Invalid value for `usec_per_other_op`, must be a value greater than or equal to `0.0`") + if key == "usec_per_read_op" and value is not None: + if value < 0.0: + raise ValueError("Invalid value for `usec_per_read_op`, must be a value greater than or equal to `0.0`") + if key == "usec_per_write_op" and value is not None: + if value < 0.0: + raise ValueError("Invalid value for `usec_per_write_op`, must be a value greater than or equal to `0.0`") + if key == "write_bytes_per_sec" and value is not None: + if value < 0.0: + raise ValueError("Invalid value for `write_bytes_per_sec`, must be a value greater than or equal to `0.0`") + if key == "writes_per_sec" and value is not None: + if value < 0.0: + raise ValueError("Invalid value for `writes_per_sec`, must be a value greater than or equal to `0.0`") + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(FileSystemPerformance, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, FileSystemPerformance): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/file_system_performance_get_response.py b/pypureclient/flashblade/FB_2_14/models/file_system_performance_get_response.py new file mode 100644 index 000000000..cb2cd99d8 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/file_system_performance_get_response.py @@ -0,0 +1,129 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class FileSystemPerformanceGetResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'continuation_token': 'str', + 'total_item_count': 'int', + 'items': 'list[FileSystemPerformance]', + 'total': 'list[FileSystemPerformance]' + } + + attribute_map = { + 'continuation_token': 'continuation_token', + 'total_item_count': 'total_item_count', + 'items': 'items', + 'total': 'total' + } + + required_args = { + } + + def __init__( + self, + continuation_token=None, # type: str + total_item_count=None, # type: int + items=None, # type: List[models.FileSystemPerformance] + total=None, # type: List[models.FileSystemPerformance] + ): + """ + Keyword args: + continuation_token (str): Continuation token that can be provided in the `continuation_token` query param to get the next page of data. If you use the `continuation_token` to page through data you are guaranteed to get all items exactly once regardless of how items are modified. If an item is added or deleted during the pagination then it may or may not be returned. The `continuation_token` is generated if the `limit` is less than the remaining number of items, and the default sort is used (no sort is specified). + total_item_count (int): Total number of items after applying `filter` params. + items (list[FileSystemPerformance]): A list of file system performance objects. + total (list[FileSystemPerformance]): Total of all records after filtering. If `total_only` query param is `true`, then no items will be returned. + """ + if continuation_token is not None: + self.continuation_token = continuation_token + if total_item_count is not None: + self.total_item_count = total_item_count + if items is not None: + self.items = items + if total is not None: + self.total = total + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `FileSystemPerformanceGetResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(FileSystemPerformanceGetResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, FileSystemPerformanceGetResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/file_system_post.py b/pypureclient/flashblade/FB_2_14/models/file_system_post.py new file mode 100644 index 000000000..db30388c1 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/file_system_post.py @@ -0,0 +1,189 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class FileSystemPost(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'default_group_quota': 'int', + 'default_user_quota': 'int', + 'fast_remove_directory_enabled': 'bool', + 'hard_limit_enabled': 'bool', + 'http': 'Http', + 'multi_protocol': 'MultiProtocolPost', + 'nfs': 'Nfs', + 'provisioned': 'int', + 'requested_promotion_state': 'str', + 'smb': 'SmbPost', + 'snapshot_directory_enabled': 'bool', + 'source': 'Reference', + 'writable': 'bool', + 'group_ownership': 'str' + } + + attribute_map = { + 'default_group_quota': 'default_group_quota', + 'default_user_quota': 'default_user_quota', + 'fast_remove_directory_enabled': 'fast_remove_directory_enabled', + 'hard_limit_enabled': 'hard_limit_enabled', + 'http': 'http', + 'multi_protocol': 'multi_protocol', + 'nfs': 'nfs', + 'provisioned': 'provisioned', + 'requested_promotion_state': 'requested_promotion_state', + 'smb': 'smb', + 'snapshot_directory_enabled': 'snapshot_directory_enabled', + 'source': 'source', + 'writable': 'writable', + 'group_ownership': 'group_ownership' + } + + required_args = { + } + + def __init__( + self, + default_group_quota=None, # type: int + default_user_quota=None, # type: int + fast_remove_directory_enabled=None, # type: bool + hard_limit_enabled=None, # type: bool + http=None, # type: models.Http + multi_protocol=None, # type: models.MultiProtocolPost + nfs=None, # type: models.Nfs + provisioned=None, # type: int + requested_promotion_state=None, # type: str + smb=None, # type: models.SmbPost + snapshot_directory_enabled=None, # type: bool + source=None, # type: models.Reference + writable=None, # type: bool + group_ownership=None, # type: str + ): + """ + Keyword args: + default_group_quota (int): The default space quota for a group writing to this file system. + default_user_quota (int): The default space quota for a user writing to this file system. + fast_remove_directory_enabled (bool): If set to `true`, the file system, when mounted, will contain a directory that can be used for fast removal of other directories. Directories can be moved into the fast remove directory in order to have them deleted, and their space freed, more quickly than a normal removal operation. If not specified, defaults to `false`. + hard_limit_enabled (bool): If set to `true`, the file system's size, as defined by `provisioned`, is used as a hard limit quota. If not specified, defaults to `false`. + http (Http): HTTP configuration. + multi_protocol (MultiProtocolPost): Multi-protocol configuration. + nfs (Nfs) + provisioned (int): The provisioned size of the file system, displayed in bytes. If set to an empty string (`\"\"`), the file system is unlimited in size. If not specified, defaults to unlimited. + requested_promotion_state (str): Possible values are `promoted` and `demoted`. The `demoted` state is used for replication targets and is only allowed to be set if the file system is in a replica-link relationship. The additional query param `discard-non-snapshotted-data` must be set to `true` when demoting a file system. The default for new file systems is `promoted`. + smb (SmbPost) + snapshot_directory_enabled (bool): If set to `true`, a hidden .snapshot directory will be present in each directory of the file system when it is mounted. The .snapshot directory allows clients read access to the contents of the snapshots that have been taken of a directory. If set to `false`, the .snapshot directory will not be present in any directories within a mounted file system. If not specified, defaults to `true`. + source (Reference): The source snapshot whose data is copied to the file system specified. + writable (bool): Whether the file system is writable or not. If `false`, this overrides any protocol or file permission settings and prevents changes. If `true`, then the protocol and file permission settings are evaluated. If not specified, defaults to `true`. Modifiable. + group_ownership (str): The group ownership for new files and directories in a file system. Possible values are `creator` and `parent-directory`. If `creator` is selected, the owning group of new files and directories is the primary group of the user who creates them. If `parent-directory` is selected, the owning group is the parent directory group. Note: Existing files and directories are unaffected by this change. If not specified, defaults to `creator`. + """ + if default_group_quota is not None: + self.default_group_quota = default_group_quota + if default_user_quota is not None: + self.default_user_quota = default_user_quota + if fast_remove_directory_enabled is not None: + self.fast_remove_directory_enabled = fast_remove_directory_enabled + if hard_limit_enabled is not None: + self.hard_limit_enabled = hard_limit_enabled + if http is not None: + self.http = http + if multi_protocol is not None: + self.multi_protocol = multi_protocol + if nfs is not None: + self.nfs = nfs + if provisioned is not None: + self.provisioned = provisioned + if requested_promotion_state is not None: + self.requested_promotion_state = requested_promotion_state + if smb is not None: + self.smb = smb + if snapshot_directory_enabled is not None: + self.snapshot_directory_enabled = snapshot_directory_enabled + if source is not None: + self.source = source + if writable is not None: + self.writable = writable + if group_ownership is not None: + self.group_ownership = group_ownership + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `FileSystemPost`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(FileSystemPost, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, FileSystemPost): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/file_system_replica_link.py b/pypureclient/flashblade/FB_2_14/models/file_system_replica_link.py new file mode 100644 index 000000000..d7c5f673c --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/file_system_replica_link.py @@ -0,0 +1,165 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class FileSystemReplicaLink(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'id': 'str', + 'direction': 'Direction', + 'lag': 'int', + 'status_details': 'str', + 'local_file_system': 'FixedReference', + 'policies': 'list[LocationReference]', + 'recovery_point': 'int', + 'remote': 'FixedReferenceNoResourceType', + 'remote_file_system': 'FixedReferenceNoResourceType', + 'status': 'str' + } + + attribute_map = { + 'id': 'id', + 'direction': 'direction', + 'lag': 'lag', + 'status_details': 'status_details', + 'local_file_system': 'local_file_system', + 'policies': 'policies', + 'recovery_point': 'recovery_point', + 'remote': 'remote', + 'remote_file_system': 'remote_file_system', + 'status': 'status' + } + + required_args = { + } + + def __init__( + self, + id=None, # type: str + direction=None, # type: models.Direction + lag=None, # type: int + status_details=None, # type: str + local_file_system=None, # type: models.FixedReference + policies=None, # type: List[models.LocationReference] + recovery_point=None, # type: int + remote=None, # type: models.FixedReferenceNoResourceType + remote_file_system=None, # type: models.FixedReferenceNoResourceType + status=None, # type: str + ): + """ + Keyword args: + id (str): A non-modifiable, globally unique ID chosen by the system. + direction (Direction) + lag (int): Duration in milliseconds that represents how far behind the replication target is from the source. This is the time difference between current time and `recovery_point`. + status_details (str): Detailed information about the status of the replica link when it is unhealthy. + local_file_system (FixedReference): Reference to a local file system. + policies (list[LocationReference]) + recovery_point (int): Time when the last replicated snapshot was created, in milliseconds since UNIX epoch. I.e. the recovery point if the file system is promoted. + remote (FixedReferenceNoResourceType): Reference to a remote array. + remote_file_system (FixedReferenceNoResourceType): Reference to a remote file system. + status (str): Status of the replica link. Values include `replicating`, `idle`, and `unhealthy`. + """ + if id is not None: + self.id = id + if direction is not None: + self.direction = direction + if lag is not None: + self.lag = lag + if status_details is not None: + self.status_details = status_details + if local_file_system is not None: + self.local_file_system = local_file_system + if policies is not None: + self.policies = policies + if recovery_point is not None: + self.recovery_point = recovery_point + if remote is not None: + self.remote = remote + if remote_file_system is not None: + self.remote_file_system = remote_file_system + if status is not None: + self.status = status + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `FileSystemReplicaLink`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(FileSystemReplicaLink, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, FileSystemReplicaLink): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/file_system_replica_link_get_response.py b/pypureclient/flashblade/FB_2_14/models/file_system_replica_link_get_response.py new file mode 100644 index 000000000..b4a075aa1 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/file_system_replica_link_get_response.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class FileSystemReplicaLinkGetResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'continuation_token': 'str', + 'total_item_count': 'int', + 'items': 'list[FileSystemReplicaLink]' + } + + attribute_map = { + 'continuation_token': 'continuation_token', + 'total_item_count': 'total_item_count', + 'items': 'items' + } + + required_args = { + } + + def __init__( + self, + continuation_token=None, # type: str + total_item_count=None, # type: int + items=None, # type: List[models.FileSystemReplicaLink] + ): + """ + Keyword args: + continuation_token (str): Continuation token that can be provided in the `continuation_token` query param to get the next page of data. If you use the `continuation_token` to page through data you are guaranteed to get all items exactly once regardless of how items are modified. If an item is added or deleted during the pagination then it may or may not be returned. The `continuation_token` is generated if the `limit` is less than the remaining number of items, and the default sort is used (no sort is specified). + total_item_count (int): Total number of items after applying `filter` params. + items (list[FileSystemReplicaLink]): A list of file system replica link objects. + """ + if continuation_token is not None: + self.continuation_token = continuation_token + if total_item_count is not None: + self.total_item_count = total_item_count + if items is not None: + self.items = items + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `FileSystemReplicaLinkGetResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(FileSystemReplicaLinkGetResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, FileSystemReplicaLinkGetResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/file_system_replica_link_response.py b/pypureclient/flashblade/FB_2_14/models/file_system_replica_link_response.py new file mode 100644 index 000000000..24cb6571a --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/file_system_replica_link_response.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class FileSystemReplicaLinkResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'items': 'list[FileSystemReplicaLink]' + } + + attribute_map = { + 'items': 'items' + } + + required_args = { + } + + def __init__( + self, + items=None, # type: List[models.FileSystemReplicaLink] + ): + """ + Keyword args: + items (list[FileSystemReplicaLink]): A list of file system replica link objects. + """ + if items is not None: + self.items = items + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `FileSystemReplicaLinkResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(FileSystemReplicaLinkResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, FileSystemReplicaLinkResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/file_system_response.py b/pypureclient/flashblade/FB_2_14/models/file_system_response.py new file mode 100644 index 000000000..a2168af94 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/file_system_response.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class FileSystemResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'items': 'list[FileSystem]' + } + + attribute_map = { + 'items': 'items' + } + + required_args = { + } + + def __init__( + self, + items=None, # type: List[models.FileSystem] + ): + """ + Keyword args: + items (list[FileSystem]): A list of file system objects. + """ + if items is not None: + self.items = items + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `FileSystemResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(FileSystemResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, FileSystemResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/file_system_snapshot.py b/pypureclient/flashblade/FB_2_14/models/file_system_snapshot.py new file mode 100644 index 000000000..42ff2fbc1 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/file_system_snapshot.py @@ -0,0 +1,171 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class FileSystemSnapshot(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'name': 'str', + 'id': 'str', + 'created': 'int', + 'destroyed': 'bool', + 'owner': 'FixedReference', + 'owner_destroyed': 'bool', + 'policies': 'list[FixedLocationReference]', + 'policy': 'FixedLocationReference', + 'source': 'FixedLocationReference', + 'suffix': 'str', + 'time_remaining': 'int' + } + + attribute_map = { + 'name': 'name', + 'id': 'id', + 'created': 'created', + 'destroyed': 'destroyed', + 'owner': 'owner', + 'owner_destroyed': 'owner_destroyed', + 'policies': 'policies', + 'policy': 'policy', + 'source': 'source', + 'suffix': 'suffix', + 'time_remaining': 'time_remaining' + } + + required_args = { + } + + def __init__( + self, + name=None, # type: str + id=None, # type: str + created=None, # type: int + destroyed=None, # type: bool + owner=None, # type: models.FixedReference + owner_destroyed=None, # type: bool + policies=None, # type: List[models.FixedLocationReference] + policy=None, # type: models.FixedLocationReference + source=None, # type: models.FixedLocationReference + suffix=None, # type: str + time_remaining=None, # type: int + ): + """ + Keyword args: + name (str): A name chosen by the user. Can be changed. Must be locally unique. + id (str): A non-modifiable, globally unique ID chosen by the system. + created (int): Creation timestamp of the object. + destroyed (bool): Is the file system snapshot destroyed? If not specified, defaults to `false`. + owner (FixedReference): A reference to the file system that owns this snapshot. If the owner is destroyed, this will be destroyed. + owner_destroyed (bool): Is the owning file system destroyed? + policies (list[FixedLocationReference]): An array of references to the associated policies. + policy (FixedLocationReference): A reference to the associated policy that drives the behavior of the snapshot. + source (FixedLocationReference): A reference to the file system that was the source of the data in this snapshot. Normally this is the same as the owner, but if the snapshot is replicated, the source is the original file system. + suffix (str): The suffix of the snapshot, e.g., `snap1`. + time_remaining (int): Time in milliseconds before the file system snapshot is eradicated. `null` if not destroyed. + """ + if name is not None: + self.name = name + if id is not None: + self.id = id + if created is not None: + self.created = created + if destroyed is not None: + self.destroyed = destroyed + if owner is not None: + self.owner = owner + if owner_destroyed is not None: + self.owner_destroyed = owner_destroyed + if policies is not None: + self.policies = policies + if policy is not None: + self.policy = policy + if source is not None: + self.source = source + if suffix is not None: + self.suffix = suffix + if time_remaining is not None: + self.time_remaining = time_remaining + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `FileSystemSnapshot`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(FileSystemSnapshot, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, FileSystemSnapshot): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/file_system_snapshot_get_response.py b/pypureclient/flashblade/FB_2_14/models/file_system_snapshot_get_response.py new file mode 100644 index 000000000..2ababf8cd --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/file_system_snapshot_get_response.py @@ -0,0 +1,129 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class FileSystemSnapshotGetResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'continuation_token': 'str', + 'total_item_count': 'int', + 'items': 'list[FileSystemSnapshot]', + 'total': 'FileSystemSnapshot' + } + + attribute_map = { + 'continuation_token': 'continuation_token', + 'total_item_count': 'total_item_count', + 'items': 'items', + 'total': 'total' + } + + required_args = { + } + + def __init__( + self, + continuation_token=None, # type: str + total_item_count=None, # type: int + items=None, # type: List[models.FileSystemSnapshot] + total=None, # type: models.FileSystemSnapshot + ): + """ + Keyword args: + continuation_token (str): Continuation token that can be provided in the `continuation_token` query param to get the next page of data. If you use the `continuation_token` to page through data you are guaranteed to get all items exactly once regardless of how items are modified. If an item is added or deleted during the pagination then it may or may not be returned. The `continuation_token` is generated if the `limit` is less than the remaining number of items, and the default sort is used (no sort is specified). + total_item_count (int): Total number of items after applying `filter` params. + items (list[FileSystemSnapshot]): A list of file system snapshot objects. + total (FileSystemSnapshot): If `total_only` query param is `true`, then it will be a total of all records after filtering and no items will be returned. If `total_only` is `false`, then it will be a total of all records on this page. + """ + if continuation_token is not None: + self.continuation_token = continuation_token + if total_item_count is not None: + self.total_item_count = total_item_count + if items is not None: + self.items = items + if total is not None: + self.total = total + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `FileSystemSnapshotGetResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(FileSystemSnapshotGetResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, FileSystemSnapshotGetResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/file_system_snapshot_get_transfer_response.py b/pypureclient/flashblade/FB_2_14/models/file_system_snapshot_get_transfer_response.py new file mode 100644 index 000000000..9cb035f5d --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/file_system_snapshot_get_transfer_response.py @@ -0,0 +1,129 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class FileSystemSnapshotGetTransferResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'continuation_token': 'str', + 'total_item_count': 'int', + 'items': 'list[FileSystemSnapshotTransfer]', + 'total': 'FileSystemSnapshotTransfer' + } + + attribute_map = { + 'continuation_token': 'continuation_token', + 'total_item_count': 'total_item_count', + 'items': 'items', + 'total': 'total' + } + + required_args = { + } + + def __init__( + self, + continuation_token=None, # type: str + total_item_count=None, # type: int + items=None, # type: List[models.FileSystemSnapshotTransfer] + total=None, # type: models.FileSystemSnapshotTransfer + ): + """ + Keyword args: + continuation_token (str): Continuation token that can be provided in the `continuation_token` query param to get the next page of data. If you use the `continuation_token` to page through data you are guaranteed to get all items exactly once regardless of how items are modified. If an item is added or deleted during the pagination then it may or may not be returned. The `continuation_token` is generated if the `limit` is less than the remaining number of items, and the default sort is used (no sort is specified). + total_item_count (int): Total number of items after applying `filter` params. + items (list[FileSystemSnapshotTransfer]): A list of file system snapshot objects. + total (FileSystemSnapshotTransfer): If `total_only` query param is `true`, then it will be a total of all records after filtering and no items will be returned. If `total_only` is `false`, then it will be a total of all records on this page. + """ + if continuation_token is not None: + self.continuation_token = continuation_token + if total_item_count is not None: + self.total_item_count = total_item_count + if items is not None: + self.items = items + if total is not None: + self.total = total + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `FileSystemSnapshotGetTransferResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(FileSystemSnapshotGetTransferResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, FileSystemSnapshotGetTransferResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/file_system_snapshot_post.py b/pypureclient/flashblade/FB_2_14/models/file_system_snapshot_post.py new file mode 100644 index 000000000..778344576 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/file_system_snapshot_post.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class FileSystemSnapshotPost(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'suffix': 'str' + } + + attribute_map = { + 'suffix': 'suffix' + } + + required_args = { + } + + def __init__( + self, + suffix=None, # type: str + ): + """ + Keyword args: + suffix (str): The suffix of the snapshot, e.g., `snap1`. + """ + if suffix is not None: + self.suffix = suffix + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `FileSystemSnapshotPost`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(FileSystemSnapshotPost, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, FileSystemSnapshotPost): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/file_system_snapshot_response.py b/pypureclient/flashblade/FB_2_14/models/file_system_snapshot_response.py new file mode 100644 index 000000000..40feda094 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/file_system_snapshot_response.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class FileSystemSnapshotResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'items': 'list[FileSystemSnapshot]' + } + + attribute_map = { + 'items': 'items' + } + + required_args = { + } + + def __init__( + self, + items=None, # type: List[models.FileSystemSnapshot] + ): + """ + Keyword args: + items (list[FileSystemSnapshot]): A list of file system snapshot objects. + """ + if items is not None: + self.items = items + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `FileSystemSnapshotResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(FileSystemSnapshotResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, FileSystemSnapshotResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/file_system_snapshot_transfer.py b/pypureclient/flashblade/FB_2_14/models/file_system_snapshot_transfer.py new file mode 100644 index 000000000..0f9231d57 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/file_system_snapshot_transfer.py @@ -0,0 +1,176 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class FileSystemSnapshotTransfer(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'name': 'str', + 'id': 'str', + 'completed': 'int', + 'data_transferred': 'int', + 'direction': 'Direction', + 'progress': 'float', + 'remote': 'FixedReferenceNoResourceType', + 'remote_snapshot': 'FixedReferenceNoResourceType', + 'started': 'int', + 'status': 'str', + 'local_snapshot': 'FixedReferenceNoResourceType' + } + + attribute_map = { + 'name': 'name', + 'id': 'id', + 'completed': 'completed', + 'data_transferred': 'data_transferred', + 'direction': 'direction', + 'progress': 'progress', + 'remote': 'remote', + 'remote_snapshot': 'remote_snapshot', + 'started': 'started', + 'status': 'status', + 'local_snapshot': 'local_snapshot' + } + + required_args = { + } + + def __init__( + self, + name=None, # type: str + id=None, # type: str + completed=None, # type: int + data_transferred=None, # type: int + direction=None, # type: models.Direction + progress=None, # type: float + remote=None, # type: models.FixedReferenceNoResourceType + remote_snapshot=None, # type: models.FixedReferenceNoResourceType + started=None, # type: int + status=None, # type: str + local_snapshot=None, # type: models.FixedReferenceNoResourceType + ): + """ + Keyword args: + name (str): Name of the object (e.g., a file system or snapshot). + id (str): A non-modifiable, globally unique ID chosen by the system. + completed (int): A timestamp at which the replication of the snapshot completed. + data_transferred (int): The amount of data transferred to the target, in bytes. + direction (Direction) + progress (float): A percentage that indicates how much progress has been made on the transfer. + remote (FixedReferenceNoResourceType): The array where the remote file system snapshot is located. + remote_snapshot (FixedReferenceNoResourceType): A reference to the associated remote file system snapshot. + started (int): A timestamp at which the replication of the snapshot started. + status (str): The status of current replication. Valid values are `completed`, `in-progress`, and `queued`. + local_snapshot (FixedReferenceNoResourceType): A reference to the associated local file system snapshot. + """ + if name is not None: + self.name = name + if id is not None: + self.id = id + if completed is not None: + self.completed = completed + if data_transferred is not None: + self.data_transferred = data_transferred + if direction is not None: + self.direction = direction + if progress is not None: + self.progress = progress + if remote is not None: + self.remote = remote + if remote_snapshot is not None: + self.remote_snapshot = remote_snapshot + if started is not None: + self.started = started + if status is not None: + self.status = status + if local_snapshot is not None: + self.local_snapshot = local_snapshot + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `FileSystemSnapshotTransfer`".format(key)) + if key == "progress" and value is not None: + if value > 1: + raise ValueError("Invalid value for `progress`, value must be less than or equal to `1`") + if value < 0: + raise ValueError("Invalid value for `progress`, must be a value greater than or equal to `0`") + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(FileSystemSnapshotTransfer, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, FileSystemSnapshotTransfer): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/file_system_snapshot_transfer_response.py b/pypureclient/flashblade/FB_2_14/models/file_system_snapshot_transfer_response.py new file mode 100644 index 000000000..0eac85ffd --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/file_system_snapshot_transfer_response.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class FileSystemSnapshotTransferResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'items': 'list[FileSystemSnapshotTransfer]' + } + + attribute_map = { + 'items': 'items' + } + + required_args = { + } + + def __init__( + self, + items=None, # type: List[models.FileSystemSnapshotTransfer] + ): + """ + Keyword args: + items (list[FileSystemSnapshotTransfer]): A list of file system snapshot objects. + """ + if items is not None: + self.items = items + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `FileSystemSnapshotTransferResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(FileSystemSnapshotTransferResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, FileSystemSnapshotTransferResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/file_system_user_performance.py b/pypureclient/flashblade/FB_2_14/models/file_system_user_performance.py new file mode 100644 index 000000000..b5bbdb82d --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/file_system_user_performance.py @@ -0,0 +1,228 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class FileSystemUserPerformance(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'name': 'str', + 'bytes_per_op': 'float', + 'bytes_per_read': 'float', + 'bytes_per_write': 'float', + 'file_system': 'FixedReference', + 'others_per_sec': 'float', + 'read_bytes_per_sec': 'float', + 'reads_per_sec': 'float', + 'time': 'int', + 'usec_per_other_op': 'float', + 'usec_per_read_op': 'float', + 'usec_per_write_op': 'float', + 'user': 'User', + 'write_bytes_per_sec': 'float', + 'writes_per_sec': 'float' + } + + attribute_map = { + 'name': 'name', + 'bytes_per_op': 'bytes_per_op', + 'bytes_per_read': 'bytes_per_read', + 'bytes_per_write': 'bytes_per_write', + 'file_system': 'file_system', + 'others_per_sec': 'others_per_sec', + 'read_bytes_per_sec': 'read_bytes_per_sec', + 'reads_per_sec': 'reads_per_sec', + 'time': 'time', + 'usec_per_other_op': 'usec_per_other_op', + 'usec_per_read_op': 'usec_per_read_op', + 'usec_per_write_op': 'usec_per_write_op', + 'user': 'user', + 'write_bytes_per_sec': 'write_bytes_per_sec', + 'writes_per_sec': 'writes_per_sec' + } + + required_args = { + } + + def __init__( + self, + name=None, # type: str + bytes_per_op=None, # type: float + bytes_per_read=None, # type: float + bytes_per_write=None, # type: float + file_system=None, # type: models.FixedReference + others_per_sec=None, # type: float + read_bytes_per_sec=None, # type: float + reads_per_sec=None, # type: float + time=None, # type: int + usec_per_other_op=None, # type: float + usec_per_read_op=None, # type: float + usec_per_write_op=None, # type: float + user=None, # type: models.User + write_bytes_per_sec=None, # type: float + writes_per_sec=None, # type: float + ): + """ + Keyword args: + name (str): Name of the object (e.g., a file system or snapshot). + bytes_per_op (float): Average operation size (read bytes+write bytes/read ops+write ops). + bytes_per_read (float): Average read size in bytes per read operation. + bytes_per_write (float): Average write size in bytes per write operation. + file_system (FixedReference): The file system on which the performance was measured. + others_per_sec (float): Other operations processed per second. + read_bytes_per_sec (float): Bytes read per second. + reads_per_sec (float): Read requests processed per second. + time (int): Sample time in milliseconds since UNIX epoch. + usec_per_other_op (float): Average time, measured in microseconds, it takes the array to process other operations. + usec_per_read_op (float): Average time, measured in microseconds, it takes the array to process a read request. + usec_per_write_op (float): Average time, measured in microseconds, it takes the array to process a write request. + user (User): The user whose performance is represented. + write_bytes_per_sec (float): Bytes written per second. + writes_per_sec (float): Write requests processed per second. + """ + if name is not None: + self.name = name + if bytes_per_op is not None: + self.bytes_per_op = bytes_per_op + if bytes_per_read is not None: + self.bytes_per_read = bytes_per_read + if bytes_per_write is not None: + self.bytes_per_write = bytes_per_write + if file_system is not None: + self.file_system = file_system + if others_per_sec is not None: + self.others_per_sec = others_per_sec + if read_bytes_per_sec is not None: + self.read_bytes_per_sec = read_bytes_per_sec + if reads_per_sec is not None: + self.reads_per_sec = reads_per_sec + if time is not None: + self.time = time + if usec_per_other_op is not None: + self.usec_per_other_op = usec_per_other_op + if usec_per_read_op is not None: + self.usec_per_read_op = usec_per_read_op + if usec_per_write_op is not None: + self.usec_per_write_op = usec_per_write_op + if user is not None: + self.user = user + if write_bytes_per_sec is not None: + self.write_bytes_per_sec = write_bytes_per_sec + if writes_per_sec is not None: + self.writes_per_sec = writes_per_sec + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `FileSystemUserPerformance`".format(key)) + if key == "bytes_per_op" and value is not None: + if value < 0.0: + raise ValueError("Invalid value for `bytes_per_op`, must be a value greater than or equal to `0.0`") + if key == "bytes_per_read" and value is not None: + if value < 0.0: + raise ValueError("Invalid value for `bytes_per_read`, must be a value greater than or equal to `0.0`") + if key == "bytes_per_write" and value is not None: + if value < 0.0: + raise ValueError("Invalid value for `bytes_per_write`, must be a value greater than or equal to `0.0`") + if key == "others_per_sec" and value is not None: + if value < 0.0: + raise ValueError("Invalid value for `others_per_sec`, must be a value greater than or equal to `0.0`") + if key == "read_bytes_per_sec" and value is not None: + if value < 0.0: + raise ValueError("Invalid value for `read_bytes_per_sec`, must be a value greater than or equal to `0.0`") + if key == "reads_per_sec" and value is not None: + if value < 0.0: + raise ValueError("Invalid value for `reads_per_sec`, must be a value greater than or equal to `0.0`") + if key == "usec_per_other_op" and value is not None: + if value < 0.0: + raise ValueError("Invalid value for `usec_per_other_op`, must be a value greater than or equal to `0.0`") + if key == "usec_per_read_op" and value is not None: + if value < 0.0: + raise ValueError("Invalid value for `usec_per_read_op`, must be a value greater than or equal to `0.0`") + if key == "usec_per_write_op" and value is not None: + if value < 0.0: + raise ValueError("Invalid value for `usec_per_write_op`, must be a value greater than or equal to `0.0`") + if key == "write_bytes_per_sec" and value is not None: + if value < 0.0: + raise ValueError("Invalid value for `write_bytes_per_sec`, must be a value greater than or equal to `0.0`") + if key == "writes_per_sec" and value is not None: + if value < 0.0: + raise ValueError("Invalid value for `writes_per_sec`, must be a value greater than or equal to `0.0`") + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(FileSystemUserPerformance, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, FileSystemUserPerformance): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/file_system_users_performance_get_response.py b/pypureclient/flashblade/FB_2_14/models/file_system_users_performance_get_response.py new file mode 100644 index 000000000..e86511a21 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/file_system_users_performance_get_response.py @@ -0,0 +1,117 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class FileSystemUsersPerformanceGetResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'items': 'list[FileSystemUserPerformance]', + 'total': 'list[FileSystemUserPerformance]' + } + + attribute_map = { + 'items': 'items', + 'total': 'total' + } + + required_args = { + } + + def __init__( + self, + items=None, # type: List[models.FileSystemUserPerformance] + total=None, # type: List[models.FileSystemUserPerformance] + ): + """ + Keyword args: + items (list[FileSystemUserPerformance]): A list of file system user performance objects. + total (list[FileSystemUserPerformance]): Total of all records after filtering. If `total_only` query param is `true`, then no items will be returned. + """ + if items is not None: + self.items = items + if total is not None: + self.total = total + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `FileSystemUsersPerformanceGetResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(FileSystemUsersPerformanceGetResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, FileSystemUsersPerformanceGetResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/fixed_location_reference.py b/pypureclient/flashblade/FB_2_14/models/fixed_location_reference.py new file mode 100644 index 000000000..dde44832d --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/fixed_location_reference.py @@ -0,0 +1,141 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class FixedLocationReference(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'id': 'str', + 'name': 'str', + 'resource_type': 'ResourceType', + 'display_name': 'str', + 'is_local': 'bool', + 'location': 'FixedReference' + } + + attribute_map = { + 'id': 'id', + 'name': 'name', + 'resource_type': 'resource_type', + 'display_name': 'display_name', + 'is_local': 'is_local', + 'location': 'location' + } + + required_args = { + } + + def __init__( + self, + id=None, # type: str + name=None, # type: str + resource_type=None, # type: models.ResourceType + display_name=None, # type: str + is_local=None, # type: bool + location=None, # type: models.FixedReference + ): + """ + Keyword args: + id (str): A non-modifiable, globally unique ID chosen by the system. + name (str) + resource_type (ResourceType) + display_name (str): Full name of the source with remote array information. Response will be same as source name for local file systems and policies. + is_local (bool): -> Is the location reference to the local array or somewhere remote? + location (FixedReference): A reference to the location where the object is defined. + """ + if id is not None: + self.id = id + if name is not None: + self.name = name + if resource_type is not None: + self.resource_type = resource_type + if display_name is not None: + self.display_name = display_name + if is_local is not None: + self.is_local = is_local + if location is not None: + self.location = location + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `FixedLocationReference`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(FixedLocationReference, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, FixedLocationReference): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/fixed_reference.py b/pypureclient/flashblade/FB_2_14/models/fixed_reference.py new file mode 100644 index 000000000..2d77a07fa --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/fixed_reference.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class FixedReference(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'id': 'str', + 'name': 'str', + 'resource_type': 'ResourceType' + } + + attribute_map = { + 'id': 'id', + 'name': 'name', + 'resource_type': 'resource_type' + } + + required_args = { + } + + def __init__( + self, + id=None, # type: str + name=None, # type: str + resource_type=None, # type: models.ResourceType + ): + """ + Keyword args: + id (str): A non-modifiable, globally unique ID chosen by the system. + name (str) + resource_type (ResourceType) + """ + if id is not None: + self.id = id + if name is not None: + self.name = name + if resource_type is not None: + self.resource_type = resource_type + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `FixedReference`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(FixedReference, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, FixedReference): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/fixed_reference_name_only.py b/pypureclient/flashblade/FB_2_14/models/fixed_reference_name_only.py new file mode 100644 index 000000000..ba8cb54c9 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/fixed_reference_name_only.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class FixedReferenceNameOnly(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'name': 'str' + } + + attribute_map = { + 'name': 'name' + } + + required_args = { + } + + def __init__( + self, + name=None, # type: str + ): + """ + Keyword args: + name (str) + """ + if name is not None: + self.name = name + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `FixedReferenceNameOnly`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(FixedReferenceNameOnly, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, FixedReferenceNameOnly): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/fixed_reference_no_id.py b/pypureclient/flashblade/FB_2_14/models/fixed_reference_no_id.py new file mode 100644 index 000000000..707fcfe3a --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/fixed_reference_no_id.py @@ -0,0 +1,117 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class FixedReferenceNoId(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'name': 'str', + 'resource_type': 'ResourceType' + } + + attribute_map = { + 'name': 'name', + 'resource_type': 'resource_type' + } + + required_args = { + } + + def __init__( + self, + name=None, # type: str + resource_type=None, # type: models.ResourceType + ): + """ + Keyword args: + name (str) + resource_type (ResourceType) + """ + if name is not None: + self.name = name + if resource_type is not None: + self.resource_type = resource_type + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `FixedReferenceNoId`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(FixedReferenceNoId, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, FixedReferenceNoId): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/fixed_reference_no_resource_type.py b/pypureclient/flashblade/FB_2_14/models/fixed_reference_no_resource_type.py new file mode 100644 index 000000000..7beb69163 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/fixed_reference_no_resource_type.py @@ -0,0 +1,117 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class FixedReferenceNoResourceType(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'id': 'str', + 'name': 'str' + } + + attribute_map = { + 'id': 'id', + 'name': 'name' + } + + required_args = { + } + + def __init__( + self, + id=None, # type: str + name=None, # type: str + ): + """ + Keyword args: + id (str): A non-modifiable, globally unique ID chosen by the system. + name (str) + """ + if id is not None: + self.id = id + if name is not None: + self.name = name + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `FixedReferenceNoResourceType`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(FixedReferenceNoResourceType, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, FixedReferenceNoResourceType): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/fixed_reference_with_remote.py b/pypureclient/flashblade/FB_2_14/models/fixed_reference_with_remote.py new file mode 100644 index 000000000..0f93294ca --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/fixed_reference_with_remote.py @@ -0,0 +1,129 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class FixedReferenceWithRemote(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'id': 'str', + 'name': 'str', + 'resource_type': 'ResourceType', + 'remote': 'FixedReferenceNoResourceType' + } + + attribute_map = { + 'id': 'id', + 'name': 'name', + 'resource_type': 'resource_type', + 'remote': 'remote' + } + + required_args = { + } + + def __init__( + self, + id=None, # type: str + name=None, # type: str + resource_type=None, # type: models.ResourceType + remote=None, # type: models.FixedReferenceNoResourceType + ): + """ + Keyword args: + id (str): A non-modifiable, globally unique ID chosen by the system. + name (str) + resource_type (ResourceType) + remote (FixedReferenceNoResourceType): The remote field of the corresponding array connection. + """ + if id is not None: + self.id = id + if name is not None: + self.name = name + if resource_type is not None: + self.resource_type = resource_type + if remote is not None: + self.remote = remote + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `FixedReferenceWithRemote`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(FixedReferenceWithRemote, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, FixedReferenceWithRemote): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/group.py b/pypureclient/flashblade/FB_2_14/models/group.py new file mode 100644 index 000000000..122e2e28d --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/group.py @@ -0,0 +1,117 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class Group(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'id': 'int', + 'name': 'str' + } + + attribute_map = { + 'id': 'id', + 'name': 'name' + } + + required_args = { + } + + def __init__( + self, + id=None, # type: int + name=None, # type: str + ): + """ + Keyword args: + id (int): The numeric group id that represents the group's identity in a POSIX system. + name (str): The group name that represents the group's identity, and which resolves to the group's id in a configured directory service. + """ + if id is not None: + self.id = id + if name is not None: + self.name = name + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `Group`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(Group, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, Group): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/group_quota.py b/pypureclient/flashblade/FB_2_14/models/group_quota.py new file mode 100644 index 000000000..0b81960b2 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/group_quota.py @@ -0,0 +1,141 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class GroupQuota(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'name': 'str', + 'file_system': 'FixedReference', + 'file_system_default_quota': 'int', + 'group': 'Group', + 'quota': 'int', + 'usage': 'int' + } + + attribute_map = { + 'name': 'name', + 'file_system': 'file_system', + 'file_system_default_quota': 'file_system_default_quota', + 'group': 'group', + 'quota': 'quota', + 'usage': 'usage' + } + + required_args = { + } + + def __init__( + self, + name=None, # type: str + file_system=None, # type: models.FixedReference + file_system_default_quota=None, # type: int + group=None, # type: models.Group + quota=None, # type: int + usage=None, # type: int + ): + """ + Keyword args: + name (str): Name of the object (e.g., a file system or snapshot). + file_system (FixedReference) + file_system_default_quota (int): File system's default group quota (in bytes). If it is `0`, it means there is no default quota. This will be the effective group quota if the group doesn't have an individual quota. This default quota is set through the `file-systems` endpoint. + group (Group): The group on which this quota is enforced. + quota (int): The space limit of the quota (in bytes) for the specified group, cannot be `0`. If specified, this value will override the file system's default group quota. + usage (int): The usage of the file system (in bytes) by the specified group. + """ + if name is not None: + self.name = name + if file_system is not None: + self.file_system = file_system + if file_system_default_quota is not None: + self.file_system_default_quota = file_system_default_quota + if group is not None: + self.group = group + if quota is not None: + self.quota = quota + if usage is not None: + self.usage = usage + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `GroupQuota`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(GroupQuota, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, GroupQuota): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/group_quota_get_response.py b/pypureclient/flashblade/FB_2_14/models/group_quota_get_response.py new file mode 100644 index 000000000..8cfc13f39 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/group_quota_get_response.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class GroupQuotaGetResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'continuation_token': 'str', + 'total_item_count': 'int', + 'items': 'list[GroupQuota]' + } + + attribute_map = { + 'continuation_token': 'continuation_token', + 'total_item_count': 'total_item_count', + 'items': 'items' + } + + required_args = { + } + + def __init__( + self, + continuation_token=None, # type: str + total_item_count=None, # type: int + items=None, # type: List[models.GroupQuota] + ): + """ + Keyword args: + continuation_token (str): Continuation token that can be provided in the `continuation_token` query param to get the next page of data. If you use the `continuation_token` to page through data you are guaranteed to get all items exactly once regardless of how items are modified. If an item is added or deleted during the pagination then it may or may not be returned. The `continuation_token` is generated if the `limit` is less than the remaining number of items, and the default sort is used (no sort is specified). + total_item_count (int): Total number of items after applying `filter` params. + items (list[GroupQuota]): A list of quota objects. + """ + if continuation_token is not None: + self.continuation_token = continuation_token + if total_item_count is not None: + self.total_item_count = total_item_count + if items is not None: + self.items = items + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `GroupQuotaGetResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(GroupQuotaGetResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, GroupQuotaGetResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/group_quota_patch.py b/pypureclient/flashblade/FB_2_14/models/group_quota_patch.py new file mode 100644 index 000000000..c3a002c57 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/group_quota_patch.py @@ -0,0 +1,105 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class GroupQuotaPatch(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + } + + attribute_map = { + } + + required_args = { + } + + def __init__( + self, + ): + """ + Keyword args: + """ + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `GroupQuotaPatch`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(GroupQuotaPatch, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, GroupQuotaPatch): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/group_quota_post.py b/pypureclient/flashblade/FB_2_14/models/group_quota_post.py new file mode 100644 index 000000000..e7b9804f4 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/group_quota_post.py @@ -0,0 +1,119 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class GroupQuotaPost(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'name': 'str', + 'quota': 'int' + } + + attribute_map = { + 'name': 'name', + 'quota': 'quota' + } + + required_args = { + 'quota', + } + + def __init__( + self, + quota, # type: int + name=None, # type: str + ): + """ + Keyword args: + name (str): Name of the object (e.g., a file system or snapshot). + quota (int, required): The space limit of the quota (in bytes) for the specified group, cannot be `0`. If specified, this value will override the file system's default group quota. + """ + if name is not None: + self.name = name + self.quota = quota + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `GroupQuotaPost`".format(key)) + if key == "quota" and value is None: + raise ValueError("Invalid value for `quota`, must not be `None`") + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(GroupQuotaPost, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, GroupQuotaPost): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/group_quota_response.py b/pypureclient/flashblade/FB_2_14/models/group_quota_response.py new file mode 100644 index 000000000..8570e72b5 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/group_quota_response.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class GroupQuotaResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'items': 'list[GroupQuota]' + } + + attribute_map = { + 'items': 'items' + } + + required_args = { + } + + def __init__( + self, + items=None, # type: List[models.GroupQuota] + ): + """ + Keyword args: + items (list[GroupQuota]): A list of quota objects. + """ + if items is not None: + self.items = items + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `GroupQuotaResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(GroupQuotaResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, GroupQuotaResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/hardware.py b/pypureclient/flashblade/FB_2_14/models/hardware.py new file mode 100644 index 000000000..1cb3f396f --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/hardware.py @@ -0,0 +1,183 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class Hardware(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'name': 'str', + 'id': 'str', + 'details': 'str', + 'identify_enabled': 'bool', + 'index': 'int', + 'model': 'str', + 'serial': 'str', + 'slot': 'int', + 'speed': 'int', + 'status': 'str', + 'temperature': 'int', + 'type': 'str', + 'part_number': 'str' + } + + attribute_map = { + 'name': 'name', + 'id': 'id', + 'details': 'details', + 'identify_enabled': 'identify_enabled', + 'index': 'index', + 'model': 'model', + 'serial': 'serial', + 'slot': 'slot', + 'speed': 'speed', + 'status': 'status', + 'temperature': 'temperature', + 'type': 'type', + 'part_number': 'part_number' + } + + required_args = { + } + + def __init__( + self, + name=None, # type: str + id=None, # type: str + details=None, # type: str + identify_enabled=None, # type: bool + index=None, # type: int + model=None, # type: str + serial=None, # type: str + slot=None, # type: int + speed=None, # type: int + status=None, # type: str + temperature=None, # type: int + type=None, # type: str + part_number=None, # type: str + ): + """ + Keyword args: + name (str): Name of the object (e.g., a file system or snapshot). + id (str): A non-modifiable, globally unique ID chosen by the system. + details (str): Details about the status of the component if not healthy. + identify_enabled (bool): State of an LED used to visually identify the component. + index (int): Number that identifies the relative position of a hardware component within the array. + model (str): Model number of the hardware component. + serial (str): Serial number of the hardware component. + slot (int): Slot number occupied by the PCI Express card that hosts the component. + speed (int): The maximum speed (in b/s) at which the component is capable of operating. + status (str): Component status. Valid values are `critical`, `healthy`, `identifying`, `unhealthy`, `unknown`, and `unused`. + temperature (int): Temperature (in degrees celsius) reported by the component. + type (str): Type of hardware component. Valid values are `bay`, `ch`, `eth`, `fan`, `fb`, `fm`, `pwr`, and `xfm`. + part_number (str): Part number of the hardware component. + """ + if name is not None: + self.name = name + if id is not None: + self.id = id + if details is not None: + self.details = details + if identify_enabled is not None: + self.identify_enabled = identify_enabled + if index is not None: + self.index = index + if model is not None: + self.model = model + if serial is not None: + self.serial = serial + if slot is not None: + self.slot = slot + if speed is not None: + self.speed = speed + if status is not None: + self.status = status + if temperature is not None: + self.temperature = temperature + if type is not None: + self.type = type + if part_number is not None: + self.part_number = part_number + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `Hardware`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(Hardware, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, Hardware): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/hardware_connector.py b/pypureclient/flashblade/FB_2_14/models/hardware_connector.py new file mode 100644 index 000000000..482bd91a2 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/hardware_connector.py @@ -0,0 +1,141 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class HardwareConnector(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'name': 'str', + 'id': 'str', + 'connector_type': 'str', + 'lane_speed': 'int', + 'port_count': 'int', + 'transceiver_type': 'str' + } + + attribute_map = { + 'name': 'name', + 'id': 'id', + 'connector_type': 'connector_type', + 'lane_speed': 'lane_speed', + 'port_count': 'port_count', + 'transceiver_type': 'transceiver_type' + } + + required_args = { + } + + def __init__( + self, + name=None, # type: str + id=None, # type: str + connector_type=None, # type: str + lane_speed=None, # type: int + port_count=None, # type: int + transceiver_type=None, # type: str + ): + """ + Keyword args: + name (str): Name of the object (e.g., a file system or snapshot). + id (str): A non-modifiable, globally unique ID chosen by the system. + connector_type (str): Form-factor of the interface. Valid values include `QSFP` and `RJ-45`. + lane_speed (int): Configured speed of each lane in the connector in bits-per-second. + port_count (int): Configured number of ports in the connector (1/2/4 for QSFP). + transceiver_type (str): Details about the transceiver which is plugged into the connector port. Transceiver type will be read-only for pureuser. If nothing is plugged into QSFP port, value will be `Unused` and type cannot be auto-detected, and internal user has not specified a type - value will be `Unknown`. If transceiver is plugged in, and type is auto-detected, and/or type has been explicitly set by internal user - that value will be shown. Transceiver type is not applicable for RJ-45 connectors. + """ + if name is not None: + self.name = name + if id is not None: + self.id = id + if connector_type is not None: + self.connector_type = connector_type + if lane_speed is not None: + self.lane_speed = lane_speed + if port_count is not None: + self.port_count = port_count + if transceiver_type is not None: + self.transceiver_type = transceiver_type + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `HardwareConnector`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(HardwareConnector, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, HardwareConnector): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/hardware_connector_get_response.py b/pypureclient/flashblade/FB_2_14/models/hardware_connector_get_response.py new file mode 100644 index 000000000..bcdbbf6f9 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/hardware_connector_get_response.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class HardwareConnectorGetResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'continuation_token': 'str', + 'total_item_count': 'int', + 'items': 'list[HardwareConnector]' + } + + attribute_map = { + 'continuation_token': 'continuation_token', + 'total_item_count': 'total_item_count', + 'items': 'items' + } + + required_args = { + } + + def __init__( + self, + continuation_token=None, # type: str + total_item_count=None, # type: int + items=None, # type: List[models.HardwareConnector] + ): + """ + Keyword args: + continuation_token (str): Continuation token that can be provided in the `continuation_token` query param to get the next page of data. If you use the `continuation_token` to page through data you are guaranteed to get all items exactly once regardless of how items are modified. If an item is added or deleted during the pagination then it may or may not be returned. The `continuation_token` is generated if the `limit` is less than the remaining number of items, and the default sort is used (no sort is specified). + total_item_count (int): Total number of items after applying `filter` params. + items (list[HardwareConnector]): A list of connector objects. + """ + if continuation_token is not None: + self.continuation_token = continuation_token + if total_item_count is not None: + self.total_item_count = total_item_count + if items is not None: + self.items = items + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `HardwareConnectorGetResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(HardwareConnectorGetResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, HardwareConnectorGetResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/hardware_connector_performance.py b/pypureclient/flashblade/FB_2_14/models/hardware_connector_performance.py new file mode 100644 index 000000000..eed5d867d --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/hardware_connector_performance.py @@ -0,0 +1,219 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class HardwareConnectorPerformance(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'name': 'str', + 'id': 'str', + 'link_aggregation_group': 'FixedReference', + 'other_errors_per_sec': 'int', + 'received_bytes_per_sec': 'int', + 'received_crc_errors_per_sec': 'int', + 'received_frame_errors_per_sec': 'int', + 'received_packets_per_sec': 'int', + 'time': 'int', + 'total_errors_per_sec': 'int', + 'transmitted_bytes_per_sec': 'int', + 'transmitted_carrier_errors_per_sec': 'int', + 'transmitted_dropped_errors_per_sec': 'int', + 'transmitted_packets_per_sec': 'int' + } + + attribute_map = { + 'name': 'name', + 'id': 'id', + 'link_aggregation_group': 'link_aggregation_group', + 'other_errors_per_sec': 'other_errors_per_sec', + 'received_bytes_per_sec': 'received_bytes_per_sec', + 'received_crc_errors_per_sec': 'received_crc_errors_per_sec', + 'received_frame_errors_per_sec': 'received_frame_errors_per_sec', + 'received_packets_per_sec': 'received_packets_per_sec', + 'time': 'time', + 'total_errors_per_sec': 'total_errors_per_sec', + 'transmitted_bytes_per_sec': 'transmitted_bytes_per_sec', + 'transmitted_carrier_errors_per_sec': 'transmitted_carrier_errors_per_sec', + 'transmitted_dropped_errors_per_sec': 'transmitted_dropped_errors_per_sec', + 'transmitted_packets_per_sec': 'transmitted_packets_per_sec' + } + + required_args = { + } + + def __init__( + self, + name=None, # type: str + id=None, # type: str + link_aggregation_group=None, # type: models.FixedReference + other_errors_per_sec=None, # type: int + received_bytes_per_sec=None, # type: int + received_crc_errors_per_sec=None, # type: int + received_frame_errors_per_sec=None, # type: int + received_packets_per_sec=None, # type: int + time=None, # type: int + total_errors_per_sec=None, # type: int + transmitted_bytes_per_sec=None, # type: int + transmitted_carrier_errors_per_sec=None, # type: int + transmitted_dropped_errors_per_sec=None, # type: int + transmitted_packets_per_sec=None, # type: int + ): + """ + Keyword args: + name (str): Name of the object (e.g., a file system or snapshot). + id (str): A non-modifiable, globally unique ID chosen by the system. + link_aggregation_group (FixedReference): The link aggregation group which this entity belongs to. + other_errors_per_sec (int): The sum of unspecified reception and transmission errors per second. + received_bytes_per_sec (int): Bytes received per second. + received_crc_errors_per_sec (int): Reception CRC errors per second. + received_frame_errors_per_sec (int): Received packet frame errors per second. + received_packets_per_sec (int): Packets received per second. + time (int): Sample time in milliseconds since UNIX epoch. + total_errors_per_sec (int): The sum of all reception and transmission errors per second. + transmitted_bytes_per_sec (int): Bytes transmitted per second. + transmitted_carrier_errors_per_sec (int): Transmission carrier errors per second. + transmitted_dropped_errors_per_sec (int): Transmitted packets dropped per second. + transmitted_packets_per_sec (int): Packets transmitted per second. + """ + if name is not None: + self.name = name + if id is not None: + self.id = id + if link_aggregation_group is not None: + self.link_aggregation_group = link_aggregation_group + if other_errors_per_sec is not None: + self.other_errors_per_sec = other_errors_per_sec + if received_bytes_per_sec is not None: + self.received_bytes_per_sec = received_bytes_per_sec + if received_crc_errors_per_sec is not None: + self.received_crc_errors_per_sec = received_crc_errors_per_sec + if received_frame_errors_per_sec is not None: + self.received_frame_errors_per_sec = received_frame_errors_per_sec + if received_packets_per_sec is not None: + self.received_packets_per_sec = received_packets_per_sec + if time is not None: + self.time = time + if total_errors_per_sec is not None: + self.total_errors_per_sec = total_errors_per_sec + if transmitted_bytes_per_sec is not None: + self.transmitted_bytes_per_sec = transmitted_bytes_per_sec + if transmitted_carrier_errors_per_sec is not None: + self.transmitted_carrier_errors_per_sec = transmitted_carrier_errors_per_sec + if transmitted_dropped_errors_per_sec is not None: + self.transmitted_dropped_errors_per_sec = transmitted_dropped_errors_per_sec + if transmitted_packets_per_sec is not None: + self.transmitted_packets_per_sec = transmitted_packets_per_sec + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `HardwareConnectorPerformance`".format(key)) + if key == "other_errors_per_sec" and value is not None: + if value < 0: + raise ValueError("Invalid value for `other_errors_per_sec`, must be a value greater than or equal to `0`") + if key == "received_bytes_per_sec" and value is not None: + if value < 0: + raise ValueError("Invalid value for `received_bytes_per_sec`, must be a value greater than or equal to `0`") + if key == "received_crc_errors_per_sec" and value is not None: + if value < 0: + raise ValueError("Invalid value for `received_crc_errors_per_sec`, must be a value greater than or equal to `0`") + if key == "received_frame_errors_per_sec" and value is not None: + if value < 0: + raise ValueError("Invalid value for `received_frame_errors_per_sec`, must be a value greater than or equal to `0`") + if key == "received_packets_per_sec" and value is not None: + if value < 0: + raise ValueError("Invalid value for `received_packets_per_sec`, must be a value greater than or equal to `0`") + if key == "total_errors_per_sec" and value is not None: + if value < 0: + raise ValueError("Invalid value for `total_errors_per_sec`, must be a value greater than or equal to `0`") + if key == "transmitted_bytes_per_sec" and value is not None: + if value < 0: + raise ValueError("Invalid value for `transmitted_bytes_per_sec`, must be a value greater than or equal to `0`") + if key == "transmitted_carrier_errors_per_sec" and value is not None: + if value < 0: + raise ValueError("Invalid value for `transmitted_carrier_errors_per_sec`, must be a value greater than or equal to `0`") + if key == "transmitted_dropped_errors_per_sec" and value is not None: + if value < 0: + raise ValueError("Invalid value for `transmitted_dropped_errors_per_sec`, must be a value greater than or equal to `0`") + if key == "transmitted_packets_per_sec" and value is not None: + if value < 0: + raise ValueError("Invalid value for `transmitted_packets_per_sec`, must be a value greater than or equal to `0`") + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(HardwareConnectorPerformance, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, HardwareConnectorPerformance): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/hardware_connector_performance_get_response.py b/pypureclient/flashblade/FB_2_14/models/hardware_connector_performance_get_response.py new file mode 100644 index 000000000..3802cdbf4 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/hardware_connector_performance_get_response.py @@ -0,0 +1,129 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class HardwareConnectorPerformanceGetResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'continuation_token': 'str', + 'total_item_count': 'int', + 'items': 'list[HardwareConnectorPerformance]', + 'total': 'list[HardwareConnectorPerformance]' + } + + attribute_map = { + 'continuation_token': 'continuation_token', + 'total_item_count': 'total_item_count', + 'items': 'items', + 'total': 'total' + } + + required_args = { + } + + def __init__( + self, + continuation_token=None, # type: str + total_item_count=None, # type: int + items=None, # type: List[models.HardwareConnectorPerformance] + total=None, # type: List[models.HardwareConnectorPerformance] + ): + """ + Keyword args: + continuation_token (str): Continuation token that can be provided in the `continuation_token` query param to get the next page of data. If you use the `continuation_token` to page through data you are guaranteed to get all items exactly once regardless of how items are modified. If an item is added or deleted during the pagination then it may or may not be returned. The `continuation_token` is generated if the `limit` is less than the remaining number of items, and the default sort is used (no sort is specified). + total_item_count (int): Total number of items after applying `filter` params. + items (list[HardwareConnectorPerformance]): A list of hardware connector performance objects. + total (list[HardwareConnectorPerformance]): Total of all records after filtering. If `total_only` query param is `true`, then no individual items will be returned. + """ + if continuation_token is not None: + self.continuation_token = continuation_token + if total_item_count is not None: + self.total_item_count = total_item_count + if items is not None: + self.items = items + if total is not None: + self.total = total + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `HardwareConnectorPerformanceGetResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(HardwareConnectorPerformanceGetResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, HardwareConnectorPerformanceGetResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/hardware_connector_response.py b/pypureclient/flashblade/FB_2_14/models/hardware_connector_response.py new file mode 100644 index 000000000..bef054439 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/hardware_connector_response.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class HardwareConnectorResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'items': 'list[HardwareConnector]' + } + + attribute_map = { + 'items': 'items' + } + + required_args = { + } + + def __init__( + self, + items=None, # type: List[models.HardwareConnector] + ): + """ + Keyword args: + items (list[HardwareConnector]): A list of connector objects. + """ + if items is not None: + self.items = items + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `HardwareConnectorResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(HardwareConnectorResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, HardwareConnectorResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/hardware_get_response.py b/pypureclient/flashblade/FB_2_14/models/hardware_get_response.py new file mode 100644 index 000000000..0c1578aca --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/hardware_get_response.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class HardwareGetResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'continuation_token': 'str', + 'total_item_count': 'int', + 'items': 'list[Hardware]' + } + + attribute_map = { + 'continuation_token': 'continuation_token', + 'total_item_count': 'total_item_count', + 'items': 'items' + } + + required_args = { + } + + def __init__( + self, + continuation_token=None, # type: str + total_item_count=None, # type: int + items=None, # type: List[models.Hardware] + ): + """ + Keyword args: + continuation_token (str): Continuation token that can be provided in the `continuation_token` query param to get the next page of data. If you use the `continuation_token` to page through data you are guaranteed to get all items exactly once regardless of how items are modified. If an item is added or deleted during the pagination then it may or may not be returned. The `continuation_token` is generated if the `limit` is less than the remaining number of items, and the default sort is used (no sort is specified). + total_item_count (int): Total number of items after applying `filter` params. + items (list[Hardware]): A list of hardware component objects. + """ + if continuation_token is not None: + self.continuation_token = continuation_token + if total_item_count is not None: + self.total_item_count = total_item_count + if items is not None: + self.items = items + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `HardwareGetResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(HardwareGetResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, HardwareGetResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/hardware_response.py b/pypureclient/flashblade/FB_2_14/models/hardware_response.py new file mode 100644 index 000000000..2f4d77543 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/hardware_response.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class HardwareResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'items': 'list[Hardware]' + } + + attribute_map = { + 'items': 'items' + } + + required_args = { + } + + def __init__( + self, + items=None, # type: List[models.Hardware] + ): + """ + Keyword args: + items (list[Hardware]): A list of hardware component objects. + """ + if items is not None: + self.items = items + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `HardwareResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(HardwareResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, HardwareResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/http.py b/pypureclient/flashblade/FB_2_14/models/http.py new file mode 100644 index 000000000..6f30c33a8 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/http.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class Http(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'enabled': 'bool' + } + + attribute_map = { + 'enabled': 'enabled' + } + + required_args = { + } + + def __init__( + self, + enabled=None, # type: bool + ): + """ + Keyword args: + enabled (bool): Is the protocol enabled? If not specified, defaults to `false`. + """ + if enabled is not None: + self.enabled = enabled + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `Http`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(Http, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, Http): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/inline_response400.py b/pypureclient/flashblade/FB_2_14/models/inline_response400.py new file mode 100644 index 000000000..6f230d869 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/inline_response400.py @@ -0,0 +1,117 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class InlineResponse400(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'error': 'str', + 'error_description': 'str' + } + + attribute_map = { + 'error': 'error', + 'error_description': 'error_description' + } + + required_args = { + } + + def __init__( + self, + error=None, # type: str + error_description=None, # type: str + ): + """ + Keyword args: + error (str) + error_description (str) + """ + if error is not None: + self.error = error + if error_description is not None: + self.error_description = error_description + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `InlineResponse400`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(InlineResponse400, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, InlineResponse400): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/inline_response401.py b/pypureclient/flashblade/FB_2_14/models/inline_response401.py new file mode 100644 index 000000000..aceb09acb --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/inline_response401.py @@ -0,0 +1,117 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class InlineResponse401(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'error': 'str', + 'error_description': 'str' + } + + attribute_map = { + 'error': 'error', + 'error_description': 'error_description' + } + + required_args = { + } + + def __init__( + self, + error=None, # type: str + error_description=None, # type: str + ): + """ + Keyword args: + error (str) + error_description (str) + """ + if error is not None: + self.error = error + if error_description is not None: + self.error_description = error_description + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `InlineResponse401`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(InlineResponse401, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, InlineResponse401): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/keytab.py b/pypureclient/flashblade/FB_2_14/models/keytab.py new file mode 100644 index 000000000..05b89c680 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/keytab.py @@ -0,0 +1,165 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class Keytab(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'name': 'str', + 'id': 'str', + 'encryption_type': 'str', + 'fqdn': 'str', + 'kvno': 'int', + 'prefix': 'str', + 'principal': 'str', + 'realm': 'str', + 'source': 'FixedReference', + 'suffix': 'int' + } + + attribute_map = { + 'name': 'name', + 'id': 'id', + 'encryption_type': 'encryption_type', + 'fqdn': 'fqdn', + 'kvno': 'kvno', + 'prefix': 'prefix', + 'principal': 'principal', + 'realm': 'realm', + 'source': 'source', + 'suffix': 'suffix' + } + + required_args = { + } + + def __init__( + self, + name=None, # type: str + id=None, # type: str + encryption_type=None, # type: str + fqdn=None, # type: str + kvno=None, # type: int + prefix=None, # type: str + principal=None, # type: str + realm=None, # type: str + source=None, # type: models.FixedReference + suffix=None, # type: int + ): + """ + Keyword args: + name (str): Name of the object (e.g., a file system or snapshot). + id (str): A non-modifiable, globally unique ID chosen by the system. + encryption_type (str): The encryption type used by the Kerberos key distribution center to generate the keytab. + fqdn (str): The fully qualified domain name to which the keytab was issued. + kvno (int): The key version number of the key used to generate the keytab. + prefix (str): The prefix in the name of the keytab object. This is the same for all keytab objects created from a single keytab file. The name of a keytab entry is created in the format `.` for all entries. + principal (str): The service name for which the keytab was issued. + realm (str): The Kerberos realm that issued the keytab. + source (FixedReference): A reference to the Active Directory configuration for the computer account that was used to create this keytab. If this keytab was uploaded from a file, all fields in the reference possess `null` values. + suffix (int): The suffix in the name of the keytab object, determined at creation time using the slot number of the keytab entry in a file and the number of existing entries with the same prefix. The name of a keytab entry is created in the format `.` for all entries. + """ + if name is not None: + self.name = name + if id is not None: + self.id = id + if encryption_type is not None: + self.encryption_type = encryption_type + if fqdn is not None: + self.fqdn = fqdn + if kvno is not None: + self.kvno = kvno + if prefix is not None: + self.prefix = prefix + if principal is not None: + self.principal = principal + if realm is not None: + self.realm = realm + if source is not None: + self.source = source + if suffix is not None: + self.suffix = suffix + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `Keytab`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(Keytab, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, Keytab): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/keytab_file_base64.py b/pypureclient/flashblade/FB_2_14/models/keytab_file_base64.py new file mode 100644 index 000000000..69ee4a06e --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/keytab_file_base64.py @@ -0,0 +1,105 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class KeytabFileBase64(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + } + + attribute_map = { + } + + required_args = { + } + + def __init__( + self, + ): + """ + Keyword args: + """ + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `KeytabFileBase64`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(KeytabFileBase64, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, KeytabFileBase64): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/keytab_file_binary.py b/pypureclient/flashblade/FB_2_14/models/keytab_file_binary.py new file mode 100644 index 000000000..4dd0a720d --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/keytab_file_binary.py @@ -0,0 +1,105 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class KeytabFileBinary(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + } + + attribute_map = { + } + + required_args = { + } + + def __init__( + self, + ): + """ + Keyword args: + """ + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `KeytabFileBinary`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(KeytabFileBinary, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, KeytabFileBinary): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/keytab_file_response.py b/pypureclient/flashblade/FB_2_14/models/keytab_file_response.py new file mode 100644 index 000000000..fe047bd28 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/keytab_file_response.py @@ -0,0 +1,105 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class KeytabFileResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + } + + attribute_map = { + } + + required_args = { + } + + def __init__( + self, + ): + """ + Keyword args: + """ + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `KeytabFileResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(KeytabFileResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, KeytabFileResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/keytab_get_response.py b/pypureclient/flashblade/FB_2_14/models/keytab_get_response.py new file mode 100644 index 000000000..b956e0914 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/keytab_get_response.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class KeytabGetResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'continuation_token': 'str', + 'total_item_count': 'int', + 'items': 'list[Keytab]' + } + + attribute_map = { + 'continuation_token': 'continuation_token', + 'total_item_count': 'total_item_count', + 'items': 'items' + } + + required_args = { + } + + def __init__( + self, + continuation_token=None, # type: str + total_item_count=None, # type: int + items=None, # type: List[models.Keytab] + ): + """ + Keyword args: + continuation_token (str): Continuation token that can be provided in the `continuation_token` query param to get the next page of data. If you use the `continuation_token` to page through data you are guaranteed to get all items exactly once regardless of how items are modified. If an item is added or deleted during the pagination then it may or may not be returned. The `continuation_token` is generated if the `limit` is less than the remaining number of items, and the default sort is used (no sort is specified). + total_item_count (int): Total number of items after applying `filter` params. + items (list[Keytab]): A list of Kerberos keytab objects. + """ + if continuation_token is not None: + self.continuation_token = continuation_token + if total_item_count is not None: + self.total_item_count = total_item_count + if items is not None: + self.items = items + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `KeytabGetResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(KeytabGetResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, KeytabGetResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/keytab_post.py b/pypureclient/flashblade/FB_2_14/models/keytab_post.py new file mode 100644 index 000000000..e343051b7 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/keytab_post.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class KeytabPost(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'source': 'Reference' + } + + attribute_map = { + 'source': 'source' + } + + required_args = { + } + + def __init__( + self, + source=None, # type: models.Reference + ): + """ + Keyword args: + source (Reference): A reference to the Active Directory configuration for the computer account whose keys will be rotated in order to create new keytabs for all of its registered service principal names. + """ + if source is not None: + self.source = source + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `KeytabPost`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(KeytabPost, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, KeytabPost): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/keytab_response.py b/pypureclient/flashblade/FB_2_14/models/keytab_response.py new file mode 100644 index 000000000..379f327e1 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/keytab_response.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class KeytabResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'items': 'list[Keytab]' + } + + attribute_map = { + 'items': 'items' + } + + required_args = { + } + + def __init__( + self, + items=None, # type: List[models.Keytab] + ): + """ + Keyword args: + items (list[Keytab]): A list of Kerberos keytab objects. + """ + if items is not None: + self.items = items + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `KeytabResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(KeytabResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, KeytabResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/kmip_server.py b/pypureclient/flashblade/FB_2_14/models/kmip_server.py new file mode 100644 index 000000000..4ff9aaa17 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/kmip_server.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class KmipServer(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'name': 'str', + 'id': 'str', + 'ca_certificate': 'Reference', + 'ca_certificate_group': 'Reference', + 'uris': 'list[str]' + } + + attribute_map = { + 'name': 'name', + 'id': 'id', + 'ca_certificate': 'ca_certificate', + 'ca_certificate_group': 'ca_certificate_group', + 'uris': 'uris' + } + + required_args = { + } + + def __init__( + self, + name=None, # type: str + id=None, # type: str + ca_certificate=None, # type: models.Reference + ca_certificate_group=None, # type: models.Reference + uris=None, # type: List[str] + ): + """ + Keyword args: + name (str): Name of the object (e.g., a file system or snapshot). + id (str): A non-modifiable, globally unique ID chosen by the system. + ca_certificate (Reference): CA certificate used to validate the authenticity of the configured servers. + ca_certificate_group (Reference): A certificate group containing CA certificates that can be used to validate the authenticity of the configured servers. + uris (list[str]): List of URIs for the configured KMIP servers in the format [protocol://]hostname:port. + """ + if name is not None: + self.name = name + if id is not None: + self.id = id + if ca_certificate is not None: + self.ca_certificate = ca_certificate + if ca_certificate_group is not None: + self.ca_certificate_group = ca_certificate_group + if uris is not None: + self.uris = uris + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `KmipServer`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(KmipServer, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, KmipServer): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/kmip_server_response.py b/pypureclient/flashblade/FB_2_14/models/kmip_server_response.py new file mode 100644 index 000000000..132b3f196 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/kmip_server_response.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class KmipServerResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'items': 'list[KmipServer]' + } + + attribute_map = { + 'items': 'items' + } + + required_args = { + } + + def __init__( + self, + items=None, # type: List[models.KmipServer] + ): + """ + Keyword args: + items (list[KmipServer]) + """ + if items is not None: + self.items = items + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `KmipServerResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(KmipServerResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, KmipServerResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/lifecycle_rule.py b/pypureclient/flashblade/FB_2_14/models/lifecycle_rule.py new file mode 100644 index 000000000..c6a96fa6d --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/lifecycle_rule.py @@ -0,0 +1,171 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class LifecycleRule(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'name': 'str', + 'id': 'str', + 'bucket': 'FixedReference', + 'enabled': 'bool', + 'keep_previous_version_for': 'int', + 'prefix': 'str', + 'rule_id': 'str', + 'abort_incomplete_multipart_uploads_after': 'int', + 'keep_current_version_for': 'int', + 'keep_current_version_until': 'int', + 'cleanup_expired_object_delete_marker': 'bool' + } + + attribute_map = { + 'name': 'name', + 'id': 'id', + 'bucket': 'bucket', + 'enabled': 'enabled', + 'keep_previous_version_for': 'keep_previous_version_for', + 'prefix': 'prefix', + 'rule_id': 'rule_id', + 'abort_incomplete_multipart_uploads_after': 'abort_incomplete_multipart_uploads_after', + 'keep_current_version_for': 'keep_current_version_for', + 'keep_current_version_until': 'keep_current_version_until', + 'cleanup_expired_object_delete_marker': 'cleanup_expired_object_delete_marker' + } + + required_args = { + } + + def __init__( + self, + name=None, # type: str + id=None, # type: str + bucket=None, # type: models.FixedReference + enabled=None, # type: bool + keep_previous_version_for=None, # type: int + prefix=None, # type: str + rule_id=None, # type: str + abort_incomplete_multipart_uploads_after=None, # type: int + keep_current_version_for=None, # type: int + keep_current_version_until=None, # type: int + cleanup_expired_object_delete_marker=None, # type: bool + ): + """ + Keyword args: + name (str): Name of the object (e.g., a file system or snapshot). + id (str): A non-modifiable, globally unique ID chosen by the system. + bucket (FixedReference): The bucket which this lifecycle rule is targeting. + enabled (bool): If set to `true`, this rule will be enabled. + keep_previous_version_for (int): Time after which previous versions will be marked expired. Measured in milliseconds. Must be a multiple of 86400000 to represent a whole number of days. + prefix (str): Object key prefix identifying one or more objects in the bucket. Can have a maximum length of 1024 characters. + rule_id (str): Unique identifier for the rule. Can have a maximum length of 255 characters. + abort_incomplete_multipart_uploads_after (int): Duration of time after which incomplete multipart uploads will be aborted. Measured in milliseconds. Must be a multiple of 86400000 to represent a whole number of days. + keep_current_version_for (int): Time after which current versions will be marked expired. Measured in milliseconds. Must be a multiple of 86400000 to represent a whole number of days. + keep_current_version_until (int): Time after which current versions will be marked expired. Measured in milliseconds, time since epoch. Must be a valid date, accurate to day. + cleanup_expired_object_delete_marker (bool): Returns a value of `true` if the expired object delete markers will be removed. + """ + if name is not None: + self.name = name + if id is not None: + self.id = id + if bucket is not None: + self.bucket = bucket + if enabled is not None: + self.enabled = enabled + if keep_previous_version_for is not None: + self.keep_previous_version_for = keep_previous_version_for + if prefix is not None: + self.prefix = prefix + if rule_id is not None: + self.rule_id = rule_id + if abort_incomplete_multipart_uploads_after is not None: + self.abort_incomplete_multipart_uploads_after = abort_incomplete_multipart_uploads_after + if keep_current_version_for is not None: + self.keep_current_version_for = keep_current_version_for + if keep_current_version_until is not None: + self.keep_current_version_until = keep_current_version_until + if cleanup_expired_object_delete_marker is not None: + self.cleanup_expired_object_delete_marker = cleanup_expired_object_delete_marker + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `LifecycleRule`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(LifecycleRule, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, LifecycleRule): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/lifecycle_rule_config_extension.py b/pypureclient/flashblade/FB_2_14/models/lifecycle_rule_config_extension.py new file mode 100644 index 000000000..24cc4493f --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/lifecycle_rule_config_extension.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class LifecycleRuleConfigExtension(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'abort_incomplete_multipart_uploads_after': 'int', + 'keep_current_version_for': 'int', + 'keep_current_version_until': 'int' + } + + attribute_map = { + 'abort_incomplete_multipart_uploads_after': 'abort_incomplete_multipart_uploads_after', + 'keep_current_version_for': 'keep_current_version_for', + 'keep_current_version_until': 'keep_current_version_until' + } + + required_args = { + } + + def __init__( + self, + abort_incomplete_multipart_uploads_after=None, # type: int + keep_current_version_for=None, # type: int + keep_current_version_until=None, # type: int + ): + """ + Keyword args: + abort_incomplete_multipart_uploads_after (int): Duration of time after which incomplete multipart uploads will be aborted. Measured in milliseconds. Must be a multiple of 86400000 to represent a whole number of days. + keep_current_version_for (int): Time after which current versions will be marked expired. Measured in milliseconds. Must be a multiple of 86400000 to represent a whole number of days. + keep_current_version_until (int): Time after which current versions will be marked expired. Measured in milliseconds, time since epoch. Must be a valid date, accurate to day. + """ + if abort_incomplete_multipart_uploads_after is not None: + self.abort_incomplete_multipart_uploads_after = abort_incomplete_multipart_uploads_after + if keep_current_version_for is not None: + self.keep_current_version_for = keep_current_version_for + if keep_current_version_until is not None: + self.keep_current_version_until = keep_current_version_until + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `LifecycleRuleConfigExtension`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(LifecycleRuleConfigExtension, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, LifecycleRuleConfigExtension): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/lifecycle_rule_get_response.py b/pypureclient/flashblade/FB_2_14/models/lifecycle_rule_get_response.py new file mode 100644 index 000000000..06697aae2 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/lifecycle_rule_get_response.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class LifecycleRuleGetResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'continuation_token': 'str', + 'total_item_count': 'int', + 'items': 'list[LifecycleRule]' + } + + attribute_map = { + 'continuation_token': 'continuation_token', + 'total_item_count': 'total_item_count', + 'items': 'items' + } + + required_args = { + } + + def __init__( + self, + continuation_token=None, # type: str + total_item_count=None, # type: int + items=None, # type: List[models.LifecycleRule] + ): + """ + Keyword args: + continuation_token (str): Continuation token that can be provided in the `continuation_token` query param to get the next page of data. If you use the `continuation_token` to page through data you are guaranteed to get all items exactly once regardless of how items are modified. If an item is added or deleted during the pagination then it may or may not be returned. The `continuation_token` is generated if the `limit` is less than the remaining number of items, and the default sort is used (no sort is specified). + total_item_count (int): Total number of items after applying `filter` params. + items (list[LifecycleRule]): A list of lifecycle rule objects. + """ + if continuation_token is not None: + self.continuation_token = continuation_token + if total_item_count is not None: + self.total_item_count = total_item_count + if items is not None: + self.items = items + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `LifecycleRuleGetResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(LifecycleRuleGetResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, LifecycleRuleGetResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/lifecycle_rule_patch.py b/pypureclient/flashblade/FB_2_14/models/lifecycle_rule_patch.py new file mode 100644 index 000000000..6afb67def --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/lifecycle_rule_patch.py @@ -0,0 +1,141 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class LifecycleRulePatch(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'enabled': 'bool', + 'keep_previous_version_for': 'int', + 'prefix': 'str', + 'abort_incomplete_multipart_uploads_after': 'int', + 'keep_current_version_for': 'int', + 'keep_current_version_until': 'int' + } + + attribute_map = { + 'enabled': 'enabled', + 'keep_previous_version_for': 'keep_previous_version_for', + 'prefix': 'prefix', + 'abort_incomplete_multipart_uploads_after': 'abort_incomplete_multipart_uploads_after', + 'keep_current_version_for': 'keep_current_version_for', + 'keep_current_version_until': 'keep_current_version_until' + } + + required_args = { + } + + def __init__( + self, + enabled=None, # type: bool + keep_previous_version_for=None, # type: int + prefix=None, # type: str + abort_incomplete_multipart_uploads_after=None, # type: int + keep_current_version_for=None, # type: int + keep_current_version_until=None, # type: int + ): + """ + Keyword args: + enabled (bool): If set to `true`, this rule will be enabled. + keep_previous_version_for (int): Time after which previous versions will be marked expired. Measured in milliseconds. Must be a multiple of 86400000 to represent a whole number of days. + prefix (str): Object key prefix identifying one or more objects in the bucket. Can have a maximum length of 1024 characters. + abort_incomplete_multipart_uploads_after (int): Duration of time after which incomplete multipart uploads will be aborted. Measured in milliseconds. Must be a multiple of 86400000 to represent a whole number of days. + keep_current_version_for (int): Time after which current versions will be marked expired. Measured in milliseconds. Must be a multiple of 86400000 to represent a whole number of days. + keep_current_version_until (int): Time after which current versions will be marked expired. Measured in milliseconds, time since epoch. Must be a valid date, accurate to day. + """ + if enabled is not None: + self.enabled = enabled + if keep_previous_version_for is not None: + self.keep_previous_version_for = keep_previous_version_for + if prefix is not None: + self.prefix = prefix + if abort_incomplete_multipart_uploads_after is not None: + self.abort_incomplete_multipart_uploads_after = abort_incomplete_multipart_uploads_after + if keep_current_version_for is not None: + self.keep_current_version_for = keep_current_version_for + if keep_current_version_until is not None: + self.keep_current_version_until = keep_current_version_until + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `LifecycleRulePatch`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(LifecycleRulePatch, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, LifecycleRulePatch): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/lifecycle_rule_post.py b/pypureclient/flashblade/FB_2_14/models/lifecycle_rule_post.py new file mode 100644 index 000000000..b3bf2094d --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/lifecycle_rule_post.py @@ -0,0 +1,147 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class LifecycleRulePost(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'bucket': 'ReferenceWritable', + 'keep_previous_version_for': 'int', + 'prefix': 'str', + 'rule_id': 'str', + 'abort_incomplete_multipart_uploads_after': 'int', + 'keep_current_version_for': 'int', + 'keep_current_version_until': 'int' + } + + attribute_map = { + 'bucket': 'bucket', + 'keep_previous_version_for': 'keep_previous_version_for', + 'prefix': 'prefix', + 'rule_id': 'rule_id', + 'abort_incomplete_multipart_uploads_after': 'abort_incomplete_multipart_uploads_after', + 'keep_current_version_for': 'keep_current_version_for', + 'keep_current_version_until': 'keep_current_version_until' + } + + required_args = { + } + + def __init__( + self, + bucket=None, # type: models.ReferenceWritable + keep_previous_version_for=None, # type: int + prefix=None, # type: str + rule_id=None, # type: str + abort_incomplete_multipart_uploads_after=None, # type: int + keep_current_version_for=None, # type: int + keep_current_version_until=None, # type: int + ): + """ + Keyword args: + bucket (ReferenceWritable): The bucket name for lifecycle rule creation. + keep_previous_version_for (int): Time after which previous versions will be marked expired. Measured in milliseconds. Must be a multiple of 86400000 to represent a whole number of days. + prefix (str): Object key prefix identifying one or more objects in the bucket. Can have a maximum length of 1024 characters. + rule_id (str): Identifier for the rule that is unique to the bucket that it applies to. Can have a maximum length of 255 characters. If not specified, an id unique to the bucket will be generated in the format `fbRuleId` where number increments, starting at 1. + abort_incomplete_multipart_uploads_after (int): Duration of time after which incomplete multipart uploads will be aborted. Measured in milliseconds. Must be a multiple of 86400000 to represent a whole number of days. + keep_current_version_for (int): Time after which current versions will be marked expired. Measured in milliseconds. Must be a multiple of 86400000 to represent a whole number of days. + keep_current_version_until (int): Time after which current versions will be marked expired. Measured in milliseconds, time since epoch. Must be a valid date, accurate to day. + """ + if bucket is not None: + self.bucket = bucket + if keep_previous_version_for is not None: + self.keep_previous_version_for = keep_previous_version_for + if prefix is not None: + self.prefix = prefix + if rule_id is not None: + self.rule_id = rule_id + if abort_incomplete_multipart_uploads_after is not None: + self.abort_incomplete_multipart_uploads_after = abort_incomplete_multipart_uploads_after + if keep_current_version_for is not None: + self.keep_current_version_for = keep_current_version_for + if keep_current_version_until is not None: + self.keep_current_version_until = keep_current_version_until + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `LifecycleRulePost`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(LifecycleRulePost, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, LifecycleRulePost): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/lifecycle_rule_response.py b/pypureclient/flashblade/FB_2_14/models/lifecycle_rule_response.py new file mode 100644 index 000000000..b881abb34 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/lifecycle_rule_response.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class LifecycleRuleResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'items': 'list[LifecycleRule]' + } + + attribute_map = { + 'items': 'items' + } + + required_args = { + } + + def __init__( + self, + items=None, # type: List[models.LifecycleRule] + ): + """ + Keyword args: + items (list[LifecycleRule]): A list of lifecycle rule objects. + """ + if items is not None: + self.items = items + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `LifecycleRuleResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(LifecycleRuleResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, LifecycleRuleResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/link_aggregation_group.py b/pypureclient/flashblade/FB_2_14/models/link_aggregation_group.py new file mode 100644 index 000000000..cf649b2a9 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/link_aggregation_group.py @@ -0,0 +1,150 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class LinkAggregationGroup(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'name': 'str', + 'id': 'str', + 'lag_speed': 'int', + 'mac_address': 'str', + 'ports': 'list[FixedReference]', + 'port_speed': 'int', + 'status': 'str' + } + + attribute_map = { + 'name': 'name', + 'id': 'id', + 'lag_speed': 'lag_speed', + 'mac_address': 'mac_address', + 'ports': 'ports', + 'port_speed': 'port_speed', + 'status': 'status' + } + + required_args = { + } + + def __init__( + self, + name=None, # type: str + id=None, # type: str + lag_speed=None, # type: int + mac_address=None, # type: str + ports=None, # type: List[models.FixedReference] + port_speed=None, # type: int + status=None, # type: str + ): + """ + Keyword args: + name (str): Name of the object (e.g., a file system or snapshot). + id (str): A non-modifiable, globally unique ID chosen by the system. + lag_speed (int): Combined speed of all ports in the LAG in bits-per-second. + mac_address (str): Unique MAC address assigned to the LAG. + ports (list[FixedReference]): Ports associated with the LAG. + port_speed (int): Configured speed of each port in the LAG in bits-per-second. + status (str): Health status of the LAG. Valid values are `critical`, `healthy`, `identifying`, `unclaimed`, `unhealthy`, `unrecognized`, and `unused`. + """ + if name is not None: + self.name = name + if id is not None: + self.id = id + if lag_speed is not None: + self.lag_speed = lag_speed + if mac_address is not None: + self.mac_address = mac_address + if ports is not None: + self.ports = ports + if port_speed is not None: + self.port_speed = port_speed + if status is not None: + self.status = status + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `LinkAggregationGroup`".format(key)) + if key == "mac_address" and value is not None: + if not re.search(r'^([0-9A-Fa-f]{2}[:-]){5}([0-9A-Fa-f]{2})$', value): + raise ValueError(r"Invalid value for `mac_address`, must be a follow pattern or equal to `/^([0-9A-Fa-f]{2}[:-]){5}([0-9A-Fa-f]{2})$/`") + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(LinkAggregationGroup, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, LinkAggregationGroup): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/link_aggregation_group_get_response.py b/pypureclient/flashblade/FB_2_14/models/link_aggregation_group_get_response.py new file mode 100644 index 000000000..389ade5e9 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/link_aggregation_group_get_response.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class LinkAggregationGroupGetResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'continuation_token': 'str', + 'total_item_count': 'int', + 'items': 'list[LinkAggregationGroup]' + } + + attribute_map = { + 'continuation_token': 'continuation_token', + 'total_item_count': 'total_item_count', + 'items': 'items' + } + + required_args = { + } + + def __init__( + self, + continuation_token=None, # type: str + total_item_count=None, # type: int + items=None, # type: List[models.LinkAggregationGroup] + ): + """ + Keyword args: + continuation_token (str): Continuation token that can be provided in the `continuation_token` query param to get the next page of data. If you use the `continuation_token` to page through data you are guaranteed to get all items exactly once regardless of how items are modified. If an item is added or deleted during the pagination then it may or may not be returned. The `continuation_token` is generated if the `limit` is less than the remaining number of items, and the default sort is used (no sort is specified). + total_item_count (int): Total number of items after applying `filter` params. + items (list[LinkAggregationGroup]): A list of lag objects. + """ + if continuation_token is not None: + self.continuation_token = continuation_token + if total_item_count is not None: + self.total_item_count = total_item_count + if items is not None: + self.items = items + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `LinkAggregationGroupGetResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(LinkAggregationGroupGetResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, LinkAggregationGroupGetResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/link_aggregation_group_response.py b/pypureclient/flashblade/FB_2_14/models/link_aggregation_group_response.py new file mode 100644 index 000000000..22de87d4d --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/link_aggregation_group_response.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class LinkAggregationGroupResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'items': 'list[LinkAggregationGroup]' + } + + attribute_map = { + 'items': 'items' + } + + required_args = { + } + + def __init__( + self, + items=None, # type: List[models.LinkAggregationGroup] + ): + """ + Keyword args: + items (list[LinkAggregationGroup]): A list of lag objects. + """ + if items is not None: + self.items = items + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `LinkAggregationGroupResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(LinkAggregationGroupResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, LinkAggregationGroupResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/linkaggregationgroup.py b/pypureclient/flashblade/FB_2_14/models/linkaggregationgroup.py new file mode 100644 index 000000000..d66ffa07f --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/linkaggregationgroup.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class Linkaggregationgroup(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'ports': 'list[FixedReference]', + 'add_ports': 'list[FixedReference]', + 'remove_ports': 'list[FixedReference]' + } + + attribute_map = { + 'ports': 'ports', + 'add_ports': 'add_ports', + 'remove_ports': 'remove_ports' + } + + required_args = { + } + + def __init__( + self, + ports=None, # type: List[models.FixedReference] + add_ports=None, # type: List[models.FixedReference] + remove_ports=None, # type: List[models.FixedReference] + ): + """ + Keyword args: + ports (list[FixedReference]) + add_ports (list[FixedReference]) + remove_ports (list[FixedReference]) + """ + if ports is not None: + self.ports = ports + if add_ports is not None: + self.add_ports = add_ports + if remove_ports is not None: + self.remove_ports = remove_ports + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `Linkaggregationgroup`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(Linkaggregationgroup, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, Linkaggregationgroup): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/location_reference.py b/pypureclient/flashblade/FB_2_14/models/location_reference.py new file mode 100644 index 000000000..9962c1467 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/location_reference.py @@ -0,0 +1,141 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class LocationReference(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'id': 'str', + 'name': 'str', + 'resource_type': 'ResourceType', + 'display_name': 'str', + 'is_local': 'bool', + 'location': 'Reference' + } + + attribute_map = { + 'id': 'id', + 'name': 'name', + 'resource_type': 'resource_type', + 'display_name': 'display_name', + 'is_local': 'is_local', + 'location': 'location' + } + + required_args = { + } + + def __init__( + self, + id=None, # type: str + name=None, # type: str + resource_type=None, # type: models.ResourceType + display_name=None, # type: str + is_local=None, # type: bool + location=None, # type: models.Reference + ): + """ + Keyword args: + id (str): A non-modifiable, globally unique ID chosen by the system. + name (str): A name chosen by the user. Can be changed. Must be locally unique. + resource_type (ResourceType) + display_name (str): Full name of the source with remote array information. Response will be same as source name for local file systems and policies. + is_local (bool): -> Is the location reference to the local array or somewhere remote? + location (Reference): A reference to the location where the object is defined. + """ + if id is not None: + self.id = id + if name is not None: + self.name = name + if resource_type is not None: + self.resource_type = resource_type + if display_name is not None: + self.display_name = display_name + if is_local is not None: + self.is_local = is_local + if location is not None: + self.location = location + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `LocationReference`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(LocationReference, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, LocationReference): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/login.py b/pypureclient/flashblade/FB_2_14/models/login.py new file mode 100644 index 000000000..dd7b2a282 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/login.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class Login(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'username': 'str' + } + + attribute_map = { + 'username': 'username' + } + + required_args = { + } + + def __init__( + self, + username=None, # type: str + ): + """ + Keyword args: + username (str): The username of the user. + """ + if username is not None: + self.username = username + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `Login`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(Login, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, Login): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/login_banner_get_response.py b/pypureclient/flashblade/FB_2_14/models/login_banner_get_response.py new file mode 100644 index 000000000..4f75ab51d --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/login_banner_get_response.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class LoginBannerGetResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'login_banner': 'str' + } + + attribute_map = { + 'login_banner': 'login_banner' + } + + required_args = { + } + + def __init__( + self, + login_banner=None, # type: str + ): + """ + Keyword args: + login_banner (str): The string to show as login banner. + """ + if login_banner is not None: + self.login_banner = login_banner + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `LoginBannerGetResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(LoginBannerGetResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, LoginBannerGetResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/logs_async.py b/pypureclient/flashblade/FB_2_14/models/logs_async.py new file mode 100644 index 000000000..ed14ddb8c --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/logs_async.py @@ -0,0 +1,168 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class LogsAsync(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'name': 'str', + 'id': 'str', + 'start_time': 'int', + 'end_time': 'int', + 'last_request_time': 'int', + 'processing': 'bool', + 'progress': 'float', + 'hardware_components': 'list[FixedReference]', + 'available_files': 'list[FileInfo]' + } + + attribute_map = { + 'name': 'name', + 'id': 'id', + 'start_time': 'start_time', + 'end_time': 'end_time', + 'last_request_time': 'last_request_time', + 'processing': 'processing', + 'progress': 'progress', + 'hardware_components': 'hardware_components', + 'available_files': 'available_files' + } + + required_args = { + } + + def __init__( + self, + name=None, # type: str + id=None, # type: str + start_time=None, # type: int + end_time=None, # type: int + last_request_time=None, # type: int + processing=None, # type: bool + progress=None, # type: float + hardware_components=None, # type: List[models.FixedReference] + available_files=None, # type: List[models.FileInfo] + ): + """ + Keyword args: + name (str): Name of the object (e.g., a file system or snapshot). + id (str): A non-modifiable, globally unique ID chosen by the system. + start_time (int): When the time window starts (in milliseconds since epoch). start_time and end_time determine the number of hours for which the logs are prepared for. At most 6 hours of logs can be prepared in one request. start_time and end_time are truncated to hour boundaries. + end_time (int): When the time window ends (in milliseconds since epoch). start_time and end_time determine the number of hours for which the logs are prepared for. At most 6 hours of logs can be prepared in one request. start_time and end_time are truncated to hour boundaries. + last_request_time (int): The last time log preparation was requested (in milliseconds since epoch). + processing (bool): Returns a value of `true` if the logs are being prepared. + progress (float): A representation of log preparation progress. Ranges from 0 to 1.0. + hardware_components (list[FixedReference]): All of the hardware components for which logs are being processed. + available_files (list[FileInfo]): All of the available files ready for download. + """ + if name is not None: + self.name = name + if id is not None: + self.id = id + if start_time is not None: + self.start_time = start_time + if end_time is not None: + self.end_time = end_time + if last_request_time is not None: + self.last_request_time = last_request_time + if processing is not None: + self.processing = processing + if progress is not None: + self.progress = progress + if hardware_components is not None: + self.hardware_components = hardware_components + if available_files is not None: + self.available_files = available_files + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `LogsAsync`".format(key)) + if key == "start_time" and value is not None: + if value < 0: + raise ValueError("Invalid value for `start_time`, must be a value greater than or equal to `0`") + if key == "end_time" and value is not None: + if value < 0: + raise ValueError("Invalid value for `end_time`, must be a value greater than or equal to `0`") + if key == "last_request_time" and value is not None: + if value < 0: + raise ValueError("Invalid value for `last_request_time`, must be a value greater than or equal to `0`") + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(LogsAsync, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, LogsAsync): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/logs_async_get_response.py b/pypureclient/flashblade/FB_2_14/models/logs_async_get_response.py new file mode 100644 index 000000000..d7d20a91b --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/logs_async_get_response.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class LogsAsyncGetResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'continuation_token': 'str', + 'total_item_count': 'int', + 'items': 'list[LogsAsync]' + } + + attribute_map = { + 'continuation_token': 'continuation_token', + 'total_item_count': 'total_item_count', + 'items': 'items' + } + + required_args = { + } + + def __init__( + self, + continuation_token=None, # type: str + total_item_count=None, # type: int + items=None, # type: List[models.LogsAsync] + ): + """ + Keyword args: + continuation_token (str): Continuation token that can be provided in the `continuation_token` query param to get the next page of data. If you use the `continuation_token` to page through data you are guaranteed to get all items exactly once regardless of how items are modified. If an item is added or deleted during the pagination then it may or may not be returned. The `continuation_token` is generated if the `limit` is less than the remaining number of items, and the default sort is used (no sort is specified). + total_item_count (int): Total number of items after applying `filter` params. + items (list[LogsAsync]) + """ + if continuation_token is not None: + self.continuation_token = continuation_token + if total_item_count is not None: + self.total_item_count = total_item_count + if items is not None: + self.items = items + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `LogsAsyncGetResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(LogsAsyncGetResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, LogsAsyncGetResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/logs_async_response.py b/pypureclient/flashblade/FB_2_14/models/logs_async_response.py new file mode 100644 index 000000000..1c5d03e58 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/logs_async_response.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class LogsAsyncResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'items': 'list[LogsAsync]' + } + + attribute_map = { + 'items': 'items' + } + + required_args = { + } + + def __init__( + self, + items=None, # type: List[models.LogsAsync] + ): + """ + Keyword args: + items (list[LogsAsync]) + """ + if items is not None: + self.items = items + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `LogsAsyncResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(LogsAsyncResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, LogsAsyncResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/member.py b/pypureclient/flashblade/FB_2_14/models/member.py new file mode 100644 index 000000000..bc5464b2b --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/member.py @@ -0,0 +1,117 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class Member(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'group': 'Reference', + 'member': 'Reference' + } + + attribute_map = { + 'group': 'group', + 'member': 'member' + } + + required_args = { + } + + def __init__( + self, + group=None, # type: models.Reference + member=None, # type: models.Reference + ): + """ + Keyword args: + group (Reference): A reference to a group object that has the referenced member object as a member. + member (Reference): A reference to an object that is a member of the referenced group. + """ + if group is not None: + self.group = group + if member is not None: + self.member = member + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `Member`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(Member, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, Member): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/member_link.py b/pypureclient/flashblade/FB_2_14/models/member_link.py new file mode 100644 index 000000000..459c3242c --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/member_link.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class MemberLink(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'local_file_system': 'FixedReference', + 'remote': 'FixedReferenceNoResourceType', + 'remote_file_system': 'FixedReferenceNoResourceType' + } + + attribute_map = { + 'local_file_system': 'local_file_system', + 'remote': 'remote', + 'remote_file_system': 'remote_file_system' + } + + required_args = { + } + + def __init__( + self, + local_file_system=None, # type: models.FixedReference + remote=None, # type: models.FixedReferenceNoResourceType + remote_file_system=None, # type: models.FixedReferenceNoResourceType + ): + """ + Keyword args: + local_file_system (FixedReference): Reference to a local file system. + remote (FixedReferenceNoResourceType): Reference to a remote array. + remote_file_system (FixedReferenceNoResourceType): Reference to a remote file system. + """ + if local_file_system is not None: + self.local_file_system = local_file_system + if remote is not None: + self.remote = remote + if remote_file_system is not None: + self.remote_file_system = remote_file_system + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `MemberLink`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(MemberLink, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, MemberLink): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/multi_protocol.py b/pypureclient/flashblade/FB_2_14/models/multi_protocol.py new file mode 100644 index 000000000..df55bdf2f --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/multi_protocol.py @@ -0,0 +1,117 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class MultiProtocol(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'access_control_style': 'str', + 'safeguard_acls': 'bool' + } + + attribute_map = { + 'access_control_style': 'access_control_style', + 'safeguard_acls': 'safeguard_acls' + } + + required_args = { + } + + def __init__( + self, + access_control_style=None, # type: str + safeguard_acls=None, # type: bool + ): + """ + Keyword args: + access_control_style (str): The access control style that is utilized for client actions such as setting file and directory ACLs. Possible values include `nfs`, `smb`, `shared`, `independent`, and `mode-bits`. If `nfs` is specified, then SMB clients will be unable to set permissions on files and directories. If `smb` is specified, then NFS clients will be unable to set permissions on files and directories. If `shared` is specified, then NFS and SMB clients will both be able to set permissions on files and directories. Any client will be able to overwrite the permissions set by another client, regardless of protocol. If `independent` is specified, then NFS and SMB clients will both be able to set permissions on files and directories, and can access files and directories created over any protocol. Permissions set by SMB clients will not affect NFS clients and vice versa. NFS clients will be restricted to only using mode bits to set permissions. If `mode-bits` is specified, then NFS and SMB clients will both be able to set permissions on files and directories, but only mode bits may be used to set permissions for NFS clients. When SMB clients set an ACL, it will be converted to have the same permission granularity as NFS mode bits. + safeguard_acls (bool): If set to `true`, prevents NFS clients from erasing a configured ACL when setting NFS mode bits. If this is `true`, then attempts to set mode bits on a file or directory will fail if they cannot be combined with the existing ACL set on a file or directory without erasing the ACL. Attempts to set mode bits that would not erase an existing ACL will still succeed and the mode bit changes will be merged with the existing ACL. This must be `false` when `access_control_style` is set to either `independent` or `mode-bits`. + """ + if access_control_style is not None: + self.access_control_style = access_control_style + if safeguard_acls is not None: + self.safeguard_acls = safeguard_acls + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `MultiProtocol`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(MultiProtocol, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, MultiProtocol): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/multi_protocol_post.py b/pypureclient/flashblade/FB_2_14/models/multi_protocol_post.py new file mode 100644 index 000000000..be195f6e7 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/multi_protocol_post.py @@ -0,0 +1,117 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class MultiProtocolPost(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'access_control_style': 'str', + 'safeguard_acls': 'bool' + } + + attribute_map = { + 'access_control_style': 'access_control_style', + 'safeguard_acls': 'safeguard_acls' + } + + required_args = { + } + + def __init__( + self, + access_control_style=None, # type: str + safeguard_acls=None, # type: bool + ): + """ + Keyword args: + access_control_style (str): The access control style that is utilized for client actions such as setting file and directory ACLs. Possible values include `nfs`, `smb`, `shared`, `independent`, and `mode-bits`. If `nfs` is specified, then SMB clients will be unable to set permissions on files and directories. If `smb` is specified, then NFS clients will be unable to set permissions on files and directories. If `shared` is specified, then NFS and SMB clients will both be able to set permissions on files and directories. Any client will be able to overwrite the permissions set by another client, regardless of protocol. If `independent` is specified, then NFS and SMB clients will both be able to set permissions on files and directories, and can access files and directories created over any protocol. Permissions set by SMB clients will not affect NFS clients and vice versa. NFS clients will be restricted to only using mode bits to set permissions. If `mode-bits` is specified, then NFS and SMB clients will both be able to set permissions on files and directories, but only mode bits may be used to set permissions for NFS clients. When SMB clients set an ACL, it will be converted to have the same permission granularity as NFS mode bits. Defaults to `shared`. + safeguard_acls (bool): If set to `true`, prevents NFS clients from erasing a configured ACL when setting NFS mode bits. If this is `true`, then attempts to set mode bits on a file or directory will fail if they cannot be combined with the existing ACL set on a file or directory without erasing the ACL. Attempts to set mode bits that would not erase an existing ACL will still succeed and the mode bit changes will be merged with the existing ACL. This must be `false` when `access_control_style` is set to either `independent` or `mode-bits`. Defaults to `true`. + """ + if access_control_style is not None: + self.access_control_style = access_control_style + if safeguard_acls is not None: + self.safeguard_acls = safeguard_acls + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `MultiProtocolPost`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(MultiProtocolPost, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, MultiProtocolPost): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/network_access_policy.py b/pypureclient/flashblade/FB_2_14/models/network_access_policy.py new file mode 100644 index 000000000..b2a683d52 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/network_access_policy.py @@ -0,0 +1,153 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class NetworkAccessPolicy(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'name': 'str', + 'id': 'str', + 'enabled': 'bool', + 'is_local': 'bool', + 'location': 'FixedReference', + 'policy_type': 'str', + 'version': 'str', + 'rules': 'list[NetworkAccessPolicyRuleInPolicy]' + } + + attribute_map = { + 'name': 'name', + 'id': 'id', + 'enabled': 'enabled', + 'is_local': 'is_local', + 'location': 'location', + 'policy_type': 'policy_type', + 'version': 'version', + 'rules': 'rules' + } + + required_args = { + } + + def __init__( + self, + name=None, # type: str + id=None, # type: str + enabled=None, # type: bool + is_local=None, # type: bool + location=None, # type: models.FixedReference + policy_type=None, # type: str + version=None, # type: str + rules=None, # type: List[models.NetworkAccessPolicyRuleInPolicy] + ): + """ + Keyword args: + name (str): A name chosen by the user. Can be changed. Must be locally unique. + id (str): A non-modifiable, globally unique ID chosen by the system. + enabled (bool): If `true`, the policy is enabled. If not specified, defaults to `true`. + is_local (bool): Whether the policy is defined on the local array. + location (FixedReference): Reference to the array where the policy is defined. + policy_type (str): Type of the policy. Valid values are `audit`, `bucket-access`, `cross-origin-resource-sharing`, `network-access`, `nfs`, `object-access`, `smb-client`, `smb-share`, and `snapshot`. + version (str): A hash of the other properties of this resource. This can be used when updating the resource to ensure there aren't any updates since the resource was read. + rules (list[NetworkAccessPolicyRuleInPolicy]): All of the rules that are part of this policy. The order is the evaluation order. If a client does not match any rule in the policy for the interface that they are attempting to access, the default is to deny access. + """ + if name is not None: + self.name = name + if id is not None: + self.id = id + if enabled is not None: + self.enabled = enabled + if is_local is not None: + self.is_local = is_local + if location is not None: + self.location = location + if policy_type is not None: + self.policy_type = policy_type + if version is not None: + self.version = version + if rules is not None: + self.rules = rules + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `NetworkAccessPolicy`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(NetworkAccessPolicy, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, NetworkAccessPolicy): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/network_access_policy_get_response.py b/pypureclient/flashblade/FB_2_14/models/network_access_policy_get_response.py new file mode 100644 index 000000000..ba29f75eb --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/network_access_policy_get_response.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class NetworkAccessPolicyGetResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'continuation_token': 'str', + 'total_item_count': 'int', + 'items': 'list[NetworkAccessPolicy]' + } + + attribute_map = { + 'continuation_token': 'continuation_token', + 'total_item_count': 'total_item_count', + 'items': 'items' + } + + required_args = { + } + + def __init__( + self, + continuation_token=None, # type: str + total_item_count=None, # type: int + items=None, # type: List[models.NetworkAccessPolicy] + ): + """ + Keyword args: + continuation_token (str): Continuation token that can be provided in the `continuation_token` query param to get the next page of data. If you use the `continuation_token` to page through data you are guaranteed to get all items exactly once regardless of how items are modified. If an item is added or deleted during the pagination then it may or may not be returned. The `continuation_token` is generated if the `limit` is less than the remaining number of items, and the default sort is used (no sort is specified). + total_item_count (int): Total number of items after applying `filter` params. + items (list[NetworkAccessPolicy]) + """ + if continuation_token is not None: + self.continuation_token = continuation_token + if total_item_count is not None: + self.total_item_count = total_item_count + if items is not None: + self.items = items + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `NetworkAccessPolicyGetResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(NetworkAccessPolicyGetResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, NetworkAccessPolicyGetResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/network_access_policy_response.py b/pypureclient/flashblade/FB_2_14/models/network_access_policy_response.py new file mode 100644 index 000000000..29ff4600d --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/network_access_policy_response.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class NetworkAccessPolicyResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'items': 'list[NetworkAccessPolicy]' + } + + attribute_map = { + 'items': 'items' + } + + required_args = { + } + + def __init__( + self, + items=None, # type: List[models.NetworkAccessPolicy] + ): + """ + Keyword args: + items (list[NetworkAccessPolicy]) + """ + if items is not None: + self.items = items + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `NetworkAccessPolicyResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(NetworkAccessPolicyResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, NetworkAccessPolicyResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/network_access_policy_rule.py b/pypureclient/flashblade/FB_2_14/models/network_access_policy_rule.py new file mode 100644 index 000000000..87f6e2092 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/network_access_policy_rule.py @@ -0,0 +1,153 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class NetworkAccessPolicyRule(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'name': 'str', + 'id': 'str', + 'client': 'str', + 'effect': 'str', + 'interfaces': 'list[str]', + 'policy': 'FixedReference', + 'policy_version': 'str', + 'index': 'int' + } + + attribute_map = { + 'name': 'name', + 'id': 'id', + 'client': 'client', + 'effect': 'effect', + 'interfaces': 'interfaces', + 'policy': 'policy', + 'policy_version': 'policy_version', + 'index': 'index' + } + + required_args = { + } + + def __init__( + self, + name=None, # type: str + id=None, # type: str + client=None, # type: str + effect=None, # type: str + interfaces=None, # type: List[str] + policy=None, # type: models.FixedReference + policy_version=None, # type: str + index=None, # type: int + ): + """ + Keyword args: + name (str): Name of the object (e.g., a file system or snapshot). + id (str): A non-modifiable, globally unique ID chosen by the system. + client (str): Specifies the clients that will be permitted or denied access to the interface. Accepted notations include a single IP address, subnet in CIDR notation, or all clients (specified as `*`). The default value is `*` if not specified. + effect (str): If set to `allow`, the specified client will be permitted to access the specified interfaces. If set to `deny`, the specified client will be denied access to them. Valid values include `allow` and `deny`. + interfaces (list[str]): Specifies which product interfaces this rule applies to, whether it is permitting or denying access. Valid values include `management-ssh`, `management-rest-api`, `management-web-ui`, `snmp`, and `local-network-superuser-password-access`. + policy (FixedReference): The policy to which this rule belongs. + policy_version (str): The policy's version. This can be used when updating the resource to ensure there aren't any updates to the policy since the resource was read. + index (int): The index within the policy. The `index` indicates the order the rules are evaluated. NOTE: It is recommended to use the query param `before_rule_id` to do reordering to avoid concurrency issues, but changing `index` is also supported. `index` can not be changed if `before_rule_id` or `before_rule_name` are specified. + """ + if name is not None: + self.name = name + if id is not None: + self.id = id + if client is not None: + self.client = client + if effect is not None: + self.effect = effect + if interfaces is not None: + self.interfaces = interfaces + if policy is not None: + self.policy = policy + if policy_version is not None: + self.policy_version = policy_version + if index is not None: + self.index = index + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `NetworkAccessPolicyRule`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(NetworkAccessPolicyRule, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, NetworkAccessPolicyRule): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/network_access_policy_rule_base.py b/pypureclient/flashblade/FB_2_14/models/network_access_policy_rule_base.py new file mode 100644 index 000000000..60f9392b4 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/network_access_policy_rule_base.py @@ -0,0 +1,147 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class NetworkAccessPolicyRuleBase(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'name': 'str', + 'id': 'str', + 'client': 'str', + 'effect': 'str', + 'interfaces': 'list[str]', + 'policy': 'FixedReference', + 'policy_version': 'str' + } + + attribute_map = { + 'name': 'name', + 'id': 'id', + 'client': 'client', + 'effect': 'effect', + 'interfaces': 'interfaces', + 'policy': 'policy', + 'policy_version': 'policy_version' + } + + required_args = { + } + + def __init__( + self, + name=None, # type: str + id=None, # type: str + client=None, # type: str + effect=None, # type: str + interfaces=None, # type: List[str] + policy=None, # type: models.FixedReference + policy_version=None, # type: str + ): + """ + Keyword args: + name (str): Name of the object (e.g., a file system or snapshot). + id (str): A non-modifiable, globally unique ID chosen by the system. + client (str): Specifies the clients that will be permitted or denied access to the interface. Accepted notations include a single IP address, subnet in CIDR notation, or all clients (specified as `*`). The default value is `*` if not specified. + effect (str): If set to `allow`, the specified client will be permitted to access the specified interfaces. If set to `deny`, the specified client will be denied access to them. Valid values include `allow` and `deny`. + interfaces (list[str]): Specifies which product interfaces this rule applies to, whether it is permitting or denying access. Valid values include `management-ssh`, `management-rest-api`, `management-web-ui`, `snmp`, and `local-network-superuser-password-access`. + policy (FixedReference): The policy to which this rule belongs. + policy_version (str): The policy's version. This can be used when updating the resource to ensure there aren't any updates to the policy since the resource was read. + """ + if name is not None: + self.name = name + if id is not None: + self.id = id + if client is not None: + self.client = client + if effect is not None: + self.effect = effect + if interfaces is not None: + self.interfaces = interfaces + if policy is not None: + self.policy = policy + if policy_version is not None: + self.policy_version = policy_version + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `NetworkAccessPolicyRuleBase`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(NetworkAccessPolicyRuleBase, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, NetworkAccessPolicyRuleBase): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/network_access_policy_rule_get_response.py b/pypureclient/flashblade/FB_2_14/models/network_access_policy_rule_get_response.py new file mode 100644 index 000000000..3557d44ae --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/network_access_policy_rule_get_response.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class NetworkAccessPolicyRuleGetResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'continuation_token': 'str', + 'total_item_count': 'int', + 'items': 'list[NetworkAccessPolicyRule]' + } + + attribute_map = { + 'continuation_token': 'continuation_token', + 'total_item_count': 'total_item_count', + 'items': 'items' + } + + required_args = { + } + + def __init__( + self, + continuation_token=None, # type: str + total_item_count=None, # type: int + items=None, # type: List[models.NetworkAccessPolicyRule] + ): + """ + Keyword args: + continuation_token (str): Continuation token that can be provided in the `continuation_token` query param to get the next page of data. If you use the `continuation_token` to page through data you are guaranteed to get all items exactly once regardless of how items are modified. If an item is added or deleted during the pagination then it may or may not be returned. The `continuation_token` is generated if the `limit` is less than the remaining number of items, and the default sort is used (no sort is specified). + total_item_count (int): Total number of items after applying `filter` params. + items (list[NetworkAccessPolicyRule]): Displays a list of all items after filtering. + """ + if continuation_token is not None: + self.continuation_token = continuation_token + if total_item_count is not None: + self.total_item_count = total_item_count + if items is not None: + self.items = items + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `NetworkAccessPolicyRuleGetResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(NetworkAccessPolicyRuleGetResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, NetworkAccessPolicyRuleGetResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/network_access_policy_rule_in_policy.py b/pypureclient/flashblade/FB_2_14/models/network_access_policy_rule_in_policy.py new file mode 100644 index 000000000..f525eb78f --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/network_access_policy_rule_in_policy.py @@ -0,0 +1,153 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class NetworkAccessPolicyRuleInPolicy(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'name': 'str', + 'id': 'str', + 'client': 'str', + 'effect': 'str', + 'interfaces': 'list[str]', + 'policy': 'FixedReference', + 'policy_version': 'str', + 'index': 'int' + } + + attribute_map = { + 'name': 'name', + 'id': 'id', + 'client': 'client', + 'effect': 'effect', + 'interfaces': 'interfaces', + 'policy': 'policy', + 'policy_version': 'policy_version', + 'index': 'index' + } + + required_args = { + } + + def __init__( + self, + name=None, # type: str + id=None, # type: str + client=None, # type: str + effect=None, # type: str + interfaces=None, # type: List[str] + policy=None, # type: models.FixedReference + policy_version=None, # type: str + index=None, # type: int + ): + """ + Keyword args: + name (str): Name of the object (e.g., a file system or snapshot). + id (str): A non-modifiable, globally unique ID chosen by the system. + client (str): Specifies the clients that will be permitted or denied access to the interface. Accepted notations include a single IP address, subnet in CIDR notation, or all clients (specified as `*`). The default value is `*` if not specified. + effect (str): If set to `allow`, the specified client will be permitted to access the specified interfaces. If set to `deny`, the specified client will be denied access to them. Valid values include `allow` and `deny`. + interfaces (list[str]): Specifies which product interfaces this rule applies to, whether it is permitting or denying access. Valid values include `management-ssh`, `management-rest-api`, `management-web-ui`, `snmp`, and `local-network-superuser-password-access`. + policy (FixedReference): The policy to which this rule belongs. + policy_version (str): The policy's version. This can be used when updating the resource to ensure there aren't any updates to the policy since the resource was read. + index (int): The index within the policy. The `index` indicates the order the rules are evaluated. + """ + if name is not None: + self.name = name + if id is not None: + self.id = id + if client is not None: + self.client = client + if effect is not None: + self.effect = effect + if interfaces is not None: + self.interfaces = interfaces + if policy is not None: + self.policy = policy + if policy_version is not None: + self.policy_version = policy_version + if index is not None: + self.index = index + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `NetworkAccessPolicyRuleInPolicy`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(NetworkAccessPolicyRuleInPolicy, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, NetworkAccessPolicyRuleInPolicy): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/network_access_policy_rule_post.py b/pypureclient/flashblade/FB_2_14/models/network_access_policy_rule_post.py new file mode 100644 index 000000000..c831ca667 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/network_access_policy_rule_post.py @@ -0,0 +1,141 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class NetworkAccessPolicyRulePost(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'name': 'str', + 'id': 'str', + 'effect': 'str', + 'client': 'str', + 'interfaces': 'list[str]', + 'index': 'int' + } + + attribute_map = { + 'name': 'name', + 'id': 'id', + 'effect': 'effect', + 'client': 'client', + 'interfaces': 'interfaces', + 'index': 'index' + } + + required_args = { + } + + def __init__( + self, + name=None, # type: str + id=None, # type: str + effect=None, # type: str + client=None, # type: str + interfaces=None, # type: List[str] + index=None, # type: int + ): + """ + Keyword args: + name (str): Name of the object (e.g., a file system or snapshot). + id (str): A non-modifiable, globally unique ID chosen by the system. + effect (str): If set to `allow`, the specified client will be permitted to access the specified interfaces. If set to `deny`, the specified client will be denied access to them. Valid values include `allow` and `deny`. The default value is `allow` if not specified. + client (str): Specifies the clients that will be permitted or denied access to the interface. Accepted notations include a single IP address, subnet in CIDR notation, or all clients (specified as `*`). The default value is `*` if not specified. + interfaces (list[str]): Specifies which product interfaces this rule applies to, whether it is permitting or denying access. Valid values include `management-ssh`, `management-rest-api`, `management-web-ui`, `snmp`, and `local-network-superuser-password-access`. + index (int): The index within the policy. The `index` indicates the order the rules are evaluated. NOTE: It is recommended to use the query param `before_rule_id` to do reordering to avoid concurrency issues, but changing `index` is also supported. `index` can not be changed if `before_rule_id` or `before_rule_name` are specified. + """ + if name is not None: + self.name = name + if id is not None: + self.id = id + if effect is not None: + self.effect = effect + if client is not None: + self.client = client + if interfaces is not None: + self.interfaces = interfaces + if index is not None: + self.index = index + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `NetworkAccessPolicyRulePost`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(NetworkAccessPolicyRulePost, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, NetworkAccessPolicyRulePost): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/network_access_policy_rule_post_base.py b/pypureclient/flashblade/FB_2_14/models/network_access_policy_rule_post_base.py new file mode 100644 index 000000000..3878b6206 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/network_access_policy_rule_post_base.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class NetworkAccessPolicyRulePostBase(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'name': 'str', + 'id': 'str', + 'effect': 'str', + 'client': 'str', + 'interfaces': 'list[str]' + } + + attribute_map = { + 'name': 'name', + 'id': 'id', + 'effect': 'effect', + 'client': 'client', + 'interfaces': 'interfaces' + } + + required_args = { + } + + def __init__( + self, + name=None, # type: str + id=None, # type: str + effect=None, # type: str + client=None, # type: str + interfaces=None, # type: List[str] + ): + """ + Keyword args: + name (str): Name of the object (e.g., a file system or snapshot). + id (str): A non-modifiable, globally unique ID chosen by the system. + effect (str): If set to `allow`, the specified client will be permitted to access the specified interfaces. If set to `deny`, the specified client will be denied access to them. Valid values include `allow` and `deny`. The default value is `allow` if not specified. + client (str): Specifies the clients that will be permitted or denied access to the interface. Accepted notations include a single IP address, subnet in CIDR notation, or all clients (specified as `*`). The default value is `*` if not specified. + interfaces (list[str]): Specifies which product interfaces this rule applies to, whether it is permitting or denying access. Valid values include `management-ssh`, `management-rest-api`, `management-web-ui`, `snmp`, and `local-network-superuser-password-access`. + """ + if name is not None: + self.name = name + if id is not None: + self.id = id + if effect is not None: + self.effect = effect + if client is not None: + self.client = client + if interfaces is not None: + self.interfaces = interfaces + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `NetworkAccessPolicyRulePostBase`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(NetworkAccessPolicyRulePostBase, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, NetworkAccessPolicyRulePostBase): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/network_access_policy_rule_response.py b/pypureclient/flashblade/FB_2_14/models/network_access_policy_rule_response.py new file mode 100644 index 000000000..65bd02b33 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/network_access_policy_rule_response.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class NetworkAccessPolicyRuleResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'items': 'list[NetworkAccessPolicyRule]' + } + + attribute_map = { + 'items': 'items' + } + + required_args = { + } + + def __init__( + self, + items=None, # type: List[models.NetworkAccessPolicyRule] + ): + """ + Keyword args: + items (list[NetworkAccessPolicyRule]): Displays a list of all items after filtering. + """ + if items is not None: + self.items = items + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `NetworkAccessPolicyRuleResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(NetworkAccessPolicyRuleResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, NetworkAccessPolicyRuleResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/network_interface.py b/pypureclient/flashblade/FB_2_14/models/network_interface.py new file mode 100644 index 000000000..236d97930 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/network_interface.py @@ -0,0 +1,171 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class NetworkInterface(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'name': 'str', + 'id': 'str', + 'address': 'str', + 'enabled': 'bool', + 'gateway': 'str', + 'mtu': 'int', + 'netmask': 'str', + 'services': 'list[str]', + 'subnet': 'object', + 'type': 'str', + 'vlan': 'int' + } + + attribute_map = { + 'name': 'name', + 'id': 'id', + 'address': 'address', + 'enabled': 'enabled', + 'gateway': 'gateway', + 'mtu': 'mtu', + 'netmask': 'netmask', + 'services': 'services', + 'subnet': 'subnet', + 'type': 'type', + 'vlan': 'vlan' + } + + required_args = { + } + + def __init__( + self, + name=None, # type: str + id=None, # type: str + address=None, # type: str + enabled=None, # type: bool + gateway=None, # type: str + mtu=None, # type: int + netmask=None, # type: str + services=None, # type: List[str] + subnet=None, # type: object + type=None, # type: str + vlan=None, # type: int + ): + """ + Keyword args: + name (str): Name of the object (e.g., a file system or snapshot). + id (str): A non-modifiable, globally unique ID chosen by the system. + address (str): The IPv4 or IPv6 address to be associated with the specified network interface. + enabled (bool): Indicates if the specified network interface is enabled (`true`) or disabled (`false`). If not specified, defaults to `true`. + gateway (str): Derived from `subnet.gateway`. + mtu (int): Derived from `subnet.mtu`. + netmask (str): Derived from `subnet.prefix`. + services (list[str]): Services and protocols that are enabled on the interface. + subnet (object) + type (str): The only valid value is `vip`. + vlan (int): Derived from `subnet.vlan`. + """ + if name is not None: + self.name = name + if id is not None: + self.id = id + if address is not None: + self.address = address + if enabled is not None: + self.enabled = enabled + if gateway is not None: + self.gateway = gateway + if mtu is not None: + self.mtu = mtu + if netmask is not None: + self.netmask = netmask + if services is not None: + self.services = services + if subnet is not None: + self.subnet = subnet + if type is not None: + self.type = type + if vlan is not None: + self.vlan = vlan + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `NetworkInterface`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(NetworkInterface, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, NetworkInterface): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/network_interface_get_response.py b/pypureclient/flashblade/FB_2_14/models/network_interface_get_response.py new file mode 100644 index 000000000..cac6e45da --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/network_interface_get_response.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class NetworkInterfaceGetResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'continuation_token': 'str', + 'total_item_count': 'int', + 'items': 'list[NetworkInterface]' + } + + attribute_map = { + 'continuation_token': 'continuation_token', + 'total_item_count': 'total_item_count', + 'items': 'items' + } + + required_args = { + } + + def __init__( + self, + continuation_token=None, # type: str + total_item_count=None, # type: int + items=None, # type: List[models.NetworkInterface] + ): + """ + Keyword args: + continuation_token (str): Continuation token that can be provided in the `continuation_token` query param to get the next page of data. If you use the `continuation_token` to page through data you are guaranteed to get all items exactly once regardless of how items are modified. If an item is added or deleted during the pagination then it may or may not be returned. The `continuation_token` is generated if the `limit` is less than the remaining number of items, and the default sort is used (no sort is specified). + total_item_count (int): Total number of items after applying `filter` params. + items (list[NetworkInterface]): A list of network interface objects. + """ + if continuation_token is not None: + self.continuation_token = continuation_token + if total_item_count is not None: + self.total_item_count = total_item_count + if items is not None: + self.items = items + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `NetworkInterfaceGetResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(NetworkInterfaceGetResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, NetworkInterfaceGetResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/network_interface_patch.py b/pypureclient/flashblade/FB_2_14/models/network_interface_patch.py new file mode 100644 index 000000000..eef2b6ebf --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/network_interface_patch.py @@ -0,0 +1,117 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class NetworkInterfacePatch(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'address': 'str', + 'services': 'list[str]' + } + + attribute_map = { + 'address': 'address', + 'services': 'services' + } + + required_args = { + } + + def __init__( + self, + address=None, # type: str + services=None, # type: List[str] + ): + """ + Keyword args: + address (str): The IPv4 or IPv6 address to be associated with the specified network interface. + services (list[str]): Services and protocols that are enabled on the interface. + """ + if address is not None: + self.address = address + if services is not None: + self.services = services + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `NetworkInterfacePatch`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(NetworkInterfacePatch, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, NetworkInterfacePatch): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/network_interface_ping.py b/pypureclient/flashblade/FB_2_14/models/network_interface_ping.py new file mode 100644 index 000000000..672521b7a --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/network_interface_ping.py @@ -0,0 +1,129 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class NetworkInterfacePing(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'source': 'str', + 'destination': 'str', + 'component_name': 'str', + 'details': 'str' + } + + attribute_map = { + 'source': 'source', + 'destination': 'destination', + 'component_name': 'component_name', + 'details': 'details' + } + + required_args = { + } + + def __init__( + self, + source=None, # type: str + destination=None, # type: str + component_name=None, # type: str + details=None, # type: str + ): + """ + Keyword args: + source (str): The address where the check starts. Can be a subnet or IP inside the subnet. + destination (str): The destination address or hostname provided in the request that the operation is run against. + component_name (str): Name of the component running the check. + details (str): Giant text block that contains raw output of the operation and a client needs to parse. + """ + if source is not None: + self.source = source + if destination is not None: + self.destination = destination + if component_name is not None: + self.component_name = component_name + if details is not None: + self.details = details + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `NetworkInterfacePing`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(NetworkInterfacePing, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, NetworkInterfacePing): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/network_interface_ping_get_response.py b/pypureclient/flashblade/FB_2_14/models/network_interface_ping_get_response.py new file mode 100644 index 000000000..9e9cbae47 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/network_interface_ping_get_response.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class NetworkInterfacePingGetResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'continuation_token': 'str', + 'total_item_count': 'int', + 'items': 'list[NetworkInterfacePing]' + } + + attribute_map = { + 'continuation_token': 'continuation_token', + 'total_item_count': 'total_item_count', + 'items': 'items' + } + + required_args = { + } + + def __init__( + self, + continuation_token=None, # type: str + total_item_count=None, # type: int + items=None, # type: List[models.NetworkInterfacePing] + ): + """ + Keyword args: + continuation_token (str): Continuation token that can be provided in the `continuation_token` query param to get the next page of data. If you use the `continuation_token` to page through data you are guaranteed to get all items exactly once regardless of how items are modified. If an item is added or deleted during the pagination then it may or may not be returned. The `continuation_token` is generated if the `limit` is less than the remaining number of items, and the default sort is used (no sort is specified). + total_item_count (int): Total number of items after applying `filter` params. + items (list[NetworkInterfacePing]): A list of network ping run result. + """ + if continuation_token is not None: + self.continuation_token = continuation_token + if total_item_count is not None: + self.total_item_count = total_item_count + if items is not None: + self.items = items + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `NetworkInterfacePingGetResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(NetworkInterfacePingGetResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, NetworkInterfacePingGetResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/network_interface_ping_response.py b/pypureclient/flashblade/FB_2_14/models/network_interface_ping_response.py new file mode 100644 index 000000000..439330103 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/network_interface_ping_response.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class NetworkInterfacePingResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'items': 'list[NetworkInterfacePing]' + } + + attribute_map = { + 'items': 'items' + } + + required_args = { + } + + def __init__( + self, + items=None, # type: List[models.NetworkInterfacePing] + ): + """ + Keyword args: + items (list[NetworkInterfacePing]): A list of network ping run result. + """ + if items is not None: + self.items = items + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `NetworkInterfacePingResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(NetworkInterfacePingResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, NetworkInterfacePingResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/network_interface_response.py b/pypureclient/flashblade/FB_2_14/models/network_interface_response.py new file mode 100644 index 000000000..c0e7bae65 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/network_interface_response.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class NetworkInterfaceResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'items': 'list[NetworkInterface]' + } + + attribute_map = { + 'items': 'items' + } + + required_args = { + } + + def __init__( + self, + items=None, # type: List[models.NetworkInterface] + ): + """ + Keyword args: + items (list[NetworkInterface]): A list of network interface objects. + """ + if items is not None: + self.items = items + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `NetworkInterfaceResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(NetworkInterfaceResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, NetworkInterfaceResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/network_interface_trace.py b/pypureclient/flashblade/FB_2_14/models/network_interface_trace.py new file mode 100644 index 000000000..44713309e --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/network_interface_trace.py @@ -0,0 +1,129 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class NetworkInterfaceTrace(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'source': 'str', + 'destination': 'str', + 'component_name': 'str', + 'details': 'str' + } + + attribute_map = { + 'source': 'source', + 'destination': 'destination', + 'component_name': 'component_name', + 'details': 'details' + } + + required_args = { + } + + def __init__( + self, + source=None, # type: str + destination=None, # type: str + component_name=None, # type: str + details=None, # type: str + ): + """ + Keyword args: + source (str): The address where the check starts. Can be a subnet or IP inside the subnet. + destination (str): The destination address or hostname provided in the request that the operation is run against. + component_name (str): Name of the component running the check. + details (str): Giant text block that contains raw output of the operation and a client needs to parse. + """ + if source is not None: + self.source = source + if destination is not None: + self.destination = destination + if component_name is not None: + self.component_name = component_name + if details is not None: + self.details = details + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `NetworkInterfaceTrace`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(NetworkInterfaceTrace, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, NetworkInterfaceTrace): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/network_interface_trace_get_response.py b/pypureclient/flashblade/FB_2_14/models/network_interface_trace_get_response.py new file mode 100644 index 000000000..b9e4cd305 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/network_interface_trace_get_response.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class NetworkInterfaceTraceGetResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'continuation_token': 'str', + 'total_item_count': 'int', + 'items': 'list[NetworkInterfaceTrace]' + } + + attribute_map = { + 'continuation_token': 'continuation_token', + 'total_item_count': 'total_item_count', + 'items': 'items' + } + + required_args = { + } + + def __init__( + self, + continuation_token=None, # type: str + total_item_count=None, # type: int + items=None, # type: List[models.NetworkInterfaceTrace] + ): + """ + Keyword args: + continuation_token (str): Continuation token that can be provided in the `continuation_token` query param to get the next page of data. If you use the `continuation_token` to page through data you are guaranteed to get all items exactly once regardless of how items are modified. If an item is added or deleted during the pagination then it may or may not be returned. The `continuation_token` is generated if the `limit` is less than the remaining number of items, and the default sort is used (no sort is specified). + total_item_count (int): Total number of items after applying `filter` params. + items (list[NetworkInterfaceTrace]): A list of network trace run result. + """ + if continuation_token is not None: + self.continuation_token = continuation_token + if total_item_count is not None: + self.total_item_count = total_item_count + if items is not None: + self.items = items + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `NetworkInterfaceTraceGetResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(NetworkInterfaceTraceGetResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, NetworkInterfaceTraceGetResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/network_interface_trace_response.py b/pypureclient/flashblade/FB_2_14/models/network_interface_trace_response.py new file mode 100644 index 000000000..3d1c9c743 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/network_interface_trace_response.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class NetworkInterfaceTraceResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'items': 'list[NetworkInterfaceTrace]' + } + + attribute_map = { + 'items': 'items' + } + + required_args = { + } + + def __init__( + self, + items=None, # type: List[models.NetworkInterfaceTrace] + ): + """ + Keyword args: + items (list[NetworkInterfaceTrace]): A list of network trace run result. + """ + if items is not None: + self.items = items + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `NetworkInterfaceTraceResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(NetworkInterfaceTraceResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, NetworkInterfaceTraceResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/nfs.py b/pypureclient/flashblade/FB_2_14/models/nfs.py new file mode 100644 index 000000000..7b0e79b94 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/nfs.py @@ -0,0 +1,129 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class Nfs(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'v3_enabled': 'bool', + 'v4_1_enabled': 'bool', + 'rules': 'str', + 'export_policy': 'ReferenceWritable' + } + + attribute_map = { + 'v3_enabled': 'v3_enabled', + 'v4_1_enabled': 'v4_1_enabled', + 'rules': 'rules', + 'export_policy': 'export_policy' + } + + required_args = { + } + + def __init__( + self, + v3_enabled=None, # type: bool + v4_1_enabled=None, # type: bool + rules=None, # type: str + export_policy=None, # type: models.ReferenceWritable + ): + """ + Keyword args: + v3_enabled (bool): If set to `true`, the NFSv3 protocol will be enabled. + v4_1_enabled (bool): If set to `true`, the NFSv4.1 protocol will be enabled. + rules (str): The NFS export rules for the system. Either the `export_policy` or `rules` will control the NFS export functionality for the file system. If this is set, then the `policy` field will be cleared. Both `export_policy` and `rules` can not be set in the same request. Rules can be applied to an individual client or a range of clients specified by IP address (`ip_address(options)`), netmask (`ip_address/length(options)`), netgroup (`@groupname(options)`), hostname (`hostname(options)`) (see RFC-1123 part 2.1), fully qualified domain name (`host.exampledomain.com(options)`) (see RFC-1123 part 2.1, RFC 2181 part 11), or wildcards with fully qualified domain name or hostname (`*.exampledomain?.com(options)`). Possible export options include `rw`, `ro`, `fileid_32bit`, `no_fileid_32bit`, `anonuid`, `anongid`, `root_squash`, `no_root_squash`, `all_squash`, `no_all_squash`, `secure`, `insecure`, `atime`, `noatime`, and `sec`. If not specified, defaults to `*(rw,no_root_squash)`. + export_policy (ReferenceWritable): The NFS export policy for the system. Either the `export_policy` or `rules` will control the NFS export functionality for the file system. If this is set, then the `rules` field will be cleared. Both `export_policy` and `rules` can not be set in the same request. + """ + if v3_enabled is not None: + self.v3_enabled = v3_enabled + if v4_1_enabled is not None: + self.v4_1_enabled = v4_1_enabled + if rules is not None: + self.rules = rules + if export_policy is not None: + self.export_policy = export_policy + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `Nfs`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(Nfs, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, Nfs): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/nfs_export_policy.py b/pypureclient/flashblade/FB_2_14/models/nfs_export_policy.py new file mode 100644 index 000000000..80b22a239 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/nfs_export_policy.py @@ -0,0 +1,153 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class NfsExportPolicy(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'name': 'str', + 'id': 'str', + 'enabled': 'bool', + 'is_local': 'bool', + 'location': 'FixedReference', + 'policy_type': 'str', + 'version': 'str', + 'rules': 'list[NfsExportPolicyRuleInPolicy]' + } + + attribute_map = { + 'name': 'name', + 'id': 'id', + 'enabled': 'enabled', + 'is_local': 'is_local', + 'location': 'location', + 'policy_type': 'policy_type', + 'version': 'version', + 'rules': 'rules' + } + + required_args = { + } + + def __init__( + self, + name=None, # type: str + id=None, # type: str + enabled=None, # type: bool + is_local=None, # type: bool + location=None, # type: models.FixedReference + policy_type=None, # type: str + version=None, # type: str + rules=None, # type: List[models.NfsExportPolicyRuleInPolicy] + ): + """ + Keyword args: + name (str): A name chosen by the user. Can be changed. Must be locally unique. + id (str): A non-modifiable, globally unique ID chosen by the system. + enabled (bool): If `true`, the policy is enabled. If not specified, defaults to `true`. + is_local (bool): Whether the policy is defined on the local array. + location (FixedReference): Reference to the array where the policy is defined. + policy_type (str): Type of the policy. Valid values are `audit`, `bucket-access`, `cross-origin-resource-sharing`, `network-access`, `nfs`, `object-access`, `smb-client`, `smb-share`, and `snapshot`. + version (str): A hash of the other properties of this resource. This can be used when updating the resource to ensure there aren't any updates since the resource was read. + rules (list[NfsExportPolicyRuleInPolicy]): All of the rules that are part of this policy. The order is the evaluation order. + """ + if name is not None: + self.name = name + if id is not None: + self.id = id + if enabled is not None: + self.enabled = enabled + if is_local is not None: + self.is_local = is_local + if location is not None: + self.location = location + if policy_type is not None: + self.policy_type = policy_type + if version is not None: + self.version = version + if rules is not None: + self.rules = rules + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `NfsExportPolicy`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(NfsExportPolicy, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, NfsExportPolicy): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/nfs_export_policy_get_response.py b/pypureclient/flashblade/FB_2_14/models/nfs_export_policy_get_response.py new file mode 100644 index 000000000..487322872 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/nfs_export_policy_get_response.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class NfsExportPolicyGetResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'continuation_token': 'str', + 'total_item_count': 'int', + 'items': 'list[NfsExportPolicy]' + } + + attribute_map = { + 'continuation_token': 'continuation_token', + 'total_item_count': 'total_item_count', + 'items': 'items' + } + + required_args = { + } + + def __init__( + self, + continuation_token=None, # type: str + total_item_count=None, # type: int + items=None, # type: List[models.NfsExportPolicy] + ): + """ + Keyword args: + continuation_token (str): Continuation token that can be provided in the `continuation_token` query param to get the next page of data. If you use the `continuation_token` to page through data you are guaranteed to get all items exactly once regardless of how items are modified. If an item is added or deleted during the pagination then it may or may not be returned. The `continuation_token` is generated if the `limit` is less than the remaining number of items, and the default sort is used (no sort is specified). + total_item_count (int): Total number of items after applying `filter` params. + items (list[NfsExportPolicy]): A list of NFS export policy objects. + """ + if continuation_token is not None: + self.continuation_token = continuation_token + if total_item_count is not None: + self.total_item_count = total_item_count + if items is not None: + self.items = items + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `NfsExportPolicyGetResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(NfsExportPolicyGetResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, NfsExportPolicyGetResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/nfs_export_policy_post.py b/pypureclient/flashblade/FB_2_14/models/nfs_export_policy_post.py new file mode 100644 index 000000000..129ab87e6 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/nfs_export_policy_post.py @@ -0,0 +1,147 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class NfsExportPolicyPost(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'name': 'str', + 'id': 'str', + 'enabled': 'bool', + 'is_local': 'bool', + 'location': 'FixedReference', + 'policy_type': 'str', + 'rules': 'list[NfsExportPolicyRuleInPolicy]' + } + + attribute_map = { + 'name': 'name', + 'id': 'id', + 'enabled': 'enabled', + 'is_local': 'is_local', + 'location': 'location', + 'policy_type': 'policy_type', + 'rules': 'rules' + } + + required_args = { + } + + def __init__( + self, + name=None, # type: str + id=None, # type: str + enabled=None, # type: bool + is_local=None, # type: bool + location=None, # type: models.FixedReference + policy_type=None, # type: str + rules=None, # type: List[models.NfsExportPolicyRuleInPolicy] + ): + """ + Keyword args: + name (str): Name of the object (e.g., a file system or snapshot). + id (str): A non-modifiable, globally unique ID chosen by the system. + enabled (bool): If `true`, the policy is enabled. If not specified, defaults to `true`. + is_local (bool): Whether the policy is defined on the local array. + location (FixedReference): Reference to the array where the policy is defined. + policy_type (str): Type of the policy. Valid values are `audit`, `bucket-access`, `cross-origin-resource-sharing`, `network-access`, `nfs`, `object-access`, `smb-client`, `smb-share`, and `snapshot`. + rules (list[NfsExportPolicyRuleInPolicy]): All of the rules that are part of this policy. The order is the evaluation order. + """ + if name is not None: + self.name = name + if id is not None: + self.id = id + if enabled is not None: + self.enabled = enabled + if is_local is not None: + self.is_local = is_local + if location is not None: + self.location = location + if policy_type is not None: + self.policy_type = policy_type + if rules is not None: + self.rules = rules + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `NfsExportPolicyPost`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(NfsExportPolicyPost, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, NfsExportPolicyPost): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/nfs_export_policy_response.py b/pypureclient/flashblade/FB_2_14/models/nfs_export_policy_response.py new file mode 100644 index 000000000..2f42ab819 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/nfs_export_policy_response.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class NfsExportPolicyResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'items': 'list[NfsExportPolicy]' + } + + attribute_map = { + 'items': 'items' + } + + required_args = { + } + + def __init__( + self, + items=None, # type: List[models.NfsExportPolicy] + ): + """ + Keyword args: + items (list[NfsExportPolicy]): A list of NFS export policy objects. + """ + if items is not None: + self.items = items + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `NfsExportPolicyResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(NfsExportPolicyResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, NfsExportPolicyResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/nfs_export_policy_rule.py b/pypureclient/flashblade/FB_2_14/models/nfs_export_policy_rule.py new file mode 100644 index 000000000..33d3b70db --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/nfs_export_policy_rule.py @@ -0,0 +1,189 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class NfsExportPolicyRule(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'name': 'str', + 'id': 'str', + 'access': 'str', + 'anongid': 'str', + 'anonuid': 'str', + 'atime': 'bool', + 'client': 'str', + 'fileid_32bit': 'bool', + 'permission': 'str', + 'policy': 'FixedReference', + 'policy_version': 'str', + 'secure': 'bool', + 'security': 'list[str]', + 'index': 'int' + } + + attribute_map = { + 'name': 'name', + 'id': 'id', + 'access': 'access', + 'anongid': 'anongid', + 'anonuid': 'anonuid', + 'atime': 'atime', + 'client': 'client', + 'fileid_32bit': 'fileid_32bit', + 'permission': 'permission', + 'policy': 'policy', + 'policy_version': 'policy_version', + 'secure': 'secure', + 'security': 'security', + 'index': 'index' + } + + required_args = { + } + + def __init__( + self, + name=None, # type: str + id=None, # type: str + access=None, # type: str + anongid=None, # type: str + anonuid=None, # type: str + atime=None, # type: bool + client=None, # type: str + fileid_32bit=None, # type: bool + permission=None, # type: str + policy=None, # type: models.FixedReference + policy_version=None, # type: str + secure=None, # type: bool + security=None, # type: List[str] + index=None, # type: int + ): + """ + Keyword args: + name (str): Name of the object (e.g., a file system or snapshot). + id (str): A non-modifiable, globally unique ID chosen by the system. + access (str): Specifies access control for the export. Valid values are `root-squash`, `all-squash`, and `no-squash`. `root-squash` prevents client users and groups with root privilege from mapping their root privilege to a file system. All users with UID 0 will have their UID mapped to anonuid. All users with GID 0 will have their GID mapped to anongid. `all-squash` maps all UIDs (including root) to anonuid and all GIDs (including root) to anongid. `no-squash` allows users and groups to access the file system with their UIDs and GIDs. The default is `root-squash` if not specified. + anongid (str): Any user whose GID is affected by an `access` of `root_squash` or `all_squash` will have their GID mapped to `anongid`. The default `anongid` is null, which means 65534. Use \"\" to clear. + anonuid (str): Any user whose UID is affected by an `access` of `root_squash` or `all_squash` will have their UID mapped to `anonuid`. The default `anonuid` is null, which means 65534. Use \"\" to clear. + atime (bool): If `true`, after a read operation has occurred, the inode access time is updated only if any of the following conditions is true: the previous access time is less than the inode modify time, the previous access time is less than the inode change time, or the previous access time is more than 24 hours ago. If `false`, disables the update of inode access times after read operations. Defaults to `true`. + client (str): Specifies the clients that will be permitted to access the export. Accepted notation is a single IP address, subnet in CIDR notation, netgroup, hostname (see RFC-1123 part 2.1), fully qualified domain name (see RFC-1123 part 2.1, RFC 2181 part 11), wildcards with fully qualified domain name or hostname, or anonymous (`*`). The default is `*` if not specified. + fileid_32bit (bool): Whether the file id is 32 bits or not. Defaults to `false`. + permission (str): Specifies which read-write client access permissions are allowed for the export. Valid values are `rw` and `ro`. The default is `ro` if not specified. + policy (FixedReference): The policy to which this rule belongs. + policy_version (str): The policy's version. This can be used when updating the resource to ensure there aren't any updates to the policy since the resource was read. + secure (bool): If `true`, prevents NFS access to client connections coming from non-reserved ports. Applies to NFSv3, NFSv4.1, and auxiliary protocols MOUNT and NLM. If `false`, allows NFS access to client connections coming from non-reserved ports. Applies to NFSv3, NFSv4.1, and auxiliary protocols MOUNT and NLM. The default is `false` if not specified. + security (list[str]): The security flavors to use for accessing files on this mount point. If the server does not support the requested flavor, the mount operation fails. If `sys`, trusts the client to specify user's identity. If `krb5`, provides cryptographic proof of a user's identity in each RPC request. This provides strong verification of the identity of users accessing data on the server. Note that additional configuration besides adding this mount option is required in order to enable Kerberos security. If `krb5i`, adds integrity checking to krb5, to ensure the data has not been tampered with. If `krb5p`, adds integrity checking and encryption to krb5. This is the most secure setting, but it also involves the most performance overhead. The default is `sys` if not specified. + index (int): The index within the policy. The `index` indicates the order the rules are evaluated. NOTE: It is recommended to use the query param `before_rule_id` to do reordering to avoid concurrency issues, but changing `index` is also supported. `index` can not be changed if `before_rule_id` or `before_rule_name` are specified. + """ + if name is not None: + self.name = name + if id is not None: + self.id = id + if access is not None: + self.access = access + if anongid is not None: + self.anongid = anongid + if anonuid is not None: + self.anonuid = anonuid + if atime is not None: + self.atime = atime + if client is not None: + self.client = client + if fileid_32bit is not None: + self.fileid_32bit = fileid_32bit + if permission is not None: + self.permission = permission + if policy is not None: + self.policy = policy + if policy_version is not None: + self.policy_version = policy_version + if secure is not None: + self.secure = secure + if security is not None: + self.security = security + if index is not None: + self.index = index + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `NfsExportPolicyRule`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(NfsExportPolicyRule, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, NfsExportPolicyRule): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/nfs_export_policy_rule_base.py b/pypureclient/flashblade/FB_2_14/models/nfs_export_policy_rule_base.py new file mode 100644 index 000000000..7a53e5ed6 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/nfs_export_policy_rule_base.py @@ -0,0 +1,183 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class NfsExportPolicyRuleBase(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'name': 'str', + 'id': 'str', + 'access': 'str', + 'anongid': 'str', + 'anonuid': 'str', + 'atime': 'bool', + 'client': 'str', + 'fileid_32bit': 'bool', + 'permission': 'str', + 'policy': 'FixedReference', + 'policy_version': 'str', + 'secure': 'bool', + 'security': 'list[str]' + } + + attribute_map = { + 'name': 'name', + 'id': 'id', + 'access': 'access', + 'anongid': 'anongid', + 'anonuid': 'anonuid', + 'atime': 'atime', + 'client': 'client', + 'fileid_32bit': 'fileid_32bit', + 'permission': 'permission', + 'policy': 'policy', + 'policy_version': 'policy_version', + 'secure': 'secure', + 'security': 'security' + } + + required_args = { + } + + def __init__( + self, + name=None, # type: str + id=None, # type: str + access=None, # type: str + anongid=None, # type: str + anonuid=None, # type: str + atime=None, # type: bool + client=None, # type: str + fileid_32bit=None, # type: bool + permission=None, # type: str + policy=None, # type: models.FixedReference + policy_version=None, # type: str + secure=None, # type: bool + security=None, # type: List[str] + ): + """ + Keyword args: + name (str): Name of the object (e.g., a file system or snapshot). + id (str): A non-modifiable, globally unique ID chosen by the system. + access (str): Specifies access control for the export. Valid values are `root-squash`, `all-squash`, and `no-squash`. `root-squash` prevents client users and groups with root privilege from mapping their root privilege to a file system. All users with UID 0 will have their UID mapped to anonuid. All users with GID 0 will have their GID mapped to anongid. `all-squash` maps all UIDs (including root) to anonuid and all GIDs (including root) to anongid. `no-squash` allows users and groups to access the file system with their UIDs and GIDs. The default is `root-squash` if not specified. + anongid (str): Any user whose GID is affected by an `access` of `root_squash` or `all_squash` will have their GID mapped to `anongid`. The default `anongid` is null, which means 65534. Use \"\" to clear. + anonuid (str): Any user whose UID is affected by an `access` of `root_squash` or `all_squash` will have their UID mapped to `anonuid`. The default `anonuid` is null, which means 65534. Use \"\" to clear. + atime (bool): If `true`, after a read operation has occurred, the inode access time is updated only if any of the following conditions is true: the previous access time is less than the inode modify time, the previous access time is less than the inode change time, or the previous access time is more than 24 hours ago. If `false`, disables the update of inode access times after read operations. Defaults to `true`. + client (str): Specifies the clients that will be permitted to access the export. Accepted notation is a single IP address, subnet in CIDR notation, netgroup, hostname (see RFC-1123 part 2.1), fully qualified domain name (see RFC-1123 part 2.1, RFC 2181 part 11), wildcards with fully qualified domain name or hostname, or anonymous (`*`). The default is `*` if not specified. + fileid_32bit (bool): Whether the file id is 32 bits or not. Defaults to `false`. + permission (str): Specifies which read-write client access permissions are allowed for the export. Valid values are `rw` and `ro`. The default is `ro` if not specified. + policy (FixedReference): The policy to which this rule belongs. + policy_version (str): The policy's version. This can be used when updating the resource to ensure there aren't any updates to the policy since the resource was read. + secure (bool): If `true`, prevents NFS access to client connections coming from non-reserved ports. Applies to NFSv3, NFSv4.1, and auxiliary protocols MOUNT and NLM. If `false`, allows NFS access to client connections coming from non-reserved ports. Applies to NFSv3, NFSv4.1, and auxiliary protocols MOUNT and NLM. The default is `false` if not specified. + security (list[str]): The security flavors to use for accessing files on this mount point. If the server does not support the requested flavor, the mount operation fails. If `sys`, trusts the client to specify user's identity. If `krb5`, provides cryptographic proof of a user's identity in each RPC request. This provides strong verification of the identity of users accessing data on the server. Note that additional configuration besides adding this mount option is required in order to enable Kerberos security. If `krb5i`, adds integrity checking to krb5, to ensure the data has not been tampered with. If `krb5p`, adds integrity checking and encryption to krb5. This is the most secure setting, but it also involves the most performance overhead. The default is `sys` if not specified. + """ + if name is not None: + self.name = name + if id is not None: + self.id = id + if access is not None: + self.access = access + if anongid is not None: + self.anongid = anongid + if anonuid is not None: + self.anonuid = anonuid + if atime is not None: + self.atime = atime + if client is not None: + self.client = client + if fileid_32bit is not None: + self.fileid_32bit = fileid_32bit + if permission is not None: + self.permission = permission + if policy is not None: + self.policy = policy + if policy_version is not None: + self.policy_version = policy_version + if secure is not None: + self.secure = secure + if security is not None: + self.security = security + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `NfsExportPolicyRuleBase`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(NfsExportPolicyRuleBase, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, NfsExportPolicyRuleBase): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/nfs_export_policy_rule_get_response.py b/pypureclient/flashblade/FB_2_14/models/nfs_export_policy_rule_get_response.py new file mode 100644 index 000000000..ba0776dd2 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/nfs_export_policy_rule_get_response.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class NfsExportPolicyRuleGetResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'continuation_token': 'str', + 'total_item_count': 'int', + 'items': 'list[NfsExportPolicyRule]' + } + + attribute_map = { + 'continuation_token': 'continuation_token', + 'total_item_count': 'total_item_count', + 'items': 'items' + } + + required_args = { + } + + def __init__( + self, + continuation_token=None, # type: str + total_item_count=None, # type: int + items=None, # type: List[models.NfsExportPolicyRule] + ): + """ + Keyword args: + continuation_token (str): Continuation token that can be provided in the `continuation_token` query param to get the next page of data. If you use the `continuation_token` to page through data you are guaranteed to get all items exactly once regardless of how items are modified. If an item is added or deleted during the pagination then it may or may not be returned. The `continuation_token` is generated if the `limit` is less than the remaining number of items, and the default sort is used (no sort is specified). + total_item_count (int): Total number of items after applying `filter` params. + items (list[NfsExportPolicyRule]): Displays a list of all items after filtering. + """ + if continuation_token is not None: + self.continuation_token = continuation_token + if total_item_count is not None: + self.total_item_count = total_item_count + if items is not None: + self.items = items + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `NfsExportPolicyRuleGetResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(NfsExportPolicyRuleGetResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, NfsExportPolicyRuleGetResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/nfs_export_policy_rule_in_policy.py b/pypureclient/flashblade/FB_2_14/models/nfs_export_policy_rule_in_policy.py new file mode 100644 index 000000000..654c9fdb1 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/nfs_export_policy_rule_in_policy.py @@ -0,0 +1,189 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class NfsExportPolicyRuleInPolicy(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'name': 'str', + 'id': 'str', + 'access': 'str', + 'anongid': 'str', + 'anonuid': 'str', + 'atime': 'bool', + 'client': 'str', + 'fileid_32bit': 'bool', + 'permission': 'str', + 'policy': 'FixedReference', + 'policy_version': 'str', + 'secure': 'bool', + 'security': 'list[str]', + 'index': 'int' + } + + attribute_map = { + 'name': 'name', + 'id': 'id', + 'access': 'access', + 'anongid': 'anongid', + 'anonuid': 'anonuid', + 'atime': 'atime', + 'client': 'client', + 'fileid_32bit': 'fileid_32bit', + 'permission': 'permission', + 'policy': 'policy', + 'policy_version': 'policy_version', + 'secure': 'secure', + 'security': 'security', + 'index': 'index' + } + + required_args = { + } + + def __init__( + self, + name=None, # type: str + id=None, # type: str + access=None, # type: str + anongid=None, # type: str + anonuid=None, # type: str + atime=None, # type: bool + client=None, # type: str + fileid_32bit=None, # type: bool + permission=None, # type: str + policy=None, # type: models.FixedReference + policy_version=None, # type: str + secure=None, # type: bool + security=None, # type: List[str] + index=None, # type: int + ): + """ + Keyword args: + name (str): Name of the object (e.g., a file system or snapshot). + id (str): A non-modifiable, globally unique ID chosen by the system. + access (str): Specifies access control for the export. Valid values are `root-squash`, `all-squash`, and `no-squash`. `root-squash` prevents client users and groups with root privilege from mapping their root privilege to a file system. All users with UID 0 will have their UID mapped to anonuid. All users with GID 0 will have their GID mapped to anongid. `all-squash` maps all UIDs (including root) to anonuid and all GIDs (including root) to anongid. `no-squash` allows users and groups to access the file system with their UIDs and GIDs. The default is `root-squash` if not specified. + anongid (str): Any user whose GID is affected by an `access` of `root_squash` or `all_squash` will have their GID mapped to `anongid`. The default `anongid` is null, which means 65534. Use \"\" to clear. + anonuid (str): Any user whose UID is affected by an `access` of `root_squash` or `all_squash` will have their UID mapped to `anonuid`. The default `anonuid` is null, which means 65534. Use \"\" to clear. + atime (bool): If `true`, after a read operation has occurred, the inode access time is updated only if any of the following conditions is true: the previous access time is less than the inode modify time, the previous access time is less than the inode change time, or the previous access time is more than 24 hours ago. If `false`, disables the update of inode access times after read operations. Defaults to `true`. + client (str): Specifies the clients that will be permitted to access the export. Accepted notation is a single IP address, subnet in CIDR notation, netgroup, hostname (see RFC-1123 part 2.1), fully qualified domain name (see RFC-1123 part 2.1, RFC 2181 part 11), wildcards with fully qualified domain name or hostname, or anonymous (`*`). The default is `*` if not specified. + fileid_32bit (bool): Whether the file id is 32 bits or not. Defaults to `false`. + permission (str): Specifies which read-write client access permissions are allowed for the export. Valid values are `rw` and `ro`. The default is `ro` if not specified. + policy (FixedReference): The policy to which this rule belongs. + policy_version (str): The policy's version. This can be used when updating the resource to ensure there aren't any updates to the policy since the resource was read. + secure (bool): If `true`, prevents NFS access to client connections coming from non-reserved ports. Applies to NFSv3, NFSv4.1, and auxiliary protocols MOUNT and NLM. If `false`, allows NFS access to client connections coming from non-reserved ports. Applies to NFSv3, NFSv4.1, and auxiliary protocols MOUNT and NLM. The default is `false` if not specified. + security (list[str]): The security flavors to use for accessing files on this mount point. If the server does not support the requested flavor, the mount operation fails. If `sys`, trusts the client to specify user's identity. If `krb5`, provides cryptographic proof of a user's identity in each RPC request. This provides strong verification of the identity of users accessing data on the server. Note that additional configuration besides adding this mount option is required in order to enable Kerberos security. If `krb5i`, adds integrity checking to krb5, to ensure the data has not been tampered with. If `krb5p`, adds integrity checking and encryption to krb5. This is the most secure setting, but it also involves the most performance overhead. The default is `sys` if not specified. + index (int): The index within the policy. The `index` indicates the order the rules are evaluated. + """ + if name is not None: + self.name = name + if id is not None: + self.id = id + if access is not None: + self.access = access + if anongid is not None: + self.anongid = anongid + if anonuid is not None: + self.anonuid = anonuid + if atime is not None: + self.atime = atime + if client is not None: + self.client = client + if fileid_32bit is not None: + self.fileid_32bit = fileid_32bit + if permission is not None: + self.permission = permission + if policy is not None: + self.policy = policy + if policy_version is not None: + self.policy_version = policy_version + if secure is not None: + self.secure = secure + if security is not None: + self.security = security + if index is not None: + self.index = index + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `NfsExportPolicyRuleInPolicy`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(NfsExportPolicyRuleInPolicy, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, NfsExportPolicyRuleInPolicy): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/nfs_export_policy_rule_response.py b/pypureclient/flashblade/FB_2_14/models/nfs_export_policy_rule_response.py new file mode 100644 index 000000000..19c24edb7 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/nfs_export_policy_rule_response.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class NfsExportPolicyRuleResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'items': 'list[NfsExportPolicyRule]' + } + + attribute_map = { + 'items': 'items' + } + + required_args = { + } + + def __init__( + self, + items=None, # type: List[models.NfsExportPolicyRule] + ): + """ + Keyword args: + items (list[NfsExportPolicyRule]): Displays a list of all items after filtering. + """ + if items is not None: + self.items = items + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `NfsExportPolicyRuleResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(NfsExportPolicyRuleResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, NfsExportPolicyRuleResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/nfs_patch.py b/pypureclient/flashblade/FB_2_14/models/nfs_patch.py new file mode 100644 index 000000000..e1a9e455f --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/nfs_patch.py @@ -0,0 +1,147 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class NfsPatch(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'v3_enabled': 'bool', + 'v4_1_enabled': 'bool', + 'rules': 'str', + 'add_rules': 'str', + 'remove_rules': 'str', + 'after': 'str', + 'export_policy': 'ReferenceWritable' + } + + attribute_map = { + 'v3_enabled': 'v3_enabled', + 'v4_1_enabled': 'v4_1_enabled', + 'rules': 'rules', + 'add_rules': 'add_rules', + 'remove_rules': 'remove_rules', + 'after': 'after', + 'export_policy': 'export_policy' + } + + required_args = { + } + + def __init__( + self, + v3_enabled=None, # type: bool + v4_1_enabled=None, # type: bool + rules=None, # type: str + add_rules=None, # type: str + remove_rules=None, # type: str + after=None, # type: str + export_policy=None, # type: models.ReferenceWritable + ): + """ + Keyword args: + v3_enabled (bool): If set to `true`, the NFSv3 protocol will be enabled. + v4_1_enabled (bool): If set to `true`, the NFSv4.1 protocol will be enabled. + rules (str): The NFS export rules for the system. Either the `export_policy` or `rules` will control the NFS export functionality for the file system. If this is set, then the `policy` field will be cleared. Both `export_policy` and `rules` can not be set in the same request. Rules can be applied to an individual client or a range of clients specified by IP address (`ip_address(options)`), netmask (`ip_address/length(options)`), netgroup (`@groupname(options)`), hostname (`hostname(options)`) (see RFC-1123 part 2.1), fully qualified domain name (`host.exampledomain.com(options)`) (see RFC-1123 part 2.1, RFC 2181 part 11), or wildcards with fully qualified domain name or hostname (`*.exampledomain?.com(options)`). Possible export options include `rw`, `ro`, `fileid_32bit`, `no_fileid_32bit`, `anonuid`, `anongid`, `root_squash`, `no_root_squash`, `all_squash`, `no_all_squash`, `secure`, `insecure`, `atime`, `noatime`, and `sec`. If not specified, defaults to `*(rw,no_root_squash)`. + add_rules (str): The rules which will be added to the existing NFS export rules for the file system. If `export_policy` is in use and and this field is set, the operation will fail. + remove_rules (str): The rules which will be removed from the existing NFS export rules for the file system. Only the first occurrence of the `remove_rules` will be removed. If `export_policy` is in use and and this field is set, the operation will fail. + after (str): The `after` field can be used with `add_rules` or `remove_rules` or both. If used with `add_rules`, then the `add_rules` string will be inserted after the first occurrence of the `after` string. If used with `remove_rules`, then remove the first occurrence of `remove_rules` after the first occurrence of the `after` string. The `remove_rules` will be processed before the `add_rules`. + export_policy (ReferenceWritable): The NFS export policy for the system. Either the `export_policy` or `rules` will control the NFS export functionality for the file system. If this is set, then the `rules` field will be cleared. Both `export_policy` and `rules` can not be set in the same request. + """ + if v3_enabled is not None: + self.v3_enabled = v3_enabled + if v4_1_enabled is not None: + self.v4_1_enabled = v4_1_enabled + if rules is not None: + self.rules = rules + if add_rules is not None: + self.add_rules = add_rules + if remove_rules is not None: + self.remove_rules = remove_rules + if after is not None: + self.after = after + if export_policy is not None: + self.export_policy = export_policy + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `NfsPatch`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(NfsPatch, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, NfsPatch): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/oauth_token_response.py b/pypureclient/flashblade/FB_2_14/models/oauth_token_response.py new file mode 100644 index 000000000..eed7bf852 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/oauth_token_response.py @@ -0,0 +1,129 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class OauthTokenResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'access_token': 'str', + 'issued_token_type': 'str', + 'token_type': 'str', + 'expires_in': 'int' + } + + attribute_map = { + 'access_token': 'access_token', + 'issued_token_type': 'issued_token_type', + 'token_type': 'token_type', + 'expires_in': 'expires_in' + } + + required_args = { + } + + def __init__( + self, + access_token=None, # type: str + issued_token_type=None, # type: str + token_type=None, # type: str + expires_in=None, # type: int + ): + """ + Keyword args: + access_token (str): The serialized OAuth 2.0 Bearer token used to perform authenticated requests. The access token must be added to the Authorization header of all API calls. + issued_token_type (str): The type of token that is issued. The Pure Storage REST API supports OAuth 2.0 access tokens. + token_type (str): Indicates how the API client can use the access token issued. The Pure Storage REST API supports the `Bearer` token. + expires_in (int): The duration after which the access token will expire. Measured in seconds. This differs from other duration fields that are expressed in milliseconds. + """ + if access_token is not None: + self.access_token = access_token + if issued_token_type is not None: + self.issued_token_type = issued_token_type + if token_type is not None: + self.token_type = token_type + if expires_in is not None: + self.expires_in = expires_in + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `OauthTokenResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(OauthTokenResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, OauthTokenResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/object_backlog.py b/pypureclient/flashblade/FB_2_14/models/object_backlog.py new file mode 100644 index 000000000..6e311cca5 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/object_backlog.py @@ -0,0 +1,129 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class ObjectBacklog(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'bytes_count': 'int', + 'delete_ops_count': 'int', + 'other_ops_count': 'int', + 'put_ops_count': 'int' + } + + attribute_map = { + 'bytes_count': 'bytes_count', + 'delete_ops_count': 'delete_ops_count', + 'other_ops_count': 'other_ops_count', + 'put_ops_count': 'put_ops_count' + } + + required_args = { + } + + def __init__( + self, + bytes_count=None, # type: int + delete_ops_count=None, # type: int + other_ops_count=None, # type: int + put_ops_count=None, # type: int + ): + """ + Keyword args: + bytes_count (int): The size of the objects in bytes that need to be replicated. This does not include the size of custom metadata. + delete_ops_count (int): The number of DELETE operations that need to be replicated. + other_ops_count (int): The number of other operations that need to be replicated. + put_ops_count (int): The number of PUT operations that need to be replicated. + """ + if bytes_count is not None: + self.bytes_count = bytes_count + if delete_ops_count is not None: + self.delete_ops_count = delete_ops_count + if other_ops_count is not None: + self.other_ops_count = other_ops_count + if put_ops_count is not None: + self.put_ops_count = put_ops_count + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `ObjectBacklog`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(ObjectBacklog, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ObjectBacklog): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/object_lock_config_base.py b/pypureclient/flashblade/FB_2_14/models/object_lock_config_base.py new file mode 100644 index 000000000..45c89f4af --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/object_lock_config_base.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class ObjectLockConfigBase(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'default_retention_mode': 'str', + 'enabled': 'bool', + 'freeze_locked_objects': 'bool' + } + + attribute_map = { + 'default_retention_mode': 'default_retention_mode', + 'enabled': 'enabled', + 'freeze_locked_objects': 'freeze_locked_objects' + } + + required_args = { + } + + def __init__( + self, + default_retention_mode=None, # type: str + enabled=None, # type: bool + freeze_locked_objects=None, # type: bool + ): + """ + Keyword args: + default_retention_mode (str): The retention mode used to apply locks on new objects if none is specified by the S3 client. Valid values include `compliance` and `governance`. If there is no default, this value is `null`. Use \"\" to clear. + enabled (bool): If set to `true`, then S3 APIs relating to object lock may be used. + freeze_locked_objects (bool): If set to `true`, a locked object will be read-only and no new versions of the object may be created due to modifications. If not specified, defaults to `false`. + """ + if default_retention_mode is not None: + self.default_retention_mode = default_retention_mode + if enabled is not None: + self.enabled = enabled + if freeze_locked_objects is not None: + self.freeze_locked_objects = freeze_locked_objects + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `ObjectLockConfigBase`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(ObjectLockConfigBase, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ObjectLockConfigBase): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/object_lock_config_request_body.py b/pypureclient/flashblade/FB_2_14/models/object_lock_config_request_body.py new file mode 100644 index 000000000..b28ae79e6 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/object_lock_config_request_body.py @@ -0,0 +1,129 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class ObjectLockConfigRequestBody(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'default_retention_mode': 'str', + 'enabled': 'bool', + 'freeze_locked_objects': 'bool', + 'default_retention': 'str' + } + + attribute_map = { + 'default_retention_mode': 'default_retention_mode', + 'enabled': 'enabled', + 'freeze_locked_objects': 'freeze_locked_objects', + 'default_retention': 'default_retention' + } + + required_args = { + } + + def __init__( + self, + default_retention_mode=None, # type: str + enabled=None, # type: bool + freeze_locked_objects=None, # type: bool + default_retention=None, # type: str + ): + """ + Keyword args: + default_retention_mode (str): The retention mode used to apply locks on new objects if none is specified by the S3 client. Valid values include `compliance` and `governance`. If there is no default, this value is `null`. Use \"\" to clear. + enabled (bool): If set to `true`, then S3 APIs relating to object lock may be used. + freeze_locked_objects (bool): If set to `true`, a locked object will be read-only and no new versions of the object may be created due to modifications. If not specified, defaults to `false`. + default_retention (str): The retention period, in milliseconds, used to apply locks on new objects if none is specified by the S3 client. Valid values are any multiple of `86400000` (1 day), up to `3153600000000` (36500 days). If there is no default, this value is `null`. Use \"\" to clear. + """ + if default_retention_mode is not None: + self.default_retention_mode = default_retention_mode + if enabled is not None: + self.enabled = enabled + if freeze_locked_objects is not None: + self.freeze_locked_objects = freeze_locked_objects + if default_retention is not None: + self.default_retention = default_retention + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `ObjectLockConfigRequestBody`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(ObjectLockConfigRequestBody, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ObjectLockConfigRequestBody): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/object_lock_config_response.py b/pypureclient/flashblade/FB_2_14/models/object_lock_config_response.py new file mode 100644 index 000000000..289939697 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/object_lock_config_response.py @@ -0,0 +1,129 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class ObjectLockConfigResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'default_retention_mode': 'str', + 'enabled': 'bool', + 'freeze_locked_objects': 'bool', + 'default_retention': 'int' + } + + attribute_map = { + 'default_retention_mode': 'default_retention_mode', + 'enabled': 'enabled', + 'freeze_locked_objects': 'freeze_locked_objects', + 'default_retention': 'default_retention' + } + + required_args = { + } + + def __init__( + self, + default_retention_mode=None, # type: str + enabled=None, # type: bool + freeze_locked_objects=None, # type: bool + default_retention=None, # type: int + ): + """ + Keyword args: + default_retention_mode (str): The retention mode used to apply locks on new objects if none is specified by the S3 client. Valid values include `compliance` and `governance`. If there is no default, this value is `null`. Use \"\" to clear. + enabled (bool): If set to `true`, then S3 APIs relating to object lock may be used. + freeze_locked_objects (bool): If set to `true`, a locked object will be read-only and no new versions of the object may be created due to modifications. If not specified, defaults to `false`. + default_retention (int): The retention period, in milliseconds, used to apply locks on new objects if none is specified by the S3 client. Valid values are any multiple of `86400000` (1 day), up to `3153600000000` (36500 days). If there is no default, this value is `null`. + """ + if default_retention_mode is not None: + self.default_retention_mode = default_retention_mode + if enabled is not None: + self.enabled = enabled + if freeze_locked_objects is not None: + self.freeze_locked_objects = freeze_locked_objects + if default_retention is not None: + self.default_retention = default_retention + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `ObjectLockConfigResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(ObjectLockConfigResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ObjectLockConfigResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/object_store_access_key.py b/pypureclient/flashblade/FB_2_14/models/object_store_access_key.py new file mode 100644 index 000000000..d8436f2b8 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/object_store_access_key.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class ObjectStoreAccessKey(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'name': 'str', + 'created': 'int', + 'enabled': 'bool', + 'secret_access_key': 'str', + 'user': 'FixedReference' + } + + attribute_map = { + 'name': 'name', + 'created': 'created', + 'enabled': 'enabled', + 'secret_access_key': 'secret_access_key', + 'user': 'user' + } + + required_args = { + } + + def __init__( + self, + name=None, # type: str + created=None, # type: int + enabled=None, # type: bool + secret_access_key=None, # type: str + user=None, # type: models.FixedReference + ): + """ + Keyword args: + name (str): Name of the object (e.g., a file system or snapshot). + created (int): Creation timestamp of the object. + enabled (bool): Is the access key enabled? If not specified, defaults to `false`. + secret_access_key (str): The secret access key, only populated on creation if it is not imported from another FlashBlade. + user (FixedReference): Reference of the associated user. + """ + if name is not None: + self.name = name + if created is not None: + self.created = created + if enabled is not None: + self.enabled = enabled + if secret_access_key is not None: + self.secret_access_key = secret_access_key + if user is not None: + self.user = user + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `ObjectStoreAccessKey`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(ObjectStoreAccessKey, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ObjectStoreAccessKey): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/object_store_access_key_get_response.py b/pypureclient/flashblade/FB_2_14/models/object_store_access_key_get_response.py new file mode 100644 index 000000000..90746978b --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/object_store_access_key_get_response.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class ObjectStoreAccessKeyGetResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'continuation_token': 'str', + 'total_item_count': 'int', + 'items': 'list[ObjectStoreAccessKey]' + } + + attribute_map = { + 'continuation_token': 'continuation_token', + 'total_item_count': 'total_item_count', + 'items': 'items' + } + + required_args = { + } + + def __init__( + self, + continuation_token=None, # type: str + total_item_count=None, # type: int + items=None, # type: List[models.ObjectStoreAccessKey] + ): + """ + Keyword args: + continuation_token (str): Continuation token that can be provided in the `continuation_token` query param to get the next page of data. If you use the `continuation_token` to page through data you are guaranteed to get all items exactly once regardless of how items are modified. If an item is added or deleted during the pagination then it may or may not be returned. The `continuation_token` is generated if the `limit` is less than the remaining number of items, and the default sort is used (no sort is specified). + total_item_count (int): Total number of items after applying `filter` params. + items (list[ObjectStoreAccessKey]): A list of object store access key objects. + """ + if continuation_token is not None: + self.continuation_token = continuation_token + if total_item_count is not None: + self.total_item_count = total_item_count + if items is not None: + self.items = items + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `ObjectStoreAccessKeyGetResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(ObjectStoreAccessKeyGetResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ObjectStoreAccessKeyGetResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/object_store_access_key_post.py b/pypureclient/flashblade/FB_2_14/models/object_store_access_key_post.py new file mode 100644 index 000000000..60c4fb108 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/object_store_access_key_post.py @@ -0,0 +1,117 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class ObjectStoreAccessKeyPost(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'user': 'object', + 'secret_access_key': 'str' + } + + attribute_map = { + 'user': 'user', + 'secret_access_key': 'secret_access_key' + } + + required_args = { + } + + def __init__( + self, + user=None, # type: object + secret_access_key=None, # type: str + ): + """ + Keyword args: + user (object) + secret_access_key (str): The secret access key to import from another FlashBlade. To import a set of credentials, this field must be specified with the `names` query parameter. If both of these not specified, the system will generate a new set of credentials. + """ + if user is not None: + self.user = user + if secret_access_key is not None: + self.secret_access_key = secret_access_key + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `ObjectStoreAccessKeyPost`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(ObjectStoreAccessKeyPost, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ObjectStoreAccessKeyPost): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/object_store_access_key_response.py b/pypureclient/flashblade/FB_2_14/models/object_store_access_key_response.py new file mode 100644 index 000000000..2df2190db --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/object_store_access_key_response.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class ObjectStoreAccessKeyResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'items': 'list[ObjectStoreAccessKey]' + } + + attribute_map = { + 'items': 'items' + } + + required_args = { + } + + def __init__( + self, + items=None, # type: List[models.ObjectStoreAccessKey] + ): + """ + Keyword args: + items (list[ObjectStoreAccessKey]): A list of object store access key objects. + """ + if items is not None: + self.items = items + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `ObjectStoreAccessKeyResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(ObjectStoreAccessKeyResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ObjectStoreAccessKeyResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/object_store_access_policy.py b/pypureclient/flashblade/FB_2_14/models/object_store_access_policy.py new file mode 100644 index 000000000..5019be418 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/object_store_access_policy.py @@ -0,0 +1,177 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class ObjectStoreAccessPolicy(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'name': 'str', + 'id': 'str', + 'enabled': 'bool', + 'is_local': 'bool', + 'location': 'FixedReference', + 'policy_type': 'str', + 'account': 'FixedReference', + 'arn': 'str', + 'created': 'int', + 'description': 'str', + 'rules': 'list[PolicyRuleObjectAccess]', + 'updated': 'int' + } + + attribute_map = { + 'name': 'name', + 'id': 'id', + 'enabled': 'enabled', + 'is_local': 'is_local', + 'location': 'location', + 'policy_type': 'policy_type', + 'account': 'account', + 'arn': 'arn', + 'created': 'created', + 'description': 'description', + 'rules': 'rules', + 'updated': 'updated' + } + + required_args = { + } + + def __init__( + self, + name=None, # type: str + id=None, # type: str + enabled=None, # type: bool + is_local=None, # type: bool + location=None, # type: models.FixedReference + policy_type=None, # type: str + account=None, # type: models.FixedReference + arn=None, # type: str + created=None, # type: int + description=None, # type: str + rules=None, # type: List[models.PolicyRuleObjectAccess] + updated=None, # type: int + ): + """ + Keyword args: + name (str): Name of the object (e.g., a file system or snapshot). + id (str): A non-modifiable, globally unique ID chosen by the system. + enabled (bool): If `true`, the policy is enabled. If not specified, defaults to `true`. + is_local (bool): Whether the policy is defined on the local array. + location (FixedReference): Reference to the array where the policy is defined. + policy_type (str): Type of the policy. Valid values are `audit`, `bucket-access`, `cross-origin-resource-sharing`, `network-access`, `nfs`, `object-access`, `smb-client`, `smb-share`, and `snapshot`. + account (FixedReference): Reference of the associated account. If the policy is not associated with an account, all fields in the reference possess `null` values. + arn (str): Amazon Resource Name of the policy. Used when referencing the policy via S3 APIs. + created (int): Creation timestamp of the object. + description (str): A description of the policy, optionally specified when the policy is created. Cannot be modified for an existing policy. + rules (list[PolicyRuleObjectAccess]) + updated (int): The last updated timestamp of the object. + """ + if name is not None: + self.name = name + if id is not None: + self.id = id + if enabled is not None: + self.enabled = enabled + if is_local is not None: + self.is_local = is_local + if location is not None: + self.location = location + if policy_type is not None: + self.policy_type = policy_type + if account is not None: + self.account = account + if arn is not None: + self.arn = arn + if created is not None: + self.created = created + if description is not None: + self.description = description + if rules is not None: + self.rules = rules + if updated is not None: + self.updated = updated + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `ObjectStoreAccessPolicy`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(ObjectStoreAccessPolicy, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ObjectStoreAccessPolicy): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/object_store_access_policy_action.py b/pypureclient/flashblade/FB_2_14/models/object_store_access_policy_action.py new file mode 100644 index 000000000..4a92a17e1 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/object_store_access_policy_action.py @@ -0,0 +1,117 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class ObjectStoreAccessPolicyAction(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'name': 'str', + 'description': 'str' + } + + attribute_map = { + 'name': 'name', + 'description': 'description' + } + + required_args = { + } + + def __init__( + self, + name=None, # type: str + description=None, # type: str + ): + """ + Keyword args: + name (str): Name of the object (e.g., a file system or snapshot). + description (str): A description of the action. + """ + if name is not None: + self.name = name + if description is not None: + self.description = description + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `ObjectStoreAccessPolicyAction`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(ObjectStoreAccessPolicyAction, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ObjectStoreAccessPolicyAction): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/object_store_access_policy_action_get_response.py b/pypureclient/flashblade/FB_2_14/models/object_store_access_policy_action_get_response.py new file mode 100644 index 000000000..c48864bd1 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/object_store_access_policy_action_get_response.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class ObjectStoreAccessPolicyActionGetResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'continuation_token': 'str', + 'total_item_count': 'int', + 'items': 'list[ObjectStoreAccessPolicyAction]' + } + + attribute_map = { + 'continuation_token': 'continuation_token', + 'total_item_count': 'total_item_count', + 'items': 'items' + } + + required_args = { + } + + def __init__( + self, + continuation_token=None, # type: str + total_item_count=None, # type: int + items=None, # type: List[models.ObjectStoreAccessPolicyAction] + ): + """ + Keyword args: + continuation_token (str): Continuation token that can be provided in the `continuation_token` query param to get the next page of data. If you use the `continuation_token` to page through data you are guaranteed to get all items exactly once regardless of how items are modified. If an item is added or deleted during the pagination then it may or may not be returned. The `continuation_token` is generated if the `limit` is less than the remaining number of items, and the default sort is used (no sort is specified). + total_item_count (int): Total number of items after applying `filter` params. + items (list[ObjectStoreAccessPolicyAction]) + """ + if continuation_token is not None: + self.continuation_token = continuation_token + if total_item_count is not None: + self.total_item_count = total_item_count + if items is not None: + self.items = items + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `ObjectStoreAccessPolicyActionGetResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(ObjectStoreAccessPolicyActionGetResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ObjectStoreAccessPolicyActionGetResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/object_store_access_policy_action_response.py b/pypureclient/flashblade/FB_2_14/models/object_store_access_policy_action_response.py new file mode 100644 index 000000000..d58971eac --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/object_store_access_policy_action_response.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class ObjectStoreAccessPolicyActionResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'items': 'list[ObjectStoreAccessPolicyAction]' + } + + attribute_map = { + 'items': 'items' + } + + required_args = { + } + + def __init__( + self, + items=None, # type: List[models.ObjectStoreAccessPolicyAction] + ): + """ + Keyword args: + items (list[ObjectStoreAccessPolicyAction]) + """ + if items is not None: + self.items = items + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `ObjectStoreAccessPolicyActionResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(ObjectStoreAccessPolicyActionResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ObjectStoreAccessPolicyActionResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/object_store_access_policy_get_response.py b/pypureclient/flashblade/FB_2_14/models/object_store_access_policy_get_response.py new file mode 100644 index 000000000..cdfe979b0 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/object_store_access_policy_get_response.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class ObjectStoreAccessPolicyGetResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'continuation_token': 'str', + 'total_item_count': 'int', + 'items': 'list[ObjectStoreAccessPolicy]' + } + + attribute_map = { + 'continuation_token': 'continuation_token', + 'total_item_count': 'total_item_count', + 'items': 'items' + } + + required_args = { + } + + def __init__( + self, + continuation_token=None, # type: str + total_item_count=None, # type: int + items=None, # type: List[models.ObjectStoreAccessPolicy] + ): + """ + Keyword args: + continuation_token (str): Continuation token that can be provided in the `continuation_token` query param to get the next page of data. If you use the `continuation_token` to page through data you are guaranteed to get all items exactly once regardless of how items are modified. If an item is added or deleted during the pagination then it may or may not be returned. The `continuation_token` is generated if the `limit` is less than the remaining number of items, and the default sort is used (no sort is specified). + total_item_count (int): Total number of items after applying `filter` params. + items (list[ObjectStoreAccessPolicy]) + """ + if continuation_token is not None: + self.continuation_token = continuation_token + if total_item_count is not None: + self.total_item_count = total_item_count + if items is not None: + self.items = items + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `ObjectStoreAccessPolicyGetResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(ObjectStoreAccessPolicyGetResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ObjectStoreAccessPolicyGetResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/object_store_access_policy_patch.py b/pypureclient/flashblade/FB_2_14/models/object_store_access_policy_patch.py new file mode 100644 index 000000000..bf99bd8ad --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/object_store_access_policy_patch.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class ObjectStoreAccessPolicyPatch(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'rules': 'list[PolicyRuleObjectAccessBulkManage]' + } + + attribute_map = { + 'rules': 'rules' + } + + required_args = { + } + + def __init__( + self, + rules=None, # type: List[models.PolicyRuleObjectAccessBulkManage] + ): + """ + Keyword args: + rules (list[PolicyRuleObjectAccessBulkManage]) + """ + if rules is not None: + self.rules = rules + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `ObjectStoreAccessPolicyPatch`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(ObjectStoreAccessPolicyPatch, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ObjectStoreAccessPolicyPatch): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/object_store_access_policy_post.py b/pypureclient/flashblade/FB_2_14/models/object_store_access_policy_post.py new file mode 100644 index 000000000..08f9e83d2 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/object_store_access_policy_post.py @@ -0,0 +1,117 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class ObjectStoreAccessPolicyPost(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'rules': 'list[PolicyRuleObjectAccessBulkManage]', + 'description': 'str' + } + + attribute_map = { + 'rules': 'rules', + 'description': 'description' + } + + required_args = { + } + + def __init__( + self, + rules=None, # type: List[models.PolicyRuleObjectAccessBulkManage] + description=None, # type: str + ): + """ + Keyword args: + rules (list[PolicyRuleObjectAccessBulkManage]) + description (str): A description of the policy, optionally specified when the policy is created. Cannot be modified for an existing policy. + """ + if rules is not None: + self.rules = rules + if description is not None: + self.description = description + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `ObjectStoreAccessPolicyPost`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(ObjectStoreAccessPolicyPost, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ObjectStoreAccessPolicyPost): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/object_store_access_policy_response.py b/pypureclient/flashblade/FB_2_14/models/object_store_access_policy_response.py new file mode 100644 index 000000000..ecce34e17 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/object_store_access_policy_response.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class ObjectStoreAccessPolicyResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'items': 'list[ObjectStoreAccessPolicy]' + } + + attribute_map = { + 'items': 'items' + } + + required_args = { + } + + def __init__( + self, + items=None, # type: List[models.ObjectStoreAccessPolicy] + ): + """ + Keyword args: + items (list[ObjectStoreAccessPolicy]) + """ + if items is not None: + self.items = items + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `ObjectStoreAccessPolicyResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(ObjectStoreAccessPolicyResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ObjectStoreAccessPolicyResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/object_store_access_policy_rule.py b/pypureclient/flashblade/FB_2_14/models/object_store_access_policy_rule.py new file mode 100644 index 000000000..baf0e59da --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/object_store_access_policy_rule.py @@ -0,0 +1,141 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class ObjectStoreAccessPolicyRule(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'name': 'str', + 'actions': 'list[str]', + 'conditions': 'PolicyRuleObjectAccessCondition', + 'effect': 'str', + 'policy': 'FixedReference', + 'resources': 'list[str]' + } + + attribute_map = { + 'name': 'name', + 'actions': 'actions', + 'conditions': 'conditions', + 'effect': 'effect', + 'policy': 'policy', + 'resources': 'resources' + } + + required_args = { + } + + def __init__( + self, + name=None, # type: str + actions=None, # type: List[str] + conditions=None, # type: models.PolicyRuleObjectAccessCondition + effect=None, # type: str + policy=None, # type: models.FixedReference + resources=None, # type: List[str] + ): + """ + Keyword args: + name (str): Name of the object (e.g., a file system or snapshot). + actions (list[str]): The list of actions granted by this rule. Each included action may restrict other properties of the rule. Supported actions are returned by the `/object-store-access-policy-actions` endpoint. + conditions (PolicyRuleObjectAccessCondition): Conditions used to limit the scope which this rule applies to. + effect (str): Effect of this rule. When `allow`, the rule allows the given actions to be performed on the given resources, subject to the given conditions. When `deny`, the rule disallows performing the given actions on the given resources, subject to the given condition. This takes precedence over any matching `allow` rules. Valid values include `allow` and `deny`. + policy (FixedReference): The policy to which this rule belongs. + resources (list[str]): The list of resources which this rule applies to. Each resource can include a bucket component, optionally followed by an object component. The choice of which components a resource can include is dictated by which actions are included in the rule. For further details, see the Object Store Access Policy Actions section of the User Guide. + """ + if name is not None: + self.name = name + if actions is not None: + self.actions = actions + if conditions is not None: + self.conditions = conditions + if effect is not None: + self.effect = effect + if policy is not None: + self.policy = policy + if resources is not None: + self.resources = resources + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `ObjectStoreAccessPolicyRule`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(ObjectStoreAccessPolicyRule, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ObjectStoreAccessPolicyRule): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/object_store_access_policy_rule_get_response.py b/pypureclient/flashblade/FB_2_14/models/object_store_access_policy_rule_get_response.py new file mode 100644 index 000000000..19fa486e1 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/object_store_access_policy_rule_get_response.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class ObjectStoreAccessPolicyRuleGetResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'continuation_token': 'str', + 'total_item_count': 'int', + 'items': 'list[PolicyRuleObjectAccess]' + } + + attribute_map = { + 'continuation_token': 'continuation_token', + 'total_item_count': 'total_item_count', + 'items': 'items' + } + + required_args = { + } + + def __init__( + self, + continuation_token=None, # type: str + total_item_count=None, # type: int + items=None, # type: List[models.PolicyRuleObjectAccess] + ): + """ + Keyword args: + continuation_token (str): Continuation token that can be provided in the `continuation_token` query param to get the next page of data. If you use the `continuation_token` to page through data you are guaranteed to get all items exactly once regardless of how items are modified. If an item is added or deleted during the pagination then it may or may not be returned. The `continuation_token` is generated if the `limit` is less than the remaining number of items, and the default sort is used (no sort is specified). + total_item_count (int): Total number of items after applying `filter` params. + items (list[PolicyRuleObjectAccess]) + """ + if continuation_token is not None: + self.continuation_token = continuation_token + if total_item_count is not None: + self.total_item_count = total_item_count + if items is not None: + self.items = items + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `ObjectStoreAccessPolicyRuleGetResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(ObjectStoreAccessPolicyRuleGetResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ObjectStoreAccessPolicyRuleGetResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/object_store_access_policy_rule_response.py b/pypureclient/flashblade/FB_2_14/models/object_store_access_policy_rule_response.py new file mode 100644 index 000000000..1fda33531 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/object_store_access_policy_rule_response.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class ObjectStoreAccessPolicyRuleResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'items': 'list[PolicyRuleObjectAccess]' + } + + attribute_map = { + 'items': 'items' + } + + required_args = { + } + + def __init__( + self, + items=None, # type: List[models.PolicyRuleObjectAccess] + ): + """ + Keyword args: + items (list[PolicyRuleObjectAccess]) + """ + if items is not None: + self.items = items + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `ObjectStoreAccessPolicyRuleResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(ObjectStoreAccessPolicyRuleResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ObjectStoreAccessPolicyRuleResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/object_store_account.py b/pypureclient/flashblade/FB_2_14/models/object_store_account.py new file mode 100644 index 000000000..9e9deccbf --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/object_store_account.py @@ -0,0 +1,159 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class ObjectStoreAccount(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'name': 'str', + 'id': 'str', + 'created': 'int', + 'object_count': 'int', + 'space': 'Space', + 'bucket_defaults': 'BucketDefaultsReadonly', + 'hard_limit_enabled': 'bool', + 'quota_limit': 'int', + 'public_access_config': 'PublicAccessConfig' + } + + attribute_map = { + 'name': 'name', + 'id': 'id', + 'created': 'created', + 'object_count': 'object_count', + 'space': 'space', + 'bucket_defaults': 'bucket_defaults', + 'hard_limit_enabled': 'hard_limit_enabled', + 'quota_limit': 'quota_limit', + 'public_access_config': 'public_access_config' + } + + required_args = { + } + + def __init__( + self, + name=None, # type: str + id=None, # type: str + created=None, # type: int + object_count=None, # type: int + space=None, # type: models.Space + bucket_defaults=None, # type: models.BucketDefaultsReadonly + hard_limit_enabled=None, # type: bool + quota_limit=None, # type: int + public_access_config=None, # type: models.PublicAccessConfig + ): + """ + Keyword args: + name (str): Name of the object (e.g., a file system or snapshot). + id (str): A non-modifiable, globally unique ID chosen by the system. + created (int): Creation timestamp of the object. + object_count (int): The count of objects within the account. + space (Space): The space specification of the object store account. + bucket_defaults (BucketDefaultsReadonly): Default settings to be applied to newly created buckets associated with this account. Values here will be used in bucket creation requests which do not specify their own values for corresponding fields. + hard_limit_enabled (bool): If set to `true`, the account's size, as defined by `quota_limit`, is used as a hard limit quota. If set to `false`, a hard limit quota will not be applied to the account, but soft quota alerts will still be sent if the account has a value set for `quota_limit`. + quota_limit (int): The effective quota limit applied against the size of the account, displayed in bytes. If unset, the account is unlimited in size. + public_access_config (PublicAccessConfig) + """ + if name is not None: + self.name = name + if id is not None: + self.id = id + if created is not None: + self.created = created + if object_count is not None: + self.object_count = object_count + if space is not None: + self.space = space + if bucket_defaults is not None: + self.bucket_defaults = bucket_defaults + if hard_limit_enabled is not None: + self.hard_limit_enabled = hard_limit_enabled + if quota_limit is not None: + self.quota_limit = quota_limit + if public_access_config is not None: + self.public_access_config = public_access_config + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `ObjectStoreAccount`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(ObjectStoreAccount, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ObjectStoreAccount): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/object_store_account_get_response.py b/pypureclient/flashblade/FB_2_14/models/object_store_account_get_response.py new file mode 100644 index 000000000..d8603e5f0 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/object_store_account_get_response.py @@ -0,0 +1,129 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class ObjectStoreAccountGetResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'continuation_token': 'str', + 'total_item_count': 'int', + 'items': 'list[ObjectStoreAccount]', + 'total': 'ObjectStoreAccount' + } + + attribute_map = { + 'continuation_token': 'continuation_token', + 'total_item_count': 'total_item_count', + 'items': 'items', + 'total': 'total' + } + + required_args = { + } + + def __init__( + self, + continuation_token=None, # type: str + total_item_count=None, # type: int + items=None, # type: List[models.ObjectStoreAccount] + total=None, # type: models.ObjectStoreAccount + ): + """ + Keyword args: + continuation_token (str): Continuation token that can be provided in the `continuation_token` query param to get the next page of data. If you use the `continuation_token` to page through data you are guaranteed to get all items exactly once regardless of how items are modified. If an item is added or deleted during the pagination then it may or may not be returned. The `continuation_token` is generated if the `limit` is less than the remaining number of items, and the default sort is used (no sort is specified). + total_item_count (int): Total number of items after applying `filter` params. + items (list[ObjectStoreAccount]): A list of object store account objects. + total (ObjectStoreAccount): If `total_only` query param is `true`, then this field will be a total of all records after filtering and no items will be returned. If `total_only` is `false`, then it will be a total of all records on this page. + """ + if continuation_token is not None: + self.continuation_token = continuation_token + if total_item_count is not None: + self.total_item_count = total_item_count + if items is not None: + self.items = items + if total is not None: + self.total = total + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `ObjectStoreAccountGetResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(ObjectStoreAccountGetResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ObjectStoreAccountGetResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/object_store_account_patch.py b/pypureclient/flashblade/FB_2_14/models/object_store_account_patch.py new file mode 100644 index 000000000..e96606af7 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/object_store_account_patch.py @@ -0,0 +1,129 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class ObjectStoreAccountPatch(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'bucket_defaults': 'BucketDefaults', + 'hard_limit_enabled': 'bool', + 'quota_limit': 'str', + 'public_access_config': 'PublicAccessConfig' + } + + attribute_map = { + 'bucket_defaults': 'bucket_defaults', + 'hard_limit_enabled': 'hard_limit_enabled', + 'quota_limit': 'quota_limit', + 'public_access_config': 'public_access_config' + } + + required_args = { + } + + def __init__( + self, + bucket_defaults=None, # type: models.BucketDefaults + hard_limit_enabled=None, # type: bool + quota_limit=None, # type: str + public_access_config=None, # type: models.PublicAccessConfig + ): + """ + Keyword args: + bucket_defaults (BucketDefaults): Default settings to be applied to newly created buckets associated with this account. Values here will be used in bucket creation requests which do not specify their own values for corresponding fields. + hard_limit_enabled (bool): If set to `true`, the account's size, as defined by `quota_limit`, is used as a hard limit quota. If set to `false`, a hard limit quota will not be applied to the account, but soft quota alerts will still be sent if the account has a value set for `quota_limit`. + quota_limit (str): The effective quota limit to be applied against the size of the account, displayed in bytes. If set to an empty string (`\"\"`), the account is unlimited in size. + public_access_config (PublicAccessConfig) + """ + if bucket_defaults is not None: + self.bucket_defaults = bucket_defaults + if hard_limit_enabled is not None: + self.hard_limit_enabled = hard_limit_enabled + if quota_limit is not None: + self.quota_limit = quota_limit + if public_access_config is not None: + self.public_access_config = public_access_config + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `ObjectStoreAccountPatch`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(ObjectStoreAccountPatch, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ObjectStoreAccountPatch): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/object_store_account_post.py b/pypureclient/flashblade/FB_2_14/models/object_store_account_post.py new file mode 100644 index 000000000..b100f0550 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/object_store_account_post.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class ObjectStoreAccountPost(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'bucket_defaults': 'BucketDefaults', + 'hard_limit_enabled': 'bool', + 'quota_limit': 'str' + } + + attribute_map = { + 'bucket_defaults': 'bucket_defaults', + 'hard_limit_enabled': 'hard_limit_enabled', + 'quota_limit': 'quota_limit' + } + + required_args = { + } + + def __init__( + self, + bucket_defaults=None, # type: models.BucketDefaults + hard_limit_enabled=None, # type: bool + quota_limit=None, # type: str + ): + """ + Keyword args: + bucket_defaults (BucketDefaults): Default settings to be applied to newly created buckets associated with this account. Values here will be used in bucket creation requests which do not specify their own values for corresponding fields. + hard_limit_enabled (bool): If set to `true`, the account's size, as defined by `quota_limit`, is used as a hard limit quota. If set to `false`, a hard limit quota will not be applied to the account, but soft quota alerts will still be sent if the account has a value set for `quota_limit`. If not specified, defaults to `false`. + quota_limit (str): The effective quota limit to be applied against the size of the account, displayed in bytes. If set to an empty string (`\"\"`), the account is unlimited in size. If not specified, defaults to unlimited. + """ + if bucket_defaults is not None: + self.bucket_defaults = bucket_defaults + if hard_limit_enabled is not None: + self.hard_limit_enabled = hard_limit_enabled + if quota_limit is not None: + self.quota_limit = quota_limit + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `ObjectStoreAccountPost`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(ObjectStoreAccountPost, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ObjectStoreAccountPost): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/object_store_account_response.py b/pypureclient/flashblade/FB_2_14/models/object_store_account_response.py new file mode 100644 index 000000000..9a4f78fef --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/object_store_account_response.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class ObjectStoreAccountResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'items': 'list[ObjectStoreAccount]' + } + + attribute_map = { + 'items': 'items' + } + + required_args = { + } + + def __init__( + self, + items=None, # type: List[models.ObjectStoreAccount] + ): + """ + Keyword args: + items (list[ObjectStoreAccount]): A list of object store account objects. + """ + if items is not None: + self.items = items + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `ObjectStoreAccountResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(ObjectStoreAccountResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ObjectStoreAccountResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/object_store_remote_credential_get_resp.py b/pypureclient/flashblade/FB_2_14/models/object_store_remote_credential_get_resp.py new file mode 100644 index 000000000..1297971d9 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/object_store_remote_credential_get_resp.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class ObjectStoreRemoteCredentialGetResp(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'continuation_token': 'str', + 'total_item_count': 'int', + 'items': 'list[ObjectStoreRemoteCredentials]' + } + + attribute_map = { + 'continuation_token': 'continuation_token', + 'total_item_count': 'total_item_count', + 'items': 'items' + } + + required_args = { + } + + def __init__( + self, + continuation_token=None, # type: str + total_item_count=None, # type: int + items=None, # type: List[models.ObjectStoreRemoteCredentials] + ): + """ + Keyword args: + continuation_token (str): Continuation token that can be provided in the `continuation_token` query param to get the next page of data. If you use the `continuation_token` to page through data you are guaranteed to get all items exactly once regardless of how items are modified. If an item is added or deleted during the pagination then it may or may not be returned. The `continuation_token` is generated if the `limit` is less than the remaining number of items, and the default sort is used (no sort is specified). + total_item_count (int): Total number of items after applying `filter` params. + items (list[ObjectStoreRemoteCredentials]): A list of object store remote credentials. + """ + if continuation_token is not None: + self.continuation_token = continuation_token + if total_item_count is not None: + self.total_item_count = total_item_count + if items is not None: + self.items = items + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `ObjectStoreRemoteCredentialGetResp`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(ObjectStoreRemoteCredentialGetResp, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ObjectStoreRemoteCredentialGetResp): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/object_store_remote_credentials.py b/pypureclient/flashblade/FB_2_14/models/object_store_remote_credentials.py new file mode 100644 index 000000000..90dcba0f5 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/object_store_remote_credentials.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class ObjectStoreRemoteCredentials(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'name': 'str', + 'id': 'str', + 'access_key_id': 'str', + 'remote': 'FixedReference', + 'secret_access_key': 'str' + } + + attribute_map = { + 'name': 'name', + 'id': 'id', + 'access_key_id': 'access_key_id', + 'remote': 'remote', + 'secret_access_key': 'secret_access_key' + } + + required_args = { + } + + def __init__( + self, + name=None, # type: str + id=None, # type: str + access_key_id=None, # type: str + remote=None, # type: models.FixedReference + secret_access_key=None, # type: str + ): + """ + Keyword args: + name (str): A name chosen by the user. Can be changed. Must be locally unique. + id (str): A non-modifiable, globally unique ID chosen by the system. + access_key_id (str): Access Key ID to be used when connecting to a remote object store. + remote (FixedReference): Reference to the associated remote, which can either be a `target` or remote `array`. If it is an `array`, then the `resource-type` field will not be populated. + secret_access_key (str): Secret Access Key to be used when connecting to a remote object store. + """ + if name is not None: + self.name = name + if id is not None: + self.id = id + if access_key_id is not None: + self.access_key_id = access_key_id + if remote is not None: + self.remote = remote + if secret_access_key is not None: + self.secret_access_key = secret_access_key + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `ObjectStoreRemoteCredentials`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(ObjectStoreRemoteCredentials, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ObjectStoreRemoteCredentials): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/object_store_remote_credentials_post.py b/pypureclient/flashblade/FB_2_14/models/object_store_remote_credentials_post.py new file mode 100644 index 000000000..33278073e --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/object_store_remote_credentials_post.py @@ -0,0 +1,117 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class ObjectStoreRemoteCredentialsPost(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'access_key_id': 'str', + 'secret_access_key': 'str' + } + + attribute_map = { + 'access_key_id': 'access_key_id', + 'secret_access_key': 'secret_access_key' + } + + required_args = { + } + + def __init__( + self, + access_key_id=None, # type: str + secret_access_key=None, # type: str + ): + """ + Keyword args: + access_key_id (str): Access Key ID to be used when connecting to a remote object store. + secret_access_key (str): Secret Access Key to be used when connecting to a remote object store. + """ + if access_key_id is not None: + self.access_key_id = access_key_id + if secret_access_key is not None: + self.secret_access_key = secret_access_key + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `ObjectStoreRemoteCredentialsPost`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(ObjectStoreRemoteCredentialsPost, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ObjectStoreRemoteCredentialsPost): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/object_store_remote_credentials_resp.py b/pypureclient/flashblade/FB_2_14/models/object_store_remote_credentials_resp.py new file mode 100644 index 000000000..699801db5 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/object_store_remote_credentials_resp.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class ObjectStoreRemoteCredentialsResp(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'items': 'list[ObjectStoreRemoteCredentials]' + } + + attribute_map = { + 'items': 'items' + } + + required_args = { + } + + def __init__( + self, + items=None, # type: List[models.ObjectStoreRemoteCredentials] + ): + """ + Keyword args: + items (list[ObjectStoreRemoteCredentials]): A list of object store remote credentials. + """ + if items is not None: + self.items = items + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `ObjectStoreRemoteCredentialsResp`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(ObjectStoreRemoteCredentialsResp, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ObjectStoreRemoteCredentialsResp): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/object_store_user.py b/pypureclient/flashblade/FB_2_14/models/object_store_user.py new file mode 100644 index 000000000..17387d84d --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/object_store_user.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class ObjectStoreUser(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'name': 'str', + 'id': 'str', + 'access_keys': 'list[FixedReference]', + 'account': 'FixedReference', + 'created': 'int' + } + + attribute_map = { + 'name': 'name', + 'id': 'id', + 'access_keys': 'access_keys', + 'account': 'account', + 'created': 'created' + } + + required_args = { + } + + def __init__( + self, + name=None, # type: str + id=None, # type: str + access_keys=None, # type: List[models.FixedReference] + account=None, # type: models.FixedReference + created=None, # type: int + ): + """ + Keyword args: + name (str): Name of the object (e.g., a file system or snapshot). + id (str): A non-modifiable, globally unique ID chosen by the system. + access_keys (list[FixedReference]): References of the user's access keys. + account (FixedReference): Reference of the associated account. + created (int): Creation timestamp of the object. + """ + if name is not None: + self.name = name + if id is not None: + self.id = id + if access_keys is not None: + self.access_keys = access_keys + if account is not None: + self.account = account + if created is not None: + self.created = created + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `ObjectStoreUser`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(ObjectStoreUser, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ObjectStoreUser): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/object_store_user_get_response.py b/pypureclient/flashblade/FB_2_14/models/object_store_user_get_response.py new file mode 100644 index 000000000..43e684fc8 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/object_store_user_get_response.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class ObjectStoreUserGetResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'continuation_token': 'str', + 'total_item_count': 'int', + 'items': 'list[ObjectStoreUser]' + } + + attribute_map = { + 'continuation_token': 'continuation_token', + 'total_item_count': 'total_item_count', + 'items': 'items' + } + + required_args = { + } + + def __init__( + self, + continuation_token=None, # type: str + total_item_count=None, # type: int + items=None, # type: List[models.ObjectStoreUser] + ): + """ + Keyword args: + continuation_token (str): Continuation token that can be provided in the `continuation_token` query param to get the next page of data. If you use the `continuation_token` to page through data you are guaranteed to get all items exactly once regardless of how items are modified. If an item is added or deleted during the pagination then it may or may not be returned. The `continuation_token` is generated if the `limit` is less than the remaining number of items, and the default sort is used (no sort is specified). + total_item_count (int): Total number of items after applying `filter` params. + items (list[ObjectStoreUser]): A list of object store user objects. + """ + if continuation_token is not None: + self.continuation_token = continuation_token + if total_item_count is not None: + self.total_item_count = total_item_count + if items is not None: + self.items = items + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `ObjectStoreUserGetResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(ObjectStoreUserGetResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ObjectStoreUserGetResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/object_store_user_response.py b/pypureclient/flashblade/FB_2_14/models/object_store_user_response.py new file mode 100644 index 000000000..092808df4 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/object_store_user_response.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class ObjectStoreUserResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'items': 'list[ObjectStoreUser]' + } + + attribute_map = { + 'items': 'items' + } + + required_args = { + } + + def __init__( + self, + items=None, # type: List[models.ObjectStoreUser] + ): + """ + Keyword args: + items (list[ObjectStoreUser]): A list of object store user objects. + """ + if items is not None: + self.items = items + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `ObjectStoreUserResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(ObjectStoreUserResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ObjectStoreUserResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/object_store_virtual_host.py b/pypureclient/flashblade/FB_2_14/models/object_store_virtual_host.py new file mode 100644 index 000000000..b4e068ee6 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/object_store_virtual_host.py @@ -0,0 +1,117 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class ObjectStoreVirtualHost(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'name': 'str', + 'id': 'str' + } + + attribute_map = { + 'name': 'name', + 'id': 'id' + } + + required_args = { + } + + def __init__( + self, + name=None, # type: str + id=None, # type: str + ): + """ + Keyword args: + name (str): A hostname by which the array can be addressed for virtual hosted-style S3 requests. + id (str): A non-modifiable, globally unique ID chosen by the system. + """ + if name is not None: + self.name = name + if id is not None: + self.id = id + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `ObjectStoreVirtualHost`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(ObjectStoreVirtualHost, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ObjectStoreVirtualHost): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/object_store_virtual_host_get_response.py b/pypureclient/flashblade/FB_2_14/models/object_store_virtual_host_get_response.py new file mode 100644 index 000000000..0a2e49744 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/object_store_virtual_host_get_response.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class ObjectStoreVirtualHostGetResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'continuation_token': 'str', + 'total_item_count': 'int', + 'items': 'list[ObjectStoreVirtualHost]' + } + + attribute_map = { + 'continuation_token': 'continuation_token', + 'total_item_count': 'total_item_count', + 'items': 'items' + } + + required_args = { + } + + def __init__( + self, + continuation_token=None, # type: str + total_item_count=None, # type: int + items=None, # type: List[models.ObjectStoreVirtualHost] + ): + """ + Keyword args: + continuation_token (str): Continuation token that can be provided in the `continuation_token` query param to get the next page of data. If you use the `continuation_token` to page through data you are guaranteed to get all items exactly once regardless of how items are modified. If an item is added or deleted during the pagination then it may or may not be returned. The `continuation_token` is generated if the `limit` is less than the remaining number of items, and the default sort is used (no sort is specified). + total_item_count (int): Total number of items after applying `filter` params. + items (list[ObjectStoreVirtualHost]): A list of object store virtual host objects. + """ + if continuation_token is not None: + self.continuation_token = continuation_token + if total_item_count is not None: + self.total_item_count = total_item_count + if items is not None: + self.items = items + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `ObjectStoreVirtualHostGetResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(ObjectStoreVirtualHostGetResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ObjectStoreVirtualHostGetResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/object_store_virtual_host_response.py b/pypureclient/flashblade/FB_2_14/models/object_store_virtual_host_response.py new file mode 100644 index 000000000..41f463f78 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/object_store_virtual_host_response.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class ObjectStoreVirtualHostResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'items': 'list[ObjectStoreVirtualHost]' + } + + attribute_map = { + 'items': 'items' + } + + required_args = { + } + + def __init__( + self, + items=None, # type: List[models.ObjectStoreVirtualHost] + ): + """ + Keyword args: + items (list[ObjectStoreVirtualHost]): A list of object store virtual host objects. + """ + if items is not None: + self.items = items + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `ObjectStoreVirtualHostResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(ObjectStoreVirtualHostResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ObjectStoreVirtualHostResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/page_info.py b/pypureclient/flashblade/FB_2_14/models/page_info.py new file mode 100644 index 000000000..70039c16a --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/page_info.py @@ -0,0 +1,117 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class PageInfo(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'continuation_token': 'str', + 'total_item_count': 'int' + } + + attribute_map = { + 'continuation_token': 'continuation_token', + 'total_item_count': 'total_item_count' + } + + required_args = { + } + + def __init__( + self, + continuation_token=None, # type: str + total_item_count=None, # type: int + ): + """ + Keyword args: + continuation_token (str): Continuation token that can be provided in the `continuation_token` query param to get the next page of data. If you use the `continuation_token` to page through data you are guaranteed to get all items exactly once regardless of how items are modified. If an item is added or deleted during the pagination then it may or may not be returned. The `continuation_token` is generated if the `limit` is less than the remaining number of items, and the default sort is used (no sort is specified). + total_item_count (int): Total number of items after applying `filter` params. + """ + if continuation_token is not None: + self.continuation_token = continuation_token + if total_item_count is not None: + self.total_item_count = total_item_count + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `PageInfo`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(PageInfo, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, PageInfo): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/permission.py b/pypureclient/flashblade/FB_2_14/models/permission.py new file mode 100644 index 000000000..68bb61470 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/permission.py @@ -0,0 +1,117 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class Permission(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'action': 'str', + 'resource_type': 'str' + } + + attribute_map = { + 'action': 'action', + 'resource_type': 'resource_type' + } + + required_args = { + } + + def __init__( + self, + action=None, # type: str + resource_type=None, # type: str + ): + """ + Keyword args: + action (str): The `action` that the user can perform on the `resource_type`. Typical values include `get`, `patch`, `post`, and `delete`. Values can also be finer grained. + resource_type (str): The `resource_type` that this `permission` affects. + """ + if action is not None: + self.action = action + if resource_type is not None: + self.resource_type = resource_type + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `Permission`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(Permission, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, Permission): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/policy.py b/pypureclient/flashblade/FB_2_14/models/policy.py new file mode 100644 index 000000000..1a4fd7bd2 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/policy.py @@ -0,0 +1,153 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class Policy(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'name': 'str', + 'id': 'str', + 'enabled': 'bool', + 'is_local': 'bool', + 'location': 'FixedReference', + 'policy_type': 'str', + 'rules': 'list[PolicyRule]', + 'retention_lock': 'str' + } + + attribute_map = { + 'name': 'name', + 'id': 'id', + 'enabled': 'enabled', + 'is_local': 'is_local', + 'location': 'location', + 'policy_type': 'policy_type', + 'rules': 'rules', + 'retention_lock': 'retention_lock' + } + + required_args = { + } + + def __init__( + self, + name=None, # type: str + id=None, # type: str + enabled=None, # type: bool + is_local=None, # type: bool + location=None, # type: models.FixedReference + policy_type=None, # type: str + rules=None, # type: List[models.PolicyRule] + retention_lock=None, # type: str + ): + """ + Keyword args: + name (str): Name of the object (e.g., a file system or snapshot). + id (str): A non-modifiable, globally unique ID chosen by the system. + enabled (bool): If `true`, the policy is enabled. If not specified, defaults to `true`. + is_local (bool): Whether the policy is defined on the local array. + location (FixedReference): Reference to the array where the policy is defined. + policy_type (str): Type of the policy. Valid values are `audit`, `bucket-access`, `cross-origin-resource-sharing`, `network-access`, `nfs`, `object-access`, `smb-client`, `smb-share`, and `snapshot`. + rules (list[PolicyRule]) + retention_lock (str): If retention lock is locked, then the the policy can not be removed from the associated file systems and the rules may not be changed. Valid values are `locked` and `unlocked`. Contact Pure Technical Services to change `locked` to `unlocked`. + """ + if name is not None: + self.name = name + if id is not None: + self.id = id + if enabled is not None: + self.enabled = enabled + if is_local is not None: + self.is_local = is_local + if location is not None: + self.location = location + if policy_type is not None: + self.policy_type = policy_type + if rules is not None: + self.rules = rules + if retention_lock is not None: + self.retention_lock = retention_lock + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `Policy`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(Policy, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, Policy): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/policy_base.py b/pypureclient/flashblade/FB_2_14/models/policy_base.py new file mode 100644 index 000000000..f7db32e80 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/policy_base.py @@ -0,0 +1,141 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class PolicyBase(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'name': 'str', + 'id': 'str', + 'enabled': 'bool', + 'is_local': 'bool', + 'location': 'FixedReference', + 'policy_type': 'str' + } + + attribute_map = { + 'name': 'name', + 'id': 'id', + 'enabled': 'enabled', + 'is_local': 'is_local', + 'location': 'location', + 'policy_type': 'policy_type' + } + + required_args = { + } + + def __init__( + self, + name=None, # type: str + id=None, # type: str + enabled=None, # type: bool + is_local=None, # type: bool + location=None, # type: models.FixedReference + policy_type=None, # type: str + ): + """ + Keyword args: + name (str): Name of the object (e.g., a file system or snapshot). + id (str): A non-modifiable, globally unique ID chosen by the system. + enabled (bool): If `true`, the policy is enabled. If not specified, defaults to `true`. + is_local (bool): Whether the policy is defined on the local array. + location (FixedReference): Reference to the array where the policy is defined. + policy_type (str): Type of the policy. Valid values are `audit`, `bucket-access`, `cross-origin-resource-sharing`, `network-access`, `nfs`, `object-access`, `smb-client`, `smb-share`, and `snapshot`. + """ + if name is not None: + self.name = name + if id is not None: + self.id = id + if enabled is not None: + self.enabled = enabled + if is_local is not None: + self.is_local = is_local + if location is not None: + self.location = location + if policy_type is not None: + self.policy_type = policy_type + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `PolicyBase`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(PolicyBase, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, PolicyBase): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/policy_base_get_response.py b/pypureclient/flashblade/FB_2_14/models/policy_base_get_response.py new file mode 100644 index 000000000..223794a56 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/policy_base_get_response.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class PolicyBaseGetResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'continuation_token': 'str', + 'total_item_count': 'int', + 'items': 'list[PolicyBase]' + } + + attribute_map = { + 'continuation_token': 'continuation_token', + 'total_item_count': 'total_item_count', + 'items': 'items' + } + + required_args = { + } + + def __init__( + self, + continuation_token=None, # type: str + total_item_count=None, # type: int + items=None, # type: List[models.PolicyBase] + ): + """ + Keyword args: + continuation_token (str): Continuation token that can be provided in the `continuation_token` query param to get the next page of data. If you use the `continuation_token` to page through data you are guaranteed to get all items exactly once regardless of how items are modified. If an item is added or deleted during the pagination then it may or may not be returned. The `continuation_token` is generated if the `limit` is less than the remaining number of items, and the default sort is used (no sort is specified). + total_item_count (int): Total number of items after applying `filter` params. + items (list[PolicyBase]): A list of basic policy objects. + """ + if continuation_token is not None: + self.continuation_token = continuation_token + if total_item_count is not None: + self.total_item_count = total_item_count + if items is not None: + self.items = items + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `PolicyBaseGetResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(PolicyBaseGetResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, PolicyBaseGetResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/policy_base_renameable.py b/pypureclient/flashblade/FB_2_14/models/policy_base_renameable.py new file mode 100644 index 000000000..cca3be514 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/policy_base_renameable.py @@ -0,0 +1,141 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class PolicyBaseRenameable(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'name': 'str', + 'id': 'str', + 'enabled': 'bool', + 'is_local': 'bool', + 'location': 'FixedReference', + 'policy_type': 'str' + } + + attribute_map = { + 'name': 'name', + 'id': 'id', + 'enabled': 'enabled', + 'is_local': 'is_local', + 'location': 'location', + 'policy_type': 'policy_type' + } + + required_args = { + } + + def __init__( + self, + name=None, # type: str + id=None, # type: str + enabled=None, # type: bool + is_local=None, # type: bool + location=None, # type: models.FixedReference + policy_type=None, # type: str + ): + """ + Keyword args: + name (str): A name chosen by the user. Can be changed. Must be locally unique. + id (str): A non-modifiable, globally unique ID chosen by the system. + enabled (bool): If `true`, the policy is enabled. If not specified, defaults to `true`. + is_local (bool): Whether the policy is defined on the local array. + location (FixedReference): Reference to the array where the policy is defined. + policy_type (str): Type of the policy. Valid values are `audit`, `bucket-access`, `cross-origin-resource-sharing`, `network-access`, `nfs`, `object-access`, `smb-client`, `smb-share`, and `snapshot`. + """ + if name is not None: + self.name = name + if id is not None: + self.id = id + if enabled is not None: + self.enabled = enabled + if is_local is not None: + self.is_local = is_local + if location is not None: + self.location = location + if policy_type is not None: + self.policy_type = policy_type + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `PolicyBaseRenameable`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(PolicyBaseRenameable, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, PolicyBaseRenameable): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/policy_base_response.py b/pypureclient/flashblade/FB_2_14/models/policy_base_response.py new file mode 100644 index 000000000..48e1d9beb --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/policy_base_response.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class PolicyBaseResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'items': 'list[PolicyBase]' + } + + attribute_map = { + 'items': 'items' + } + + required_args = { + } + + def __init__( + self, + items=None, # type: List[models.PolicyBase] + ): + """ + Keyword args: + items (list[PolicyBase]): A list of basic policy objects. + """ + if items is not None: + self.items = items + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `PolicyBaseResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(PolicyBaseResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, PolicyBaseResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/policy_file_system_snapshot.py b/pypureclient/flashblade/FB_2_14/models/policy_file_system_snapshot.py new file mode 100644 index 000000000..9d64d8f44 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/policy_file_system_snapshot.py @@ -0,0 +1,117 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class PolicyFileSystemSnapshot(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'member': 'FixedReference', + 'policy': 'LocationReference' + } + + attribute_map = { + 'member': 'member', + 'policy': 'policy' + } + + required_args = { + } + + def __init__( + self, + member=None, # type: models.FixedReference + policy=None, # type: models.LocationReference + ): + """ + Keyword args: + member (FixedReference): Reference to the resource the policy is applied to. + policy (LocationReference): Reference to the policy. + """ + if member is not None: + self.member = member + if policy is not None: + self.policy = policy + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `PolicyFileSystemSnapshot`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(PolicyFileSystemSnapshot, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, PolicyFileSystemSnapshot): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/policy_file_system_snapshot_get_response.py b/pypureclient/flashblade/FB_2_14/models/policy_file_system_snapshot_get_response.py new file mode 100644 index 000000000..fc69ab171 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/policy_file_system_snapshot_get_response.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class PolicyFileSystemSnapshotGetResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'continuation_token': 'str', + 'total_item_count': 'int', + 'items': 'list[PolicyFileSystemSnapshot]' + } + + attribute_map = { + 'continuation_token': 'continuation_token', + 'total_item_count': 'total_item_count', + 'items': 'items' + } + + required_args = { + } + + def __init__( + self, + continuation_token=None, # type: str + total_item_count=None, # type: int + items=None, # type: List[models.PolicyFileSystemSnapshot] + ): + """ + Keyword args: + continuation_token (str): Continuation token that can be provided in the `continuation_token` query param to get the next page of data. If you use the `continuation_token` to page through data you are guaranteed to get all items exactly once regardless of how items are modified. If an item is added or deleted during the pagination then it may or may not be returned. The `continuation_token` is generated if the `limit` is less than the remaining number of items, and the default sort is used (no sort is specified). + total_item_count (int): Total number of items after applying `filter` params. + items (list[PolicyFileSystemSnapshot]): A list of members for policies. + """ + if continuation_token is not None: + self.continuation_token = continuation_token + if total_item_count is not None: + self.total_item_count = total_item_count + if items is not None: + self.items = items + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `PolicyFileSystemSnapshotGetResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(PolicyFileSystemSnapshotGetResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, PolicyFileSystemSnapshotGetResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/policy_file_system_snapshot_response.py b/pypureclient/flashblade/FB_2_14/models/policy_file_system_snapshot_response.py new file mode 100644 index 000000000..17fc376da --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/policy_file_system_snapshot_response.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class PolicyFileSystemSnapshotResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'items': 'list[PolicyFileSystemSnapshot]' + } + + attribute_map = { + 'items': 'items' + } + + required_args = { + } + + def __init__( + self, + items=None, # type: List[models.PolicyFileSystemSnapshot] + ): + """ + Keyword args: + items (list[PolicyFileSystemSnapshot]): A list of members for policies. + """ + if items is not None: + self.items = items + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `PolicyFileSystemSnapshotResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(PolicyFileSystemSnapshotResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, PolicyFileSystemSnapshotResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/policy_get_response.py b/pypureclient/flashblade/FB_2_14/models/policy_get_response.py new file mode 100644 index 000000000..2833d0ffd --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/policy_get_response.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class PolicyGetResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'continuation_token': 'str', + 'total_item_count': 'int', + 'items': 'list[Policy]' + } + + attribute_map = { + 'continuation_token': 'continuation_token', + 'total_item_count': 'total_item_count', + 'items': 'items' + } + + required_args = { + } + + def __init__( + self, + continuation_token=None, # type: str + total_item_count=None, # type: int + items=None, # type: List[models.Policy] + ): + """ + Keyword args: + continuation_token (str): Continuation token that can be provided in the `continuation_token` query param to get the next page of data. If you use the `continuation_token` to page through data you are guaranteed to get all items exactly once regardless of how items are modified. If an item is added or deleted during the pagination then it may or may not be returned. The `continuation_token` is generated if the `limit` is less than the remaining number of items, and the default sort is used (no sort is specified). + total_item_count (int): Total number of items after applying `filter` params. + items (list[Policy]): A list of policy objects. + """ + if continuation_token is not None: + self.continuation_token = continuation_token + if total_item_count is not None: + self.total_item_count = total_item_count + if items is not None: + self.items = items + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `PolicyGetResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(PolicyGetResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, PolicyGetResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/policy_local_member.py b/pypureclient/flashblade/FB_2_14/models/policy_local_member.py new file mode 100644 index 000000000..7bd5f2be9 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/policy_local_member.py @@ -0,0 +1,117 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class PolicyLocalMember(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'member': 'FixedReference', + 'policy': 'FixedReference' + } + + attribute_map = { + 'member': 'member', + 'policy': 'policy' + } + + required_args = { + } + + def __init__( + self, + member=None, # type: models.FixedReference + policy=None, # type: models.FixedReference + ): + """ + Keyword args: + member (FixedReference): Reference to the resource the policy is applied to. + policy (FixedReference): Reference to the policy. + """ + if member is not None: + self.member = member + if policy is not None: + self.policy = policy + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `PolicyLocalMember`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(PolicyLocalMember, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, PolicyLocalMember): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/policy_member.py b/pypureclient/flashblade/FB_2_14/models/policy_member.py new file mode 100644 index 000000000..4a16033c6 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/policy_member.py @@ -0,0 +1,117 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class PolicyMember(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'member': 'FixedReference', + 'policy': 'FixedReference' + } + + attribute_map = { + 'member': 'member', + 'policy': 'policy' + } + + required_args = { + } + + def __init__( + self, + member=None, # type: models.FixedReference + policy=None, # type: models.FixedReference + ): + """ + Keyword args: + member (FixedReference): Reference to the resource the policy is applied to. + policy (FixedReference): Reference to the policy. + """ + if member is not None: + self.member = member + if policy is not None: + self.policy = policy + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `PolicyMember`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(PolicyMember, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, PolicyMember): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/policy_member_get_response.py b/pypureclient/flashblade/FB_2_14/models/policy_member_get_response.py new file mode 100644 index 000000000..bb915d7f8 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/policy_member_get_response.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class PolicyMemberGetResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'continuation_token': 'str', + 'total_item_count': 'int', + 'items': 'list[PolicyMember]' + } + + attribute_map = { + 'continuation_token': 'continuation_token', + 'total_item_count': 'total_item_count', + 'items': 'items' + } + + required_args = { + } + + def __init__( + self, + continuation_token=None, # type: str + total_item_count=None, # type: int + items=None, # type: List[models.PolicyMember] + ): + """ + Keyword args: + continuation_token (str): Continuation token that can be provided in the `continuation_token` query param to get the next page of data. If you use the `continuation_token` to page through data you are guaranteed to get all items exactly once regardless of how items are modified. If an item is added or deleted during the pagination then it may or may not be returned. The `continuation_token` is generated if the `limit` is less than the remaining number of items, and the default sort is used (no sort is specified). + total_item_count (int): Total number of items after applying `filter` params. + items (list[PolicyMember]): A list of members for policies. + """ + if continuation_token is not None: + self.continuation_token = continuation_token + if total_item_count is not None: + self.total_item_count = total_item_count + if items is not None: + self.items = items + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `PolicyMemberGetResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(PolicyMemberGetResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, PolicyMemberGetResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/policy_member_response.py b/pypureclient/flashblade/FB_2_14/models/policy_member_response.py new file mode 100644 index 000000000..f6c91a2f6 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/policy_member_response.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class PolicyMemberResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'items': 'list[PolicyMember]' + } + + attribute_map = { + 'items': 'items' + } + + required_args = { + } + + def __init__( + self, + items=None, # type: List[models.PolicyMember] + ): + """ + Keyword args: + items (list[PolicyMember]): A list of members for policies. + """ + if items is not None: + self.items = items + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `PolicyMemberResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(PolicyMemberResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, PolicyMemberResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/policy_member_with_remote.py b/pypureclient/flashblade/FB_2_14/models/policy_member_with_remote.py new file mode 100644 index 000000000..3cc2dab61 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/policy_member_with_remote.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class PolicyMemberWithRemote(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'member': 'FixedReference', + 'policy': 'LocationReference', + 'link': 'MemberLink' + } + + attribute_map = { + 'member': 'member', + 'policy': 'policy', + 'link': 'link' + } + + required_args = { + } + + def __init__( + self, + member=None, # type: models.FixedReference + policy=None, # type: models.LocationReference + link=None, # type: models.MemberLink + ): + """ + Keyword args: + member (FixedReference): Reference to the resource the policy is applied to. + policy (LocationReference): Reference to the policy. + link (MemberLink): Only populated if the `member` is a file system replica link. Contains additional information about the link. + """ + if member is not None: + self.member = member + if policy is not None: + self.policy = policy + if link is not None: + self.link = link + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `PolicyMemberWithRemote`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(PolicyMemberWithRemote, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, PolicyMemberWithRemote): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/policy_member_with_remote_get_response.py b/pypureclient/flashblade/FB_2_14/models/policy_member_with_remote_get_response.py new file mode 100644 index 000000000..dadede54a --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/policy_member_with_remote_get_response.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class PolicyMemberWithRemoteGetResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'continuation_token': 'str', + 'total_item_count': 'int', + 'items': 'list[PolicyMemberWithRemote]' + } + + attribute_map = { + 'continuation_token': 'continuation_token', + 'total_item_count': 'total_item_count', + 'items': 'items' + } + + required_args = { + } + + def __init__( + self, + continuation_token=None, # type: str + total_item_count=None, # type: int + items=None, # type: List[models.PolicyMemberWithRemote] + ): + """ + Keyword args: + continuation_token (str): Continuation token that can be provided in the `continuation_token` query param to get the next page of data. If you use the `continuation_token` to page through data you are guaranteed to get all items exactly once regardless of how items are modified. If an item is added or deleted during the pagination then it may or may not be returned. The `continuation_token` is generated if the `limit` is less than the remaining number of items, and the default sort is used (no sort is specified). + total_item_count (int): Total number of items after applying `filter` params. + items (list[PolicyMemberWithRemote]): A list of members for policies. + """ + if continuation_token is not None: + self.continuation_token = continuation_token + if total_item_count is not None: + self.total_item_count = total_item_count + if items is not None: + self.items = items + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `PolicyMemberWithRemoteGetResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(PolicyMemberWithRemoteGetResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, PolicyMemberWithRemoteGetResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/policy_member_with_remote_response.py b/pypureclient/flashblade/FB_2_14/models/policy_member_with_remote_response.py new file mode 100644 index 000000000..7f5d52f4f --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/policy_member_with_remote_response.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class PolicyMemberWithRemoteResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'items': 'list[PolicyMemberWithRemote]' + } + + attribute_map = { + 'items': 'items' + } + + required_args = { + } + + def __init__( + self, + items=None, # type: List[models.PolicyMemberWithRemote] + ): + """ + Keyword args: + items (list[PolicyMemberWithRemote]): A list of members for policies. + """ + if items is not None: + self.items = items + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `PolicyMemberWithRemoteResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(PolicyMemberWithRemoteResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, PolicyMemberWithRemoteResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/policy_patch.py b/pypureclient/flashblade/FB_2_14/models/policy_patch.py new file mode 100644 index 000000000..7f68f1b6b --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/policy_patch.py @@ -0,0 +1,165 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class PolicyPatch(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'name': 'str', + 'id': 'str', + 'enabled': 'bool', + 'is_local': 'bool', + 'location': 'FixedReference', + 'policy_type': 'str', + 'rules': 'list[PolicyRule]', + 'retention_lock': 'str', + 'add_rules': 'list[PolicyRule]', + 'remove_rules': 'list[PolicyRule]' + } + + attribute_map = { + 'name': 'name', + 'id': 'id', + 'enabled': 'enabled', + 'is_local': 'is_local', + 'location': 'location', + 'policy_type': 'policy_type', + 'rules': 'rules', + 'retention_lock': 'retention_lock', + 'add_rules': 'add_rules', + 'remove_rules': 'remove_rules' + } + + required_args = { + } + + def __init__( + self, + name=None, # type: str + id=None, # type: str + enabled=None, # type: bool + is_local=None, # type: bool + location=None, # type: models.FixedReference + policy_type=None, # type: str + rules=None, # type: List[models.PolicyRule] + retention_lock=None, # type: str + add_rules=None, # type: List[models.PolicyRule] + remove_rules=None, # type: List[models.PolicyRule] + ): + """ + Keyword args: + name (str): Name of the object (e.g., a file system or snapshot). + id (str): A non-modifiable, globally unique ID chosen by the system. + enabled (bool): If `true`, the policy is enabled. If not specified, defaults to `true`. + is_local (bool): Whether the policy is defined on the local array. + location (FixedReference): Reference to the array where the policy is defined. + policy_type (str): Type of the policy. Valid values are `audit`, `bucket-access`, `cross-origin-resource-sharing`, `network-access`, `nfs`, `object-access`, `smb-client`, `smb-share`, and `snapshot`. + rules (list[PolicyRule]) + retention_lock (str): If retention lock is locked, then the the policy can not be removed from the associated file systems and the rules may not be changed. Valid values are `locked` and `unlocked`. Contact Pure Technical Services to change `locked` to `unlocked`. + add_rules (list[PolicyRule]) + remove_rules (list[PolicyRule]) + """ + if name is not None: + self.name = name + if id is not None: + self.id = id + if enabled is not None: + self.enabled = enabled + if is_local is not None: + self.is_local = is_local + if location is not None: + self.location = location + if policy_type is not None: + self.policy_type = policy_type + if rules is not None: + self.rules = rules + if retention_lock is not None: + self.retention_lock = retention_lock + if add_rules is not None: + self.add_rules = add_rules + if remove_rules is not None: + self.remove_rules = remove_rules + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `PolicyPatch`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(PolicyPatch, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, PolicyPatch): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/policy_response.py b/pypureclient/flashblade/FB_2_14/models/policy_response.py new file mode 100644 index 000000000..91e9e8cdd --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/policy_response.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class PolicyResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'items': 'list[Policy]' + } + + attribute_map = { + 'items': 'items' + } + + required_args = { + } + + def __init__( + self, + items=None, # type: List[models.Policy] + ): + """ + Keyword args: + items (list[Policy]): A list of policy objects. + """ + if items is not None: + self.items = items + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `PolicyResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(PolicyResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, PolicyResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/policy_rule.py b/pypureclient/flashblade/FB_2_14/models/policy_rule.py new file mode 100644 index 000000000..09a9af884 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/policy_rule.py @@ -0,0 +1,129 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class PolicyRule(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'at': 'int', + 'every': 'int', + 'keep_for': 'int', + 'time_zone': 'str' + } + + attribute_map = { + 'at': 'at', + 'every': 'every', + 'keep_for': 'keep_for', + 'time_zone': 'time_zone' + } + + required_args = { + } + + def __init__( + self, + at=None, # type: int + every=None, # type: int + keep_for=None, # type: int + time_zone=None, # type: str + ): + """ + Keyword args: + at (int): Time during the day to take the snapshot (using array time zone), only valid if 'every' is in days. + every (int): How often to take snapshots. + keep_for (int): The time to keep the snapshots for. + time_zone (str): The time zone to use with the `at` time. + """ + if at is not None: + self.at = at + if every is not None: + self.every = every + if keep_for is not None: + self.keep_for = keep_for + if time_zone is not None: + self.time_zone = time_zone + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `PolicyRule`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(PolicyRule, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, PolicyRule): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/policy_rule_index.py b/pypureclient/flashblade/FB_2_14/models/policy_rule_index.py new file mode 100644 index 000000000..5f597c284 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/policy_rule_index.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class PolicyRuleIndex(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'index': 'int' + } + + attribute_map = { + 'index': 'index' + } + + required_args = { + } + + def __init__( + self, + index=None, # type: int + ): + """ + Keyword args: + index (int): The index within the policy. The `index` indicates the order the rules are evaluated. NOTE: It is recommended to use the query param `before_rule_id` to do reordering to avoid concurrency issues, but changing `index` is also supported. `index` can not be changed if `before_rule_id` or `before_rule_name` are specified. + """ + if index is not None: + self.index = index + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `PolicyRuleIndex`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(PolicyRuleIndex, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, PolicyRuleIndex): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/policy_rule_index_in_policy.py b/pypureclient/flashblade/FB_2_14/models/policy_rule_index_in_policy.py new file mode 100644 index 000000000..da2d8a497 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/policy_rule_index_in_policy.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class PolicyRuleIndexInPolicy(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'index': 'int' + } + + attribute_map = { + 'index': 'index' + } + + required_args = { + } + + def __init__( + self, + index=None, # type: int + ): + """ + Keyword args: + index (int): The index within the policy. The `index` indicates the order the rules are evaluated. + """ + if index is not None: + self.index = index + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `PolicyRuleIndexInPolicy`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(PolicyRuleIndexInPolicy, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, PolicyRuleIndexInPolicy): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/policy_rule_object_access.py b/pypureclient/flashblade/FB_2_14/models/policy_rule_object_access.py new file mode 100644 index 000000000..4d6739344 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/policy_rule_object_access.py @@ -0,0 +1,141 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class PolicyRuleObjectAccess(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'name': 'str', + 'actions': 'list[str]', + 'conditions': 'PolicyRuleObjectAccessCondition', + 'effect': 'str', + 'policy': 'FixedReference', + 'resources': 'list[str]' + } + + attribute_map = { + 'name': 'name', + 'actions': 'actions', + 'conditions': 'conditions', + 'effect': 'effect', + 'policy': 'policy', + 'resources': 'resources' + } + + required_args = { + } + + def __init__( + self, + name=None, # type: str + actions=None, # type: List[str] + conditions=None, # type: models.PolicyRuleObjectAccessCondition + effect=None, # type: str + policy=None, # type: models.FixedReference + resources=None, # type: List[str] + ): + """ + Keyword args: + name (str): Name of the object (e.g., a file system or snapshot). + actions (list[str]): The list of actions granted by this rule. Each included action may restrict other properties of the rule. Supported actions are returned by the `/object-store-access-policy-actions` endpoint. + conditions (PolicyRuleObjectAccessCondition): Conditions used to limit the scope which this rule applies to. + effect (str): Effect of this rule. When `allow`, the rule allows the given actions to be performed on the given resources, subject to the given conditions. When `deny`, the rule disallows performing the given actions on the given resources, subject to the given condition. This takes precedence over any matching `allow` rules. Valid values include `allow` and `deny`. + policy (FixedReference): The policy to which this rule belongs. + resources (list[str]): The list of resources which this rule applies to. Each resource can include a bucket component, optionally followed by an object component. The choice of which components a resource can include is dictated by which actions are included in the rule. For further details, see the Object Store Access Policy Actions section of the User Guide. + """ + if name is not None: + self.name = name + if actions is not None: + self.actions = actions + if conditions is not None: + self.conditions = conditions + if effect is not None: + self.effect = effect + if policy is not None: + self.policy = policy + if resources is not None: + self.resources = resources + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `PolicyRuleObjectAccess`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(PolicyRuleObjectAccess, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, PolicyRuleObjectAccess): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/policy_rule_object_access_bulk_manage.py b/pypureclient/flashblade/FB_2_14/models/policy_rule_object_access_bulk_manage.py new file mode 100644 index 000000000..9a114feae --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/policy_rule_object_access_bulk_manage.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class PolicyRuleObjectAccessBulkManage(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'actions': 'list[str]', + 'conditions': 'PolicyRuleObjectAccessCondition', + 'resources': 'list[str]', + 'effect': 'str', + 'name': 'str' + } + + attribute_map = { + 'actions': 'actions', + 'conditions': 'conditions', + 'resources': 'resources', + 'effect': 'effect', + 'name': 'name' + } + + required_args = { + } + + def __init__( + self, + actions=None, # type: List[str] + conditions=None, # type: models.PolicyRuleObjectAccessCondition + resources=None, # type: List[str] + effect=None, # type: str + name=None, # type: str + ): + """ + Keyword args: + actions (list[str]): The list of actions granted by this rule. Each included action may restrict other properties of the rule. Supported actions are returned by the `/object-store-access-policy-actions` endpoint. + conditions (PolicyRuleObjectAccessCondition): Conditions used to limit the scope which this rule applies to. + resources (list[str]): The list of resources which this rule applies to. Each resource can include a bucket component, optionally followed by an object component. The choice of which components a resource can include is dictated by which actions are included in the rule. For further details, see the Object Store Access Policy Actions section of the User Guide. + effect (str): Effect of this rule. When `allow`, the rule allows the given actions to be performed on the given resources, subject to the given conditions. When `deny`, the rule disallows performing the given actions on the given resources, subject to the given condition. This takes precedence over any matching `allow` rules. Valid values include `allow` and `deny`. + name (str): Name of the object (e.g., a file system or snapshot). + """ + if actions is not None: + self.actions = actions + if conditions is not None: + self.conditions = conditions + if resources is not None: + self.resources = resources + if effect is not None: + self.effect = effect + if name is not None: + self.name = name + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `PolicyRuleObjectAccessBulkManage`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(PolicyRuleObjectAccessBulkManage, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, PolicyRuleObjectAccessBulkManage): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/policy_rule_object_access_condition.py b/pypureclient/flashblade/FB_2_14/models/policy_rule_object_access_condition.py new file mode 100644 index 000000000..d6dde4758 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/policy_rule_object_access_condition.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class PolicyRuleObjectAccessCondition(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'source_ips': 'list[str]', + 's3_delimiters': 'list[str]', + 's3_prefixes': 'list[str]' + } + + attribute_map = { + 'source_ips': 'source_ips', + 's3_delimiters': 's3_delimiters', + 's3_prefixes': 's3_prefixes' + } + + required_args = { + } + + def __init__( + self, + source_ips=None, # type: List[str] + s3_delimiters=None, # type: List[str] + s3_prefixes=None, # type: List[str] + ): + """ + Keyword args: + source_ips (list[str]): If specified, the rule will apply only to requests matching at least one provided IP address or subnet. Each entry must be in standard CIDR format (including an IP address without an associated routing prefix). Can be used with any action. + s3_delimiters (list[str]): If specified, groups result objects by the specified delimiter. Only top-level groupings will be returned. Can be used with the `s3:ListBucket` and `s3:ListBucketVersions` actions. + s3_prefixes (list[str]): If specified, restricts access and results based on the prefix of the relevant objects. Can be used with the `s3:ListBucket` and `s3:ListBucketVersions` actions. + """ + if source_ips is not None: + self.source_ips = source_ips + if s3_delimiters is not None: + self.s3_delimiters = s3_delimiters + if s3_prefixes is not None: + self.s3_prefixes = s3_prefixes + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `PolicyRuleObjectAccessCondition`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(PolicyRuleObjectAccessCondition, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, PolicyRuleObjectAccessCondition): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/policy_rule_object_access_post.py b/pypureclient/flashblade/FB_2_14/models/policy_rule_object_access_post.py new file mode 100644 index 000000000..e6c303b56 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/policy_rule_object_access_post.py @@ -0,0 +1,129 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class PolicyRuleObjectAccessPost(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'actions': 'list[str]', + 'conditions': 'PolicyRuleObjectAccessCondition', + 'resources': 'list[str]', + 'effect': 'str' + } + + attribute_map = { + 'actions': 'actions', + 'conditions': 'conditions', + 'resources': 'resources', + 'effect': 'effect' + } + + required_args = { + } + + def __init__( + self, + actions=None, # type: List[str] + conditions=None, # type: models.PolicyRuleObjectAccessCondition + resources=None, # type: List[str] + effect=None, # type: str + ): + """ + Keyword args: + actions (list[str]): The list of actions granted by this rule. Each included action may restrict other properties of the rule. Supported actions are returned by the `/object-store-access-policy-actions` endpoint. + conditions (PolicyRuleObjectAccessCondition): Conditions used to limit the scope which this rule applies to. + resources (list[str]): The list of resources which this rule applies to. Each resource can include a bucket component, optionally followed by an object component. The choice of which components a resource can include is dictated by which actions are included in the rule. For further details, see the Object Store Access Policy Actions section of the User Guide. + effect (str): Effect of this rule. When `allow`, the rule allows the given actions to be performed on the given resources, subject to the given conditions. When `deny`, the rule disallows performing the given actions on the given resources, subject to the given condition. This takes precedence over any matching `allow` rules. Valid values include `allow` and `deny`. + """ + if actions is not None: + self.actions = actions + if conditions is not None: + self.conditions = conditions + if resources is not None: + self.resources = resources + if effect is not None: + self.effect = effect + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `PolicyRuleObjectAccessPost`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(PolicyRuleObjectAccessPost, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, PolicyRuleObjectAccessPost): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/public_access_config.py b/pypureclient/flashblade/FB_2_14/models/public_access_config.py new file mode 100644 index 000000000..edfb124b4 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/public_access_config.py @@ -0,0 +1,117 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class PublicAccessConfig(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'block_new_public_policies': 'bool', + 'block_public_access': 'bool' + } + + attribute_map = { + 'block_new_public_policies': 'block_new_public_policies', + 'block_public_access': 'block_public_access' + } + + required_args = { + } + + def __init__( + self, + block_new_public_policies=None, # type: bool + block_public_access=None, # type: bool + ): + """ + Keyword args: + block_new_public_policies (bool): If set to `true`, adding bucket policies that grant public access to a bucket is not allowed. + block_public_access (bool): If set to `true`, access to a bucket with a public policy is restricted to only authenticated users within the account that bucket belongs to. + """ + if block_new_public_policies is not None: + self.block_new_public_policies = block_new_public_policies + if block_public_access is not None: + self.block_public_access = block_public_access + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `PublicAccessConfig`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(PublicAccessConfig, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, PublicAccessConfig): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/public_key.py b/pypureclient/flashblade/FB_2_14/models/public_key.py new file mode 100644 index 000000000..596f58a0c --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/public_key.py @@ -0,0 +1,138 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class PublicKey(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'name': 'str', + 'id': 'str', + 'public_key': 'str', + 'algorithm': 'str', + 'key_size': 'int' + } + + attribute_map = { + 'name': 'name', + 'id': 'id', + 'public_key': 'public_key', + 'algorithm': 'algorithm', + 'key_size': 'key_size' + } + + required_args = { + } + + def __init__( + self, + name=None, # type: str + id=None, # type: str + public_key=None, # type: str + algorithm=None, # type: str + key_size=None, # type: int + ): + """ + Keyword args: + name (str): A name chosen by the user. Can be changed. Must be locally unique. + id (str): A non-modifiable, globally unique ID chosen by the system. + public_key (str): The text of the public key. May be PEM-formatted or OpenSSH-formatted at the time of input. + algorithm (str): The cryptographic algorithm used by the key. Valid values include `rsa`, `rsassa-pss`, `dsa`, `ec`, and `ed25519`. + key_size (int): The size of the public key in bits. + """ + if name is not None: + self.name = name + if id is not None: + self.id = id + if public_key is not None: + self.public_key = public_key + if algorithm is not None: + self.algorithm = algorithm + if key_size is not None: + self.key_size = key_size + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `PublicKey`".format(key)) + if key == "public_key" and value is not None: + if len(value) > 5400: + raise ValueError("Invalid value for `public_key`, length must be less than or equal to `5400`") + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(PublicKey, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, PublicKey): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/public_key_get_response.py b/pypureclient/flashblade/FB_2_14/models/public_key_get_response.py new file mode 100644 index 000000000..de2ed8e4b --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/public_key_get_response.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class PublicKeyGetResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'continuation_token': 'str', + 'total_item_count': 'int', + 'items': 'list[PublicKey]' + } + + attribute_map = { + 'continuation_token': 'continuation_token', + 'total_item_count': 'total_item_count', + 'items': 'items' + } + + required_args = { + } + + def __init__( + self, + continuation_token=None, # type: str + total_item_count=None, # type: int + items=None, # type: List[models.PublicKey] + ): + """ + Keyword args: + continuation_token (str): Continuation token that can be provided in the `continuation_token` query param to get the next page of data. If you use the `continuation_token` to page through data you are guaranteed to get all items exactly once regardless of how items are modified. If an item is added or deleted during the pagination then it may or may not be returned. The `continuation_token` is generated if the `limit` is less than the remaining number of items, and the default sort is used (no sort is specified). + total_item_count (int): Total number of items after applying `filter` params. + items (list[PublicKey]): A list of public key objects. + """ + if continuation_token is not None: + self.continuation_token = continuation_token + if total_item_count is not None: + self.total_item_count = total_item_count + if items is not None: + self.items = items + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `PublicKeyGetResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(PublicKeyGetResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, PublicKeyGetResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/public_key_post.py b/pypureclient/flashblade/FB_2_14/models/public_key_post.py new file mode 100644 index 000000000..48b58ed0b --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/public_key_post.py @@ -0,0 +1,114 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class PublicKeyPost(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'public_key': 'str' + } + + attribute_map = { + 'public_key': 'public_key' + } + + required_args = { + } + + def __init__( + self, + public_key=None, # type: str + ): + """ + Keyword args: + public_key (str): The text of the public key. May be PEM-formatted or OpenSSH-formatted at the time of input. + """ + if public_key is not None: + self.public_key = public_key + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `PublicKeyPost`".format(key)) + if key == "public_key" and value is not None: + if len(value) > 5400: + raise ValueError("Invalid value for `public_key`, length must be less than or equal to `5400`") + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(PublicKeyPost, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, PublicKeyPost): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/public_key_response.py b/pypureclient/flashblade/FB_2_14/models/public_key_response.py new file mode 100644 index 000000000..eee877136 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/public_key_response.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class PublicKeyResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'items': 'list[PublicKey]' + } + + attribute_map = { + 'items': 'items' + } + + required_args = { + } + + def __init__( + self, + items=None, # type: List[models.PublicKey] + ): + """ + Keyword args: + items (list[PublicKey]): A list of public key objects. + """ + if items is not None: + self.items = items + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `PublicKeyResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(PublicKeyResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, PublicKeyResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/public_key_use.py b/pypureclient/flashblade/FB_2_14/models/public_key_use.py new file mode 100644 index 000000000..f339bb250 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/public_key_use.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class PublicKeyUse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'name': 'str', + 'id': 'str', + 'use': 'FixedReference' + } + + attribute_map = { + 'name': 'name', + 'id': 'id', + 'use': 'use' + } + + required_args = { + } + + def __init__( + self, + name=None, # type: str + id=None, # type: str + use=None, # type: models.FixedReference + ): + """ + Keyword args: + name (str): Name of the object (e.g., a file system or snapshot). + id (str): A non-modifiable, globally unique ID chosen by the system. + use (FixedReference): A reference to an object using this public key. + """ + if name is not None: + self.name = name + if id is not None: + self.id = id + if use is not None: + self.use = use + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `PublicKeyUse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(PublicKeyUse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, PublicKeyUse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/public_key_use_get_response.py b/pypureclient/flashblade/FB_2_14/models/public_key_use_get_response.py new file mode 100644 index 000000000..d78bbb14c --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/public_key_use_get_response.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class PublicKeyUseGetResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'continuation_token': 'str', + 'total_item_count': 'int', + 'items': 'list[PublicKeyUse]' + } + + attribute_map = { + 'continuation_token': 'continuation_token', + 'total_item_count': 'total_item_count', + 'items': 'items' + } + + required_args = { + } + + def __init__( + self, + continuation_token=None, # type: str + total_item_count=None, # type: int + items=None, # type: List[models.PublicKeyUse] + ): + """ + Keyword args: + continuation_token (str): Continuation token that can be provided in the `continuation_token` query param to get the next page of data. If you use the `continuation_token` to page through data you are guaranteed to get all items exactly once regardless of how items are modified. If an item is added or deleted during the pagination then it may or may not be returned. The `continuation_token` is generated if the `limit` is less than the remaining number of items, and the default sort is used (no sort is specified). + total_item_count (int): Total number of items after applying `filter` params. + items (list[PublicKeyUse]): A list of public key use objects. + """ + if continuation_token is not None: + self.continuation_token = continuation_token + if total_item_count is not None: + self.total_item_count = total_item_count + if items is not None: + self.items = items + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `PublicKeyUseGetResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(PublicKeyUseGetResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, PublicKeyUseGetResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/public_key_use_response.py b/pypureclient/flashblade/FB_2_14/models/public_key_use_response.py new file mode 100644 index 000000000..397b7769f --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/public_key_use_response.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class PublicKeyUseResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'items': 'list[PublicKeyUse]' + } + + attribute_map = { + 'items': 'items' + } + + required_args = { + } + + def __init__( + self, + items=None, # type: List[models.PublicKeyUse] + ): + """ + Keyword args: + items (list[PublicKeyUse]): A list of public key use objects. + """ + if items is not None: + self.items = items + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `PublicKeyUseResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(PublicKeyUseResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, PublicKeyUseResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/quota_setting.py b/pypureclient/flashblade/FB_2_14/models/quota_setting.py new file mode 100644 index 000000000..f6403ecb9 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/quota_setting.py @@ -0,0 +1,129 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class QuotaSetting(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'name': 'str', + 'id': 'str', + 'contact': 'str', + 'direct_notifications_enabled': 'bool' + } + + attribute_map = { + 'name': 'name', + 'id': 'id', + 'contact': 'contact', + 'direct_notifications_enabled': 'direct_notifications_enabled' + } + + required_args = { + } + + def __init__( + self, + name=None, # type: str + id=None, # type: str + contact=None, # type: str + direct_notifications_enabled=None, # type: bool + ): + """ + Keyword args: + name (str): Name of the object (e.g., a file system or snapshot). + id (str): A non-modifiable, globally unique ID chosen by the system. + contact (str): The contact information that will be provided in any notifications sent directly to users and groups. This can be an email, a phone number, a name, or some other form of contact information. + direct_notifications_enabled (bool): Are notifications regarding space usage and quotas being sent directly to user and group emails? + """ + if name is not None: + self.name = name + if id is not None: + self.id = id + if contact is not None: + self.contact = contact + if direct_notifications_enabled is not None: + self.direct_notifications_enabled = direct_notifications_enabled + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `QuotaSetting`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(QuotaSetting, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, QuotaSetting): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/quota_setting_get_response.py b/pypureclient/flashblade/FB_2_14/models/quota_setting_get_response.py new file mode 100644 index 000000000..9fe124d75 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/quota_setting_get_response.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class QuotaSettingGetResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'continuation_token': 'str', + 'total_item_count': 'int', + 'items': 'list[QuotaSetting]' + } + + attribute_map = { + 'continuation_token': 'continuation_token', + 'total_item_count': 'total_item_count', + 'items': 'items' + } + + required_args = { + } + + def __init__( + self, + continuation_token=None, # type: str + total_item_count=None, # type: int + items=None, # type: List[models.QuotaSetting] + ): + """ + Keyword args: + continuation_token (str): Continuation token that can be provided in the `continuation_token` query param to get the next page of data. If you use the `continuation_token` to page through data you are guaranteed to get all items exactly once regardless of how items are modified. If an item is added or deleted during the pagination then it may or may not be returned. The `continuation_token` is generated if the `limit` is less than the remaining number of items, and the default sort is used (no sort is specified). + total_item_count (int): Total number of items after applying `filter` params. + items (list[QuotaSetting]): A list of quota settings objects. + """ + if continuation_token is not None: + self.continuation_token = continuation_token + if total_item_count is not None: + self.total_item_count = total_item_count + if items is not None: + self.items = items + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `QuotaSettingGetResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(QuotaSettingGetResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, QuotaSettingGetResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/quota_setting_response.py b/pypureclient/flashblade/FB_2_14/models/quota_setting_response.py new file mode 100644 index 000000000..473272e16 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/quota_setting_response.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class QuotaSettingResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'items': 'list[QuotaSetting]' + } + + attribute_map = { + 'items': 'items' + } + + required_args = { + } + + def __init__( + self, + items=None, # type: List[models.QuotaSetting] + ): + """ + Keyword args: + items (list[QuotaSetting]): A list of quota settings objects. + """ + if items is not None: + self.items = items + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `QuotaSettingResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(QuotaSettingResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, QuotaSettingResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/rapid_data_locking.py b/pypureclient/flashblade/FB_2_14/models/rapid_data_locking.py new file mode 100644 index 000000000..8ee20074f --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/rapid_data_locking.py @@ -0,0 +1,117 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class RapidDataLocking(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'enabled': 'bool', + 'kmip_server': 'Reference' + } + + attribute_map = { + 'enabled': 'enabled', + 'kmip_server': 'kmip_server' + } + + required_args = { + } + + def __init__( + self, + enabled=None, # type: bool + kmip_server=None, # type: models.Reference + ): + """ + Keyword args: + enabled (bool): `True` if the Rapid Data Locking feature is enabled. + kmip_server (Reference): The KMIP server configuration associated with RDL. + """ + if enabled is not None: + self.enabled = enabled + if kmip_server is not None: + self.kmip_server = kmip_server + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `RapidDataLocking`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(RapidDataLocking, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, RapidDataLocking): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/rapid_data_locking_response.py b/pypureclient/flashblade/FB_2_14/models/rapid_data_locking_response.py new file mode 100644 index 000000000..2d5f71a11 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/rapid_data_locking_response.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class RapidDataLockingResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'items': 'list[RapidDataLocking]' + } + + attribute_map = { + 'items': 'items' + } + + required_args = { + } + + def __init__( + self, + items=None, # type: List[models.RapidDataLocking] + ): + """ + Keyword args: + items (list[RapidDataLocking]) + """ + if items is not None: + self.items = items + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `RapidDataLockingResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(RapidDataLockingResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, RapidDataLockingResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/reference.py b/pypureclient/flashblade/FB_2_14/models/reference.py new file mode 100644 index 000000000..9a0d70229 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/reference.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class Reference(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'id': 'str', + 'name': 'str', + 'resource_type': 'ResourceType' + } + + attribute_map = { + 'id': 'id', + 'name': 'name', + 'resource_type': 'resource_type' + } + + required_args = { + } + + def __init__( + self, + id=None, # type: str + name=None, # type: str + resource_type=None, # type: models.ResourceType + ): + """ + Keyword args: + id (str): A non-modifiable, globally unique ID chosen by the system. + name (str): A name chosen by the user. Can be changed. Must be locally unique. + resource_type (ResourceType) + """ + if id is not None: + self.id = id + if name is not None: + self.name = name + if resource_type is not None: + self.resource_type = resource_type + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `Reference`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(Reference, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, Reference): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/reference_writable.py b/pypureclient/flashblade/FB_2_14/models/reference_writable.py new file mode 100644 index 000000000..582f49eb0 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/reference_writable.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class ReferenceWritable(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'id': 'str', + 'name': 'str', + 'resource_type': 'str' + } + + attribute_map = { + 'id': 'id', + 'name': 'name', + 'resource_type': 'resource_type' + } + + required_args = { + } + + def __init__( + self, + id=None, # type: str + name=None, # type: str + resource_type=None, # type: str + ): + """ + Keyword args: + id (str): A non-modifiable, globally unique ID chosen by the system. + name (str): A name chosen by the user. Can be changed. Must be locally unique. + resource_type (str): Type of the object (full name of the endpoint). Valid values are the unique part of the resource's REST endpoint. For example, a reference to a file system would have a `resource_type` of `file-systems`. + """ + if id is not None: + self.id = id + if name is not None: + self.name = name + if resource_type is not None: + self.resource_type = resource_type + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `ReferenceWritable`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(ReferenceWritable, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ReferenceWritable): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/relationship_performance_replication.py b/pypureclient/flashblade/FB_2_14/models/relationship_performance_replication.py new file mode 100644 index 000000000..124c64600 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/relationship_performance_replication.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class RelationshipPerformanceReplication(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'id': 'str', + 'periodic': 'ReplicationPerformance', + 'time': 'int', + 'aggregate': 'ReplicationPerformance', + 'continuous': 'ContinuousReplicationPerformance' + } + + attribute_map = { + 'id': 'id', + 'periodic': 'periodic', + 'time': 'time', + 'aggregate': 'aggregate', + 'continuous': 'continuous' + } + + required_args = { + } + + def __init__( + self, + id=None, # type: str + periodic=None, # type: models.ReplicationPerformance + time=None, # type: int + aggregate=None, # type: models.ReplicationPerformance + continuous=None, # type: models.ContinuousReplicationPerformance + ): + """ + Keyword args: + id (str): A non-modifiable, globally unique ID chosen by the system. + periodic (ReplicationPerformance): Total bytes transmitted or received per second for periodic replication. Periodic replication includes file system replication, which is snapshot based. + time (int): Sample time in milliseconds since UNIX epoch. + aggregate (ReplicationPerformance): Total bytes transmitted or received per second for all types of replication. + continuous (ContinuousReplicationPerformance): Object backlog information and total bytes transmitted or received per second for continuous replication. Continuous replication includes object replication. + """ + if id is not None: + self.id = id + if periodic is not None: + self.periodic = periodic + if time is not None: + self.time = time + if aggregate is not None: + self.aggregate = aggregate + if continuous is not None: + self.continuous = continuous + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `RelationshipPerformanceReplication`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(RelationshipPerformanceReplication, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, RelationshipPerformanceReplication): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/replica_link_built_in.py b/pypureclient/flashblade/FB_2_14/models/replica_link_built_in.py new file mode 100644 index 000000000..020e75878 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/replica_link_built_in.py @@ -0,0 +1,129 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class ReplicaLinkBuiltIn(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'id': 'str', + 'direction': 'Direction', + 'lag': 'int', + 'status_details': 'str' + } + + attribute_map = { + 'id': 'id', + 'direction': 'direction', + 'lag': 'lag', + 'status_details': 'status_details' + } + + required_args = { + } + + def __init__( + self, + id=None, # type: str + direction=None, # type: models.Direction + lag=None, # type: int + status_details=None, # type: str + ): + """ + Keyword args: + id (str): A non-modifiable, globally unique ID chosen by the system. + direction (Direction) + lag (int): Duration in milliseconds that represents how far behind the replication target is from the source. This is the time difference between current time and `recovery_point`. + status_details (str): Detailed information about the status of the replica link when it is unhealthy. + """ + if id is not None: + self.id = id + if direction is not None: + self.direction = direction + if lag is not None: + self.lag = lag + if status_details is not None: + self.status_details = status_details + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `ReplicaLinkBuiltIn`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(ReplicaLinkBuiltIn, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ReplicaLinkBuiltIn): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/replication_performance.py b/pypureclient/flashblade/FB_2_14/models/replication_performance.py new file mode 100644 index 000000000..a3f8c13d4 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/replication_performance.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class ReplicationPerformance(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'transmitted_bytes_per_sec': 'float', + 'received_bytes_per_sec': 'float' + } + + attribute_map = { + 'transmitted_bytes_per_sec': 'transmitted_bytes_per_sec', + 'received_bytes_per_sec': 'received_bytes_per_sec' + } + + required_args = { + } + + def __init__( + self, + transmitted_bytes_per_sec=None, # type: float + received_bytes_per_sec=None, # type: float + ): + """ + Keyword args: + transmitted_bytes_per_sec (float): Total bytes transmitted per second. + received_bytes_per_sec (float): Total bytes received per second. + """ + if transmitted_bytes_per_sec is not None: + self.transmitted_bytes_per_sec = transmitted_bytes_per_sec + if received_bytes_per_sec is not None: + self.received_bytes_per_sec = received_bytes_per_sec + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `ReplicationPerformance`".format(key)) + if key == "transmitted_bytes_per_sec" and value is not None: + if value < 0.0: + raise ValueError("Invalid value for `transmitted_bytes_per_sec`, must be a value greater than or equal to `0.0`") + if key == "received_bytes_per_sec" and value is not None: + if value < 0.0: + raise ValueError("Invalid value for `received_bytes_per_sec`, must be a value greater than or equal to `0.0`") + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(ReplicationPerformance, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ReplicationPerformance): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/resource.py b/pypureclient/flashblade/FB_2_14/models/resource.py new file mode 100644 index 000000000..8d999ff4f --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/resource.py @@ -0,0 +1,117 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class Resource(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'name': 'str', + 'id': 'str' + } + + attribute_map = { + 'name': 'name', + 'id': 'id' + } + + required_args = { + } + + def __init__( + self, + name=None, # type: str + id=None, # type: str + ): + """ + Keyword args: + name (str): A name chosen by the user. Can be changed. Must be locally unique. + id (str): A non-modifiable, globally unique ID chosen by the system. + """ + if name is not None: + self.name = name + if id is not None: + self.id = id + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `Resource`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(Resource, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, Resource): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/resource_performance_replication.py b/pypureclient/flashblade/FB_2_14/models/resource_performance_replication.py new file mode 100644 index 000000000..84c700dd1 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/resource_performance_replication.py @@ -0,0 +1,141 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class ResourcePerformanceReplication(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'name': 'str', + 'id': 'str', + 'periodic': 'ReplicationPerformance', + 'time': 'int', + 'aggregate': 'ReplicationPerformance', + 'continuous': 'ContinuousReplicationPerformance' + } + + attribute_map = { + 'name': 'name', + 'id': 'id', + 'periodic': 'periodic', + 'time': 'time', + 'aggregate': 'aggregate', + 'continuous': 'continuous' + } + + required_args = { + } + + def __init__( + self, + name=None, # type: str + id=None, # type: str + periodic=None, # type: models.ReplicationPerformance + time=None, # type: int + aggregate=None, # type: models.ReplicationPerformance + continuous=None, # type: models.ContinuousReplicationPerformance + ): + """ + Keyword args: + name (str): Name of the object (e.g., a file system or snapshot). + id (str): A non-modifiable, globally unique ID chosen by the system. + periodic (ReplicationPerformance): Total bytes transmitted or received per second for periodic replication. Periodic replication includes file system replication, which is snapshot based. + time (int): Sample time in milliseconds since UNIX epoch. + aggregate (ReplicationPerformance): Total bytes transmitted or received per second for all types of replication. + continuous (ContinuousReplicationPerformance): Object backlog information and total bytes transmitted or received per second for continuous replication. Continuous replication includes object replication. + """ + if name is not None: + self.name = name + if id is not None: + self.id = id + if periodic is not None: + self.periodic = periodic + if time is not None: + self.time = time + if aggregate is not None: + self.aggregate = aggregate + if continuous is not None: + self.continuous = continuous + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `ResourcePerformanceReplication`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(ResourcePerformanceReplication, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ResourcePerformanceReplication): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/resource_performance_replication_get_response.py b/pypureclient/flashblade/FB_2_14/models/resource_performance_replication_get_response.py new file mode 100644 index 000000000..e5711155b --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/resource_performance_replication_get_response.py @@ -0,0 +1,129 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class ResourcePerformanceReplicationGetResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'continuation_token': 'str', + 'total_item_count': 'int', + 'items': 'list[ResourcePerformanceReplication]', + 'total': 'list[ResourcePerformanceReplication]' + } + + attribute_map = { + 'continuation_token': 'continuation_token', + 'total_item_count': 'total_item_count', + 'items': 'items', + 'total': 'total' + } + + required_args = { + } + + def __init__( + self, + continuation_token=None, # type: str + total_item_count=None, # type: int + items=None, # type: List[models.ResourcePerformanceReplication] + total=None, # type: List[models.ResourcePerformanceReplication] + ): + """ + Keyword args: + continuation_token (str): Continuation token that can be provided in the `continuation_token` query param to get the next page of data. If you use the `continuation_token` to page through data you are guaranteed to get all items exactly once regardless of how items are modified. If an item is added or deleted during the pagination then it may or may not be returned. The `continuation_token` is generated if the `limit` is less than the remaining number of items, and the default sort is used (no sort is specified). + total_item_count (int): Total number of items after applying `filter` params. + items (list[ResourcePerformanceReplication]) + total (list[ResourcePerformanceReplication]): Total of all records after filtering. If `total_only` query param is `true`, then no items will be returned. + """ + if continuation_token is not None: + self.continuation_token = continuation_token + if total_item_count is not None: + self.total_item_count = total_item_count + if items is not None: + self.items = items + if total is not None: + self.total = total + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `ResourcePerformanceReplicationGetResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(ResourcePerformanceReplicationGetResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ResourcePerformanceReplicationGetResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/resource_type.py b/pypureclient/flashblade/FB_2_14/models/resource_type.py new file mode 100644 index 000000000..4d5b3fffb --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/resource_type.py @@ -0,0 +1,105 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class ResourceType(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + } + + attribute_map = { + } + + required_args = { + } + + def __init__( + self, + ): + """ + Keyword args: + """ + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `ResourceType`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(ResourceType, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ResourceType): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/role.py b/pypureclient/flashblade/FB_2_14/models/role.py new file mode 100644 index 000000000..988ed40ba --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/role.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class Role(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'name': 'str', + 'id': 'str', + 'permissions': 'list[Permission]' + } + + attribute_map = { + 'name': 'name', + 'id': 'id', + 'permissions': 'permissions' + } + + required_args = { + } + + def __init__( + self, + name=None, # type: str + id=None, # type: str + permissions=None, # type: List[models.Permission] + ): + """ + Keyword args: + name (str): Name of the object (e.g., a file system or snapshot). + id (str): A non-modifiable, globally unique ID chosen by the system. + permissions (list[Permission]): A list of permissions that the role can perform. + """ + if name is not None: + self.name = name + if id is not None: + self.id = id + if permissions is not None: + self.permissions = permissions + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `Role`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(Role, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, Role): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/role_get_response.py b/pypureclient/flashblade/FB_2_14/models/role_get_response.py new file mode 100644 index 000000000..eb0f7985a --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/role_get_response.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class RoleGetResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'continuation_token': 'str', + 'total_item_count': 'int', + 'items': 'list[Role]' + } + + attribute_map = { + 'continuation_token': 'continuation_token', + 'total_item_count': 'total_item_count', + 'items': 'items' + } + + required_args = { + } + + def __init__( + self, + continuation_token=None, # type: str + total_item_count=None, # type: int + items=None, # type: List[models.Role] + ): + """ + Keyword args: + continuation_token (str): Continuation token that can be provided in the `continuation_token` query param to get the next page of data. If you use the `continuation_token` to page through data you are guaranteed to get all items exactly once regardless of how items are modified. If an item is added or deleted during the pagination then it may or may not be returned. The `continuation_token` is generated if the `limit` is less than the remaining number of items, and the default sort is used (no sort is specified). + total_item_count (int): Total number of items after applying `filter` params. + items (list[Role]) + """ + if continuation_token is not None: + self.continuation_token = continuation_token + if total_item_count is not None: + self.total_item_count = total_item_count + if items is not None: + self.items = items + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `RoleGetResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(RoleGetResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, RoleGetResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/session.py b/pypureclient/flashblade/FB_2_14/models/session.py new file mode 100644 index 000000000..8ed779f7a --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/session.py @@ -0,0 +1,171 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class Session(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'name': 'str', + 'id': 'str', + 'end_time': 'int', + 'event': 'str', + 'event_count': 'int', + 'location': 'str', + 'method': 'str', + 'start_time': 'int', + 'user': 'str', + 'user_interface': 'str', + 'identifying_details': 'str' + } + + attribute_map = { + 'name': 'name', + 'id': 'id', + 'end_time': 'end_time', + 'event': 'event', + 'event_count': 'event_count', + 'location': 'location', + 'method': 'method', + 'start_time': 'start_time', + 'user': 'user', + 'user_interface': 'user_interface', + 'identifying_details': 'identifying_details' + } + + required_args = { + } + + def __init__( + self, + name=None, # type: str + id=None, # type: str + end_time=None, # type: int + event=None, # type: str + event_count=None, # type: int + location=None, # type: str + method=None, # type: str + start_time=None, # type: int + user=None, # type: str + user_interface=None, # type: str + identifying_details=None, # type: str + ): + """ + Keyword args: + name (str): Name of the object (e.g., a file system or snapshot). + id (str): A non-modifiable, globally unique ID chosen by the system. + end_time (int): Date and time the user logged out of the Purity//FB interface in milliseconds since UNIX epoch. Set to 0 if the session is still active. + event (str): Description of session events. Valid values include `failed authentication`, `user session`, `login`, `logout`, `API token obtained`, and `request without session`. + event_count (int): Number of session events. + location (str): IP address of the user client connecting to the array or console if connected through local console. + method (str): Method by which the user attempted to log in. Valid values include `API token`, `password`, `ssh certificate`, and `public key`. + start_time (int): Date and time the user logged in to the Purity//FB interface in milliseconds since UNIX epoch. + user (str): Username of the Purity//FB user who triggered the user session event. + user_interface (str): The user interface through which the user session event was performed. Valid values include `CLI`, `GUI`, and `REST`. + identifying_details (str): Additional details, depending on the authentication method used, which are necessary to uniquely identify who authenticated as a user. `null` if no additional details are needed. + """ + if name is not None: + self.name = name + if id is not None: + self.id = id + if end_time is not None: + self.end_time = end_time + if event is not None: + self.event = event + if event_count is not None: + self.event_count = event_count + if location is not None: + self.location = location + if method is not None: + self.method = method + if start_time is not None: + self.start_time = start_time + if user is not None: + self.user = user + if user_interface is not None: + self.user_interface = user_interface + if identifying_details is not None: + self.identifying_details = identifying_details + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `Session`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(Session, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, Session): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/session_get_response.py b/pypureclient/flashblade/FB_2_14/models/session_get_response.py new file mode 100644 index 000000000..82583eae1 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/session_get_response.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class SessionGetResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'continuation_token': 'str', + 'total_item_count': 'int', + 'items': 'list[Session]' + } + + attribute_map = { + 'continuation_token': 'continuation_token', + 'total_item_count': 'total_item_count', + 'items': 'items' + } + + required_args = { + } + + def __init__( + self, + continuation_token=None, # type: str + total_item_count=None, # type: int + items=None, # type: List[models.Session] + ): + """ + Keyword args: + continuation_token (str): Continuation token that can be provided in the `continuation_token` query param to get the next page of data. If you use the `continuation_token` to page through data you are guaranteed to get all items exactly once regardless of how items are modified. If an item is added or deleted during the pagination then it may or may not be returned. The `continuation_token` is generated if the `limit` is less than the remaining number of items, and the default sort is used (no sort is specified). + total_item_count (int): Total number of items after applying `filter` params. + items (list[Session]) + """ + if continuation_token is not None: + self.continuation_token = continuation_token + if total_item_count is not None: + self.total_item_count = total_item_count + if items is not None: + self.items = items + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `SessionGetResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(SessionGetResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, SessionGetResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/smb.py b/pypureclient/flashblade/FB_2_14/models/smb.py new file mode 100644 index 000000000..ee0d42338 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/smb.py @@ -0,0 +1,129 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class Smb(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'enabled': 'bool', + 'client_policy': 'ReferenceWritable', + 'share_policy': 'ReferenceWritable', + 'continuous_availability_enabled': 'bool' + } + + attribute_map = { + 'enabled': 'enabled', + 'client_policy': 'client_policy', + 'share_policy': 'share_policy', + 'continuous_availability_enabled': 'continuous_availability_enabled' + } + + required_args = { + } + + def __init__( + self, + enabled=None, # type: bool + client_policy=None, # type: models.ReferenceWritable + share_policy=None, # type: models.ReferenceWritable + continuous_availability_enabled=None, # type: bool + ): + """ + Keyword args: + enabled (bool): If set to `true`, enables access to the file system over the SMB protocol. If not specified, defaults to `false`. + client_policy (ReferenceWritable): The SMB Client policy for the file system. Setting a policy here grants access permissions (e.g. read-only or read-write) to the file system via SMB on a per-client basis. If no policy is set here, no client will have access. Use \"\" to clear. + share_policy (ReferenceWritable): The SMB Share policy for the file system. Setting a policy here grants access permissions (e.g. allow or deny Full Control, Change, and/or Read) to the file system via SMB on a per-user / per-group basis. If no policy is set here, no user or group will have access. Use \"\" to clear. + continuous_availability_enabled (bool): If set to `true`, the file system will be continuously available during disruptive scenarios such as network disruption, blades failover, etc. If not specified, defaults to `true`. + """ + if enabled is not None: + self.enabled = enabled + if client_policy is not None: + self.client_policy = client_policy + if share_policy is not None: + self.share_policy = share_policy + if continuous_availability_enabled is not None: + self.continuous_availability_enabled = continuous_availability_enabled + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `Smb`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(Smb, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, Smb): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/smb_client_policy.py b/pypureclient/flashblade/FB_2_14/models/smb_client_policy.py new file mode 100644 index 000000000..bb94ffc3a --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/smb_client_policy.py @@ -0,0 +1,153 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class SmbClientPolicy(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'name': 'str', + 'id': 'str', + 'enabled': 'bool', + 'is_local': 'bool', + 'location': 'FixedReference', + 'policy_type': 'str', + 'version': 'str', + 'rules': 'list[SmbClientPolicyRuleInPolicy]' + } + + attribute_map = { + 'name': 'name', + 'id': 'id', + 'enabled': 'enabled', + 'is_local': 'is_local', + 'location': 'location', + 'policy_type': 'policy_type', + 'version': 'version', + 'rules': 'rules' + } + + required_args = { + } + + def __init__( + self, + name=None, # type: str + id=None, # type: str + enabled=None, # type: bool + is_local=None, # type: bool + location=None, # type: models.FixedReference + policy_type=None, # type: str + version=None, # type: str + rules=None, # type: List[models.SmbClientPolicyRuleInPolicy] + ): + """ + Keyword args: + name (str): A name chosen by the user. Can be changed. Must be locally unique. + id (str): A non-modifiable, globally unique ID chosen by the system. + enabled (bool): If `true`, the policy is enabled. If not specified, defaults to `true`. + is_local (bool): Whether the policy is defined on the local array. + location (FixedReference): Reference to the array where the policy is defined. + policy_type (str): Type of the policy. Valid values are `audit`, `bucket-access`, `cross-origin-resource-sharing`, `network-access`, `nfs`, `object-access`, `smb-client`, `smb-share`, and `snapshot`. + version (str): A hash of the other properties of this resource. This can be used when updating the resource to ensure there aren't any updates since the resource was read. + rules (list[SmbClientPolicyRuleInPolicy]): All of the rules that are part of this policy. The order is the evaluation order. + """ + if name is not None: + self.name = name + if id is not None: + self.id = id + if enabled is not None: + self.enabled = enabled + if is_local is not None: + self.is_local = is_local + if location is not None: + self.location = location + if policy_type is not None: + self.policy_type = policy_type + if version is not None: + self.version = version + if rules is not None: + self.rules = rules + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `SmbClientPolicy`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(SmbClientPolicy, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, SmbClientPolicy): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/smb_client_policy_get_response.py b/pypureclient/flashblade/FB_2_14/models/smb_client_policy_get_response.py new file mode 100644 index 000000000..110e0fd36 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/smb_client_policy_get_response.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class SmbClientPolicyGetResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'continuation_token': 'str', + 'total_item_count': 'int', + 'items': 'list[SmbClientPolicy]' + } + + attribute_map = { + 'continuation_token': 'continuation_token', + 'total_item_count': 'total_item_count', + 'items': 'items' + } + + required_args = { + } + + def __init__( + self, + continuation_token=None, # type: str + total_item_count=None, # type: int + items=None, # type: List[models.SmbClientPolicy] + ): + """ + Keyword args: + continuation_token (str): Continuation token that can be provided in the `continuation_token` query param to get the next page of data. If you use the `continuation_token` to page through data you are guaranteed to get all items exactly once regardless of how items are modified. If an item is added or deleted during the pagination then it may or may not be returned. The `continuation_token` is generated if the `limit` is less than the remaining number of items, and the default sort is used (no sort is specified). + total_item_count (int): Total number of items after applying `filter` params. + items (list[SmbClientPolicy]): A list of SMB Client policy objects. + """ + if continuation_token is not None: + self.continuation_token = continuation_token + if total_item_count is not None: + self.total_item_count = total_item_count + if items is not None: + self.items = items + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `SmbClientPolicyGetResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(SmbClientPolicyGetResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, SmbClientPolicyGetResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/smb_client_policy_post.py b/pypureclient/flashblade/FB_2_14/models/smb_client_policy_post.py new file mode 100644 index 000000000..28ccaa01b --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/smb_client_policy_post.py @@ -0,0 +1,147 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class SmbClientPolicyPost(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'name': 'str', + 'id': 'str', + 'enabled': 'bool', + 'is_local': 'bool', + 'location': 'FixedReference', + 'policy_type': 'str', + 'rules': 'list[SmbClientPolicyRulePostInPolicy]' + } + + attribute_map = { + 'name': 'name', + 'id': 'id', + 'enabled': 'enabled', + 'is_local': 'is_local', + 'location': 'location', + 'policy_type': 'policy_type', + 'rules': 'rules' + } + + required_args = { + } + + def __init__( + self, + name=None, # type: str + id=None, # type: str + enabled=None, # type: bool + is_local=None, # type: bool + location=None, # type: models.FixedReference + policy_type=None, # type: str + rules=None, # type: List[models.SmbClientPolicyRulePostInPolicy] + ): + """ + Keyword args: + name (str): Name of the object (e.g., a file system or snapshot). + id (str): A non-modifiable, globally unique ID chosen by the system. + enabled (bool): If `true`, the policy is enabled. If not specified, defaults to `true`. + is_local (bool): Whether the policy is defined on the local array. + location (FixedReference): Reference to the array where the policy is defined. + policy_type (str): Type of the policy. Valid values are `audit`, `bucket-access`, `cross-origin-resource-sharing`, `network-access`, `nfs`, `object-access`, `smb-client`, `smb-share`, and `snapshot`. + rules (list[SmbClientPolicyRulePostInPolicy]): All of the rules that are part of this policy. The order is the evaluation order. + """ + if name is not None: + self.name = name + if id is not None: + self.id = id + if enabled is not None: + self.enabled = enabled + if is_local is not None: + self.is_local = is_local + if location is not None: + self.location = location + if policy_type is not None: + self.policy_type = policy_type + if rules is not None: + self.rules = rules + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `SmbClientPolicyPost`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(SmbClientPolicyPost, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, SmbClientPolicyPost): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/smb_client_policy_response.py b/pypureclient/flashblade/FB_2_14/models/smb_client_policy_response.py new file mode 100644 index 000000000..c0966dd74 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/smb_client_policy_response.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class SmbClientPolicyResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'items': 'list[SmbClientPolicy]' + } + + attribute_map = { + 'items': 'items' + } + + required_args = { + } + + def __init__( + self, + items=None, # type: List[models.SmbClientPolicy] + ): + """ + Keyword args: + items (list[SmbClientPolicy]): A list of SMB Client policy objects. + """ + if items is not None: + self.items = items + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `SmbClientPolicyResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(SmbClientPolicyResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, SmbClientPolicyResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/smb_client_policy_rule.py b/pypureclient/flashblade/FB_2_14/models/smb_client_policy_rule.py new file mode 100644 index 000000000..2f2f4f3e2 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/smb_client_policy_rule.py @@ -0,0 +1,153 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class SmbClientPolicyRule(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'name': 'str', + 'id': 'str', + 'client': 'str', + 'permission': 'str', + 'policy': 'FixedReference', + 'policy_version': 'str', + 'encryption': 'str', + 'index': 'int' + } + + attribute_map = { + 'name': 'name', + 'id': 'id', + 'client': 'client', + 'permission': 'permission', + 'policy': 'policy', + 'policy_version': 'policy_version', + 'encryption': 'encryption', + 'index': 'index' + } + + required_args = { + } + + def __init__( + self, + name=None, # type: str + id=None, # type: str + client=None, # type: str + permission=None, # type: str + policy=None, # type: models.FixedReference + policy_version=None, # type: str + encryption=None, # type: str + index=None, # type: int + ): + """ + Keyword args: + name (str): Name of the object (e.g., a file system or snapshot). + id (str): A non-modifiable, globally unique ID chosen by the system. + client (str): Specifies the clients that will be permitted to access the export. Accepted notation is a single IP address, subnet in CIDR notation, or anonymous (`*`). + permission (str): Specifies which read-write client access permissions are allowed for the export. Valid values are `rw` and `ro`. + policy (FixedReference): The policy to which this rule belongs. + policy_version (str): The policy's version. This can be used when updating the resource to ensure there aren't any updates to the policy since the resource was read. + encryption (str): Specifies whether the remote client is required to use SMB encryption. Valid values are `required`, `disabled`, and `optional`. + index (int): The index within the policy. The `index` indicates the order the rules are evaluated. NOTE: It is recommended to use the query param `before_rule_id` to do reordering to avoid concurrency issues, but changing `index` is also supported. `index` can not be changed if `before_rule_id` or `before_rule_name` are specified. + """ + if name is not None: + self.name = name + if id is not None: + self.id = id + if client is not None: + self.client = client + if permission is not None: + self.permission = permission + if policy is not None: + self.policy = policy + if policy_version is not None: + self.policy_version = policy_version + if encryption is not None: + self.encryption = encryption + if index is not None: + self.index = index + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `SmbClientPolicyRule`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(SmbClientPolicyRule, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, SmbClientPolicyRule): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/smb_client_policy_rule_base.py b/pypureclient/flashblade/FB_2_14/models/smb_client_policy_rule_base.py new file mode 100644 index 000000000..146a4f142 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/smb_client_policy_rule_base.py @@ -0,0 +1,147 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class SmbClientPolicyRuleBase(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'name': 'str', + 'id': 'str', + 'client': 'str', + 'permission': 'str', + 'policy': 'FixedReference', + 'policy_version': 'str', + 'encryption': 'str' + } + + attribute_map = { + 'name': 'name', + 'id': 'id', + 'client': 'client', + 'permission': 'permission', + 'policy': 'policy', + 'policy_version': 'policy_version', + 'encryption': 'encryption' + } + + required_args = { + } + + def __init__( + self, + name=None, # type: str + id=None, # type: str + client=None, # type: str + permission=None, # type: str + policy=None, # type: models.FixedReference + policy_version=None, # type: str + encryption=None, # type: str + ): + """ + Keyword args: + name (str): Name of the object (e.g., a file system or snapshot). + id (str): A non-modifiable, globally unique ID chosen by the system. + client (str): Specifies the clients that will be permitted to access the export. Accepted notation is a single IP address, subnet in CIDR notation, or anonymous (`*`). + permission (str): Specifies which read-write client access permissions are allowed for the export. Valid values are `rw` and `ro`. + policy (FixedReference): The policy to which this rule belongs. + policy_version (str): The policy's version. This can be used when updating the resource to ensure there aren't any updates to the policy since the resource was read. + encryption (str): Specifies whether the remote client is required to use SMB encryption. Valid values are `required`, `disabled`, and `optional`. + """ + if name is not None: + self.name = name + if id is not None: + self.id = id + if client is not None: + self.client = client + if permission is not None: + self.permission = permission + if policy is not None: + self.policy = policy + if policy_version is not None: + self.policy_version = policy_version + if encryption is not None: + self.encryption = encryption + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `SmbClientPolicyRuleBase`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(SmbClientPolicyRuleBase, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, SmbClientPolicyRuleBase): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/smb_client_policy_rule_get_response.py b/pypureclient/flashblade/FB_2_14/models/smb_client_policy_rule_get_response.py new file mode 100644 index 000000000..c9d6229e3 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/smb_client_policy_rule_get_response.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class SmbClientPolicyRuleGetResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'continuation_token': 'str', + 'total_item_count': 'int', + 'items': 'list[SmbClientPolicyRule]' + } + + attribute_map = { + 'continuation_token': 'continuation_token', + 'total_item_count': 'total_item_count', + 'items': 'items' + } + + required_args = { + } + + def __init__( + self, + continuation_token=None, # type: str + total_item_count=None, # type: int + items=None, # type: List[models.SmbClientPolicyRule] + ): + """ + Keyword args: + continuation_token (str): Continuation token that can be provided in the `continuation_token` query param to get the next page of data. If you use the `continuation_token` to page through data you are guaranteed to get all items exactly once regardless of how items are modified. If an item is added or deleted during the pagination then it may or may not be returned. The `continuation_token` is generated if the `limit` is less than the remaining number of items, and the default sort is used (no sort is specified). + total_item_count (int): Total number of items after applying `filter` params. + items (list[SmbClientPolicyRule]) + """ + if continuation_token is not None: + self.continuation_token = continuation_token + if total_item_count is not None: + self.total_item_count = total_item_count + if items is not None: + self.items = items + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `SmbClientPolicyRuleGetResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(SmbClientPolicyRuleGetResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, SmbClientPolicyRuleGetResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/smb_client_policy_rule_in_policy.py b/pypureclient/flashblade/FB_2_14/models/smb_client_policy_rule_in_policy.py new file mode 100644 index 000000000..0d159b9fc --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/smb_client_policy_rule_in_policy.py @@ -0,0 +1,153 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class SmbClientPolicyRuleInPolicy(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'name': 'str', + 'id': 'str', + 'client': 'str', + 'permission': 'str', + 'policy': 'FixedReference', + 'policy_version': 'str', + 'encryption': 'str', + 'index': 'int' + } + + attribute_map = { + 'name': 'name', + 'id': 'id', + 'client': 'client', + 'permission': 'permission', + 'policy': 'policy', + 'policy_version': 'policy_version', + 'encryption': 'encryption', + 'index': 'index' + } + + required_args = { + } + + def __init__( + self, + name=None, # type: str + id=None, # type: str + client=None, # type: str + permission=None, # type: str + policy=None, # type: models.FixedReference + policy_version=None, # type: str + encryption=None, # type: str + index=None, # type: int + ): + """ + Keyword args: + name (str): Name of the object (e.g., a file system or snapshot). + id (str): A non-modifiable, globally unique ID chosen by the system. + client (str): Specifies the clients that will be permitted to access the export. Accepted notation is a single IP address, subnet in CIDR notation, or anonymous (`*`). + permission (str): Specifies which read-write client access permissions are allowed for the export. Valid values are `rw` and `ro`. + policy (FixedReference): The policy to which this rule belongs. + policy_version (str): The policy's version. This can be used when updating the resource to ensure there aren't any updates to the policy since the resource was read. + encryption (str): Specifies whether the remote client is required to use SMB encryption. Valid values are `required`, `disabled`, and `optional`. + index (int): The index within the policy. The `index` indicates the order the rules are evaluated. + """ + if name is not None: + self.name = name + if id is not None: + self.id = id + if client is not None: + self.client = client + if permission is not None: + self.permission = permission + if policy is not None: + self.policy = policy + if policy_version is not None: + self.policy_version = policy_version + if encryption is not None: + self.encryption = encryption + if index is not None: + self.index = index + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `SmbClientPolicyRuleInPolicy`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(SmbClientPolicyRuleInPolicy, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, SmbClientPolicyRuleInPolicy): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/smb_client_policy_rule_post.py b/pypureclient/flashblade/FB_2_14/models/smb_client_policy_rule_post.py new file mode 100644 index 000000000..d50ee0861 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/smb_client_policy_rule_post.py @@ -0,0 +1,141 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class SmbClientPolicyRulePost(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'name': 'str', + 'id': 'str', + 'client': 'str', + 'permission': 'str', + 'encryption': 'str', + 'index': 'int' + } + + attribute_map = { + 'name': 'name', + 'id': 'id', + 'client': 'client', + 'permission': 'permission', + 'encryption': 'encryption', + 'index': 'index' + } + + required_args = { + } + + def __init__( + self, + name=None, # type: str + id=None, # type: str + client=None, # type: str + permission=None, # type: str + encryption=None, # type: str + index=None, # type: int + ): + """ + Keyword args: + name (str): Name of the object (e.g., a file system or snapshot). + id (str): A non-modifiable, globally unique ID chosen by the system. + client (str): Specifies the clients that will be permitted to access the export. Accepted notation is a single IP address, subnet in CIDR notation, or anonymous (`*`). The default is `*` if not specified. + permission (str): Specifies which read-write client access permissions are allowed for the export. Valid values are `rw` and `ro`. The default is `ro` if not specified. + encryption (str): Specifies whether the remote client is required to use SMB encryption. Valid values are `required`, `disabled`, and `optional`. If not specified, defaults to `optional`. + index (int): The index within the policy. The `index` indicates the order the rules are evaluated. NOTE: It is recommended to use the query param `before_rule_id` to do reordering to avoid concurrency issues, but changing `index` is also supported. `index` can not be changed if `before_rule_id` or `before_rule_name` are specified. + """ + if name is not None: + self.name = name + if id is not None: + self.id = id + if client is not None: + self.client = client + if permission is not None: + self.permission = permission + if encryption is not None: + self.encryption = encryption + if index is not None: + self.index = index + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `SmbClientPolicyRulePost`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(SmbClientPolicyRulePost, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, SmbClientPolicyRulePost): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/smb_client_policy_rule_post_base.py b/pypureclient/flashblade/FB_2_14/models/smb_client_policy_rule_post_base.py new file mode 100644 index 000000000..708cd1622 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/smb_client_policy_rule_post_base.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class SmbClientPolicyRulePostBase(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'name': 'str', + 'id': 'str', + 'client': 'str', + 'permission': 'str', + 'encryption': 'str' + } + + attribute_map = { + 'name': 'name', + 'id': 'id', + 'client': 'client', + 'permission': 'permission', + 'encryption': 'encryption' + } + + required_args = { + } + + def __init__( + self, + name=None, # type: str + id=None, # type: str + client=None, # type: str + permission=None, # type: str + encryption=None, # type: str + ): + """ + Keyword args: + name (str): Name of the object (e.g., a file system or snapshot). + id (str): A non-modifiable, globally unique ID chosen by the system. + client (str): Specifies the clients that will be permitted to access the export. Accepted notation is a single IP address, subnet in CIDR notation, or anonymous (`*`). The default is `*` if not specified. + permission (str): Specifies which read-write client access permissions are allowed for the export. Valid values are `rw` and `ro`. The default is `ro` if not specified. + encryption (str): Specifies whether the remote client is required to use SMB encryption. Valid values are `required`, `disabled`, and `optional`. If not specified, defaults to `optional`. + """ + if name is not None: + self.name = name + if id is not None: + self.id = id + if client is not None: + self.client = client + if permission is not None: + self.permission = permission + if encryption is not None: + self.encryption = encryption + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `SmbClientPolicyRulePostBase`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(SmbClientPolicyRulePostBase, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, SmbClientPolicyRulePostBase): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/smb_client_policy_rule_post_in_policy.py b/pypureclient/flashblade/FB_2_14/models/smb_client_policy_rule_post_in_policy.py new file mode 100644 index 000000000..94bb54d4d --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/smb_client_policy_rule_post_in_policy.py @@ -0,0 +1,141 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class SmbClientPolicyRulePostInPolicy(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'name': 'str', + 'id': 'str', + 'client': 'str', + 'permission': 'str', + 'encryption': 'str', + 'index': 'int' + } + + attribute_map = { + 'name': 'name', + 'id': 'id', + 'client': 'client', + 'permission': 'permission', + 'encryption': 'encryption', + 'index': 'index' + } + + required_args = { + } + + def __init__( + self, + name=None, # type: str + id=None, # type: str + client=None, # type: str + permission=None, # type: str + encryption=None, # type: str + index=None, # type: int + ): + """ + Keyword args: + name (str): Name of the object (e.g., a file system or snapshot). + id (str): A non-modifiable, globally unique ID chosen by the system. + client (str): Specifies the clients that will be permitted to access the export. Accepted notation is a single IP address, subnet in CIDR notation, or anonymous (`*`). The default is `*` if not specified. + permission (str): Specifies which read-write client access permissions are allowed for the export. Valid values are `rw` and `ro`. The default is `ro` if not specified. + encryption (str): Specifies whether the remote client is required to use SMB encryption. Valid values are `required`, `disabled`, and `optional`. If not specified, defaults to `optional`. + index (int): The index within the policy. The `index` indicates the order the rules are evaluated. + """ + if name is not None: + self.name = name + if id is not None: + self.id = id + if client is not None: + self.client = client + if permission is not None: + self.permission = permission + if encryption is not None: + self.encryption = encryption + if index is not None: + self.index = index + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `SmbClientPolicyRulePostInPolicy`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(SmbClientPolicyRulePostInPolicy, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, SmbClientPolicyRulePostInPolicy): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/smb_client_policy_rule_response.py b/pypureclient/flashblade/FB_2_14/models/smb_client_policy_rule_response.py new file mode 100644 index 000000000..ef96f3af6 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/smb_client_policy_rule_response.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class SmbClientPolicyRuleResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'items': 'list[SmbClientPolicyRule]' + } + + attribute_map = { + 'items': 'items' + } + + required_args = { + } + + def __init__( + self, + items=None, # type: List[models.SmbClientPolicyRule] + ): + """ + Keyword args: + items (list[SmbClientPolicyRule]) + """ + if items is not None: + self.items = items + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `SmbClientPolicyRuleResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(SmbClientPolicyRuleResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, SmbClientPolicyRuleResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/smb_post.py b/pypureclient/flashblade/FB_2_14/models/smb_post.py new file mode 100644 index 000000000..4b8145683 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/smb_post.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class SmbPost(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'enabled': 'bool', + 'client_policy': 'ReferenceWritable', + 'share_policy': 'ReferenceWritable' + } + + attribute_map = { + 'enabled': 'enabled', + 'client_policy': 'client_policy', + 'share_policy': 'share_policy' + } + + required_args = { + } + + def __init__( + self, + enabled=None, # type: bool + client_policy=None, # type: models.ReferenceWritable + share_policy=None, # type: models.ReferenceWritable + ): + """ + Keyword args: + enabled (bool): If set to `true`, enables access to the file system over the SMB protocol. If not specified, defaults to `false`. + client_policy (ReferenceWritable): The SMB Client policy for the file system. Setting a policy here grants access permissions (e.g. read-only or read-write) to the file system via SMB on a per-client basis. If no policy is set here, no client will have access. Use \"\" to clear. + share_policy (ReferenceWritable): The SMB Share policy for the file system. Setting a policy here grants access permissions (e.g. allow or deny Full Control, Change, and/or Read) to the file system via SMB on a per-user / per-group basis. If no policy is set here, no user or group will have access. Use \"\" to clear. + """ + if enabled is not None: + self.enabled = enabled + if client_policy is not None: + self.client_policy = client_policy + if share_policy is not None: + self.share_policy = share_policy + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `SmbPost`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(SmbPost, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, SmbPost): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/smb_share_policy.py b/pypureclient/flashblade/FB_2_14/models/smb_share_policy.py new file mode 100644 index 000000000..17c5bc779 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/smb_share_policy.py @@ -0,0 +1,147 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class SmbSharePolicy(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'name': 'str', + 'id': 'str', + 'enabled': 'bool', + 'is_local': 'bool', + 'location': 'FixedReference', + 'policy_type': 'str', + 'rules': 'list[SmbSharePolicyRule]' + } + + attribute_map = { + 'name': 'name', + 'id': 'id', + 'enabled': 'enabled', + 'is_local': 'is_local', + 'location': 'location', + 'policy_type': 'policy_type', + 'rules': 'rules' + } + + required_args = { + } + + def __init__( + self, + name=None, # type: str + id=None, # type: str + enabled=None, # type: bool + is_local=None, # type: bool + location=None, # type: models.FixedReference + policy_type=None, # type: str + rules=None, # type: List[models.SmbSharePolicyRule] + ): + """ + Keyword args: + name (str): A name chosen by the user. Can be changed. Must be locally unique. + id (str): A non-modifiable, globally unique ID chosen by the system. + enabled (bool): If `true`, the policy is enabled. If not specified, defaults to `true`. + is_local (bool): Whether the policy is defined on the local array. + location (FixedReference): Reference to the array where the policy is defined. + policy_type (str): Type of the policy. Valid values are `audit`, `bucket-access`, `cross-origin-resource-sharing`, `network-access`, `nfs`, `object-access`, `smb-client`, `smb-share`, and `snapshot`. + rules (list[SmbSharePolicyRule]): All of the rules that are part of this policy. + """ + if name is not None: + self.name = name + if id is not None: + self.id = id + if enabled is not None: + self.enabled = enabled + if is_local is not None: + self.is_local = is_local + if location is not None: + self.location = location + if policy_type is not None: + self.policy_type = policy_type + if rules is not None: + self.rules = rules + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `SmbSharePolicy`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(SmbSharePolicy, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, SmbSharePolicy): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/smb_share_policy_get_response.py b/pypureclient/flashblade/FB_2_14/models/smb_share_policy_get_response.py new file mode 100644 index 000000000..47dde5d1d --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/smb_share_policy_get_response.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class SmbSharePolicyGetResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'continuation_token': 'str', + 'total_item_count': 'int', + 'items': 'list[SmbSharePolicy]' + } + + attribute_map = { + 'continuation_token': 'continuation_token', + 'total_item_count': 'total_item_count', + 'items': 'items' + } + + required_args = { + } + + def __init__( + self, + continuation_token=None, # type: str + total_item_count=None, # type: int + items=None, # type: List[models.SmbSharePolicy] + ): + """ + Keyword args: + continuation_token (str): Continuation token that can be provided in the `continuation_token` query param to get the next page of data. If you use the `continuation_token` to page through data you are guaranteed to get all items exactly once regardless of how items are modified. If an item is added or deleted during the pagination then it may or may not be returned. The `continuation_token` is generated if the `limit` is less than the remaining number of items, and the default sort is used (no sort is specified). + total_item_count (int): Total number of items after applying `filter` params. + items (list[SmbSharePolicy]): A list of SMB Share policy objects. + """ + if continuation_token is not None: + self.continuation_token = continuation_token + if total_item_count is not None: + self.total_item_count = total_item_count + if items is not None: + self.items = items + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `SmbSharePolicyGetResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(SmbSharePolicyGetResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, SmbSharePolicyGetResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/smb_share_policy_post.py b/pypureclient/flashblade/FB_2_14/models/smb_share_policy_post.py new file mode 100644 index 000000000..2e8c83a02 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/smb_share_policy_post.py @@ -0,0 +1,147 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class SmbSharePolicyPost(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'name': 'str', + 'id': 'str', + 'enabled': 'bool', + 'is_local': 'bool', + 'location': 'FixedReference', + 'policy_type': 'str', + 'rules': 'list[SmbSharePolicyRulePost]' + } + + attribute_map = { + 'name': 'name', + 'id': 'id', + 'enabled': 'enabled', + 'is_local': 'is_local', + 'location': 'location', + 'policy_type': 'policy_type', + 'rules': 'rules' + } + + required_args = { + } + + def __init__( + self, + name=None, # type: str + id=None, # type: str + enabled=None, # type: bool + is_local=None, # type: bool + location=None, # type: models.FixedReference + policy_type=None, # type: str + rules=None, # type: List[models.SmbSharePolicyRulePost] + ): + """ + Keyword args: + name (str): Name of the object (e.g., a file system or snapshot). + id (str): A non-modifiable, globally unique ID chosen by the system. + enabled (bool): If `true`, the policy is enabled. If not specified, defaults to `true`. + is_local (bool): Whether the policy is defined on the local array. + location (FixedReference): Reference to the array where the policy is defined. + policy_type (str): Type of the policy. Valid values are `audit`, `bucket-access`, `cross-origin-resource-sharing`, `network-access`, `nfs`, `object-access`, `smb-client`, `smb-share`, and `snapshot`. + rules (list[SmbSharePolicyRulePost]): All of the rules that are part of this policy. + """ + if name is not None: + self.name = name + if id is not None: + self.id = id + if enabled is not None: + self.enabled = enabled + if is_local is not None: + self.is_local = is_local + if location is not None: + self.location = location + if policy_type is not None: + self.policy_type = policy_type + if rules is not None: + self.rules = rules + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `SmbSharePolicyPost`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(SmbSharePolicyPost, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, SmbSharePolicyPost): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/smb_share_policy_response.py b/pypureclient/flashblade/FB_2_14/models/smb_share_policy_response.py new file mode 100644 index 000000000..4ab5b1a34 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/smb_share_policy_response.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class SmbSharePolicyResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'items': 'list[SmbSharePolicy]' + } + + attribute_map = { + 'items': 'items' + } + + required_args = { + } + + def __init__( + self, + items=None, # type: List[models.SmbSharePolicy] + ): + """ + Keyword args: + items (list[SmbSharePolicy]): A list of SMB Share policy objects. + """ + if items is not None: + self.items = items + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `SmbSharePolicyResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(SmbSharePolicyResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, SmbSharePolicyResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/smb_share_policy_rule.py b/pypureclient/flashblade/FB_2_14/models/smb_share_policy_rule.py new file mode 100644 index 000000000..c93e02891 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/smb_share_policy_rule.py @@ -0,0 +1,147 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class SmbSharePolicyRule(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'name': 'str', + 'id': 'str', + 'change': 'str', + 'full_control': 'str', + 'policy': 'FixedReference', + 'principal': 'str', + 'read': 'str' + } + + attribute_map = { + 'name': 'name', + 'id': 'id', + 'change': 'change', + 'full_control': 'full_control', + 'policy': 'policy', + 'principal': 'principal', + 'read': 'read' + } + + required_args = { + } + + def __init__( + self, + name=None, # type: str + id=None, # type: str + change=None, # type: str + full_control=None, # type: str + policy=None, # type: models.FixedReference + principal=None, # type: str + read=None, # type: str + ): + """ + Keyword args: + name (str): Name of the object (e.g., a file system or snapshot). + id (str): A non-modifiable, globally unique ID chosen by the system. + change (str): The state of the principal's Change access permission. Valid values are `allow` and `deny`. When not set, value is `null`. When allowed, includes all access granted by the Read permission. Users can also change data within files and add or delete files and folders. When denied, these operations are explicitly blocked. If not set for any applicable rule on any applicable policy, acts as an implicit deny. If set to `allow`, implicitly sets the Read permission to `allow`. This is incompatible with explicitly setting any permission to `deny`. If set to `deny`, implicitly sets the Read permission to `deny`, and clears the Full Control permission if it is currently `allow`. This is incompatible with explicitly setting any permission to `allow`. If set to an empty string (`\"\"`), the value (and implicitly the Full Control permission) will be cleared. This is incompatible with explicitly setting the Full Control permission to `allow` or `deny`. + full_control (str): The state of the principal's Full Control access permission. Valid values are `allow` and `deny`. When not set, value is `null`. When allowed, includes all access granted by the Change permission. Users can also change the permissions for files and folders. When denied, these operations are explicitly blocked. If not set for any applicable rule on any applicable policy, acts as an implicit deny. If set to `allow`, implicitly sets the Change and Read permissions to `allow`. This is incompatible with explicitly setting any permission to `deny`. If set to `deny`, implicitly sets the Change and Read permissions to `deny`. This is incompatible with explicitly setting any permission to `allow`. If set to an empty string (`\"\"`), the value will be cleared. + policy (FixedReference): The policy to which this rule belongs. + principal (str): The user or group who is the subject of this rule, and their domain. If modifying this value, providing the domain is optional. If no domain is provided, it will be derived if possible. For example, `PURESTORAGE\\Administrator`, `samplegroup@PureStorage`, or `sampleuser`. + read (str): The state of the principal's Read access permission. Valid values are `allow` and `deny`. When allowed, users can view file names, read the data in those files, and run some programs. When denied, these operations are explicitly blocked. If set to `allow`, implicitly clears the Full Control and Change permissions if they are currently `deny`. This is incompatible with explicitly setting any permission to `deny`. If set to `deny`, implicitly clears the Full Control and Change permissions if they are currently `allow`. This is incompatible with explicitly setting any permission to `allow`. + """ + if name is not None: + self.name = name + if id is not None: + self.id = id + if change is not None: + self.change = change + if full_control is not None: + self.full_control = full_control + if policy is not None: + self.policy = policy + if principal is not None: + self.principal = principal + if read is not None: + self.read = read + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `SmbSharePolicyRule`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(SmbSharePolicyRule, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, SmbSharePolicyRule): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/smb_share_policy_rule_get_response.py b/pypureclient/flashblade/FB_2_14/models/smb_share_policy_rule_get_response.py new file mode 100644 index 000000000..8bdf26744 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/smb_share_policy_rule_get_response.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class SmbSharePolicyRuleGetResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'continuation_token': 'str', + 'total_item_count': 'int', + 'items': 'list[SmbSharePolicyRule]' + } + + attribute_map = { + 'continuation_token': 'continuation_token', + 'total_item_count': 'total_item_count', + 'items': 'items' + } + + required_args = { + } + + def __init__( + self, + continuation_token=None, # type: str + total_item_count=None, # type: int + items=None, # type: List[models.SmbSharePolicyRule] + ): + """ + Keyword args: + continuation_token (str): Continuation token that can be provided in the `continuation_token` query param to get the next page of data. If you use the `continuation_token` to page through data you are guaranteed to get all items exactly once regardless of how items are modified. If an item is added or deleted during the pagination then it may or may not be returned. The `continuation_token` is generated if the `limit` is less than the remaining number of items, and the default sort is used (no sort is specified). + total_item_count (int): Total number of items after applying `filter` params. + items (list[SmbSharePolicyRule]): A list of SMB Share policy rule objects. + """ + if continuation_token is not None: + self.continuation_token = continuation_token + if total_item_count is not None: + self.total_item_count = total_item_count + if items is not None: + self.items = items + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `SmbSharePolicyRuleGetResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(SmbSharePolicyRuleGetResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, SmbSharePolicyRuleGetResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/smb_share_policy_rule_post.py b/pypureclient/flashblade/FB_2_14/models/smb_share_policy_rule_post.py new file mode 100644 index 000000000..a99d9719c --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/smb_share_policy_rule_post.py @@ -0,0 +1,141 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class SmbSharePolicyRulePost(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'name': 'str', + 'id': 'str', + 'change': 'str', + 'full_control': 'str', + 'principal': 'str', + 'read': 'str' + } + + attribute_map = { + 'name': 'name', + 'id': 'id', + 'change': 'change', + 'full_control': 'full_control', + 'principal': 'principal', + 'read': 'read' + } + + required_args = { + } + + def __init__( + self, + name=None, # type: str + id=None, # type: str + change=None, # type: str + full_control=None, # type: str + principal=None, # type: str + read=None, # type: str + ): + """ + Keyword args: + name (str): Name of the object (e.g., a file system or snapshot). + id (str): A non-modifiable, globally unique ID chosen by the system. + change (str): The state of the principal's Change access permission. Valid values are `allow` and `deny`. When not set, value is `null`. When allowed, includes all access granted by the Read permission. Users can also change data within files and add or delete files and folders. When denied, these operations are explicitly blocked. If not set for any applicable rule on any applicable policy, acts as an implicit deny. If set to `allow`, implicitly sets the Read permission to `allow`. This is incompatible with explicitly setting any permission to `deny`. If set to `deny`, implicitly sets the Read permission to `deny`. This is incompatible with explicitly setting any permission to `allow`. Defaults to `null`. + full_control (str): The state of the principal's Full Control access permission. Valid values are `allow` and `deny`. When not set, value is `null`. When allowed, includes all access granted by the Change permission. Users can also change the permissions for files and folders. When denied, these operations are explicitly blocked. If not set for any applicable rule on any applicable policy, acts as an implicit deny. If set to `allow`, implicitly sets the Change and Read permissions to `allow`. This is incompatible with explicitly setting any permission to `deny`. If set to `deny`, implicitly sets the Change and Read permissions to `deny`. This is incompatible with explicitly setting any permission to `allow`. Defaults to `null`. + principal (str): The user or group who is the subject of this rule, and optionally their domain. If no domain is provided, it will be derived if possible. For example, `PURESTORAGE\\Administrator`, `samplegroup@PureStorage`, or `sampleuser`. + read (str): The state of the principal's Read access permission. Valid values are `allow` and `deny`. When allowed, users can view file names, read the data in those files, and run some programs. When denied, these operations are explicitly blocked. When setting to `allow`, cannot explicitly set any permission to `deny`. When setting to `deny`, cannot explicitly set any permission to `allow`. + """ + if name is not None: + self.name = name + if id is not None: + self.id = id + if change is not None: + self.change = change + if full_control is not None: + self.full_control = full_control + if principal is not None: + self.principal = principal + if read is not None: + self.read = read + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `SmbSharePolicyRulePost`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(SmbSharePolicyRulePost, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, SmbSharePolicyRulePost): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/smb_share_policy_rule_response.py b/pypureclient/flashblade/FB_2_14/models/smb_share_policy_rule_response.py new file mode 100644 index 000000000..a500c5b5e --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/smb_share_policy_rule_response.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class SmbSharePolicyRuleResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'items': 'list[SmbSharePolicyRule]' + } + + attribute_map = { + 'items': 'items' + } + + required_args = { + } + + def __init__( + self, + items=None, # type: List[models.SmbSharePolicyRule] + ): + """ + Keyword args: + items (list[SmbSharePolicyRule]): A list of SMB Share policy rule objects. + """ + if items is not None: + self.items = items + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `SmbSharePolicyRuleResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(SmbSharePolicyRuleResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, SmbSharePolicyRuleResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/smtp.py b/pypureclient/flashblade/FB_2_14/models/smtp.py new file mode 100644 index 000000000..a6abfd004 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/smtp.py @@ -0,0 +1,129 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class SMTP(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'name': 'str', + 'id': 'str', + 'relay_host': 'str', + 'sender_domain': 'str' + } + + attribute_map = { + 'name': 'name', + 'id': 'id', + 'relay_host': 'relay_host', + 'sender_domain': 'sender_domain' + } + + required_args = { + } + + def __init__( + self, + name=None, # type: str + id=None, # type: str + relay_host=None, # type: str + sender_domain=None, # type: str + ): + """ + Keyword args: + name (str): Name of the object (e.g., a file system or snapshot). + id (str): A non-modifiable, globally unique ID chosen by the system. + relay_host (str): Relay server used as a forwarding point for email sent from the array. Can be set as a hostname, IPv4 address, or IPv6 address, with optional port numbers. The expected format for IPv4 is `ddd.ddd.ddd.ddd:PORT`. The expected format for IPv6 is `xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx`, or if a port number is specified, `[xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx]:PORT`. + sender_domain (str): Domain name appended to alert email messages. + """ + if name is not None: + self.name = name + if id is not None: + self.id = id + if relay_host is not None: + self.relay_host = relay_host + if sender_domain is not None: + self.sender_domain = sender_domain + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `SMTP`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(SMTP, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, SMTP): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/smtp_server.py b/pypureclient/flashblade/FB_2_14/models/smtp_server.py new file mode 100644 index 000000000..3215583e2 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/smtp_server.py @@ -0,0 +1,129 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class SmtpServer(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'name': 'str', + 'id': 'str', + 'relay_host': 'str', + 'sender_domain': 'str' + } + + attribute_map = { + 'name': 'name', + 'id': 'id', + 'relay_host': 'relay_host', + 'sender_domain': 'sender_domain' + } + + required_args = { + } + + def __init__( + self, + name=None, # type: str + id=None, # type: str + relay_host=None, # type: str + sender_domain=None, # type: str + ): + """ + Keyword args: + name (str): Name of the object (e.g., a file system or snapshot). + id (str): A non-modifiable, globally unique ID chosen by the system. + relay_host (str): Relay server used as a forwarding point for email sent from the array. Can be set as a hostname, IPv4 address, or IPv6 address, with optional port numbers. The expected format for IPv4 is `ddd.ddd.ddd.ddd:PORT`. The expected format for IPv6 is `xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx`, or if a port number is specified, `[xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx]:PORT`. + sender_domain (str): Domain name appended to alert email messages. + """ + if name is not None: + self.name = name + if id is not None: + self.id = id + if relay_host is not None: + self.relay_host = relay_host + if sender_domain is not None: + self.sender_domain = sender_domain + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `SmtpServer`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(SmtpServer, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, SmtpServer): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/smtp_server_get_response.py b/pypureclient/flashblade/FB_2_14/models/smtp_server_get_response.py new file mode 100644 index 000000000..79f6aeeca --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/smtp_server_get_response.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class SmtpServerGetResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'continuation_token': 'str', + 'total_item_count': 'int', + 'items': 'list[SmtpServer]' + } + + attribute_map = { + 'continuation_token': 'continuation_token', + 'total_item_count': 'total_item_count', + 'items': 'items' + } + + required_args = { + } + + def __init__( + self, + continuation_token=None, # type: str + total_item_count=None, # type: int + items=None, # type: List[models.SmtpServer] + ): + """ + Keyword args: + continuation_token (str): Continuation token that can be provided in the `continuation_token` query param to get the next page of data. If you use the `continuation_token` to page through data you are guaranteed to get all items exactly once regardless of how items are modified. If an item is added or deleted during the pagination then it may or may not be returned. The `continuation_token` is generated if the `limit` is less than the remaining number of items, and the default sort is used (no sort is specified). + total_item_count (int): Total number of items after applying `filter` params. + items (list[SmtpServer]) + """ + if continuation_token is not None: + self.continuation_token = continuation_token + if total_item_count is not None: + self.total_item_count = total_item_count + if items is not None: + self.items = items + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `SmtpServerGetResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(SmtpServerGetResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, SmtpServerGetResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/smtp_server_response.py b/pypureclient/flashblade/FB_2_14/models/smtp_server_response.py new file mode 100644 index 000000000..8b3934889 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/smtp_server_response.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class SmtpServerResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'items': 'list[SmtpServer]' + } + + attribute_map = { + 'items': 'items' + } + + required_args = { + } + + def __init__( + self, + items=None, # type: List[models.SmtpServer] + ): + """ + Keyword args: + items (list[SmtpServer]) + """ + if items is not None: + self.items = items + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `SmtpServerResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(SmtpServerResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, SmtpServerResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/snmp_agent.py b/pypureclient/flashblade/FB_2_14/models/snmp_agent.py new file mode 100644 index 000000000..f28976c6d --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/snmp_agent.py @@ -0,0 +1,144 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class SnmpAgent(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'name': 'str', + 'id': 'str', + 'engine_id': 'str', + 'version': 'str', + 'v2c': 'SnmpV2c', + 'v3': 'SnmpV3' + } + + attribute_map = { + 'name': 'name', + 'id': 'id', + 'engine_id': 'engine_id', + 'version': 'version', + 'v2c': 'v2c', + 'v3': 'v3' + } + + required_args = { + } + + def __init__( + self, + name=None, # type: str + id=None, # type: str + engine_id=None, # type: str + version=None, # type: str + v2c=None, # type: models.SnmpV2c + v3=None, # type: models.SnmpV3 + ): + """ + Keyword args: + name (str): Name of the object (e.g., a file system or snapshot). + id (str): A non-modifiable, globally unique ID chosen by the system. + engine_id (str): An SNMP agent's adminstration domain unique name. + version (str): Version of the SNMP protocol to be used by an SNMP manager in communications with Purity's SNMP agent. Valid values are `v2c` and `v3`. + v2c (SnmpV2c) + v3 (SnmpV3) + """ + if name is not None: + self.name = name + if id is not None: + self.id = id + if engine_id is not None: + self.engine_id = engine_id + if version is not None: + self.version = version + if v2c is not None: + self.v2c = v2c + if v3 is not None: + self.v3 = v3 + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `SnmpAgent`".format(key)) + if key == "engine_id" and value is not None: + if len(value) > 32: + raise ValueError("Invalid value for `engine_id`, length must be less than or equal to `32`") + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(SnmpAgent, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, SnmpAgent): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/snmp_agent_get_response.py b/pypureclient/flashblade/FB_2_14/models/snmp_agent_get_response.py new file mode 100644 index 000000000..29b0b6271 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/snmp_agent_get_response.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class SnmpAgentGetResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'continuation_token': 'str', + 'total_item_count': 'int', + 'items': 'list[SnmpAgent]' + } + + attribute_map = { + 'continuation_token': 'continuation_token', + 'total_item_count': 'total_item_count', + 'items': 'items' + } + + required_args = { + } + + def __init__( + self, + continuation_token=None, # type: str + total_item_count=None, # type: int + items=None, # type: List[models.SnmpAgent] + ): + """ + Keyword args: + continuation_token (str): Continuation token that can be provided in the `continuation_token` query param to get the next page of data. If you use the `continuation_token` to page through data you are guaranteed to get all items exactly once regardless of how items are modified. If an item is added or deleted during the pagination then it may or may not be returned. The `continuation_token` is generated if the `limit` is less than the remaining number of items, and the default sort is used (no sort is specified). + total_item_count (int): Total number of items after applying `filter` params. + items (list[SnmpAgent]) + """ + if continuation_token is not None: + self.continuation_token = continuation_token + if total_item_count is not None: + self.total_item_count = total_item_count + if items is not None: + self.items = items + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `SnmpAgentGetResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(SnmpAgentGetResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, SnmpAgentGetResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/snmp_agent_mib.py b/pypureclient/flashblade/FB_2_14/models/snmp_agent_mib.py new file mode 100644 index 000000000..2ecd4c82c --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/snmp_agent_mib.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class SnmpAgentMib(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'mib': 'str' + } + + attribute_map = { + 'mib': 'mib' + } + + required_args = { + } + + def __init__( + self, + mib=None, # type: str + ): + """ + Keyword args: + mib (str): MIB text. + """ + if mib is not None: + self.mib = mib + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `SnmpAgentMib`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(SnmpAgentMib, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, SnmpAgentMib): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/snmp_agent_mib_response.py b/pypureclient/flashblade/FB_2_14/models/snmp_agent_mib_response.py new file mode 100644 index 000000000..73a2881f0 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/snmp_agent_mib_response.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class SnmpAgentMibResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'items': 'list[SnmpAgentMib]' + } + + attribute_map = { + 'items': 'items' + } + + required_args = { + } + + def __init__( + self, + items=None, # type: List[models.SnmpAgentMib] + ): + """ + Keyword args: + items (list[SnmpAgentMib]) + """ + if items is not None: + self.items = items + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `SnmpAgentMibResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(SnmpAgentMibResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, SnmpAgentMibResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/snmp_agent_response.py b/pypureclient/flashblade/FB_2_14/models/snmp_agent_response.py new file mode 100644 index 000000000..b534e75c1 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/snmp_agent_response.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class SnmpAgentResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'items': 'list[SnmpAgent]' + } + + attribute_map = { + 'items': 'items' + } + + required_args = { + } + + def __init__( + self, + items=None, # type: List[models.SnmpAgent] + ): + """ + Keyword args: + items (list[SnmpAgent]) + """ + if items is not None: + self.items = items + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `SnmpAgentResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(SnmpAgentResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, SnmpAgentResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/snmp_manager.py b/pypureclient/flashblade/FB_2_14/models/snmp_manager.py new file mode 100644 index 000000000..2b77fe24c --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/snmp_manager.py @@ -0,0 +1,147 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class SnmpManager(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'name': 'str', + 'id': 'str', + 'host': 'str', + 'notification': 'str', + 'version': 'str', + 'v2c': 'SnmpV2c', + 'v3': 'SnmpV3' + } + + attribute_map = { + 'name': 'name', + 'id': 'id', + 'host': 'host', + 'notification': 'notification', + 'version': 'version', + 'v2c': 'v2c', + 'v3': 'v3' + } + + required_args = { + } + + def __init__( + self, + name=None, # type: str + id=None, # type: str + host=None, # type: str + notification=None, # type: str + version=None, # type: str + v2c=None, # type: models.SnmpV2c + v3=None, # type: models.SnmpV3 + ): + """ + Keyword args: + name (str): A name chosen by the user. Can be changed. Must be locally unique. + id (str): A non-modifiable, globally unique ID chosen by the system. + host (str): DNS hostname or IP address of a computer that hosts an SNMP manager to which Purity is to send trap messages when it generates alerts. + notification (str): The type of notification the agent will send. Valid values are `inform` and `trap`. + version (str): Version of the SNMP protocol to be used by Purity in communications with the specified manager. Valid values are `v2c` and `v3`. + v2c (SnmpV2c) + v3 (SnmpV3) + """ + if name is not None: + self.name = name + if id is not None: + self.id = id + if host is not None: + self.host = host + if notification is not None: + self.notification = notification + if version is not None: + self.version = version + if v2c is not None: + self.v2c = v2c + if v3 is not None: + self.v3 = v3 + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `SnmpManager`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(SnmpManager, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, SnmpManager): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/snmp_manager_get_response.py b/pypureclient/flashblade/FB_2_14/models/snmp_manager_get_response.py new file mode 100644 index 000000000..a6ce41830 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/snmp_manager_get_response.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class SnmpManagerGetResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'continuation_token': 'str', + 'total_item_count': 'int', + 'items': 'list[SnmpManager]' + } + + attribute_map = { + 'continuation_token': 'continuation_token', + 'total_item_count': 'total_item_count', + 'items': 'items' + } + + required_args = { + } + + def __init__( + self, + continuation_token=None, # type: str + total_item_count=None, # type: int + items=None, # type: List[models.SnmpManager] + ): + """ + Keyword args: + continuation_token (str): Continuation token that can be provided in the `continuation_token` query param to get the next page of data. If you use the `continuation_token` to page through data you are guaranteed to get all items exactly once regardless of how items are modified. If an item is added or deleted during the pagination then it may or may not be returned. The `continuation_token` is generated if the `limit` is less than the remaining number of items, and the default sort is used (no sort is specified). + total_item_count (int): Total number of items after applying `filter` params. + items (list[SnmpManager]) + """ + if continuation_token is not None: + self.continuation_token = continuation_token + if total_item_count is not None: + self.total_item_count = total_item_count + if items is not None: + self.items = items + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `SnmpManagerGetResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(SnmpManagerGetResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, SnmpManagerGetResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/snmp_manager_post.py b/pypureclient/flashblade/FB_2_14/models/snmp_manager_post.py new file mode 100644 index 000000000..867f9dbf0 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/snmp_manager_post.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class SnmpManagerPost(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'host': 'str', + 'notification': 'str', + 'version': 'str', + 'v2c': 'SnmpV2c', + 'v3': 'SnmpV3Post' + } + + attribute_map = { + 'host': 'host', + 'notification': 'notification', + 'version': 'version', + 'v2c': 'v2c', + 'v3': 'v3' + } + + required_args = { + } + + def __init__( + self, + host=None, # type: str + notification=None, # type: str + version=None, # type: str + v2c=None, # type: models.SnmpV2c + v3=None, # type: models.SnmpV3Post + ): + """ + Keyword args: + host (str): DNS hostname or IP address of a computer that hosts an SNMP manager to which Purity is to send trap messages when it generates alerts. + notification (str): The type of notification the agent will send. Valid values are `inform` and `trap`. + version (str): Version of the SNMP protocol to be used by Purity in communications with the specified manager. Valid values are `v2c` and `v3`. + v2c (SnmpV2c) + v3 (SnmpV3Post) + """ + if host is not None: + self.host = host + if notification is not None: + self.notification = notification + if version is not None: + self.version = version + if v2c is not None: + self.v2c = v2c + if v3 is not None: + self.v3 = v3 + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `SnmpManagerPost`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(SnmpManagerPost, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, SnmpManagerPost): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/snmp_manager_response.py b/pypureclient/flashblade/FB_2_14/models/snmp_manager_response.py new file mode 100644 index 000000000..71c0d0724 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/snmp_manager_response.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class SnmpManagerResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'items': 'list[SnmpManager]' + } + + attribute_map = { + 'items': 'items' + } + + required_args = { + } + + def __init__( + self, + items=None, # type: List[models.SnmpManager] + ): + """ + Keyword args: + items (list[SnmpManager]) + """ + if items is not None: + self.items = items + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `SnmpManagerResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(SnmpManagerResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, SnmpManagerResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/snmp_manager_test.py b/pypureclient/flashblade/FB_2_14/models/snmp_manager_test.py new file mode 100644 index 000000000..0ef81fca8 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/snmp_manager_test.py @@ -0,0 +1,129 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class SnmpManagerTest(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'name': 'str', + 'id': 'str', + 'sent': 'bool', + 'error': 'str' + } + + attribute_map = { + 'name': 'name', + 'id': 'id', + 'sent': 'sent', + 'error': 'error' + } + + required_args = { + } + + def __init__( + self, + name=None, # type: str + id=None, # type: str + sent=None, # type: bool + error=None, # type: str + ): + """ + Keyword args: + name (str): Name of the object (e.g., a file system or snapshot). + id (str): A non-modifiable, globally unique ID chosen by the system. + sent (bool): Is the test trap or inform sent? + error (str): Error message (if failed). + """ + if name is not None: + self.name = name + if id is not None: + self.id = id + if sent is not None: + self.sent = sent + if error is not None: + self.error = error + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `SnmpManagerTest`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(SnmpManagerTest, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, SnmpManagerTest): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/snmp_v2c.py b/pypureclient/flashblade/FB_2_14/models/snmp_v2c.py new file mode 100644 index 000000000..a7b5a93de --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/snmp_v2c.py @@ -0,0 +1,114 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class SnmpV2c(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'community': 'str' + } + + attribute_map = { + 'community': 'community' + } + + required_args = { + } + + def __init__( + self, + community=None, # type: str + ): + """ + Keyword args: + community (str): Manager community ID under which Purity is to communicate with the specified managers. + """ + if community is not None: + self.community = community + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `SnmpV2c`".format(key)) + if key == "community" and value is not None: + if len(value) > 32: + raise ValueError("Invalid value for `community`, length must be less than or equal to `32`") + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(SnmpV2c, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, SnmpV2c): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/snmp_v3.py b/pypureclient/flashblade/FB_2_14/models/snmp_v3.py new file mode 100644 index 000000000..1db1bdc59 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/snmp_v3.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class SnmpV3(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'auth_passphrase': 'str', + 'auth_protocol': 'str', + 'privacy_passphrase': 'str', + 'privacy_protocol': 'str', + 'user': 'str' + } + + attribute_map = { + 'auth_passphrase': 'auth_passphrase', + 'auth_protocol': 'auth_protocol', + 'privacy_passphrase': 'privacy_passphrase', + 'privacy_protocol': 'privacy_protocol', + 'user': 'user' + } + + required_args = { + } + + def __init__( + self, + auth_passphrase=None, # type: str + auth_protocol=None, # type: str + privacy_passphrase=None, # type: str + privacy_protocol=None, # type: str + user=None, # type: str + ): + """ + Keyword args: + auth_passphrase (str): Passphrase used by Purity to authenticate the array with the specified managers. + auth_protocol (str): Hash algorithm used to validate the authentication passphrase. Valid values are `MD5` and `SHA`. + privacy_passphrase (str): Passphrase used to encrypt SNMP messages. + privacy_protocol (str): Encryption protocol for SNMP messages. Valid values are `AES` and `DES`. + user (str): User ID recognized by the specified SNMP managers which Purity is to use in communications with them. + """ + if auth_passphrase is not None: + self.auth_passphrase = auth_passphrase + if auth_protocol is not None: + self.auth_protocol = auth_protocol + if privacy_passphrase is not None: + self.privacy_passphrase = privacy_passphrase + if privacy_protocol is not None: + self.privacy_protocol = privacy_protocol + if user is not None: + self.user = user + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `SnmpV3`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(SnmpV3, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, SnmpV3): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/snmp_v3_post.py b/pypureclient/flashblade/FB_2_14/models/snmp_v3_post.py new file mode 100644 index 000000000..27f1cdd6e --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/snmp_v3_post.py @@ -0,0 +1,143 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class SnmpV3Post(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'auth_passphrase': 'str', + 'auth_protocol': 'str', + 'privacy_passphrase': 'str', + 'privacy_protocol': 'str', + 'user': 'str' + } + + attribute_map = { + 'auth_passphrase': 'auth_passphrase', + 'auth_protocol': 'auth_protocol', + 'privacy_passphrase': 'privacy_passphrase', + 'privacy_protocol': 'privacy_protocol', + 'user': 'user' + } + + required_args = { + } + + def __init__( + self, + auth_passphrase=None, # type: str + auth_protocol=None, # type: str + privacy_passphrase=None, # type: str + privacy_protocol=None, # type: str + user=None, # type: str + ): + """ + Keyword args: + auth_passphrase (str): Passphrase used by Purity to authenticate the array with the specified managers. + auth_protocol (str): Hash algorithm used to validate the authentication passphrase. Valid values are `MD5` and `SHA`. + privacy_passphrase (str): Passphrase used to encrypt SNMP messages. + privacy_protocol (str): Encryption protocol for SNMP messages. Valid values are `AES` and `DES`. + user (str): User ID recognized by the specified SNMP managers which Purity is to use in communications with them. + """ + if auth_passphrase is not None: + self.auth_passphrase = auth_passphrase + if auth_protocol is not None: + self.auth_protocol = auth_protocol + if privacy_passphrase is not None: + self.privacy_passphrase = privacy_passphrase + if privacy_protocol is not None: + self.privacy_protocol = privacy_protocol + if user is not None: + self.user = user + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `SnmpV3Post`".format(key)) + if key == "auth_passphrase" and value is not None: + if len(value) > 32: + raise ValueError("Invalid value for `auth_passphrase`, length must be less than or equal to `32`") + if key == "privacy_passphrase" and value is not None: + if len(value) > 63: + raise ValueError("Invalid value for `privacy_passphrase`, length must be less than or equal to `63`") + if len(value) < 8: + raise ValueError("Invalid value for `privacy_passphrase`, length must be greater than or equal to `8`") + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(SnmpV3Post, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, SnmpV3Post): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/space.py b/pypureclient/flashblade/FB_2_14/models/space.py new file mode 100644 index 000000000..37105c991 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/space.py @@ -0,0 +1,176 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class Space(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'data_reduction': 'float', + 'snapshots': 'int', + 'total_physical': 'int', + 'unique': 'int', + 'virtual': 'int', + 'total_provisioned': 'int', + 'available_provisioned': 'int', + 'available_ratio': 'float', + 'destroyed': 'int', + 'destroyed_virtual': 'int' + } + + attribute_map = { + 'data_reduction': 'data_reduction', + 'snapshots': 'snapshots', + 'total_physical': 'total_physical', + 'unique': 'unique', + 'virtual': 'virtual', + 'total_provisioned': 'total_provisioned', + 'available_provisioned': 'available_provisioned', + 'available_ratio': 'available_ratio', + 'destroyed': 'destroyed', + 'destroyed_virtual': 'destroyed_virtual' + } + + required_args = { + } + + def __init__( + self, + data_reduction=None, # type: float + snapshots=None, # type: int + total_physical=None, # type: int + unique=None, # type: int + virtual=None, # type: int + total_provisioned=None, # type: int + available_provisioned=None, # type: int + available_ratio=None, # type: float + destroyed=None, # type: int + destroyed_virtual=None, # type: int + ): + """ + Keyword args: + data_reduction (float): Reduction of data. + snapshots (int): Physical usage by snapshots, other than unique in bytes. + total_physical (int): Total physical usage (including snapshots) in bytes. + unique (int): Unique physical space occupied by customer data, in bytes. Excludes snapshots, destroyed. + virtual (int): The amount of logically written data, in bytes. Excludes destroyed data. + total_provisioned (int): The effective provisioned size of the container, at which a hard limit will be applied. For a bucket with a `quota_limit` value and `hard_limit_enabled` set to `true`, this is its `quota_limit` value, unless the available space of the associated object store account, as defined by its `quota_limit` value, would prevent the bucket from reaching its own `quota_limit` value. In such a case, `total_provisioned` will reflect the smaller value. For a file system with a `provisioned` value and `hard_limit_enabled` set to `true`, this is the `provisioned` value of the file system. For an object store account with a `quota_limit` value and `hard_limit_enabled` set to `true`, this is the `quota_limit` value of the object store account. For the array, this is the sum of the file systems and accounts. Measured in bytes. + available_provisioned (int): The amount of space left that the current object can grow before writes are stopped due to a hard limit quota being hit. This is total_provisioned minus the virtual space used for file-systems and buckets. For array and object store accounts it is total_provisioned minus the virtual space used by non-destroyed file-systems and buckets. + available_ratio (float): The ratio of the available space versus the total provisioned space. + destroyed (int): Unique physical space (excluding snapshots) occupied by destroyed data within the child containers, in bytes. For buckets and filesystems, the destroyed space will be 0 as they cannot have child containers. For the whole array, the space will be the sum of all destroyed buckets and filesystems. + destroyed_virtual (int): The amount of destroyed logically written data within the child containers, in bytes. For buckets and filesystems, the destroyed virtual space will be 0 as they cannot have child containers. For the whole array, the space will be the sum of all destroyed buckets and filesystems. + """ + if data_reduction is not None: + self.data_reduction = data_reduction + if snapshots is not None: + self.snapshots = snapshots + if total_physical is not None: + self.total_physical = total_physical + if unique is not None: + self.unique = unique + if virtual is not None: + self.virtual = virtual + if total_provisioned is not None: + self.total_provisioned = total_provisioned + if available_provisioned is not None: + self.available_provisioned = available_provisioned + if available_ratio is not None: + self.available_ratio = available_ratio + if destroyed is not None: + self.destroyed = destroyed + if destroyed_virtual is not None: + self.destroyed_virtual = destroyed_virtual + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `Space`".format(key)) + if key == "total_provisioned" and value is not None: + if value < 0: + raise ValueError("Invalid value for `total_provisioned`, must be a value greater than or equal to `0`") + if key == "available_provisioned" and value is not None: + if value < 0: + raise ValueError("Invalid value for `available_provisioned`, must be a value greater than or equal to `0`") + if key == "available_ratio" and value is not None: + if value > 1.0: + raise ValueError("Invalid value for `available_ratio`, value must be less than or equal to `1.0`") + if value < 0.0: + raise ValueError("Invalid value for `available_ratio`, must be a value greater than or equal to `0.0`") + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(Space, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, Space): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/space_extended.py b/pypureclient/flashblade/FB_2_14/models/space_extended.py new file mode 100644 index 000000000..908842d14 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/space_extended.py @@ -0,0 +1,144 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class SpaceExtended(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'data_reduction': 'float', + 'snapshots': 'int', + 'total_physical': 'int', + 'total_provisioned': 'int', + 'unique': 'int', + 'virtual': 'int' + } + + attribute_map = { + 'data_reduction': 'data_reduction', + 'snapshots': 'snapshots', + 'total_physical': 'total_physical', + 'total_provisioned': 'total_provisioned', + 'unique': 'unique', + 'virtual': 'virtual' + } + + required_args = { + } + + def __init__( + self, + data_reduction=None, # type: float + snapshots=None, # type: int + total_physical=None, # type: int + total_provisioned=None, # type: int + unique=None, # type: int + virtual=None, # type: int + ): + """ + Keyword args: + data_reduction (float): Reduction of data. + snapshots (int): Physical usage by snapshots, other than unique in bytes. + total_physical (int): Total physical usage (including snapshots) in bytes. + total_provisioned (int): The effective provisioned size of the container, at which a hard limit will be applied. For a bucket with a `quota_limit` value and `hard_limit_enabled` set to `true`, this is its `quota_limit` value, unless the available space of the associated object store account, as defined by its `quota_limit` value, would prevent the bucket from reaching its own `quota_limit` value. In such a case, `total_provisioned` will reflect the smaller value. For an object store account with a `quota_limit` value and `hard_limit_enabled` set to `true`, this is the `quota_limit` value of the object store account. Measured in bytes. + unique (int): Unique physical space occupied by customer data, in bytes. Excludes shared space, snapshots, and metadata. + virtual (int): Virtual space, in bytes. + """ + if data_reduction is not None: + self.data_reduction = data_reduction + if snapshots is not None: + self.snapshots = snapshots + if total_physical is not None: + self.total_physical = total_physical + if total_provisioned is not None: + self.total_provisioned = total_provisioned + if unique is not None: + self.unique = unique + if virtual is not None: + self.virtual = virtual + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `SpaceExtended`".format(key)) + if key == "total_provisioned" and value is not None: + if value < 0: + raise ValueError("Invalid value for `total_provisioned`, must be a value greater than or equal to `0`") + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(SpaceExtended, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, SpaceExtended): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/ssh_certificate_authority_policy.py b/pypureclient/flashblade/FB_2_14/models/ssh_certificate_authority_policy.py new file mode 100644 index 000000000..22fb25c9b --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/ssh_certificate_authority_policy.py @@ -0,0 +1,153 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class SshCertificateAuthorityPolicy(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'name': 'str', + 'id': 'str', + 'enabled': 'bool', + 'is_local': 'bool', + 'location': 'FixedReference', + 'policy_type': 'str', + 'signing_authority': 'ReferenceWritable', + 'static_authorized_principals': 'list[str]' + } + + attribute_map = { + 'name': 'name', + 'id': 'id', + 'enabled': 'enabled', + 'is_local': 'is_local', + 'location': 'location', + 'policy_type': 'policy_type', + 'signing_authority': 'signing_authority', + 'static_authorized_principals': 'static_authorized_principals' + } + + required_args = { + } + + def __init__( + self, + name=None, # type: str + id=None, # type: str + enabled=None, # type: bool + is_local=None, # type: bool + location=None, # type: models.FixedReference + policy_type=None, # type: str + signing_authority=None, # type: models.ReferenceWritable + static_authorized_principals=None, # type: List[str] + ): + """ + Keyword args: + name (str): Name of the object (e.g., a file system or snapshot). + id (str): A non-modifiable, globally unique ID chosen by the system. + enabled (bool): If `true`, the policy is enabled. If not specified, defaults to `true`. + is_local (bool): Whether the policy is defined on the local array. + location (FixedReference): Reference to the array where the policy is defined. + policy_type (str): Type of the policy. Valid values are `audit`, `bucket-access`, `cross-origin-resource-sharing`, `network-access`, `nfs`, `object-access`, `smb-client`, `smb-share`, and `snapshot`. + signing_authority (ReferenceWritable): A reference to the authority that will digitally sign user SSH certificates that will be used to access the system. This may be either a certificate or a public key. If a certificate is used as the signer, then its expiry period will be honored and user SSH certificates signed by the certificate will no longer be accepted after the certificate has expired. + static_authorized_principals (list[str]): If not specified - users affected by this policy can only log into the system when they present an SSH certificate containing their own username as a principle. If specified - users affected by this policy can only log into the system when they present an SSH certificate containing at least one username from this list as a principle. + """ + if name is not None: + self.name = name + if id is not None: + self.id = id + if enabled is not None: + self.enabled = enabled + if is_local is not None: + self.is_local = is_local + if location is not None: + self.location = location + if policy_type is not None: + self.policy_type = policy_type + if signing_authority is not None: + self.signing_authority = signing_authority + if static_authorized_principals is not None: + self.static_authorized_principals = static_authorized_principals + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `SshCertificateAuthorityPolicy`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(SshCertificateAuthorityPolicy, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, SshCertificateAuthorityPolicy): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/ssh_certificate_authority_policy_get_response.py b/pypureclient/flashblade/FB_2_14/models/ssh_certificate_authority_policy_get_response.py new file mode 100644 index 000000000..14ae7df05 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/ssh_certificate_authority_policy_get_response.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class SshCertificateAuthorityPolicyGetResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'continuation_token': 'str', + 'total_item_count': 'int', + 'items': 'list[SshCertificateAuthorityPolicy]' + } + + attribute_map = { + 'continuation_token': 'continuation_token', + 'total_item_count': 'total_item_count', + 'items': 'items' + } + + required_args = { + } + + def __init__( + self, + continuation_token=None, # type: str + total_item_count=None, # type: int + items=None, # type: List[models.SshCertificateAuthorityPolicy] + ): + """ + Keyword args: + continuation_token (str): Continuation token that can be provided in the `continuation_token` query param to get the next page of data. If you use the `continuation_token` to page through data you are guaranteed to get all items exactly once regardless of how items are modified. If an item is added or deleted during the pagination then it may or may not be returned. The `continuation_token` is generated if the `limit` is less than the remaining number of items, and the default sort is used (no sort is specified). + total_item_count (int): Total number of items after applying `filter` params. + items (list[SshCertificateAuthorityPolicy]): A list of SSH certificate authority policy objects. + """ + if continuation_token is not None: + self.continuation_token = continuation_token + if total_item_count is not None: + self.total_item_count = total_item_count + if items is not None: + self.items = items + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `SshCertificateAuthorityPolicyGetResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(SshCertificateAuthorityPolicyGetResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, SshCertificateAuthorityPolicyGetResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/ssh_certificate_authority_policy_post.py b/pypureclient/flashblade/FB_2_14/models/ssh_certificate_authority_policy_post.py new file mode 100644 index 000000000..5e6843845 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/ssh_certificate_authority_policy_post.py @@ -0,0 +1,153 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class SshCertificateAuthorityPolicyPost(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'name': 'str', + 'id': 'str', + 'enabled': 'bool', + 'is_local': 'bool', + 'location': 'FixedReference', + 'policy_type': 'str', + 'signing_authority': 'ReferenceWritable', + 'static_authorized_principals': 'list[str]' + } + + attribute_map = { + 'name': 'name', + 'id': 'id', + 'enabled': 'enabled', + 'is_local': 'is_local', + 'location': 'location', + 'policy_type': 'policy_type', + 'signing_authority': 'signing_authority', + 'static_authorized_principals': 'static_authorized_principals' + } + + required_args = { + } + + def __init__( + self, + name=None, # type: str + id=None, # type: str + enabled=None, # type: bool + is_local=None, # type: bool + location=None, # type: models.FixedReference + policy_type=None, # type: str + signing_authority=None, # type: models.ReferenceWritable + static_authorized_principals=None, # type: List[str] + ): + """ + Keyword args: + name (str): Name of the object (e.g., a file system or snapshot). + id (str): A non-modifiable, globally unique ID chosen by the system. + enabled (bool): If `true`, the policy is enabled. If not specified, defaults to `true`. + is_local (bool): Whether the policy is defined on the local array. + location (FixedReference): Reference to the array where the policy is defined. + policy_type (str): Type of the policy. Valid values are `audit`, `bucket-access`, `cross-origin-resource-sharing`, `network-access`, `nfs`, `object-access`, `smb-client`, `smb-share`, and `snapshot`. + signing_authority (ReferenceWritable): A reference to the authority that will digitally sign user SSH certificates that will be used to access the system. This may be either a certificate or a public key. If a certificate is used as the signer, then its expiry period will be honored and user SSH certificates signed by the certificate will no longer be accepted after the certificate has expired. + static_authorized_principals (list[str]): If not specified - users affected by this policy can only log into the system when they present an SSH certificate containing their own username as a principle. If specified - users affected by this policy can only log into the system when they present an SSH certificate containing at least one username from this list as a principle. + """ + if name is not None: + self.name = name + if id is not None: + self.id = id + if enabled is not None: + self.enabled = enabled + if is_local is not None: + self.is_local = is_local + if location is not None: + self.location = location + if policy_type is not None: + self.policy_type = policy_type + if signing_authority is not None: + self.signing_authority = signing_authority + if static_authorized_principals is not None: + self.static_authorized_principals = static_authorized_principals + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `SshCertificateAuthorityPolicyPost`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(SshCertificateAuthorityPolicyPost, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, SshCertificateAuthorityPolicyPost): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/ssh_certificate_authority_policy_response.py b/pypureclient/flashblade/FB_2_14/models/ssh_certificate_authority_policy_response.py new file mode 100644 index 000000000..ab7496671 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/ssh_certificate_authority_policy_response.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class SshCertificateAuthorityPolicyResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'items': 'list[SshCertificateAuthorityPolicy]' + } + + attribute_map = { + 'items': 'items' + } + + required_args = { + } + + def __init__( + self, + items=None, # type: List[models.SshCertificateAuthorityPolicy] + ): + """ + Keyword args: + items (list[SshCertificateAuthorityPolicy]): A list of SSH certificate authority policy objects. + """ + if items is not None: + self.items = items + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `SshCertificateAuthorityPolicyResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(SshCertificateAuthorityPolicyResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, SshCertificateAuthorityPolicyResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/subnet.py b/pypureclient/flashblade/FB_2_14/models/subnet.py new file mode 100644 index 000000000..c630d6761 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/subnet.py @@ -0,0 +1,170 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class Subnet(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'name': 'str', + 'id': 'str', + 'enabled': 'bool', + 'gateway': 'str', + 'interfaces': 'list[FixedReference]', + 'link_aggregation_group': 'Reference', + 'mtu': 'int', + 'prefix': 'str', + 'services': 'list[str]', + 'vlan': 'int' + } + + attribute_map = { + 'name': 'name', + 'id': 'id', + 'enabled': 'enabled', + 'gateway': 'gateway', + 'interfaces': 'interfaces', + 'link_aggregation_group': 'link_aggregation_group', + 'mtu': 'mtu', + 'prefix': 'prefix', + 'services': 'services', + 'vlan': 'vlan' + } + + required_args = { + } + + def __init__( + self, + name=None, # type: str + id=None, # type: str + enabled=None, # type: bool + gateway=None, # type: str + interfaces=None, # type: List[models.FixedReference] + link_aggregation_group=None, # type: models.Reference + mtu=None, # type: int + prefix=None, # type: str + services=None, # type: List[str] + vlan=None, # type: int + ): + """ + Keyword args: + name (str): Name of the object (e.g., a file system or snapshot). + id (str): A non-modifiable, globally unique ID chosen by the system. + enabled (bool): Indicates if subnet is enabled (`true`) or disabled (`false`). If not specified, defaults to `true`. + gateway (str): The IPv4 or IPv6 address of the gateway through which the specified subnet is to communicate with the network. + interfaces (list[FixedReference]): List of network interfaces associated with this subnet. + link_aggregation_group (Reference): Reference to the associated LAG. + mtu (int): Maximum message transfer unit (packet) size for the subnet in bytes. MTU setting cannot exceed the MTU of the corresponding physical interface. If not specified, defaults to `1500`. + prefix (str): The IPv4 or IPv6 address to be associated with the specified subnet. + services (list[str]): The services provided by this subnet, as inherited from all of its interfaces. + vlan (int): VLAN ID. + """ + if name is not None: + self.name = name + if id is not None: + self.id = id + if enabled is not None: + self.enabled = enabled + if gateway is not None: + self.gateway = gateway + if interfaces is not None: + self.interfaces = interfaces + if link_aggregation_group is not None: + self.link_aggregation_group = link_aggregation_group + if mtu is not None: + self.mtu = mtu + if prefix is not None: + self.prefix = prefix + if services is not None: + self.services = services + if vlan is not None: + self.vlan = vlan + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `Subnet`".format(key)) + if key == "mtu" and value is not None: + if value > 9216: + raise ValueError("Invalid value for `mtu`, value must be less than or equal to `9216`") + if value < 1280: + raise ValueError("Invalid value for `mtu`, must be a value greater than or equal to `1280`") + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(Subnet, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, Subnet): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/subnet_get_response.py b/pypureclient/flashblade/FB_2_14/models/subnet_get_response.py new file mode 100644 index 000000000..9416c2e97 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/subnet_get_response.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class SubnetGetResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'continuation_token': 'str', + 'total_item_count': 'int', + 'items': 'list[Subnet]' + } + + attribute_map = { + 'continuation_token': 'continuation_token', + 'total_item_count': 'total_item_count', + 'items': 'items' + } + + required_args = { + } + + def __init__( + self, + continuation_token=None, # type: str + total_item_count=None, # type: int + items=None, # type: List[models.Subnet] + ): + """ + Keyword args: + continuation_token (str): Continuation token that can be provided in the `continuation_token` query param to get the next page of data. If you use the `continuation_token` to page through data you are guaranteed to get all items exactly once regardless of how items are modified. If an item is added or deleted during the pagination then it may or may not be returned. The `continuation_token` is generated if the `limit` is less than the remaining number of items, and the default sort is used (no sort is specified). + total_item_count (int): Total number of items after applying `filter` params. + items (list[Subnet]): A list of subnet objects. + """ + if continuation_token is not None: + self.continuation_token = continuation_token + if total_item_count is not None: + self.total_item_count = total_item_count + if items is not None: + self.items = items + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `SubnetGetResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(SubnetGetResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, SubnetGetResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/subnet_response.py b/pypureclient/flashblade/FB_2_14/models/subnet_response.py new file mode 100644 index 000000000..621775056 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/subnet_response.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class SubnetResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'items': 'list[Subnet]' + } + + attribute_map = { + 'items': 'items' + } + + required_args = { + } + + def __init__( + self, + items=None, # type: List[models.Subnet] + ): + """ + Keyword args: + items (list[Subnet]): A list of subnet objects. + """ + if items is not None: + self.items = items + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `SubnetResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(SubnetResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, SubnetResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/support.py b/pypureclient/flashblade/FB_2_14/models/support.py new file mode 100644 index 000000000..a596c5ef5 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/support.py @@ -0,0 +1,165 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class Support(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'name': 'str', + 'id': 'str', + 'phonehome_enabled': 'bool', + 'proxy': 'str', + 'remote_assist_active': 'bool', + 'remote_assist_opened': 'str', + 'remote_assist_expires': 'str', + 'remote_assist_status': 'str', + 'remote_assist_paths': 'list[SupportRemoteAssistPaths]', + 'remote_assist_duration': 'int' + } + + attribute_map = { + 'name': 'name', + 'id': 'id', + 'phonehome_enabled': 'phonehome_enabled', + 'proxy': 'proxy', + 'remote_assist_active': 'remote_assist_active', + 'remote_assist_opened': 'remote_assist_opened', + 'remote_assist_expires': 'remote_assist_expires', + 'remote_assist_status': 'remote_assist_status', + 'remote_assist_paths': 'remote_assist_paths', + 'remote_assist_duration': 'remote_assist_duration' + } + + required_args = { + } + + def __init__( + self, + name=None, # type: str + id=None, # type: str + phonehome_enabled=None, # type: bool + proxy=None, # type: str + remote_assist_active=None, # type: bool + remote_assist_opened=None, # type: str + remote_assist_expires=None, # type: str + remote_assist_status=None, # type: str + remote_assist_paths=None, # type: List[models.SupportRemoteAssistPaths] + remote_assist_duration=None, # type: int + ): + """ + Keyword args: + name (str): Name of the object (e.g., a file system or snapshot). + id (str): A non-modifiable, globally unique ID chosen by the system. + phonehome_enabled (bool) + proxy (str) + remote_assist_active (bool): The switch to open all remote-assist sessions. + remote_assist_opened (str): The time when the session opened. + remote_assist_expires (str): The time when the session expires. + remote_assist_status (str): The status of the remote-assist sessions. Valid values are `connected`, `partially_connected`, `reconnecting`, and `disconnected`. + remote_assist_paths (list[SupportRemoteAssistPaths]) + remote_assist_duration (int): Specifies the duration of the remote-assist session in milliseconds. This parameter should only be provided when establishing a new session. It determines the length of time the session will remain active after it's initiated. + """ + if name is not None: + self.name = name + if id is not None: + self.id = id + if phonehome_enabled is not None: + self.phonehome_enabled = phonehome_enabled + if proxy is not None: + self.proxy = proxy + if remote_assist_active is not None: + self.remote_assist_active = remote_assist_active + if remote_assist_opened is not None: + self.remote_assist_opened = remote_assist_opened + if remote_assist_expires is not None: + self.remote_assist_expires = remote_assist_expires + if remote_assist_status is not None: + self.remote_assist_status = remote_assist_status + if remote_assist_paths is not None: + self.remote_assist_paths = remote_assist_paths + if remote_assist_duration is not None: + self.remote_assist_duration = remote_assist_duration + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `Support`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(Support, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, Support): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/support_get_response.py b/pypureclient/flashblade/FB_2_14/models/support_get_response.py new file mode 100644 index 000000000..1564b519c --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/support_get_response.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class SupportGetResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'continuation_token': 'str', + 'total_item_count': 'int', + 'items': 'list[Support]' + } + + attribute_map = { + 'continuation_token': 'continuation_token', + 'total_item_count': 'total_item_count', + 'items': 'items' + } + + required_args = { + } + + def __init__( + self, + continuation_token=None, # type: str + total_item_count=None, # type: int + items=None, # type: List[models.Support] + ): + """ + Keyword args: + continuation_token (str): Continuation token that can be provided in the `continuation_token` query param to get the next page of data. If you use the `continuation_token` to page through data you are guaranteed to get all items exactly once regardless of how items are modified. If an item is added or deleted during the pagination then it may or may not be returned. The `continuation_token` is generated if the `limit` is less than the remaining number of items, and the default sort is used (no sort is specified). + total_item_count (int): Total number of items after applying `filter` params. + items (list[Support]) + """ + if continuation_token is not None: + self.continuation_token = continuation_token + if total_item_count is not None: + self.total_item_count = total_item_count + if items is not None: + self.items = items + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `SupportGetResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(SupportGetResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, SupportGetResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/support_remote_assist_paths.py b/pypureclient/flashblade/FB_2_14/models/support_remote_assist_paths.py new file mode 100644 index 000000000..b886e07f7 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/support_remote_assist_paths.py @@ -0,0 +1,117 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class SupportRemoteAssistPaths(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'component_name': 'str', + 'status': 'str' + } + + attribute_map = { + 'component_name': 'component_name', + 'status': 'status' + } + + required_args = { + } + + def __init__( + self, + component_name=None, # type: str + status=None, # type: str + ): + """ + Keyword args: + component_name (str): The name of the FM. + status (str): The status of the remote-assist session on the local FM. Valid values are `reconnecting`, `connected`, `disconnected`, and `unknown`. + """ + if component_name is not None: + self.component_name = component_name + if status is not None: + self.status = status + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `SupportRemoteAssistPaths`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(SupportRemoteAssistPaths, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, SupportRemoteAssistPaths): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/support_response.py b/pypureclient/flashblade/FB_2_14/models/support_response.py new file mode 100644 index 000000000..e31295f2d --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/support_response.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class SupportResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'items': 'list[Support]' + } + + attribute_map = { + 'items': 'items' + } + + required_args = { + } + + def __init__( + self, + items=None, # type: List[models.Support] + ): + """ + Keyword args: + items (list[Support]) + """ + if items is not None: + self.items = items + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `SupportResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(SupportResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, SupportResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/syslog_server.py b/pypureclient/flashblade/FB_2_14/models/syslog_server.py new file mode 100644 index 000000000..feff75743 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/syslog_server.py @@ -0,0 +1,129 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class SyslogServer(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'uri': 'str', + 'services': 'list[str]', + 'name': 'str', + 'id': 'str' + } + + attribute_map = { + 'uri': 'uri', + 'services': 'services', + 'name': 'name', + 'id': 'id' + } + + required_args = { + } + + def __init__( + self, + uri=None, # type: str + services=None, # type: List[str] + name=None, # type: str + id=None, # type: str + ): + """ + Keyword args: + uri (str): The URI of the syslog server in the format PROTOCOL://HOSTNAME:PORT. + services (list[str]): Valid values are `data-audit` and `management`. If not specified, defaults to `management`. + name (str): A name chosen by the user. Can be changed. Must be locally unique. + id (str): A non-modifiable, globally unique ID chosen by the system. + """ + if uri is not None: + self.uri = uri + if services is not None: + self.services = services + if name is not None: + self.name = name + if id is not None: + self.id = id + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `SyslogServer`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(SyslogServer, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, SyslogServer): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/syslog_server_get_response.py b/pypureclient/flashblade/FB_2_14/models/syslog_server_get_response.py new file mode 100644 index 000000000..39634a9c8 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/syslog_server_get_response.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class SyslogServerGetResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'continuation_token': 'str', + 'total_item_count': 'int', + 'items': 'list[SyslogServer]' + } + + attribute_map = { + 'continuation_token': 'continuation_token', + 'total_item_count': 'total_item_count', + 'items': 'items' + } + + required_args = { + } + + def __init__( + self, + continuation_token=None, # type: str + total_item_count=None, # type: int + items=None, # type: List[models.SyslogServer] + ): + """ + Keyword args: + continuation_token (str): Continuation token that can be provided in the `continuation_token` query param to get the next page of data. If you use the `continuation_token` to page through data you are guaranteed to get all items exactly once regardless of how items are modified. If an item is added or deleted during the pagination then it may or may not be returned. The `continuation_token` is generated if the `limit` is less than the remaining number of items, and the default sort is used (no sort is specified). + total_item_count (int): Total number of items after applying `filter` params. + items (list[SyslogServer]) + """ + if continuation_token is not None: + self.continuation_token = continuation_token + if total_item_count is not None: + self.total_item_count = total_item_count + if items is not None: + self.items = items + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `SyslogServerGetResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(SyslogServerGetResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, SyslogServerGetResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/syslog_server_patch.py b/pypureclient/flashblade/FB_2_14/models/syslog_server_patch.py new file mode 100644 index 000000000..ab3f00973 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/syslog_server_patch.py @@ -0,0 +1,117 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class SyslogServerPatch(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'uri': 'str', + 'services': 'list[str]' + } + + attribute_map = { + 'uri': 'uri', + 'services': 'services' + } + + required_args = { + } + + def __init__( + self, + uri=None, # type: str + services=None, # type: List[str] + ): + """ + Keyword args: + uri (str): The URI of the syslog server in the format PROTOCOL://HOSTNAME:PORT. + services (list[str]): Valid values are `data-audit` and `management`. + """ + if uri is not None: + self.uri = uri + if services is not None: + self.services = services + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `SyslogServerPatch`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(SyslogServerPatch, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, SyslogServerPatch): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/syslog_server_post.py b/pypureclient/flashblade/FB_2_14/models/syslog_server_post.py new file mode 100644 index 000000000..2d8a5ad60 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/syslog_server_post.py @@ -0,0 +1,117 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class SyslogServerPost(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'uri': 'str', + 'services': 'list[str]' + } + + attribute_map = { + 'uri': 'uri', + 'services': 'services' + } + + required_args = { + } + + def __init__( + self, + uri=None, # type: str + services=None, # type: List[str] + ): + """ + Keyword args: + uri (str): The URI of the syslog server in the format PROTOCOL://HOSTNAME:PORT. + services (list[str]): Valid values are `data-audit` and `management`. If not specified, defaults to `management`. + """ + if uri is not None: + self.uri = uri + if services is not None: + self.services = services + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `SyslogServerPost`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(SyslogServerPost, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, SyslogServerPost): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/syslog_server_post_or_patch.py b/pypureclient/flashblade/FB_2_14/models/syslog_server_post_or_patch.py new file mode 100644 index 000000000..f8072c4fe --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/syslog_server_post_or_patch.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class SyslogServerPostOrPatch(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'uri': 'str' + } + + attribute_map = { + 'uri': 'uri' + } + + required_args = { + } + + def __init__( + self, + uri=None, # type: str + ): + """ + Keyword args: + uri (str): The URI of the syslog server in the format PROTOCOL://HOSTNAME:PORT. + """ + if uri is not None: + self.uri = uri + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `SyslogServerPostOrPatch`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(SyslogServerPostOrPatch, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, SyslogServerPostOrPatch): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/syslog_server_response.py b/pypureclient/flashblade/FB_2_14/models/syslog_server_response.py new file mode 100644 index 000000000..bc4cd3e18 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/syslog_server_response.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class SyslogServerResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'items': 'list[SyslogServer]' + } + + attribute_map = { + 'items': 'items' + } + + required_args = { + } + + def __init__( + self, + items=None, # type: List[models.SyslogServer] + ): + """ + Keyword args: + items (list[SyslogServer]) + """ + if items is not None: + self.items = items + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `SyslogServerResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(SyslogServerResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, SyslogServerResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/syslog_server_settings.py b/pypureclient/flashblade/FB_2_14/models/syslog_server_settings.py new file mode 100644 index 000000000..795abeee7 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/syslog_server_settings.py @@ -0,0 +1,129 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class SyslogServerSettings(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'name': 'str', + 'id': 'str', + 'ca_certificate': 'object', + 'ca_certificate_group': 'object' + } + + attribute_map = { + 'name': 'name', + 'id': 'id', + 'ca_certificate': 'ca_certificate', + 'ca_certificate_group': 'ca_certificate_group' + } + + required_args = { + } + + def __init__( + self, + name=None, # type: str + id=None, # type: str + ca_certificate=None, # type: object + ca_certificate_group=None, # type: object + ): + """ + Keyword args: + name (str): Name of the object (e.g., a file system or snapshot). + id (str): A non-modifiable, globally unique ID chosen by the system. + ca_certificate (object) + ca_certificate_group (object) + """ + if name is not None: + self.name = name + if id is not None: + self.id = id + if ca_certificate is not None: + self.ca_certificate = ca_certificate + if ca_certificate_group is not None: + self.ca_certificate_group = ca_certificate_group + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `SyslogServerSettings`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(SyslogServerSettings, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, SyslogServerSettings): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/syslog_server_settings_get_response.py b/pypureclient/flashblade/FB_2_14/models/syslog_server_settings_get_response.py new file mode 100644 index 000000000..baf267b40 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/syslog_server_settings_get_response.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class SyslogServerSettingsGetResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'continuation_token': 'str', + 'total_item_count': 'int', + 'items': 'list[SyslogServerSettings]' + } + + attribute_map = { + 'continuation_token': 'continuation_token', + 'total_item_count': 'total_item_count', + 'items': 'items' + } + + required_args = { + } + + def __init__( + self, + continuation_token=None, # type: str + total_item_count=None, # type: int + items=None, # type: List[models.SyslogServerSettings] + ): + """ + Keyword args: + continuation_token (str): Continuation token that can be provided in the `continuation_token` query param to get the next page of data. If you use the `continuation_token` to page through data you are guaranteed to get all items exactly once regardless of how items are modified. If an item is added or deleted during the pagination then it may or may not be returned. The `continuation_token` is generated if the `limit` is less than the remaining number of items, and the default sort is used (no sort is specified). + total_item_count (int): Total number of items after applying `filter` params. + items (list[SyslogServerSettings]) + """ + if continuation_token is not None: + self.continuation_token = continuation_token + if total_item_count is not None: + self.total_item_count = total_item_count + if items is not None: + self.items = items + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `SyslogServerSettingsGetResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(SyslogServerSettingsGetResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, SyslogServerSettingsGetResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/syslog_server_settings_response.py b/pypureclient/flashblade/FB_2_14/models/syslog_server_settings_response.py new file mode 100644 index 000000000..289ca573f --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/syslog_server_settings_response.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class SyslogServerSettingsResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'items': 'list[SyslogServerSettings]' + } + + attribute_map = { + 'items': 'items' + } + + required_args = { + } + + def __init__( + self, + items=None, # type: List[models.SyslogServerSettings] + ): + """ + Keyword args: + items (list[SyslogServerSettings]) + """ + if items is not None: + self.items = items + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `SyslogServerSettingsResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(SyslogServerSettingsResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, SyslogServerSettingsResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/target.py b/pypureclient/flashblade/FB_2_14/models/target.py new file mode 100644 index 000000000..fb84ea6cc --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/target.py @@ -0,0 +1,141 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class Target(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'name': 'str', + 'id': 'str', + 'address': 'str', + 'ca_certificate_group': 'FixedReference', + 'status': 'str', + 'status_details': 'str' + } + + attribute_map = { + 'name': 'name', + 'id': 'id', + 'address': 'address', + 'ca_certificate_group': 'ca_certificate_group', + 'status': 'status', + 'status_details': 'status_details' + } + + required_args = { + } + + def __init__( + self, + name=None, # type: str + id=None, # type: str + address=None, # type: str + ca_certificate_group=None, # type: models.FixedReference + status=None, # type: str + status_details=None, # type: str + ): + """ + Keyword args: + name (str): A name chosen by the user. Can be changed. Must be locally unique. + id (str): A non-modifiable, globally unique ID chosen by the system. + address (str): IP address or FQDN of the target system. + ca_certificate_group (FixedReference): The group of CA certificates that can be used, in addition to well-known Certificate Authority certificates, in order to establish a secure connection to the target system. Defaults to a reference to the `_default_replication_certs` group. + status (str): Status of the connection. Valid values are `connected` and `connecting`. `connected` - The connection is OK. `connecting` - No connection exists and the array is trying to reconnect to the target. + status_details (str): Additional information describing any issues encountered when connecting, or `null` if the `status` is `connected`. + """ + if name is not None: + self.name = name + if id is not None: + self.id = id + if address is not None: + self.address = address + if ca_certificate_group is not None: + self.ca_certificate_group = ca_certificate_group + if status is not None: + self.status = status + if status_details is not None: + self.status_details = status_details + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `Target`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(Target, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, Target): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/target_get_response.py b/pypureclient/flashblade/FB_2_14/models/target_get_response.py new file mode 100644 index 000000000..637d1c62f --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/target_get_response.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class TargetGetResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'continuation_token': 'str', + 'total_item_count': 'int', + 'items': 'list[Target]' + } + + attribute_map = { + 'continuation_token': 'continuation_token', + 'total_item_count': 'total_item_count', + 'items': 'items' + } + + required_args = { + } + + def __init__( + self, + continuation_token=None, # type: str + total_item_count=None, # type: int + items=None, # type: List[models.Target] + ): + """ + Keyword args: + continuation_token (str): Continuation token that can be provided in the `continuation_token` query param to get the next page of data. If you use the `continuation_token` to page through data you are guaranteed to get all items exactly once regardless of how items are modified. If an item is added or deleted during the pagination then it may or may not be returned. The `continuation_token` is generated if the `limit` is less than the remaining number of items, and the default sort is used (no sort is specified). + total_item_count (int): Total number of items after applying `filter` params. + items (list[Target]): A list of target objects. + """ + if continuation_token is not None: + self.continuation_token = continuation_token + if total_item_count is not None: + self.total_item_count = total_item_count + if items is not None: + self.items = items + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `TargetGetResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(TargetGetResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, TargetGetResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/target_post.py b/pypureclient/flashblade/FB_2_14/models/target_post.py new file mode 100644 index 000000000..ec738b755 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/target_post.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class TargetPost(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'address': 'str' + } + + attribute_map = { + 'address': 'address' + } + + required_args = { + } + + def __init__( + self, + address=None, # type: str + ): + """ + Keyword args: + address (str): IP address or FQDN of the target system. + """ + if address is not None: + self.address = address + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `TargetPost`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(TargetPost, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, TargetPost): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/target_response.py b/pypureclient/flashblade/FB_2_14/models/target_response.py new file mode 100644 index 000000000..40373297e --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/target_response.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class TargetResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'items': 'list[Target]' + } + + attribute_map = { + 'items': 'items' + } + + required_args = { + } + + def __init__( + self, + items=None, # type: List[models.Target] + ): + """ + Keyword args: + items (list[Target]): A list of target objects. + """ + if items is not None: + self.items = items + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `TargetResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(TargetResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, TargetResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/test_result.py b/pypureclient/flashblade/FB_2_14/models/test_result.py new file mode 100644 index 000000000..490b211e3 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/test_result.py @@ -0,0 +1,159 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class TestResult(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'component_address': 'str', + 'component_name': 'str', + 'description': 'str', + 'destination': 'str', + 'enabled': 'bool', + 'resource': 'FixedReference', + 'result_details': 'str', + 'success': 'bool', + 'test_type': 'str' + } + + attribute_map = { + 'component_address': 'component_address', + 'component_name': 'component_name', + 'description': 'description', + 'destination': 'destination', + 'enabled': 'enabled', + 'resource': 'resource', + 'result_details': 'result_details', + 'success': 'success', + 'test_type': 'test_type' + } + + required_args = { + } + + def __init__( + self, + component_address=None, # type: str + component_name=None, # type: str + description=None, # type: str + destination=None, # type: str + enabled=None, # type: bool + resource=None, # type: models.FixedReference + result_details=None, # type: str + success=None, # type: bool + test_type=None, # type: str + ): + """ + Keyword args: + component_address (str): Address of the component running the test. + component_name (str): Name of the component running the test. + description (str): What the test is doing. + destination (str): The URI of the target server being tested. + enabled (bool): Is the service enabled or not? + resource (FixedReference): A reference to the object being tested. + result_details (str): Additional information about the test result. + success (bool): Returns a value of `true` if the specified test succeeded. Returns a value of `false` if the specified test failed. + test_type (str): Displays the type of test being performed. The returned values are determined by the `resource` being tested and its configuration. + """ + if component_address is not None: + self.component_address = component_address + if component_name is not None: + self.component_name = component_name + if description is not None: + self.description = description + if destination is not None: + self.destination = destination + if enabled is not None: + self.enabled = enabled + if resource is not None: + self.resource = resource + if result_details is not None: + self.result_details = result_details + if success is not None: + self.success = success + if test_type is not None: + self.test_type = test_type + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `TestResult`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(TestResult, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, TestResult): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/test_result_get_response.py b/pypureclient/flashblade/FB_2_14/models/test_result_get_response.py new file mode 100644 index 000000000..20f5129a6 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/test_result_get_response.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class TestResultGetResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'items': 'list[TestResult]' + } + + attribute_map = { + 'items': 'items' + } + + required_args = { + } + + def __init__( + self, + items=None, # type: List[models.TestResult] + ): + """ + Keyword args: + items (list[TestResult]) + """ + if items is not None: + self.items = items + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `TestResultGetResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(TestResultGetResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, TestResultGetResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/test_result_response.py b/pypureclient/flashblade/FB_2_14/models/test_result_response.py new file mode 100644 index 000000000..612461d54 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/test_result_response.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class TestResultResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'items': 'list[TestResult]' + } + + attribute_map = { + 'items': 'items' + } + + required_args = { + } + + def __init__( + self, + items=None, # type: List[models.TestResult] + ): + """ + Keyword args: + items (list[TestResult]) + """ + if items is not None: + self.items = items + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `TestResultResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(TestResultResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, TestResultResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/throttle.py b/pypureclient/flashblade/FB_2_14/models/throttle.py new file mode 100644 index 000000000..817a73eab --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/throttle.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class Throttle(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'default_limit': 'int', + 'window': 'TimeWindow', + 'window_limit': 'int' + } + + attribute_map = { + 'default_limit': 'default_limit', + 'window': 'window', + 'window_limit': 'window_limit' + } + + required_args = { + } + + def __init__( + self, + default_limit=None, # type: int + window=None, # type: models.TimeWindow + window_limit=None, # type: int + ): + """ + Keyword args: + default_limit (int): Default maximum bandwidth threshold for outbound traffic in bytes. Once exceeded, bandwidth throttling occurs. + window (TimeWindow): The time during which the window_limit threshold is in effect. + window_limit (int): Maximum bandwidth threshold for outbound traffic during the specified `window_limit` time range in bytes. Once exceeded, bandwidth throttling occurs. + """ + if default_limit is not None: + self.default_limit = default_limit + if window is not None: + self.window = window + if window_limit is not None: + self.window_limit = window_limit + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `Throttle`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(Throttle, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, Throttle): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/time_window.py b/pypureclient/flashblade/FB_2_14/models/time_window.py new file mode 100644 index 000000000..236b0bc80 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/time_window.py @@ -0,0 +1,117 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class TimeWindow(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'start': 'int', + 'end': 'int' + } + + attribute_map = { + 'start': 'start', + 'end': 'end' + } + + required_args = { + } + + def __init__( + self, + start=None, # type: int + end=None, # type: int + ): + """ + Keyword args: + start (int): The window start time. Measured in milliseconds since midnight. The time must be set on the hour. (e.g., `18000000`, which is equal to 5:00 AM). + end (int): The window end time. Measured in milliseconds since midnight. The time must be set on the hour. (e.g., `28800000`, which is equal to 8:00 AM). + """ + if start is not None: + self.start = start + if end is not None: + self.end = end + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `TimeWindow`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(TimeWindow, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, TimeWindow): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/time_zone.py b/pypureclient/flashblade/FB_2_14/models/time_zone.py new file mode 100644 index 000000000..7191df374 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/time_zone.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class TimeZone(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'name': 'str' + } + + attribute_map = { + 'name': 'name' + } + + required_args = { + } + + def __init__( + self, + name=None, # type: str + ): + """ + Keyword args: + name (str): Name of the object (e.g., a file system or snapshot). + """ + if name is not None: + self.name = name + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `TimeZone`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(TimeZone, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, TimeZone): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/user.py b/pypureclient/flashblade/FB_2_14/models/user.py new file mode 100644 index 000000000..d64f88c09 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/user.py @@ -0,0 +1,117 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class User(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'id': 'int', + 'name': 'str' + } + + attribute_map = { + 'id': 'id', + 'name': 'name' + } + + required_args = { + } + + def __init__( + self, + id=None, # type: int + name=None, # type: str + ): + """ + Keyword args: + id (int): The numeric user id that represents the user's identity in a POSIX system. + name (str): The user name that represents the user's identity, and which resolves to the user's id in a configured directory service. + """ + if id is not None: + self.id = id + if name is not None: + self.name = name + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `User`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(User, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, User): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/user_no_id.py b/pypureclient/flashblade/FB_2_14/models/user_no_id.py new file mode 100644 index 000000000..95a48b504 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/user_no_id.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class UserNoId(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'name': 'str' + } + + attribute_map = { + 'name': 'name' + } + + required_args = { + } + + def __init__( + self, + name=None, # type: str + ): + """ + Keyword args: + name (str): The user name that represents the user's identity, and which resolves to the user's id in a configured directory service. + """ + if name is not None: + self.name = name + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `UserNoId`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(UserNoId, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, UserNoId): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/user_quota.py b/pypureclient/flashblade/FB_2_14/models/user_quota.py new file mode 100644 index 000000000..bc8c1040b --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/user_quota.py @@ -0,0 +1,141 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class UserQuota(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'name': 'str', + 'file_system': 'FixedReference', + 'file_system_default_quota': 'int', + 'quota': 'int', + 'usage': 'int', + 'user': 'User' + } + + attribute_map = { + 'name': 'name', + 'file_system': 'file_system', + 'file_system_default_quota': 'file_system_default_quota', + 'quota': 'quota', + 'usage': 'usage', + 'user': 'user' + } + + required_args = { + } + + def __init__( + self, + name=None, # type: str + file_system=None, # type: models.FixedReference + file_system_default_quota=None, # type: int + quota=None, # type: int + usage=None, # type: int + user=None, # type: models.User + ): + """ + Keyword args: + name (str): Name of the object (e.g., a file system or snapshot). + file_system (FixedReference) + file_system_default_quota (int): File system's default user quota (in bytes). If it is `0`, it means there is no default quota. This will be the effective user quota if the user doesn't have an individual quota. This default quota is set through the `file-systems` endpoint. + quota (int): The limit of the quota (in bytes) for the specified user, cannot be `0`. If specified, this value will override the file system's default user quota. + usage (int): The usage of the file system (in bytes) by the specified user. + user (User): The user on which this quota is enforced. + """ + if name is not None: + self.name = name + if file_system is not None: + self.file_system = file_system + if file_system_default_quota is not None: + self.file_system_default_quota = file_system_default_quota + if quota is not None: + self.quota = quota + if usage is not None: + self.usage = usage + if user is not None: + self.user = user + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `UserQuota`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(UserQuota, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, UserQuota): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/user_quota_get_response.py b/pypureclient/flashblade/FB_2_14/models/user_quota_get_response.py new file mode 100644 index 000000000..d035bc958 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/user_quota_get_response.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class UserQuotaGetResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'continuation_token': 'str', + 'total_item_count': 'int', + 'items': 'list[UserQuota]' + } + + attribute_map = { + 'continuation_token': 'continuation_token', + 'total_item_count': 'total_item_count', + 'items': 'items' + } + + required_args = { + } + + def __init__( + self, + continuation_token=None, # type: str + total_item_count=None, # type: int + items=None, # type: List[models.UserQuota] + ): + """ + Keyword args: + continuation_token (str): Continuation token that can be provided in the `continuation_token` query param to get the next page of data. If you use the `continuation_token` to page through data you are guaranteed to get all items exactly once regardless of how items are modified. If an item is added or deleted during the pagination then it may or may not be returned. The `continuation_token` is generated if the `limit` is less than the remaining number of items, and the default sort is used (no sort is specified). + total_item_count (int): Total number of items after applying `filter` params. + items (list[UserQuota]): A list of quota objects. + """ + if continuation_token is not None: + self.continuation_token = continuation_token + if total_item_count is not None: + self.total_item_count = total_item_count + if items is not None: + self.items = items + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `UserQuotaGetResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(UserQuotaGetResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, UserQuotaGetResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/user_quota_patch.py b/pypureclient/flashblade/FB_2_14/models/user_quota_patch.py new file mode 100644 index 000000000..57d9c3d6f --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/user_quota_patch.py @@ -0,0 +1,105 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class UserQuotaPatch(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + } + + attribute_map = { + } + + required_args = { + } + + def __init__( + self, + ): + """ + Keyword args: + """ + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `UserQuotaPatch`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(UserQuotaPatch, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, UserQuotaPatch): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/user_quota_post.py b/pypureclient/flashblade/FB_2_14/models/user_quota_post.py new file mode 100644 index 000000000..5d80daab3 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/user_quota_post.py @@ -0,0 +1,119 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class UserQuotaPost(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'name': 'str', + 'quota': 'int' + } + + attribute_map = { + 'name': 'name', + 'quota': 'quota' + } + + required_args = { + 'quota', + } + + def __init__( + self, + quota, # type: int + name=None, # type: str + ): + """ + Keyword args: + name (str): Name of the object (e.g., a file system or snapshot). + quota (int, required): The limit of the quota (in bytes) for the specified user, cannot be `0`. If specified, this value will override the file system's default user quota. + """ + if name is not None: + self.name = name + self.quota = quota + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `UserQuotaPost`".format(key)) + if key == "quota" and value is None: + raise ValueError("Invalid value for `quota`, must not be `None`") + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(UserQuotaPost, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, UserQuotaPost): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/user_quota_response.py b/pypureclient/flashblade/FB_2_14/models/user_quota_response.py new file mode 100644 index 000000000..d4d6a578b --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/user_quota_response.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class UserQuotaResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'items': 'list[UserQuota]' + } + + attribute_map = { + 'items': 'items' + } + + required_args = { + } + + def __init__( + self, + items=None, # type: List[models.UserQuota] + ): + """ + Keyword args: + items (list[UserQuota]): A list of quota objects. + """ + if items is not None: + self.items = items + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `UserQuotaResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(UserQuotaResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, UserQuotaResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/verification_key.py b/pypureclient/flashblade/FB_2_14/models/verification_key.py new file mode 100644 index 000000000..3fe2f8278 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/verification_key.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class VerificationKey(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'key_id': 'int', + 'name': 'str', + 'verification_key': 'str' + } + + attribute_map = { + 'key_id': 'key_id', + 'name': 'name', + 'verification_key': 'verification_key' + } + + required_args = { + } + + def __init__( + self, + key_id=None, # type: int + name=None, # type: str + verification_key=None, # type: str + ): + """ + Keyword args: + key_id (int): The key id of the verification key. + name (str): Name of the verification key. Possible values include `access`. + verification_key (str): The text of the verification key. + """ + if key_id is not None: + self.key_id = key_id + if name is not None: + self.name = name + if verification_key is not None: + self.verification_key = verification_key + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `VerificationKey`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(VerificationKey, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, VerificationKey): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/verification_key_get_response.py b/pypureclient/flashblade/FB_2_14/models/verification_key_get_response.py new file mode 100644 index 000000000..e1db03521 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/verification_key_get_response.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class VerificationKeyGetResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'continuation_token': 'str', + 'total_item_count': 'int', + 'items': 'list[VerificationKey]' + } + + attribute_map = { + 'continuation_token': 'continuation_token', + 'total_item_count': 'total_item_count', + 'items': 'items' + } + + required_args = { + } + + def __init__( + self, + continuation_token=None, # type: str + total_item_count=None, # type: int + items=None, # type: List[models.VerificationKey] + ): + """ + Keyword args: + continuation_token (str): Continuation token that can be provided in the `continuation_token` query param to get the next page of data. If you use the `continuation_token` to page through data you are guaranteed to get all items exactly once regardless of how items are modified. If an item is added or deleted during the pagination then it may or may not be returned. The `continuation_token` is generated if the `limit` is less than the remaining number of items, and the default sort is used (no sort is specified). + total_item_count (int): Total number of items after applying `filter` params. + items (list[VerificationKey]): A list of verification key objects. + """ + if continuation_token is not None: + self.continuation_token = continuation_token + if total_item_count is not None: + self.total_item_count = total_item_count + if items is not None: + self.items = items + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `VerificationKeyGetResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(VerificationKeyGetResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, VerificationKeyGetResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/verification_key_patch.py b/pypureclient/flashblade/FB_2_14/models/verification_key_patch.py new file mode 100644 index 000000000..db96a0e23 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/verification_key_patch.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class VerificationKeyPatch(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'signed_verification_key': 'str' + } + + attribute_map = { + 'signed_verification_key': 'signed_verification_key' + } + + required_args = { + } + + def __init__( + self, + signed_verification_key=None, # type: str + ): + """ + Keyword args: + signed_verification_key (str): The text of the signed verification key. + """ + if signed_verification_key is not None: + self.signed_verification_key = signed_verification_key + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `VerificationKeyPatch`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(VerificationKeyPatch, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, VerificationKeyPatch): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/verification_key_response.py b/pypureclient/flashblade/FB_2_14/models/verification_key_response.py new file mode 100644 index 000000000..bf9dafe66 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/verification_key_response.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class VerificationKeyResponse(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'items': 'list[VerificationKey]' + } + + attribute_map = { + 'items': 'items' + } + + required_args = { + } + + def __init__( + self, + items=None, # type: List[models.VerificationKey] + ): + """ + Keyword args: + items (list[VerificationKey]): A list of verification key objects. + """ + if items is not None: + self.items = items + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `VerificationKeyResponse`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(VerificationKeyResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, VerificationKeyResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/models/version.py b/pypureclient/flashblade/FB_2_14/models/version.py new file mode 100644 index 000000000..5ddc80ade --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/models/version.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re + +import six +import typing + +from ....properties import Property +if typing.TYPE_CHECKING: + from pypureclient.flashblade.FB_2_14 import models + +class Version(object): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'version': 'str' + } + + attribute_map = { + 'version': 'version' + } + + required_args = { + } + + def __init__( + self, + version=None, # type: str + ): + """ + Keyword args: + version (str): A hash of the other properties of this resource. This can be used when updating the resource to ensure there aren't any updates since the resource was read. + """ + if version is not None: + self.version = version + + def __setattr__(self, key, value): + if key not in self.attribute_map: + raise KeyError("Invalid key `{}` for `Version`".format(key)) + self.__dict__[key] = value + + def __getattribute__(self, item): + value = object.__getattribute__(self, item) + if isinstance(value, Property): + return None + else: + return value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + if hasattr(self, attr): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(Version, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, Version): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/pypureclient/flashblade/FB_2_14/rest.py b/pypureclient/flashblade/FB_2_14/rest.py new file mode 100644 index 000000000..4a7c0c034 --- /dev/null +++ b/pypureclient/flashblade/FB_2_14/rest.py @@ -0,0 +1,331 @@ +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.14, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + OpenAPI spec version: 2.14 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import io +import json +import logging +import re +import ssl + +import certifi +# python 2 and python 3 compatibility library +import six +from six.moves.urllib.parse import urlencode + +try: + import urllib3 +except ImportError: + raise ImportError('Swagger python client requires urllib3.') + + +logger = logging.getLogger(__name__) + + +class RESTResponse(io.IOBase): + + def __init__(self, resp): + self.urllib3_response = resp + self.status = resp.status + self.reason = resp.reason + self.data = resp.data + + def getheaders(self): + """Returns a dictionary of the response headers.""" + return self.urllib3_response.getheaders() + + def getheader(self, name, default=None): + """Returns a given response header.""" + return self.urllib3_response.getheader(name, default) + + +class RESTClientObject(object): + + def __init__(self, configuration, pools_size=4, maxsize=None): + # urllib3.PoolManager will pass all kw parameters to connectionpool + # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/poolmanager.py#L75 + # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/connectionpool.py#L680 + # maxsize is the number of requests to host that are allowed in parallel + # Custom SSL certificates and client certificates: http://urllib3.readthedocs.io/en/latest/advanced-usage.html + + # cert_reqs + if configuration.verify_ssl: + cert_reqs = ssl.CERT_REQUIRED + else: + cert_reqs = ssl.CERT_NONE + + # ca_certs + if configuration.ssl_ca_cert: + ca_certs = configuration.ssl_ca_cert + else: + # if not set certificate file, use Mozilla's root certificates. + ca_certs = certifi.where() + + addition_pool_args = {} + if configuration.assert_hostname is not None: + addition_pool_args['assert_hostname'] = configuration.assert_hostname + + if maxsize is None: + if configuration.connection_pool_maxsize is not None: + maxsize = configuration.connection_pool_maxsize + else: + maxsize = 4 + + # https pool manager + if configuration.proxy: + self.pool_manager = urllib3.ProxyManager( + num_pools=pools_size, + maxsize=maxsize, + cert_reqs=cert_reqs, + ca_certs=ca_certs, + cert_file=configuration.cert_file, + key_file=configuration.key_file, + proxy_url=configuration.proxy, + **addition_pool_args + ) + else: + self.pool_manager = urllib3.PoolManager( + num_pools=pools_size, + maxsize=maxsize, + cert_reqs=cert_reqs, + ca_certs=ca_certs, + cert_file=configuration.cert_file, + key_file=configuration.key_file, + **addition_pool_args + ) + + def request(self, method, url, query_params=None, headers=None, + body=None, post_params=None, _preload_content=True, + _request_timeout=None): + """Perform requests. + + :param method: http request method + :param url: http request url + :param query_params: query parameters in the url + :param headers: http request headers + :param body: request json body, for `application/json` + :param post_params: request post parameters, + `application/x-www-form-urlencoded` + and `multipart/form-data` + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + """ + method = method.upper() + assert method in ['GET', 'HEAD', 'DELETE', 'POST', 'PUT', + 'PATCH', 'OPTIONS'] + + if post_params and body: + raise ValueError( + "body parameter cannot be used with post_params parameter." + ) + + post_params = post_params or {} + headers = headers or {} + + timeout = None + if _request_timeout: + if isinstance(_request_timeout, (int, ) if six.PY3 else (int, long)): + timeout = urllib3.Timeout(total=_request_timeout) + elif (isinstance(_request_timeout, tuple) and + len(_request_timeout) == 2): + timeout = urllib3.Timeout( + connect=_request_timeout[0], read=_request_timeout[1]) + + if 'Content-Type' not in headers: + headers['Content-Type'] = 'application/json' + + try: + # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE` + if method in ['POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE']: + if query_params: + url += '?' + urlencode(query_params) + if re.search('json', headers['Content-Type'], re.IGNORECASE): + request_body = None + if body is not None: + request_body = json.dumps(body) + r = self.pool_manager.request( + method, url, + body=request_body, + preload_content=_preload_content, + timeout=timeout, + headers=headers) + elif headers['Content-Type'] == 'application/x-www-form-urlencoded': + r = self.pool_manager.request( + method, url, + fields=post_params, + encode_multipart=False, + preload_content=_preload_content, + timeout=timeout, + headers=headers) + elif headers['Content-Type'] == 'multipart/form-data': + # must del headers['Content-Type'], or the correct + # Content-Type which generated by urllib3 will be + # overwritten. + del headers['Content-Type'] + r = self.pool_manager.request( + method, url, + fields=post_params, + encode_multipart=True, + preload_content=_preload_content, + timeout=timeout, + headers=headers) + # Pass a `string` parameter directly in the body to support + # other content types than Json when `body` argument is + # provided in serialized form + elif isinstance(body, str): + request_body = body + r = self.pool_manager.request( + method, url, + body=request_body, + preload_content=_preload_content, + timeout=timeout, + headers=headers) + else: + # Cannot generate the request from given parameters + msg = """Cannot prepare a request message for provided + arguments. Please check that your arguments match + declared content type.""" + raise ApiException(status=0, reason=msg) + # For `GET`, `HEAD` + else: + r = self.pool_manager.request(method, url, + fields=query_params, + preload_content=_preload_content, + timeout=timeout, + headers=headers) + except urllib3.exceptions.SSLError as e: + msg = "{0}\n{1}".format(type(e).__name__, str(e)) + raise ApiException(status=0, reason=msg) + + if _preload_content: + r = RESTResponse(r) + + # In the python 3, the response.data is bytes. + should_log_body = True + if six.PY3: + try: + decoded_data = r.data.decode('utf8') + r.data = decoded_data + except: + # make sure we don't try to log this data if it's not utf-8 compatible + should_log_body = False + logger.debug("response body could not be decoded using utf-8") + + # log response body if and only if it's not file data. file data might error if we try + # to write it to this log + if should_log_body: + logger.debug("response body: %s", r.data) + + if not 200 <= r.status <= 299: + raise ApiException(http_resp=r) + + return r + + def GET(self, url, headers=None, query_params=None, _preload_content=True, + _request_timeout=None): + return self.request("GET", url, + headers=headers, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + query_params=query_params) + + def HEAD(self, url, headers=None, query_params=None, _preload_content=True, + _request_timeout=None): + return self.request("HEAD", url, + headers=headers, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + query_params=query_params) + + def OPTIONS(self, url, headers=None, query_params=None, post_params=None, + body=None, _preload_content=True, _request_timeout=None): + return self.request("OPTIONS", url, + headers=headers, + query_params=query_params, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + + def DELETE(self, url, headers=None, query_params=None, body=None, + _preload_content=True, _request_timeout=None): + return self.request("DELETE", url, + headers=headers, + query_params=query_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + + def POST(self, url, headers=None, query_params=None, post_params=None, + body=None, _preload_content=True, _request_timeout=None): + return self.request("POST", url, + headers=headers, + query_params=query_params, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + + def PUT(self, url, headers=None, query_params=None, post_params=None, + body=None, _preload_content=True, _request_timeout=None): + return self.request("PUT", url, + headers=headers, + query_params=query_params, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + + def PATCH(self, url, headers=None, query_params=None, post_params=None, + body=None, _preload_content=True, _request_timeout=None): + return self.request("PATCH", url, + headers=headers, + query_params=query_params, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + + +class ApiException(Exception): + + def __init__(self, status=None, reason=None, http_resp=None): + if http_resp: + self.status = http_resp.status + self.reason = http_resp.reason + self.body = http_resp.data + self.headers = http_resp.getheaders() + else: + self.status = status + self.reason = reason + self.body = None + self.headers = None + + def __str__(self): + """Custom error messages for exception""" + error_message = "({0})\n"\ + "Reason: {1}\n".format(self.status, self.reason) + if self.headers: + error_message += "HTTP response headers: {0}\n".format( + self.headers) + + if self.body: + error_message += "HTTP response body: {0}\n".format(self.body) + + return error_message diff --git a/pypureclient/flashblade/__init__.py b/pypureclient/flashblade/__init__.py index ffbd11437..f4cac7dc4 100644 --- a/pypureclient/flashblade/__init__.py +++ b/pypureclient/flashblade/__init__.py @@ -1,2 +1,2 @@ -from .FB_2_13 import * +from .FB_2_14 import * from .client import Client diff --git a/pypureclient/flashblade/client.py b/pypureclient/flashblade/client.py index fe7dfb0f0..cf13f8b41 100644 --- a/pypureclient/flashblade/client.py +++ b/pypureclient/flashblade/client.py @@ -6,20 +6,21 @@ from . import PureError fb_modules_dict = { - '2.0': 'FB_2_0', - '2.1': 'FB_2_1', - '2.2': 'FB_2_2', + '2.10': 'FB_2_10', '2.3': 'FB_2_3', - '2.4': 'FB_2_4', - '2.5': 'FB_2_5', - '2.6': 'FB_2_6', + '2.1': 'FB_2_1', '2.7': 'FB_2_7', + '2.0': 'FB_2_0', + '2.4': 'FB_2_4', + '2.2': 'FB_2_2', + '2.12': 'FB_2_12', + '2.13': 'FB_2_13', '2.8': 'FB_2_8', + '2.6': 'FB_2_6', + '2.14': 'FB_2_14', '2.9': 'FB_2_9', - '2.10': 'FB_2_10', '2.11': 'FB_2_11', - '2.12': 'FB_2_12', - '2.13': 'FB_2_13', + '2.5': 'FB_2_5', } fb_modules = {} diff --git a/setup.py b/setup.py index b044b1a54..b38e98559 100644 --- a/setup.py +++ b/setup.py @@ -9,7 +9,7 @@ from setuptools import setup, find_packages # noqa: H301 NAME = 'py-pure-client' -VERSION = '1.51.0' +VERSION = '1.52.0' REQUIRES = [ 'certifi >=2022.9.24', @@ -36,7 +36,7 @@ author='Pure Storage', author_email='openconnect@purestorage.com', url='https://github.com/PureStorage-OpenConnect/py-pure-client', - download_url='https://github.com/PureStorage-OpenConnect/py-pure-client/archive/1.51.0.tar.gz', + download_url='https://github.com/PureStorage-OpenConnect/py-pure-client/archive/1.52.0.tar.gz', keywords=['Swagger', 'Pure Storage', 'Python', 'clients', 'REST', 'API', 'FlashArray', 'FlashBlade', 'Pure1'], license='BSD 2-Clause', license_files = ('LICENSE.txt',),