vsphere-automation-cis 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/Gemfile +3 -0
- data/Gemfile.lock +81 -0
- data/README.md +173 -0
- data/Rakefile +10 -0
- data/docs/CisSessionCreateResult.md +8 -0
- data/docs/CisSessionInfo.md +10 -0
- data/docs/CisSessionResult.md +8 -0
- data/docs/CisTaggingCategoryAddToUsedBy.md +8 -0
- data/docs/CisTaggingCategoryCreate.md +8 -0
- data/docs/CisTaggingCategoryCreateResult.md +8 -0
- data/docs/CisTaggingCategoryCreateSpec.md +12 -0
- data/docs/CisTaggingCategoryListResult.md +8 -0
- data/docs/CisTaggingCategoryListUsedCategories.md +8 -0
- data/docs/CisTaggingCategoryListUsedCategoriesResult.md +8 -0
- data/docs/CisTaggingCategoryModel.md +13 -0
- data/docs/CisTaggingCategoryModelCardinality.md +7 -0
- data/docs/CisTaggingCategoryRemoveFromUsedBy.md +8 -0
- data/docs/CisTaggingCategoryResult.md +8 -0
- data/docs/CisTaggingCategoryUpdate.md +8 -0
- data/docs/CisTaggingCategoryUpdateSpec.md +11 -0
- data/docs/CisTaggingTagAddToUsedBy.md +8 -0
- data/docs/CisTaggingTagAssociationAttach.md +8 -0
- data/docs/CisTaggingTagAssociationAttachMultipleTagsToObject.md +9 -0
- data/docs/CisTaggingTagAssociationAttachMultipleTagsToObjectResult.md +8 -0
- data/docs/CisTaggingTagAssociationAttachTagToMultipleObjects.md +8 -0
- data/docs/CisTaggingTagAssociationAttachTagToMultipleObjectsResult.md +8 -0
- data/docs/CisTaggingTagAssociationBatchResult.md +9 -0
- data/docs/CisTaggingTagAssociationDetach.md +8 -0
- data/docs/CisTaggingTagAssociationDetachMultipleTagsFromObject.md +9 -0
- data/docs/CisTaggingTagAssociationDetachMultipleTagsFromObjectResult.md +8 -0
- data/docs/CisTaggingTagAssociationDetachTagFromMultipleObjects.md +8 -0
- data/docs/CisTaggingTagAssociationDetachTagFromMultipleObjectsResult.md +8 -0
- data/docs/CisTaggingTagAssociationListAttachableTags.md +8 -0
- data/docs/CisTaggingTagAssociationListAttachableTagsResult.md +8 -0
- data/docs/CisTaggingTagAssociationListAttachedObjectsOnTags.md +8 -0
- data/docs/CisTaggingTagAssociationListAttachedObjectsOnTagsResult.md +8 -0
- data/docs/CisTaggingTagAssociationListAttachedObjectsResult.md +8 -0
- data/docs/CisTaggingTagAssociationListAttachedTags.md +8 -0
- data/docs/CisTaggingTagAssociationListAttachedTagsOnObjects.md +8 -0
- data/docs/CisTaggingTagAssociationListAttachedTagsOnObjectsResult.md +8 -0
- data/docs/CisTaggingTagAssociationListAttachedTagsResult.md +8 -0
- data/docs/CisTaggingTagAssociationObjectToTags.md +9 -0
- data/docs/CisTaggingTagAssociationTagToObjects.md +9 -0
- data/docs/CisTaggingTagCreate.md +8 -0
- data/docs/CisTaggingTagCreateResult.md +8 -0
- data/docs/CisTaggingTagCreateSpec.md +11 -0
- data/docs/CisTaggingTagListResult.md +8 -0
- data/docs/CisTaggingTagListTagsForCategoryResult.md +8 -0
- data/docs/CisTaggingTagListUsedTags.md +8 -0
- data/docs/CisTaggingTagListUsedTagsResult.md +8 -0
- data/docs/CisTaggingTagModel.md +12 -0
- data/docs/CisTaggingTagRemoveFromUsedBy.md +8 -0
- data/docs/CisTaggingTagResult.md +8 -0
- data/docs/CisTaggingTagUpdate.md +8 -0
- data/docs/CisTaggingTagUpdateSpec.md +9 -0
- data/docs/CisTaskInfo.md +19 -0
- data/docs/CisTaskProgress.md +10 -0
- data/docs/CisTaskStatus.md +7 -0
- data/docs/CisTasksFilterSpec.md +12 -0
- data/docs/CisTasksGetSpec.md +9 -0
- data/docs/CisTasksListResult.md +8 -0
- data/docs/CisTasksListResultValue.md +9 -0
- data/docs/CisTasksResult.md +8 -0
- data/docs/FilterSpecTargets.md +9 -0
- data/docs/SessionApi.md +131 -0
- data/docs/TaggingCategoryApi.md +401 -0
- data/docs/TaggingTagApi.md +445 -0
- data/docs/TaggingTagAssociationApi.md +498 -0
- data/docs/TasksApi.md +159 -0
- data/docs/VapiStdDynamicID.md +9 -0
- data/docs/VapiStdErrorsAlreadyExists.md +9 -0
- data/docs/VapiStdErrorsAlreadyExistsError.md +9 -0
- data/docs/VapiStdErrorsError.md +9 -0
- data/docs/VapiStdErrorsErrorError.md +9 -0
- data/docs/VapiStdErrorsInvalidArgument.md +9 -0
- data/docs/VapiStdErrorsInvalidArgumentError.md +9 -0
- data/docs/VapiStdErrorsNotAllowedInCurrentState.md +9 -0
- data/docs/VapiStdErrorsNotAllowedInCurrentStateError.md +9 -0
- data/docs/VapiStdErrorsNotFound.md +9 -0
- data/docs/VapiStdErrorsNotFoundError.md +9 -0
- data/docs/VapiStdErrorsResourceInaccessible.md +9 -0
- data/docs/VapiStdErrorsResourceInaccessibleError.md +9 -0
- data/docs/VapiStdErrorsServiceUnavailable.md +9 -0
- data/docs/VapiStdErrorsServiceUnavailableError.md +9 -0
- data/docs/VapiStdErrorsUnauthenticated.md +9 -0
- data/docs/VapiStdErrorsUnauthenticatedError.md +9 -0
- data/docs/VapiStdErrorsUnauthorized.md +9 -0
- data/docs/VapiStdErrorsUnauthorizedError.md +9 -0
- data/docs/VapiStdErrorsUnsupported.md +9 -0
- data/docs/VapiStdErrorsUnsupportedError.md +9 -0
- data/docs/VapiStdLocalizableMessage.md +10 -0
- data/git_push.sh +55 -0
- data/lib/vsphere-automation-cis.rb +124 -0
- data/lib/vsphere-automation-cis/api/session_api.rb +172 -0
- data/lib/vsphere-automation-cis/api/tagging_category_api.rb +511 -0
- data/lib/vsphere-automation-cis/api/tagging_tag_api.rb +567 -0
- data/lib/vsphere-automation-cis/api/tagging_tag_association_api.rb +654 -0
- data/lib/vsphere-automation-cis/api/tasks_api.rb +212 -0
- data/lib/vsphere-automation-cis/api_client.rb +386 -0
- data/lib/vsphere-automation-cis/api_error.rb +36 -0
- data/lib/vsphere-automation-cis/configuration.rb +200 -0
- data/lib/vsphere-automation-cis/models/cis_session_create_result.rb +188 -0
- data/lib/vsphere-automation-cis/models/cis_session_info.rb +219 -0
- data/lib/vsphere-automation-cis/models/cis_session_result.rb +188 -0
- data/lib/vsphere-automation-cis/models/cis_tagging_category_add_to_used_by.rb +189 -0
- data/lib/vsphere-automation-cis/models/cis_tagging_category_create.rb +188 -0
- data/lib/vsphere-automation-cis/models/cis_tagging_category_create_result.rb +188 -0
- data/lib/vsphere-automation-cis/models/cis_tagging_category_create_spec.rb +245 -0
- data/lib/vsphere-automation-cis/models/cis_tagging_category_list_result.rb +190 -0
- data/lib/vsphere-automation-cis/models/cis_tagging_category_list_used_categories.rb +189 -0
- data/lib/vsphere-automation-cis/models/cis_tagging_category_list_used_categories_result.rb +190 -0
- data/lib/vsphere-automation-cis/models/cis_tagging_category_model.rb +267 -0
- data/lib/vsphere-automation-cis/models/cis_tagging_category_model_cardinality.rb +30 -0
- data/lib/vsphere-automation-cis/models/cis_tagging_category_remove_from_used_by.rb +189 -0
- data/lib/vsphere-automation-cis/models/cis_tagging_category_result.rb +188 -0
- data/lib/vsphere-automation-cis/models/cis_tagging_category_update.rb +188 -0
- data/lib/vsphere-automation-cis/models/cis_tagging_category_update_spec.rb +215 -0
- data/lib/vsphere-automation-cis/models/cis_tagging_tag_add_to_used_by.rb +189 -0
- data/lib/vsphere-automation-cis/models/cis_tagging_tag_association_attach.rb +188 -0
- data/lib/vsphere-automation-cis/models/cis_tagging_tag_association_attach_multiple_tags_to_object.rb +205 -0
- data/lib/vsphere-automation-cis/models/cis_tagging_tag_association_attach_multiple_tags_to_object_result.rb +188 -0
- data/lib/vsphere-automation-cis/models/cis_tagging_tag_association_attach_tag_to_multiple_objects.rb +191 -0
- data/lib/vsphere-automation-cis/models/cis_tagging_tag_association_attach_tag_to_multiple_objects_result.rb +188 -0
- data/lib/vsphere-automation-cis/models/cis_tagging_tag_association_batch_result.rb +206 -0
- data/lib/vsphere-automation-cis/models/cis_tagging_tag_association_detach.rb +188 -0
- data/lib/vsphere-automation-cis/models/cis_tagging_tag_association_detach_multiple_tags_from_object.rb +205 -0
- data/lib/vsphere-automation-cis/models/cis_tagging_tag_association_detach_multiple_tags_from_object_result.rb +188 -0
- data/lib/vsphere-automation-cis/models/cis_tagging_tag_association_detach_tag_from_multiple_objects.rb +191 -0
- data/lib/vsphere-automation-cis/models/cis_tagging_tag_association_detach_tag_from_multiple_objects_result.rb +188 -0
- data/lib/vsphere-automation-cis/models/cis_tagging_tag_association_list_attachable_tags.rb +188 -0
- data/lib/vsphere-automation-cis/models/cis_tagging_tag_association_list_attachable_tags_result.rb +190 -0
- data/lib/vsphere-automation-cis/models/cis_tagging_tag_association_list_attached_objects_on_tags.rb +191 -0
- data/lib/vsphere-automation-cis/models/cis_tagging_tag_association_list_attached_objects_on_tags_result.rb +190 -0
- data/lib/vsphere-automation-cis/models/cis_tagging_tag_association_list_attached_objects_result.rb +190 -0
- data/lib/vsphere-automation-cis/models/cis_tagging_tag_association_list_attached_tags.rb +188 -0
- data/lib/vsphere-automation-cis/models/cis_tagging_tag_association_list_attached_tags_on_objects.rb +191 -0
- data/lib/vsphere-automation-cis/models/cis_tagging_tag_association_list_attached_tags_on_objects_result.rb +190 -0
- data/lib/vsphere-automation-cis/models/cis_tagging_tag_association_list_attached_tags_result.rb +190 -0
- data/lib/vsphere-automation-cis/models/cis_tagging_tag_association_object_to_tags.rb +205 -0
- data/lib/vsphere-automation-cis/models/cis_tagging_tag_association_tag_to_objects.rb +206 -0
- data/lib/vsphere-automation-cis/models/cis_tagging_tag_create.rb +188 -0
- data/lib/vsphere-automation-cis/models/cis_tagging_tag_create_result.rb +188 -0
- data/lib/vsphere-automation-cis/models/cis_tagging_tag_create_spec.rb +229 -0
- data/lib/vsphere-automation-cis/models/cis_tagging_tag_list_result.rb +190 -0
- data/lib/vsphere-automation-cis/models/cis_tagging_tag_list_tags_for_category_result.rb +190 -0
- data/lib/vsphere-automation-cis/models/cis_tagging_tag_list_used_tags.rb +189 -0
- data/lib/vsphere-automation-cis/models/cis_tagging_tag_list_used_tags_result.rb +190 -0
- data/lib/vsphere-automation-cis/models/cis_tagging_tag_model.rb +251 -0
- data/lib/vsphere-automation-cis/models/cis_tagging_tag_remove_from_used_by.rb +189 -0
- data/lib/vsphere-automation-cis/models/cis_tagging_tag_result.rb +188 -0
- data/lib/vsphere-automation-cis/models/cis_tagging_tag_update.rb +188 -0
- data/lib/vsphere-automation-cis/models/cis_tagging_tag_update_spec.rb +194 -0
- data/lib/vsphere-automation-cis/models/cis_task_info.rb +315 -0
- data/lib/vsphere-automation-cis/models/cis_task_progress.rb +218 -0
- data/lib/vsphere-automation-cis/models/cis_task_status.rb +33 -0
- data/lib/vsphere-automation-cis/models/cis_tasks_filter_spec.rb +234 -0
- data/lib/vsphere-automation-cis/models/cis_tasks_get_spec.rb +194 -0
- data/lib/vsphere-automation-cis/models/cis_tasks_list_result.rb +190 -0
- data/lib/vsphere-automation-cis/models/cis_tasks_list_result_value.rb +192 -0
- data/lib/vsphere-automation-cis/models/cis_tasks_result.rb +188 -0
- data/lib/vsphere-automation-cis/models/filter_spec_targets.rb +204 -0
- data/lib/vsphere-automation-cis/models/vapi_std_dynamic_id.rb +204 -0
- data/lib/vsphere-automation-cis/models/vapi_std_errors_already_exists.rb +201 -0
- data/lib/vsphere-automation-cis/models/vapi_std_errors_already_exists_error.rb +192 -0
- data/lib/vsphere-automation-cis/models/vapi_std_errors_error.rb +201 -0
- data/lib/vsphere-automation-cis/models/vapi_std_errors_error_error.rb +192 -0
- data/lib/vsphere-automation-cis/models/vapi_std_errors_invalid_argument.rb +201 -0
- data/lib/vsphere-automation-cis/models/vapi_std_errors_invalid_argument_error.rb +192 -0
- data/lib/vsphere-automation-cis/models/vapi_std_errors_not_allowed_in_current_state.rb +201 -0
- data/lib/vsphere-automation-cis/models/vapi_std_errors_not_allowed_in_current_state_error.rb +192 -0
- data/lib/vsphere-automation-cis/models/vapi_std_errors_not_found.rb +201 -0
- data/lib/vsphere-automation-cis/models/vapi_std_errors_not_found_error.rb +192 -0
- data/lib/vsphere-automation-cis/models/vapi_std_errors_resource_inaccessible.rb +201 -0
- data/lib/vsphere-automation-cis/models/vapi_std_errors_resource_inaccessible_error.rb +192 -0
- data/lib/vsphere-automation-cis/models/vapi_std_errors_service_unavailable.rb +201 -0
- data/lib/vsphere-automation-cis/models/vapi_std_errors_service_unavailable_error.rb +192 -0
- data/lib/vsphere-automation-cis/models/vapi_std_errors_unauthenticated.rb +201 -0
- data/lib/vsphere-automation-cis/models/vapi_std_errors_unauthenticated_error.rb +192 -0
- data/lib/vsphere-automation-cis/models/vapi_std_errors_unauthorized.rb +201 -0
- data/lib/vsphere-automation-cis/models/vapi_std_errors_unauthorized_error.rb +192 -0
- data/lib/vsphere-automation-cis/models/vapi_std_errors_unsupported.rb +201 -0
- data/lib/vsphere-automation-cis/models/vapi_std_errors_unsupported_error.rb +192 -0
- data/lib/vsphere-automation-cis/models/vapi_std_localizable_message.rb +221 -0
- data/lib/vsphere-automation-cis/version.rb +15 -0
- data/spec/api/session_api_spec.rb +64 -0
- data/spec/api/tagging_category_api_spec.rb +134 -0
- data/spec/api/tagging_tag_api_spec.rb +145 -0
- data/spec/api/tagging_tag_association_api_spec.rb +158 -0
- data/spec/api/tasks_api_spec.rb +74 -0
- data/spec/api_client_spec.rb +224 -0
- data/spec/configuration_spec.rb +40 -0
- data/spec/models/cis_session_create_result_spec.rb +39 -0
- data/spec/models/cis_session_info_spec.rb +51 -0
- data/spec/models/cis_session_result_spec.rb +39 -0
- data/spec/models/cis_tagging_category_add_to_used_by_spec.rb +39 -0
- data/spec/models/cis_tagging_category_create_result_spec.rb +39 -0
- data/spec/models/cis_tagging_category_create_spec.rb +39 -0
- data/spec/models/cis_tagging_category_create_spec_spec.rb +63 -0
- data/spec/models/cis_tagging_category_list_result_spec.rb +39 -0
- data/spec/models/cis_tagging_category_list_used_categories_result_spec.rb +39 -0
- data/spec/models/cis_tagging_category_list_used_categories_spec.rb +39 -0
- data/spec/models/cis_tagging_category_model_cardinality_spec.rb +33 -0
- data/spec/models/cis_tagging_category_model_spec.rb +69 -0
- data/spec/models/cis_tagging_category_remove_from_used_by_spec.rb +39 -0
- data/spec/models/cis_tagging_category_result_spec.rb +39 -0
- data/spec/models/cis_tagging_category_update_spec.rb +39 -0
- data/spec/models/cis_tagging_category_update_spec_spec.rb +57 -0
- data/spec/models/cis_tagging_tag_add_to_used_by_spec.rb +39 -0
- data/spec/models/cis_tagging_tag_association_attach_multiple_tags_to_object_result_spec.rb +39 -0
- data/spec/models/cis_tagging_tag_association_attach_multiple_tags_to_object_spec.rb +45 -0
- data/spec/models/cis_tagging_tag_association_attach_spec.rb +39 -0
- data/spec/models/cis_tagging_tag_association_attach_tag_to_multiple_objects_result_spec.rb +39 -0
- data/spec/models/cis_tagging_tag_association_attach_tag_to_multiple_objects_spec.rb +39 -0
- data/spec/models/cis_tagging_tag_association_batch_result_spec.rb +45 -0
- data/spec/models/cis_tagging_tag_association_detach_multiple_tags_from_object_result_spec.rb +39 -0
- data/spec/models/cis_tagging_tag_association_detach_multiple_tags_from_object_spec.rb +45 -0
- data/spec/models/cis_tagging_tag_association_detach_spec.rb +39 -0
- data/spec/models/cis_tagging_tag_association_detach_tag_from_multiple_objects_result_spec.rb +39 -0
- data/spec/models/cis_tagging_tag_association_detach_tag_from_multiple_objects_spec.rb +39 -0
- data/spec/models/cis_tagging_tag_association_list_attachable_tags_result_spec.rb +39 -0
- data/spec/models/cis_tagging_tag_association_list_attachable_tags_spec.rb +39 -0
- data/spec/models/cis_tagging_tag_association_list_attached_objects_on_tags_result_spec.rb +39 -0
- data/spec/models/cis_tagging_tag_association_list_attached_objects_on_tags_spec.rb +39 -0
- data/spec/models/cis_tagging_tag_association_list_attached_objects_result_spec.rb +39 -0
- data/spec/models/cis_tagging_tag_association_list_attached_tags_on_objects_result_spec.rb +39 -0
- data/spec/models/cis_tagging_tag_association_list_attached_tags_on_objects_spec.rb +39 -0
- data/spec/models/cis_tagging_tag_association_list_attached_tags_result_spec.rb +39 -0
- data/spec/models/cis_tagging_tag_association_list_attached_tags_spec.rb +39 -0
- data/spec/models/cis_tagging_tag_association_object_to_tags_spec.rb +45 -0
- data/spec/models/cis_tagging_tag_association_tag_to_objects_spec.rb +45 -0
- data/spec/models/cis_tagging_tag_create_result_spec.rb +39 -0
- data/spec/models/cis_tagging_tag_create_spec.rb +39 -0
- data/spec/models/cis_tagging_tag_create_spec_spec.rb +57 -0
- data/spec/models/cis_tagging_tag_list_result_spec.rb +39 -0
- data/spec/models/cis_tagging_tag_list_tags_for_category_result_spec.rb +39 -0
- data/spec/models/cis_tagging_tag_list_used_tags_result_spec.rb +39 -0
- data/spec/models/cis_tagging_tag_list_used_tags_spec.rb +39 -0
- data/spec/models/cis_tagging_tag_model_spec.rb +63 -0
- data/spec/models/cis_tagging_tag_remove_from_used_by_spec.rb +39 -0
- data/spec/models/cis_tagging_tag_result_spec.rb +39 -0
- data/spec/models/cis_tagging_tag_update_spec.rb +39 -0
- data/spec/models/cis_tagging_tag_update_spec_spec.rb +45 -0
- data/spec/models/cis_task_info_spec.rb +105 -0
- data/spec/models/cis_task_progress_spec.rb +51 -0
- data/spec/models/cis_task_status_spec.rb +33 -0
- data/spec/models/cis_tasks_filter_spec_spec.rb +63 -0
- data/spec/models/cis_tasks_get_spec_spec.rb +45 -0
- data/spec/models/cis_tasks_list_result_spec.rb +39 -0
- data/spec/models/cis_tasks_list_result_value_spec.rb +45 -0
- data/spec/models/cis_tasks_result_spec.rb +39 -0
- data/spec/models/filter_spec_targets_spec.rb +45 -0
- data/spec/models/vapi_std_dynamic_id_spec.rb +45 -0
- data/spec/models/vapi_std_errors_already_exists_error_spec.rb +45 -0
- data/spec/models/vapi_std_errors_already_exists_spec.rb +45 -0
- data/spec/models/vapi_std_errors_error_error_spec.rb +45 -0
- data/spec/models/vapi_std_errors_error_spec.rb +45 -0
- data/spec/models/vapi_std_errors_invalid_argument_error_spec.rb +45 -0
- data/spec/models/vapi_std_errors_invalid_argument_spec.rb +45 -0
- data/spec/models/vapi_std_errors_not_allowed_in_current_state_error_spec.rb +45 -0
- data/spec/models/vapi_std_errors_not_allowed_in_current_state_spec.rb +45 -0
- data/spec/models/vapi_std_errors_not_found_error_spec.rb +45 -0
- data/spec/models/vapi_std_errors_not_found_spec.rb +45 -0
- data/spec/models/vapi_std_errors_resource_inaccessible_error_spec.rb +45 -0
- data/spec/models/vapi_std_errors_resource_inaccessible_spec.rb +45 -0
- data/spec/models/vapi_std_errors_service_unavailable_error_spec.rb +45 -0
- data/spec/models/vapi_std_errors_service_unavailable_spec.rb +45 -0
- data/spec/models/vapi_std_errors_unauthenticated_error_spec.rb +45 -0
- data/spec/models/vapi_std_errors_unauthenticated_spec.rb +45 -0
- data/spec/models/vapi_std_errors_unauthorized_error_spec.rb +45 -0
- data/spec/models/vapi_std_errors_unauthorized_spec.rb +45 -0
- data/spec/models/vapi_std_errors_unsupported_error_spec.rb +45 -0
- data/spec/models/vapi_std_errors_unsupported_spec.rb +45 -0
- data/spec/models/vapi_std_localizable_message_spec.rb +51 -0
- data/spec/spec_helper.rb +109 -0
- data/vsphere-automation-cis.gemspec +43 -0
- metadata +535 -0
@@ -0,0 +1,224 @@
|
|
1
|
+
=begin
|
2
|
+
# DO NOT MODIFY. THIS CODE IS GENERATED. CHANGES WILL BE OVERWRITTEN.
|
3
|
+
|
4
|
+
# cis
|
5
|
+
|
6
|
+
# No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
7
|
+
|
8
|
+
|
9
|
+
=end
|
10
|
+
|
11
|
+
require 'spec_helper'
|
12
|
+
|
13
|
+
describe VSphereAutomation::ApiClient do
|
14
|
+
context 'initialization' do
|
15
|
+
context 'URL stuff' do
|
16
|
+
context 'host' do
|
17
|
+
it 'removes http from host' do
|
18
|
+
VSphereAutomation.configure { |c| c.host = 'http://example.com' }
|
19
|
+
expect(VSphereAutomation::Configuration.default.host).to eq('example.com')
|
20
|
+
end
|
21
|
+
|
22
|
+
it 'removes https from host' do
|
23
|
+
VSphereAutomation.configure { |c| c.host = 'https://wookiee.com' }
|
24
|
+
expect(VSphereAutomation::ApiClient.default.config.host).to eq('wookiee.com')
|
25
|
+
end
|
26
|
+
|
27
|
+
it 'removes trailing path from host' do
|
28
|
+
VSphereAutomation.configure { |c| c.host = 'hobo.com/v4' }
|
29
|
+
expect(VSphereAutomation::Configuration.default.host).to eq('hobo.com')
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
33
|
+
context 'base_path' do
|
34
|
+
it "prepends a slash to base_path" do
|
35
|
+
VSphereAutomation.configure { |c| c.base_path = 'v4/dog' }
|
36
|
+
expect(VSphereAutomation::Configuration.default.base_path).to eq('/v4/dog')
|
37
|
+
end
|
38
|
+
|
39
|
+
it "doesn't prepend a slash if one is already there" do
|
40
|
+
VSphereAutomation.configure { |c| c.base_path = '/v4/dog' }
|
41
|
+
expect(VSphereAutomation::Configuration.default.base_path).to eq('/v4/dog')
|
42
|
+
end
|
43
|
+
|
44
|
+
it "ends up as a blank string if nil" do
|
45
|
+
VSphereAutomation.configure { |c| c.base_path = nil }
|
46
|
+
expect(VSphereAutomation::Configuration.default.base_path).to eq('')
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
51
|
+
|
52
|
+
describe 'params_encoding in #build_request' do
|
53
|
+
let(:config) { VSphereAutomation::Configuration.new }
|
54
|
+
let(:api_client) { VSphereAutomation::ApiClient.new(config) }
|
55
|
+
|
56
|
+
it 'defaults to nil' do
|
57
|
+
expect(VSphereAutomation::Configuration.default.params_encoding).to eq(nil)
|
58
|
+
expect(config.params_encoding).to eq(nil)
|
59
|
+
|
60
|
+
request = api_client.build_request(:get, '/test')
|
61
|
+
expect(request.options[:params_encoding]).to eq(nil)
|
62
|
+
end
|
63
|
+
|
64
|
+
it 'can be customized' do
|
65
|
+
config.params_encoding = :multi
|
66
|
+
request = api_client.build_request(:get, '/test')
|
67
|
+
expect(request.options[:params_encoding]).to eq(:multi)
|
68
|
+
end
|
69
|
+
end
|
70
|
+
|
71
|
+
describe 'timeout in #build_request' do
|
72
|
+
let(:config) { VSphereAutomation::Configuration.new }
|
73
|
+
let(:api_client) { VSphereAutomation::ApiClient.new(config) }
|
74
|
+
|
75
|
+
it 'defaults to 0' do
|
76
|
+
expect(VSphereAutomation::Configuration.default.timeout).to eq(0)
|
77
|
+
expect(config.timeout).to eq(0)
|
78
|
+
|
79
|
+
request = api_client.build_request(:get, '/test')
|
80
|
+
expect(request.options[:timeout]).to eq(0)
|
81
|
+
end
|
82
|
+
|
83
|
+
it 'can be customized' do
|
84
|
+
config.timeout = 100
|
85
|
+
request = api_client.build_request(:get, '/test')
|
86
|
+
expect(request.options[:timeout]).to eq(100)
|
87
|
+
end
|
88
|
+
end
|
89
|
+
|
90
|
+
describe '#deserialize' do
|
91
|
+
it "handles Array<Integer>" do
|
92
|
+
api_client = VSphereAutomation::ApiClient.new
|
93
|
+
headers = { 'Content-Type' => 'application/json' }
|
94
|
+
response = double('response', headers: headers, body: '[12, 34]')
|
95
|
+
data = api_client.deserialize(response, 'Array<Integer>')
|
96
|
+
expect(data).to be_instance_of(Array)
|
97
|
+
expect(data).to eq([12, 34])
|
98
|
+
end
|
99
|
+
|
100
|
+
it 'handles Array<Array<Integer>>' do
|
101
|
+
api_client = VSphereAutomation::ApiClient.new
|
102
|
+
headers = { 'Content-Type' => 'application/json' }
|
103
|
+
response = double('response', headers: headers, body: '[[12, 34], [56]]')
|
104
|
+
data = api_client.deserialize(response, 'Array<Array<Integer>>')
|
105
|
+
expect(data).to be_instance_of(Array)
|
106
|
+
expect(data).to eq([[12, 34], [56]])
|
107
|
+
end
|
108
|
+
|
109
|
+
it 'handles Hash<String, String>' do
|
110
|
+
api_client = VSphereAutomation::ApiClient.new
|
111
|
+
headers = { 'Content-Type' => 'application/json' }
|
112
|
+
response = double('response', headers: headers, body: '{"message": "Hello"}')
|
113
|
+
data = api_client.deserialize(response, 'Hash<String, String>')
|
114
|
+
expect(data).to be_instance_of(Hash)
|
115
|
+
expect(data).to eq(:message => 'Hello')
|
116
|
+
end
|
117
|
+
end
|
118
|
+
|
119
|
+
describe "#object_to_hash" do
|
120
|
+
it 'ignores nils and includes empty arrays' do
|
121
|
+
# uncomment below to test object_to_hash for model
|
122
|
+
# api_client = VSphereAutomation::ApiClient.new
|
123
|
+
# _model = VSphereAutomation::ModelName.new
|
124
|
+
# update the model attribute below
|
125
|
+
# _model.id = 1
|
126
|
+
# update the expected value (hash) below
|
127
|
+
# expected = {id: 1, name: '', tags: []}
|
128
|
+
# expect(api_client.object_to_hash(_model)).to eq(expected)
|
129
|
+
end
|
130
|
+
end
|
131
|
+
|
132
|
+
describe '#build_collection_param' do
|
133
|
+
let(:param) { ['aa', 'bb', 'cc'] }
|
134
|
+
let(:api_client) { VSphereAutomation::ApiClient.new }
|
135
|
+
|
136
|
+
it 'works for csv' do
|
137
|
+
expect(api_client.build_collection_param(param, :csv)).to eq('aa,bb,cc')
|
138
|
+
end
|
139
|
+
|
140
|
+
it 'works for ssv' do
|
141
|
+
expect(api_client.build_collection_param(param, :ssv)).to eq('aa bb cc')
|
142
|
+
end
|
143
|
+
|
144
|
+
it 'works for tsv' do
|
145
|
+
expect(api_client.build_collection_param(param, :tsv)).to eq("aa\tbb\tcc")
|
146
|
+
end
|
147
|
+
|
148
|
+
it 'works for pipes' do
|
149
|
+
expect(api_client.build_collection_param(param, :pipes)).to eq('aa|bb|cc')
|
150
|
+
end
|
151
|
+
|
152
|
+
it 'works for multi' do
|
153
|
+
expect(api_client.build_collection_param(param, :multi)).to eq(['aa', 'bb', 'cc'])
|
154
|
+
end
|
155
|
+
|
156
|
+
it 'fails for invalid collection format' do
|
157
|
+
expect(proc { api_client.build_collection_param(param, :INVALID) }).to raise_error(RuntimeError, 'unknown collection format: :INVALID')
|
158
|
+
end
|
159
|
+
end
|
160
|
+
|
161
|
+
describe '#json_mime?' do
|
162
|
+
let(:api_client) { VSphereAutomation::ApiClient.new }
|
163
|
+
|
164
|
+
it 'works' do
|
165
|
+
expect(api_client.json_mime?(nil)).to eq false
|
166
|
+
expect(api_client.json_mime?('')).to eq false
|
167
|
+
|
168
|
+
expect(api_client.json_mime?('application/json')).to eq true
|
169
|
+
expect(api_client.json_mime?('application/json; charset=UTF8')).to eq true
|
170
|
+
expect(api_client.json_mime?('APPLICATION/JSON')).to eq true
|
171
|
+
|
172
|
+
expect(api_client.json_mime?('application/xml')).to eq false
|
173
|
+
expect(api_client.json_mime?('text/plain')).to eq false
|
174
|
+
expect(api_client.json_mime?('application/jsonp')).to eq false
|
175
|
+
end
|
176
|
+
end
|
177
|
+
|
178
|
+
describe '#select_header_accept' do
|
179
|
+
let(:api_client) { VSphereAutomation::ApiClient.new }
|
180
|
+
|
181
|
+
it 'works' do
|
182
|
+
expect(api_client.select_header_accept(nil)).to be_nil
|
183
|
+
expect(api_client.select_header_accept([])).to be_nil
|
184
|
+
|
185
|
+
expect(api_client.select_header_accept(['application/json'])).to eq('application/json')
|
186
|
+
expect(api_client.select_header_accept(['application/xml', 'application/json; charset=UTF8'])).to eq('application/json; charset=UTF8')
|
187
|
+
expect(api_client.select_header_accept(['APPLICATION/JSON', 'text/html'])).to eq('APPLICATION/JSON')
|
188
|
+
|
189
|
+
expect(api_client.select_header_accept(['application/xml'])).to eq('application/xml')
|
190
|
+
expect(api_client.select_header_accept(['text/html', 'application/xml'])).to eq('text/html,application/xml')
|
191
|
+
end
|
192
|
+
end
|
193
|
+
|
194
|
+
describe '#select_header_content_type' do
|
195
|
+
let(:api_client) { VSphereAutomation::ApiClient.new }
|
196
|
+
|
197
|
+
it 'works' do
|
198
|
+
expect(api_client.select_header_content_type(nil)).to eq('application/json')
|
199
|
+
expect(api_client.select_header_content_type([])).to eq('application/json')
|
200
|
+
|
201
|
+
expect(api_client.select_header_content_type(['application/json'])).to eq('application/json')
|
202
|
+
expect(api_client.select_header_content_type(['application/xml', 'application/json; charset=UTF8'])).to eq('application/json; charset=UTF8')
|
203
|
+
expect(api_client.select_header_content_type(['APPLICATION/JSON', 'text/html'])).to eq('APPLICATION/JSON')
|
204
|
+
expect(api_client.select_header_content_type(['application/xml'])).to eq('application/xml')
|
205
|
+
expect(api_client.select_header_content_type(['text/plain', 'application/xml'])).to eq('text/plain')
|
206
|
+
end
|
207
|
+
end
|
208
|
+
|
209
|
+
describe '#sanitize_filename' do
|
210
|
+
let(:api_client) { VSphereAutomation::ApiClient.new }
|
211
|
+
|
212
|
+
it 'works' do
|
213
|
+
expect(api_client.sanitize_filename('sun')).to eq('sun')
|
214
|
+
expect(api_client.sanitize_filename('sun.gif')).to eq('sun.gif')
|
215
|
+
expect(api_client.sanitize_filename('../sun.gif')).to eq('sun.gif')
|
216
|
+
expect(api_client.sanitize_filename('/var/tmp/sun.gif')).to eq('sun.gif')
|
217
|
+
expect(api_client.sanitize_filename('./sun.gif')).to eq('sun.gif')
|
218
|
+
expect(api_client.sanitize_filename('..\sun.gif')).to eq('sun.gif')
|
219
|
+
expect(api_client.sanitize_filename('\var\tmp\sun.gif')).to eq('sun.gif')
|
220
|
+
expect(api_client.sanitize_filename('c:\var\tmp\sun.gif')).to eq('sun.gif')
|
221
|
+
expect(api_client.sanitize_filename('.\sun.gif')).to eq('sun.gif')
|
222
|
+
end
|
223
|
+
end
|
224
|
+
end
|
@@ -0,0 +1,40 @@
|
|
1
|
+
=begin
|
2
|
+
# DO NOT MODIFY. THIS CODE IS GENERATED. CHANGES WILL BE OVERWRITTEN.
|
3
|
+
|
4
|
+
# cis
|
5
|
+
|
6
|
+
# No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
7
|
+
|
8
|
+
|
9
|
+
=end
|
10
|
+
|
11
|
+
require 'spec_helper'
|
12
|
+
|
13
|
+
describe VSphereAutomation::Configuration do
|
14
|
+
let(:config) { VSphereAutomation::Configuration.default }
|
15
|
+
|
16
|
+
before(:each) do
|
17
|
+
# uncomment below to setup host and base_path
|
18
|
+
# require 'URI'
|
19
|
+
# uri = URI.parse("https://<vcenter>/rest")
|
20
|
+
# VSphereAutomation.configure do |c|
|
21
|
+
# c.host = uri.host
|
22
|
+
# c.base_path = uri.path
|
23
|
+
# end
|
24
|
+
end
|
25
|
+
|
26
|
+
describe '#base_url' do
|
27
|
+
it 'should have the default value' do
|
28
|
+
# uncomment below to test default value of the base path
|
29
|
+
# expect(config.base_url).to eq("https://<vcenter>/rest")
|
30
|
+
end
|
31
|
+
|
32
|
+
it 'should remove trailing slashes' do
|
33
|
+
[nil, '', '/', '//'].each do |base_path|
|
34
|
+
config.base_path = base_path
|
35
|
+
# uncomment below to test trailing slashes
|
36
|
+
# expect(config.base_url).to eq("https://<vcenter>/rest")
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
@@ -0,0 +1,39 @@
|
|
1
|
+
=begin
|
2
|
+
# DO NOT MODIFY. THIS CODE IS GENERATED. CHANGES WILL BE OVERWRITTEN.
|
3
|
+
|
4
|
+
# cis
|
5
|
+
|
6
|
+
# No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
7
|
+
|
8
|
+
|
9
|
+
=end
|
10
|
+
|
11
|
+
require 'spec_helper'
|
12
|
+
require 'json'
|
13
|
+
require 'date'
|
14
|
+
|
15
|
+
# Unit tests for VSphereAutomation::CIS::CisSessionCreateResult
|
16
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
17
|
+
# Please update as you see appropriate
|
18
|
+
describe 'CisSessionCreateResult' do
|
19
|
+
before do
|
20
|
+
# run before each test
|
21
|
+
@instance = VSphereAutomation::CIS::CisSessionCreateResult.new
|
22
|
+
end
|
23
|
+
|
24
|
+
after do
|
25
|
+
# run after each test
|
26
|
+
end
|
27
|
+
|
28
|
+
describe 'test an instance of CisSessionCreateResult' do
|
29
|
+
it 'should create an instance of CisSessionCreateResult' do
|
30
|
+
expect(@instance).to be_instance_of(VSphereAutomation::CIS::CisSessionCreateResult)
|
31
|
+
end
|
32
|
+
end
|
33
|
+
describe 'test attribute "value"' do
|
34
|
+
it 'should work' do
|
35
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
39
|
+
end
|
@@ -0,0 +1,51 @@
|
|
1
|
+
=begin
|
2
|
+
# DO NOT MODIFY. THIS CODE IS GENERATED. CHANGES WILL BE OVERWRITTEN.
|
3
|
+
|
4
|
+
# cis
|
5
|
+
|
6
|
+
# No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
7
|
+
|
8
|
+
|
9
|
+
=end
|
10
|
+
|
11
|
+
require 'spec_helper'
|
12
|
+
require 'json'
|
13
|
+
require 'date'
|
14
|
+
|
15
|
+
# Unit tests for VSphereAutomation::CIS::CisSessionInfo
|
16
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
17
|
+
# Please update as you see appropriate
|
18
|
+
describe 'CisSessionInfo' do
|
19
|
+
before do
|
20
|
+
# run before each test
|
21
|
+
@instance = VSphereAutomation::CIS::CisSessionInfo.new
|
22
|
+
end
|
23
|
+
|
24
|
+
after do
|
25
|
+
# run after each test
|
26
|
+
end
|
27
|
+
|
28
|
+
describe 'test an instance of CisSessionInfo' do
|
29
|
+
it 'should create an instance of CisSessionInfo' do
|
30
|
+
expect(@instance).to be_instance_of(VSphereAutomation::CIS::CisSessionInfo)
|
31
|
+
end
|
32
|
+
end
|
33
|
+
describe 'test attribute "user"' do
|
34
|
+
it 'should work' do
|
35
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
39
|
+
describe 'test attribute "created_time"' do
|
40
|
+
it 'should work' do
|
41
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
describe 'test attribute "last_accessed_time"' do
|
46
|
+
it 'should work' do
|
47
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
48
|
+
end
|
49
|
+
end
|
50
|
+
|
51
|
+
end
|
@@ -0,0 +1,39 @@
|
|
1
|
+
=begin
|
2
|
+
# DO NOT MODIFY. THIS CODE IS GENERATED. CHANGES WILL BE OVERWRITTEN.
|
3
|
+
|
4
|
+
# cis
|
5
|
+
|
6
|
+
# No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
7
|
+
|
8
|
+
|
9
|
+
=end
|
10
|
+
|
11
|
+
require 'spec_helper'
|
12
|
+
require 'json'
|
13
|
+
require 'date'
|
14
|
+
|
15
|
+
# Unit tests for VSphereAutomation::CIS::CisSessionResult
|
16
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
17
|
+
# Please update as you see appropriate
|
18
|
+
describe 'CisSessionResult' do
|
19
|
+
before do
|
20
|
+
# run before each test
|
21
|
+
@instance = VSphereAutomation::CIS::CisSessionResult.new
|
22
|
+
end
|
23
|
+
|
24
|
+
after do
|
25
|
+
# run after each test
|
26
|
+
end
|
27
|
+
|
28
|
+
describe 'test an instance of CisSessionResult' do
|
29
|
+
it 'should create an instance of CisSessionResult' do
|
30
|
+
expect(@instance).to be_instance_of(VSphereAutomation::CIS::CisSessionResult)
|
31
|
+
end
|
32
|
+
end
|
33
|
+
describe 'test attribute "value"' do
|
34
|
+
it 'should work' do
|
35
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
39
|
+
end
|
@@ -0,0 +1,39 @@
|
|
1
|
+
=begin
|
2
|
+
# DO NOT MODIFY. THIS CODE IS GENERATED. CHANGES WILL BE OVERWRITTEN.
|
3
|
+
|
4
|
+
# cis
|
5
|
+
|
6
|
+
# No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
7
|
+
|
8
|
+
|
9
|
+
=end
|
10
|
+
|
11
|
+
require 'spec_helper'
|
12
|
+
require 'json'
|
13
|
+
require 'date'
|
14
|
+
|
15
|
+
# Unit tests for VSphereAutomation::CIS::CisTaggingCategoryAddToUsedBy
|
16
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
17
|
+
# Please update as you see appropriate
|
18
|
+
describe 'CisTaggingCategoryAddToUsedBy' do
|
19
|
+
before do
|
20
|
+
# run before each test
|
21
|
+
@instance = VSphereAutomation::CIS::CisTaggingCategoryAddToUsedBy.new
|
22
|
+
end
|
23
|
+
|
24
|
+
after do
|
25
|
+
# run after each test
|
26
|
+
end
|
27
|
+
|
28
|
+
describe 'test an instance of CisTaggingCategoryAddToUsedBy' do
|
29
|
+
it 'should create an instance of CisTaggingCategoryAddToUsedBy' do
|
30
|
+
expect(@instance).to be_instance_of(VSphereAutomation::CIS::CisTaggingCategoryAddToUsedBy)
|
31
|
+
end
|
32
|
+
end
|
33
|
+
describe 'test attribute "used_by_entity"' do
|
34
|
+
it 'should work' do
|
35
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
39
|
+
end
|
@@ -0,0 +1,39 @@
|
|
1
|
+
=begin
|
2
|
+
# DO NOT MODIFY. THIS CODE IS GENERATED. CHANGES WILL BE OVERWRITTEN.
|
3
|
+
|
4
|
+
# cis
|
5
|
+
|
6
|
+
# No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
7
|
+
|
8
|
+
|
9
|
+
=end
|
10
|
+
|
11
|
+
require 'spec_helper'
|
12
|
+
require 'json'
|
13
|
+
require 'date'
|
14
|
+
|
15
|
+
# Unit tests for VSphereAutomation::CIS::CisTaggingCategoryCreateResult
|
16
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
17
|
+
# Please update as you see appropriate
|
18
|
+
describe 'CisTaggingCategoryCreateResult' do
|
19
|
+
before do
|
20
|
+
# run before each test
|
21
|
+
@instance = VSphereAutomation::CIS::CisTaggingCategoryCreateResult.new
|
22
|
+
end
|
23
|
+
|
24
|
+
after do
|
25
|
+
# run after each test
|
26
|
+
end
|
27
|
+
|
28
|
+
describe 'test an instance of CisTaggingCategoryCreateResult' do
|
29
|
+
it 'should create an instance of CisTaggingCategoryCreateResult' do
|
30
|
+
expect(@instance).to be_instance_of(VSphereAutomation::CIS::CisTaggingCategoryCreateResult)
|
31
|
+
end
|
32
|
+
end
|
33
|
+
describe 'test attribute "value"' do
|
34
|
+
it 'should work' do
|
35
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
39
|
+
end
|