diff --git a/main.c b/main.c index d34a4fe..52d41ab 100644 --- a/main.c +++ b/main.c @@ -47,7 +47,7 @@ #define OAPI_RAW_OUTPUT 1 -#define OAPI_CLI_VERSION "0.2.0" +#define OAPI_CLI_VERSION "0.3.0" #define OAPI_CLI_UAGENT "oapi-cli/"OAPI_CLI_VERSION"; osc-sdk-c/" @@ -156,6 +156,7 @@ int catalog_entry_parser(void *s, char *str, char *aa, struct ptr_array *pa); int catalogs_parser(void *s, char *str, char *aa, struct ptr_array *pa); int client_gateway_parser(void *s, char *str, char *aa, struct ptr_array *pa); int consumption_entry_parser(void *s, char *str, char *aa, struct ptr_array *pa); +int dedicated_group_parser(void *s, char *str, char *aa, struct ptr_array *pa); int dhcp_options_set_parser(void *s, char *str, char *aa, struct ptr_array *pa); int direct_link_parser(void *s, char *str, char *aa, struct ptr_array *pa); int direct_link_interface_parser(void *s, char *str, char *aa, struct ptr_array *pa); @@ -167,6 +168,7 @@ int filters_api_log_parser(void *s, char *str, char *aa, struct ptr_array *pa); int filters_ca_parser(void *s, char *str, char *aa, struct ptr_array *pa); int filters_catalogs_parser(void *s, char *str, char *aa, struct ptr_array *pa); int filters_client_gateway_parser(void *s, char *str, char *aa, struct ptr_array *pa); +int filters_dedicated_group_parser(void *s, char *str, char *aa, struct ptr_array *pa); int filters_dhcp_options_parser(void *s, char *str, char *aa, struct ptr_array *pa); int filters_direct_link_parser(void *s, char *str, char *aa, struct ptr_array *pa); int filters_direct_link_interface_parser(void *s, char *str, char *aa, struct ptr_array *pa); @@ -215,6 +217,7 @@ int link_nic_to_update_parser(void *s, char *str, char *aa, struct ptr_array *pa int link_public_ip_parser(void *s, char *str, char *aa, struct ptr_array *pa); int link_public_ip_light_for_vm_parser(void *s, char *str, char *aa, struct ptr_array *pa); int link_route_table_parser(void *s, char *str, char *aa, struct ptr_array *pa); +int linked_policy_parser(void *s, char *str, char *aa, struct ptr_array *pa); int linked_volume_parser(void *s, char *str, char *aa, struct ptr_array *pa); int listener_parser(void *s, char *str, char *aa, struct ptr_array *pa); int listener_for_creation_parser(void *s, char *str, char *aa, struct ptr_array *pa); @@ -244,7 +247,10 @@ int permissions_on_resource_parser(void *s, char *str, char *aa, struct ptr_arra int permissions_on_resource_creation_parser(void *s, char *str, char *aa, struct ptr_array *pa); int phase1_options_parser(void *s, char *str, char *aa, struct ptr_array *pa); int phase2_options_parser(void *s, char *str, char *aa, struct ptr_array *pa); +int phase2_options_to_update_parser(void *s, char *str, char *aa, struct ptr_array *pa); int placement_parser(void *s, char *str, char *aa, struct ptr_array *pa); +int policy_parser(void *s, char *str, char *aa, struct ptr_array *pa); +int policy_version_parser(void *s, char *str, char *aa, struct ptr_array *pa); int private_ip_parser(void *s, char *str, char *aa, struct ptr_array *pa); int private_ip_light_parser(void *s, char *str, char *aa, struct ptr_array *pa); int private_ip_light_for_vm_parser(void *s, char *str, char *aa, struct ptr_array *pa); @@ -253,6 +259,8 @@ int public_ip_parser(void *s, char *str, char *aa, struct ptr_array *pa); int public_ip_light_parser(void *s, char *str, char *aa, struct ptr_array *pa); int quota_parser(void *s, char *str, char *aa, struct ptr_array *pa); int quota_types_parser(void *s, char *str, char *aa, struct ptr_array *pa); +int read_linked_policies_filters_parser(void *s, char *str, char *aa, struct ptr_array *pa); +int read_policies_filters_parser(void *s, char *str, char *aa, struct ptr_array *pa); int region_parser(void *s, char *str, char *aa, struct ptr_array *pa); int resource_load_balancer_tag_parser(void *s, char *str, char *aa, struct ptr_array *pa); int resource_tag_parser(void *s, char *str, char *aa, struct ptr_array *pa); @@ -286,6 +294,7 @@ int vm_type_parser(void *s, char *str, char *aa, struct ptr_array *pa); int volume_parser(void *s, char *str, char *aa, struct ptr_array *pa); int vpn_connection_parser(void *s, char *str, char *aa, struct ptr_array *pa); int vpn_options_parser(void *s, char *str, char *aa, struct ptr_array *pa); +int vpn_options_to_update_parser(void *s, char *str, char *aa, struct ptr_array *pa); int with_parser(void *s, char *str, char *aa, struct ptr_array *pa); int accepter_net_parser(void *v_s, char *str, char *aa, struct ptr_array *pa) { @@ -1127,6 +1136,11 @@ int consumption_entry_parser(void *v_s, char *str, char *aa, struct ptr_array *p s->paying_account_id = aa; // string string } else + if ((aret = argcmp(str, "Price")) == 0 || aret == '=') { + TRY(!aa, "Price argument missing\n"); + s->is_set_price = 1; + s->price = atof(aa); + } else if ((aret = argcmp(str, "Service")) == 0 || aret == '=') { TRY(!aa, "Service argument missing\n"); s->service = aa; // string string @@ -1152,6 +1166,11 @@ int consumption_entry_parser(void *v_s, char *str, char *aa, struct ptr_array *p s->type = aa; // string string } else + if ((aret = argcmp(str, "UnitPrice")) == 0 || aret == '=') { + TRY(!aa, "UnitPrice argument missing\n"); + s->is_set_unit_price = 1; + s->unit_price = atof(aa); + } else if ((aret = argcmp(str, "Value")) == 0 || aret == '=') { TRY(!aa, "Value argument missing\n"); s->is_set_value = 1; @@ -1164,6 +1183,55 @@ int consumption_entry_parser(void *v_s, char *str, char *aa, struct ptr_array *p return 0; } +int dedicated_group_parser(void *v_s, char *str, char *aa, struct ptr_array *pa) { + struct dedicated_group *s = v_s; + int aret = 0; + if ((aret = argcmp(str, "AccountId")) == 0 || aret == '=') { + TRY(!aa, "AccountId argument missing\n"); + s->account_id = aa; // string string + + } else + if ((aret = argcmp(str, "CpuGeneration")) == 0 || aret == '=') { + TRY(!aa, "CpuGeneration argument missing\n"); + s->is_set_cpu_generation = 1; + s->cpu_generation = atoi(aa); + } else + if ((aret = argcmp(str, "DedicatedGroupId")) == 0 || aret == '=') { + TRY(!aa, "DedicatedGroupId argument missing\n"); + s->dedicated_group_id = aa; // string string + + } else + if ((aret = argcmp(str, "Name")) == 0 || aret == '=') { + TRY(!aa, "Name argument missing\n"); + s->name = aa; // string string + + } else + if ((aret = argcmp(str, "NetIds")) == 0 || aret == '=') { + TRY(!aa, "NetIds argument missing\n"); + s->net_ids_str = aa; + } else if (!(aret = strcmp(str, "NetIds[]")) || aret == '=') { + TRY(!aa, "NetIds[] argument missing\n"); + SET_NEXT(s->net_ids, (aa), pa); + } else + if ((aret = argcmp(str, "SubregionName")) == 0 || aret == '=') { + TRY(!aa, "SubregionName argument missing\n"); + s->subregion_name = aa; // string string + + } else + if ((aret = argcmp(str, "VmIds")) == 0 || aret == '=') { + TRY(!aa, "VmIds argument missing\n"); + s->vm_ids_str = aa; + } else if (!(aret = strcmp(str, "VmIds[]")) || aret == '=') { + TRY(!aa, "VmIds[] argument missing\n"); + SET_NEXT(s->vm_ids, (aa), pa); + } else + { + fprintf(stderr, "'%s' not an argumemt of 'DedicatedGroup'\n", str); + return -1; + } + return 0; +} + int dhcp_options_set_parser(void *v_s, char *str, char *aa, struct ptr_array *pa) { struct dhcp_options_set *s = v_s; int aret = 0; @@ -1700,6 +1768,44 @@ int filters_client_gateway_parser(void *v_s, char *str, char *aa, struct ptr_arr return 0; } +int filters_dedicated_group_parser(void *v_s, char *str, char *aa, struct ptr_array *pa) { + struct filters_dedicated_group *s = v_s; + int aret = 0; + if ((aret = argcmp(str, "CpuGenerations")) == 0 || aret == '=') { + TRY(!aa, "CpuGenerations argument missing\n"); + s->cpu_generations_str = aa; + } else if (!(aret = strcmp(str, "CpuGenerations[]")) || aret == '=') { + TRY(!aa, "CpuGenerations[] argument missing\n"); + SET_NEXT(s->cpu_generations, atoi(aa), pa); + } else + if ((aret = argcmp(str, "DedicatedGroupIds")) == 0 || aret == '=') { + TRY(!aa, "DedicatedGroupIds argument missing\n"); + s->dedicated_group_ids_str = aa; + } else if (!(aret = strcmp(str, "DedicatedGroupIds[]")) || aret == '=') { + TRY(!aa, "DedicatedGroupIds[] argument missing\n"); + SET_NEXT(s->dedicated_group_ids, (aa), pa); + } else + if ((aret = argcmp(str, "Names")) == 0 || aret == '=') { + TRY(!aa, "Names argument missing\n"); + s->names_str = aa; + } else if (!(aret = strcmp(str, "Names[]")) || aret == '=') { + TRY(!aa, "Names[] argument missing\n"); + SET_NEXT(s->names, (aa), pa); + } else + if ((aret = argcmp(str, "SubregionNames")) == 0 || aret == '=') { + TRY(!aa, "SubregionNames argument missing\n"); + s->subregion_names_str = aa; + } else if (!(aret = strcmp(str, "SubregionNames[]")) || aret == '=') { + TRY(!aa, "SubregionNames[] argument missing\n"); + SET_NEXT(s->subregion_names, (aa), pa); + } else + { + fprintf(stderr, "'%s' not an argumemt of 'FiltersDedicatedGroup'\n", str); + return -1; + } + return 0; +} + int filters_dhcp_options_parser(void *v_s, char *str, char *aa, struct ptr_array *pa) { struct filters_dhcp_options *s = v_s; int aret = 0; @@ -2010,6 +2116,13 @@ int filters_image_parser(void *v_s, char *str, char *aa, struct ptr_array *pa) { BAD_RET("PermissionsToLaunchGlobalPermission require true/false\n"); } } else + if ((aret = argcmp(str, "ProductCodeNames")) == 0 || aret == '=') { + TRY(!aa, "ProductCodeNames argument missing\n"); + s->product_code_names_str = aa; + } else if (!(aret = strcmp(str, "ProductCodeNames[]")) || aret == '=') { + TRY(!aa, "ProductCodeNames[] argument missing\n"); + SET_NEXT(s->product_code_names, (aa), pa); + } else if ((aret = argcmp(str, "ProductCodes")) == 0 || aret == '=') { TRY(!aa, "ProductCodes argument missing\n"); s->product_codes_str = aa; @@ -2142,6 +2255,13 @@ int filters_keypair_parser(void *v_s, char *str, char *aa, struct ptr_array *pa) TRY(!aa, "KeypairNames[] argument missing\n"); SET_NEXT(s->keypair_names, (aa), pa); } else + if ((aret = argcmp(str, "KeypairTypes")) == 0 || aret == '=') { + TRY(!aa, "KeypairTypes argument missing\n"); + s->keypair_types_str = aa; + } else if (!(aret = strcmp(str, "KeypairTypes[]")) || aret == '=') { + TRY(!aa, "KeypairTypes[] argument missing\n"); + SET_NEXT(s->keypair_types, (aa), pa); + } else { fprintf(stderr, "'%s' not an argumemt of 'FiltersKeypair'\n", str); return -1; @@ -2394,6 +2514,13 @@ int filters_net_peering_parser(void *v_s, char *str, char *aa, struct ptr_array TRY(!aa, "AccepterNetNetIds[] argument missing\n"); SET_NEXT(s->accepter_net_net_ids, (aa), pa); } else + if ((aret = argcmp(str, "ExpirationDates")) == 0 || aret == '=') { + TRY(!aa, "ExpirationDates argument missing\n"); + s->expiration_dates_str = aa; + } else if (!(aret = strcmp(str, "ExpirationDates[]")) || aret == '=') { + TRY(!aa, "ExpirationDates[] argument missing\n"); + SET_NEXT(s->expiration_dates, (aa), pa); + } else if ((aret = argcmp(str, "NetPeeringIds")) == 0 || aret == '=') { TRY(!aa, "NetPeeringIds argument missing\n"); s->net_peering_ids_str = aa; @@ -2956,13 +3083,6 @@ int filters_route_table_parser(void *v_s, char *str, char *aa, struct ptr_array int filters_security_group_parser(void *v_s, char *str, char *aa, struct ptr_array *pa) { struct filters_security_group *s = v_s; int aret = 0; - if ((aret = argcmp(str, "AccountIds")) == 0 || aret == '=') { - TRY(!aa, "AccountIds argument missing\n"); - s->account_ids_str = aa; - } else if (!(aret = strcmp(str, "AccountIds[]")) || aret == '=') { - TRY(!aa, "AccountIds[] argument missing\n"); - SET_NEXT(s->account_ids, (aa), pa); - } else if ((aret = argcmp(str, "Descriptions")) == 0 || aret == '=') { TRY(!aa, "Descriptions argument missing\n"); s->descriptions_str = aa; @@ -3348,6 +3468,20 @@ int filters_subnet_parser(void *v_s, char *str, char *aa, struct ptr_array *pa) int filters_subregion_parser(void *v_s, char *str, char *aa, struct ptr_array *pa) { struct filters_subregion *s = v_s; int aret = 0; + if ((aret = argcmp(str, "RegionNames")) == 0 || aret == '=') { + TRY(!aa, "RegionNames argument missing\n"); + s->region_names_str = aa; + } else if (!(aret = strcmp(str, "RegionNames[]")) || aret == '=') { + TRY(!aa, "RegionNames[] argument missing\n"); + SET_NEXT(s->region_names, (aa), pa); + } else + if ((aret = argcmp(str, "States")) == 0 || aret == '=') { + TRY(!aa, "States argument missing\n"); + s->states_str = aa; + } else if (!(aret = strcmp(str, "States[]")) || aret == '=') { + TRY(!aa, "States[] argument missing\n"); + SET_NEXT(s->states, (aa), pa); + } else if ((aret = argcmp(str, "SubregionNames")) == 0 || aret == '=') { TRY(!aa, "SubregionNames argument missing\n"); s->subregion_names_str = aa; @@ -3469,6 +3603,399 @@ int filters_virtual_gateway_parser(void *v_s, char *str, char *aa, struct ptr_ar int filters_vm_parser(void *v_s, char *str, char *aa, struct ptr_array *pa) { struct filters_vm *s = v_s; int aret = 0; + if ((aret = argcmp(str, "Architectures")) == 0 || aret == '=') { + TRY(!aa, "Architectures argument missing\n"); + s->architectures_str = aa; + } else if (!(aret = strcmp(str, "Architectures[]")) || aret == '=') { + TRY(!aa, "Architectures[] argument missing\n"); + SET_NEXT(s->architectures, (aa), pa); + } else + if ((aret = argcmp(str, "BlockDeviceMappingDeleteOnVmDeletion")) == 0 || aret == '=') { + s->is_set_block_device_mapping_delete_on_vm_deletion = 1; + if (!aa || !strcasecmp(aa, "true")) { + s->block_device_mapping_delete_on_vm_deletion = 1; + } else if (!strcasecmp(aa, "false")) { + s->block_device_mapping_delete_on_vm_deletion = 0; + } else { + BAD_RET("BlockDeviceMappingDeleteOnVmDeletion require true/false\n"); + } + } else + if ((aret = argcmp(str, "BlockDeviceMappingDeviceNames")) == 0 || aret == '=') { + TRY(!aa, "BlockDeviceMappingDeviceNames argument missing\n"); + s->block_device_mapping_device_names_str = aa; + } else if (!(aret = strcmp(str, "BlockDeviceMappingDeviceNames[]")) || aret == '=') { + TRY(!aa, "BlockDeviceMappingDeviceNames[] argument missing\n"); + SET_NEXT(s->block_device_mapping_device_names, (aa), pa); + } else + if ((aret = argcmp(str, "BlockDeviceMappingLinkDates")) == 0 || aret == '=') { + TRY(!aa, "BlockDeviceMappingLinkDates argument missing\n"); + s->block_device_mapping_link_dates_str = aa; + } else if (!(aret = strcmp(str, "BlockDeviceMappingLinkDates[]")) || aret == '=') { + TRY(!aa, "BlockDeviceMappingLinkDates[] argument missing\n"); + SET_NEXT(s->block_device_mapping_link_dates, (aa), pa); + } else + if ((aret = argcmp(str, "BlockDeviceMappingStates")) == 0 || aret == '=') { + TRY(!aa, "BlockDeviceMappingStates argument missing\n"); + s->block_device_mapping_states_str = aa; + } else if (!(aret = strcmp(str, "BlockDeviceMappingStates[]")) || aret == '=') { + TRY(!aa, "BlockDeviceMappingStates[] argument missing\n"); + SET_NEXT(s->block_device_mapping_states, (aa), pa); + } else + if ((aret = argcmp(str, "BlockDeviceMappingVolumeIds")) == 0 || aret == '=') { + TRY(!aa, "BlockDeviceMappingVolumeIds argument missing\n"); + s->block_device_mapping_volume_ids_str = aa; + } else if (!(aret = strcmp(str, "BlockDeviceMappingVolumeIds[]")) || aret == '=') { + TRY(!aa, "BlockDeviceMappingVolumeIds[] argument missing\n"); + SET_NEXT(s->block_device_mapping_volume_ids, (aa), pa); + } else + if ((aret = argcmp(str, "ClientTokens")) == 0 || aret == '=') { + TRY(!aa, "ClientTokens argument missing\n"); + s->client_tokens_str = aa; + } else if (!(aret = strcmp(str, "ClientTokens[]")) || aret == '=') { + TRY(!aa, "ClientTokens[] argument missing\n"); + SET_NEXT(s->client_tokens, (aa), pa); + } else + if ((aret = argcmp(str, "CreationDates")) == 0 || aret == '=') { + TRY(!aa, "CreationDates argument missing\n"); + s->creation_dates_str = aa; + } else if (!(aret = strcmp(str, "CreationDates[]")) || aret == '=') { + TRY(!aa, "CreationDates[] argument missing\n"); + SET_NEXT(s->creation_dates, (aa), pa); + } else + if ((aret = argcmp(str, "ImageIds")) == 0 || aret == '=') { + TRY(!aa, "ImageIds argument missing\n"); + s->image_ids_str = aa; + } else if (!(aret = strcmp(str, "ImageIds[]")) || aret == '=') { + TRY(!aa, "ImageIds[] argument missing\n"); + SET_NEXT(s->image_ids, (aa), pa); + } else + if ((aret = argcmp(str, "IsSourceDestChecked")) == 0 || aret == '=') { + s->is_set_is_source_dest_checked = 1; + if (!aa || !strcasecmp(aa, "true")) { + s->is_source_dest_checked = 1; + } else if (!strcasecmp(aa, "false")) { + s->is_source_dest_checked = 0; + } else { + BAD_RET("IsSourceDestChecked require true/false\n"); + } + } else + if ((aret = argcmp(str, "KeypairNames")) == 0 || aret == '=') { + TRY(!aa, "KeypairNames argument missing\n"); + s->keypair_names_str = aa; + } else if (!(aret = strcmp(str, "KeypairNames[]")) || aret == '=') { + TRY(!aa, "KeypairNames[] argument missing\n"); + SET_NEXT(s->keypair_names, (aa), pa); + } else + if ((aret = argcmp(str, "LaunchNumbers")) == 0 || aret == '=') { + TRY(!aa, "LaunchNumbers argument missing\n"); + s->launch_numbers_str = aa; + } else if (!(aret = strcmp(str, "LaunchNumbers[]")) || aret == '=') { + TRY(!aa, "LaunchNumbers[] argument missing\n"); + SET_NEXT(s->launch_numbers, atoi(aa), pa); + } else + if ((aret = argcmp(str, "Lifecycles")) == 0 || aret == '=') { + TRY(!aa, "Lifecycles argument missing\n"); + s->lifecycles_str = aa; + } else if (!(aret = strcmp(str, "Lifecycles[]")) || aret == '=') { + TRY(!aa, "Lifecycles[] argument missing\n"); + SET_NEXT(s->lifecycles, (aa), pa); + } else + if ((aret = argcmp(str, "NetIds")) == 0 || aret == '=') { + TRY(!aa, "NetIds argument missing\n"); + s->net_ids_str = aa; + } else if (!(aret = strcmp(str, "NetIds[]")) || aret == '=') { + TRY(!aa, "NetIds[] argument missing\n"); + SET_NEXT(s->net_ids, (aa), pa); + } else + if ((aret = argcmp(str, "NicAccountIds")) == 0 || aret == '=') { + TRY(!aa, "NicAccountIds argument missing\n"); + s->nic_account_ids_str = aa; + } else if (!(aret = strcmp(str, "NicAccountIds[]")) || aret == '=') { + TRY(!aa, "NicAccountIds[] argument missing\n"); + SET_NEXT(s->nic_account_ids, (aa), pa); + } else + if ((aret = argcmp(str, "NicDescriptions")) == 0 || aret == '=') { + TRY(!aa, "NicDescriptions argument missing\n"); + s->nic_descriptions_str = aa; + } else if (!(aret = strcmp(str, "NicDescriptions[]")) || aret == '=') { + TRY(!aa, "NicDescriptions[] argument missing\n"); + SET_NEXT(s->nic_descriptions, (aa), pa); + } else + if ((aret = argcmp(str, "NicIsSourceDestChecked")) == 0 || aret == '=') { + s->is_set_nic_is_source_dest_checked = 1; + if (!aa || !strcasecmp(aa, "true")) { + s->nic_is_source_dest_checked = 1; + } else if (!strcasecmp(aa, "false")) { + s->nic_is_source_dest_checked = 0; + } else { + BAD_RET("NicIsSourceDestChecked require true/false\n"); + } + } else + if ((aret = argcmp(str, "NicLinkNicDeleteOnVmDeletion")) == 0 || aret == '=') { + s->is_set_nic_link_nic_delete_on_vm_deletion = 1; + if (!aa || !strcasecmp(aa, "true")) { + s->nic_link_nic_delete_on_vm_deletion = 1; + } else if (!strcasecmp(aa, "false")) { + s->nic_link_nic_delete_on_vm_deletion = 0; + } else { + BAD_RET("NicLinkNicDeleteOnVmDeletion require true/false\n"); + } + } else + if ((aret = argcmp(str, "NicLinkNicDeviceNumbers")) == 0 || aret == '=') { + TRY(!aa, "NicLinkNicDeviceNumbers argument missing\n"); + s->nic_link_nic_device_numbers_str = aa; + } else if (!(aret = strcmp(str, "NicLinkNicDeviceNumbers[]")) || aret == '=') { + TRY(!aa, "NicLinkNicDeviceNumbers[] argument missing\n"); + SET_NEXT(s->nic_link_nic_device_numbers, atoi(aa), pa); + } else + if ((aret = argcmp(str, "NicLinkNicLinkNicDates")) == 0 || aret == '=') { + TRY(!aa, "NicLinkNicLinkNicDates argument missing\n"); + s->nic_link_nic_link_nic_dates_str = aa; + } else if (!(aret = strcmp(str, "NicLinkNicLinkNicDates[]")) || aret == '=') { + TRY(!aa, "NicLinkNicLinkNicDates[] argument missing\n"); + SET_NEXT(s->nic_link_nic_link_nic_dates, (aa), pa); + } else + if ((aret = argcmp(str, "NicLinkNicLinkNicIds")) == 0 || aret == '=') { + TRY(!aa, "NicLinkNicLinkNicIds argument missing\n"); + s->nic_link_nic_link_nic_ids_str = aa; + } else if (!(aret = strcmp(str, "NicLinkNicLinkNicIds[]")) || aret == '=') { + TRY(!aa, "NicLinkNicLinkNicIds[] argument missing\n"); + SET_NEXT(s->nic_link_nic_link_nic_ids, (aa), pa); + } else + if ((aret = argcmp(str, "NicLinkNicStates")) == 0 || aret == '=') { + TRY(!aa, "NicLinkNicStates argument missing\n"); + s->nic_link_nic_states_str = aa; + } else if (!(aret = strcmp(str, "NicLinkNicStates[]")) || aret == '=') { + TRY(!aa, "NicLinkNicStates[] argument missing\n"); + SET_NEXT(s->nic_link_nic_states, (aa), pa); + } else + if ((aret = argcmp(str, "NicLinkNicVmAccountIds")) == 0 || aret == '=') { + TRY(!aa, "NicLinkNicVmAccountIds argument missing\n"); + s->nic_link_nic_vm_account_ids_str = aa; + } else if (!(aret = strcmp(str, "NicLinkNicVmAccountIds[]")) || aret == '=') { + TRY(!aa, "NicLinkNicVmAccountIds[] argument missing\n"); + SET_NEXT(s->nic_link_nic_vm_account_ids, (aa), pa); + } else + if ((aret = argcmp(str, "NicLinkNicVmIds")) == 0 || aret == '=') { + TRY(!aa, "NicLinkNicVmIds argument missing\n"); + s->nic_link_nic_vm_ids_str = aa; + } else if (!(aret = strcmp(str, "NicLinkNicVmIds[]")) || aret == '=') { + TRY(!aa, "NicLinkNicVmIds[] argument missing\n"); + SET_NEXT(s->nic_link_nic_vm_ids, (aa), pa); + } else + if ((aret = argcmp(str, "NicLinkPublicIpAccountIds")) == 0 || aret == '=') { + TRY(!aa, "NicLinkPublicIpAccountIds argument missing\n"); + s->nic_link_public_ip_account_ids_str = aa; + } else if (!(aret = strcmp(str, "NicLinkPublicIpAccountIds[]")) || aret == '=') { + TRY(!aa, "NicLinkPublicIpAccountIds[] argument missing\n"); + SET_NEXT(s->nic_link_public_ip_account_ids, (aa), pa); + } else + if ((aret = argcmp(str, "NicLinkPublicIpLinkPublicIpIds")) == 0 || aret == '=') { + TRY(!aa, "NicLinkPublicIpLinkPublicIpIds argument missing\n"); + s->nic_link_public_ip_link_public_ip_ids_str = aa; + } else if (!(aret = strcmp(str, "NicLinkPublicIpLinkPublicIpIds[]")) || aret == '=') { + TRY(!aa, "NicLinkPublicIpLinkPublicIpIds[] argument missing\n"); + SET_NEXT(s->nic_link_public_ip_link_public_ip_ids, (aa), pa); + } else + if ((aret = argcmp(str, "NicLinkPublicIpPublicIpIds")) == 0 || aret == '=') { + TRY(!aa, "NicLinkPublicIpPublicIpIds argument missing\n"); + s->nic_link_public_ip_public_ip_ids_str = aa; + } else if (!(aret = strcmp(str, "NicLinkPublicIpPublicIpIds[]")) || aret == '=') { + TRY(!aa, "NicLinkPublicIpPublicIpIds[] argument missing\n"); + SET_NEXT(s->nic_link_public_ip_public_ip_ids, (aa), pa); + } else + if ((aret = argcmp(str, "NicLinkPublicIpPublicIps")) == 0 || aret == '=') { + TRY(!aa, "NicLinkPublicIpPublicIps argument missing\n"); + s->nic_link_public_ip_public_ips_str = aa; + } else if (!(aret = strcmp(str, "NicLinkPublicIpPublicIps[]")) || aret == '=') { + TRY(!aa, "NicLinkPublicIpPublicIps[] argument missing\n"); + SET_NEXT(s->nic_link_public_ip_public_ips, (aa), pa); + } else + if ((aret = argcmp(str, "NicMacAddresses")) == 0 || aret == '=') { + TRY(!aa, "NicMacAddresses argument missing\n"); + s->nic_mac_addresses_str = aa; + } else if (!(aret = strcmp(str, "NicMacAddresses[]")) || aret == '=') { + TRY(!aa, "NicMacAddresses[] argument missing\n"); + SET_NEXT(s->nic_mac_addresses, (aa), pa); + } else + if ((aret = argcmp(str, "NicNetIds")) == 0 || aret == '=') { + TRY(!aa, "NicNetIds argument missing\n"); + s->nic_net_ids_str = aa; + } else if (!(aret = strcmp(str, "NicNetIds[]")) || aret == '=') { + TRY(!aa, "NicNetIds[] argument missing\n"); + SET_NEXT(s->nic_net_ids, (aa), pa); + } else + if ((aret = argcmp(str, "NicNicIds")) == 0 || aret == '=') { + TRY(!aa, "NicNicIds argument missing\n"); + s->nic_nic_ids_str = aa; + } else if (!(aret = strcmp(str, "NicNicIds[]")) || aret == '=') { + TRY(!aa, "NicNicIds[] argument missing\n"); + SET_NEXT(s->nic_nic_ids, (aa), pa); + } else + if ((aret = argcmp(str, "NicPrivateIpsLinkPublicIpAccountIds")) == 0 || aret == '=') { + TRY(!aa, "NicPrivateIpsLinkPublicIpAccountIds argument missing\n"); + s->nic_private_ips_link_public_ip_account_ids_str = aa; + } else if (!(aret = strcmp(str, "NicPrivateIpsLinkPublicIpAccountIds[]")) || aret == '=') { + TRY(!aa, "NicPrivateIpsLinkPublicIpAccountIds[] argument missing\n"); + SET_NEXT(s->nic_private_ips_link_public_ip_account_ids, (aa), pa); + } else + if ((aret = argcmp(str, "NicPrivateIpsLinkPublicIpIds")) == 0 || aret == '=') { + TRY(!aa, "NicPrivateIpsLinkPublicIpIds argument missing\n"); + s->nic_private_ips_link_public_ip_ids_str = aa; + } else if (!(aret = strcmp(str, "NicPrivateIpsLinkPublicIpIds[]")) || aret == '=') { + TRY(!aa, "NicPrivateIpsLinkPublicIpIds[] argument missing\n"); + SET_NEXT(s->nic_private_ips_link_public_ip_ids, (aa), pa); + } else + if ((aret = argcmp(str, "NicPrivateIpsPrimaryIp")) == 0 || aret == '=') { + s->is_set_nic_private_ips_primary_ip = 1; + if (!aa || !strcasecmp(aa, "true")) { + s->nic_private_ips_primary_ip = 1; + } else if (!strcasecmp(aa, "false")) { + s->nic_private_ips_primary_ip = 0; + } else { + BAD_RET("NicPrivateIpsPrimaryIp require true/false\n"); + } + } else + if ((aret = argcmp(str, "NicPrivateIpsPrivateIps")) == 0 || aret == '=') { + TRY(!aa, "NicPrivateIpsPrivateIps argument missing\n"); + s->nic_private_ips_private_ips_str = aa; + } else if (!(aret = strcmp(str, "NicPrivateIpsPrivateIps[]")) || aret == '=') { + TRY(!aa, "NicPrivateIpsPrivateIps[] argument missing\n"); + SET_NEXT(s->nic_private_ips_private_ips, (aa), pa); + } else + if ((aret = argcmp(str, "NicSecurityGroupIds")) == 0 || aret == '=') { + TRY(!aa, "NicSecurityGroupIds argument missing\n"); + s->nic_security_group_ids_str = aa; + } else if (!(aret = strcmp(str, "NicSecurityGroupIds[]")) || aret == '=') { + TRY(!aa, "NicSecurityGroupIds[] argument missing\n"); + SET_NEXT(s->nic_security_group_ids, (aa), pa); + } else + if ((aret = argcmp(str, "NicSecurityGroupNames")) == 0 || aret == '=') { + TRY(!aa, "NicSecurityGroupNames argument missing\n"); + s->nic_security_group_names_str = aa; + } else if (!(aret = strcmp(str, "NicSecurityGroupNames[]")) || aret == '=') { + TRY(!aa, "NicSecurityGroupNames[] argument missing\n"); + SET_NEXT(s->nic_security_group_names, (aa), pa); + } else + if ((aret = argcmp(str, "NicStates")) == 0 || aret == '=') { + TRY(!aa, "NicStates argument missing\n"); + s->nic_states_str = aa; + } else if (!(aret = strcmp(str, "NicStates[]")) || aret == '=') { + TRY(!aa, "NicStates[] argument missing\n"); + SET_NEXT(s->nic_states, (aa), pa); + } else + if ((aret = argcmp(str, "NicSubnetIds")) == 0 || aret == '=') { + TRY(!aa, "NicSubnetIds argument missing\n"); + s->nic_subnet_ids_str = aa; + } else if (!(aret = strcmp(str, "NicSubnetIds[]")) || aret == '=') { + TRY(!aa, "NicSubnetIds[] argument missing\n"); + SET_NEXT(s->nic_subnet_ids, (aa), pa); + } else + if ((aret = argcmp(str, "NicSubregionNames")) == 0 || aret == '=') { + TRY(!aa, "NicSubregionNames argument missing\n"); + s->nic_subregion_names_str = aa; + } else if (!(aret = strcmp(str, "NicSubregionNames[]")) || aret == '=') { + TRY(!aa, "NicSubregionNames[] argument missing\n"); + SET_NEXT(s->nic_subregion_names, (aa), pa); + } else + if ((aret = argcmp(str, "Platforms")) == 0 || aret == '=') { + TRY(!aa, "Platforms argument missing\n"); + s->platforms_str = aa; + } else if (!(aret = strcmp(str, "Platforms[]")) || aret == '=') { + TRY(!aa, "Platforms[] argument missing\n"); + SET_NEXT(s->platforms, (aa), pa); + } else + if ((aret = argcmp(str, "PrivateIps")) == 0 || aret == '=') { + TRY(!aa, "PrivateIps argument missing\n"); + s->private_ips_str = aa; + } else if (!(aret = strcmp(str, "PrivateIps[]")) || aret == '=') { + TRY(!aa, "PrivateIps[] argument missing\n"); + SET_NEXT(s->private_ips, (aa), pa); + } else + if ((aret = argcmp(str, "ProductCodes")) == 0 || aret == '=') { + TRY(!aa, "ProductCodes argument missing\n"); + s->product_codes_str = aa; + } else if (!(aret = strcmp(str, "ProductCodes[]")) || aret == '=') { + TRY(!aa, "ProductCodes[] argument missing\n"); + SET_NEXT(s->product_codes, (aa), pa); + } else + if ((aret = argcmp(str, "PublicIps")) == 0 || aret == '=') { + TRY(!aa, "PublicIps argument missing\n"); + s->public_ips_str = aa; + } else if (!(aret = strcmp(str, "PublicIps[]")) || aret == '=') { + TRY(!aa, "PublicIps[] argument missing\n"); + SET_NEXT(s->public_ips, (aa), pa); + } else + if ((aret = argcmp(str, "ReservationIds")) == 0 || aret == '=') { + TRY(!aa, "ReservationIds argument missing\n"); + s->reservation_ids_str = aa; + } else if (!(aret = strcmp(str, "ReservationIds[]")) || aret == '=') { + TRY(!aa, "ReservationIds[] argument missing\n"); + SET_NEXT(s->reservation_ids, (aa), pa); + } else + if ((aret = argcmp(str, "RootDeviceNames")) == 0 || aret == '=') { + TRY(!aa, "RootDeviceNames argument missing\n"); + s->root_device_names_str = aa; + } else if (!(aret = strcmp(str, "RootDeviceNames[]")) || aret == '=') { + TRY(!aa, "RootDeviceNames[] argument missing\n"); + SET_NEXT(s->root_device_names, (aa), pa); + } else + if ((aret = argcmp(str, "RootDeviceTypes")) == 0 || aret == '=') { + TRY(!aa, "RootDeviceTypes argument missing\n"); + s->root_device_types_str = aa; + } else if (!(aret = strcmp(str, "RootDeviceTypes[]")) || aret == '=') { + TRY(!aa, "RootDeviceTypes[] argument missing\n"); + SET_NEXT(s->root_device_types, (aa), pa); + } else + if ((aret = argcmp(str, "SecurityGroupIds")) == 0 || aret == '=') { + TRY(!aa, "SecurityGroupIds argument missing\n"); + s->security_group_ids_str = aa; + } else if (!(aret = strcmp(str, "SecurityGroupIds[]")) || aret == '=') { + TRY(!aa, "SecurityGroupIds[] argument missing\n"); + SET_NEXT(s->security_group_ids, (aa), pa); + } else + if ((aret = argcmp(str, "SecurityGroupNames")) == 0 || aret == '=') { + TRY(!aa, "SecurityGroupNames argument missing\n"); + s->security_group_names_str = aa; + } else if (!(aret = strcmp(str, "SecurityGroupNames[]")) || aret == '=') { + TRY(!aa, "SecurityGroupNames[] argument missing\n"); + SET_NEXT(s->security_group_names, (aa), pa); + } else + if ((aret = argcmp(str, "StateReasonCodes")) == 0 || aret == '=') { + TRY(!aa, "StateReasonCodes argument missing\n"); + s->state_reason_codes_str = aa; + } else if (!(aret = strcmp(str, "StateReasonCodes[]")) || aret == '=') { + TRY(!aa, "StateReasonCodes[] argument missing\n"); + SET_NEXT(s->state_reason_codes, atoi(aa), pa); + } else + if ((aret = argcmp(str, "StateReasonMessages")) == 0 || aret == '=') { + TRY(!aa, "StateReasonMessages argument missing\n"); + s->state_reason_messages_str = aa; + } else if (!(aret = strcmp(str, "StateReasonMessages[]")) || aret == '=') { + TRY(!aa, "StateReasonMessages[] argument missing\n"); + SET_NEXT(s->state_reason_messages, (aa), pa); + } else + if ((aret = argcmp(str, "StateReasons")) == 0 || aret == '=') { + TRY(!aa, "StateReasons argument missing\n"); + s->state_reasons_str = aa; + } else if (!(aret = strcmp(str, "StateReasons[]")) || aret == '=') { + TRY(!aa, "StateReasons[] argument missing\n"); + SET_NEXT(s->state_reasons, (aa), pa); + } else + if ((aret = argcmp(str, "SubnetIds")) == 0 || aret == '=') { + TRY(!aa, "SubnetIds argument missing\n"); + s->subnet_ids_str = aa; + } else if (!(aret = strcmp(str, "SubnetIds[]")) || aret == '=') { + TRY(!aa, "SubnetIds[] argument missing\n"); + SET_NEXT(s->subnet_ids, (aa), pa); + } else + if ((aret = argcmp(str, "SubregionNames")) == 0 || aret == '=') { + TRY(!aa, "SubregionNames argument missing\n"); + s->subregion_names_str = aa; + } else if (!(aret = strcmp(str, "SubregionNames[]")) || aret == '=') { + TRY(!aa, "SubregionNames[] argument missing\n"); + SET_NEXT(s->subregion_names, (aa), pa); + } else if ((aret = argcmp(str, "TagKeys")) == 0 || aret == '=') { TRY(!aa, "TagKeys argument missing\n"); s->tag_keys_str = aa; @@ -3490,6 +4017,13 @@ int filters_vm_parser(void *v_s, char *str, char *aa, struct ptr_array *pa) { TRY(!aa, "Tags[] argument missing\n"); SET_NEXT(s->tags, (aa), pa); } else + if ((aret = argcmp(str, "Tenancies")) == 0 || aret == '=') { + TRY(!aa, "Tenancies argument missing\n"); + s->tenancies_str = aa; + } else if (!(aret = strcmp(str, "Tenancies[]")) || aret == '=') { + TRY(!aa, "Tenancies[] argument missing\n"); + SET_NEXT(s->tenancies, (aa), pa); + } else if ((aret = argcmp(str, "VmIds")) == 0 || aret == '=') { TRY(!aa, "VmIds argument missing\n"); s->vm_ids_str = aa; @@ -3497,6 +4031,41 @@ int filters_vm_parser(void *v_s, char *str, char *aa, struct ptr_array *pa) { TRY(!aa, "VmIds[] argument missing\n"); SET_NEXT(s->vm_ids, (aa), pa); } else + if ((aret = argcmp(str, "VmSecurityGroupIds")) == 0 || aret == '=') { + TRY(!aa, "VmSecurityGroupIds argument missing\n"); + s->vm_security_group_ids_str = aa; + } else if (!(aret = strcmp(str, "VmSecurityGroupIds[]")) || aret == '=') { + TRY(!aa, "VmSecurityGroupIds[] argument missing\n"); + SET_NEXT(s->vm_security_group_ids, (aa), pa); + } else + if ((aret = argcmp(str, "VmSecurityGroupNames")) == 0 || aret == '=') { + TRY(!aa, "VmSecurityGroupNames argument missing\n"); + s->vm_security_group_names_str = aa; + } else if (!(aret = strcmp(str, "VmSecurityGroupNames[]")) || aret == '=') { + TRY(!aa, "VmSecurityGroupNames[] argument missing\n"); + SET_NEXT(s->vm_security_group_names, (aa), pa); + } else + if ((aret = argcmp(str, "VmStateCodes")) == 0 || aret == '=') { + TRY(!aa, "VmStateCodes argument missing\n"); + s->vm_state_codes_str = aa; + } else if (!(aret = strcmp(str, "VmStateCodes[]")) || aret == '=') { + TRY(!aa, "VmStateCodes[] argument missing\n"); + SET_NEXT(s->vm_state_codes, atoi(aa), pa); + } else + if ((aret = argcmp(str, "VmStateNames")) == 0 || aret == '=') { + TRY(!aa, "VmStateNames argument missing\n"); + s->vm_state_names_str = aa; + } else if (!(aret = strcmp(str, "VmStateNames[]")) || aret == '=') { + TRY(!aa, "VmStateNames[] argument missing\n"); + SET_NEXT(s->vm_state_names, (aa), pa); + } else + if ((aret = argcmp(str, "VmTypes")) == 0 || aret == '=') { + TRY(!aa, "VmTypes argument missing\n"); + s->vm_types_str = aa; + } else if (!(aret = strcmp(str, "VmTypes[]")) || aret == '=') { + TRY(!aa, "VmTypes[] argument missing\n"); + SET_NEXT(s->vm_types, (aa), pa); + } else { fprintf(stderr, "'%s' not an argumemt of 'FiltersVm'\n", str); return -1; @@ -3691,6 +4260,27 @@ int filters_vm_type_parser(void *v_s, char *str, char *aa, struct ptr_array *pa) BAD_RET("BsuOptimized require true/false\n"); } } else + if ((aret = argcmp(str, "EphemeralsTypes")) == 0 || aret == '=') { + TRY(!aa, "EphemeralsTypes argument missing\n"); + s->ephemerals_types_str = aa; + } else if (!(aret = strcmp(str, "EphemeralsTypes[]")) || aret == '=') { + TRY(!aa, "EphemeralsTypes[] argument missing\n"); + SET_NEXT(s->ephemerals_types, (aa), pa); + } else + if ((aret = argcmp(str, "Eths")) == 0 || aret == '=') { + TRY(!aa, "Eths argument missing\n"); + s->eths_str = aa; + } else if (!(aret = strcmp(str, "Eths[]")) || aret == '=') { + TRY(!aa, "Eths[] argument missing\n"); + SET_NEXT(s->eths, atoi(aa), pa); + } else + if ((aret = argcmp(str, "Gpus")) == 0 || aret == '=') { + TRY(!aa, "Gpus argument missing\n"); + s->gpus_str = aa; + } else if (!(aret = strcmp(str, "Gpus[]")) || aret == '=') { + TRY(!aa, "Gpus[] argument missing\n"); + SET_NEXT(s->gpus, atoi(aa), pa); + } else if ((aret = argcmp(str, "MemorySizes")) == 0 || aret == '=') { TRY(!aa, "MemorySizes argument missing\n"); s->memory_sizes_str = aa; @@ -4432,6 +5022,11 @@ int keypair_parser(void *v_s, char *str, char *aa, struct ptr_array *pa) { TRY(!aa, "KeypairName argument missing\n"); s->keypair_name = aa; // string string + } else + if ((aret = argcmp(str, "KeypairType")) == 0 || aret == '=') { + TRY(!aa, "KeypairType argument missing\n"); + s->keypair_type = aa; // string string + } else { fprintf(stderr, "'%s' not an argumemt of 'Keypair'\n", str); @@ -4452,6 +5047,11 @@ int keypair_created_parser(void *v_s, char *str, char *aa, struct ptr_array *pa) TRY(!aa, "KeypairName argument missing\n"); s->keypair_name = aa; // string string + } else + if ((aret = argcmp(str, "KeypairType")) == 0 || aret == '=') { + TRY(!aa, "KeypairType argument missing\n"); + s->keypair_type = aa; // string string + } else if ((aret = argcmp(str, "PrivateKey")) == 0 || aret == '=') { TRY(!aa, "PrivateKey argument missing\n"); @@ -4648,6 +5248,11 @@ int link_route_table_parser(void *v_s, char *str, char *aa, struct ptr_array *pa BAD_RET("Main require true/false\n"); } } else + if ((aret = argcmp(str, "NetId")) == 0 || aret == '=') { + TRY(!aa, "NetId argument missing\n"); + s->net_id = aa; // string string + + } else if ((aret = argcmp(str, "RouteTableId")) == 0 || aret == '=') { TRY(!aa, "RouteTableId argument missing\n"); s->route_table_id = aa; // string string @@ -4665,12 +5270,47 @@ int link_route_table_parser(void *v_s, char *str, char *aa, struct ptr_array *pa return 0; } -int linked_volume_parser(void *v_s, char *str, char *aa, struct ptr_array *pa) { - struct linked_volume *s = v_s; +int linked_policy_parser(void *v_s, char *str, char *aa, struct ptr_array *pa) { + struct linked_policy *s = v_s; int aret = 0; - if ((aret = argcmp(str, "DeleteOnVmDeletion")) == 0 || aret == '=') { - s->is_set_delete_on_vm_deletion = 1; - if (!aa || !strcasecmp(aa, "true")) { + if ((aret = argcmp(str, "CreationDate")) == 0 || aret == '=') { + TRY(!aa, "CreationDate argument missing\n"); + s->creation_date = aa; // string string + + } else + if ((aret = argcmp(str, "LastModificationDate")) == 0 || aret == '=') { + TRY(!aa, "LastModificationDate argument missing\n"); + s->last_modification_date = aa; // string string + + } else + if ((aret = argcmp(str, "Orn")) == 0 || aret == '=') { + TRY(!aa, "Orn argument missing\n"); + s->orn = aa; // string string + + } else + if ((aret = argcmp(str, "PolicyId")) == 0 || aret == '=') { + TRY(!aa, "PolicyId argument missing\n"); + s->policy_id = aa; // string string + + } else + if ((aret = argcmp(str, "PolicyName")) == 0 || aret == '=') { + TRY(!aa, "PolicyName argument missing\n"); + s->policy_name = aa; // string string + + } else + { + fprintf(stderr, "'%s' not an argumemt of 'LinkedPolicy'\n", str); + return -1; + } + return 0; +} + +int linked_volume_parser(void *v_s, char *str, char *aa, struct ptr_array *pa) { + struct linked_volume *s = v_s; + int aret = 0; + if ((aret = argcmp(str, "DeleteOnVmDeletion")) == 0 || aret == '=') { + s->is_set_delete_on_vm_deletion = 1; + if (!aa || !strcasecmp(aa, "true")) { s->delete_on_vm_deletion = 1; } else if (!strcasecmp(aa, "false")) { s->delete_on_vm_deletion = 0; @@ -5527,6 +6167,11 @@ int net_peering_parser(void *v_s, char *str, char *aa, struct ptr_array *pa) { s->accepter_net_str = aa; } } else + if ((aret = argcmp(str, "ExpirationDate")) == 0 || aret == '=') { + TRY(!aa, "ExpirationDate argument missing\n"); + s->expiration_date = aa; // string string + + } else if ((aret = argcmp(str, "NetPeeringId")) == 0 || aret == '=') { TRY(!aa, "NetPeeringId argument missing\n"); s->net_peering_id = aa; // string string @@ -6330,6 +6975,21 @@ int phase2_options_parser(void *v_s, char *str, char *aa, struct ptr_array *pa) return 0; } +int phase2_options_to_update_parser(void *v_s, char *str, char *aa, struct ptr_array *pa) { + struct phase2_options_to_update *s = v_s; + int aret = 0; + if ((aret = argcmp(str, "PreSharedKey")) == 0 || aret == '=') { + TRY(!aa, "PreSharedKey argument missing\n"); + s->pre_shared_key = aa; // string string + + } else + { + fprintf(stderr, "'%s' not an argumemt of 'Phase2OptionsToUpdate'\n", str); + return -1; + } + return 0; +} + int placement_parser(void *v_s, char *str, char *aa, struct ptr_array *pa) { struct placement *s = v_s; int aret = 0; @@ -6350,6 +7010,106 @@ int placement_parser(void *v_s, char *str, char *aa, struct ptr_array *pa) { return 0; } +int policy_parser(void *v_s, char *str, char *aa, struct ptr_array *pa) { + struct policy *s = v_s; + int aret = 0; + if ((aret = argcmp(str, "CreationDate")) == 0 || aret == '=') { + TRY(!aa, "CreationDate argument missing\n"); + s->creation_date = aa; // string string + + } else + if ((aret = argcmp(str, "Description")) == 0 || aret == '=') { + TRY(!aa, "Description argument missing\n"); + s->description = aa; // string string + + } else + if ((aret = argcmp(str, "IsLinkable")) == 0 || aret == '=') { + s->is_set_is_linkable = 1; + if (!aa || !strcasecmp(aa, "true")) { + s->is_linkable = 1; + } else if (!strcasecmp(aa, "false")) { + s->is_linkable = 0; + } else { + BAD_RET("IsLinkable require true/false\n"); + } + } else + if ((aret = argcmp(str, "LastModificationDate")) == 0 || aret == '=') { + TRY(!aa, "LastModificationDate argument missing\n"); + s->last_modification_date = aa; // string string + + } else + if ((aret = argcmp(str, "Orn")) == 0 || aret == '=') { + TRY(!aa, "Orn argument missing\n"); + s->orn = aa; // string string + + } else + if ((aret = argcmp(str, "Path")) == 0 || aret == '=') { + TRY(!aa, "Path argument missing\n"); + s->path = aa; // string string + + } else + if ((aret = argcmp(str, "PolicyDefaultVersionId")) == 0 || aret == '=') { + TRY(!aa, "PolicyDefaultVersionId argument missing\n"); + s->policy_default_version_id = aa; // string string + + } else + if ((aret = argcmp(str, "PolicyId")) == 0 || aret == '=') { + TRY(!aa, "PolicyId argument missing\n"); + s->policy_id = aa; // string string + + } else + if ((aret = argcmp(str, "PolicyName")) == 0 || aret == '=') { + TRY(!aa, "PolicyName argument missing\n"); + s->policy_name = aa; // string string + + } else + if ((aret = argcmp(str, "ResourcesCount")) == 0 || aret == '=') { + TRY(!aa, "ResourcesCount argument missing\n"); + s->is_set_resources_count = 1; + s->resources_count = atoi(aa); + } else + { + fprintf(stderr, "'%s' not an argumemt of 'Policy'\n", str); + return -1; + } + return 0; +} + +int policy_version_parser(void *v_s, char *str, char *aa, struct ptr_array *pa) { + struct policy_version *s = v_s; + int aret = 0; + if ((aret = argcmp(str, "Body")) == 0 || aret == '=') { + TRY(!aa, "Body argument missing\n"); + s->body = aa; // string string + + } else + if ((aret = argcmp(str, "CreationDate")) == 0 || aret == '=') { + TRY(!aa, "CreationDate argument missing\n"); + s->creation_date = aa; // string string + + } else + if ((aret = argcmp(str, "DefaultVersion")) == 0 || aret == '=') { + s->is_set_default_version = 1; + if (!aa || !strcasecmp(aa, "true")) { + s->default_version = 1; + } else if (!strcasecmp(aa, "false")) { + s->default_version = 0; + } else { + BAD_RET("DefaultVersion require true/false\n"); + } + } else + if ((aret = argcmp(str, "VersionId")) == 0 || aret == '=') { + TRY(!aa, "VersionId argument missing\n"); + s->version_id = aa; // string string + + } else + { + fprintf(stderr, "'%s' not an argumemt of 'PolicyVersion'\n", str); + return -1; + } + return 0; +} + int private_ip_parser(void *v_s, char *str, char *aa, struct ptr_array *pa) { struct private_ip *s = v_s; int aret = 0; @@ -6669,6 +7429,51 @@ int quota_types_parser(void *v_s, char *str, char *aa, struct ptr_array *pa) { return 0; } +int read_linked_policies_filters_parser(void *v_s, char *str, char *aa, struct ptr_array *pa) { + struct read_linked_policies_filters *s = v_s; + int aret = 0; + if ((aret = argcmp(str, "PathPrefix")) == 0 || aret == '=') { + TRY(!aa, "PathPrefix argument missing\n"); + s->path_prefix = aa; // string string + + } else + { + fprintf(stderr, "'%s' not an argumemt of 'ReadLinkedPoliciesFilters'\n", str); + return -1; + } + return 0; +} + +int read_policies_filters_parser(void *v_s, char *str, char *aa, struct ptr_array *pa) { + struct read_policies_filters *s = v_s; + int aret = 0; + if ((aret = argcmp(str, "OnlyLinked")) == 0 || aret == '=') { + s->is_set_only_linked = 1; + if (!aa || !strcasecmp(aa, "true")) { + s->only_linked = 1; + } else if (!strcasecmp(aa, "false")) { + s->only_linked = 0; + } else { + BAD_RET("OnlyLinked require true/false\n"); + } + } else + if ((aret = argcmp(str, "PathPrefix")) == 0 || aret == '=') { + TRY(!aa, "PathPrefix argument missing\n"); + s->path_prefix = aa; // string string + + } else + if ((aret = argcmp(str, "Scope")) == 0 || aret == '=') { + TRY(!aa, "Scope argument missing\n"); + s->scope = aa; // string string + + } else + { + fprintf(stderr, "'%s' not an argumemt of 'ReadPoliciesFilters'\n", str); + return -1; + } + return 0; +} + int region_parser(void *v_s, char *str, char *aa, struct ptr_array *pa) { struct region *s = v_s; int aret = 0; @@ -8305,6 +9110,21 @@ int vm_type_parser(void *v_s, char *str, char *aa, struct ptr_array *pa) { BAD_RET("BsuOptimized require true/false\n"); } } else + if ((aret = argcmp(str, "EphemeralsType")) == 0 || aret == '=') { + TRY(!aa, "EphemeralsType argument missing\n"); + s->ephemerals_type = aa; // string string + + } else + if ((aret = argcmp(str, "Eth")) == 0 || aret == '=') { + TRY(!aa, "Eth argument missing\n"); + s->is_set_eth = 1; + s->eth = atoi(aa); + } else + if ((aret = argcmp(str, "Gpu")) == 0 || aret == '=') { + TRY(!aa, "Gpu argument missing\n"); + s->is_set_gpu = 1; + s->gpu = atoi(aa); + } else if ((aret = argcmp(str, "MaxPrivateIps")) == 0 || aret == '=') { TRY(!aa, "MaxPrivateIps argument missing\n"); s->is_set_max_private_ips = 1; @@ -8633,6 +9453,38 @@ int vpn_options_parser(void *v_s, char *str, char *aa, struct ptr_array *pa) { return 0; } +int vpn_options_to_update_parser(void *v_s, char *str, char *aa, struct ptr_array *pa) { + struct vpn_options_to_update *s = v_s; + int aret = 0; + if ((aret = argcmp(str, "Phase2Options")) == 0 || aret == '=') { + char *dot_pos; + + TRY(!aa, "Phase2Options argument missing\n"); + dot_pos = strchr(str, '.'); + if (dot_pos++) { + cascade_struct = &s->phase2_options; + cascade_parser = phase2_options_to_update_parser; + if (*dot_pos == '.') { + ++dot_pos; + } + STRY(phase2_options_to_update_parser(&s->phase2_options, dot_pos, aa, pa)); + s->is_set_phase2_options = 1; + } else { + s->phase2_options_str = aa; + } + } else + if ((aret = argcmp(str, "TunnelInsideIpRange")) == 0 || aret == '=') { + TRY(!aa, "TunnelInsideIpRange argument missing\n"); + s->tunnel_inside_ip_range = aa; // string string + + } else + { + fprintf(stderr, "'%s' not an argumemt of 'VpnOptionsToUpdate'\n", str); + return -1; + } + return 0; +} + int with_parser(void *v_s, char *str, char *aa, struct ptr_array *pa) { struct with *s = v_s; int aret = 0; @@ -9139,11 +9991,11 @@ int main(int ac, char **av) dot_pos = strchr(str, '.'); if (dot_pos++) { cascade_struct = &s->vpn_options; - cascade_parser = vpn_options_parser; + cascade_parser = vpn_options_to_update_parser; if (*dot_pos == '.') { ++dot_pos; } - STRY(vpn_options_parser(&s->vpn_options, dot_pos, aa, pa)); + STRY(vpn_options_to_update_parser(&s->vpn_options, dot_pos, aa, pa)); s->is_set_vpn_options = 1; } else { s->vpn_options_str = aa; @@ -10349,19 +11201,19 @@ int main(int ac, char **av) } osc_deinit_str(&r); } else - if (!strcmp("UpdateRoutePropagation", av[i])) { + if (!strcmp("UpdateRouteTableLink", av[i])) { json_object *jobj; auto_ptr_array struct ptr_array opa = {0}; struct ptr_array *pa = &opa; - struct osc_update_route_propagation_arg a = {0}; - struct osc_update_route_propagation_arg *s = &a; + struct osc_update_route_table_link_arg a = {0}; + struct osc_update_route_table_link_arg *s = &a; __attribute__((cleanup(files_cnt_cleanup))) char *files_cnt[MAX_FILES_PER_CMD] = {NULL}; int cret; cascade_struct = NULL; cascade_parser = NULL; - update_route_propagation_arg: + update_route_table_link_arg: if (i + 1 < ac && av[i + 1][0] == '.' && av[i + 1][1] == '.') { char *next_a = &av[i + 1][2]; @@ -10379,7 +11231,7 @@ int main(int ac, char **av) } STRY(cascade_parser(cascade_struct, next_a, aa, pa)); i += incr; - goto update_route_propagation_arg; + goto update_route_table_link_arg; } if (i + 1 < ac && av[i + 1][0] == '-' && av[i + 1][1] == '-') { @@ -10416,22 +11268,17 @@ int main(int ac, char **av) BAD_RET("DryRun require true/false\n"); } } else - if ((aret = argcmp(next_a, "Enable")) == 0 || aret == '=' ) { + if ((aret = argcmp(next_a, "LinkRouteTableId")) == 0 || aret == '=' ) { char *eq_ptr = strchr(next_a, '='); if (eq_ptr) { - TRY((!*eq_ptr), "Enable argument missing\n"); + TRY((!*eq_ptr), "LinkRouteTableId argument missing\n"); aa = eq_ptr + 1; incr = 1; } - s->is_set_enable = 1; - if (!aa || !strcasecmp(aa, "true")) { - s->enable = 1; - } else if (!strcasecmp(aa, "false")) { - s->enable = 0; - } else { - BAD_RET("Enable require true/false\n"); - } - } else + TRY(!aa, "LinkRouteTableId argument missing\n"); + s->link_route_table_id = aa; // string string + + } else if ((aret = argcmp(next_a, "RouteTableId")) == 0 || aret == '=' ) { char *eq_ptr = strchr(next_a, '='); if (eq_ptr) { @@ -10442,26 +11289,15 @@ int main(int ac, char **av) TRY(!aa, "RouteTableId argument missing\n"); s->route_table_id = aa; // string string - } else - if ((aret = argcmp(next_a, "VirtualGatewayId")) == 0 || aret == '=' ) { - char *eq_ptr = strchr(next_a, '='); - if (eq_ptr) { - TRY((!*eq_ptr), "VirtualGatewayId argument missing\n"); - aa = eq_ptr + 1; - incr = 1; - } - TRY(!aa, "VirtualGatewayId argument missing\n"); - s->virtual_gateway_id = aa; // string string - } else { - BAD_RET("'%s' is not a valide argument for 'UpdateRoutePropagation'\n", next_a); + BAD_RET("'%s' is not a valide argument for 'UpdateRouteTableLink'\n", next_a); } i += incr; - goto update_route_propagation_arg; + goto update_route_table_link_arg; } - cret = osc_update_route_propagation(&e, &r, &a); - TRY(cret, "fail to call UpdateRoutePropagation: %s\n", curl_easy_strerror(cret)); + cret = osc_update_route_table_link(&e, &r, &a); + TRY(cret, "fail to call UpdateRouteTableLink: %s\n", curl_easy_strerror(cret)); CHK_BAD_RET(!r.buf, "connection sucessful, but empty responce\n"); if (program_flag & OAPI_RAW_OUTPUT) puts(r.buf); @@ -10474,19 +11310,19 @@ int main(int ac, char **av) } osc_deinit_str(&r); } else - if (!strcmp("UpdateRoute", av[i])) { + if (!strcmp("UpdateRoutePropagation", av[i])) { json_object *jobj; auto_ptr_array struct ptr_array opa = {0}; struct ptr_array *pa = &opa; - struct osc_update_route_arg a = {0}; - struct osc_update_route_arg *s = &a; + struct osc_update_route_propagation_arg a = {0}; + struct osc_update_route_propagation_arg *s = &a; __attribute__((cleanup(files_cnt_cleanup))) char *files_cnt[MAX_FILES_PER_CMD] = {NULL}; int cret; cascade_struct = NULL; cascade_parser = NULL; - update_route_arg: + update_route_propagation_arg: if (i + 1 < ac && av[i + 1][0] == '.' && av[i + 1][1] == '.') { char *next_a = &av[i + 1][2]; @@ -10504,7 +11340,7 @@ int main(int ac, char **av) } STRY(cascade_parser(cascade_struct, next_a, aa, pa)); i += incr; - goto update_route_arg; + goto update_route_propagation_arg; } if (i + 1 < ac && av[i + 1][0] == '-' && av[i + 1][1] == '-') { @@ -10525,17 +11361,6 @@ int main(int ac, char **av) incr = 1; } } - if ((aret = argcmp(next_a, "DestinationIpRange")) == 0 || aret == '=' ) { - char *eq_ptr = strchr(next_a, '='); - if (eq_ptr) { - TRY((!*eq_ptr), "DestinationIpRange argument missing\n"); - aa = eq_ptr + 1; - incr = 1; - } - TRY(!aa, "DestinationIpRange argument missing\n"); - s->destination_ip_range = aa; // string string - - } else if ((aret = argcmp(next_a, "DryRun")) == 0 || aret == '=' ) { char *eq_ptr = strchr(next_a, '='); if (eq_ptr) { @@ -10552,26 +11377,162 @@ int main(int ac, char **av) BAD_RET("DryRun require true/false\n"); } } else - if ((aret = argcmp(next_a, "GatewayId")) == 0 || aret == '=' ) { + if ((aret = argcmp(next_a, "Enable")) == 0 || aret == '=' ) { char *eq_ptr = strchr(next_a, '='); if (eq_ptr) { - TRY((!*eq_ptr), "GatewayId argument missing\n"); + TRY((!*eq_ptr), "Enable argument missing\n"); aa = eq_ptr + 1; incr = 1; } - TRY(!aa, "GatewayId argument missing\n"); - s->gateway_id = aa; // string string - - } else - if ((aret = argcmp(next_a, "NatServiceId")) == 0 || aret == '=' ) { + s->is_set_enable = 1; + if (!aa || !strcasecmp(aa, "true")) { + s->enable = 1; + } else if (!strcasecmp(aa, "false")) { + s->enable = 0; + } else { + BAD_RET("Enable require true/false\n"); + } + } else + if ((aret = argcmp(next_a, "RouteTableId")) == 0 || aret == '=' ) { char *eq_ptr = strchr(next_a, '='); if (eq_ptr) { - TRY((!*eq_ptr), "NatServiceId argument missing\n"); + TRY((!*eq_ptr), "RouteTableId argument missing\n"); aa = eq_ptr + 1; incr = 1; } - TRY(!aa, "NatServiceId argument missing\n"); - s->nat_service_id = aa; // string string + TRY(!aa, "RouteTableId argument missing\n"); + s->route_table_id = aa; // string string + + } else + if ((aret = argcmp(next_a, "VirtualGatewayId")) == 0 || aret == '=' ) { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "VirtualGatewayId argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + TRY(!aa, "VirtualGatewayId argument missing\n"); + s->virtual_gateway_id = aa; // string string + + } else + { + BAD_RET("'%s' is not a valide argument for 'UpdateRoutePropagation'\n", next_a); + } + i += incr; + goto update_route_propagation_arg; + } + cret = osc_update_route_propagation(&e, &r, &a); + TRY(cret, "fail to call UpdateRoutePropagation: %s\n", curl_easy_strerror(cret)); + CHK_BAD_RET(!r.buf, "connection sucessful, but empty responce\n"); + if (program_flag & OAPI_RAW_OUTPUT) + puts(r.buf); + else { + jobj = json_tokener_parse(r.buf); + puts(json_object_to_json_string_ext(jobj, + JSON_C_TO_STRING_PRETTY | JSON_C_TO_STRING_NOSLASHESCAPE | + color_flag)); + json_object_put(jobj); + } + osc_deinit_str(&r); + } else + if (!strcmp("UpdateRoute", av[i])) { + json_object *jobj; + auto_ptr_array struct ptr_array opa = {0}; + struct ptr_array *pa = &opa; + struct osc_update_route_arg a = {0}; + struct osc_update_route_arg *s = &a; + __attribute__((cleanup(files_cnt_cleanup))) char *files_cnt[MAX_FILES_PER_CMD] = {NULL}; + int cret; + + cascade_struct = NULL; + cascade_parser = NULL; + + update_route_arg: + + if (i + 1 < ac && av[i + 1][0] == '.' && av[i + 1][1] == '.') { + char *next_a = &av[i + 1][2]; + char *aa = i + 2 < ac ? av[i + 2] : 0; + int incr = 2; + char *eq_ptr = strchr(next_a, '='); + + CHK_BAD_RET(!cascade_struct, "cascade need to be se first\n"); + if (eq_ptr) { + CHK_BAD_RET(!*eq_ptr, "cascade need an argument\n"); + incr = 1; + aa = eq_ptr + 1; + } else { + CHK_BAD_RET(!aa || aa[0] == '-', "cascade need an argument\n"); + } + STRY(cascade_parser(cascade_struct, next_a, aa, pa)); + i += incr; + goto update_route_arg; + } + + if (i + 1 < ac && av[i + 1][0] == '-' && av[i + 1][1] == '-') { + char *next_a = &av[i + 1][2]; + char *str = next_a; + char *aa = i + 2 < ac ? av[i + 2] : 0; + int aret = 0; + int incr = aa ? 2 : 1; + + if (aa && aa[0] == '-' && aa[1] == '-' && aa[2] != '-') { + if (!strcmp(aa, "--file")) { + TRY(i + 3 >= ac, "file name require"); + ++incr; + aa = read_file(files_cnt, av[i + 3]); + STRY(!aa); + } else { + aa = 0; + incr = 1; + } + } + if ((aret = argcmp(next_a, "DestinationIpRange")) == 0 || aret == '=' ) { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "DestinationIpRange argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + TRY(!aa, "DestinationIpRange argument missing\n"); + s->destination_ip_range = aa; // string string + + } else + if ((aret = argcmp(next_a, "DryRun")) == 0 || aret == '=' ) { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "DryRun argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + s->is_set_dry_run = 1; + if (!aa || !strcasecmp(aa, "true")) { + s->dry_run = 1; + } else if (!strcasecmp(aa, "false")) { + s->dry_run = 0; + } else { + BAD_RET("DryRun require true/false\n"); + } + } else + if ((aret = argcmp(next_a, "GatewayId")) == 0 || aret == '=' ) { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "GatewayId argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + TRY(!aa, "GatewayId argument missing\n"); + s->gateway_id = aa; // string string + + } else + if ((aret = argcmp(next_a, "NatServiceId")) == 0 || aret == '=' ) { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "NatServiceId argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + TRY(!aa, "NatServiceId argument missing\n"); + s->nat_service_id = aa; // string string } else if ((aret = argcmp(next_a, "NetPeeringId")) == 0 || aret == '=' ) { @@ -11699,6 +12660,115 @@ int main(int ac, char **av) } osc_deinit_str(&r); } else + if (!strcmp("UpdateDedicatedGroup", av[i])) { + json_object *jobj; + auto_ptr_array struct ptr_array opa = {0}; + struct ptr_array *pa = &opa; + struct osc_update_dedicated_group_arg a = {0}; + struct osc_update_dedicated_group_arg *s = &a; + __attribute__((cleanup(files_cnt_cleanup))) char *files_cnt[MAX_FILES_PER_CMD] = {NULL}; + int cret; + + cascade_struct = NULL; + cascade_parser = NULL; + + update_dedicated_group_arg: + + if (i + 1 < ac && av[i + 1][0] == '.' && av[i + 1][1] == '.') { + char *next_a = &av[i + 1][2]; + char *aa = i + 2 < ac ? av[i + 2] : 0; + int incr = 2; + char *eq_ptr = strchr(next_a, '='); + + CHK_BAD_RET(!cascade_struct, "cascade need to be se first\n"); + if (eq_ptr) { + CHK_BAD_RET(!*eq_ptr, "cascade need an argument\n"); + incr = 1; + aa = eq_ptr + 1; + } else { + CHK_BAD_RET(!aa || aa[0] == '-', "cascade need an argument\n"); + } + STRY(cascade_parser(cascade_struct, next_a, aa, pa)); + i += incr; + goto update_dedicated_group_arg; + } + + if (i + 1 < ac && av[i + 1][0] == '-' && av[i + 1][1] == '-') { + char *next_a = &av[i + 1][2]; + char *str = next_a; + char *aa = i + 2 < ac ? av[i + 2] : 0; + int aret = 0; + int incr = aa ? 2 : 1; + + if (aa && aa[0] == '-' && aa[1] == '-' && aa[2] != '-') { + if (!strcmp(aa, "--file")) { + TRY(i + 3 >= ac, "file name require"); + ++incr; + aa = read_file(files_cnt, av[i + 3]); + STRY(!aa); + } else { + aa = 0; + incr = 1; + } + } + if ((aret = argcmp(next_a, "DedicatedGroupId")) == 0 || aret == '=' ) { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "DedicatedGroupId argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + TRY(!aa, "DedicatedGroupId argument missing\n"); + s->dedicated_group_id = aa; // string string + + } else + if ((aret = argcmp(next_a, "DryRun")) == 0 || aret == '=' ) { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "DryRun argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + s->is_set_dry_run = 1; + if (!aa || !strcasecmp(aa, "true")) { + s->dry_run = 1; + } else if (!strcasecmp(aa, "false")) { + s->dry_run = 0; + } else { + BAD_RET("DryRun require true/false\n"); + } + } else + if ((aret = argcmp(next_a, "Name")) == 0 || aret == '=' ) { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "Name argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + TRY(!aa, "Name argument missing\n"); + s->name = aa; // string string + + } else + { + BAD_RET("'%s' is not a valide argument for 'UpdateDedicatedGroup'\n", next_a); + } + i += incr; + goto update_dedicated_group_arg; + } + cret = osc_update_dedicated_group(&e, &r, &a); + TRY(cret, "fail to call UpdateDedicatedGroup: %s\n", curl_easy_strerror(cret)); + CHK_BAD_RET(!r.buf, "connection sucessful, but empty responce\n"); + if (program_flag & OAPI_RAW_OUTPUT) + puts(r.buf); + else { + jobj = json_tokener_parse(r.buf); + puts(json_object_to_json_string_ext(jobj, + JSON_C_TO_STRING_PRETTY | JSON_C_TO_STRING_NOSLASHESCAPE | + color_flag)); + json_object_put(jobj); + } + osc_deinit_str(&r); + } else if (!strcmp("UpdateCa", av[i])) { json_object *jobj; auto_ptr_array struct ptr_array opa = {0}; @@ -12974,19 +14044,19 @@ int main(int ac, char **av) } osc_deinit_str(&r); } else - if (!strcmp("UnlinkNic", av[i])) { + if (!strcmp("UnlinkPolicy", av[i])) { json_object *jobj; auto_ptr_array struct ptr_array opa = {0}; struct ptr_array *pa = &opa; - struct osc_unlink_nic_arg a = {0}; - struct osc_unlink_nic_arg *s = &a; + struct osc_unlink_policy_arg a = {0}; + struct osc_unlink_policy_arg *s = &a; __attribute__((cleanup(files_cnt_cleanup))) char *files_cnt[MAX_FILES_PER_CMD] = {NULL}; int cret; cascade_struct = NULL; cascade_parser = NULL; - unlink_nic_arg: + unlink_policy_arg: if (i + 1 < ac && av[i + 1][0] == '.' && av[i + 1][1] == '.') { char *next_a = &av[i + 1][2]; @@ -13004,7 +14074,7 @@ int main(int ac, char **av) } STRY(cascade_parser(cascade_struct, next_a, aa, pa)); i += incr; - goto unlink_nic_arg; + goto unlink_policy_arg; } if (i + 1 < ac && av[i + 1][0] == '-' && av[i + 1][1] == '-') { @@ -13041,25 +14111,36 @@ int main(int ac, char **av) BAD_RET("DryRun require true/false\n"); } } else - if ((aret = argcmp(next_a, "LinkNicId")) == 0 || aret == '=' ) { + if ((aret = argcmp(next_a, "PolicyOrn")) == 0 || aret == '=' ) { char *eq_ptr = strchr(next_a, '='); if (eq_ptr) { - TRY((!*eq_ptr), "LinkNicId argument missing\n"); + TRY((!*eq_ptr), "PolicyOrn argument missing\n"); aa = eq_ptr + 1; incr = 1; } - TRY(!aa, "LinkNicId argument missing\n"); - s->link_nic_id = aa; // string string + TRY(!aa, "PolicyOrn argument missing\n"); + s->policy_orn = aa; // string string + + } else + if ((aret = argcmp(next_a, "UserName")) == 0 || aret == '=' ) { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "UserName argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + TRY(!aa, "UserName argument missing\n"); + s->user_name = aa; // string string } else { - BAD_RET("'%s' is not a valide argument for 'UnlinkNic'\n", next_a); + BAD_RET("'%s' is not a valide argument for 'UnlinkPolicy'\n", next_a); } i += incr; - goto unlink_nic_arg; + goto unlink_policy_arg; } - cret = osc_unlink_nic(&e, &r, &a); - TRY(cret, "fail to call UnlinkNic: %s\n", curl_easy_strerror(cret)); + cret = osc_unlink_policy(&e, &r, &a); + TRY(cret, "fail to call UnlinkPolicy: %s\n", curl_easy_strerror(cret)); CHK_BAD_RET(!r.buf, "connection sucessful, but empty responce\n"); if (program_flag & OAPI_RAW_OUTPUT) puts(r.buf); @@ -13072,11 +14153,109 @@ int main(int ac, char **av) } osc_deinit_str(&r); } else - if (!strcmp("UnlinkLoadBalancerBackendMachines", av[i])) { + if (!strcmp("UnlinkNic", av[i])) { json_object *jobj; auto_ptr_array struct ptr_array opa = {0}; struct ptr_array *pa = &opa; - struct osc_unlink_load_balancer_backend_machines_arg a = {0}; + struct osc_unlink_nic_arg a = {0}; + struct osc_unlink_nic_arg *s = &a; + __attribute__((cleanup(files_cnt_cleanup))) char *files_cnt[MAX_FILES_PER_CMD] = {NULL}; + int cret; + + cascade_struct = NULL; + cascade_parser = NULL; + + unlink_nic_arg: + + if (i + 1 < ac && av[i + 1][0] == '.' && av[i + 1][1] == '.') { + char *next_a = &av[i + 1][2]; + char *aa = i + 2 < ac ? av[i + 2] : 0; + int incr = 2; + char *eq_ptr = strchr(next_a, '='); + + CHK_BAD_RET(!cascade_struct, "cascade need to be se first\n"); + if (eq_ptr) { + CHK_BAD_RET(!*eq_ptr, "cascade need an argument\n"); + incr = 1; + aa = eq_ptr + 1; + } else { + CHK_BAD_RET(!aa || aa[0] == '-', "cascade need an argument\n"); + } + STRY(cascade_parser(cascade_struct, next_a, aa, pa)); + i += incr; + goto unlink_nic_arg; + } + + if (i + 1 < ac && av[i + 1][0] == '-' && av[i + 1][1] == '-') { + char *next_a = &av[i + 1][2]; + char *str = next_a; + char *aa = i + 2 < ac ? av[i + 2] : 0; + int aret = 0; + int incr = aa ? 2 : 1; + + if (aa && aa[0] == '-' && aa[1] == '-' && aa[2] != '-') { + if (!strcmp(aa, "--file")) { + TRY(i + 3 >= ac, "file name require"); + ++incr; + aa = read_file(files_cnt, av[i + 3]); + STRY(!aa); + } else { + aa = 0; + incr = 1; + } + } + if ((aret = argcmp(next_a, "DryRun")) == 0 || aret == '=' ) { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "DryRun argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + s->is_set_dry_run = 1; + if (!aa || !strcasecmp(aa, "true")) { + s->dry_run = 1; + } else if (!strcasecmp(aa, "false")) { + s->dry_run = 0; + } else { + BAD_RET("DryRun require true/false\n"); + } + } else + if ((aret = argcmp(next_a, "LinkNicId")) == 0 || aret == '=' ) { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "LinkNicId argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + TRY(!aa, "LinkNicId argument missing\n"); + s->link_nic_id = aa; // string string + + } else + { + BAD_RET("'%s' is not a valide argument for 'UnlinkNic'\n", next_a); + } + i += incr; + goto unlink_nic_arg; + } + cret = osc_unlink_nic(&e, &r, &a); + TRY(cret, "fail to call UnlinkNic: %s\n", curl_easy_strerror(cret)); + CHK_BAD_RET(!r.buf, "connection sucessful, but empty responce\n"); + if (program_flag & OAPI_RAW_OUTPUT) + puts(r.buf); + else { + jobj = json_tokener_parse(r.buf); + puts(json_object_to_json_string_ext(jobj, + JSON_C_TO_STRING_PRETTY | JSON_C_TO_STRING_NOSLASHESCAPE | + color_flag)); + json_object_put(jobj); + } + osc_deinit_str(&r); + } else + if (!strcmp("UnlinkLoadBalancerBackendMachines", av[i])) { + json_object *jobj; + auto_ptr_array struct ptr_array opa = {0}; + struct ptr_array *pa = &opa; + struct osc_unlink_load_balancer_backend_machines_arg a = {0}; struct osc_unlink_load_balancer_backend_machines_arg *s = &a; __attribute__((cleanup(files_cnt_cleanup))) char *files_cnt[MAX_FILES_PER_CMD] = {NULL}; int cret; @@ -13619,19 +14798,19 @@ int main(int ac, char **av) } osc_deinit_str(&r); } else - if (!strcmp("SendResetPasswordEmail", av[i])) { + if (!strcmp("SetDefaultPolicyVersion", av[i])) { json_object *jobj; auto_ptr_array struct ptr_array opa = {0}; struct ptr_array *pa = &opa; - struct osc_send_reset_password_email_arg a = {0}; - struct osc_send_reset_password_email_arg *s = &a; + struct osc_set_default_policy_version_arg a = {0}; + struct osc_set_default_policy_version_arg *s = &a; __attribute__((cleanup(files_cnt_cleanup))) char *files_cnt[MAX_FILES_PER_CMD] = {NULL}; int cret; cascade_struct = NULL; cascade_parser = NULL; - send_reset_password_email_arg: + set_default_policy_version_arg: if (i + 1 < ac && av[i + 1][0] == '.' && av[i + 1][1] == '.') { char *next_a = &av[i + 1][2]; @@ -13649,7 +14828,7 @@ int main(int ac, char **av) } STRY(cascade_parser(cascade_struct, next_a, aa, pa)); i += incr; - goto send_reset_password_email_arg; + goto set_default_policy_version_arg; } if (i + 1 < ac && av[i + 1][0] == '-' && av[i + 1][1] == '-') { @@ -13670,41 +14849,36 @@ int main(int ac, char **av) incr = 1; } } - if ((aret = argcmp(next_a, "DryRun")) == 0 || aret == '=' ) { + if ((aret = argcmp(next_a, "PolicyOrn")) == 0 || aret == '=' ) { char *eq_ptr = strchr(next_a, '='); if (eq_ptr) { - TRY((!*eq_ptr), "DryRun argument missing\n"); + TRY((!*eq_ptr), "PolicyOrn argument missing\n"); aa = eq_ptr + 1; incr = 1; } - s->is_set_dry_run = 1; - if (!aa || !strcasecmp(aa, "true")) { - s->dry_run = 1; - } else if (!strcasecmp(aa, "false")) { - s->dry_run = 0; - } else { - BAD_RET("DryRun require true/false\n"); - } - } else - if ((aret = argcmp(next_a, "Email")) == 0 || aret == '=' ) { + TRY(!aa, "PolicyOrn argument missing\n"); + s->policy_orn = aa; // string string + + } else + if ((aret = argcmp(next_a, "VersionId")) == 0 || aret == '=' ) { char *eq_ptr = strchr(next_a, '='); if (eq_ptr) { - TRY((!*eq_ptr), "Email argument missing\n"); + TRY((!*eq_ptr), "VersionId argument missing\n"); aa = eq_ptr + 1; incr = 1; } - TRY(!aa, "Email argument missing\n"); - s->email = aa; // string string + TRY(!aa, "VersionId argument missing\n"); + s->version_id = aa; // string string } else { - BAD_RET("'%s' is not a valide argument for 'SendResetPasswordEmail'\n", next_a); + BAD_RET("'%s' is not a valide argument for 'SetDefaultPolicyVersion'\n", next_a); } i += incr; - goto send_reset_password_email_arg; + goto set_default_policy_version_arg; } - cret = osc_send_reset_password_email(&e, &r, &a); - TRY(cret, "fail to call SendResetPasswordEmail: %s\n", curl_easy_strerror(cret)); + cret = osc_set_default_policy_version(&e, &r, &a); + TRY(cret, "fail to call SetDefaultPolicyVersion: %s\n", curl_easy_strerror(cret)); CHK_BAD_RET(!r.buf, "connection sucessful, but empty responce\n"); if (program_flag & OAPI_RAW_OUTPUT) puts(r.buf); @@ -13935,115 +15109,6 @@ int main(int ac, char **av) } osc_deinit_str(&r); } else - if (!strcmp("ResetAccountPassword", av[i])) { - json_object *jobj; - auto_ptr_array struct ptr_array opa = {0}; - struct ptr_array *pa = &opa; - struct osc_reset_account_password_arg a = {0}; - struct osc_reset_account_password_arg *s = &a; - __attribute__((cleanup(files_cnt_cleanup))) char *files_cnt[MAX_FILES_PER_CMD] = {NULL}; - int cret; - - cascade_struct = NULL; - cascade_parser = NULL; - - reset_account_password_arg: - - if (i + 1 < ac && av[i + 1][0] == '.' && av[i + 1][1] == '.') { - char *next_a = &av[i + 1][2]; - char *aa = i + 2 < ac ? av[i + 2] : 0; - int incr = 2; - char *eq_ptr = strchr(next_a, '='); - - CHK_BAD_RET(!cascade_struct, "cascade need to be se first\n"); - if (eq_ptr) { - CHK_BAD_RET(!*eq_ptr, "cascade need an argument\n"); - incr = 1; - aa = eq_ptr + 1; - } else { - CHK_BAD_RET(!aa || aa[0] == '-', "cascade need an argument\n"); - } - STRY(cascade_parser(cascade_struct, next_a, aa, pa)); - i += incr; - goto reset_account_password_arg; - } - - if (i + 1 < ac && av[i + 1][0] == '-' && av[i + 1][1] == '-') { - char *next_a = &av[i + 1][2]; - char *str = next_a; - char *aa = i + 2 < ac ? av[i + 2] : 0; - int aret = 0; - int incr = aa ? 2 : 1; - - if (aa && aa[0] == '-' && aa[1] == '-' && aa[2] != '-') { - if (!strcmp(aa, "--file")) { - TRY(i + 3 >= ac, "file name require"); - ++incr; - aa = read_file(files_cnt, av[i + 3]); - STRY(!aa); - } else { - aa = 0; - incr = 1; - } - } - if ((aret = argcmp(next_a, "DryRun")) == 0 || aret == '=' ) { - char *eq_ptr = strchr(next_a, '='); - if (eq_ptr) { - TRY((!*eq_ptr), "DryRun argument missing\n"); - aa = eq_ptr + 1; - incr = 1; - } - s->is_set_dry_run = 1; - if (!aa || !strcasecmp(aa, "true")) { - s->dry_run = 1; - } else if (!strcasecmp(aa, "false")) { - s->dry_run = 0; - } else { - BAD_RET("DryRun require true/false\n"); - } - } else - if ((aret = argcmp(next_a, "Password")) == 0 || aret == '=' ) { - char *eq_ptr = strchr(next_a, '='); - if (eq_ptr) { - TRY((!*eq_ptr), "Password argument missing\n"); - aa = eq_ptr + 1; - incr = 1; - } - TRY(!aa, "Password argument missing\n"); - s->password = aa; // string string - - } else - if ((aret = argcmp(next_a, "Token")) == 0 || aret == '=' ) { - char *eq_ptr = strchr(next_a, '='); - if (eq_ptr) { - TRY((!*eq_ptr), "Token argument missing\n"); - aa = eq_ptr + 1; - incr = 1; - } - TRY(!aa, "Token argument missing\n"); - s->token = aa; // string string - - } else - { - BAD_RET("'%s' is not a valide argument for 'ResetAccountPassword'\n", next_a); - } - i += incr; - goto reset_account_password_arg; - } - cret = osc_reset_account_password(&e, &r, &a); - TRY(cret, "fail to call ResetAccountPassword: %s\n", curl_easy_strerror(cret)); - CHK_BAD_RET(!r.buf, "connection sucessful, but empty responce\n"); - if (program_flag & OAPI_RAW_OUTPUT) - puts(r.buf); - else { - jobj = json_tokener_parse(r.buf); - puts(json_object_to_json_string_ext(jobj, - JSON_C_TO_STRING_PRETTY | JSON_C_TO_STRING_NOSLASHESCAPE | - color_flag)); - json_object_put(jobj); - } - osc_deinit_str(&r); - } else if (!strcmp("RejectNetPeering", av[i])) { json_object *jobj; auto_ptr_array struct ptr_array opa = {0}; @@ -14443,6 +15508,28 @@ int main(int ac, char **av) s->filters_str = aa; } } else + if ((aret = argcmp(next_a, "NextPageToken")) == 0 || aret == '=' ) { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "NextPageToken argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + TRY(!aa, "NextPageToken argument missing\n"); + s->next_page_token = aa; // string string + + } else + if ((aret = argcmp(next_a, "ResultsPerPage")) == 0 || aret == '=' ) { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "ResultsPerPage argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + TRY(!aa, "ResultsPerPage argument missing\n"); + s->is_set_results_per_page = 1; + s->results_per_page = atoi(aa); + } else { BAD_RET("'%s' is not a valide argument for 'ReadVpnConnections'\n", next_a); } @@ -14553,6 +15640,28 @@ int main(int ac, char **av) s->filters_str = aa; } } else + if ((aret = argcmp(next_a, "NextPageToken")) == 0 || aret == '=' ) { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "NextPageToken argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + TRY(!aa, "NextPageToken argument missing\n"); + s->next_page_token = aa; // string string + + } else + if ((aret = argcmp(next_a, "ResultsPerPage")) == 0 || aret == '=' ) { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "ResultsPerPage argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + TRY(!aa, "ResultsPerPage argument missing\n"); + s->is_set_results_per_page = 1; + s->results_per_page = atoi(aa); + } else { BAD_RET("'%s' is not a valide argument for 'ReadVolumes'\n", next_a); } @@ -14900,6 +16009,28 @@ int main(int ac, char **av) s->filters_str = aa; } } else + if ((aret = argcmp(next_a, "NextPageToken")) == 0 || aret == '=' ) { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "NextPageToken argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + TRY(!aa, "NextPageToken argument missing\n"); + s->next_page_token = aa; // string string + + } else + if ((aret = argcmp(next_a, "ResultsPerPage")) == 0 || aret == '=' ) { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "ResultsPerPage argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + TRY(!aa, "ResultsPerPage argument missing\n"); + s->is_set_results_per_page = 1; + s->results_per_page = atoi(aa); + } else { BAD_RET("'%s' is not a valide argument for 'ReadVms'\n", next_a); } @@ -15340,6 +16471,28 @@ int main(int ac, char **av) s->filters_str = aa; } } else + if ((aret = argcmp(next_a, "NextPageToken")) == 0 || aret == '=' ) { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "NextPageToken argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + TRY(!aa, "NextPageToken argument missing\n"); + s->next_page_token = aa; // string string + + } else + if ((aret = argcmp(next_a, "ResultsPerPage")) == 0 || aret == '=' ) { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "ResultsPerPage argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + TRY(!aa, "ResultsPerPage argument missing\n"); + s->is_set_results_per_page = 1; + s->results_per_page = atoi(aa); + } else { BAD_RET("'%s' is not a valide argument for 'ReadVirtualGateways'\n", next_a); } @@ -16405,6 +17558,28 @@ int main(int ac, char **av) s->filters_str = aa; } } else + if ((aret = argcmp(next_a, "NextPageToken")) == 0 || aret == '=' ) { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "NextPageToken argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + TRY(!aa, "NextPageToken argument missing\n"); + s->next_page_token = aa; // string string + + } else + if ((aret = argcmp(next_a, "ResultsPerPage")) == 0 || aret == '=' ) { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "ResultsPerPage argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + TRY(!aa, "ResultsPerPage argument missing\n"); + s->is_set_results_per_page = 1; + s->results_per_page = atoi(aa); + } else { BAD_RET("'%s' is not a valide argument for 'ReadRouteTables'\n", next_a); } @@ -16712,6 +17887,28 @@ int main(int ac, char **av) s->filters_str = aa; } } else + if ((aret = argcmp(next_a, "NextPageToken")) == 0 || aret == '=' ) { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "NextPageToken argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + TRY(!aa, "NextPageToken argument missing\n"); + s->next_page_token = aa; // string string + + } else + if ((aret = argcmp(next_a, "ResultsPerPage")) == 0 || aret == '=' ) { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "ResultsPerPage argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + TRY(!aa, "ResultsPerPage argument missing\n"); + s->is_set_results_per_page = 1; + s->results_per_page = atoi(aa); + } else { BAD_RET("'%s' is not a valide argument for 'ReadPublicIps'\n", next_a); } @@ -17016,19 +18213,19 @@ int main(int ac, char **av) } osc_deinit_str(&r); } else - if (!strcmp("ReadNics", av[i])) { + if (!strcmp("ReadPolicyVersions", av[i])) { json_object *jobj; auto_ptr_array struct ptr_array opa = {0}; struct ptr_array *pa = &opa; - struct osc_read_nics_arg a = {0}; - struct osc_read_nics_arg *s = &a; + struct osc_read_policy_versions_arg a = {0}; + struct osc_read_policy_versions_arg *s = &a; __attribute__((cleanup(files_cnt_cleanup))) char *files_cnt[MAX_FILES_PER_CMD] = {NULL}; int cret; cascade_struct = NULL; cascade_parser = NULL; - read_nics_arg: + read_policy_versions_arg: if (i + 1 < ac && av[i + 1][0] == '.' && av[i + 1][1] == '.') { char *next_a = &av[i + 1][2]; @@ -17046,7 +18243,7 @@ int main(int ac, char **av) } STRY(cascade_parser(cascade_struct, next_a, aa, pa)); i += incr; - goto read_nics_arg; + goto read_policy_versions_arg; } if (i + 1 < ac && av[i + 1][0] == '-' && av[i + 1][1] == '-') { @@ -17067,53 +18264,47 @@ int main(int ac, char **av) incr = 1; } } - if ((aret = argcmp(next_a, "DryRun")) == 0 || aret == '=' ) { + if ((aret = argcmp(next_a, "FirstItem")) == 0 || aret == '=' ) { char *eq_ptr = strchr(next_a, '='); if (eq_ptr) { - TRY((!*eq_ptr), "DryRun argument missing\n"); + TRY((!*eq_ptr), "FirstItem argument missing\n"); aa = eq_ptr + 1; incr = 1; } - s->is_set_dry_run = 1; - if (!aa || !strcasecmp(aa, "true")) { - s->dry_run = 1; - } else if (!strcasecmp(aa, "false")) { - s->dry_run = 0; - } else { - BAD_RET("DryRun require true/false\n"); - } - } else - if ((aret = argcmp(next_a, "Filters")) == 0 || aret == '=' ) { + TRY(!aa, "FirstItem argument missing\n"); + s->is_set_first_item = 1; + s->first_item = atoi(aa); + } else + if ((aret = argcmp(next_a, "PolicyOrn")) == 0 || aret == '=' ) { char *eq_ptr = strchr(next_a, '='); if (eq_ptr) { - TRY((!*eq_ptr), "Filters argument missing\n"); + TRY((!*eq_ptr), "PolicyOrn argument missing\n"); aa = eq_ptr + 1; incr = 1; } - char *dot_pos; + TRY(!aa, "PolicyOrn argument missing\n"); + s->policy_orn = aa; // string string - TRY(!aa, "Filters argument missing\n"); - dot_pos = strchr(str, '.'); - if (dot_pos++) { - cascade_struct = &s->filters; - cascade_parser = filters_nic_parser; - if (*dot_pos == '.') { - ++dot_pos; - } - STRY(filters_nic_parser(&s->filters, dot_pos, aa, pa)); - s->is_set_filters = 1; - } else { - s->filters_str = aa; - } + } else + if ((aret = argcmp(next_a, "ResultsPerPage")) == 0 || aret == '=' ) { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "ResultsPerPage argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + TRY(!aa, "ResultsPerPage argument missing\n"); + s->is_set_results_per_page = 1; + s->results_per_page = atoi(aa); } else { - BAD_RET("'%s' is not a valide argument for 'ReadNics'\n", next_a); + BAD_RET("'%s' is not a valide argument for 'ReadPolicyVersions'\n", next_a); } i += incr; - goto read_nics_arg; + goto read_policy_versions_arg; } - cret = osc_read_nics(&e, &r, &a); - TRY(cret, "fail to call ReadNics: %s\n", curl_easy_strerror(cret)); + cret = osc_read_policy_versions(&e, &r, &a); + TRY(cret, "fail to call ReadPolicyVersions: %s\n", curl_easy_strerror(cret)); CHK_BAD_RET(!r.buf, "connection sucessful, but empty responce\n"); if (program_flag & OAPI_RAW_OUTPUT) puts(r.buf); @@ -17126,19 +18317,19 @@ int main(int ac, char **av) } osc_deinit_str(&r); } else - if (!strcmp("ReadNets", av[i])) { + if (!strcmp("ReadPolicyVersion", av[i])) { json_object *jobj; auto_ptr_array struct ptr_array opa = {0}; struct ptr_array *pa = &opa; - struct osc_read_nets_arg a = {0}; - struct osc_read_nets_arg *s = &a; + struct osc_read_policy_version_arg a = {0}; + struct osc_read_policy_version_arg *s = &a; __attribute__((cleanup(files_cnt_cleanup))) char *files_cnt[MAX_FILES_PER_CMD] = {NULL}; int cret; cascade_struct = NULL; cascade_parser = NULL; - read_nets_arg: + read_policy_version_arg: if (i + 1 < ac && av[i + 1][0] == '.' && av[i + 1][1] == '.') { char *next_a = &av[i + 1][2]; @@ -17156,7 +18347,7 @@ int main(int ac, char **av) } STRY(cascade_parser(cascade_struct, next_a, aa, pa)); i += incr; - goto read_nets_arg; + goto read_policy_version_arg; } if (i + 1 < ac && av[i + 1][0] == '-' && av[i + 1][1] == '-') { @@ -17177,53 +18368,36 @@ int main(int ac, char **av) incr = 1; } } - if ((aret = argcmp(next_a, "DryRun")) == 0 || aret == '=' ) { + if ((aret = argcmp(next_a, "PolicyOrn")) == 0 || aret == '=' ) { char *eq_ptr = strchr(next_a, '='); if (eq_ptr) { - TRY((!*eq_ptr), "DryRun argument missing\n"); + TRY((!*eq_ptr), "PolicyOrn argument missing\n"); aa = eq_ptr + 1; incr = 1; } - s->is_set_dry_run = 1; - if (!aa || !strcasecmp(aa, "true")) { - s->dry_run = 1; - } else if (!strcasecmp(aa, "false")) { - s->dry_run = 0; - } else { - BAD_RET("DryRun require true/false\n"); - } - } else - if ((aret = argcmp(next_a, "Filters")) == 0 || aret == '=' ) { + TRY(!aa, "PolicyOrn argument missing\n"); + s->policy_orn = aa; // string string + + } else + if ((aret = argcmp(next_a, "VersionId")) == 0 || aret == '=' ) { char *eq_ptr = strchr(next_a, '='); if (eq_ptr) { - TRY((!*eq_ptr), "Filters argument missing\n"); + TRY((!*eq_ptr), "VersionId argument missing\n"); aa = eq_ptr + 1; incr = 1; } - char *dot_pos; + TRY(!aa, "VersionId argument missing\n"); + s->version_id = aa; // string string - TRY(!aa, "Filters argument missing\n"); - dot_pos = strchr(str, '.'); - if (dot_pos++) { - cascade_struct = &s->filters; - cascade_parser = filters_net_parser; - if (*dot_pos == '.') { - ++dot_pos; - } - STRY(filters_net_parser(&s->filters, dot_pos, aa, pa)); - s->is_set_filters = 1; - } else { - s->filters_str = aa; - } } else { - BAD_RET("'%s' is not a valide argument for 'ReadNets'\n", next_a); + BAD_RET("'%s' is not a valide argument for 'ReadPolicyVersion'\n", next_a); } i += incr; - goto read_nets_arg; + goto read_policy_version_arg; } - cret = osc_read_nets(&e, &r, &a); - TRY(cret, "fail to call ReadNets: %s\n", curl_easy_strerror(cret)); + cret = osc_read_policy_version(&e, &r, &a); + TRY(cret, "fail to call ReadPolicyVersion: %s\n", curl_easy_strerror(cret)); CHK_BAD_RET(!r.buf, "connection sucessful, but empty responce\n"); if (program_flag & OAPI_RAW_OUTPUT) puts(r.buf); @@ -17236,19 +18410,19 @@ int main(int ac, char **av) } osc_deinit_str(&r); } else - if (!strcmp("ReadNetPeerings", av[i])) { + if (!strcmp("ReadPolicy", av[i])) { json_object *jobj; auto_ptr_array struct ptr_array opa = {0}; struct ptr_array *pa = &opa; - struct osc_read_net_peerings_arg a = {0}; - struct osc_read_net_peerings_arg *s = &a; + struct osc_read_policy_arg a = {0}; + struct osc_read_policy_arg *s = &a; __attribute__((cleanup(files_cnt_cleanup))) char *files_cnt[MAX_FILES_PER_CMD] = {NULL}; int cret; cascade_struct = NULL; cascade_parser = NULL; - read_net_peerings_arg: + read_policy_arg: if (i + 1 < ac && av[i + 1][0] == '.' && av[i + 1][1] == '.') { char *next_a = &av[i + 1][2]; @@ -17266,7 +18440,7 @@ int main(int ac, char **av) } STRY(cascade_parser(cascade_struct, next_a, aa, pa)); i += incr; - goto read_net_peerings_arg; + goto read_policy_arg; } if (i + 1 < ac && av[i + 1][0] == '-' && av[i + 1][1] == '-') { @@ -17287,53 +18461,25 @@ int main(int ac, char **av) incr = 1; } } - if ((aret = argcmp(next_a, "DryRun")) == 0 || aret == '=' ) { - char *eq_ptr = strchr(next_a, '='); - if (eq_ptr) { - TRY((!*eq_ptr), "DryRun argument missing\n"); - aa = eq_ptr + 1; - incr = 1; - } - s->is_set_dry_run = 1; - if (!aa || !strcasecmp(aa, "true")) { - s->dry_run = 1; - } else if (!strcasecmp(aa, "false")) { - s->dry_run = 0; - } else { - BAD_RET("DryRun require true/false\n"); - } - } else - if ((aret = argcmp(next_a, "Filters")) == 0 || aret == '=' ) { + if ((aret = argcmp(next_a, "PolicyOrn")) == 0 || aret == '=' ) { char *eq_ptr = strchr(next_a, '='); if (eq_ptr) { - TRY((!*eq_ptr), "Filters argument missing\n"); + TRY((!*eq_ptr), "PolicyOrn argument missing\n"); aa = eq_ptr + 1; incr = 1; } - char *dot_pos; + TRY(!aa, "PolicyOrn argument missing\n"); + s->policy_orn = aa; // string string - TRY(!aa, "Filters argument missing\n"); - dot_pos = strchr(str, '.'); - if (dot_pos++) { - cascade_struct = &s->filters; - cascade_parser = filters_net_peering_parser; - if (*dot_pos == '.') { - ++dot_pos; - } - STRY(filters_net_peering_parser(&s->filters, dot_pos, aa, pa)); - s->is_set_filters = 1; - } else { - s->filters_str = aa; - } } else { - BAD_RET("'%s' is not a valide argument for 'ReadNetPeerings'\n", next_a); + BAD_RET("'%s' is not a valide argument for 'ReadPolicy'\n", next_a); } i += incr; - goto read_net_peerings_arg; + goto read_policy_arg; } - cret = osc_read_net_peerings(&e, &r, &a); - TRY(cret, "fail to call ReadNetPeerings: %s\n", curl_easy_strerror(cret)); + cret = osc_read_policy(&e, &r, &a); + TRY(cret, "fail to call ReadPolicy: %s\n", curl_easy_strerror(cret)); CHK_BAD_RET(!r.buf, "connection sucessful, but empty responce\n"); if (program_flag & OAPI_RAW_OUTPUT) puts(r.buf); @@ -17346,19 +18492,19 @@ int main(int ac, char **av) } osc_deinit_str(&r); } else - if (!strcmp("ReadNetAccessPoints", av[i])) { + if (!strcmp("ReadPolicies", av[i])) { json_object *jobj; auto_ptr_array struct ptr_array opa = {0}; struct ptr_array *pa = &opa; - struct osc_read_net_access_points_arg a = {0}; - struct osc_read_net_access_points_arg *s = &a; + struct osc_read_policies_arg a = {0}; + struct osc_read_policies_arg *s = &a; __attribute__((cleanup(files_cnt_cleanup))) char *files_cnt[MAX_FILES_PER_CMD] = {NULL}; int cret; cascade_struct = NULL; cascade_parser = NULL; - read_net_access_points_arg: + read_policies_arg: if (i + 1 < ac && av[i + 1][0] == '.' && av[i + 1][1] == '.') { char *next_a = &av[i + 1][2]; @@ -17376,7 +18522,7 @@ int main(int ac, char **av) } STRY(cascade_parser(cascade_struct, next_a, aa, pa)); i += incr; - goto read_net_access_points_arg; + goto read_policies_arg; } if (i + 1 < ac && av[i + 1][0] == '-' && av[i + 1][1] == '-') { @@ -17426,24 +18572,46 @@ int main(int ac, char **av) dot_pos = strchr(str, '.'); if (dot_pos++) { cascade_struct = &s->filters; - cascade_parser = filters_net_access_point_parser; + cascade_parser = read_policies_filters_parser; if (*dot_pos == '.') { ++dot_pos; } - STRY(filters_net_access_point_parser(&s->filters, dot_pos, aa, pa)); + STRY(read_policies_filters_parser(&s->filters, dot_pos, aa, pa)); s->is_set_filters = 1; } else { s->filters_str = aa; } } else + if ((aret = argcmp(next_a, "FirstItem")) == 0 || aret == '=' ) { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "FirstItem argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + TRY(!aa, "FirstItem argument missing\n"); + s->is_set_first_item = 1; + s->first_item = atoi(aa); + } else + if ((aret = argcmp(next_a, "ResultsPerPage")) == 0 || aret == '=' ) { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "ResultsPerPage argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + TRY(!aa, "ResultsPerPage argument missing\n"); + s->is_set_results_per_page = 1; + s->results_per_page = atoi(aa); + } else { - BAD_RET("'%s' is not a valide argument for 'ReadNetAccessPoints'\n", next_a); + BAD_RET("'%s' is not a valide argument for 'ReadPolicies'\n", next_a); } i += incr; - goto read_net_access_points_arg; + goto read_policies_arg; } - cret = osc_read_net_access_points(&e, &r, &a); - TRY(cret, "fail to call ReadNetAccessPoints: %s\n", curl_easy_strerror(cret)); + cret = osc_read_policies(&e, &r, &a); + TRY(cret, "fail to call ReadPolicies: %s\n", curl_easy_strerror(cret)); CHK_BAD_RET(!r.buf, "connection sucessful, but empty responce\n"); if (program_flag & OAPI_RAW_OUTPUT) puts(r.buf); @@ -17456,19 +18624,19 @@ int main(int ac, char **av) } osc_deinit_str(&r); } else - if (!strcmp("ReadNetAccessPointServices", av[i])) { + if (!strcmp("ReadNics", av[i])) { json_object *jobj; auto_ptr_array struct ptr_array opa = {0}; struct ptr_array *pa = &opa; - struct osc_read_net_access_point_services_arg a = {0}; - struct osc_read_net_access_point_services_arg *s = &a; + struct osc_read_nics_arg a = {0}; + struct osc_read_nics_arg *s = &a; __attribute__((cleanup(files_cnt_cleanup))) char *files_cnt[MAX_FILES_PER_CMD] = {NULL}; int cret; cascade_struct = NULL; cascade_parser = NULL; - read_net_access_point_services_arg: + read_nics_arg: if (i + 1 < ac && av[i + 1][0] == '.' && av[i + 1][1] == '.') { char *next_a = &av[i + 1][2]; @@ -17486,7 +18654,7 @@ int main(int ac, char **av) } STRY(cascade_parser(cascade_struct, next_a, aa, pa)); i += incr; - goto read_net_access_point_services_arg; + goto read_nics_arg; } if (i + 1 < ac && av[i + 1][0] == '-' && av[i + 1][1] == '-') { @@ -17536,24 +18704,24 @@ int main(int ac, char **av) dot_pos = strchr(str, '.'); if (dot_pos++) { cascade_struct = &s->filters; - cascade_parser = filters_service_parser; + cascade_parser = filters_nic_parser; if (*dot_pos == '.') { ++dot_pos; } - STRY(filters_service_parser(&s->filters, dot_pos, aa, pa)); + STRY(filters_nic_parser(&s->filters, dot_pos, aa, pa)); s->is_set_filters = 1; } else { s->filters_str = aa; } } else { - BAD_RET("'%s' is not a valide argument for 'ReadNetAccessPointServices'\n", next_a); + BAD_RET("'%s' is not a valide argument for 'ReadNics'\n", next_a); } i += incr; - goto read_net_access_point_services_arg; + goto read_nics_arg; } - cret = osc_read_net_access_point_services(&e, &r, &a); - TRY(cret, "fail to call ReadNetAccessPointServices: %s\n", curl_easy_strerror(cret)); + cret = osc_read_nics(&e, &r, &a); + TRY(cret, "fail to call ReadNics: %s\n", curl_easy_strerror(cret)); CHK_BAD_RET(!r.buf, "connection sucessful, but empty responce\n"); if (program_flag & OAPI_RAW_OUTPUT) puts(r.buf); @@ -17566,19 +18734,19 @@ int main(int ac, char **av) } osc_deinit_str(&r); } else - if (!strcmp("ReadNatServices", av[i])) { + if (!strcmp("ReadNets", av[i])) { json_object *jobj; auto_ptr_array struct ptr_array opa = {0}; struct ptr_array *pa = &opa; - struct osc_read_nat_services_arg a = {0}; - struct osc_read_nat_services_arg *s = &a; + struct osc_read_nets_arg a = {0}; + struct osc_read_nets_arg *s = &a; __attribute__((cleanup(files_cnt_cleanup))) char *files_cnt[MAX_FILES_PER_CMD] = {NULL}; int cret; cascade_struct = NULL; cascade_parser = NULL; - read_nat_services_arg: + read_nets_arg: if (i + 1 < ac && av[i + 1][0] == '.' && av[i + 1][1] == '.') { char *next_a = &av[i + 1][2]; @@ -17596,7 +18764,7 @@ int main(int ac, char **av) } STRY(cascade_parser(cascade_struct, next_a, aa, pa)); i += incr; - goto read_nat_services_arg; + goto read_nets_arg; } if (i + 1 < ac && av[i + 1][0] == '-' && av[i + 1][1] == '-') { @@ -17646,24 +18814,24 @@ int main(int ac, char **av) dot_pos = strchr(str, '.'); if (dot_pos++) { cascade_struct = &s->filters; - cascade_parser = filters_nat_service_parser; + cascade_parser = filters_net_parser; if (*dot_pos == '.') { ++dot_pos; } - STRY(filters_nat_service_parser(&s->filters, dot_pos, aa, pa)); + STRY(filters_net_parser(&s->filters, dot_pos, aa, pa)); s->is_set_filters = 1; } else { s->filters_str = aa; } } else { - BAD_RET("'%s' is not a valide argument for 'ReadNatServices'\n", next_a); + BAD_RET("'%s' is not a valide argument for 'ReadNets'\n", next_a); } i += incr; - goto read_nat_services_arg; + goto read_nets_arg; } - cret = osc_read_nat_services(&e, &r, &a); - TRY(cret, "fail to call ReadNatServices: %s\n", curl_easy_strerror(cret)); + cret = osc_read_nets(&e, &r, &a); + TRY(cret, "fail to call ReadNets: %s\n", curl_easy_strerror(cret)); CHK_BAD_RET(!r.buf, "connection sucessful, but empty responce\n"); if (program_flag & OAPI_RAW_OUTPUT) puts(r.buf); @@ -17676,19 +18844,19 @@ int main(int ac, char **av) } osc_deinit_str(&r); } else - if (!strcmp("ReadLocations", av[i])) { + if (!strcmp("ReadNetPeerings", av[i])) { json_object *jobj; auto_ptr_array struct ptr_array opa = {0}; struct ptr_array *pa = &opa; - struct osc_read_locations_arg a = {0}; - struct osc_read_locations_arg *s = &a; + struct osc_read_net_peerings_arg a = {0}; + struct osc_read_net_peerings_arg *s = &a; __attribute__((cleanup(files_cnt_cleanup))) char *files_cnt[MAX_FILES_PER_CMD] = {NULL}; int cret; cascade_struct = NULL; cascade_parser = NULL; - read_locations_arg: + read_net_peerings_arg: if (i + 1 < ac && av[i + 1][0] == '.' && av[i + 1][1] == '.') { char *next_a = &av[i + 1][2]; @@ -17706,7 +18874,7 @@ int main(int ac, char **av) } STRY(cascade_parser(cascade_struct, next_a, aa, pa)); i += incr; - goto read_locations_arg; + goto read_net_peerings_arg; } if (i + 1 < ac && av[i + 1][0] == '-' && av[i + 1][1] == '-') { @@ -17743,14 +18911,59 @@ int main(int ac, char **av) BAD_RET("DryRun require true/false\n"); } } else + if ((aret = argcmp(next_a, "Filters")) == 0 || aret == '=' ) { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "Filters argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + char *dot_pos; + + TRY(!aa, "Filters argument missing\n"); + dot_pos = strchr(str, '.'); + if (dot_pos++) { + cascade_struct = &s->filters; + cascade_parser = filters_net_peering_parser; + if (*dot_pos == '.') { + ++dot_pos; + } + STRY(filters_net_peering_parser(&s->filters, dot_pos, aa, pa)); + s->is_set_filters = 1; + } else { + s->filters_str = aa; + } + } else + if ((aret = argcmp(next_a, "NextPageToken")) == 0 || aret == '=' ) { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "NextPageToken argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + TRY(!aa, "NextPageToken argument missing\n"); + s->next_page_token = aa; // string string + + } else + if ((aret = argcmp(next_a, "ResultsPerPage")) == 0 || aret == '=' ) { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "ResultsPerPage argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + TRY(!aa, "ResultsPerPage argument missing\n"); + s->is_set_results_per_page = 1; + s->results_per_page = atoi(aa); + } else { - BAD_RET("'%s' is not a valide argument for 'ReadLocations'\n", next_a); + BAD_RET("'%s' is not a valide argument for 'ReadNetPeerings'\n", next_a); } i += incr; - goto read_locations_arg; + goto read_net_peerings_arg; } - cret = osc_read_locations(&e, &r, &a); - TRY(cret, "fail to call ReadLocations: %s\n", curl_easy_strerror(cret)); + cret = osc_read_net_peerings(&e, &r, &a); + TRY(cret, "fail to call ReadNetPeerings: %s\n", curl_easy_strerror(cret)); CHK_BAD_RET(!r.buf, "connection sucessful, but empty responce\n"); if (program_flag & OAPI_RAW_OUTPUT) puts(r.buf); @@ -17763,19 +18976,19 @@ int main(int ac, char **av) } osc_deinit_str(&r); } else - if (!strcmp("ReadLoadBalancers", av[i])) { + if (!strcmp("ReadNetAccessPoints", av[i])) { json_object *jobj; auto_ptr_array struct ptr_array opa = {0}; struct ptr_array *pa = &opa; - struct osc_read_load_balancers_arg a = {0}; - struct osc_read_load_balancers_arg *s = &a; + struct osc_read_net_access_points_arg a = {0}; + struct osc_read_net_access_points_arg *s = &a; __attribute__((cleanup(files_cnt_cleanup))) char *files_cnt[MAX_FILES_PER_CMD] = {NULL}; int cret; cascade_struct = NULL; cascade_parser = NULL; - read_load_balancers_arg: + read_net_access_points_arg: if (i + 1 < ac && av[i + 1][0] == '.' && av[i + 1][1] == '.') { char *next_a = &av[i + 1][2]; @@ -17793,7 +19006,7 @@ int main(int ac, char **av) } STRY(cascade_parser(cascade_struct, next_a, aa, pa)); i += incr; - goto read_load_balancers_arg; + goto read_net_access_points_arg; } if (i + 1 < ac && av[i + 1][0] == '-' && av[i + 1][1] == '-') { @@ -17843,24 +19056,46 @@ int main(int ac, char **av) dot_pos = strchr(str, '.'); if (dot_pos++) { cascade_struct = &s->filters; - cascade_parser = filters_load_balancer_parser; + cascade_parser = filters_net_access_point_parser; if (*dot_pos == '.') { ++dot_pos; } - STRY(filters_load_balancer_parser(&s->filters, dot_pos, aa, pa)); + STRY(filters_net_access_point_parser(&s->filters, dot_pos, aa, pa)); s->is_set_filters = 1; } else { s->filters_str = aa; } } else + if ((aret = argcmp(next_a, "NextPageToken")) == 0 || aret == '=' ) { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "NextPageToken argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + TRY(!aa, "NextPageToken argument missing\n"); + s->next_page_token = aa; // string string + + } else + if ((aret = argcmp(next_a, "ResultsPerPage")) == 0 || aret == '=' ) { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "ResultsPerPage argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + TRY(!aa, "ResultsPerPage argument missing\n"); + s->is_set_results_per_page = 1; + s->results_per_page = atoi(aa); + } else { - BAD_RET("'%s' is not a valide argument for 'ReadLoadBalancers'\n", next_a); + BAD_RET("'%s' is not a valide argument for 'ReadNetAccessPoints'\n", next_a); } i += incr; - goto read_load_balancers_arg; + goto read_net_access_points_arg; } - cret = osc_read_load_balancers(&e, &r, &a); - TRY(cret, "fail to call ReadLoadBalancers: %s\n", curl_easy_strerror(cret)); + cret = osc_read_net_access_points(&e, &r, &a); + TRY(cret, "fail to call ReadNetAccessPoints: %s\n", curl_easy_strerror(cret)); CHK_BAD_RET(!r.buf, "connection sucessful, but empty responce\n"); if (program_flag & OAPI_RAW_OUTPUT) puts(r.buf); @@ -17873,19 +19108,19 @@ int main(int ac, char **av) } osc_deinit_str(&r); } else - if (!strcmp("ReadLoadBalancerTags", av[i])) { + if (!strcmp("ReadNetAccessPointServices", av[i])) { json_object *jobj; auto_ptr_array struct ptr_array opa = {0}; struct ptr_array *pa = &opa; - struct osc_read_load_balancer_tags_arg a = {0}; - struct osc_read_load_balancer_tags_arg *s = &a; + struct osc_read_net_access_point_services_arg a = {0}; + struct osc_read_net_access_point_services_arg *s = &a; __attribute__((cleanup(files_cnt_cleanup))) char *files_cnt[MAX_FILES_PER_CMD] = {NULL}; int cret; cascade_struct = NULL; cascade_parser = NULL; - read_load_balancer_tags_arg: + read_net_access_point_services_arg: if (i + 1 < ac && av[i + 1][0] == '.' && av[i + 1][1] == '.') { char *next_a = &av[i + 1][2]; @@ -17903,7 +19138,7 @@ int main(int ac, char **av) } STRY(cascade_parser(cascade_struct, next_a, aa, pa)); i += incr; - goto read_load_balancer_tags_arg; + goto read_net_access_point_services_arg; } if (i + 1 < ac && av[i + 1][0] == '-' && av[i + 1][1] == '-') { @@ -17940,27 +19175,37 @@ int main(int ac, char **av) BAD_RET("DryRun require true/false\n"); } } else - if ((aret = argcmp(next_a, "LoadBalancerNames")) == 0 || aret == '=' ) { + if ((aret = argcmp(next_a, "Filters")) == 0 || aret == '=' ) { char *eq_ptr = strchr(next_a, '='); if (eq_ptr) { - TRY((!*eq_ptr), "LoadBalancerNames argument missing\n"); + TRY((!*eq_ptr), "Filters argument missing\n"); aa = eq_ptr + 1; incr = 1; } - TRY(!aa, "LoadBalancerNames argument missing\n"); - s->load_balancer_names_str = aa; - } else if (!(aret = strcmp(str, "LoadBalancerNames[]")) || aret == '=') { - TRY(!aa, "LoadBalancerNames[] argument missing\n"); - SET_NEXT(s->load_balancer_names, (aa), pa); + char *dot_pos; + + TRY(!aa, "Filters argument missing\n"); + dot_pos = strchr(str, '.'); + if (dot_pos++) { + cascade_struct = &s->filters; + cascade_parser = filters_service_parser; + if (*dot_pos == '.') { + ++dot_pos; + } + STRY(filters_service_parser(&s->filters, dot_pos, aa, pa)); + s->is_set_filters = 1; + } else { + s->filters_str = aa; + } } else { - BAD_RET("'%s' is not a valide argument for 'ReadLoadBalancerTags'\n", next_a); + BAD_RET("'%s' is not a valide argument for 'ReadNetAccessPointServices'\n", next_a); } i += incr; - goto read_load_balancer_tags_arg; + goto read_net_access_point_services_arg; } - cret = osc_read_load_balancer_tags(&e, &r, &a); - TRY(cret, "fail to call ReadLoadBalancerTags: %s\n", curl_easy_strerror(cret)); + cret = osc_read_net_access_point_services(&e, &r, &a); + TRY(cret, "fail to call ReadNetAccessPointServices: %s\n", curl_easy_strerror(cret)); CHK_BAD_RET(!r.buf, "connection sucessful, but empty responce\n"); if (program_flag & OAPI_RAW_OUTPUT) puts(r.buf); @@ -17973,19 +19218,19 @@ int main(int ac, char **av) } osc_deinit_str(&r); } else - if (!strcmp("ReadListenerRules", av[i])) { + if (!strcmp("ReadNatServices", av[i])) { json_object *jobj; auto_ptr_array struct ptr_array opa = {0}; struct ptr_array *pa = &opa; - struct osc_read_listener_rules_arg a = {0}; - struct osc_read_listener_rules_arg *s = &a; + struct osc_read_nat_services_arg a = {0}; + struct osc_read_nat_services_arg *s = &a; __attribute__((cleanup(files_cnt_cleanup))) char *files_cnt[MAX_FILES_PER_CMD] = {NULL}; int cret; cascade_struct = NULL; cascade_parser = NULL; - read_listener_rules_arg: + read_nat_services_arg: if (i + 1 < ac && av[i + 1][0] == '.' && av[i + 1][1] == '.') { char *next_a = &av[i + 1][2]; @@ -18003,7 +19248,7 @@ int main(int ac, char **av) } STRY(cascade_parser(cascade_struct, next_a, aa, pa)); i += incr; - goto read_listener_rules_arg; + goto read_nat_services_arg; } if (i + 1 < ac && av[i + 1][0] == '-' && av[i + 1][1] == '-') { @@ -18053,24 +19298,46 @@ int main(int ac, char **av) dot_pos = strchr(str, '.'); if (dot_pos++) { cascade_struct = &s->filters; - cascade_parser = filters_listener_rule_parser; + cascade_parser = filters_nat_service_parser; if (*dot_pos == '.') { ++dot_pos; } - STRY(filters_listener_rule_parser(&s->filters, dot_pos, aa, pa)); + STRY(filters_nat_service_parser(&s->filters, dot_pos, aa, pa)); s->is_set_filters = 1; } else { s->filters_str = aa; } } else + if ((aret = argcmp(next_a, "NextPageToken")) == 0 || aret == '=' ) { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "NextPageToken argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + TRY(!aa, "NextPageToken argument missing\n"); + s->next_page_token = aa; // string string + + } else + if ((aret = argcmp(next_a, "ResultsPerPage")) == 0 || aret == '=' ) { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "ResultsPerPage argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + TRY(!aa, "ResultsPerPage argument missing\n"); + s->is_set_results_per_page = 1; + s->results_per_page = atoi(aa); + } else { - BAD_RET("'%s' is not a valide argument for 'ReadListenerRules'\n", next_a); + BAD_RET("'%s' is not a valide argument for 'ReadNatServices'\n", next_a); } i += incr; - goto read_listener_rules_arg; + goto read_nat_services_arg; } - cret = osc_read_listener_rules(&e, &r, &a); - TRY(cret, "fail to call ReadListenerRules: %s\n", curl_easy_strerror(cret)); + cret = osc_read_nat_services(&e, &r, &a); + TRY(cret, "fail to call ReadNatServices: %s\n", curl_easy_strerror(cret)); CHK_BAD_RET(!r.buf, "connection sucessful, but empty responce\n"); if (program_flag & OAPI_RAW_OUTPUT) puts(r.buf); @@ -18083,19 +19350,19 @@ int main(int ac, char **av) } osc_deinit_str(&r); } else - if (!strcmp("ReadKeypairs", av[i])) { + if (!strcmp("ReadLocations", av[i])) { json_object *jobj; auto_ptr_array struct ptr_array opa = {0}; struct ptr_array *pa = &opa; - struct osc_read_keypairs_arg a = {0}; - struct osc_read_keypairs_arg *s = &a; + struct osc_read_locations_arg a = {0}; + struct osc_read_locations_arg *s = &a; __attribute__((cleanup(files_cnt_cleanup))) char *files_cnt[MAX_FILES_PER_CMD] = {NULL}; int cret; cascade_struct = NULL; cascade_parser = NULL; - read_keypairs_arg: + read_locations_arg: if (i + 1 < ac && av[i + 1][0] == '.' && av[i + 1][1] == '.') { char *next_a = &av[i + 1][2]; @@ -18113,7 +19380,7 @@ int main(int ac, char **av) } STRY(cascade_parser(cascade_struct, next_a, aa, pa)); i += incr; - goto read_keypairs_arg; + goto read_locations_arg; } if (i + 1 < ac && av[i + 1][0] == '-' && av[i + 1][1] == '-') { @@ -18150,37 +19417,14 @@ int main(int ac, char **av) BAD_RET("DryRun require true/false\n"); } } else - if ((aret = argcmp(next_a, "Filters")) == 0 || aret == '=' ) { - char *eq_ptr = strchr(next_a, '='); - if (eq_ptr) { - TRY((!*eq_ptr), "Filters argument missing\n"); - aa = eq_ptr + 1; - incr = 1; - } - char *dot_pos; - - TRY(!aa, "Filters argument missing\n"); - dot_pos = strchr(str, '.'); - if (dot_pos++) { - cascade_struct = &s->filters; - cascade_parser = filters_keypair_parser; - if (*dot_pos == '.') { - ++dot_pos; - } - STRY(filters_keypair_parser(&s->filters, dot_pos, aa, pa)); - s->is_set_filters = 1; - } else { - s->filters_str = aa; - } - } else { - BAD_RET("'%s' is not a valide argument for 'ReadKeypairs'\n", next_a); + BAD_RET("'%s' is not a valide argument for 'ReadLocations'\n", next_a); } i += incr; - goto read_keypairs_arg; + goto read_locations_arg; } - cret = osc_read_keypairs(&e, &r, &a); - TRY(cret, "fail to call ReadKeypairs: %s\n", curl_easy_strerror(cret)); + cret = osc_read_locations(&e, &r, &a); + TRY(cret, "fail to call ReadLocations: %s\n", curl_easy_strerror(cret)); CHK_BAD_RET(!r.buf, "connection sucessful, but empty responce\n"); if (program_flag & OAPI_RAW_OUTPUT) puts(r.buf); @@ -18193,19 +19437,19 @@ int main(int ac, char **av) } osc_deinit_str(&r); } else - if (!strcmp("ReadInternetServices", av[i])) { + if (!strcmp("ReadLoadBalancers", av[i])) { json_object *jobj; auto_ptr_array struct ptr_array opa = {0}; struct ptr_array *pa = &opa; - struct osc_read_internet_services_arg a = {0}; - struct osc_read_internet_services_arg *s = &a; + struct osc_read_load_balancers_arg a = {0}; + struct osc_read_load_balancers_arg *s = &a; __attribute__((cleanup(files_cnt_cleanup))) char *files_cnt[MAX_FILES_PER_CMD] = {NULL}; int cret; cascade_struct = NULL; cascade_parser = NULL; - read_internet_services_arg: + read_load_balancers_arg: if (i + 1 < ac && av[i + 1][0] == '.' && av[i + 1][1] == '.') { char *next_a = &av[i + 1][2]; @@ -18223,7 +19467,7 @@ int main(int ac, char **av) } STRY(cascade_parser(cascade_struct, next_a, aa, pa)); i += incr; - goto read_internet_services_arg; + goto read_load_balancers_arg; } if (i + 1 < ac && av[i + 1][0] == '-' && av[i + 1][1] == '-') { @@ -18273,24 +19517,24 @@ int main(int ac, char **av) dot_pos = strchr(str, '.'); if (dot_pos++) { cascade_struct = &s->filters; - cascade_parser = filters_internet_service_parser; + cascade_parser = filters_load_balancer_parser; if (*dot_pos == '.') { ++dot_pos; } - STRY(filters_internet_service_parser(&s->filters, dot_pos, aa, pa)); + STRY(filters_load_balancer_parser(&s->filters, dot_pos, aa, pa)); s->is_set_filters = 1; } else { s->filters_str = aa; } } else { - BAD_RET("'%s' is not a valide argument for 'ReadInternetServices'\n", next_a); + BAD_RET("'%s' is not a valide argument for 'ReadLoadBalancers'\n", next_a); } i += incr; - goto read_internet_services_arg; + goto read_load_balancers_arg; } - cret = osc_read_internet_services(&e, &r, &a); - TRY(cret, "fail to call ReadInternetServices: %s\n", curl_easy_strerror(cret)); + cret = osc_read_load_balancers(&e, &r, &a); + TRY(cret, "fail to call ReadLoadBalancers: %s\n", curl_easy_strerror(cret)); CHK_BAD_RET(!r.buf, "connection sucessful, but empty responce\n"); if (program_flag & OAPI_RAW_OUTPUT) puts(r.buf); @@ -18303,19 +19547,19 @@ int main(int ac, char **av) } osc_deinit_str(&r); } else - if (!strcmp("ReadImages", av[i])) { + if (!strcmp("ReadLoadBalancerTags", av[i])) { json_object *jobj; auto_ptr_array struct ptr_array opa = {0}; struct ptr_array *pa = &opa; - struct osc_read_images_arg a = {0}; - struct osc_read_images_arg *s = &a; + struct osc_read_load_balancer_tags_arg a = {0}; + struct osc_read_load_balancer_tags_arg *s = &a; __attribute__((cleanup(files_cnt_cleanup))) char *files_cnt[MAX_FILES_PER_CMD] = {NULL}; int cret; cascade_struct = NULL; cascade_parser = NULL; - read_images_arg: + read_load_balancer_tags_arg: if (i + 1 < ac && av[i + 1][0] == '.' && av[i + 1][1] == '.') { char *next_a = &av[i + 1][2]; @@ -18333,7 +19577,7 @@ int main(int ac, char **av) } STRY(cascade_parser(cascade_struct, next_a, aa, pa)); i += incr; - goto read_images_arg; + goto read_load_balancer_tags_arg; } if (i + 1 < ac && av[i + 1][0] == '-' && av[i + 1][1] == '-') { @@ -18370,37 +19614,27 @@ int main(int ac, char **av) BAD_RET("DryRun require true/false\n"); } } else - if ((aret = argcmp(next_a, "Filters")) == 0 || aret == '=' ) { + if ((aret = argcmp(next_a, "LoadBalancerNames")) == 0 || aret == '=' ) { char *eq_ptr = strchr(next_a, '='); if (eq_ptr) { - TRY((!*eq_ptr), "Filters argument missing\n"); + TRY((!*eq_ptr), "LoadBalancerNames argument missing\n"); aa = eq_ptr + 1; incr = 1; } - char *dot_pos; - - TRY(!aa, "Filters argument missing\n"); - dot_pos = strchr(str, '.'); - if (dot_pos++) { - cascade_struct = &s->filters; - cascade_parser = filters_image_parser; - if (*dot_pos == '.') { - ++dot_pos; - } - STRY(filters_image_parser(&s->filters, dot_pos, aa, pa)); - s->is_set_filters = 1; - } else { - s->filters_str = aa; - } + TRY(!aa, "LoadBalancerNames argument missing\n"); + s->load_balancer_names_str = aa; + } else if (!(aret = strcmp(str, "LoadBalancerNames[]")) || aret == '=') { + TRY(!aa, "LoadBalancerNames[] argument missing\n"); + SET_NEXT(s->load_balancer_names, (aa), pa); } else { - BAD_RET("'%s' is not a valide argument for 'ReadImages'\n", next_a); + BAD_RET("'%s' is not a valide argument for 'ReadLoadBalancerTags'\n", next_a); } i += incr; - goto read_images_arg; + goto read_load_balancer_tags_arg; } - cret = osc_read_images(&e, &r, &a); - TRY(cret, "fail to call ReadImages: %s\n", curl_easy_strerror(cret)); + cret = osc_read_load_balancer_tags(&e, &r, &a); + TRY(cret, "fail to call ReadLoadBalancerTags: %s\n", curl_easy_strerror(cret)); CHK_BAD_RET(!r.buf, "connection sucessful, but empty responce\n"); if (program_flag & OAPI_RAW_OUTPUT) puts(r.buf); @@ -18413,19 +19647,19 @@ int main(int ac, char **av) } osc_deinit_str(&r); } else - if (!strcmp("ReadImageExportTasks", av[i])) { + if (!strcmp("ReadListenerRules", av[i])) { json_object *jobj; auto_ptr_array struct ptr_array opa = {0}; struct ptr_array *pa = &opa; - struct osc_read_image_export_tasks_arg a = {0}; - struct osc_read_image_export_tasks_arg *s = &a; + struct osc_read_listener_rules_arg a = {0}; + struct osc_read_listener_rules_arg *s = &a; __attribute__((cleanup(files_cnt_cleanup))) char *files_cnt[MAX_FILES_PER_CMD] = {NULL}; int cret; cascade_struct = NULL; cascade_parser = NULL; - read_image_export_tasks_arg: + read_listener_rules_arg: if (i + 1 < ac && av[i + 1][0] == '.' && av[i + 1][1] == '.') { char *next_a = &av[i + 1][2]; @@ -18443,7 +19677,7 @@ int main(int ac, char **av) } STRY(cascade_parser(cascade_struct, next_a, aa, pa)); i += incr; - goto read_image_export_tasks_arg; + goto read_listener_rules_arg; } if (i + 1 < ac && av[i + 1][0] == '-' && av[i + 1][1] == '-') { @@ -18493,24 +19727,24 @@ int main(int ac, char **av) dot_pos = strchr(str, '.'); if (dot_pos++) { cascade_struct = &s->filters; - cascade_parser = filters_export_task_parser; + cascade_parser = filters_listener_rule_parser; if (*dot_pos == '.') { ++dot_pos; } - STRY(filters_export_task_parser(&s->filters, dot_pos, aa, pa)); + STRY(filters_listener_rule_parser(&s->filters, dot_pos, aa, pa)); s->is_set_filters = 1; } else { s->filters_str = aa; } } else { - BAD_RET("'%s' is not a valide argument for 'ReadImageExportTasks'\n", next_a); + BAD_RET("'%s' is not a valide argument for 'ReadListenerRules'\n", next_a); } i += incr; - goto read_image_export_tasks_arg; + goto read_listener_rules_arg; } - cret = osc_read_image_export_tasks(&e, &r, &a); - TRY(cret, "fail to call ReadImageExportTasks: %s\n", curl_easy_strerror(cret)); + cret = osc_read_listener_rules(&e, &r, &a); + TRY(cret, "fail to call ReadListenerRules: %s\n", curl_easy_strerror(cret)); CHK_BAD_RET(!r.buf, "connection sucessful, but empty responce\n"); if (program_flag & OAPI_RAW_OUTPUT) puts(r.buf); @@ -18523,19 +19757,19 @@ int main(int ac, char **av) } osc_deinit_str(&r); } else - if (!strcmp("ReadFlexibleGpus", av[i])) { + if (!strcmp("ReadLinkedPolicies", av[i])) { json_object *jobj; auto_ptr_array struct ptr_array opa = {0}; struct ptr_array *pa = &opa; - struct osc_read_flexible_gpus_arg a = {0}; - struct osc_read_flexible_gpus_arg *s = &a; + struct osc_read_linked_policies_arg a = {0}; + struct osc_read_linked_policies_arg *s = &a; __attribute__((cleanup(files_cnt_cleanup))) char *files_cnt[MAX_FILES_PER_CMD] = {NULL}; int cret; cascade_struct = NULL; cascade_parser = NULL; - read_flexible_gpus_arg: + read_linked_policies_arg: if (i + 1 < ac && av[i + 1][0] == '.' && av[i + 1][1] == '.') { char *next_a = &av[i + 1][2]; @@ -18553,7 +19787,7 @@ int main(int ac, char **av) } STRY(cascade_parser(cascade_struct, next_a, aa, pa)); i += incr; - goto read_flexible_gpus_arg; + goto read_linked_policies_arg; } if (i + 1 < ac && av[i + 1][0] == '-' && av[i + 1][1] == '-') { @@ -18603,24 +19837,57 @@ int main(int ac, char **av) dot_pos = strchr(str, '.'); if (dot_pos++) { cascade_struct = &s->filters; - cascade_parser = filters_flexible_gpu_parser; + cascade_parser = read_linked_policies_filters_parser; if (*dot_pos == '.') { ++dot_pos; } - STRY(filters_flexible_gpu_parser(&s->filters, dot_pos, aa, pa)); + STRY(read_linked_policies_filters_parser(&s->filters, dot_pos, aa, pa)); s->is_set_filters = 1; } else { s->filters_str = aa; } } else + if ((aret = argcmp(next_a, "FirstItem")) == 0 || aret == '=' ) { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "FirstItem argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + TRY(!aa, "FirstItem argument missing\n"); + s->is_set_first_item = 1; + s->first_item = atoi(aa); + } else + if ((aret = argcmp(next_a, "ResultsPerPage")) == 0 || aret == '=' ) { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "ResultsPerPage argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + TRY(!aa, "ResultsPerPage argument missing\n"); + s->is_set_results_per_page = 1; + s->results_per_page = atoi(aa); + } else + if ((aret = argcmp(next_a, "UserName")) == 0 || aret == '=' ) { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "UserName argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + TRY(!aa, "UserName argument missing\n"); + s->user_name = aa; // string string + + } else { - BAD_RET("'%s' is not a valide argument for 'ReadFlexibleGpus'\n", next_a); + BAD_RET("'%s' is not a valide argument for 'ReadLinkedPolicies'\n", next_a); } i += incr; - goto read_flexible_gpus_arg; + goto read_linked_policies_arg; } - cret = osc_read_flexible_gpus(&e, &r, &a); - TRY(cret, "fail to call ReadFlexibleGpus: %s\n", curl_easy_strerror(cret)); + cret = osc_read_linked_policies(&e, &r, &a); + TRY(cret, "fail to call ReadLinkedPolicies: %s\n", curl_easy_strerror(cret)); CHK_BAD_RET(!r.buf, "connection sucessful, but empty responce\n"); if (program_flag & OAPI_RAW_OUTPUT) puts(r.buf); @@ -18633,19 +19900,19 @@ int main(int ac, char **av) } osc_deinit_str(&r); } else - if (!strcmp("ReadFlexibleGpuCatalog", av[i])) { + if (!strcmp("ReadKeypairs", av[i])) { json_object *jobj; auto_ptr_array struct ptr_array opa = {0}; struct ptr_array *pa = &opa; - struct osc_read_flexible_gpu_catalog_arg a = {0}; - struct osc_read_flexible_gpu_catalog_arg *s = &a; + struct osc_read_keypairs_arg a = {0}; + struct osc_read_keypairs_arg *s = &a; __attribute__((cleanup(files_cnt_cleanup))) char *files_cnt[MAX_FILES_PER_CMD] = {NULL}; int cret; cascade_struct = NULL; cascade_parser = NULL; - read_flexible_gpu_catalog_arg: + read_keypairs_arg: if (i + 1 < ac && av[i + 1][0] == '.' && av[i + 1][1] == '.') { char *next_a = &av[i + 1][2]; @@ -18663,7 +19930,7 @@ int main(int ac, char **av) } STRY(cascade_parser(cascade_struct, next_a, aa, pa)); i += incr; - goto read_flexible_gpu_catalog_arg; + goto read_keypairs_arg; } if (i + 1 < ac && av[i + 1][0] == '-' && av[i + 1][1] == '-') { @@ -18700,14 +19967,37 @@ int main(int ac, char **av) BAD_RET("DryRun require true/false\n"); } } else + if ((aret = argcmp(next_a, "Filters")) == 0 || aret == '=' ) { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "Filters argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + char *dot_pos; + + TRY(!aa, "Filters argument missing\n"); + dot_pos = strchr(str, '.'); + if (dot_pos++) { + cascade_struct = &s->filters; + cascade_parser = filters_keypair_parser; + if (*dot_pos == '.') { + ++dot_pos; + } + STRY(filters_keypair_parser(&s->filters, dot_pos, aa, pa)); + s->is_set_filters = 1; + } else { + s->filters_str = aa; + } + } else { - BAD_RET("'%s' is not a valide argument for 'ReadFlexibleGpuCatalog'\n", next_a); + BAD_RET("'%s' is not a valide argument for 'ReadKeypairs'\n", next_a); } i += incr; - goto read_flexible_gpu_catalog_arg; + goto read_keypairs_arg; } - cret = osc_read_flexible_gpu_catalog(&e, &r, &a); - TRY(cret, "fail to call ReadFlexibleGpuCatalog: %s\n", curl_easy_strerror(cret)); + cret = osc_read_keypairs(&e, &r, &a); + TRY(cret, "fail to call ReadKeypairs: %s\n", curl_easy_strerror(cret)); CHK_BAD_RET(!r.buf, "connection sucessful, but empty responce\n"); if (program_flag & OAPI_RAW_OUTPUT) puts(r.buf); @@ -18720,19 +20010,19 @@ int main(int ac, char **av) } osc_deinit_str(&r); } else - if (!strcmp("ReadDirectLinks", av[i])) { + if (!strcmp("ReadInternetServices", av[i])) { json_object *jobj; auto_ptr_array struct ptr_array opa = {0}; struct ptr_array *pa = &opa; - struct osc_read_direct_links_arg a = {0}; - struct osc_read_direct_links_arg *s = &a; + struct osc_read_internet_services_arg a = {0}; + struct osc_read_internet_services_arg *s = &a; __attribute__((cleanup(files_cnt_cleanup))) char *files_cnt[MAX_FILES_PER_CMD] = {NULL}; int cret; cascade_struct = NULL; cascade_parser = NULL; - read_direct_links_arg: + read_internet_services_arg: if (i + 1 < ac && av[i + 1][0] == '.' && av[i + 1][1] == '.') { char *next_a = &av[i + 1][2]; @@ -18750,7 +20040,7 @@ int main(int ac, char **av) } STRY(cascade_parser(cascade_struct, next_a, aa, pa)); i += incr; - goto read_direct_links_arg; + goto read_internet_services_arg; } if (i + 1 < ac && av[i + 1][0] == '-' && av[i + 1][1] == '-') { @@ -18800,24 +20090,24 @@ int main(int ac, char **av) dot_pos = strchr(str, '.'); if (dot_pos++) { cascade_struct = &s->filters; - cascade_parser = filters_direct_link_parser; + cascade_parser = filters_internet_service_parser; if (*dot_pos == '.') { ++dot_pos; } - STRY(filters_direct_link_parser(&s->filters, dot_pos, aa, pa)); + STRY(filters_internet_service_parser(&s->filters, dot_pos, aa, pa)); s->is_set_filters = 1; } else { s->filters_str = aa; } } else { - BAD_RET("'%s' is not a valide argument for 'ReadDirectLinks'\n", next_a); + BAD_RET("'%s' is not a valide argument for 'ReadInternetServices'\n", next_a); } i += incr; - goto read_direct_links_arg; + goto read_internet_services_arg; } - cret = osc_read_direct_links(&e, &r, &a); - TRY(cret, "fail to call ReadDirectLinks: %s\n", curl_easy_strerror(cret)); + cret = osc_read_internet_services(&e, &r, &a); + TRY(cret, "fail to call ReadInternetServices: %s\n", curl_easy_strerror(cret)); CHK_BAD_RET(!r.buf, "connection sucessful, but empty responce\n"); if (program_flag & OAPI_RAW_OUTPUT) puts(r.buf); @@ -18830,19 +20120,19 @@ int main(int ac, char **av) } osc_deinit_str(&r); } else - if (!strcmp("ReadDirectLinkInterfaces", av[i])) { + if (!strcmp("ReadImages", av[i])) { json_object *jobj; auto_ptr_array struct ptr_array opa = {0}; struct ptr_array *pa = &opa; - struct osc_read_direct_link_interfaces_arg a = {0}; - struct osc_read_direct_link_interfaces_arg *s = &a; + struct osc_read_images_arg a = {0}; + struct osc_read_images_arg *s = &a; __attribute__((cleanup(files_cnt_cleanup))) char *files_cnt[MAX_FILES_PER_CMD] = {NULL}; int cret; cascade_struct = NULL; cascade_parser = NULL; - read_direct_link_interfaces_arg: + read_images_arg: if (i + 1 < ac && av[i + 1][0] == '.' && av[i + 1][1] == '.') { char *next_a = &av[i + 1][2]; @@ -18860,7 +20150,7 @@ int main(int ac, char **av) } STRY(cascade_parser(cascade_struct, next_a, aa, pa)); i += incr; - goto read_direct_link_interfaces_arg; + goto read_images_arg; } if (i + 1 < ac && av[i + 1][0] == '-' && av[i + 1][1] == '-') { @@ -18910,24 +20200,46 @@ int main(int ac, char **av) dot_pos = strchr(str, '.'); if (dot_pos++) { cascade_struct = &s->filters; - cascade_parser = filters_direct_link_interface_parser; + cascade_parser = filters_image_parser; if (*dot_pos == '.') { ++dot_pos; } - STRY(filters_direct_link_interface_parser(&s->filters, dot_pos, aa, pa)); + STRY(filters_image_parser(&s->filters, dot_pos, aa, pa)); s->is_set_filters = 1; } else { s->filters_str = aa; } } else + if ((aret = argcmp(next_a, "NextPageToken")) == 0 || aret == '=' ) { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "NextPageToken argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + TRY(!aa, "NextPageToken argument missing\n"); + s->next_page_token = aa; // string string + + } else + if ((aret = argcmp(next_a, "ResultsPerPage")) == 0 || aret == '=' ) { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "ResultsPerPage argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + TRY(!aa, "ResultsPerPage argument missing\n"); + s->is_set_results_per_page = 1; + s->results_per_page = atoi(aa); + } else { - BAD_RET("'%s' is not a valide argument for 'ReadDirectLinkInterfaces'\n", next_a); + BAD_RET("'%s' is not a valide argument for 'ReadImages'\n", next_a); } i += incr; - goto read_direct_link_interfaces_arg; + goto read_images_arg; } - cret = osc_read_direct_link_interfaces(&e, &r, &a); - TRY(cret, "fail to call ReadDirectLinkInterfaces: %s\n", curl_easy_strerror(cret)); + cret = osc_read_images(&e, &r, &a); + TRY(cret, "fail to call ReadImages: %s\n", curl_easy_strerror(cret)); CHK_BAD_RET(!r.buf, "connection sucessful, but empty responce\n"); if (program_flag & OAPI_RAW_OUTPUT) puts(r.buf); @@ -18940,19 +20252,19 @@ int main(int ac, char **av) } osc_deinit_str(&r); } else - if (!strcmp("ReadDhcpOptions", av[i])) { + if (!strcmp("ReadImageExportTasks", av[i])) { json_object *jobj; auto_ptr_array struct ptr_array opa = {0}; struct ptr_array *pa = &opa; - struct osc_read_dhcp_options_arg a = {0}; - struct osc_read_dhcp_options_arg *s = &a; + struct osc_read_image_export_tasks_arg a = {0}; + struct osc_read_image_export_tasks_arg *s = &a; __attribute__((cleanup(files_cnt_cleanup))) char *files_cnt[MAX_FILES_PER_CMD] = {NULL}; int cret; cascade_struct = NULL; cascade_parser = NULL; - read_dhcp_options_arg: + read_image_export_tasks_arg: if (i + 1 < ac && av[i + 1][0] == '.' && av[i + 1][1] == '.') { char *next_a = &av[i + 1][2]; @@ -18970,7 +20282,7 @@ int main(int ac, char **av) } STRY(cascade_parser(cascade_struct, next_a, aa, pa)); i += incr; - goto read_dhcp_options_arg; + goto read_image_export_tasks_arg; } if (i + 1 < ac && av[i + 1][0] == '-' && av[i + 1][1] == '-') { @@ -19020,24 +20332,24 @@ int main(int ac, char **av) dot_pos = strchr(str, '.'); if (dot_pos++) { cascade_struct = &s->filters; - cascade_parser = filters_dhcp_options_parser; + cascade_parser = filters_export_task_parser; if (*dot_pos == '.') { ++dot_pos; } - STRY(filters_dhcp_options_parser(&s->filters, dot_pos, aa, pa)); + STRY(filters_export_task_parser(&s->filters, dot_pos, aa, pa)); s->is_set_filters = 1; } else { s->filters_str = aa; } } else { - BAD_RET("'%s' is not a valide argument for 'ReadDhcpOptions'\n", next_a); + BAD_RET("'%s' is not a valide argument for 'ReadImageExportTasks'\n", next_a); } i += incr; - goto read_dhcp_options_arg; + goto read_image_export_tasks_arg; } - cret = osc_read_dhcp_options(&e, &r, &a); - TRY(cret, "fail to call ReadDhcpOptions: %s\n", curl_easy_strerror(cret)); + cret = osc_read_image_export_tasks(&e, &r, &a); + TRY(cret, "fail to call ReadImageExportTasks: %s\n", curl_easy_strerror(cret)); CHK_BAD_RET(!r.buf, "connection sucessful, but empty responce\n"); if (program_flag & OAPI_RAW_OUTPUT) puts(r.buf); @@ -19050,19 +20362,19 @@ int main(int ac, char **av) } osc_deinit_str(&r); } else - if (!strcmp("ReadConsumptionAccount", av[i])) { + if (!strcmp("ReadFlexibleGpus", av[i])) { json_object *jobj; auto_ptr_array struct ptr_array opa = {0}; struct ptr_array *pa = &opa; - struct osc_read_consumption_account_arg a = {0}; - struct osc_read_consumption_account_arg *s = &a; + struct osc_read_flexible_gpus_arg a = {0}; + struct osc_read_flexible_gpus_arg *s = &a; __attribute__((cleanup(files_cnt_cleanup))) char *files_cnt[MAX_FILES_PER_CMD] = {NULL}; int cret; cascade_struct = NULL; cascade_parser = NULL; - read_consumption_account_arg: + read_flexible_gpus_arg: if (i + 1 < ac && av[i + 1][0] == '.' && av[i + 1][1] == '.') { char *next_a = &av[i + 1][2]; @@ -19080,7 +20392,7 @@ int main(int ac, char **av) } STRY(cascade_parser(cascade_struct, next_a, aa, pa)); i += incr; - goto read_consumption_account_arg; + goto read_flexible_gpus_arg; } if (i + 1 < ac && av[i + 1][0] == '-' && av[i + 1][1] == '-') { @@ -19117,52 +20429,37 @@ int main(int ac, char **av) BAD_RET("DryRun require true/false\n"); } } else - if ((aret = argcmp(next_a, "FromDate")) == 0 || aret == '=' ) { + if ((aret = argcmp(next_a, "Filters")) == 0 || aret == '=' ) { char *eq_ptr = strchr(next_a, '='); if (eq_ptr) { - TRY((!*eq_ptr), "FromDate argument missing\n"); + TRY((!*eq_ptr), "Filters argument missing\n"); aa = eq_ptr + 1; incr = 1; } - TRY(!aa, "FromDate argument missing\n"); - s->from_date = aa; // string string + char *dot_pos; - } else - if ((aret = argcmp(next_a, "Overall")) == 0 || aret == '=' ) { - char *eq_ptr = strchr(next_a, '='); - if (eq_ptr) { - TRY((!*eq_ptr), "Overall argument missing\n"); - aa = eq_ptr + 1; - incr = 1; - } - s->is_set_overall = 1; - if (!aa || !strcasecmp(aa, "true")) { - s->overall = 1; - } else if (!strcasecmp(aa, "false")) { - s->overall = 0; + TRY(!aa, "Filters argument missing\n"); + dot_pos = strchr(str, '.'); + if (dot_pos++) { + cascade_struct = &s->filters; + cascade_parser = filters_flexible_gpu_parser; + if (*dot_pos == '.') { + ++dot_pos; + } + STRY(filters_flexible_gpu_parser(&s->filters, dot_pos, aa, pa)); + s->is_set_filters = 1; } else { - BAD_RET("Overall require true/false\n"); + s->filters_str = aa; } - } else - if ((aret = argcmp(next_a, "ToDate")) == 0 || aret == '=' ) { - char *eq_ptr = strchr(next_a, '='); - if (eq_ptr) { - TRY((!*eq_ptr), "ToDate argument missing\n"); - aa = eq_ptr + 1; - incr = 1; - } - TRY(!aa, "ToDate argument missing\n"); - s->to_date = aa; // string string - } else { - BAD_RET("'%s' is not a valide argument for 'ReadConsumptionAccount'\n", next_a); + BAD_RET("'%s' is not a valide argument for 'ReadFlexibleGpus'\n", next_a); } i += incr; - goto read_consumption_account_arg; + goto read_flexible_gpus_arg; } - cret = osc_read_consumption_account(&e, &r, &a); - TRY(cret, "fail to call ReadConsumptionAccount: %s\n", curl_easy_strerror(cret)); + cret = osc_read_flexible_gpus(&e, &r, &a); + TRY(cret, "fail to call ReadFlexibleGpus: %s\n", curl_easy_strerror(cret)); CHK_BAD_RET(!r.buf, "connection sucessful, but empty responce\n"); if (program_flag & OAPI_RAW_OUTPUT) puts(r.buf); @@ -19175,19 +20472,19 @@ int main(int ac, char **av) } osc_deinit_str(&r); } else - if (!strcmp("ReadConsoleOutput", av[i])) { + if (!strcmp("ReadFlexibleGpuCatalog", av[i])) { json_object *jobj; auto_ptr_array struct ptr_array opa = {0}; struct ptr_array *pa = &opa; - struct osc_read_console_output_arg a = {0}; - struct osc_read_console_output_arg *s = &a; + struct osc_read_flexible_gpu_catalog_arg a = {0}; + struct osc_read_flexible_gpu_catalog_arg *s = &a; __attribute__((cleanup(files_cnt_cleanup))) char *files_cnt[MAX_FILES_PER_CMD] = {NULL}; int cret; cascade_struct = NULL; cascade_parser = NULL; - read_console_output_arg: + read_flexible_gpu_catalog_arg: if (i + 1 < ac && av[i + 1][0] == '.' && av[i + 1][1] == '.') { char *next_a = &av[i + 1][2]; @@ -19205,7 +20502,7 @@ int main(int ac, char **av) } STRY(cascade_parser(cascade_struct, next_a, aa, pa)); i += incr; - goto read_console_output_arg; + goto read_flexible_gpu_catalog_arg; } if (i + 1 < ac && av[i + 1][0] == '-' && av[i + 1][1] == '-') { @@ -19242,25 +20539,14 @@ int main(int ac, char **av) BAD_RET("DryRun require true/false\n"); } } else - if ((aret = argcmp(next_a, "VmId")) == 0 || aret == '=' ) { - char *eq_ptr = strchr(next_a, '='); - if (eq_ptr) { - TRY((!*eq_ptr), "VmId argument missing\n"); - aa = eq_ptr + 1; - incr = 1; - } - TRY(!aa, "VmId argument missing\n"); - s->vm_id = aa; // string string - - } else { - BAD_RET("'%s' is not a valide argument for 'ReadConsoleOutput'\n", next_a); + BAD_RET("'%s' is not a valide argument for 'ReadFlexibleGpuCatalog'\n", next_a); } i += incr; - goto read_console_output_arg; + goto read_flexible_gpu_catalog_arg; } - cret = osc_read_console_output(&e, &r, &a); - TRY(cret, "fail to call ReadConsoleOutput: %s\n", curl_easy_strerror(cret)); + cret = osc_read_flexible_gpu_catalog(&e, &r, &a); + TRY(cret, "fail to call ReadFlexibleGpuCatalog: %s\n", curl_easy_strerror(cret)); CHK_BAD_RET(!r.buf, "connection sucessful, but empty responce\n"); if (program_flag & OAPI_RAW_OUTPUT) puts(r.buf); @@ -19273,19 +20559,19 @@ int main(int ac, char **av) } osc_deinit_str(&r); } else - if (!strcmp("ReadClientGateways", av[i])) { + if (!strcmp("ReadDirectLinks", av[i])) { json_object *jobj; auto_ptr_array struct ptr_array opa = {0}; struct ptr_array *pa = &opa; - struct osc_read_client_gateways_arg a = {0}; - struct osc_read_client_gateways_arg *s = &a; + struct osc_read_direct_links_arg a = {0}; + struct osc_read_direct_links_arg *s = &a; __attribute__((cleanup(files_cnt_cleanup))) char *files_cnt[MAX_FILES_PER_CMD] = {NULL}; int cret; cascade_struct = NULL; cascade_parser = NULL; - read_client_gateways_arg: + read_direct_links_arg: if (i + 1 < ac && av[i + 1][0] == '.' && av[i + 1][1] == '.') { char *next_a = &av[i + 1][2]; @@ -19303,7 +20589,7 @@ int main(int ac, char **av) } STRY(cascade_parser(cascade_struct, next_a, aa, pa)); i += incr; - goto read_client_gateways_arg; + goto read_direct_links_arg; } if (i + 1 < ac && av[i + 1][0] == '-' && av[i + 1][1] == '-') { @@ -19353,24 +20639,24 @@ int main(int ac, char **av) dot_pos = strchr(str, '.'); if (dot_pos++) { cascade_struct = &s->filters; - cascade_parser = filters_client_gateway_parser; + cascade_parser = filters_direct_link_parser; if (*dot_pos == '.') { ++dot_pos; } - STRY(filters_client_gateway_parser(&s->filters, dot_pos, aa, pa)); + STRY(filters_direct_link_parser(&s->filters, dot_pos, aa, pa)); s->is_set_filters = 1; } else { s->filters_str = aa; } } else { - BAD_RET("'%s' is not a valide argument for 'ReadClientGateways'\n", next_a); + BAD_RET("'%s' is not a valide argument for 'ReadDirectLinks'\n", next_a); } i += incr; - goto read_client_gateways_arg; + goto read_direct_links_arg; } - cret = osc_read_client_gateways(&e, &r, &a); - TRY(cret, "fail to call ReadClientGateways: %s\n", curl_easy_strerror(cret)); + cret = osc_read_direct_links(&e, &r, &a); + TRY(cret, "fail to call ReadDirectLinks: %s\n", curl_easy_strerror(cret)); CHK_BAD_RET(!r.buf, "connection sucessful, but empty responce\n"); if (program_flag & OAPI_RAW_OUTPUT) puts(r.buf); @@ -19383,19 +20669,19 @@ int main(int ac, char **av) } osc_deinit_str(&r); } else - if (!strcmp("ReadCatalogs", av[i])) { + if (!strcmp("ReadDirectLinkInterfaces", av[i])) { json_object *jobj; auto_ptr_array struct ptr_array opa = {0}; struct ptr_array *pa = &opa; - struct osc_read_catalogs_arg a = {0}; - struct osc_read_catalogs_arg *s = &a; + struct osc_read_direct_link_interfaces_arg a = {0}; + struct osc_read_direct_link_interfaces_arg *s = &a; __attribute__((cleanup(files_cnt_cleanup))) char *files_cnt[MAX_FILES_PER_CMD] = {NULL}; int cret; cascade_struct = NULL; cascade_parser = NULL; - read_catalogs_arg: + read_direct_link_interfaces_arg: if (i + 1 < ac && av[i + 1][0] == '.' && av[i + 1][1] == '.') { char *next_a = &av[i + 1][2]; @@ -19413,7 +20699,7 @@ int main(int ac, char **av) } STRY(cascade_parser(cascade_struct, next_a, aa, pa)); i += incr; - goto read_catalogs_arg; + goto read_direct_link_interfaces_arg; } if (i + 1 < ac && av[i + 1][0] == '-' && av[i + 1][1] == '-') { @@ -19463,24 +20749,24 @@ int main(int ac, char **av) dot_pos = strchr(str, '.'); if (dot_pos++) { cascade_struct = &s->filters; - cascade_parser = filters_catalogs_parser; + cascade_parser = filters_direct_link_interface_parser; if (*dot_pos == '.') { ++dot_pos; } - STRY(filters_catalogs_parser(&s->filters, dot_pos, aa, pa)); + STRY(filters_direct_link_interface_parser(&s->filters, dot_pos, aa, pa)); s->is_set_filters = 1; } else { s->filters_str = aa; } } else { - BAD_RET("'%s' is not a valide argument for 'ReadCatalogs'\n", next_a); + BAD_RET("'%s' is not a valide argument for 'ReadDirectLinkInterfaces'\n", next_a); } i += incr; - goto read_catalogs_arg; + goto read_direct_link_interfaces_arg; } - cret = osc_read_catalogs(&e, &r, &a); - TRY(cret, "fail to call ReadCatalogs: %s\n", curl_easy_strerror(cret)); + cret = osc_read_direct_link_interfaces(&e, &r, &a); + TRY(cret, "fail to call ReadDirectLinkInterfaces: %s\n", curl_easy_strerror(cret)); CHK_BAD_RET(!r.buf, "connection sucessful, but empty responce\n"); if (program_flag & OAPI_RAW_OUTPUT) puts(r.buf); @@ -19493,19 +20779,19 @@ int main(int ac, char **av) } osc_deinit_str(&r); } else - if (!strcmp("ReadCatalog", av[i])) { + if (!strcmp("ReadDhcpOptions", av[i])) { json_object *jobj; auto_ptr_array struct ptr_array opa = {0}; struct ptr_array *pa = &opa; - struct osc_read_catalog_arg a = {0}; - struct osc_read_catalog_arg *s = &a; + struct osc_read_dhcp_options_arg a = {0}; + struct osc_read_dhcp_options_arg *s = &a; __attribute__((cleanup(files_cnt_cleanup))) char *files_cnt[MAX_FILES_PER_CMD] = {NULL}; int cret; cascade_struct = NULL; cascade_parser = NULL; - read_catalog_arg: + read_dhcp_options_arg: if (i + 1 < ac && av[i + 1][0] == '.' && av[i + 1][1] == '.') { char *next_a = &av[i + 1][2]; @@ -19523,7 +20809,7 @@ int main(int ac, char **av) } STRY(cascade_parser(cascade_struct, next_a, aa, pa)); i += incr; - goto read_catalog_arg; + goto read_dhcp_options_arg; } if (i + 1 < ac && av[i + 1][0] == '-' && av[i + 1][1] == '-') { @@ -19560,14 +20846,59 @@ int main(int ac, char **av) BAD_RET("DryRun require true/false\n"); } } else + if ((aret = argcmp(next_a, "Filters")) == 0 || aret == '=' ) { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "Filters argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + char *dot_pos; + + TRY(!aa, "Filters argument missing\n"); + dot_pos = strchr(str, '.'); + if (dot_pos++) { + cascade_struct = &s->filters; + cascade_parser = filters_dhcp_options_parser; + if (*dot_pos == '.') { + ++dot_pos; + } + STRY(filters_dhcp_options_parser(&s->filters, dot_pos, aa, pa)); + s->is_set_filters = 1; + } else { + s->filters_str = aa; + } + } else + if ((aret = argcmp(next_a, "NextPageToken")) == 0 || aret == '=' ) { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "NextPageToken argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + TRY(!aa, "NextPageToken argument missing\n"); + s->next_page_token = aa; // string string + + } else + if ((aret = argcmp(next_a, "ResultsPerPage")) == 0 || aret == '=' ) { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "ResultsPerPage argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + TRY(!aa, "ResultsPerPage argument missing\n"); + s->is_set_results_per_page = 1; + s->results_per_page = atoi(aa); + } else { - BAD_RET("'%s' is not a valide argument for 'ReadCatalog'\n", next_a); + BAD_RET("'%s' is not a valide argument for 'ReadDhcpOptions'\n", next_a); } i += incr; - goto read_catalog_arg; + goto read_dhcp_options_arg; } - cret = osc_read_catalog(&e, &r, &a); - TRY(cret, "fail to call ReadCatalog: %s\n", curl_easy_strerror(cret)); + cret = osc_read_dhcp_options(&e, &r, &a); + TRY(cret, "fail to call ReadDhcpOptions: %s\n", curl_easy_strerror(cret)); CHK_BAD_RET(!r.buf, "connection sucessful, but empty responce\n"); if (program_flag & OAPI_RAW_OUTPUT) puts(r.buf); @@ -19580,19 +20911,19 @@ int main(int ac, char **av) } osc_deinit_str(&r); } else - if (!strcmp("ReadCas", av[i])) { + if (!strcmp("ReadDedicatedGroups", av[i])) { json_object *jobj; auto_ptr_array struct ptr_array opa = {0}; struct ptr_array *pa = &opa; - struct osc_read_cas_arg a = {0}; - struct osc_read_cas_arg *s = &a; + struct osc_read_dedicated_groups_arg a = {0}; + struct osc_read_dedicated_groups_arg *s = &a; __attribute__((cleanup(files_cnt_cleanup))) char *files_cnt[MAX_FILES_PER_CMD] = {NULL}; int cret; cascade_struct = NULL; cascade_parser = NULL; - read_cas_arg: + read_dedicated_groups_arg: if (i + 1 < ac && av[i + 1][0] == '.' && av[i + 1][1] == '.') { char *next_a = &av[i + 1][2]; @@ -19610,7 +20941,7 @@ int main(int ac, char **av) } STRY(cascade_parser(cascade_struct, next_a, aa, pa)); i += incr; - goto read_cas_arg; + goto read_dedicated_groups_arg; } if (i + 1 < ac && av[i + 1][0] == '-' && av[i + 1][1] == '-') { @@ -19660,24 +20991,24 @@ int main(int ac, char **av) dot_pos = strchr(str, '.'); if (dot_pos++) { cascade_struct = &s->filters; - cascade_parser = filters_ca_parser; + cascade_parser = filters_dedicated_group_parser; if (*dot_pos == '.') { ++dot_pos; } - STRY(filters_ca_parser(&s->filters, dot_pos, aa, pa)); + STRY(filters_dedicated_group_parser(&s->filters, dot_pos, aa, pa)); s->is_set_filters = 1; } else { s->filters_str = aa; } } else { - BAD_RET("'%s' is not a valide argument for 'ReadCas'\n", next_a); + BAD_RET("'%s' is not a valide argument for 'ReadDedicatedGroups'\n", next_a); } i += incr; - goto read_cas_arg; + goto read_dedicated_groups_arg; } - cret = osc_read_cas(&e, &r, &a); - TRY(cret, "fail to call ReadCas: %s\n", curl_easy_strerror(cret)); + cret = osc_read_dedicated_groups(&e, &r, &a); + TRY(cret, "fail to call ReadDedicatedGroups: %s\n", curl_easy_strerror(cret)); CHK_BAD_RET(!r.buf, "connection sucessful, but empty responce\n"); if (program_flag & OAPI_RAW_OUTPUT) puts(r.buf); @@ -19690,19 +21021,19 @@ int main(int ac, char **av) } osc_deinit_str(&r); } else - if (!strcmp("ReadApiLogs", av[i])) { + if (!strcmp("ReadConsumptionAccount", av[i])) { json_object *jobj; auto_ptr_array struct ptr_array opa = {0}; struct ptr_array *pa = &opa; - struct osc_read_api_logs_arg a = {0}; - struct osc_read_api_logs_arg *s = &a; + struct osc_read_consumption_account_arg a = {0}; + struct osc_read_consumption_account_arg *s = &a; __attribute__((cleanup(files_cnt_cleanup))) char *files_cnt[MAX_FILES_PER_CMD] = {NULL}; int cret; cascade_struct = NULL; cascade_parser = NULL; - read_api_logs_arg: + read_consumption_account_arg: if (i + 1 < ac && av[i + 1][0] == '.' && av[i + 1][1] == '.') { char *next_a = &av[i + 1][2]; @@ -19720,7 +21051,7 @@ int main(int ac, char **av) } STRY(cascade_parser(cascade_struct, next_a, aa, pa)); i += incr; - goto read_api_logs_arg; + goto read_consumption_account_arg; } if (i + 1 < ac && av[i + 1][0] == '-' && av[i + 1][1] == '-') { @@ -19757,82 +21088,68 @@ int main(int ac, char **av) BAD_RET("DryRun require true/false\n"); } } else - if ((aret = argcmp(next_a, "Filters")) == 0 || aret == '=' ) { + if ((aret = argcmp(next_a, "FromDate")) == 0 || aret == '=' ) { char *eq_ptr = strchr(next_a, '='); if (eq_ptr) { - TRY((!*eq_ptr), "Filters argument missing\n"); + TRY((!*eq_ptr), "FromDate argument missing\n"); aa = eq_ptr + 1; incr = 1; } - char *dot_pos; + TRY(!aa, "FromDate argument missing\n"); + s->from_date = aa; // string string - TRY(!aa, "Filters argument missing\n"); - dot_pos = strchr(str, '.'); - if (dot_pos++) { - cascade_struct = &s->filters; - cascade_parser = filters_api_log_parser; - if (*dot_pos == '.') { - ++dot_pos; - } - STRY(filters_api_log_parser(&s->filters, dot_pos, aa, pa)); - s->is_set_filters = 1; - } else { - s->filters_str = aa; - } } else - if ((aret = argcmp(next_a, "NextPageToken")) == 0 || aret == '=' ) { + if ((aret = argcmp(next_a, "Overall")) == 0 || aret == '=' ) { char *eq_ptr = strchr(next_a, '='); if (eq_ptr) { - TRY((!*eq_ptr), "NextPageToken argument missing\n"); + TRY((!*eq_ptr), "Overall argument missing\n"); aa = eq_ptr + 1; incr = 1; } - TRY(!aa, "NextPageToken argument missing\n"); - s->next_page_token = aa; // string string - - } else - if ((aret = argcmp(next_a, "ResultsPerPage")) == 0 || aret == '=' ) { - char *eq_ptr = strchr(next_a, '='); - if (eq_ptr) { - TRY((!*eq_ptr), "ResultsPerPage argument missing\n"); + s->is_set_overall = 1; + if (!aa || !strcasecmp(aa, "true")) { + s->overall = 1; + } else if (!strcasecmp(aa, "false")) { + s->overall = 0; + } else { + BAD_RET("Overall require true/false\n"); + } + } else + if ((aret = argcmp(next_a, "ShowPrice")) == 0 || aret == '=' ) { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "ShowPrice argument missing\n"); aa = eq_ptr + 1; incr = 1; } - TRY(!aa, "ResultsPerPage argument missing\n"); - s->is_set_results_per_page = 1; - s->results_per_page = atoi(aa); - } else - if ((aret = argcmp(next_a, "With")) == 0 || aret == '=' ) { + s->is_set_show_price = 1; + if (!aa || !strcasecmp(aa, "true")) { + s->show_price = 1; + } else if (!strcasecmp(aa, "false")) { + s->show_price = 0; + } else { + BAD_RET("ShowPrice require true/false\n"); + } + } else + if ((aret = argcmp(next_a, "ToDate")) == 0 || aret == '=' ) { char *eq_ptr = strchr(next_a, '='); if (eq_ptr) { - TRY((!*eq_ptr), "With argument missing\n"); + TRY((!*eq_ptr), "ToDate argument missing\n"); aa = eq_ptr + 1; incr = 1; } - char *dot_pos; + TRY(!aa, "ToDate argument missing\n"); + s->to_date = aa; // string string - TRY(!aa, "With argument missing\n"); - dot_pos = strchr(str, '.'); - if (dot_pos++) { - cascade_struct = &s->with; - cascade_parser = with_parser; - if (*dot_pos == '.') { - ++dot_pos; - } - STRY(with_parser(&s->with, dot_pos, aa, pa)); - s->is_set_with = 1; - } else { - s->with_str = aa; - } } else { - BAD_RET("'%s' is not a valide argument for 'ReadApiLogs'\n", next_a); + BAD_RET("'%s' is not a valide argument for 'ReadConsumptionAccount'\n", next_a); } i += incr; - goto read_api_logs_arg; + goto read_consumption_account_arg; } - cret = osc_read_api_logs(&e, &r, &a); - TRY(cret, "fail to call ReadApiLogs: %s\n", curl_easy_strerror(cret)); + cret = osc_read_consumption_account(&e, &r, &a); + TRY(cret, "fail to call ReadConsumptionAccount: %s\n", curl_easy_strerror(cret)); CHK_BAD_RET(!r.buf, "connection sucessful, but empty responce\n"); if (program_flag & OAPI_RAW_OUTPUT) puts(r.buf); @@ -19845,19 +21162,19 @@ int main(int ac, char **av) } osc_deinit_str(&r); } else - if (!strcmp("ReadApiAccessRules", av[i])) { + if (!strcmp("ReadConsoleOutput", av[i])) { json_object *jobj; auto_ptr_array struct ptr_array opa = {0}; struct ptr_array *pa = &opa; - struct osc_read_api_access_rules_arg a = {0}; - struct osc_read_api_access_rules_arg *s = &a; + struct osc_read_console_output_arg a = {0}; + struct osc_read_console_output_arg *s = &a; __attribute__((cleanup(files_cnt_cleanup))) char *files_cnt[MAX_FILES_PER_CMD] = {NULL}; int cret; cascade_struct = NULL; cascade_parser = NULL; - read_api_access_rules_arg: + read_console_output_arg: if (i + 1 < ac && av[i + 1][0] == '.' && av[i + 1][1] == '.') { char *next_a = &av[i + 1][2]; @@ -19875,7 +21192,7 @@ int main(int ac, char **av) } STRY(cascade_parser(cascade_struct, next_a, aa, pa)); i += incr; - goto read_api_access_rules_arg; + goto read_console_output_arg; } if (i + 1 < ac && av[i + 1][0] == '-' && av[i + 1][1] == '-') { @@ -19912,37 +21229,25 @@ int main(int ac, char **av) BAD_RET("DryRun require true/false\n"); } } else - if ((aret = argcmp(next_a, "Filters")) == 0 || aret == '=' ) { + if ((aret = argcmp(next_a, "VmId")) == 0 || aret == '=' ) { char *eq_ptr = strchr(next_a, '='); if (eq_ptr) { - TRY((!*eq_ptr), "Filters argument missing\n"); + TRY((!*eq_ptr), "VmId argument missing\n"); aa = eq_ptr + 1; incr = 1; } - char *dot_pos; + TRY(!aa, "VmId argument missing\n"); + s->vm_id = aa; // string string - TRY(!aa, "Filters argument missing\n"); - dot_pos = strchr(str, '.'); - if (dot_pos++) { - cascade_struct = &s->filters; - cascade_parser = filters_api_access_rule_parser; - if (*dot_pos == '.') { - ++dot_pos; - } - STRY(filters_api_access_rule_parser(&s->filters, dot_pos, aa, pa)); - s->is_set_filters = 1; - } else { - s->filters_str = aa; - } } else { - BAD_RET("'%s' is not a valide argument for 'ReadApiAccessRules'\n", next_a); + BAD_RET("'%s' is not a valide argument for 'ReadConsoleOutput'\n", next_a); } i += incr; - goto read_api_access_rules_arg; + goto read_console_output_arg; } - cret = osc_read_api_access_rules(&e, &r, &a); - TRY(cret, "fail to call ReadApiAccessRules: %s\n", curl_easy_strerror(cret)); + cret = osc_read_console_output(&e, &r, &a); + TRY(cret, "fail to call ReadConsoleOutput: %s\n", curl_easy_strerror(cret)); CHK_BAD_RET(!r.buf, "connection sucessful, but empty responce\n"); if (program_flag & OAPI_RAW_OUTPUT) puts(r.buf); @@ -19955,19 +21260,19 @@ int main(int ac, char **av) } osc_deinit_str(&r); } else - if (!strcmp("ReadApiAccessPolicy", av[i])) { + if (!strcmp("ReadClientGateways", av[i])) { json_object *jobj; auto_ptr_array struct ptr_array opa = {0}; struct ptr_array *pa = &opa; - struct osc_read_api_access_policy_arg a = {0}; - struct osc_read_api_access_policy_arg *s = &a; + struct osc_read_client_gateways_arg a = {0}; + struct osc_read_client_gateways_arg *s = &a; __attribute__((cleanup(files_cnt_cleanup))) char *files_cnt[MAX_FILES_PER_CMD] = {NULL}; int cret; cascade_struct = NULL; cascade_parser = NULL; - read_api_access_policy_arg: + read_client_gateways_arg: if (i + 1 < ac && av[i + 1][0] == '.' && av[i + 1][1] == '.') { char *next_a = &av[i + 1][2]; @@ -19985,7 +21290,7 @@ int main(int ac, char **av) } STRY(cascade_parser(cascade_struct, next_a, aa, pa)); i += incr; - goto read_api_access_policy_arg; + goto read_client_gateways_arg; } if (i + 1 < ac && av[i + 1][0] == '-' && av[i + 1][1] == '-') { @@ -20022,14 +21327,37 @@ int main(int ac, char **av) BAD_RET("DryRun require true/false\n"); } } else + if ((aret = argcmp(next_a, "Filters")) == 0 || aret == '=' ) { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "Filters argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + char *dot_pos; + + TRY(!aa, "Filters argument missing\n"); + dot_pos = strchr(str, '.'); + if (dot_pos++) { + cascade_struct = &s->filters; + cascade_parser = filters_client_gateway_parser; + if (*dot_pos == '.') { + ++dot_pos; + } + STRY(filters_client_gateway_parser(&s->filters, dot_pos, aa, pa)); + s->is_set_filters = 1; + } else { + s->filters_str = aa; + } + } else { - BAD_RET("'%s' is not a valide argument for 'ReadApiAccessPolicy'\n", next_a); + BAD_RET("'%s' is not a valide argument for 'ReadClientGateways'\n", next_a); } i += incr; - goto read_api_access_policy_arg; + goto read_client_gateways_arg; } - cret = osc_read_api_access_policy(&e, &r, &a); - TRY(cret, "fail to call ReadApiAccessPolicy: %s\n", curl_easy_strerror(cret)); + cret = osc_read_client_gateways(&e, &r, &a); + TRY(cret, "fail to call ReadClientGateways: %s\n", curl_easy_strerror(cret)); CHK_BAD_RET(!r.buf, "connection sucessful, but empty responce\n"); if (program_flag & OAPI_RAW_OUTPUT) puts(r.buf); @@ -20042,19 +21370,19 @@ int main(int ac, char **av) } osc_deinit_str(&r); } else - if (!strcmp("ReadAdminPassword", av[i])) { + if (!strcmp("ReadCatalogs", av[i])) { json_object *jobj; auto_ptr_array struct ptr_array opa = {0}; struct ptr_array *pa = &opa; - struct osc_read_admin_password_arg a = {0}; - struct osc_read_admin_password_arg *s = &a; + struct osc_read_catalogs_arg a = {0}; + struct osc_read_catalogs_arg *s = &a; __attribute__((cleanup(files_cnt_cleanup))) char *files_cnt[MAX_FILES_PER_CMD] = {NULL}; int cret; cascade_struct = NULL; cascade_parser = NULL; - read_admin_password_arg: + read_catalogs_arg: if (i + 1 < ac && av[i + 1][0] == '.' && av[i + 1][1] == '.') { char *next_a = &av[i + 1][2]; @@ -20072,7 +21400,7 @@ int main(int ac, char **av) } STRY(cascade_parser(cascade_struct, next_a, aa, pa)); i += incr; - goto read_admin_password_arg; + goto read_catalogs_arg; } if (i + 1 < ac && av[i + 1][0] == '-' && av[i + 1][1] == '-') { @@ -20109,25 +21437,37 @@ int main(int ac, char **av) BAD_RET("DryRun require true/false\n"); } } else - if ((aret = argcmp(next_a, "VmId")) == 0 || aret == '=' ) { + if ((aret = argcmp(next_a, "Filters")) == 0 || aret == '=' ) { char *eq_ptr = strchr(next_a, '='); if (eq_ptr) { - TRY((!*eq_ptr), "VmId argument missing\n"); + TRY((!*eq_ptr), "Filters argument missing\n"); aa = eq_ptr + 1; incr = 1; } - TRY(!aa, "VmId argument missing\n"); - s->vm_id = aa; // string string + char *dot_pos; + TRY(!aa, "Filters argument missing\n"); + dot_pos = strchr(str, '.'); + if (dot_pos++) { + cascade_struct = &s->filters; + cascade_parser = filters_catalogs_parser; + if (*dot_pos == '.') { + ++dot_pos; + } + STRY(filters_catalogs_parser(&s->filters, dot_pos, aa, pa)); + s->is_set_filters = 1; + } else { + s->filters_str = aa; + } } else { - BAD_RET("'%s' is not a valide argument for 'ReadAdminPassword'\n", next_a); + BAD_RET("'%s' is not a valide argument for 'ReadCatalogs'\n", next_a); } i += incr; - goto read_admin_password_arg; + goto read_catalogs_arg; } - cret = osc_read_admin_password(&e, &r, &a); - TRY(cret, "fail to call ReadAdminPassword: %s\n", curl_easy_strerror(cret)); + cret = osc_read_catalogs(&e, &r, &a); + TRY(cret, "fail to call ReadCatalogs: %s\n", curl_easy_strerror(cret)); CHK_BAD_RET(!r.buf, "connection sucessful, but empty responce\n"); if (program_flag & OAPI_RAW_OUTPUT) puts(r.buf); @@ -20140,19 +21480,19 @@ int main(int ac, char **av) } osc_deinit_str(&r); } else - if (!strcmp("ReadAccounts", av[i])) { + if (!strcmp("ReadCatalog", av[i])) { json_object *jobj; auto_ptr_array struct ptr_array opa = {0}; struct ptr_array *pa = &opa; - struct osc_read_accounts_arg a = {0}; - struct osc_read_accounts_arg *s = &a; + struct osc_read_catalog_arg a = {0}; + struct osc_read_catalog_arg *s = &a; __attribute__((cleanup(files_cnt_cleanup))) char *files_cnt[MAX_FILES_PER_CMD] = {NULL}; int cret; cascade_struct = NULL; cascade_parser = NULL; - read_accounts_arg: + read_catalog_arg: if (i + 1 < ac && av[i + 1][0] == '.' && av[i + 1][1] == '.') { char *next_a = &av[i + 1][2]; @@ -20170,7 +21510,7 @@ int main(int ac, char **av) } STRY(cascade_parser(cascade_struct, next_a, aa, pa)); i += incr; - goto read_accounts_arg; + goto read_catalog_arg; } if (i + 1 < ac && av[i + 1][0] == '-' && av[i + 1][1] == '-') { @@ -20208,13 +21548,13 @@ int main(int ac, char **av) } } else { - BAD_RET("'%s' is not a valide argument for 'ReadAccounts'\n", next_a); + BAD_RET("'%s' is not a valide argument for 'ReadCatalog'\n", next_a); } i += incr; - goto read_accounts_arg; + goto read_catalog_arg; } - cret = osc_read_accounts(&e, &r, &a); - TRY(cret, "fail to call ReadAccounts: %s\n", curl_easy_strerror(cret)); + cret = osc_read_catalog(&e, &r, &a); + TRY(cret, "fail to call ReadCatalog: %s\n", curl_easy_strerror(cret)); CHK_BAD_RET(!r.buf, "connection sucessful, but empty responce\n"); if (program_flag & OAPI_RAW_OUTPUT) puts(r.buf); @@ -20227,19 +21567,19 @@ int main(int ac, char **av) } osc_deinit_str(&r); } else - if (!strcmp("ReadAccessKeys", av[i])) { + if (!strcmp("ReadCas", av[i])) { json_object *jobj; auto_ptr_array struct ptr_array opa = {0}; struct ptr_array *pa = &opa; - struct osc_read_access_keys_arg a = {0}; - struct osc_read_access_keys_arg *s = &a; + struct osc_read_cas_arg a = {0}; + struct osc_read_cas_arg *s = &a; __attribute__((cleanup(files_cnt_cleanup))) char *files_cnt[MAX_FILES_PER_CMD] = {NULL}; int cret; cascade_struct = NULL; cascade_parser = NULL; - read_access_keys_arg: + read_cas_arg: if (i + 1 < ac && av[i + 1][0] == '.' && av[i + 1][1] == '.') { char *next_a = &av[i + 1][2]; @@ -20257,7 +21597,7 @@ int main(int ac, char **av) } STRY(cascade_parser(cascade_struct, next_a, aa, pa)); i += incr; - goto read_access_keys_arg; + goto read_cas_arg; } if (i + 1 < ac && av[i + 1][0] == '-' && av[i + 1][1] == '-') { @@ -20307,35 +21647,24 @@ int main(int ac, char **av) dot_pos = strchr(str, '.'); if (dot_pos++) { cascade_struct = &s->filters; - cascade_parser = filters_access_keys_parser; + cascade_parser = filters_ca_parser; if (*dot_pos == '.') { ++dot_pos; } - STRY(filters_access_keys_parser(&s->filters, dot_pos, aa, pa)); + STRY(filters_ca_parser(&s->filters, dot_pos, aa, pa)); s->is_set_filters = 1; } else { s->filters_str = aa; } } else - if ((aret = argcmp(next_a, "UserName")) == 0 || aret == '=' ) { - char *eq_ptr = strchr(next_a, '='); - if (eq_ptr) { - TRY((!*eq_ptr), "UserName argument missing\n"); - aa = eq_ptr + 1; - incr = 1; - } - TRY(!aa, "UserName argument missing\n"); - s->user_name = aa; // string string - - } else { - BAD_RET("'%s' is not a valide argument for 'ReadAccessKeys'\n", next_a); + BAD_RET("'%s' is not a valide argument for 'ReadCas'\n", next_a); } i += incr; - goto read_access_keys_arg; + goto read_cas_arg; } - cret = osc_read_access_keys(&e, &r, &a); - TRY(cret, "fail to call ReadAccessKeys: %s\n", curl_easy_strerror(cret)); + cret = osc_read_cas(&e, &r, &a); + TRY(cret, "fail to call ReadCas: %s\n", curl_easy_strerror(cret)); CHK_BAD_RET(!r.buf, "connection sucessful, but empty responce\n"); if (program_flag & OAPI_RAW_OUTPUT) puts(r.buf); @@ -20348,19 +21677,19 @@ int main(int ac, char **av) } osc_deinit_str(&r); } else - if (!strcmp("LinkVolume", av[i])) { + if (!strcmp("ReadApiLogs", av[i])) { json_object *jobj; auto_ptr_array struct ptr_array opa = {0}; struct ptr_array *pa = &opa; - struct osc_link_volume_arg a = {0}; - struct osc_link_volume_arg *s = &a; + struct osc_read_api_logs_arg a = {0}; + struct osc_read_api_logs_arg *s = &a; __attribute__((cleanup(files_cnt_cleanup))) char *files_cnt[MAX_FILES_PER_CMD] = {NULL}; int cret; cascade_struct = NULL; cascade_parser = NULL; - link_volume_arg: + read_api_logs_arg: if (i + 1 < ac && av[i + 1][0] == '.' && av[i + 1][1] == '.') { char *next_a = &av[i + 1][2]; @@ -20378,7 +21707,7 @@ int main(int ac, char **av) } STRY(cascade_parser(cascade_struct, next_a, aa, pa)); i += incr; - goto link_volume_arg; + goto read_api_logs_arg; } if (i + 1 < ac && av[i + 1][0] == '-' && av[i + 1][1] == '-') { @@ -20399,17 +21728,6 @@ int main(int ac, char **av) incr = 1; } } - if ((aret = argcmp(next_a, "DeviceName")) == 0 || aret == '=' ) { - char *eq_ptr = strchr(next_a, '='); - if (eq_ptr) { - TRY((!*eq_ptr), "DeviceName argument missing\n"); - aa = eq_ptr + 1; - incr = 1; - } - TRY(!aa, "DeviceName argument missing\n"); - s->device_name = aa; // string string - - } else if ((aret = argcmp(next_a, "DryRun")) == 0 || aret == '=' ) { char *eq_ptr = strchr(next_a, '='); if (eq_ptr) { @@ -20426,36 +21744,82 @@ int main(int ac, char **av) BAD_RET("DryRun require true/false\n"); } } else - if ((aret = argcmp(next_a, "VmId")) == 0 || aret == '=' ) { - char *eq_ptr = strchr(next_a, '='); - if (eq_ptr) { - TRY((!*eq_ptr), "VmId argument missing\n"); - aa = eq_ptr + 1; - incr = 1; - } - TRY(!aa, "VmId argument missing\n"); - s->vm_id = aa; // string string - - } else - if ((aret = argcmp(next_a, "VolumeId")) == 0 || aret == '=' ) { + if ((aret = argcmp(next_a, "Filters")) == 0 || aret == '=' ) { char *eq_ptr = strchr(next_a, '='); if (eq_ptr) { - TRY((!*eq_ptr), "VolumeId argument missing\n"); + TRY((!*eq_ptr), "Filters argument missing\n"); aa = eq_ptr + 1; incr = 1; } - TRY(!aa, "VolumeId argument missing\n"); - s->volume_id = aa; // string string + char *dot_pos; + TRY(!aa, "Filters argument missing\n"); + dot_pos = strchr(str, '.'); + if (dot_pos++) { + cascade_struct = &s->filters; + cascade_parser = filters_api_log_parser; + if (*dot_pos == '.') { + ++dot_pos; + } + STRY(filters_api_log_parser(&s->filters, dot_pos, aa, pa)); + s->is_set_filters = 1; + } else { + s->filters_str = aa; + } + } else + if ((aret = argcmp(next_a, "NextPageToken")) == 0 || aret == '=' ) { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "NextPageToken argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + TRY(!aa, "NextPageToken argument missing\n"); + s->next_page_token = aa; // string string + + } else + if ((aret = argcmp(next_a, "ResultsPerPage")) == 0 || aret == '=' ) { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "ResultsPerPage argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + TRY(!aa, "ResultsPerPage argument missing\n"); + s->is_set_results_per_page = 1; + s->results_per_page = atoi(aa); + } else + if ((aret = argcmp(next_a, "With")) == 0 || aret == '=' ) { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "With argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + char *dot_pos; + + TRY(!aa, "With argument missing\n"); + dot_pos = strchr(str, '.'); + if (dot_pos++) { + cascade_struct = &s->with; + cascade_parser = with_parser; + if (*dot_pos == '.') { + ++dot_pos; + } + STRY(with_parser(&s->with, dot_pos, aa, pa)); + s->is_set_with = 1; + } else { + s->with_str = aa; + } } else { - BAD_RET("'%s' is not a valide argument for 'LinkVolume'\n", next_a); + BAD_RET("'%s' is not a valide argument for 'ReadApiLogs'\n", next_a); } i += incr; - goto link_volume_arg; + goto read_api_logs_arg; } - cret = osc_link_volume(&e, &r, &a); - TRY(cret, "fail to call LinkVolume: %s\n", curl_easy_strerror(cret)); + cret = osc_read_api_logs(&e, &r, &a); + TRY(cret, "fail to call ReadApiLogs: %s\n", curl_easy_strerror(cret)); CHK_BAD_RET(!r.buf, "connection sucessful, but empty responce\n"); if (program_flag & OAPI_RAW_OUTPUT) puts(r.buf); @@ -20468,19 +21832,19 @@ int main(int ac, char **av) } osc_deinit_str(&r); } else - if (!strcmp("LinkVirtualGateway", av[i])) { + if (!strcmp("ReadApiAccessRules", av[i])) { json_object *jobj; auto_ptr_array struct ptr_array opa = {0}; struct ptr_array *pa = &opa; - struct osc_link_virtual_gateway_arg a = {0}; - struct osc_link_virtual_gateway_arg *s = &a; + struct osc_read_api_access_rules_arg a = {0}; + struct osc_read_api_access_rules_arg *s = &a; __attribute__((cleanup(files_cnt_cleanup))) char *files_cnt[MAX_FILES_PER_CMD] = {NULL}; int cret; cascade_struct = NULL; cascade_parser = NULL; - link_virtual_gateway_arg: + read_api_access_rules_arg: if (i + 1 < ac && av[i + 1][0] == '.' && av[i + 1][1] == '.') { char *next_a = &av[i + 1][2]; @@ -20498,7 +21862,7 @@ int main(int ac, char **av) } STRY(cascade_parser(cascade_struct, next_a, aa, pa)); i += incr; - goto link_virtual_gateway_arg; + goto read_api_access_rules_arg; } if (i + 1 < ac && av[i + 1][0] == '-' && av[i + 1][1] == '-') { @@ -20535,36 +21899,37 @@ int main(int ac, char **av) BAD_RET("DryRun require true/false\n"); } } else - if ((aret = argcmp(next_a, "NetId")) == 0 || aret == '=' ) { - char *eq_ptr = strchr(next_a, '='); - if (eq_ptr) { - TRY((!*eq_ptr), "NetId argument missing\n"); - aa = eq_ptr + 1; - incr = 1; - } - TRY(!aa, "NetId argument missing\n"); - s->net_id = aa; // string string - - } else - if ((aret = argcmp(next_a, "VirtualGatewayId")) == 0 || aret == '=' ) { + if ((aret = argcmp(next_a, "Filters")) == 0 || aret == '=' ) { char *eq_ptr = strchr(next_a, '='); if (eq_ptr) { - TRY((!*eq_ptr), "VirtualGatewayId argument missing\n"); + TRY((!*eq_ptr), "Filters argument missing\n"); aa = eq_ptr + 1; incr = 1; } - TRY(!aa, "VirtualGatewayId argument missing\n"); - s->virtual_gateway_id = aa; // string string + char *dot_pos; + TRY(!aa, "Filters argument missing\n"); + dot_pos = strchr(str, '.'); + if (dot_pos++) { + cascade_struct = &s->filters; + cascade_parser = filters_api_access_rule_parser; + if (*dot_pos == '.') { + ++dot_pos; + } + STRY(filters_api_access_rule_parser(&s->filters, dot_pos, aa, pa)); + s->is_set_filters = 1; + } else { + s->filters_str = aa; + } } else { - BAD_RET("'%s' is not a valide argument for 'LinkVirtualGateway'\n", next_a); + BAD_RET("'%s' is not a valide argument for 'ReadApiAccessRules'\n", next_a); } i += incr; - goto link_virtual_gateway_arg; + goto read_api_access_rules_arg; } - cret = osc_link_virtual_gateway(&e, &r, &a); - TRY(cret, "fail to call LinkVirtualGateway: %s\n", curl_easy_strerror(cret)); + cret = osc_read_api_access_rules(&e, &r, &a); + TRY(cret, "fail to call ReadApiAccessRules: %s\n", curl_easy_strerror(cret)); CHK_BAD_RET(!r.buf, "connection sucessful, but empty responce\n"); if (program_flag & OAPI_RAW_OUTPUT) puts(r.buf); @@ -20577,19 +21942,19 @@ int main(int ac, char **av) } osc_deinit_str(&r); } else - if (!strcmp("LinkRouteTable", av[i])) { + if (!strcmp("ReadApiAccessPolicy", av[i])) { json_object *jobj; auto_ptr_array struct ptr_array opa = {0}; struct ptr_array *pa = &opa; - struct osc_link_route_table_arg a = {0}; - struct osc_link_route_table_arg *s = &a; + struct osc_read_api_access_policy_arg a = {0}; + struct osc_read_api_access_policy_arg *s = &a; __attribute__((cleanup(files_cnt_cleanup))) char *files_cnt[MAX_FILES_PER_CMD] = {NULL}; int cret; cascade_struct = NULL; cascade_parser = NULL; - link_route_table_arg: + read_api_access_policy_arg: if (i + 1 < ac && av[i + 1][0] == '.' && av[i + 1][1] == '.') { char *next_a = &av[i + 1][2]; @@ -20607,7 +21972,7 @@ int main(int ac, char **av) } STRY(cascade_parser(cascade_struct, next_a, aa, pa)); i += incr; - goto link_route_table_arg; + goto read_api_access_policy_arg; } if (i + 1 < ac && av[i + 1][0] == '-' && av[i + 1][1] == '-') { @@ -20644,36 +22009,14 @@ int main(int ac, char **av) BAD_RET("DryRun require true/false\n"); } } else - if ((aret = argcmp(next_a, "RouteTableId")) == 0 || aret == '=' ) { - char *eq_ptr = strchr(next_a, '='); - if (eq_ptr) { - TRY((!*eq_ptr), "RouteTableId argument missing\n"); - aa = eq_ptr + 1; - incr = 1; - } - TRY(!aa, "RouteTableId argument missing\n"); - s->route_table_id = aa; // string string - - } else - if ((aret = argcmp(next_a, "SubnetId")) == 0 || aret == '=' ) { - char *eq_ptr = strchr(next_a, '='); - if (eq_ptr) { - TRY((!*eq_ptr), "SubnetId argument missing\n"); - aa = eq_ptr + 1; - incr = 1; - } - TRY(!aa, "SubnetId argument missing\n"); - s->subnet_id = aa; // string string - - } else { - BAD_RET("'%s' is not a valide argument for 'LinkRouteTable'\n", next_a); + BAD_RET("'%s' is not a valide argument for 'ReadApiAccessPolicy'\n", next_a); } i += incr; - goto link_route_table_arg; + goto read_api_access_policy_arg; } - cret = osc_link_route_table(&e, &r, &a); - TRY(cret, "fail to call LinkRouteTable: %s\n", curl_easy_strerror(cret)); + cret = osc_read_api_access_policy(&e, &r, &a); + TRY(cret, "fail to call ReadApiAccessPolicy: %s\n", curl_easy_strerror(cret)); CHK_BAD_RET(!r.buf, "connection sucessful, but empty responce\n"); if (program_flag & OAPI_RAW_OUTPUT) puts(r.buf); @@ -20686,19 +22029,19 @@ int main(int ac, char **av) } osc_deinit_str(&r); } else - if (!strcmp("LinkPublicIp", av[i])) { + if (!strcmp("ReadAdminPassword", av[i])) { json_object *jobj; auto_ptr_array struct ptr_array opa = {0}; struct ptr_array *pa = &opa; - struct osc_link_public_ip_arg a = {0}; - struct osc_link_public_ip_arg *s = &a; + struct osc_read_admin_password_arg a = {0}; + struct osc_read_admin_password_arg *s = &a; __attribute__((cleanup(files_cnt_cleanup))) char *files_cnt[MAX_FILES_PER_CMD] = {NULL}; int cret; cascade_struct = NULL; cascade_parser = NULL; - link_public_ip_arg: + read_admin_password_arg: if (i + 1 < ac && av[i + 1][0] == '.' && av[i + 1][1] == '.') { char *next_a = &av[i + 1][2]; @@ -20716,7 +22059,7 @@ int main(int ac, char **av) } STRY(cascade_parser(cascade_struct, next_a, aa, pa)); i += incr; - goto link_public_ip_arg; + goto read_admin_password_arg; } if (i + 1 < ac && av[i + 1][0] == '-' && av[i + 1][1] == '-') { @@ -20737,22 +22080,6 @@ int main(int ac, char **av) incr = 1; } } - if ((aret = argcmp(next_a, "AllowRelink")) == 0 || aret == '=' ) { - char *eq_ptr = strchr(next_a, '='); - if (eq_ptr) { - TRY((!*eq_ptr), "AllowRelink argument missing\n"); - aa = eq_ptr + 1; - incr = 1; - } - s->is_set_allow_relink = 1; - if (!aa || !strcasecmp(aa, "true")) { - s->allow_relink = 1; - } else if (!strcasecmp(aa, "false")) { - s->allow_relink = 0; - } else { - BAD_RET("AllowRelink require true/false\n"); - } - } else if ((aret = argcmp(next_a, "DryRun")) == 0 || aret == '=' ) { char *eq_ptr = strchr(next_a, '='); if (eq_ptr) { @@ -20769,50 +22096,6 @@ int main(int ac, char **av) BAD_RET("DryRun require true/false\n"); } } else - if ((aret = argcmp(next_a, "NicId")) == 0 || aret == '=' ) { - char *eq_ptr = strchr(next_a, '='); - if (eq_ptr) { - TRY((!*eq_ptr), "NicId argument missing\n"); - aa = eq_ptr + 1; - incr = 1; - } - TRY(!aa, "NicId argument missing\n"); - s->nic_id = aa; // string string - - } else - if ((aret = argcmp(next_a, "PrivateIp")) == 0 || aret == '=' ) { - char *eq_ptr = strchr(next_a, '='); - if (eq_ptr) { - TRY((!*eq_ptr), "PrivateIp argument missing\n"); - aa = eq_ptr + 1; - incr = 1; - } - TRY(!aa, "PrivateIp argument missing\n"); - s->private_ip = aa; // string string - - } else - if ((aret = argcmp(next_a, "PublicIp")) == 0 || aret == '=' ) { - char *eq_ptr = strchr(next_a, '='); - if (eq_ptr) { - TRY((!*eq_ptr), "PublicIp argument missing\n"); - aa = eq_ptr + 1; - incr = 1; - } - TRY(!aa, "PublicIp argument missing\n"); - s->public_ip = aa; // string string - - } else - if ((aret = argcmp(next_a, "PublicIpId")) == 0 || aret == '=' ) { - char *eq_ptr = strchr(next_a, '='); - if (eq_ptr) { - TRY((!*eq_ptr), "PublicIpId argument missing\n"); - aa = eq_ptr + 1; - incr = 1; - } - TRY(!aa, "PublicIpId argument missing\n"); - s->public_ip_id = aa; // string string - - } else if ((aret = argcmp(next_a, "VmId")) == 0 || aret == '=' ) { char *eq_ptr = strchr(next_a, '='); if (eq_ptr) { @@ -20825,13 +22108,13 @@ int main(int ac, char **av) } else { - BAD_RET("'%s' is not a valide argument for 'LinkPublicIp'\n", next_a); + BAD_RET("'%s' is not a valide argument for 'ReadAdminPassword'\n", next_a); } i += incr; - goto link_public_ip_arg; + goto read_admin_password_arg; } - cret = osc_link_public_ip(&e, &r, &a); - TRY(cret, "fail to call LinkPublicIp: %s\n", curl_easy_strerror(cret)); + cret = osc_read_admin_password(&e, &r, &a); + TRY(cret, "fail to call ReadAdminPassword: %s\n", curl_easy_strerror(cret)); CHK_BAD_RET(!r.buf, "connection sucessful, but empty responce\n"); if (program_flag & OAPI_RAW_OUTPUT) puts(r.buf); @@ -20844,19 +22127,19 @@ int main(int ac, char **av) } osc_deinit_str(&r); } else - if (!strcmp("LinkPrivateIps", av[i])) { + if (!strcmp("ReadAccounts", av[i])) { json_object *jobj; auto_ptr_array struct ptr_array opa = {0}; struct ptr_array *pa = &opa; - struct osc_link_private_ips_arg a = {0}; - struct osc_link_private_ips_arg *s = &a; + struct osc_read_accounts_arg a = {0}; + struct osc_read_accounts_arg *s = &a; __attribute__((cleanup(files_cnt_cleanup))) char *files_cnt[MAX_FILES_PER_CMD] = {NULL}; int cret; cascade_struct = NULL; cascade_parser = NULL; - link_private_ips_arg: + read_accounts_arg: if (i + 1 < ac && av[i + 1][0] == '.' && av[i + 1][1] == '.') { char *next_a = &av[i + 1][2]; @@ -20874,7 +22157,7 @@ int main(int ac, char **av) } STRY(cascade_parser(cascade_struct, next_a, aa, pa)); i += incr; - goto link_private_ips_arg; + goto read_accounts_arg; } if (i + 1 < ac && av[i + 1][0] == '-' && av[i + 1][1] == '-') { @@ -20895,81 +22178,30 @@ int main(int ac, char **av) incr = 1; } } - if ((aret = argcmp(next_a, "AllowRelink")) == 0 || aret == '=' ) { + if ((aret = argcmp(next_a, "DryRun")) == 0 || aret == '=' ) { char *eq_ptr = strchr(next_a, '='); if (eq_ptr) { - TRY((!*eq_ptr), "AllowRelink argument missing\n"); + TRY((!*eq_ptr), "DryRun argument missing\n"); aa = eq_ptr + 1; incr = 1; } - s->is_set_allow_relink = 1; + s->is_set_dry_run = 1; if (!aa || !strcasecmp(aa, "true")) { - s->allow_relink = 1; + s->dry_run = 1; } else if (!strcasecmp(aa, "false")) { - s->allow_relink = 0; + s->dry_run = 0; } else { - BAD_RET("AllowRelink require true/false\n"); + BAD_RET("DryRun require true/false\n"); } } else - if ((aret = argcmp(next_a, "DryRun")) == 0 || aret == '=' ) { - char *eq_ptr = strchr(next_a, '='); - if (eq_ptr) { - TRY((!*eq_ptr), "DryRun argument missing\n"); - aa = eq_ptr + 1; - incr = 1; - } - s->is_set_dry_run = 1; - if (!aa || !strcasecmp(aa, "true")) { - s->dry_run = 1; - } else if (!strcasecmp(aa, "false")) { - s->dry_run = 0; - } else { - BAD_RET("DryRun require true/false\n"); - } - } else - if ((aret = argcmp(next_a, "NicId")) == 0 || aret == '=' ) { - char *eq_ptr = strchr(next_a, '='); - if (eq_ptr) { - TRY((!*eq_ptr), "NicId argument missing\n"); - aa = eq_ptr + 1; - incr = 1; - } - TRY(!aa, "NicId argument missing\n"); - s->nic_id = aa; // string string - - } else - if ((aret = argcmp(next_a, "PrivateIps")) == 0 || aret == '=' ) { - char *eq_ptr = strchr(next_a, '='); - if (eq_ptr) { - TRY((!*eq_ptr), "PrivateIps argument missing\n"); - aa = eq_ptr + 1; - incr = 1; - } - TRY(!aa, "PrivateIps argument missing\n"); - s->private_ips_str = aa; - } else if (!(aret = strcmp(str, "PrivateIps[]")) || aret == '=') { - TRY(!aa, "PrivateIps[] argument missing\n"); - SET_NEXT(s->private_ips, (aa), pa); - } else - if ((aret = argcmp(next_a, "SecondaryPrivateIpCount")) == 0 || aret == '=' ) { - char *eq_ptr = strchr(next_a, '='); - if (eq_ptr) { - TRY((!*eq_ptr), "SecondaryPrivateIpCount argument missing\n"); - aa = eq_ptr + 1; - incr = 1; - } - TRY(!aa, "SecondaryPrivateIpCount argument missing\n"); - s->is_set_secondary_private_ip_count = 1; - s->secondary_private_ip_count = atoi(aa); - } else { - BAD_RET("'%s' is not a valide argument for 'LinkPrivateIps'\n", next_a); + BAD_RET("'%s' is not a valide argument for 'ReadAccounts'\n", next_a); } i += incr; - goto link_private_ips_arg; + goto read_accounts_arg; } - cret = osc_link_private_ips(&e, &r, &a); - TRY(cret, "fail to call LinkPrivateIps: %s\n", curl_easy_strerror(cret)); + cret = osc_read_accounts(&e, &r, &a); + TRY(cret, "fail to call ReadAccounts: %s\n", curl_easy_strerror(cret)); CHK_BAD_RET(!r.buf, "connection sucessful, but empty responce\n"); if (program_flag & OAPI_RAW_OUTPUT) puts(r.buf); @@ -20982,19 +22214,19 @@ int main(int ac, char **av) } osc_deinit_str(&r); } else - if (!strcmp("LinkNic", av[i])) { + if (!strcmp("ReadAccessKeys", av[i])) { json_object *jobj; auto_ptr_array struct ptr_array opa = {0}; struct ptr_array *pa = &opa; - struct osc_link_nic_arg a = {0}; - struct osc_link_nic_arg *s = &a; + struct osc_read_access_keys_arg a = {0}; + struct osc_read_access_keys_arg *s = &a; __attribute__((cleanup(files_cnt_cleanup))) char *files_cnt[MAX_FILES_PER_CMD] = {NULL}; int cret; cascade_struct = NULL; cascade_parser = NULL; - link_nic_arg: + read_access_keys_arg: if (i + 1 < ac && av[i + 1][0] == '.' && av[i + 1][1] == '.') { char *next_a = &av[i + 1][2]; @@ -21012,7 +22244,7 @@ int main(int ac, char **av) } STRY(cascade_parser(cascade_struct, next_a, aa, pa)); i += incr; - goto link_nic_arg; + goto read_access_keys_arg; } if (i + 1 < ac && av[i + 1][0] == '-' && av[i + 1][1] == '-') { @@ -21033,17 +22265,6 @@ int main(int ac, char **av) incr = 1; } } - if ((aret = argcmp(next_a, "DeviceNumber")) == 0 || aret == '=' ) { - char *eq_ptr = strchr(next_a, '='); - if (eq_ptr) { - TRY((!*eq_ptr), "DeviceNumber argument missing\n"); - aa = eq_ptr + 1; - incr = 1; - } - TRY(!aa, "DeviceNumber argument missing\n"); - s->is_set_device_number = 1; - s->device_number = atoi(aa); - } else if ((aret = argcmp(next_a, "DryRun")) == 0 || aret == '=' ) { char *eq_ptr = strchr(next_a, '='); if (eq_ptr) { @@ -21060,36 +22281,48 @@ int main(int ac, char **av) BAD_RET("DryRun require true/false\n"); } } else - if ((aret = argcmp(next_a, "NicId")) == 0 || aret == '=' ) { + if ((aret = argcmp(next_a, "Filters")) == 0 || aret == '=' ) { char *eq_ptr = strchr(next_a, '='); if (eq_ptr) { - TRY((!*eq_ptr), "NicId argument missing\n"); + TRY((!*eq_ptr), "Filters argument missing\n"); aa = eq_ptr + 1; incr = 1; } - TRY(!aa, "NicId argument missing\n"); - s->nic_id = aa; // string string + char *dot_pos; + TRY(!aa, "Filters argument missing\n"); + dot_pos = strchr(str, '.'); + if (dot_pos++) { + cascade_struct = &s->filters; + cascade_parser = filters_access_keys_parser; + if (*dot_pos == '.') { + ++dot_pos; + } + STRY(filters_access_keys_parser(&s->filters, dot_pos, aa, pa)); + s->is_set_filters = 1; + } else { + s->filters_str = aa; + } } else - if ((aret = argcmp(next_a, "VmId")) == 0 || aret == '=' ) { + if ((aret = argcmp(next_a, "UserName")) == 0 || aret == '=' ) { char *eq_ptr = strchr(next_a, '='); if (eq_ptr) { - TRY((!*eq_ptr), "VmId argument missing\n"); + TRY((!*eq_ptr), "UserName argument missing\n"); aa = eq_ptr + 1; incr = 1; } - TRY(!aa, "VmId argument missing\n"); - s->vm_id = aa; // string string + TRY(!aa, "UserName argument missing\n"); + s->user_name = aa; // string string } else { - BAD_RET("'%s' is not a valide argument for 'LinkNic'\n", next_a); + BAD_RET("'%s' is not a valide argument for 'ReadAccessKeys'\n", next_a); } i += incr; - goto link_nic_arg; + goto read_access_keys_arg; } - cret = osc_link_nic(&e, &r, &a); - TRY(cret, "fail to call LinkNic: %s\n", curl_easy_strerror(cret)); + cret = osc_read_access_keys(&e, &r, &a); + TRY(cret, "fail to call ReadAccessKeys: %s\n", curl_easy_strerror(cret)); CHK_BAD_RET(!r.buf, "connection sucessful, but empty responce\n"); if (program_flag & OAPI_RAW_OUTPUT) puts(r.buf); @@ -21102,19 +22335,19 @@ int main(int ac, char **av) } osc_deinit_str(&r); } else - if (!strcmp("LinkLoadBalancerBackendMachines", av[i])) { + if (!strcmp("LinkVolume", av[i])) { json_object *jobj; auto_ptr_array struct ptr_array opa = {0}; struct ptr_array *pa = &opa; - struct osc_link_load_balancer_backend_machines_arg a = {0}; - struct osc_link_load_balancer_backend_machines_arg *s = &a; + struct osc_link_volume_arg a = {0}; + struct osc_link_volume_arg *s = &a; __attribute__((cleanup(files_cnt_cleanup))) char *files_cnt[MAX_FILES_PER_CMD] = {NULL}; int cret; cascade_struct = NULL; cascade_parser = NULL; - link_load_balancer_backend_machines_arg: + link_volume_arg: if (i + 1 < ac && av[i + 1][0] == '.' && av[i + 1][1] == '.') { char *next_a = &av[i + 1][2]; @@ -21132,7 +22365,7 @@ int main(int ac, char **av) } STRY(cascade_parser(cascade_struct, next_a, aa, pa)); i += incr; - goto link_load_balancer_backend_machines_arg; + goto link_volume_arg; } if (i + 1 < ac && av[i + 1][0] == '-' && av[i + 1][1] == '-') { @@ -21153,31 +22386,16 @@ int main(int ac, char **av) incr = 1; } } - if ((aret = argcmp(next_a, "BackendIps")) == 0 || aret == '=' ) { - char *eq_ptr = strchr(next_a, '='); - if (eq_ptr) { - TRY((!*eq_ptr), "BackendIps argument missing\n"); - aa = eq_ptr + 1; - incr = 1; - } - TRY(!aa, "BackendIps argument missing\n"); - s->backend_ips_str = aa; - } else if (!(aret = strcmp(str, "BackendIps[]")) || aret == '=') { - TRY(!aa, "BackendIps[] argument missing\n"); - SET_NEXT(s->backend_ips, (aa), pa); - } else - if ((aret = argcmp(next_a, "BackendVmIds")) == 0 || aret == '=' ) { + if ((aret = argcmp(next_a, "DeviceName")) == 0 || aret == '=' ) { char *eq_ptr = strchr(next_a, '='); if (eq_ptr) { - TRY((!*eq_ptr), "BackendVmIds argument missing\n"); + TRY((!*eq_ptr), "DeviceName argument missing\n"); aa = eq_ptr + 1; incr = 1; } - TRY(!aa, "BackendVmIds argument missing\n"); - s->backend_vm_ids_str = aa; - } else if (!(aret = strcmp(str, "BackendVmIds[]")) || aret == '=') { - TRY(!aa, "BackendVmIds[] argument missing\n"); - SET_NEXT(s->backend_vm_ids, (aa), pa); + TRY(!aa, "DeviceName argument missing\n"); + s->device_name = aa; // string string + } else if ((aret = argcmp(next_a, "DryRun")) == 0 || aret == '=' ) { char *eq_ptr = strchr(next_a, '='); @@ -21195,25 +22413,36 @@ int main(int ac, char **av) BAD_RET("DryRun require true/false\n"); } } else - if ((aret = argcmp(next_a, "LoadBalancerName")) == 0 || aret == '=' ) { + if ((aret = argcmp(next_a, "VmId")) == 0 || aret == '=' ) { char *eq_ptr = strchr(next_a, '='); if (eq_ptr) { - TRY((!*eq_ptr), "LoadBalancerName argument missing\n"); + TRY((!*eq_ptr), "VmId argument missing\n"); aa = eq_ptr + 1; incr = 1; } - TRY(!aa, "LoadBalancerName argument missing\n"); - s->load_balancer_name = aa; // string string + TRY(!aa, "VmId argument missing\n"); + s->vm_id = aa; // string string + + } else + if ((aret = argcmp(next_a, "VolumeId")) == 0 || aret == '=' ) { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "VolumeId argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + TRY(!aa, "VolumeId argument missing\n"); + s->volume_id = aa; // string string } else { - BAD_RET("'%s' is not a valide argument for 'LinkLoadBalancerBackendMachines'\n", next_a); + BAD_RET("'%s' is not a valide argument for 'LinkVolume'\n", next_a); } i += incr; - goto link_load_balancer_backend_machines_arg; + goto link_volume_arg; } - cret = osc_link_load_balancer_backend_machines(&e, &r, &a); - TRY(cret, "fail to call LinkLoadBalancerBackendMachines: %s\n", curl_easy_strerror(cret)); + cret = osc_link_volume(&e, &r, &a); + TRY(cret, "fail to call LinkVolume: %s\n", curl_easy_strerror(cret)); CHK_BAD_RET(!r.buf, "connection sucessful, but empty responce\n"); if (program_flag & OAPI_RAW_OUTPUT) puts(r.buf); @@ -21226,19 +22455,19 @@ int main(int ac, char **av) } osc_deinit_str(&r); } else - if (!strcmp("LinkInternetService", av[i])) { + if (!strcmp("LinkVirtualGateway", av[i])) { json_object *jobj; auto_ptr_array struct ptr_array opa = {0}; struct ptr_array *pa = &opa; - struct osc_link_internet_service_arg a = {0}; - struct osc_link_internet_service_arg *s = &a; + struct osc_link_virtual_gateway_arg a = {0}; + struct osc_link_virtual_gateway_arg *s = &a; __attribute__((cleanup(files_cnt_cleanup))) char *files_cnt[MAX_FILES_PER_CMD] = {NULL}; int cret; cascade_struct = NULL; cascade_parser = NULL; - link_internet_service_arg: + link_virtual_gateway_arg: if (i + 1 < ac && av[i + 1][0] == '.' && av[i + 1][1] == '.') { char *next_a = &av[i + 1][2]; @@ -21256,7 +22485,7 @@ int main(int ac, char **av) } STRY(cascade_parser(cascade_struct, next_a, aa, pa)); i += incr; - goto link_internet_service_arg; + goto link_virtual_gateway_arg; } if (i + 1 < ac && av[i + 1][0] == '-' && av[i + 1][1] == '-') { @@ -21293,36 +22522,36 @@ int main(int ac, char **av) BAD_RET("DryRun require true/false\n"); } } else - if ((aret = argcmp(next_a, "InternetServiceId")) == 0 || aret == '=' ) { + if ((aret = argcmp(next_a, "NetId")) == 0 || aret == '=' ) { char *eq_ptr = strchr(next_a, '='); if (eq_ptr) { - TRY((!*eq_ptr), "InternetServiceId argument missing\n"); + TRY((!*eq_ptr), "NetId argument missing\n"); aa = eq_ptr + 1; incr = 1; } - TRY(!aa, "InternetServiceId argument missing\n"); - s->internet_service_id = aa; // string string + TRY(!aa, "NetId argument missing\n"); + s->net_id = aa; // string string } else - if ((aret = argcmp(next_a, "NetId")) == 0 || aret == '=' ) { + if ((aret = argcmp(next_a, "VirtualGatewayId")) == 0 || aret == '=' ) { char *eq_ptr = strchr(next_a, '='); if (eq_ptr) { - TRY((!*eq_ptr), "NetId argument missing\n"); + TRY((!*eq_ptr), "VirtualGatewayId argument missing\n"); aa = eq_ptr + 1; incr = 1; } - TRY(!aa, "NetId argument missing\n"); - s->net_id = aa; // string string + TRY(!aa, "VirtualGatewayId argument missing\n"); + s->virtual_gateway_id = aa; // string string } else { - BAD_RET("'%s' is not a valide argument for 'LinkInternetService'\n", next_a); + BAD_RET("'%s' is not a valide argument for 'LinkVirtualGateway'\n", next_a); } i += incr; - goto link_internet_service_arg; + goto link_virtual_gateway_arg; } - cret = osc_link_internet_service(&e, &r, &a); - TRY(cret, "fail to call LinkInternetService: %s\n", curl_easy_strerror(cret)); + cret = osc_link_virtual_gateway(&e, &r, &a); + TRY(cret, "fail to call LinkVirtualGateway: %s\n", curl_easy_strerror(cret)); CHK_BAD_RET(!r.buf, "connection sucessful, but empty responce\n"); if (program_flag & OAPI_RAW_OUTPUT) puts(r.buf); @@ -21335,19 +22564,19 @@ int main(int ac, char **av) } osc_deinit_str(&r); } else - if (!strcmp("LinkFlexibleGpu", av[i])) { + if (!strcmp("LinkRouteTable", av[i])) { json_object *jobj; auto_ptr_array struct ptr_array opa = {0}; struct ptr_array *pa = &opa; - struct osc_link_flexible_gpu_arg a = {0}; - struct osc_link_flexible_gpu_arg *s = &a; + struct osc_link_route_table_arg a = {0}; + struct osc_link_route_table_arg *s = &a; __attribute__((cleanup(files_cnt_cleanup))) char *files_cnt[MAX_FILES_PER_CMD] = {NULL}; int cret; cascade_struct = NULL; cascade_parser = NULL; - link_flexible_gpu_arg: + link_route_table_arg: if (i + 1 < ac && av[i + 1][0] == '.' && av[i + 1][1] == '.') { char *next_a = &av[i + 1][2]; @@ -21365,7 +22594,7 @@ int main(int ac, char **av) } STRY(cascade_parser(cascade_struct, next_a, aa, pa)); i += incr; - goto link_flexible_gpu_arg; + goto link_route_table_arg; } if (i + 1 < ac && av[i + 1][0] == '-' && av[i + 1][1] == '-') { @@ -21402,36 +22631,36 @@ int main(int ac, char **av) BAD_RET("DryRun require true/false\n"); } } else - if ((aret = argcmp(next_a, "FlexibleGpuId")) == 0 || aret == '=' ) { + if ((aret = argcmp(next_a, "RouteTableId")) == 0 || aret == '=' ) { char *eq_ptr = strchr(next_a, '='); if (eq_ptr) { - TRY((!*eq_ptr), "FlexibleGpuId argument missing\n"); + TRY((!*eq_ptr), "RouteTableId argument missing\n"); aa = eq_ptr + 1; incr = 1; } - TRY(!aa, "FlexibleGpuId argument missing\n"); - s->flexible_gpu_id = aa; // string string + TRY(!aa, "RouteTableId argument missing\n"); + s->route_table_id = aa; // string string } else - if ((aret = argcmp(next_a, "VmId")) == 0 || aret == '=' ) { + if ((aret = argcmp(next_a, "SubnetId")) == 0 || aret == '=' ) { char *eq_ptr = strchr(next_a, '='); if (eq_ptr) { - TRY((!*eq_ptr), "VmId argument missing\n"); + TRY((!*eq_ptr), "SubnetId argument missing\n"); aa = eq_ptr + 1; incr = 1; } - TRY(!aa, "VmId argument missing\n"); - s->vm_id = aa; // string string + TRY(!aa, "SubnetId argument missing\n"); + s->subnet_id = aa; // string string } else { - BAD_RET("'%s' is not a valide argument for 'LinkFlexibleGpu'\n", next_a); + BAD_RET("'%s' is not a valide argument for 'LinkRouteTable'\n", next_a); } i += incr; - goto link_flexible_gpu_arg; + goto link_route_table_arg; } - cret = osc_link_flexible_gpu(&e, &r, &a); - TRY(cret, "fail to call LinkFlexibleGpu: %s\n", curl_easy_strerror(cret)); + cret = osc_link_route_table(&e, &r, &a); + TRY(cret, "fail to call LinkRouteTable: %s\n", curl_easy_strerror(cret)); CHK_BAD_RET(!r.buf, "connection sucessful, but empty responce\n"); if (program_flag & OAPI_RAW_OUTPUT) puts(r.buf); @@ -21444,19 +22673,19 @@ int main(int ac, char **av) } osc_deinit_str(&r); } else - if (!strcmp("DeregisterVmsInLoadBalancer", av[i])) { + if (!strcmp("LinkPublicIp", av[i])) { json_object *jobj; auto_ptr_array struct ptr_array opa = {0}; struct ptr_array *pa = &opa; - struct osc_deregister_vms_in_load_balancer_arg a = {0}; - struct osc_deregister_vms_in_load_balancer_arg *s = &a; + struct osc_link_public_ip_arg a = {0}; + struct osc_link_public_ip_arg *s = &a; __attribute__((cleanup(files_cnt_cleanup))) char *files_cnt[MAX_FILES_PER_CMD] = {NULL}; int cret; cascade_struct = NULL; cascade_parser = NULL; - deregister_vms_in_load_balancer_arg: + link_public_ip_arg: if (i + 1 < ac && av[i + 1][0] == '.' && av[i + 1][1] == '.') { char *next_a = &av[i + 1][2]; @@ -21474,7 +22703,7 @@ int main(int ac, char **av) } STRY(cascade_parser(cascade_struct, next_a, aa, pa)); i += incr; - goto deregister_vms_in_load_balancer_arg; + goto link_public_ip_arg; } if (i + 1 < ac && av[i + 1][0] == '-' && av[i + 1][1] == '-') { @@ -21495,19 +22724,22 @@ int main(int ac, char **av) incr = 1; } } - if ((aret = argcmp(next_a, "BackendVmIds")) == 0 || aret == '=' ) { + if ((aret = argcmp(next_a, "AllowRelink")) == 0 || aret == '=' ) { char *eq_ptr = strchr(next_a, '='); if (eq_ptr) { - TRY((!*eq_ptr), "BackendVmIds argument missing\n"); + TRY((!*eq_ptr), "AllowRelink argument missing\n"); aa = eq_ptr + 1; incr = 1; } - TRY(!aa, "BackendVmIds argument missing\n"); - s->backend_vm_ids_str = aa; - } else if (!(aret = strcmp(str, "BackendVmIds[]")) || aret == '=') { - TRY(!aa, "BackendVmIds[] argument missing\n"); - SET_NEXT(s->backend_vm_ids, (aa), pa); - } else + s->is_set_allow_relink = 1; + if (!aa || !strcasecmp(aa, "true")) { + s->allow_relink = 1; + } else if (!strcasecmp(aa, "false")) { + s->allow_relink = 0; + } else { + BAD_RET("AllowRelink require true/false\n"); + } + } else if ((aret = argcmp(next_a, "DryRun")) == 0 || aret == '=' ) { char *eq_ptr = strchr(next_a, '='); if (eq_ptr) { @@ -21524,25 +22756,69 @@ int main(int ac, char **av) BAD_RET("DryRun require true/false\n"); } } else - if ((aret = argcmp(next_a, "LoadBalancerName")) == 0 || aret == '=' ) { + if ((aret = argcmp(next_a, "NicId")) == 0 || aret == '=' ) { char *eq_ptr = strchr(next_a, '='); if (eq_ptr) { - TRY((!*eq_ptr), "LoadBalancerName argument missing\n"); + TRY((!*eq_ptr), "NicId argument missing\n"); aa = eq_ptr + 1; incr = 1; } - TRY(!aa, "LoadBalancerName argument missing\n"); - s->load_balancer_name = aa; // string string + TRY(!aa, "NicId argument missing\n"); + s->nic_id = aa; // string string + + } else + if ((aret = argcmp(next_a, "PrivateIp")) == 0 || aret == '=' ) { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "PrivateIp argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + TRY(!aa, "PrivateIp argument missing\n"); + s->private_ip = aa; // string string + + } else + if ((aret = argcmp(next_a, "PublicIp")) == 0 || aret == '=' ) { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "PublicIp argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + TRY(!aa, "PublicIp argument missing\n"); + s->public_ip = aa; // string string + + } else + if ((aret = argcmp(next_a, "PublicIpId")) == 0 || aret == '=' ) { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "PublicIpId argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + TRY(!aa, "PublicIpId argument missing\n"); + s->public_ip_id = aa; // string string + + } else + if ((aret = argcmp(next_a, "VmId")) == 0 || aret == '=' ) { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "VmId argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + TRY(!aa, "VmId argument missing\n"); + s->vm_id = aa; // string string } else { - BAD_RET("'%s' is not a valide argument for 'DeregisterVmsInLoadBalancer'\n", next_a); + BAD_RET("'%s' is not a valide argument for 'LinkPublicIp'\n", next_a); } i += incr; - goto deregister_vms_in_load_balancer_arg; + goto link_public_ip_arg; } - cret = osc_deregister_vms_in_load_balancer(&e, &r, &a); - TRY(cret, "fail to call DeregisterVmsInLoadBalancer: %s\n", curl_easy_strerror(cret)); + cret = osc_link_public_ip(&e, &r, &a); + TRY(cret, "fail to call LinkPublicIp: %s\n", curl_easy_strerror(cret)); CHK_BAD_RET(!r.buf, "connection sucessful, but empty responce\n"); if (program_flag & OAPI_RAW_OUTPUT) puts(r.buf); @@ -21555,19 +22831,19 @@ int main(int ac, char **av) } osc_deinit_str(&r); } else - if (!strcmp("DeleteVpnConnectionRoute", av[i])) { + if (!strcmp("LinkPrivateIps", av[i])) { json_object *jobj; auto_ptr_array struct ptr_array opa = {0}; struct ptr_array *pa = &opa; - struct osc_delete_vpn_connection_route_arg a = {0}; - struct osc_delete_vpn_connection_route_arg *s = &a; + struct osc_link_private_ips_arg a = {0}; + struct osc_link_private_ips_arg *s = &a; __attribute__((cleanup(files_cnt_cleanup))) char *files_cnt[MAX_FILES_PER_CMD] = {NULL}; int cret; cascade_struct = NULL; cascade_parser = NULL; - delete_vpn_connection_route_arg: + link_private_ips_arg: if (i + 1 < ac && av[i + 1][0] == '.' && av[i + 1][1] == '.') { char *next_a = &av[i + 1][2]; @@ -21585,7 +22861,7 @@ int main(int ac, char **av) } STRY(cascade_parser(cascade_struct, next_a, aa, pa)); i += incr; - goto delete_vpn_connection_route_arg; + goto link_private_ips_arg; } if (i + 1 < ac && av[i + 1][0] == '-' && av[i + 1][1] == '-') { @@ -21606,17 +22882,22 @@ int main(int ac, char **av) incr = 1; } } - if ((aret = argcmp(next_a, "DestinationIpRange")) == 0 || aret == '=' ) { + if ((aret = argcmp(next_a, "AllowRelink")) == 0 || aret == '=' ) { char *eq_ptr = strchr(next_a, '='); if (eq_ptr) { - TRY((!*eq_ptr), "DestinationIpRange argument missing\n"); + TRY((!*eq_ptr), "AllowRelink argument missing\n"); aa = eq_ptr + 1; incr = 1; } - TRY(!aa, "DestinationIpRange argument missing\n"); - s->destination_ip_range = aa; // string string - - } else + s->is_set_allow_relink = 1; + if (!aa || !strcasecmp(aa, "true")) { + s->allow_relink = 1; + } else if (!strcasecmp(aa, "false")) { + s->allow_relink = 0; + } else { + BAD_RET("AllowRelink require true/false\n"); + } + } else if ((aret = argcmp(next_a, "DryRun")) == 0 || aret == '=' ) { char *eq_ptr = strchr(next_a, '='); if (eq_ptr) { @@ -21633,25 +22914,49 @@ int main(int ac, char **av) BAD_RET("DryRun require true/false\n"); } } else - if ((aret = argcmp(next_a, "VpnConnectionId")) == 0 || aret == '=' ) { + if ((aret = argcmp(next_a, "NicId")) == 0 || aret == '=' ) { char *eq_ptr = strchr(next_a, '='); if (eq_ptr) { - TRY((!*eq_ptr), "VpnConnectionId argument missing\n"); + TRY((!*eq_ptr), "NicId argument missing\n"); aa = eq_ptr + 1; incr = 1; } - TRY(!aa, "VpnConnectionId argument missing\n"); - s->vpn_connection_id = aa; // string string + TRY(!aa, "NicId argument missing\n"); + s->nic_id = aa; // string string } else + if ((aret = argcmp(next_a, "PrivateIps")) == 0 || aret == '=' ) { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "PrivateIps argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + TRY(!aa, "PrivateIps argument missing\n"); + s->private_ips_str = aa; + } else if (!(aret = strcmp(str, "PrivateIps[]")) || aret == '=') { + TRY(!aa, "PrivateIps[] argument missing\n"); + SET_NEXT(s->private_ips, (aa), pa); + } else + if ((aret = argcmp(next_a, "SecondaryPrivateIpCount")) == 0 || aret == '=' ) { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "SecondaryPrivateIpCount argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + TRY(!aa, "SecondaryPrivateIpCount argument missing\n"); + s->is_set_secondary_private_ip_count = 1; + s->secondary_private_ip_count = atoi(aa); + } else { - BAD_RET("'%s' is not a valide argument for 'DeleteVpnConnectionRoute'\n", next_a); + BAD_RET("'%s' is not a valide argument for 'LinkPrivateIps'\n", next_a); } i += incr; - goto delete_vpn_connection_route_arg; + goto link_private_ips_arg; } - cret = osc_delete_vpn_connection_route(&e, &r, &a); - TRY(cret, "fail to call DeleteVpnConnectionRoute: %s\n", curl_easy_strerror(cret)); + cret = osc_link_private_ips(&e, &r, &a); + TRY(cret, "fail to call LinkPrivateIps: %s\n", curl_easy_strerror(cret)); CHK_BAD_RET(!r.buf, "connection sucessful, but empty responce\n"); if (program_flag & OAPI_RAW_OUTPUT) puts(r.buf); @@ -21664,19 +22969,19 @@ int main(int ac, char **av) } osc_deinit_str(&r); } else - if (!strcmp("DeleteVpnConnection", av[i])) { + if (!strcmp("LinkPolicy", av[i])) { json_object *jobj; auto_ptr_array struct ptr_array opa = {0}; struct ptr_array *pa = &opa; - struct osc_delete_vpn_connection_arg a = {0}; - struct osc_delete_vpn_connection_arg *s = &a; + struct osc_link_policy_arg a = {0}; + struct osc_link_policy_arg *s = &a; __attribute__((cleanup(files_cnt_cleanup))) char *files_cnt[MAX_FILES_PER_CMD] = {NULL}; int cret; cascade_struct = NULL; cascade_parser = NULL; - delete_vpn_connection_arg: + link_policy_arg: if (i + 1 < ac && av[i + 1][0] == '.' && av[i + 1][1] == '.') { char *next_a = &av[i + 1][2]; @@ -21694,7 +22999,7 @@ int main(int ac, char **av) } STRY(cascade_parser(cascade_struct, next_a, aa, pa)); i += incr; - goto delete_vpn_connection_arg; + goto link_policy_arg; } if (i + 1 < ac && av[i + 1][0] == '-' && av[i + 1][1] == '-') { @@ -21731,25 +23036,36 @@ int main(int ac, char **av) BAD_RET("DryRun require true/false\n"); } } else - if ((aret = argcmp(next_a, "VpnConnectionId")) == 0 || aret == '=' ) { + if ((aret = argcmp(next_a, "PolicyOrn")) == 0 || aret == '=' ) { char *eq_ptr = strchr(next_a, '='); if (eq_ptr) { - TRY((!*eq_ptr), "VpnConnectionId argument missing\n"); + TRY((!*eq_ptr), "PolicyOrn argument missing\n"); aa = eq_ptr + 1; incr = 1; } - TRY(!aa, "VpnConnectionId argument missing\n"); - s->vpn_connection_id = aa; // string string + TRY(!aa, "PolicyOrn argument missing\n"); + s->policy_orn = aa; // string string + + } else + if ((aret = argcmp(next_a, "UserName")) == 0 || aret == '=' ) { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "UserName argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + TRY(!aa, "UserName argument missing\n"); + s->user_name = aa; // string string } else { - BAD_RET("'%s' is not a valide argument for 'DeleteVpnConnection'\n", next_a); + BAD_RET("'%s' is not a valide argument for 'LinkPolicy'\n", next_a); } i += incr; - goto delete_vpn_connection_arg; + goto link_policy_arg; } - cret = osc_delete_vpn_connection(&e, &r, &a); - TRY(cret, "fail to call DeleteVpnConnection: %s\n", curl_easy_strerror(cret)); + cret = osc_link_policy(&e, &r, &a); + TRY(cret, "fail to call LinkPolicy: %s\n", curl_easy_strerror(cret)); CHK_BAD_RET(!r.buf, "connection sucessful, but empty responce\n"); if (program_flag & OAPI_RAW_OUTPUT) puts(r.buf); @@ -21762,19 +23078,19 @@ int main(int ac, char **av) } osc_deinit_str(&r); } else - if (!strcmp("DeleteVolume", av[i])) { + if (!strcmp("LinkNic", av[i])) { json_object *jobj; auto_ptr_array struct ptr_array opa = {0}; struct ptr_array *pa = &opa; - struct osc_delete_volume_arg a = {0}; - struct osc_delete_volume_arg *s = &a; + struct osc_link_nic_arg a = {0}; + struct osc_link_nic_arg *s = &a; __attribute__((cleanup(files_cnt_cleanup))) char *files_cnt[MAX_FILES_PER_CMD] = {NULL}; int cret; cascade_struct = NULL; cascade_parser = NULL; - delete_volume_arg: + link_nic_arg: if (i + 1 < ac && av[i + 1][0] == '.' && av[i + 1][1] == '.') { char *next_a = &av[i + 1][2]; @@ -21792,7 +23108,7 @@ int main(int ac, char **av) } STRY(cascade_parser(cascade_struct, next_a, aa, pa)); i += incr; - goto delete_volume_arg; + goto link_nic_arg; } if (i + 1 < ac && av[i + 1][0] == '-' && av[i + 1][1] == '-') { @@ -21813,6 +23129,17 @@ int main(int ac, char **av) incr = 1; } } + if ((aret = argcmp(next_a, "DeviceNumber")) == 0 || aret == '=' ) { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "DeviceNumber argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + TRY(!aa, "DeviceNumber argument missing\n"); + s->is_set_device_number = 1; + s->device_number = atoi(aa); + } else if ((aret = argcmp(next_a, "DryRun")) == 0 || aret == '=' ) { char *eq_ptr = strchr(next_a, '='); if (eq_ptr) { @@ -21829,25 +23156,36 @@ int main(int ac, char **av) BAD_RET("DryRun require true/false\n"); } } else - if ((aret = argcmp(next_a, "VolumeId")) == 0 || aret == '=' ) { + if ((aret = argcmp(next_a, "NicId")) == 0 || aret == '=' ) { char *eq_ptr = strchr(next_a, '='); if (eq_ptr) { - TRY((!*eq_ptr), "VolumeId argument missing\n"); + TRY((!*eq_ptr), "NicId argument missing\n"); aa = eq_ptr + 1; incr = 1; } - TRY(!aa, "VolumeId argument missing\n"); - s->volume_id = aa; // string string + TRY(!aa, "NicId argument missing\n"); + s->nic_id = aa; // string string + + } else + if ((aret = argcmp(next_a, "VmId")) == 0 || aret == '=' ) { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "VmId argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + TRY(!aa, "VmId argument missing\n"); + s->vm_id = aa; // string string } else { - BAD_RET("'%s' is not a valide argument for 'DeleteVolume'\n", next_a); + BAD_RET("'%s' is not a valide argument for 'LinkNic'\n", next_a); } i += incr; - goto delete_volume_arg; + goto link_nic_arg; } - cret = osc_delete_volume(&e, &r, &a); - TRY(cret, "fail to call DeleteVolume: %s\n", curl_easy_strerror(cret)); + cret = osc_link_nic(&e, &r, &a); + TRY(cret, "fail to call LinkNic: %s\n", curl_easy_strerror(cret)); CHK_BAD_RET(!r.buf, "connection sucessful, but empty responce\n"); if (program_flag & OAPI_RAW_OUTPUT) puts(r.buf); @@ -21860,19 +23198,19 @@ int main(int ac, char **av) } osc_deinit_str(&r); } else - if (!strcmp("DeleteVms", av[i])) { + if (!strcmp("LinkLoadBalancerBackendMachines", av[i])) { json_object *jobj; auto_ptr_array struct ptr_array opa = {0}; struct ptr_array *pa = &opa; - struct osc_delete_vms_arg a = {0}; - struct osc_delete_vms_arg *s = &a; + struct osc_link_load_balancer_backend_machines_arg a = {0}; + struct osc_link_load_balancer_backend_machines_arg *s = &a; __attribute__((cleanup(files_cnt_cleanup))) char *files_cnt[MAX_FILES_PER_CMD] = {NULL}; int cret; cascade_struct = NULL; cascade_parser = NULL; - delete_vms_arg: + link_load_balancer_backend_machines_arg: if (i + 1 < ac && av[i + 1][0] == '.' && av[i + 1][1] == '.') { char *next_a = &av[i + 1][2]; @@ -21890,7 +23228,7 @@ int main(int ac, char **av) } STRY(cascade_parser(cascade_struct, next_a, aa, pa)); i += incr; - goto delete_vms_arg; + goto link_load_balancer_backend_machines_arg; } if (i + 1 < ac && av[i + 1][0] == '-' && av[i + 1][1] == '-') { @@ -21911,6 +23249,32 @@ int main(int ac, char **av) incr = 1; } } + if ((aret = argcmp(next_a, "BackendIps")) == 0 || aret == '=' ) { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "BackendIps argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + TRY(!aa, "BackendIps argument missing\n"); + s->backend_ips_str = aa; + } else if (!(aret = strcmp(str, "BackendIps[]")) || aret == '=') { + TRY(!aa, "BackendIps[] argument missing\n"); + SET_NEXT(s->backend_ips, (aa), pa); + } else + if ((aret = argcmp(next_a, "BackendVmIds")) == 0 || aret == '=' ) { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "BackendVmIds argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + TRY(!aa, "BackendVmIds argument missing\n"); + s->backend_vm_ids_str = aa; + } else if (!(aret = strcmp(str, "BackendVmIds[]")) || aret == '=') { + TRY(!aa, "BackendVmIds[] argument missing\n"); + SET_NEXT(s->backend_vm_ids, (aa), pa); + } else if ((aret = argcmp(next_a, "DryRun")) == 0 || aret == '=' ) { char *eq_ptr = strchr(next_a, '='); if (eq_ptr) { @@ -21927,27 +23291,25 @@ int main(int ac, char **av) BAD_RET("DryRun require true/false\n"); } } else - if ((aret = argcmp(next_a, "VmIds")) == 0 || aret == '=' ) { + if ((aret = argcmp(next_a, "LoadBalancerName")) == 0 || aret == '=' ) { char *eq_ptr = strchr(next_a, '='); if (eq_ptr) { - TRY((!*eq_ptr), "VmIds argument missing\n"); + TRY((!*eq_ptr), "LoadBalancerName argument missing\n"); aa = eq_ptr + 1; incr = 1; } - TRY(!aa, "VmIds argument missing\n"); - s->vm_ids_str = aa; - } else if (!(aret = strcmp(str, "VmIds[]")) || aret == '=') { - TRY(!aa, "VmIds[] argument missing\n"); - SET_NEXT(s->vm_ids, (aa), pa); + TRY(!aa, "LoadBalancerName argument missing\n"); + s->load_balancer_name = aa; // string string + } else { - BAD_RET("'%s' is not a valide argument for 'DeleteVms'\n", next_a); + BAD_RET("'%s' is not a valide argument for 'LinkLoadBalancerBackendMachines'\n", next_a); } i += incr; - goto delete_vms_arg; + goto link_load_balancer_backend_machines_arg; } - cret = osc_delete_vms(&e, &r, &a); - TRY(cret, "fail to call DeleteVms: %s\n", curl_easy_strerror(cret)); + cret = osc_link_load_balancer_backend_machines(&e, &r, &a); + TRY(cret, "fail to call LinkLoadBalancerBackendMachines: %s\n", curl_easy_strerror(cret)); CHK_BAD_RET(!r.buf, "connection sucessful, but empty responce\n"); if (program_flag & OAPI_RAW_OUTPUT) puts(r.buf); @@ -21960,19 +23322,19 @@ int main(int ac, char **av) } osc_deinit_str(&r); } else - if (!strcmp("DeleteVmTemplate", av[i])) { + if (!strcmp("LinkInternetService", av[i])) { json_object *jobj; auto_ptr_array struct ptr_array opa = {0}; struct ptr_array *pa = &opa; - struct osc_delete_vm_template_arg a = {0}; - struct osc_delete_vm_template_arg *s = &a; + struct osc_link_internet_service_arg a = {0}; + struct osc_link_internet_service_arg *s = &a; __attribute__((cleanup(files_cnt_cleanup))) char *files_cnt[MAX_FILES_PER_CMD] = {NULL}; int cret; cascade_struct = NULL; cascade_parser = NULL; - delete_vm_template_arg: + link_internet_service_arg: if (i + 1 < ac && av[i + 1][0] == '.' && av[i + 1][1] == '.') { char *next_a = &av[i + 1][2]; @@ -21990,7 +23352,7 @@ int main(int ac, char **av) } STRY(cascade_parser(cascade_struct, next_a, aa, pa)); i += incr; - goto delete_vm_template_arg; + goto link_internet_service_arg; } if (i + 1 < ac && av[i + 1][0] == '-' && av[i + 1][1] == '-') { @@ -22027,25 +23389,36 @@ int main(int ac, char **av) BAD_RET("DryRun require true/false\n"); } } else - if ((aret = argcmp(next_a, "VmTemplateId")) == 0 || aret == '=' ) { + if ((aret = argcmp(next_a, "InternetServiceId")) == 0 || aret == '=' ) { char *eq_ptr = strchr(next_a, '='); if (eq_ptr) { - TRY((!*eq_ptr), "VmTemplateId argument missing\n"); + TRY((!*eq_ptr), "InternetServiceId argument missing\n"); aa = eq_ptr + 1; incr = 1; } - TRY(!aa, "VmTemplateId argument missing\n"); - s->vm_template_id = aa; // string string + TRY(!aa, "InternetServiceId argument missing\n"); + s->internet_service_id = aa; // string string + + } else + if ((aret = argcmp(next_a, "NetId")) == 0 || aret == '=' ) { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "NetId argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + TRY(!aa, "NetId argument missing\n"); + s->net_id = aa; // string string } else { - BAD_RET("'%s' is not a valide argument for 'DeleteVmTemplate'\n", next_a); + BAD_RET("'%s' is not a valide argument for 'LinkInternetService'\n", next_a); } i += incr; - goto delete_vm_template_arg; + goto link_internet_service_arg; } - cret = osc_delete_vm_template(&e, &r, &a); - TRY(cret, "fail to call DeleteVmTemplate: %s\n", curl_easy_strerror(cret)); + cret = osc_link_internet_service(&e, &r, &a); + TRY(cret, "fail to call LinkInternetService: %s\n", curl_easy_strerror(cret)); CHK_BAD_RET(!r.buf, "connection sucessful, but empty responce\n"); if (program_flag & OAPI_RAW_OUTPUT) puts(r.buf); @@ -22058,19 +23431,19 @@ int main(int ac, char **av) } osc_deinit_str(&r); } else - if (!strcmp("DeleteVmGroup", av[i])) { + if (!strcmp("LinkFlexibleGpu", av[i])) { json_object *jobj; auto_ptr_array struct ptr_array opa = {0}; struct ptr_array *pa = &opa; - struct osc_delete_vm_group_arg a = {0}; - struct osc_delete_vm_group_arg *s = &a; + struct osc_link_flexible_gpu_arg a = {0}; + struct osc_link_flexible_gpu_arg *s = &a; __attribute__((cleanup(files_cnt_cleanup))) char *files_cnt[MAX_FILES_PER_CMD] = {NULL}; int cret; cascade_struct = NULL; cascade_parser = NULL; - delete_vm_group_arg: + link_flexible_gpu_arg: if (i + 1 < ac && av[i + 1][0] == '.' && av[i + 1][1] == '.') { char *next_a = &av[i + 1][2]; @@ -22088,7 +23461,7 @@ int main(int ac, char **av) } STRY(cascade_parser(cascade_struct, next_a, aa, pa)); i += incr; - goto delete_vm_group_arg; + goto link_flexible_gpu_arg; } if (i + 1 < ac && av[i + 1][0] == '-' && av[i + 1][1] == '-') { @@ -22125,25 +23498,36 @@ int main(int ac, char **av) BAD_RET("DryRun require true/false\n"); } } else - if ((aret = argcmp(next_a, "VmGroupId")) == 0 || aret == '=' ) { + if ((aret = argcmp(next_a, "FlexibleGpuId")) == 0 || aret == '=' ) { char *eq_ptr = strchr(next_a, '='); if (eq_ptr) { - TRY((!*eq_ptr), "VmGroupId argument missing\n"); + TRY((!*eq_ptr), "FlexibleGpuId argument missing\n"); aa = eq_ptr + 1; incr = 1; } - TRY(!aa, "VmGroupId argument missing\n"); - s->vm_group_id = aa; // string string + TRY(!aa, "FlexibleGpuId argument missing\n"); + s->flexible_gpu_id = aa; // string string + + } else + if ((aret = argcmp(next_a, "VmId")) == 0 || aret == '=' ) { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "VmId argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + TRY(!aa, "VmId argument missing\n"); + s->vm_id = aa; // string string } else { - BAD_RET("'%s' is not a valide argument for 'DeleteVmGroup'\n", next_a); + BAD_RET("'%s' is not a valide argument for 'LinkFlexibleGpu'\n", next_a); } i += incr; - goto delete_vm_group_arg; + goto link_flexible_gpu_arg; } - cret = osc_delete_vm_group(&e, &r, &a); - TRY(cret, "fail to call DeleteVmGroup: %s\n", curl_easy_strerror(cret)); + cret = osc_link_flexible_gpu(&e, &r, &a); + TRY(cret, "fail to call LinkFlexibleGpu: %s\n", curl_easy_strerror(cret)); CHK_BAD_RET(!r.buf, "connection sucessful, but empty responce\n"); if (program_flag & OAPI_RAW_OUTPUT) puts(r.buf); @@ -22156,19 +23540,19 @@ int main(int ac, char **av) } osc_deinit_str(&r); } else - if (!strcmp("DeleteVirtualGateway", av[i])) { + if (!strcmp("DeregisterVmsInLoadBalancer", av[i])) { json_object *jobj; auto_ptr_array struct ptr_array opa = {0}; struct ptr_array *pa = &opa; - struct osc_delete_virtual_gateway_arg a = {0}; - struct osc_delete_virtual_gateway_arg *s = &a; + struct osc_deregister_vms_in_load_balancer_arg a = {0}; + struct osc_deregister_vms_in_load_balancer_arg *s = &a; __attribute__((cleanup(files_cnt_cleanup))) char *files_cnt[MAX_FILES_PER_CMD] = {NULL}; int cret; cascade_struct = NULL; cascade_parser = NULL; - delete_virtual_gateway_arg: + deregister_vms_in_load_balancer_arg: if (i + 1 < ac && av[i + 1][0] == '.' && av[i + 1][1] == '.') { char *next_a = &av[i + 1][2]; @@ -22186,7 +23570,7 @@ int main(int ac, char **av) } STRY(cascade_parser(cascade_struct, next_a, aa, pa)); i += incr; - goto delete_virtual_gateway_arg; + goto deregister_vms_in_load_balancer_arg; } if (i + 1 < ac && av[i + 1][0] == '-' && av[i + 1][1] == '-') { @@ -22207,6 +23591,19 @@ int main(int ac, char **av) incr = 1; } } + if ((aret = argcmp(next_a, "BackendVmIds")) == 0 || aret == '=' ) { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "BackendVmIds argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + TRY(!aa, "BackendVmIds argument missing\n"); + s->backend_vm_ids_str = aa; + } else if (!(aret = strcmp(str, "BackendVmIds[]")) || aret == '=') { + TRY(!aa, "BackendVmIds[] argument missing\n"); + SET_NEXT(s->backend_vm_ids, (aa), pa); + } else if ((aret = argcmp(next_a, "DryRun")) == 0 || aret == '=' ) { char *eq_ptr = strchr(next_a, '='); if (eq_ptr) { @@ -22223,25 +23620,25 @@ int main(int ac, char **av) BAD_RET("DryRun require true/false\n"); } } else - if ((aret = argcmp(next_a, "VirtualGatewayId")) == 0 || aret == '=' ) { + if ((aret = argcmp(next_a, "LoadBalancerName")) == 0 || aret == '=' ) { char *eq_ptr = strchr(next_a, '='); if (eq_ptr) { - TRY((!*eq_ptr), "VirtualGatewayId argument missing\n"); + TRY((!*eq_ptr), "LoadBalancerName argument missing\n"); aa = eq_ptr + 1; incr = 1; } - TRY(!aa, "VirtualGatewayId argument missing\n"); - s->virtual_gateway_id = aa; // string string + TRY(!aa, "LoadBalancerName argument missing\n"); + s->load_balancer_name = aa; // string string } else { - BAD_RET("'%s' is not a valide argument for 'DeleteVirtualGateway'\n", next_a); + BAD_RET("'%s' is not a valide argument for 'DeregisterVmsInLoadBalancer'\n", next_a); } i += incr; - goto delete_virtual_gateway_arg; + goto deregister_vms_in_load_balancer_arg; } - cret = osc_delete_virtual_gateway(&e, &r, &a); - TRY(cret, "fail to call DeleteVirtualGateway: %s\n", curl_easy_strerror(cret)); + cret = osc_deregister_vms_in_load_balancer(&e, &r, &a); + TRY(cret, "fail to call DeregisterVmsInLoadBalancer: %s\n", curl_easy_strerror(cret)); CHK_BAD_RET(!r.buf, "connection sucessful, but empty responce\n"); if (program_flag & OAPI_RAW_OUTPUT) puts(r.buf); @@ -22254,19 +23651,19 @@ int main(int ac, char **av) } osc_deinit_str(&r); } else - if (!strcmp("DeleteUser", av[i])) { + if (!strcmp("DeleteVpnConnectionRoute", av[i])) { json_object *jobj; auto_ptr_array struct ptr_array opa = {0}; struct ptr_array *pa = &opa; - struct osc_delete_user_arg a = {0}; - struct osc_delete_user_arg *s = &a; + struct osc_delete_vpn_connection_route_arg a = {0}; + struct osc_delete_vpn_connection_route_arg *s = &a; __attribute__((cleanup(files_cnt_cleanup))) char *files_cnt[MAX_FILES_PER_CMD] = {NULL}; int cret; cascade_struct = NULL; cascade_parser = NULL; - delete_user_arg: + delete_vpn_connection_route_arg: if (i + 1 < ac && av[i + 1][0] == '.' && av[i + 1][1] == '.') { char *next_a = &av[i + 1][2]; @@ -22284,7 +23681,7 @@ int main(int ac, char **av) } STRY(cascade_parser(cascade_struct, next_a, aa, pa)); i += incr; - goto delete_user_arg; + goto delete_vpn_connection_route_arg; } if (i + 1 < ac && av[i + 1][0] == '-' && av[i + 1][1] == '-') { @@ -22305,6 +23702,17 @@ int main(int ac, char **av) incr = 1; } } + if ((aret = argcmp(next_a, "DestinationIpRange")) == 0 || aret == '=' ) { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "DestinationIpRange argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + TRY(!aa, "DestinationIpRange argument missing\n"); + s->destination_ip_range = aa; // string string + + } else if ((aret = argcmp(next_a, "DryRun")) == 0 || aret == '=' ) { char *eq_ptr = strchr(next_a, '='); if (eq_ptr) { @@ -22321,25 +23729,25 @@ int main(int ac, char **av) BAD_RET("DryRun require true/false\n"); } } else - if ((aret = argcmp(next_a, "UserName")) == 0 || aret == '=' ) { + if ((aret = argcmp(next_a, "VpnConnectionId")) == 0 || aret == '=' ) { char *eq_ptr = strchr(next_a, '='); if (eq_ptr) { - TRY((!*eq_ptr), "UserName argument missing\n"); + TRY((!*eq_ptr), "VpnConnectionId argument missing\n"); aa = eq_ptr + 1; incr = 1; } - TRY(!aa, "UserName argument missing\n"); - s->user_name = aa; // string string + TRY(!aa, "VpnConnectionId argument missing\n"); + s->vpn_connection_id = aa; // string string } else { - BAD_RET("'%s' is not a valide argument for 'DeleteUser'\n", next_a); + BAD_RET("'%s' is not a valide argument for 'DeleteVpnConnectionRoute'\n", next_a); } i += incr; - goto delete_user_arg; + goto delete_vpn_connection_route_arg; } - cret = osc_delete_user(&e, &r, &a); - TRY(cret, "fail to call DeleteUser: %s\n", curl_easy_strerror(cret)); + cret = osc_delete_vpn_connection_route(&e, &r, &a); + TRY(cret, "fail to call DeleteVpnConnectionRoute: %s\n", curl_easy_strerror(cret)); CHK_BAD_RET(!r.buf, "connection sucessful, but empty responce\n"); if (program_flag & OAPI_RAW_OUTPUT) puts(r.buf); @@ -22352,19 +23760,19 @@ int main(int ac, char **av) } osc_deinit_str(&r); } else - if (!strcmp("DeleteTags", av[i])) { + if (!strcmp("DeleteVpnConnection", av[i])) { json_object *jobj; auto_ptr_array struct ptr_array opa = {0}; struct ptr_array *pa = &opa; - struct osc_delete_tags_arg a = {0}; - struct osc_delete_tags_arg *s = &a; + struct osc_delete_vpn_connection_arg a = {0}; + struct osc_delete_vpn_connection_arg *s = &a; __attribute__((cleanup(files_cnt_cleanup))) char *files_cnt[MAX_FILES_PER_CMD] = {NULL}; int cret; cascade_struct = NULL; cascade_parser = NULL; - delete_tags_arg: + delete_vpn_connection_arg: if (i + 1 < ac && av[i + 1][0] == '.' && av[i + 1][1] == '.') { char *next_a = &av[i + 1][2]; @@ -22382,7 +23790,7 @@ int main(int ac, char **av) } STRY(cascade_parser(cascade_struct, next_a, aa, pa)); i += incr; - goto delete_tags_arg; + goto delete_vpn_connection_arg; } if (i + 1 < ac && av[i + 1][0] == '-' && av[i + 1][1] == '-') { @@ -22419,58 +23827,25 @@ int main(int ac, char **av) BAD_RET("DryRun require true/false\n"); } } else - if ((aret = argcmp(next_a, "ResourceIds")) == 0 || aret == '=' ) { - char *eq_ptr = strchr(next_a, '='); - if (eq_ptr) { - TRY((!*eq_ptr), "ResourceIds argument missing\n"); - aa = eq_ptr + 1; - incr = 1; - } - TRY(!aa, "ResourceIds argument missing\n"); - s->resource_ids_str = aa; - } else if (!(aret = strcmp(str, "ResourceIds[]")) || aret == '=') { - TRY(!aa, "ResourceIds[] argument missing\n"); - SET_NEXT(s->resource_ids, (aa), pa); - } else - if ((aret = argcmp(next_a, "Tags")) == 0 || aret == '=' ) { + if ((aret = argcmp(next_a, "VpnConnectionId")) == 0 || aret == '=' ) { char *eq_ptr = strchr(next_a, '='); if (eq_ptr) { - TRY((!*eq_ptr), "Tags argument missing\n"); + TRY((!*eq_ptr), "VpnConnectionId argument missing\n"); aa = eq_ptr + 1; incr = 1; } - char *dot_pos = strchr(str, '.'); - - if (dot_pos) { - int pos; - char *endptr; + TRY(!aa, "VpnConnectionId argument missing\n"); + s->vpn_connection_id = aa; // string string - ++dot_pos; - pos = strtoul(dot_pos, &endptr, 0); - if (endptr == dot_pos) - BAD_RET("'Tags' require an index (example array ref ResourceTag.Tags.0)\n"); - else if (*endptr != '.') - BAD_RET("'Tags' require a .\n"); - TRY_ALLOC_AT(s,tags, pa, pos, sizeof(*s->tags)); - cascade_struct = &s->tags[pos]; - cascade_parser = resource_tag_parser; - if (endptr[1] == '.') { - ++endptr; - } - STRY(resource_tag_parser(&s->tags[pos], endptr + 1, aa, pa)); - } else { - TRY(!aa, "Tags argument missing\n"); - s->tags_str = aa; // array ref ResourceTag ref - } } else { - BAD_RET("'%s' is not a valide argument for 'DeleteTags'\n", next_a); + BAD_RET("'%s' is not a valide argument for 'DeleteVpnConnection'\n", next_a); } i += incr; - goto delete_tags_arg; + goto delete_vpn_connection_arg; } - cret = osc_delete_tags(&e, &r, &a); - TRY(cret, "fail to call DeleteTags: %s\n", curl_easy_strerror(cret)); + cret = osc_delete_vpn_connection(&e, &r, &a); + TRY(cret, "fail to call DeleteVpnConnection: %s\n", curl_easy_strerror(cret)); CHK_BAD_RET(!r.buf, "connection sucessful, but empty responce\n"); if (program_flag & OAPI_RAW_OUTPUT) puts(r.buf); @@ -22483,19 +23858,19 @@ int main(int ac, char **av) } osc_deinit_str(&r); } else - if (!strcmp("DeleteSubnet", av[i])) { + if (!strcmp("DeleteVolume", av[i])) { json_object *jobj; auto_ptr_array struct ptr_array opa = {0}; struct ptr_array *pa = &opa; - struct osc_delete_subnet_arg a = {0}; - struct osc_delete_subnet_arg *s = &a; + struct osc_delete_volume_arg a = {0}; + struct osc_delete_volume_arg *s = &a; __attribute__((cleanup(files_cnt_cleanup))) char *files_cnt[MAX_FILES_PER_CMD] = {NULL}; int cret; cascade_struct = NULL; cascade_parser = NULL; - delete_subnet_arg: + delete_volume_arg: if (i + 1 < ac && av[i + 1][0] == '.' && av[i + 1][1] == '.') { char *next_a = &av[i + 1][2]; @@ -22513,7 +23888,7 @@ int main(int ac, char **av) } STRY(cascade_parser(cascade_struct, next_a, aa, pa)); i += incr; - goto delete_subnet_arg; + goto delete_volume_arg; } if (i + 1 < ac && av[i + 1][0] == '-' && av[i + 1][1] == '-') { @@ -22550,25 +23925,25 @@ int main(int ac, char **av) BAD_RET("DryRun require true/false\n"); } } else - if ((aret = argcmp(next_a, "SubnetId")) == 0 || aret == '=' ) { + if ((aret = argcmp(next_a, "VolumeId")) == 0 || aret == '=' ) { char *eq_ptr = strchr(next_a, '='); if (eq_ptr) { - TRY((!*eq_ptr), "SubnetId argument missing\n"); + TRY((!*eq_ptr), "VolumeId argument missing\n"); aa = eq_ptr + 1; incr = 1; } - TRY(!aa, "SubnetId argument missing\n"); - s->subnet_id = aa; // string string + TRY(!aa, "VolumeId argument missing\n"); + s->volume_id = aa; // string string } else { - BAD_RET("'%s' is not a valide argument for 'DeleteSubnet'\n", next_a); + BAD_RET("'%s' is not a valide argument for 'DeleteVolume'\n", next_a); } i += incr; - goto delete_subnet_arg; + goto delete_volume_arg; } - cret = osc_delete_subnet(&e, &r, &a); - TRY(cret, "fail to call DeleteSubnet: %s\n", curl_easy_strerror(cret)); + cret = osc_delete_volume(&e, &r, &a); + TRY(cret, "fail to call DeleteVolume: %s\n", curl_easy_strerror(cret)); CHK_BAD_RET(!r.buf, "connection sucessful, but empty responce\n"); if (program_flag & OAPI_RAW_OUTPUT) puts(r.buf); @@ -22581,19 +23956,19 @@ int main(int ac, char **av) } osc_deinit_str(&r); } else - if (!strcmp("DeleteSnapshot", av[i])) { + if (!strcmp("DeleteVms", av[i])) { json_object *jobj; auto_ptr_array struct ptr_array opa = {0}; struct ptr_array *pa = &opa; - struct osc_delete_snapshot_arg a = {0}; - struct osc_delete_snapshot_arg *s = &a; + struct osc_delete_vms_arg a = {0}; + struct osc_delete_vms_arg *s = &a; __attribute__((cleanup(files_cnt_cleanup))) char *files_cnt[MAX_FILES_PER_CMD] = {NULL}; int cret; cascade_struct = NULL; cascade_parser = NULL; - delete_snapshot_arg: + delete_vms_arg: if (i + 1 < ac && av[i + 1][0] == '.' && av[i + 1][1] == '.') { char *next_a = &av[i + 1][2]; @@ -22611,7 +23986,7 @@ int main(int ac, char **av) } STRY(cascade_parser(cascade_struct, next_a, aa, pa)); i += incr; - goto delete_snapshot_arg; + goto delete_vms_arg; } if (i + 1 < ac && av[i + 1][0] == '-' && av[i + 1][1] == '-') { @@ -22648,25 +24023,27 @@ int main(int ac, char **av) BAD_RET("DryRun require true/false\n"); } } else - if ((aret = argcmp(next_a, "SnapshotId")) == 0 || aret == '=' ) { + if ((aret = argcmp(next_a, "VmIds")) == 0 || aret == '=' ) { char *eq_ptr = strchr(next_a, '='); if (eq_ptr) { - TRY((!*eq_ptr), "SnapshotId argument missing\n"); + TRY((!*eq_ptr), "VmIds argument missing\n"); aa = eq_ptr + 1; incr = 1; } - TRY(!aa, "SnapshotId argument missing\n"); - s->snapshot_id = aa; // string string - + TRY(!aa, "VmIds argument missing\n"); + s->vm_ids_str = aa; + } else if (!(aret = strcmp(str, "VmIds[]")) || aret == '=') { + TRY(!aa, "VmIds[] argument missing\n"); + SET_NEXT(s->vm_ids, (aa), pa); } else { - BAD_RET("'%s' is not a valide argument for 'DeleteSnapshot'\n", next_a); + BAD_RET("'%s' is not a valide argument for 'DeleteVms'\n", next_a); } i += incr; - goto delete_snapshot_arg; + goto delete_vms_arg; } - cret = osc_delete_snapshot(&e, &r, &a); - TRY(cret, "fail to call DeleteSnapshot: %s\n", curl_easy_strerror(cret)); + cret = osc_delete_vms(&e, &r, &a); + TRY(cret, "fail to call DeleteVms: %s\n", curl_easy_strerror(cret)); CHK_BAD_RET(!r.buf, "connection sucessful, but empty responce\n"); if (program_flag & OAPI_RAW_OUTPUT) puts(r.buf); @@ -22679,19 +24056,19 @@ int main(int ac, char **av) } osc_deinit_str(&r); } else - if (!strcmp("DeleteServerCertificate", av[i])) { + if (!strcmp("DeleteVmTemplate", av[i])) { json_object *jobj; auto_ptr_array struct ptr_array opa = {0}; struct ptr_array *pa = &opa; - struct osc_delete_server_certificate_arg a = {0}; - struct osc_delete_server_certificate_arg *s = &a; + struct osc_delete_vm_template_arg a = {0}; + struct osc_delete_vm_template_arg *s = &a; __attribute__((cleanup(files_cnt_cleanup))) char *files_cnt[MAX_FILES_PER_CMD] = {NULL}; int cret; cascade_struct = NULL; cascade_parser = NULL; - delete_server_certificate_arg: + delete_vm_template_arg: if (i + 1 < ac && av[i + 1][0] == '.' && av[i + 1][1] == '.') { char *next_a = &av[i + 1][2]; @@ -22709,7 +24086,7 @@ int main(int ac, char **av) } STRY(cascade_parser(cascade_struct, next_a, aa, pa)); i += incr; - goto delete_server_certificate_arg; + goto delete_vm_template_arg; } if (i + 1 < ac && av[i + 1][0] == '-' && av[i + 1][1] == '-') { @@ -22746,25 +24123,25 @@ int main(int ac, char **av) BAD_RET("DryRun require true/false\n"); } } else - if ((aret = argcmp(next_a, "Name")) == 0 || aret == '=' ) { + if ((aret = argcmp(next_a, "VmTemplateId")) == 0 || aret == '=' ) { char *eq_ptr = strchr(next_a, '='); if (eq_ptr) { - TRY((!*eq_ptr), "Name argument missing\n"); + TRY((!*eq_ptr), "VmTemplateId argument missing\n"); aa = eq_ptr + 1; incr = 1; } - TRY(!aa, "Name argument missing\n"); - s->name = aa; // string string + TRY(!aa, "VmTemplateId argument missing\n"); + s->vm_template_id = aa; // string string } else { - BAD_RET("'%s' is not a valide argument for 'DeleteServerCertificate'\n", next_a); + BAD_RET("'%s' is not a valide argument for 'DeleteVmTemplate'\n", next_a); } i += incr; - goto delete_server_certificate_arg; + goto delete_vm_template_arg; } - cret = osc_delete_server_certificate(&e, &r, &a); - TRY(cret, "fail to call DeleteServerCertificate: %s\n", curl_easy_strerror(cret)); + cret = osc_delete_vm_template(&e, &r, &a); + TRY(cret, "fail to call DeleteVmTemplate: %s\n", curl_easy_strerror(cret)); CHK_BAD_RET(!r.buf, "connection sucessful, but empty responce\n"); if (program_flag & OAPI_RAW_OUTPUT) puts(r.buf); @@ -22777,19 +24154,19 @@ int main(int ac, char **av) } osc_deinit_str(&r); } else - if (!strcmp("DeleteSecurityGroupRule", av[i])) { + if (!strcmp("DeleteVmGroup", av[i])) { json_object *jobj; auto_ptr_array struct ptr_array opa = {0}; struct ptr_array *pa = &opa; - struct osc_delete_security_group_rule_arg a = {0}; - struct osc_delete_security_group_rule_arg *s = &a; + struct osc_delete_vm_group_arg a = {0}; + struct osc_delete_vm_group_arg *s = &a; __attribute__((cleanup(files_cnt_cleanup))) char *files_cnt[MAX_FILES_PER_CMD] = {NULL}; int cret; cascade_struct = NULL; cascade_parser = NULL; - delete_security_group_rule_arg: + delete_vm_group_arg: if (i + 1 < ac && av[i + 1][0] == '.' && av[i + 1][1] == '.') { char *next_a = &av[i + 1][2]; @@ -22807,7 +24184,7 @@ int main(int ac, char **av) } STRY(cascade_parser(cascade_struct, next_a, aa, pa)); i += incr; - goto delete_security_group_rule_arg; + goto delete_vm_group_arg; } if (i + 1 < ac && av[i + 1][0] == '-' && av[i + 1][1] == '-') { @@ -22844,133 +24221,25 @@ int main(int ac, char **av) BAD_RET("DryRun require true/false\n"); } } else - if ((aret = argcmp(next_a, "Flow")) == 0 || aret == '=' ) { - char *eq_ptr = strchr(next_a, '='); - if (eq_ptr) { - TRY((!*eq_ptr), "Flow argument missing\n"); - aa = eq_ptr + 1; - incr = 1; - } - TRY(!aa, "Flow argument missing\n"); - s->flow = aa; // string string - - } else - if ((aret = argcmp(next_a, "FromPortRange")) == 0 || aret == '=' ) { - char *eq_ptr = strchr(next_a, '='); - if (eq_ptr) { - TRY((!*eq_ptr), "FromPortRange argument missing\n"); - aa = eq_ptr + 1; - incr = 1; - } - TRY(!aa, "FromPortRange argument missing\n"); - s->is_set_from_port_range = 1; - s->from_port_range = atoi(aa); - } else - if ((aret = argcmp(next_a, "IpProtocol")) == 0 || aret == '=' ) { - char *eq_ptr = strchr(next_a, '='); - if (eq_ptr) { - TRY((!*eq_ptr), "IpProtocol argument missing\n"); - aa = eq_ptr + 1; - incr = 1; - } - TRY(!aa, "IpProtocol argument missing\n"); - s->ip_protocol = aa; // string string - - } else - if ((aret = argcmp(next_a, "IpRange")) == 0 || aret == '=' ) { - char *eq_ptr = strchr(next_a, '='); - if (eq_ptr) { - TRY((!*eq_ptr), "IpRange argument missing\n"); - aa = eq_ptr + 1; - incr = 1; - } - TRY(!aa, "IpRange argument missing\n"); - s->ip_range = aa; // string string - - } else - if ((aret = argcmp(next_a, "Rules")) == 0 || aret == '=' ) { - char *eq_ptr = strchr(next_a, '='); - if (eq_ptr) { - TRY((!*eq_ptr), "Rules argument missing\n"); - aa = eq_ptr + 1; - incr = 1; - } - char *dot_pos = strchr(str, '.'); - - if (dot_pos) { - int pos; - char *endptr; - - ++dot_pos; - pos = strtoul(dot_pos, &endptr, 0); - if (endptr == dot_pos) - BAD_RET("'Rules' require an index (example array ref SecurityGroupRule.Rules.0)\n"); - else if (*endptr != '.') - BAD_RET("'Rules' require a .\n"); - TRY_ALLOC_AT(s,rules, pa, pos, sizeof(*s->rules)); - cascade_struct = &s->rules[pos]; - cascade_parser = security_group_rule_parser; - if (endptr[1] == '.') { - ++endptr; - } - STRY(security_group_rule_parser(&s->rules[pos], endptr + 1, aa, pa)); - } else { - TRY(!aa, "Rules argument missing\n"); - s->rules_str = aa; // array ref SecurityGroupRule ref - } - } else - if ((aret = argcmp(next_a, "SecurityGroupAccountIdToUnlink")) == 0 || aret == '=' ) { - char *eq_ptr = strchr(next_a, '='); - if (eq_ptr) { - TRY((!*eq_ptr), "SecurityGroupAccountIdToUnlink argument missing\n"); - aa = eq_ptr + 1; - incr = 1; - } - TRY(!aa, "SecurityGroupAccountIdToUnlink argument missing\n"); - s->security_group_account_id_to_unlink = aa; // string string - - } else - if ((aret = argcmp(next_a, "SecurityGroupId")) == 0 || aret == '=' ) { - char *eq_ptr = strchr(next_a, '='); - if (eq_ptr) { - TRY((!*eq_ptr), "SecurityGroupId argument missing\n"); - aa = eq_ptr + 1; - incr = 1; - } - TRY(!aa, "SecurityGroupId argument missing\n"); - s->security_group_id = aa; // string string - - } else - if ((aret = argcmp(next_a, "SecurityGroupNameToUnlink")) == 0 || aret == '=' ) { + if ((aret = argcmp(next_a, "VmGroupId")) == 0 || aret == '=' ) { char *eq_ptr = strchr(next_a, '='); if (eq_ptr) { - TRY((!*eq_ptr), "SecurityGroupNameToUnlink argument missing\n"); + TRY((!*eq_ptr), "VmGroupId argument missing\n"); aa = eq_ptr + 1; incr = 1; } - TRY(!aa, "SecurityGroupNameToUnlink argument missing\n"); - s->security_group_name_to_unlink = aa; // string string + TRY(!aa, "VmGroupId argument missing\n"); + s->vm_group_id = aa; // string string } else - if ((aret = argcmp(next_a, "ToPortRange")) == 0 || aret == '=' ) { - char *eq_ptr = strchr(next_a, '='); - if (eq_ptr) { - TRY((!*eq_ptr), "ToPortRange argument missing\n"); - aa = eq_ptr + 1; - incr = 1; - } - TRY(!aa, "ToPortRange argument missing\n"); - s->is_set_to_port_range = 1; - s->to_port_range = atoi(aa); - } else { - BAD_RET("'%s' is not a valide argument for 'DeleteSecurityGroupRule'\n", next_a); + BAD_RET("'%s' is not a valide argument for 'DeleteVmGroup'\n", next_a); } i += incr; - goto delete_security_group_rule_arg; + goto delete_vm_group_arg; } - cret = osc_delete_security_group_rule(&e, &r, &a); - TRY(cret, "fail to call DeleteSecurityGroupRule: %s\n", curl_easy_strerror(cret)); + cret = osc_delete_vm_group(&e, &r, &a); + TRY(cret, "fail to call DeleteVmGroup: %s\n", curl_easy_strerror(cret)); CHK_BAD_RET(!r.buf, "connection sucessful, but empty responce\n"); if (program_flag & OAPI_RAW_OUTPUT) puts(r.buf); @@ -22983,19 +24252,19 @@ int main(int ac, char **av) } osc_deinit_str(&r); } else - if (!strcmp("DeleteSecurityGroup", av[i])) { + if (!strcmp("DeleteVirtualGateway", av[i])) { json_object *jobj; auto_ptr_array struct ptr_array opa = {0}; struct ptr_array *pa = &opa; - struct osc_delete_security_group_arg a = {0}; - struct osc_delete_security_group_arg *s = &a; + struct osc_delete_virtual_gateway_arg a = {0}; + struct osc_delete_virtual_gateway_arg *s = &a; __attribute__((cleanup(files_cnt_cleanup))) char *files_cnt[MAX_FILES_PER_CMD] = {NULL}; int cret; cascade_struct = NULL; cascade_parser = NULL; - delete_security_group_arg: + delete_virtual_gateway_arg: if (i + 1 < ac && av[i + 1][0] == '.' && av[i + 1][1] == '.') { char *next_a = &av[i + 1][2]; @@ -23013,7 +24282,7 @@ int main(int ac, char **av) } STRY(cascade_parser(cascade_struct, next_a, aa, pa)); i += incr; - goto delete_security_group_arg; + goto delete_virtual_gateway_arg; } if (i + 1 < ac && av[i + 1][0] == '-' && av[i + 1][1] == '-') { @@ -23050,36 +24319,25 @@ int main(int ac, char **av) BAD_RET("DryRun require true/false\n"); } } else - if ((aret = argcmp(next_a, "SecurityGroupId")) == 0 || aret == '=' ) { - char *eq_ptr = strchr(next_a, '='); - if (eq_ptr) { - TRY((!*eq_ptr), "SecurityGroupId argument missing\n"); - aa = eq_ptr + 1; - incr = 1; - } - TRY(!aa, "SecurityGroupId argument missing\n"); - s->security_group_id = aa; // string string - - } else - if ((aret = argcmp(next_a, "SecurityGroupName")) == 0 || aret == '=' ) { + if ((aret = argcmp(next_a, "VirtualGatewayId")) == 0 || aret == '=' ) { char *eq_ptr = strchr(next_a, '='); if (eq_ptr) { - TRY((!*eq_ptr), "SecurityGroupName argument missing\n"); + TRY((!*eq_ptr), "VirtualGatewayId argument missing\n"); aa = eq_ptr + 1; incr = 1; } - TRY(!aa, "SecurityGroupName argument missing\n"); - s->security_group_name = aa; // string string + TRY(!aa, "VirtualGatewayId argument missing\n"); + s->virtual_gateway_id = aa; // string string } else { - BAD_RET("'%s' is not a valide argument for 'DeleteSecurityGroup'\n", next_a); + BAD_RET("'%s' is not a valide argument for 'DeleteVirtualGateway'\n", next_a); } i += incr; - goto delete_security_group_arg; + goto delete_virtual_gateway_arg; } - cret = osc_delete_security_group(&e, &r, &a); - TRY(cret, "fail to call DeleteSecurityGroup: %s\n", curl_easy_strerror(cret)); + cret = osc_delete_virtual_gateway(&e, &r, &a); + TRY(cret, "fail to call DeleteVirtualGateway: %s\n", curl_easy_strerror(cret)); CHK_BAD_RET(!r.buf, "connection sucessful, but empty responce\n"); if (program_flag & OAPI_RAW_OUTPUT) puts(r.buf); @@ -23092,19 +24350,19 @@ int main(int ac, char **av) } osc_deinit_str(&r); } else - if (!strcmp("DeleteRouteTable", av[i])) { + if (!strcmp("DeleteUser", av[i])) { json_object *jobj; auto_ptr_array struct ptr_array opa = {0}; struct ptr_array *pa = &opa; - struct osc_delete_route_table_arg a = {0}; - struct osc_delete_route_table_arg *s = &a; + struct osc_delete_user_arg a = {0}; + struct osc_delete_user_arg *s = &a; __attribute__((cleanup(files_cnt_cleanup))) char *files_cnt[MAX_FILES_PER_CMD] = {NULL}; int cret; cascade_struct = NULL; cascade_parser = NULL; - delete_route_table_arg: + delete_user_arg: if (i + 1 < ac && av[i + 1][0] == '.' && av[i + 1][1] == '.') { char *next_a = &av[i + 1][2]; @@ -23122,7 +24380,7 @@ int main(int ac, char **av) } STRY(cascade_parser(cascade_struct, next_a, aa, pa)); i += incr; - goto delete_route_table_arg; + goto delete_user_arg; } if (i + 1 < ac && av[i + 1][0] == '-' && av[i + 1][1] == '-') { @@ -23159,25 +24417,25 @@ int main(int ac, char **av) BAD_RET("DryRun require true/false\n"); } } else - if ((aret = argcmp(next_a, "RouteTableId")) == 0 || aret == '=' ) { + if ((aret = argcmp(next_a, "UserName")) == 0 || aret == '=' ) { char *eq_ptr = strchr(next_a, '='); if (eq_ptr) { - TRY((!*eq_ptr), "RouteTableId argument missing\n"); + TRY((!*eq_ptr), "UserName argument missing\n"); aa = eq_ptr + 1; incr = 1; } - TRY(!aa, "RouteTableId argument missing\n"); - s->route_table_id = aa; // string string + TRY(!aa, "UserName argument missing\n"); + s->user_name = aa; // string string } else { - BAD_RET("'%s' is not a valide argument for 'DeleteRouteTable'\n", next_a); + BAD_RET("'%s' is not a valide argument for 'DeleteUser'\n", next_a); } i += incr; - goto delete_route_table_arg; + goto delete_user_arg; } - cret = osc_delete_route_table(&e, &r, &a); - TRY(cret, "fail to call DeleteRouteTable: %s\n", curl_easy_strerror(cret)); + cret = osc_delete_user(&e, &r, &a); + TRY(cret, "fail to call DeleteUser: %s\n", curl_easy_strerror(cret)); CHK_BAD_RET(!r.buf, "connection sucessful, but empty responce\n"); if (program_flag & OAPI_RAW_OUTPUT) puts(r.buf); @@ -23190,19 +24448,19 @@ int main(int ac, char **av) } osc_deinit_str(&r); } else - if (!strcmp("DeleteRoute", av[i])) { + if (!strcmp("DeleteTags", av[i])) { json_object *jobj; auto_ptr_array struct ptr_array opa = {0}; struct ptr_array *pa = &opa; - struct osc_delete_route_arg a = {0}; - struct osc_delete_route_arg *s = &a; + struct osc_delete_tags_arg a = {0}; + struct osc_delete_tags_arg *s = &a; __attribute__((cleanup(files_cnt_cleanup))) char *files_cnt[MAX_FILES_PER_CMD] = {NULL}; int cret; cascade_struct = NULL; cascade_parser = NULL; - delete_route_arg: + delete_tags_arg: if (i + 1 < ac && av[i + 1][0] == '.' && av[i + 1][1] == '.') { char *next_a = &av[i + 1][2]; @@ -23220,7 +24478,7 @@ int main(int ac, char **av) } STRY(cascade_parser(cascade_struct, next_a, aa, pa)); i += incr; - goto delete_route_arg; + goto delete_tags_arg; } if (i + 1 < ac && av[i + 1][0] == '-' && av[i + 1][1] == '-') { @@ -23241,17 +24499,6 @@ int main(int ac, char **av) incr = 1; } } - if ((aret = argcmp(next_a, "DestinationIpRange")) == 0 || aret == '=' ) { - char *eq_ptr = strchr(next_a, '='); - if (eq_ptr) { - TRY((!*eq_ptr), "DestinationIpRange argument missing\n"); - aa = eq_ptr + 1; - incr = 1; - } - TRY(!aa, "DestinationIpRange argument missing\n"); - s->destination_ip_range = aa; // string string - - } else if ((aret = argcmp(next_a, "DryRun")) == 0 || aret == '=' ) { char *eq_ptr = strchr(next_a, '='); if (eq_ptr) { @@ -23268,134 +24515,58 @@ int main(int ac, char **av) BAD_RET("DryRun require true/false\n"); } } else - if ((aret = argcmp(next_a, "RouteTableId")) == 0 || aret == '=' ) { + if ((aret = argcmp(next_a, "ResourceIds")) == 0 || aret == '=' ) { char *eq_ptr = strchr(next_a, '='); if (eq_ptr) { - TRY((!*eq_ptr), "RouteTableId argument missing\n"); + TRY((!*eq_ptr), "ResourceIds argument missing\n"); aa = eq_ptr + 1; incr = 1; } - TRY(!aa, "RouteTableId argument missing\n"); - s->route_table_id = aa; // string string - + TRY(!aa, "ResourceIds argument missing\n"); + s->resource_ids_str = aa; + } else if (!(aret = strcmp(str, "ResourceIds[]")) || aret == '=') { + TRY(!aa, "ResourceIds[] argument missing\n"); + SET_NEXT(s->resource_ids, (aa), pa); } else - { - BAD_RET("'%s' is not a valide argument for 'DeleteRoute'\n", next_a); - } - i += incr; - goto delete_route_arg; - } - cret = osc_delete_route(&e, &r, &a); - TRY(cret, "fail to call DeleteRoute: %s\n", curl_easy_strerror(cret)); - CHK_BAD_RET(!r.buf, "connection sucessful, but empty responce\n"); - if (program_flag & OAPI_RAW_OUTPUT) - puts(r.buf); - else { - jobj = json_tokener_parse(r.buf); - puts(json_object_to_json_string_ext(jobj, - JSON_C_TO_STRING_PRETTY | JSON_C_TO_STRING_NOSLASHESCAPE | - color_flag)); - json_object_put(jobj); - } - osc_deinit_str(&r); - } else - if (!strcmp("DeletePublicIp", av[i])) { - json_object *jobj; - auto_ptr_array struct ptr_array opa = {0}; - struct ptr_array *pa = &opa; - struct osc_delete_public_ip_arg a = {0}; - struct osc_delete_public_ip_arg *s = &a; - __attribute__((cleanup(files_cnt_cleanup))) char *files_cnt[MAX_FILES_PER_CMD] = {NULL}; - int cret; - - cascade_struct = NULL; - cascade_parser = NULL; - - delete_public_ip_arg: - - if (i + 1 < ac && av[i + 1][0] == '.' && av[i + 1][1] == '.') { - char *next_a = &av[i + 1][2]; - char *aa = i + 2 < ac ? av[i + 2] : 0; - int incr = 2; - char *eq_ptr = strchr(next_a, '='); - - CHK_BAD_RET(!cascade_struct, "cascade need to be se first\n"); - if (eq_ptr) { - CHK_BAD_RET(!*eq_ptr, "cascade need an argument\n"); - incr = 1; - aa = eq_ptr + 1; - } else { - CHK_BAD_RET(!aa || aa[0] == '-', "cascade need an argument\n"); - } - STRY(cascade_parser(cascade_struct, next_a, aa, pa)); - i += incr; - goto delete_public_ip_arg; - } - - if (i + 1 < ac && av[i + 1][0] == '-' && av[i + 1][1] == '-') { - char *next_a = &av[i + 1][2]; - char *str = next_a; - char *aa = i + 2 < ac ? av[i + 2] : 0; - int aret = 0; - int incr = aa ? 2 : 1; - - if (aa && aa[0] == '-' && aa[1] == '-' && aa[2] != '-') { - if (!strcmp(aa, "--file")) { - TRY(i + 3 >= ac, "file name require"); - ++incr; - aa = read_file(files_cnt, av[i + 3]); - STRY(!aa); - } else { - aa = 0; - incr = 1; - } - } - if ((aret = argcmp(next_a, "DryRun")) == 0 || aret == '=' ) { - char *eq_ptr = strchr(next_a, '='); - if (eq_ptr) { - TRY((!*eq_ptr), "DryRun argument missing\n"); - aa = eq_ptr + 1; - incr = 1; - } - s->is_set_dry_run = 1; - if (!aa || !strcasecmp(aa, "true")) { - s->dry_run = 1; - } else if (!strcasecmp(aa, "false")) { - s->dry_run = 0; - } else { - BAD_RET("DryRun require true/false\n"); - } - } else - if ((aret = argcmp(next_a, "PublicIp")) == 0 || aret == '=' ) { + if ((aret = argcmp(next_a, "Tags")) == 0 || aret == '=' ) { char *eq_ptr = strchr(next_a, '='); if (eq_ptr) { - TRY((!*eq_ptr), "PublicIp argument missing\n"); + TRY((!*eq_ptr), "Tags argument missing\n"); aa = eq_ptr + 1; incr = 1; } - TRY(!aa, "PublicIp argument missing\n"); - s->public_ip = aa; // string string + char *dot_pos = strchr(str, '.'); - } else - if ((aret = argcmp(next_a, "PublicIpId")) == 0 || aret == '=' ) { - char *eq_ptr = strchr(next_a, '='); - if (eq_ptr) { - TRY((!*eq_ptr), "PublicIpId argument missing\n"); - aa = eq_ptr + 1; - incr = 1; - } - TRY(!aa, "PublicIpId argument missing\n"); - s->public_ip_id = aa; // string string + if (dot_pos) { + int pos; + char *endptr; + ++dot_pos; + pos = strtoul(dot_pos, &endptr, 0); + if (endptr == dot_pos) + BAD_RET("'Tags' require an index (example array ref ResourceTag.Tags.0)\n"); + else if (*endptr != '.') + BAD_RET("'Tags' require a .\n"); + TRY_ALLOC_AT(s,tags, pa, pos, sizeof(*s->tags)); + cascade_struct = &s->tags[pos]; + cascade_parser = resource_tag_parser; + if (endptr[1] == '.') { + ++endptr; + } + STRY(resource_tag_parser(&s->tags[pos], endptr + 1, aa, pa)); + } else { + TRY(!aa, "Tags argument missing\n"); + s->tags_str = aa; // array ref ResourceTag ref + } } else { - BAD_RET("'%s' is not a valide argument for 'DeletePublicIp'\n", next_a); + BAD_RET("'%s' is not a valide argument for 'DeleteTags'\n", next_a); } i += incr; - goto delete_public_ip_arg; + goto delete_tags_arg; } - cret = osc_delete_public_ip(&e, &r, &a); - TRY(cret, "fail to call DeletePublicIp: %s\n", curl_easy_strerror(cret)); + cret = osc_delete_tags(&e, &r, &a); + TRY(cret, "fail to call DeleteTags: %s\n", curl_easy_strerror(cret)); CHK_BAD_RET(!r.buf, "connection sucessful, but empty responce\n"); if (program_flag & OAPI_RAW_OUTPUT) puts(r.buf); @@ -23408,19 +24579,19 @@ int main(int ac, char **av) } osc_deinit_str(&r); } else - if (!strcmp("DeleteNic", av[i])) { + if (!strcmp("DeleteSubnet", av[i])) { json_object *jobj; auto_ptr_array struct ptr_array opa = {0}; struct ptr_array *pa = &opa; - struct osc_delete_nic_arg a = {0}; - struct osc_delete_nic_arg *s = &a; + struct osc_delete_subnet_arg a = {0}; + struct osc_delete_subnet_arg *s = &a; __attribute__((cleanup(files_cnt_cleanup))) char *files_cnt[MAX_FILES_PER_CMD] = {NULL}; int cret; cascade_struct = NULL; cascade_parser = NULL; - delete_nic_arg: + delete_subnet_arg: if (i + 1 < ac && av[i + 1][0] == '.' && av[i + 1][1] == '.') { char *next_a = &av[i + 1][2]; @@ -23438,7 +24609,7 @@ int main(int ac, char **av) } STRY(cascade_parser(cascade_struct, next_a, aa, pa)); i += incr; - goto delete_nic_arg; + goto delete_subnet_arg; } if (i + 1 < ac && av[i + 1][0] == '-' && av[i + 1][1] == '-') { @@ -23475,25 +24646,25 @@ int main(int ac, char **av) BAD_RET("DryRun require true/false\n"); } } else - if ((aret = argcmp(next_a, "NicId")) == 0 || aret == '=' ) { + if ((aret = argcmp(next_a, "SubnetId")) == 0 || aret == '=' ) { char *eq_ptr = strchr(next_a, '='); if (eq_ptr) { - TRY((!*eq_ptr), "NicId argument missing\n"); + TRY((!*eq_ptr), "SubnetId argument missing\n"); aa = eq_ptr + 1; incr = 1; } - TRY(!aa, "NicId argument missing\n"); - s->nic_id = aa; // string string + TRY(!aa, "SubnetId argument missing\n"); + s->subnet_id = aa; // string string } else { - BAD_RET("'%s' is not a valide argument for 'DeleteNic'\n", next_a); + BAD_RET("'%s' is not a valide argument for 'DeleteSubnet'\n", next_a); } i += incr; - goto delete_nic_arg; + goto delete_subnet_arg; } - cret = osc_delete_nic(&e, &r, &a); - TRY(cret, "fail to call DeleteNic: %s\n", curl_easy_strerror(cret)); + cret = osc_delete_subnet(&e, &r, &a); + TRY(cret, "fail to call DeleteSubnet: %s\n", curl_easy_strerror(cret)); CHK_BAD_RET(!r.buf, "connection sucessful, but empty responce\n"); if (program_flag & OAPI_RAW_OUTPUT) puts(r.buf); @@ -23506,19 +24677,19 @@ int main(int ac, char **av) } osc_deinit_str(&r); } else - if (!strcmp("DeleteNetPeering", av[i])) { + if (!strcmp("DeleteSnapshot", av[i])) { json_object *jobj; auto_ptr_array struct ptr_array opa = {0}; struct ptr_array *pa = &opa; - struct osc_delete_net_peering_arg a = {0}; - struct osc_delete_net_peering_arg *s = &a; + struct osc_delete_snapshot_arg a = {0}; + struct osc_delete_snapshot_arg *s = &a; __attribute__((cleanup(files_cnt_cleanup))) char *files_cnt[MAX_FILES_PER_CMD] = {NULL}; int cret; cascade_struct = NULL; cascade_parser = NULL; - delete_net_peering_arg: + delete_snapshot_arg: if (i + 1 < ac && av[i + 1][0] == '.' && av[i + 1][1] == '.') { char *next_a = &av[i + 1][2]; @@ -23536,7 +24707,7 @@ int main(int ac, char **av) } STRY(cascade_parser(cascade_struct, next_a, aa, pa)); i += incr; - goto delete_net_peering_arg; + goto delete_snapshot_arg; } if (i + 1 < ac && av[i + 1][0] == '-' && av[i + 1][1] == '-') { @@ -23573,25 +24744,25 @@ int main(int ac, char **av) BAD_RET("DryRun require true/false\n"); } } else - if ((aret = argcmp(next_a, "NetPeeringId")) == 0 || aret == '=' ) { + if ((aret = argcmp(next_a, "SnapshotId")) == 0 || aret == '=' ) { char *eq_ptr = strchr(next_a, '='); if (eq_ptr) { - TRY((!*eq_ptr), "NetPeeringId argument missing\n"); + TRY((!*eq_ptr), "SnapshotId argument missing\n"); aa = eq_ptr + 1; incr = 1; } - TRY(!aa, "NetPeeringId argument missing\n"); - s->net_peering_id = aa; // string string + TRY(!aa, "SnapshotId argument missing\n"); + s->snapshot_id = aa; // string string } else { - BAD_RET("'%s' is not a valide argument for 'DeleteNetPeering'\n", next_a); + BAD_RET("'%s' is not a valide argument for 'DeleteSnapshot'\n", next_a); } i += incr; - goto delete_net_peering_arg; + goto delete_snapshot_arg; } - cret = osc_delete_net_peering(&e, &r, &a); - TRY(cret, "fail to call DeleteNetPeering: %s\n", curl_easy_strerror(cret)); + cret = osc_delete_snapshot(&e, &r, &a); + TRY(cret, "fail to call DeleteSnapshot: %s\n", curl_easy_strerror(cret)); CHK_BAD_RET(!r.buf, "connection sucessful, but empty responce\n"); if (program_flag & OAPI_RAW_OUTPUT) puts(r.buf); @@ -23604,19 +24775,19 @@ int main(int ac, char **av) } osc_deinit_str(&r); } else - if (!strcmp("DeleteNetAccessPoint", av[i])) { + if (!strcmp("DeleteServerCertificate", av[i])) { json_object *jobj; auto_ptr_array struct ptr_array opa = {0}; struct ptr_array *pa = &opa; - struct osc_delete_net_access_point_arg a = {0}; - struct osc_delete_net_access_point_arg *s = &a; + struct osc_delete_server_certificate_arg a = {0}; + struct osc_delete_server_certificate_arg *s = &a; __attribute__((cleanup(files_cnt_cleanup))) char *files_cnt[MAX_FILES_PER_CMD] = {NULL}; int cret; cascade_struct = NULL; cascade_parser = NULL; - delete_net_access_point_arg: + delete_server_certificate_arg: if (i + 1 < ac && av[i + 1][0] == '.' && av[i + 1][1] == '.') { char *next_a = &av[i + 1][2]; @@ -23634,7 +24805,7 @@ int main(int ac, char **av) } STRY(cascade_parser(cascade_struct, next_a, aa, pa)); i += incr; - goto delete_net_access_point_arg; + goto delete_server_certificate_arg; } if (i + 1 < ac && av[i + 1][0] == '-' && av[i + 1][1] == '-') { @@ -23671,25 +24842,25 @@ int main(int ac, char **av) BAD_RET("DryRun require true/false\n"); } } else - if ((aret = argcmp(next_a, "NetAccessPointId")) == 0 || aret == '=' ) { + if ((aret = argcmp(next_a, "Name")) == 0 || aret == '=' ) { char *eq_ptr = strchr(next_a, '='); if (eq_ptr) { - TRY((!*eq_ptr), "NetAccessPointId argument missing\n"); + TRY((!*eq_ptr), "Name argument missing\n"); aa = eq_ptr + 1; incr = 1; } - TRY(!aa, "NetAccessPointId argument missing\n"); - s->net_access_point_id = aa; // string string + TRY(!aa, "Name argument missing\n"); + s->name = aa; // string string } else { - BAD_RET("'%s' is not a valide argument for 'DeleteNetAccessPoint'\n", next_a); + BAD_RET("'%s' is not a valide argument for 'DeleteServerCertificate'\n", next_a); } i += incr; - goto delete_net_access_point_arg; + goto delete_server_certificate_arg; } - cret = osc_delete_net_access_point(&e, &r, &a); - TRY(cret, "fail to call DeleteNetAccessPoint: %s\n", curl_easy_strerror(cret)); + cret = osc_delete_server_certificate(&e, &r, &a); + TRY(cret, "fail to call DeleteServerCertificate: %s\n", curl_easy_strerror(cret)); CHK_BAD_RET(!r.buf, "connection sucessful, but empty responce\n"); if (program_flag & OAPI_RAW_OUTPUT) puts(r.buf); @@ -23702,19 +24873,19 @@ int main(int ac, char **av) } osc_deinit_str(&r); } else - if (!strcmp("DeleteNet", av[i])) { + if (!strcmp("DeleteSecurityGroupRule", av[i])) { json_object *jobj; auto_ptr_array struct ptr_array opa = {0}; struct ptr_array *pa = &opa; - struct osc_delete_net_arg a = {0}; - struct osc_delete_net_arg *s = &a; + struct osc_delete_security_group_rule_arg a = {0}; + struct osc_delete_security_group_rule_arg *s = &a; __attribute__((cleanup(files_cnt_cleanup))) char *files_cnt[MAX_FILES_PER_CMD] = {NULL}; int cret; cascade_struct = NULL; cascade_parser = NULL; - delete_net_arg: + delete_security_group_rule_arg: if (i + 1 < ac && av[i + 1][0] == '.' && av[i + 1][1] == '.') { char *next_a = &av[i + 1][2]; @@ -23732,7 +24903,7 @@ int main(int ac, char **av) } STRY(cascade_parser(cascade_struct, next_a, aa, pa)); i += incr; - goto delete_net_arg; + goto delete_security_group_rule_arg; } if (i + 1 < ac && av[i + 1][0] == '-' && av[i + 1][1] == '-') { @@ -23769,25 +24940,133 @@ int main(int ac, char **av) BAD_RET("DryRun require true/false\n"); } } else - if ((aret = argcmp(next_a, "NetId")) == 0 || aret == '=' ) { + if ((aret = argcmp(next_a, "Flow")) == 0 || aret == '=' ) { char *eq_ptr = strchr(next_a, '='); if (eq_ptr) { - TRY((!*eq_ptr), "NetId argument missing\n"); + TRY((!*eq_ptr), "Flow argument missing\n"); aa = eq_ptr + 1; incr = 1; } - TRY(!aa, "NetId argument missing\n"); - s->net_id = aa; // string string + TRY(!aa, "Flow argument missing\n"); + s->flow = aa; // string string } else - { - BAD_RET("'%s' is not a valide argument for 'DeleteNet'\n", next_a); + if ((aret = argcmp(next_a, "FromPortRange")) == 0 || aret == '=' ) { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "FromPortRange argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + TRY(!aa, "FromPortRange argument missing\n"); + s->is_set_from_port_range = 1; + s->from_port_range = atoi(aa); + } else + if ((aret = argcmp(next_a, "IpProtocol")) == 0 || aret == '=' ) { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "IpProtocol argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + TRY(!aa, "IpProtocol argument missing\n"); + s->ip_protocol = aa; // string string + + } else + if ((aret = argcmp(next_a, "IpRange")) == 0 || aret == '=' ) { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "IpRange argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + TRY(!aa, "IpRange argument missing\n"); + s->ip_range = aa; // string string + + } else + if ((aret = argcmp(next_a, "Rules")) == 0 || aret == '=' ) { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "Rules argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + char *dot_pos = strchr(str, '.'); + + if (dot_pos) { + int pos; + char *endptr; + + ++dot_pos; + pos = strtoul(dot_pos, &endptr, 0); + if (endptr == dot_pos) + BAD_RET("'Rules' require an index (example array ref SecurityGroupRule.Rules.0)\n"); + else if (*endptr != '.') + BAD_RET("'Rules' require a .\n"); + TRY_ALLOC_AT(s,rules, pa, pos, sizeof(*s->rules)); + cascade_struct = &s->rules[pos]; + cascade_parser = security_group_rule_parser; + if (endptr[1] == '.') { + ++endptr; + } + STRY(security_group_rule_parser(&s->rules[pos], endptr + 1, aa, pa)); + } else { + TRY(!aa, "Rules argument missing\n"); + s->rules_str = aa; // array ref SecurityGroupRule ref + } + } else + if ((aret = argcmp(next_a, "SecurityGroupAccountIdToUnlink")) == 0 || aret == '=' ) { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "SecurityGroupAccountIdToUnlink argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + TRY(!aa, "SecurityGroupAccountIdToUnlink argument missing\n"); + s->security_group_account_id_to_unlink = aa; // string string + + } else + if ((aret = argcmp(next_a, "SecurityGroupId")) == 0 || aret == '=' ) { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "SecurityGroupId argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + TRY(!aa, "SecurityGroupId argument missing\n"); + s->security_group_id = aa; // string string + + } else + if ((aret = argcmp(next_a, "SecurityGroupNameToUnlink")) == 0 || aret == '=' ) { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "SecurityGroupNameToUnlink argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + TRY(!aa, "SecurityGroupNameToUnlink argument missing\n"); + s->security_group_name_to_unlink = aa; // string string + + } else + if ((aret = argcmp(next_a, "ToPortRange")) == 0 || aret == '=' ) { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "ToPortRange argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + TRY(!aa, "ToPortRange argument missing\n"); + s->is_set_to_port_range = 1; + s->to_port_range = atoi(aa); + } else + { + BAD_RET("'%s' is not a valide argument for 'DeleteSecurityGroupRule'\n", next_a); } i += incr; - goto delete_net_arg; + goto delete_security_group_rule_arg; } - cret = osc_delete_net(&e, &r, &a); - TRY(cret, "fail to call DeleteNet: %s\n", curl_easy_strerror(cret)); + cret = osc_delete_security_group_rule(&e, &r, &a); + TRY(cret, "fail to call DeleteSecurityGroupRule: %s\n", curl_easy_strerror(cret)); CHK_BAD_RET(!r.buf, "connection sucessful, but empty responce\n"); if (program_flag & OAPI_RAW_OUTPUT) puts(r.buf); @@ -23800,19 +25079,19 @@ int main(int ac, char **av) } osc_deinit_str(&r); } else - if (!strcmp("DeleteNatService", av[i])) { + if (!strcmp("DeleteSecurityGroup", av[i])) { json_object *jobj; auto_ptr_array struct ptr_array opa = {0}; struct ptr_array *pa = &opa; - struct osc_delete_nat_service_arg a = {0}; - struct osc_delete_nat_service_arg *s = &a; + struct osc_delete_security_group_arg a = {0}; + struct osc_delete_security_group_arg *s = &a; __attribute__((cleanup(files_cnt_cleanup))) char *files_cnt[MAX_FILES_PER_CMD] = {NULL}; int cret; cascade_struct = NULL; cascade_parser = NULL; - delete_nat_service_arg: + delete_security_group_arg: if (i + 1 < ac && av[i + 1][0] == '.' && av[i + 1][1] == '.') { char *next_a = &av[i + 1][2]; @@ -23830,7 +25109,7 @@ int main(int ac, char **av) } STRY(cascade_parser(cascade_struct, next_a, aa, pa)); i += incr; - goto delete_nat_service_arg; + goto delete_security_group_arg; } if (i + 1 < ac && av[i + 1][0] == '-' && av[i + 1][1] == '-') { @@ -23867,25 +25146,36 @@ int main(int ac, char **av) BAD_RET("DryRun require true/false\n"); } } else - if ((aret = argcmp(next_a, "NatServiceId")) == 0 || aret == '=' ) { + if ((aret = argcmp(next_a, "SecurityGroupId")) == 0 || aret == '=' ) { char *eq_ptr = strchr(next_a, '='); if (eq_ptr) { - TRY((!*eq_ptr), "NatServiceId argument missing\n"); + TRY((!*eq_ptr), "SecurityGroupId argument missing\n"); aa = eq_ptr + 1; incr = 1; } - TRY(!aa, "NatServiceId argument missing\n"); - s->nat_service_id = aa; // string string + TRY(!aa, "SecurityGroupId argument missing\n"); + s->security_group_id = aa; // string string + + } else + if ((aret = argcmp(next_a, "SecurityGroupName")) == 0 || aret == '=' ) { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "SecurityGroupName argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + TRY(!aa, "SecurityGroupName argument missing\n"); + s->security_group_name = aa; // string string } else { - BAD_RET("'%s' is not a valide argument for 'DeleteNatService'\n", next_a); + BAD_RET("'%s' is not a valide argument for 'DeleteSecurityGroup'\n", next_a); } i += incr; - goto delete_nat_service_arg; + goto delete_security_group_arg; } - cret = osc_delete_nat_service(&e, &r, &a); - TRY(cret, "fail to call DeleteNatService: %s\n", curl_easy_strerror(cret)); + cret = osc_delete_security_group(&e, &r, &a); + TRY(cret, "fail to call DeleteSecurityGroup: %s\n", curl_easy_strerror(cret)); CHK_BAD_RET(!r.buf, "connection sucessful, but empty responce\n"); if (program_flag & OAPI_RAW_OUTPUT) puts(r.buf); @@ -23898,19 +25188,19 @@ int main(int ac, char **av) } osc_deinit_str(&r); } else - if (!strcmp("DeleteLoadBalancerTags", av[i])) { + if (!strcmp("DeleteRouteTable", av[i])) { json_object *jobj; auto_ptr_array struct ptr_array opa = {0}; struct ptr_array *pa = &opa; - struct osc_delete_load_balancer_tags_arg a = {0}; - struct osc_delete_load_balancer_tags_arg *s = &a; + struct osc_delete_route_table_arg a = {0}; + struct osc_delete_route_table_arg *s = &a; __attribute__((cleanup(files_cnt_cleanup))) char *files_cnt[MAX_FILES_PER_CMD] = {NULL}; int cret; cascade_struct = NULL; cascade_parser = NULL; - delete_load_balancer_tags_arg: + delete_route_table_arg: if (i + 1 < ac && av[i + 1][0] == '.' && av[i + 1][1] == '.') { char *next_a = &av[i + 1][2]; @@ -23928,7 +25218,7 @@ int main(int ac, char **av) } STRY(cascade_parser(cascade_struct, next_a, aa, pa)); i += incr; - goto delete_load_balancer_tags_arg; + goto delete_route_table_arg; } if (i + 1 < ac && av[i + 1][0] == '-' && av[i + 1][1] == '-') { @@ -23965,58 +25255,25 @@ int main(int ac, char **av) BAD_RET("DryRun require true/false\n"); } } else - if ((aret = argcmp(next_a, "LoadBalancerNames")) == 0 || aret == '=' ) { - char *eq_ptr = strchr(next_a, '='); - if (eq_ptr) { - TRY((!*eq_ptr), "LoadBalancerNames argument missing\n"); - aa = eq_ptr + 1; - incr = 1; - } - TRY(!aa, "LoadBalancerNames argument missing\n"); - s->load_balancer_names_str = aa; - } else if (!(aret = strcmp(str, "LoadBalancerNames[]")) || aret == '=') { - TRY(!aa, "LoadBalancerNames[] argument missing\n"); - SET_NEXT(s->load_balancer_names, (aa), pa); - } else - if ((aret = argcmp(next_a, "Tags")) == 0 || aret == '=' ) { + if ((aret = argcmp(next_a, "RouteTableId")) == 0 || aret == '=' ) { char *eq_ptr = strchr(next_a, '='); if (eq_ptr) { - TRY((!*eq_ptr), "Tags argument missing\n"); + TRY((!*eq_ptr), "RouteTableId argument missing\n"); aa = eq_ptr + 1; incr = 1; } - char *dot_pos = strchr(str, '.'); - - if (dot_pos) { - int pos; - char *endptr; + TRY(!aa, "RouteTableId argument missing\n"); + s->route_table_id = aa; // string string - ++dot_pos; - pos = strtoul(dot_pos, &endptr, 0); - if (endptr == dot_pos) - BAD_RET("'Tags' require an index (example array ref ResourceLoadBalancerTag.Tags.0)\n"); - else if (*endptr != '.') - BAD_RET("'Tags' require a .\n"); - TRY_ALLOC_AT(s,tags, pa, pos, sizeof(*s->tags)); - cascade_struct = &s->tags[pos]; - cascade_parser = resource_load_balancer_tag_parser; - if (endptr[1] == '.') { - ++endptr; - } - STRY(resource_load_balancer_tag_parser(&s->tags[pos], endptr + 1, aa, pa)); - } else { - TRY(!aa, "Tags argument missing\n"); - s->tags_str = aa; // array ref ResourceLoadBalancerTag ref - } } else { - BAD_RET("'%s' is not a valide argument for 'DeleteLoadBalancerTags'\n", next_a); + BAD_RET("'%s' is not a valide argument for 'DeleteRouteTable'\n", next_a); } i += incr; - goto delete_load_balancer_tags_arg; + goto delete_route_table_arg; } - cret = osc_delete_load_balancer_tags(&e, &r, &a); - TRY(cret, "fail to call DeleteLoadBalancerTags: %s\n", curl_easy_strerror(cret)); + cret = osc_delete_route_table(&e, &r, &a); + TRY(cret, "fail to call DeleteRouteTable: %s\n", curl_easy_strerror(cret)); CHK_BAD_RET(!r.buf, "connection sucessful, but empty responce\n"); if (program_flag & OAPI_RAW_OUTPUT) puts(r.buf); @@ -24029,19 +25286,19 @@ int main(int ac, char **av) } osc_deinit_str(&r); } else - if (!strcmp("DeleteLoadBalancerPolicy", av[i])) { + if (!strcmp("DeleteRoute", av[i])) { json_object *jobj; auto_ptr_array struct ptr_array opa = {0}; struct ptr_array *pa = &opa; - struct osc_delete_load_balancer_policy_arg a = {0}; - struct osc_delete_load_balancer_policy_arg *s = &a; + struct osc_delete_route_arg a = {0}; + struct osc_delete_route_arg *s = &a; __attribute__((cleanup(files_cnt_cleanup))) char *files_cnt[MAX_FILES_PER_CMD] = {NULL}; int cret; cascade_struct = NULL; cascade_parser = NULL; - delete_load_balancer_policy_arg: + delete_route_arg: if (i + 1 < ac && av[i + 1][0] == '.' && av[i + 1][1] == '.') { char *next_a = &av[i + 1][2]; @@ -24059,7 +25316,7 @@ int main(int ac, char **av) } STRY(cascade_parser(cascade_struct, next_a, aa, pa)); i += incr; - goto delete_load_balancer_policy_arg; + goto delete_route_arg; } if (i + 1 < ac && av[i + 1][0] == '-' && av[i + 1][1] == '-') { @@ -24080,6 +25337,17 @@ int main(int ac, char **av) incr = 1; } } + if ((aret = argcmp(next_a, "DestinationIpRange")) == 0 || aret == '=' ) { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "DestinationIpRange argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + TRY(!aa, "DestinationIpRange argument missing\n"); + s->destination_ip_range = aa; // string string + + } else if ((aret = argcmp(next_a, "DryRun")) == 0 || aret == '=' ) { char *eq_ptr = strchr(next_a, '='); if (eq_ptr) { @@ -24096,36 +25364,25 @@ int main(int ac, char **av) BAD_RET("DryRun require true/false\n"); } } else - if ((aret = argcmp(next_a, "LoadBalancerName")) == 0 || aret == '=' ) { - char *eq_ptr = strchr(next_a, '='); - if (eq_ptr) { - TRY((!*eq_ptr), "LoadBalancerName argument missing\n"); - aa = eq_ptr + 1; - incr = 1; - } - TRY(!aa, "LoadBalancerName argument missing\n"); - s->load_balancer_name = aa; // string string - - } else - if ((aret = argcmp(next_a, "PolicyName")) == 0 || aret == '=' ) { + if ((aret = argcmp(next_a, "RouteTableId")) == 0 || aret == '=' ) { char *eq_ptr = strchr(next_a, '='); if (eq_ptr) { - TRY((!*eq_ptr), "PolicyName argument missing\n"); + TRY((!*eq_ptr), "RouteTableId argument missing\n"); aa = eq_ptr + 1; incr = 1; } - TRY(!aa, "PolicyName argument missing\n"); - s->policy_name = aa; // string string + TRY(!aa, "RouteTableId argument missing\n"); + s->route_table_id = aa; // string string } else { - BAD_RET("'%s' is not a valide argument for 'DeleteLoadBalancerPolicy'\n", next_a); + BAD_RET("'%s' is not a valide argument for 'DeleteRoute'\n", next_a); } i += incr; - goto delete_load_balancer_policy_arg; + goto delete_route_arg; } - cret = osc_delete_load_balancer_policy(&e, &r, &a); - TRY(cret, "fail to call DeleteLoadBalancerPolicy: %s\n", curl_easy_strerror(cret)); + cret = osc_delete_route(&e, &r, &a); + TRY(cret, "fail to call DeleteRoute: %s\n", curl_easy_strerror(cret)); CHK_BAD_RET(!r.buf, "connection sucessful, but empty responce\n"); if (program_flag & OAPI_RAW_OUTPUT) puts(r.buf); @@ -24138,19 +25395,19 @@ int main(int ac, char **av) } osc_deinit_str(&r); } else - if (!strcmp("DeleteLoadBalancerListeners", av[i])) { + if (!strcmp("DeletePublicIp", av[i])) { json_object *jobj; auto_ptr_array struct ptr_array opa = {0}; struct ptr_array *pa = &opa; - struct osc_delete_load_balancer_listeners_arg a = {0}; - struct osc_delete_load_balancer_listeners_arg *s = &a; + struct osc_delete_public_ip_arg a = {0}; + struct osc_delete_public_ip_arg *s = &a; __attribute__((cleanup(files_cnt_cleanup))) char *files_cnt[MAX_FILES_PER_CMD] = {NULL}; int cret; cascade_struct = NULL; cascade_parser = NULL; - delete_load_balancer_listeners_arg: + delete_public_ip_arg: if (i + 1 < ac && av[i + 1][0] == '.' && av[i + 1][1] == '.') { char *next_a = &av[i + 1][2]; @@ -24168,7 +25425,7 @@ int main(int ac, char **av) } STRY(cascade_parser(cascade_struct, next_a, aa, pa)); i += incr; - goto delete_load_balancer_listeners_arg; + goto delete_public_ip_arg; } if (i + 1 < ac && av[i + 1][0] == '-' && av[i + 1][1] == '-') { @@ -24205,38 +25462,36 @@ int main(int ac, char **av) BAD_RET("DryRun require true/false\n"); } } else - if ((aret = argcmp(next_a, "LoadBalancerName")) == 0 || aret == '=' ) { + if ((aret = argcmp(next_a, "PublicIp")) == 0 || aret == '=' ) { char *eq_ptr = strchr(next_a, '='); if (eq_ptr) { - TRY((!*eq_ptr), "LoadBalancerName argument missing\n"); + TRY((!*eq_ptr), "PublicIp argument missing\n"); aa = eq_ptr + 1; incr = 1; } - TRY(!aa, "LoadBalancerName argument missing\n"); - s->load_balancer_name = aa; // string string + TRY(!aa, "PublicIp argument missing\n"); + s->public_ip = aa; // string string } else - if ((aret = argcmp(next_a, "LoadBalancerPorts")) == 0 || aret == '=' ) { + if ((aret = argcmp(next_a, "PublicIpId")) == 0 || aret == '=' ) { char *eq_ptr = strchr(next_a, '='); if (eq_ptr) { - TRY((!*eq_ptr), "LoadBalancerPorts argument missing\n"); + TRY((!*eq_ptr), "PublicIpId argument missing\n"); aa = eq_ptr + 1; incr = 1; } - TRY(!aa, "LoadBalancerPorts argument missing\n"); - s->load_balancer_ports_str = aa; - } else if (!(aret = strcmp(str, "LoadBalancerPorts[]")) || aret == '=') { - TRY(!aa, "LoadBalancerPorts[] argument missing\n"); - SET_NEXT(s->load_balancer_ports, atoi(aa), pa); + TRY(!aa, "PublicIpId argument missing\n"); + s->public_ip_id = aa; // string string + } else { - BAD_RET("'%s' is not a valide argument for 'DeleteLoadBalancerListeners'\n", next_a); + BAD_RET("'%s' is not a valide argument for 'DeletePublicIp'\n", next_a); } i += incr; - goto delete_load_balancer_listeners_arg; + goto delete_public_ip_arg; } - cret = osc_delete_load_balancer_listeners(&e, &r, &a); - TRY(cret, "fail to call DeleteLoadBalancerListeners: %s\n", curl_easy_strerror(cret)); + cret = osc_delete_public_ip(&e, &r, &a); + TRY(cret, "fail to call DeletePublicIp: %s\n", curl_easy_strerror(cret)); CHK_BAD_RET(!r.buf, "connection sucessful, but empty responce\n"); if (program_flag & OAPI_RAW_OUTPUT) puts(r.buf); @@ -24249,19 +25504,19 @@ int main(int ac, char **av) } osc_deinit_str(&r); } else - if (!strcmp("DeleteLoadBalancer", av[i])) { + if (!strcmp("DeletePolicyVersion", av[i])) { json_object *jobj; auto_ptr_array struct ptr_array opa = {0}; struct ptr_array *pa = &opa; - struct osc_delete_load_balancer_arg a = {0}; - struct osc_delete_load_balancer_arg *s = &a; + struct osc_delete_policy_version_arg a = {0}; + struct osc_delete_policy_version_arg *s = &a; __attribute__((cleanup(files_cnt_cleanup))) char *files_cnt[MAX_FILES_PER_CMD] = {NULL}; int cret; cascade_struct = NULL; cascade_parser = NULL; - delete_load_balancer_arg: + delete_policy_version_arg: if (i + 1 < ac && av[i + 1][0] == '.' && av[i + 1][1] == '.') { char *next_a = &av[i + 1][2]; @@ -24279,7 +25534,7 @@ int main(int ac, char **av) } STRY(cascade_parser(cascade_struct, next_a, aa, pa)); i += incr; - goto delete_load_balancer_arg; + goto delete_policy_version_arg; } if (i + 1 < ac && av[i + 1][0] == '-' && av[i + 1][1] == '-') { @@ -24300,41 +25555,36 @@ int main(int ac, char **av) incr = 1; } } - if ((aret = argcmp(next_a, "DryRun")) == 0 || aret == '=' ) { + if ((aret = argcmp(next_a, "PolicyOrn")) == 0 || aret == '=' ) { char *eq_ptr = strchr(next_a, '='); if (eq_ptr) { - TRY((!*eq_ptr), "DryRun argument missing\n"); + TRY((!*eq_ptr), "PolicyOrn argument missing\n"); aa = eq_ptr + 1; incr = 1; } - s->is_set_dry_run = 1; - if (!aa || !strcasecmp(aa, "true")) { - s->dry_run = 1; - } else if (!strcasecmp(aa, "false")) { - s->dry_run = 0; - } else { - BAD_RET("DryRun require true/false\n"); - } - } else - if ((aret = argcmp(next_a, "LoadBalancerName")) == 0 || aret == '=' ) { + TRY(!aa, "PolicyOrn argument missing\n"); + s->policy_orn = aa; // string string + + } else + if ((aret = argcmp(next_a, "VersionId")) == 0 || aret == '=' ) { char *eq_ptr = strchr(next_a, '='); if (eq_ptr) { - TRY((!*eq_ptr), "LoadBalancerName argument missing\n"); + TRY((!*eq_ptr), "VersionId argument missing\n"); aa = eq_ptr + 1; incr = 1; } - TRY(!aa, "LoadBalancerName argument missing\n"); - s->load_balancer_name = aa; // string string + TRY(!aa, "VersionId argument missing\n"); + s->version_id = aa; // string string } else { - BAD_RET("'%s' is not a valide argument for 'DeleteLoadBalancer'\n", next_a); + BAD_RET("'%s' is not a valide argument for 'DeletePolicyVersion'\n", next_a); } i += incr; - goto delete_load_balancer_arg; + goto delete_policy_version_arg; } - cret = osc_delete_load_balancer(&e, &r, &a); - TRY(cret, "fail to call DeleteLoadBalancer: %s\n", curl_easy_strerror(cret)); + cret = osc_delete_policy_version(&e, &r, &a); + TRY(cret, "fail to call DeletePolicyVersion: %s\n", curl_easy_strerror(cret)); CHK_BAD_RET(!r.buf, "connection sucessful, but empty responce\n"); if (program_flag & OAPI_RAW_OUTPUT) puts(r.buf); @@ -24347,19 +25597,19 @@ int main(int ac, char **av) } osc_deinit_str(&r); } else - if (!strcmp("DeleteListenerRule", av[i])) { + if (!strcmp("DeletePolicy", av[i])) { json_object *jobj; auto_ptr_array struct ptr_array opa = {0}; struct ptr_array *pa = &opa; - struct osc_delete_listener_rule_arg a = {0}; - struct osc_delete_listener_rule_arg *s = &a; + struct osc_delete_policy_arg a = {0}; + struct osc_delete_policy_arg *s = &a; __attribute__((cleanup(files_cnt_cleanup))) char *files_cnt[MAX_FILES_PER_CMD] = {NULL}; int cret; cascade_struct = NULL; cascade_parser = NULL; - delete_listener_rule_arg: + delete_policy_arg: if (i + 1 < ac && av[i + 1][0] == '.' && av[i + 1][1] == '.') { char *next_a = &av[i + 1][2]; @@ -24377,7 +25627,7 @@ int main(int ac, char **av) } STRY(cascade_parser(cascade_struct, next_a, aa, pa)); i += incr; - goto delete_listener_rule_arg; + goto delete_policy_arg; } if (i + 1 < ac && av[i + 1][0] == '-' && av[i + 1][1] == '-') { @@ -24414,25 +25664,25 @@ int main(int ac, char **av) BAD_RET("DryRun require true/false\n"); } } else - if ((aret = argcmp(next_a, "ListenerRuleName")) == 0 || aret == '=' ) { + if ((aret = argcmp(next_a, "PolicyOrn")) == 0 || aret == '=' ) { char *eq_ptr = strchr(next_a, '='); if (eq_ptr) { - TRY((!*eq_ptr), "ListenerRuleName argument missing\n"); + TRY((!*eq_ptr), "PolicyOrn argument missing\n"); aa = eq_ptr + 1; incr = 1; } - TRY(!aa, "ListenerRuleName argument missing\n"); - s->listener_rule_name = aa; // string string + TRY(!aa, "PolicyOrn argument missing\n"); + s->policy_orn = aa; // string string } else { - BAD_RET("'%s' is not a valide argument for 'DeleteListenerRule'\n", next_a); + BAD_RET("'%s' is not a valide argument for 'DeletePolicy'\n", next_a); } i += incr; - goto delete_listener_rule_arg; + goto delete_policy_arg; } - cret = osc_delete_listener_rule(&e, &r, &a); - TRY(cret, "fail to call DeleteListenerRule: %s\n", curl_easy_strerror(cret)); + cret = osc_delete_policy(&e, &r, &a); + TRY(cret, "fail to call DeletePolicy: %s\n", curl_easy_strerror(cret)); CHK_BAD_RET(!r.buf, "connection sucessful, but empty responce\n"); if (program_flag & OAPI_RAW_OUTPUT) puts(r.buf); @@ -24445,19 +25695,19 @@ int main(int ac, char **av) } osc_deinit_str(&r); } else - if (!strcmp("DeleteKeypair", av[i])) { + if (!strcmp("DeleteNic", av[i])) { json_object *jobj; auto_ptr_array struct ptr_array opa = {0}; struct ptr_array *pa = &opa; - struct osc_delete_keypair_arg a = {0}; - struct osc_delete_keypair_arg *s = &a; + struct osc_delete_nic_arg a = {0}; + struct osc_delete_nic_arg *s = &a; __attribute__((cleanup(files_cnt_cleanup))) char *files_cnt[MAX_FILES_PER_CMD] = {NULL}; int cret; cascade_struct = NULL; cascade_parser = NULL; - delete_keypair_arg: + delete_nic_arg: if (i + 1 < ac && av[i + 1][0] == '.' && av[i + 1][1] == '.') { char *next_a = &av[i + 1][2]; @@ -24475,7 +25725,7 @@ int main(int ac, char **av) } STRY(cascade_parser(cascade_struct, next_a, aa, pa)); i += incr; - goto delete_keypair_arg; + goto delete_nic_arg; } if (i + 1 < ac && av[i + 1][0] == '-' && av[i + 1][1] == '-') { @@ -24512,25 +25762,25 @@ int main(int ac, char **av) BAD_RET("DryRun require true/false\n"); } } else - if ((aret = argcmp(next_a, "KeypairName")) == 0 || aret == '=' ) { + if ((aret = argcmp(next_a, "NicId")) == 0 || aret == '=' ) { char *eq_ptr = strchr(next_a, '='); if (eq_ptr) { - TRY((!*eq_ptr), "KeypairName argument missing\n"); + TRY((!*eq_ptr), "NicId argument missing\n"); aa = eq_ptr + 1; incr = 1; } - TRY(!aa, "KeypairName argument missing\n"); - s->keypair_name = aa; // string string + TRY(!aa, "NicId argument missing\n"); + s->nic_id = aa; // string string } else { - BAD_RET("'%s' is not a valide argument for 'DeleteKeypair'\n", next_a); + BAD_RET("'%s' is not a valide argument for 'DeleteNic'\n", next_a); } i += incr; - goto delete_keypair_arg; + goto delete_nic_arg; } - cret = osc_delete_keypair(&e, &r, &a); - TRY(cret, "fail to call DeleteKeypair: %s\n", curl_easy_strerror(cret)); + cret = osc_delete_nic(&e, &r, &a); + TRY(cret, "fail to call DeleteNic: %s\n", curl_easy_strerror(cret)); CHK_BAD_RET(!r.buf, "connection sucessful, but empty responce\n"); if (program_flag & OAPI_RAW_OUTPUT) puts(r.buf); @@ -24543,19 +25793,19 @@ int main(int ac, char **av) } osc_deinit_str(&r); } else - if (!strcmp("DeleteInternetService", av[i])) { + if (!strcmp("DeleteNetPeering", av[i])) { json_object *jobj; auto_ptr_array struct ptr_array opa = {0}; struct ptr_array *pa = &opa; - struct osc_delete_internet_service_arg a = {0}; - struct osc_delete_internet_service_arg *s = &a; + struct osc_delete_net_peering_arg a = {0}; + struct osc_delete_net_peering_arg *s = &a; __attribute__((cleanup(files_cnt_cleanup))) char *files_cnt[MAX_FILES_PER_CMD] = {NULL}; int cret; cascade_struct = NULL; cascade_parser = NULL; - delete_internet_service_arg: + delete_net_peering_arg: if (i + 1 < ac && av[i + 1][0] == '.' && av[i + 1][1] == '.') { char *next_a = &av[i + 1][2]; @@ -24573,7 +25823,7 @@ int main(int ac, char **av) } STRY(cascade_parser(cascade_struct, next_a, aa, pa)); i += incr; - goto delete_internet_service_arg; + goto delete_net_peering_arg; } if (i + 1 < ac && av[i + 1][0] == '-' && av[i + 1][1] == '-') { @@ -24610,25 +25860,25 @@ int main(int ac, char **av) BAD_RET("DryRun require true/false\n"); } } else - if ((aret = argcmp(next_a, "InternetServiceId")) == 0 || aret == '=' ) { + if ((aret = argcmp(next_a, "NetPeeringId")) == 0 || aret == '=' ) { char *eq_ptr = strchr(next_a, '='); if (eq_ptr) { - TRY((!*eq_ptr), "InternetServiceId argument missing\n"); + TRY((!*eq_ptr), "NetPeeringId argument missing\n"); aa = eq_ptr + 1; incr = 1; } - TRY(!aa, "InternetServiceId argument missing\n"); - s->internet_service_id = aa; // string string + TRY(!aa, "NetPeeringId argument missing\n"); + s->net_peering_id = aa; // string string } else { - BAD_RET("'%s' is not a valide argument for 'DeleteInternetService'\n", next_a); + BAD_RET("'%s' is not a valide argument for 'DeleteNetPeering'\n", next_a); } i += incr; - goto delete_internet_service_arg; + goto delete_net_peering_arg; } - cret = osc_delete_internet_service(&e, &r, &a); - TRY(cret, "fail to call DeleteInternetService: %s\n", curl_easy_strerror(cret)); + cret = osc_delete_net_peering(&e, &r, &a); + TRY(cret, "fail to call DeleteNetPeering: %s\n", curl_easy_strerror(cret)); CHK_BAD_RET(!r.buf, "connection sucessful, but empty responce\n"); if (program_flag & OAPI_RAW_OUTPUT) puts(r.buf); @@ -24641,19 +25891,19 @@ int main(int ac, char **av) } osc_deinit_str(&r); } else - if (!strcmp("DeleteImage", av[i])) { + if (!strcmp("DeleteNetAccessPoint", av[i])) { json_object *jobj; auto_ptr_array struct ptr_array opa = {0}; struct ptr_array *pa = &opa; - struct osc_delete_image_arg a = {0}; - struct osc_delete_image_arg *s = &a; + struct osc_delete_net_access_point_arg a = {0}; + struct osc_delete_net_access_point_arg *s = &a; __attribute__((cleanup(files_cnt_cleanup))) char *files_cnt[MAX_FILES_PER_CMD] = {NULL}; int cret; cascade_struct = NULL; cascade_parser = NULL; - delete_image_arg: + delete_net_access_point_arg: if (i + 1 < ac && av[i + 1][0] == '.' && av[i + 1][1] == '.') { char *next_a = &av[i + 1][2]; @@ -24671,7 +25921,7 @@ int main(int ac, char **av) } STRY(cascade_parser(cascade_struct, next_a, aa, pa)); i += incr; - goto delete_image_arg; + goto delete_net_access_point_arg; } if (i + 1 < ac && av[i + 1][0] == '-' && av[i + 1][1] == '-') { @@ -24708,25 +25958,25 @@ int main(int ac, char **av) BAD_RET("DryRun require true/false\n"); } } else - if ((aret = argcmp(next_a, "ImageId")) == 0 || aret == '=' ) { + if ((aret = argcmp(next_a, "NetAccessPointId")) == 0 || aret == '=' ) { char *eq_ptr = strchr(next_a, '='); if (eq_ptr) { - TRY((!*eq_ptr), "ImageId argument missing\n"); + TRY((!*eq_ptr), "NetAccessPointId argument missing\n"); aa = eq_ptr + 1; incr = 1; } - TRY(!aa, "ImageId argument missing\n"); - s->image_id = aa; // string string + TRY(!aa, "NetAccessPointId argument missing\n"); + s->net_access_point_id = aa; // string string } else { - BAD_RET("'%s' is not a valide argument for 'DeleteImage'\n", next_a); + BAD_RET("'%s' is not a valide argument for 'DeleteNetAccessPoint'\n", next_a); } i += incr; - goto delete_image_arg; + goto delete_net_access_point_arg; } - cret = osc_delete_image(&e, &r, &a); - TRY(cret, "fail to call DeleteImage: %s\n", curl_easy_strerror(cret)); + cret = osc_delete_net_access_point(&e, &r, &a); + TRY(cret, "fail to call DeleteNetAccessPoint: %s\n", curl_easy_strerror(cret)); CHK_BAD_RET(!r.buf, "connection sucessful, but empty responce\n"); if (program_flag & OAPI_RAW_OUTPUT) puts(r.buf); @@ -24739,19 +25989,19 @@ int main(int ac, char **av) } osc_deinit_str(&r); } else - if (!strcmp("DeleteFlexibleGpu", av[i])) { + if (!strcmp("DeleteNet", av[i])) { json_object *jobj; auto_ptr_array struct ptr_array opa = {0}; struct ptr_array *pa = &opa; - struct osc_delete_flexible_gpu_arg a = {0}; - struct osc_delete_flexible_gpu_arg *s = &a; + struct osc_delete_net_arg a = {0}; + struct osc_delete_net_arg *s = &a; __attribute__((cleanup(files_cnt_cleanup))) char *files_cnt[MAX_FILES_PER_CMD] = {NULL}; int cret; cascade_struct = NULL; cascade_parser = NULL; - delete_flexible_gpu_arg: + delete_net_arg: if (i + 1 < ac && av[i + 1][0] == '.' && av[i + 1][1] == '.') { char *next_a = &av[i + 1][2]; @@ -24769,7 +26019,7 @@ int main(int ac, char **av) } STRY(cascade_parser(cascade_struct, next_a, aa, pa)); i += incr; - goto delete_flexible_gpu_arg; + goto delete_net_arg; } if (i + 1 < ac && av[i + 1][0] == '-' && av[i + 1][1] == '-') { @@ -24806,25 +26056,25 @@ int main(int ac, char **av) BAD_RET("DryRun require true/false\n"); } } else - if ((aret = argcmp(next_a, "FlexibleGpuId")) == 0 || aret == '=' ) { + if ((aret = argcmp(next_a, "NetId")) == 0 || aret == '=' ) { char *eq_ptr = strchr(next_a, '='); if (eq_ptr) { - TRY((!*eq_ptr), "FlexibleGpuId argument missing\n"); + TRY((!*eq_ptr), "NetId argument missing\n"); aa = eq_ptr + 1; incr = 1; } - TRY(!aa, "FlexibleGpuId argument missing\n"); - s->flexible_gpu_id = aa; // string string + TRY(!aa, "NetId argument missing\n"); + s->net_id = aa; // string string } else { - BAD_RET("'%s' is not a valide argument for 'DeleteFlexibleGpu'\n", next_a); + BAD_RET("'%s' is not a valide argument for 'DeleteNet'\n", next_a); } i += incr; - goto delete_flexible_gpu_arg; + goto delete_net_arg; } - cret = osc_delete_flexible_gpu(&e, &r, &a); - TRY(cret, "fail to call DeleteFlexibleGpu: %s\n", curl_easy_strerror(cret)); + cret = osc_delete_net(&e, &r, &a); + TRY(cret, "fail to call DeleteNet: %s\n", curl_easy_strerror(cret)); CHK_BAD_RET(!r.buf, "connection sucessful, but empty responce\n"); if (program_flag & OAPI_RAW_OUTPUT) puts(r.buf); @@ -24837,19 +26087,19 @@ int main(int ac, char **av) } osc_deinit_str(&r); } else - if (!strcmp("DeleteExportTask", av[i])) { + if (!strcmp("DeleteNatService", av[i])) { json_object *jobj; auto_ptr_array struct ptr_array opa = {0}; struct ptr_array *pa = &opa; - struct osc_delete_export_task_arg a = {0}; - struct osc_delete_export_task_arg *s = &a; + struct osc_delete_nat_service_arg a = {0}; + struct osc_delete_nat_service_arg *s = &a; __attribute__((cleanup(files_cnt_cleanup))) char *files_cnt[MAX_FILES_PER_CMD] = {NULL}; int cret; cascade_struct = NULL; cascade_parser = NULL; - delete_export_task_arg: + delete_nat_service_arg: if (i + 1 < ac && av[i + 1][0] == '.' && av[i + 1][1] == '.') { char *next_a = &av[i + 1][2]; @@ -24867,7 +26117,7 @@ int main(int ac, char **av) } STRY(cascade_parser(cascade_struct, next_a, aa, pa)); i += incr; - goto delete_export_task_arg; + goto delete_nat_service_arg; } if (i + 1 < ac && av[i + 1][0] == '-' && av[i + 1][1] == '-') { @@ -24904,25 +26154,25 @@ int main(int ac, char **av) BAD_RET("DryRun require true/false\n"); } } else - if ((aret = argcmp(next_a, "ExportTaskId")) == 0 || aret == '=' ) { + if ((aret = argcmp(next_a, "NatServiceId")) == 0 || aret == '=' ) { char *eq_ptr = strchr(next_a, '='); if (eq_ptr) { - TRY((!*eq_ptr), "ExportTaskId argument missing\n"); + TRY((!*eq_ptr), "NatServiceId argument missing\n"); aa = eq_ptr + 1; incr = 1; } - TRY(!aa, "ExportTaskId argument missing\n"); - s->export_task_id = aa; // string string + TRY(!aa, "NatServiceId argument missing\n"); + s->nat_service_id = aa; // string string } else { - BAD_RET("'%s' is not a valide argument for 'DeleteExportTask'\n", next_a); + BAD_RET("'%s' is not a valide argument for 'DeleteNatService'\n", next_a); } i += incr; - goto delete_export_task_arg; + goto delete_nat_service_arg; } - cret = osc_delete_export_task(&e, &r, &a); - TRY(cret, "fail to call DeleteExportTask: %s\n", curl_easy_strerror(cret)); + cret = osc_delete_nat_service(&e, &r, &a); + TRY(cret, "fail to call DeleteNatService: %s\n", curl_easy_strerror(cret)); CHK_BAD_RET(!r.buf, "connection sucessful, but empty responce\n"); if (program_flag & OAPI_RAW_OUTPUT) puts(r.buf); @@ -24935,19 +26185,19 @@ int main(int ac, char **av) } osc_deinit_str(&r); } else - if (!strcmp("DeleteDirectLinkInterface", av[i])) { + if (!strcmp("DeleteLoadBalancerTags", av[i])) { json_object *jobj; auto_ptr_array struct ptr_array opa = {0}; struct ptr_array *pa = &opa; - struct osc_delete_direct_link_interface_arg a = {0}; - struct osc_delete_direct_link_interface_arg *s = &a; + struct osc_delete_load_balancer_tags_arg a = {0}; + struct osc_delete_load_balancer_tags_arg *s = &a; __attribute__((cleanup(files_cnt_cleanup))) char *files_cnt[MAX_FILES_PER_CMD] = {NULL}; int cret; cascade_struct = NULL; cascade_parser = NULL; - delete_direct_link_interface_arg: + delete_load_balancer_tags_arg: if (i + 1 < ac && av[i + 1][0] == '.' && av[i + 1][1] == '.') { char *next_a = &av[i + 1][2]; @@ -24965,7 +26215,7 @@ int main(int ac, char **av) } STRY(cascade_parser(cascade_struct, next_a, aa, pa)); i += incr; - goto delete_direct_link_interface_arg; + goto delete_load_balancer_tags_arg; } if (i + 1 < ac && av[i + 1][0] == '-' && av[i + 1][1] == '-') { @@ -24986,17 +26236,6 @@ int main(int ac, char **av) incr = 1; } } - if ((aret = argcmp(next_a, "DirectLinkInterfaceId")) == 0 || aret == '=' ) { - char *eq_ptr = strchr(next_a, '='); - if (eq_ptr) { - TRY((!*eq_ptr), "DirectLinkInterfaceId argument missing\n"); - aa = eq_ptr + 1; - incr = 1; - } - TRY(!aa, "DirectLinkInterfaceId argument missing\n"); - s->direct_link_interface_id = aa; // string string - - } else if ((aret = argcmp(next_a, "DryRun")) == 0 || aret == '=' ) { char *eq_ptr = strchr(next_a, '='); if (eq_ptr) { @@ -25013,39 +26252,83 @@ int main(int ac, char **av) BAD_RET("DryRun require true/false\n"); } } else - { - BAD_RET("'%s' is not a valide argument for 'DeleteDirectLinkInterface'\n", next_a); - } - i += incr; - goto delete_direct_link_interface_arg; - } - cret = osc_delete_direct_link_interface(&e, &r, &a); - TRY(cret, "fail to call DeleteDirectLinkInterface: %s\n", curl_easy_strerror(cret)); - CHK_BAD_RET(!r.buf, "connection sucessful, but empty responce\n"); - if (program_flag & OAPI_RAW_OUTPUT) - puts(r.buf); - else { - jobj = json_tokener_parse(r.buf); - puts(json_object_to_json_string_ext(jobj, - JSON_C_TO_STRING_PRETTY | JSON_C_TO_STRING_NOSLASHESCAPE | - color_flag)); - json_object_put(jobj); - } - osc_deinit_str(&r); - } else - if (!strcmp("DeleteDirectLink", av[i])) { - json_object *jobj; - auto_ptr_array struct ptr_array opa = {0}; - struct ptr_array *pa = &opa; - struct osc_delete_direct_link_arg a = {0}; - struct osc_delete_direct_link_arg *s = &a; + if ((aret = argcmp(next_a, "LoadBalancerNames")) == 0 || aret == '=' ) { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "LoadBalancerNames argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + TRY(!aa, "LoadBalancerNames argument missing\n"); + s->load_balancer_names_str = aa; + } else if (!(aret = strcmp(str, "LoadBalancerNames[]")) || aret == '=') { + TRY(!aa, "LoadBalancerNames[] argument missing\n"); + SET_NEXT(s->load_balancer_names, (aa), pa); + } else + if ((aret = argcmp(next_a, "Tags")) == 0 || aret == '=' ) { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "Tags argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + char *dot_pos = strchr(str, '.'); + + if (dot_pos) { + int pos; + char *endptr; + + ++dot_pos; + pos = strtoul(dot_pos, &endptr, 0); + if (endptr == dot_pos) + BAD_RET("'Tags' require an index (example array ref ResourceLoadBalancerTag.Tags.0)\n"); + else if (*endptr != '.') + BAD_RET("'Tags' require a .\n"); + TRY_ALLOC_AT(s,tags, pa, pos, sizeof(*s->tags)); + cascade_struct = &s->tags[pos]; + cascade_parser = resource_load_balancer_tag_parser; + if (endptr[1] == '.') { + ++endptr; + } + STRY(resource_load_balancer_tag_parser(&s->tags[pos], endptr + 1, aa, pa)); + } else { + TRY(!aa, "Tags argument missing\n"); + s->tags_str = aa; // array ref ResourceLoadBalancerTag ref + } + } else + { + BAD_RET("'%s' is not a valide argument for 'DeleteLoadBalancerTags'\n", next_a); + } + i += incr; + goto delete_load_balancer_tags_arg; + } + cret = osc_delete_load_balancer_tags(&e, &r, &a); + TRY(cret, "fail to call DeleteLoadBalancerTags: %s\n", curl_easy_strerror(cret)); + CHK_BAD_RET(!r.buf, "connection sucessful, but empty responce\n"); + if (program_flag & OAPI_RAW_OUTPUT) + puts(r.buf); + else { + jobj = json_tokener_parse(r.buf); + puts(json_object_to_json_string_ext(jobj, + JSON_C_TO_STRING_PRETTY | JSON_C_TO_STRING_NOSLASHESCAPE | + color_flag)); + json_object_put(jobj); + } + osc_deinit_str(&r); + } else + if (!strcmp("DeleteLoadBalancerPolicy", av[i])) { + json_object *jobj; + auto_ptr_array struct ptr_array opa = {0}; + struct ptr_array *pa = &opa; + struct osc_delete_load_balancer_policy_arg a = {0}; + struct osc_delete_load_balancer_policy_arg *s = &a; __attribute__((cleanup(files_cnt_cleanup))) char *files_cnt[MAX_FILES_PER_CMD] = {NULL}; int cret; cascade_struct = NULL; cascade_parser = NULL; - delete_direct_link_arg: + delete_load_balancer_policy_arg: if (i + 1 < ac && av[i + 1][0] == '.' && av[i + 1][1] == '.') { char *next_a = &av[i + 1][2]; @@ -25063,7 +26346,7 @@ int main(int ac, char **av) } STRY(cascade_parser(cascade_struct, next_a, aa, pa)); i += incr; - goto delete_direct_link_arg; + goto delete_load_balancer_policy_arg; } if (i + 1 < ac && av[i + 1][0] == '-' && av[i + 1][1] == '-') { @@ -25084,17 +26367,6 @@ int main(int ac, char **av) incr = 1; } } - if ((aret = argcmp(next_a, "DirectLinkId")) == 0 || aret == '=' ) { - char *eq_ptr = strchr(next_a, '='); - if (eq_ptr) { - TRY((!*eq_ptr), "DirectLinkId argument missing\n"); - aa = eq_ptr + 1; - incr = 1; - } - TRY(!aa, "DirectLinkId argument missing\n"); - s->direct_link_id = aa; // string string - - } else if ((aret = argcmp(next_a, "DryRun")) == 0 || aret == '=' ) { char *eq_ptr = strchr(next_a, '='); if (eq_ptr) { @@ -25111,14 +26383,36 @@ int main(int ac, char **av) BAD_RET("DryRun require true/false\n"); } } else + if ((aret = argcmp(next_a, "LoadBalancerName")) == 0 || aret == '=' ) { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "LoadBalancerName argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + TRY(!aa, "LoadBalancerName argument missing\n"); + s->load_balancer_name = aa; // string string + + } else + if ((aret = argcmp(next_a, "PolicyName")) == 0 || aret == '=' ) { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "PolicyName argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + TRY(!aa, "PolicyName argument missing\n"); + s->policy_name = aa; // string string + + } else { - BAD_RET("'%s' is not a valide argument for 'DeleteDirectLink'\n", next_a); + BAD_RET("'%s' is not a valide argument for 'DeleteLoadBalancerPolicy'\n", next_a); } i += incr; - goto delete_direct_link_arg; + goto delete_load_balancer_policy_arg; } - cret = osc_delete_direct_link(&e, &r, &a); - TRY(cret, "fail to call DeleteDirectLink: %s\n", curl_easy_strerror(cret)); + cret = osc_delete_load_balancer_policy(&e, &r, &a); + TRY(cret, "fail to call DeleteLoadBalancerPolicy: %s\n", curl_easy_strerror(cret)); CHK_BAD_RET(!r.buf, "connection sucessful, but empty responce\n"); if (program_flag & OAPI_RAW_OUTPUT) puts(r.buf); @@ -25131,19 +26425,19 @@ int main(int ac, char **av) } osc_deinit_str(&r); } else - if (!strcmp("DeleteDhcpOptions", av[i])) { + if (!strcmp("DeleteLoadBalancerListeners", av[i])) { json_object *jobj; auto_ptr_array struct ptr_array opa = {0}; struct ptr_array *pa = &opa; - struct osc_delete_dhcp_options_arg a = {0}; - struct osc_delete_dhcp_options_arg *s = &a; + struct osc_delete_load_balancer_listeners_arg a = {0}; + struct osc_delete_load_balancer_listeners_arg *s = &a; __attribute__((cleanup(files_cnt_cleanup))) char *files_cnt[MAX_FILES_PER_CMD] = {NULL}; int cret; cascade_struct = NULL; cascade_parser = NULL; - delete_dhcp_options_arg: + delete_load_balancer_listeners_arg: if (i + 1 < ac && av[i + 1][0] == '.' && av[i + 1][1] == '.') { char *next_a = &av[i + 1][2]; @@ -25161,7 +26455,7 @@ int main(int ac, char **av) } STRY(cascade_parser(cascade_struct, next_a, aa, pa)); i += incr; - goto delete_dhcp_options_arg; + goto delete_load_balancer_listeners_arg; } if (i + 1 < ac && av[i + 1][0] == '-' && av[i + 1][1] == '-') { @@ -25182,17 +26476,6 @@ int main(int ac, char **av) incr = 1; } } - if ((aret = argcmp(next_a, "DhcpOptionsSetId")) == 0 || aret == '=' ) { - char *eq_ptr = strchr(next_a, '='); - if (eq_ptr) { - TRY((!*eq_ptr), "DhcpOptionsSetId argument missing\n"); - aa = eq_ptr + 1; - incr = 1; - } - TRY(!aa, "DhcpOptionsSetId argument missing\n"); - s->dhcp_options_set_id = aa; // string string - - } else if ((aret = argcmp(next_a, "DryRun")) == 0 || aret == '=' ) { char *eq_ptr = strchr(next_a, '='); if (eq_ptr) { @@ -25209,14 +26492,38 @@ int main(int ac, char **av) BAD_RET("DryRun require true/false\n"); } } else + if ((aret = argcmp(next_a, "LoadBalancerName")) == 0 || aret == '=' ) { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "LoadBalancerName argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + TRY(!aa, "LoadBalancerName argument missing\n"); + s->load_balancer_name = aa; // string string + + } else + if ((aret = argcmp(next_a, "LoadBalancerPorts")) == 0 || aret == '=' ) { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "LoadBalancerPorts argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + TRY(!aa, "LoadBalancerPorts argument missing\n"); + s->load_balancer_ports_str = aa; + } else if (!(aret = strcmp(str, "LoadBalancerPorts[]")) || aret == '=') { + TRY(!aa, "LoadBalancerPorts[] argument missing\n"); + SET_NEXT(s->load_balancer_ports, atoi(aa), pa); + } else { - BAD_RET("'%s' is not a valide argument for 'DeleteDhcpOptions'\n", next_a); + BAD_RET("'%s' is not a valide argument for 'DeleteLoadBalancerListeners'\n", next_a); } i += incr; - goto delete_dhcp_options_arg; + goto delete_load_balancer_listeners_arg; } - cret = osc_delete_dhcp_options(&e, &r, &a); - TRY(cret, "fail to call DeleteDhcpOptions: %s\n", curl_easy_strerror(cret)); + cret = osc_delete_load_balancer_listeners(&e, &r, &a); + TRY(cret, "fail to call DeleteLoadBalancerListeners: %s\n", curl_easy_strerror(cret)); CHK_BAD_RET(!r.buf, "connection sucessful, but empty responce\n"); if (program_flag & OAPI_RAW_OUTPUT) puts(r.buf); @@ -25229,19 +26536,19 @@ int main(int ac, char **av) } osc_deinit_str(&r); } else - if (!strcmp("DeleteClientGateway", av[i])) { + if (!strcmp("DeleteLoadBalancer", av[i])) { json_object *jobj; auto_ptr_array struct ptr_array opa = {0}; struct ptr_array *pa = &opa; - struct osc_delete_client_gateway_arg a = {0}; - struct osc_delete_client_gateway_arg *s = &a; + struct osc_delete_load_balancer_arg a = {0}; + struct osc_delete_load_balancer_arg *s = &a; __attribute__((cleanup(files_cnt_cleanup))) char *files_cnt[MAX_FILES_PER_CMD] = {NULL}; int cret; cascade_struct = NULL; cascade_parser = NULL; - delete_client_gateway_arg: + delete_load_balancer_arg: if (i + 1 < ac && av[i + 1][0] == '.' && av[i + 1][1] == '.') { char *next_a = &av[i + 1][2]; @@ -25259,7 +26566,7 @@ int main(int ac, char **av) } STRY(cascade_parser(cascade_struct, next_a, aa, pa)); i += incr; - goto delete_client_gateway_arg; + goto delete_load_balancer_arg; } if (i + 1 < ac && av[i + 1][0] == '-' && av[i + 1][1] == '-') { @@ -25280,17 +26587,6 @@ int main(int ac, char **av) incr = 1; } } - if ((aret = argcmp(next_a, "ClientGatewayId")) == 0 || aret == '=' ) { - char *eq_ptr = strchr(next_a, '='); - if (eq_ptr) { - TRY((!*eq_ptr), "ClientGatewayId argument missing\n"); - aa = eq_ptr + 1; - incr = 1; - } - TRY(!aa, "ClientGatewayId argument missing\n"); - s->client_gateway_id = aa; // string string - - } else if ((aret = argcmp(next_a, "DryRun")) == 0 || aret == '=' ) { char *eq_ptr = strchr(next_a, '='); if (eq_ptr) { @@ -25307,14 +26603,25 @@ int main(int ac, char **av) BAD_RET("DryRun require true/false\n"); } } else + if ((aret = argcmp(next_a, "LoadBalancerName")) == 0 || aret == '=' ) { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "LoadBalancerName argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + TRY(!aa, "LoadBalancerName argument missing\n"); + s->load_balancer_name = aa; // string string + + } else { - BAD_RET("'%s' is not a valide argument for 'DeleteClientGateway'\n", next_a); + BAD_RET("'%s' is not a valide argument for 'DeleteLoadBalancer'\n", next_a); } i += incr; - goto delete_client_gateway_arg; + goto delete_load_balancer_arg; } - cret = osc_delete_client_gateway(&e, &r, &a); - TRY(cret, "fail to call DeleteClientGateway: %s\n", curl_easy_strerror(cret)); + cret = osc_delete_load_balancer(&e, &r, &a); + TRY(cret, "fail to call DeleteLoadBalancer: %s\n", curl_easy_strerror(cret)); CHK_BAD_RET(!r.buf, "connection sucessful, but empty responce\n"); if (program_flag & OAPI_RAW_OUTPUT) puts(r.buf); @@ -25327,19 +26634,19 @@ int main(int ac, char **av) } osc_deinit_str(&r); } else - if (!strcmp("DeleteCa", av[i])) { + if (!strcmp("DeleteListenerRule", av[i])) { json_object *jobj; auto_ptr_array struct ptr_array opa = {0}; struct ptr_array *pa = &opa; - struct osc_delete_ca_arg a = {0}; - struct osc_delete_ca_arg *s = &a; + struct osc_delete_listener_rule_arg a = {0}; + struct osc_delete_listener_rule_arg *s = &a; __attribute__((cleanup(files_cnt_cleanup))) char *files_cnt[MAX_FILES_PER_CMD] = {NULL}; int cret; cascade_struct = NULL; cascade_parser = NULL; - delete_ca_arg: + delete_listener_rule_arg: if (i + 1 < ac && av[i + 1][0] == '.' && av[i + 1][1] == '.') { char *next_a = &av[i + 1][2]; @@ -25357,7 +26664,7 @@ int main(int ac, char **av) } STRY(cascade_parser(cascade_struct, next_a, aa, pa)); i += incr; - goto delete_ca_arg; + goto delete_listener_rule_arg; } if (i + 1 < ac && av[i + 1][0] == '-' && av[i + 1][1] == '-') { @@ -25378,17 +26685,6 @@ int main(int ac, char **av) incr = 1; } } - if ((aret = argcmp(next_a, "CaId")) == 0 || aret == '=' ) { - char *eq_ptr = strchr(next_a, '='); - if (eq_ptr) { - TRY((!*eq_ptr), "CaId argument missing\n"); - aa = eq_ptr + 1; - incr = 1; - } - TRY(!aa, "CaId argument missing\n"); - s->ca_id = aa; // string string - - } else if ((aret = argcmp(next_a, "DryRun")) == 0 || aret == '=' ) { char *eq_ptr = strchr(next_a, '='); if (eq_ptr) { @@ -25405,14 +26701,25 @@ int main(int ac, char **av) BAD_RET("DryRun require true/false\n"); } } else + if ((aret = argcmp(next_a, "ListenerRuleName")) == 0 || aret == '=' ) { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "ListenerRuleName argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + TRY(!aa, "ListenerRuleName argument missing\n"); + s->listener_rule_name = aa; // string string + + } else { - BAD_RET("'%s' is not a valide argument for 'DeleteCa'\n", next_a); + BAD_RET("'%s' is not a valide argument for 'DeleteListenerRule'\n", next_a); } i += incr; - goto delete_ca_arg; + goto delete_listener_rule_arg; } - cret = osc_delete_ca(&e, &r, &a); - TRY(cret, "fail to call DeleteCa: %s\n", curl_easy_strerror(cret)); + cret = osc_delete_listener_rule(&e, &r, &a); + TRY(cret, "fail to call DeleteListenerRule: %s\n", curl_easy_strerror(cret)); CHK_BAD_RET(!r.buf, "connection sucessful, but empty responce\n"); if (program_flag & OAPI_RAW_OUTPUT) puts(r.buf); @@ -25425,19 +26732,19 @@ int main(int ac, char **av) } osc_deinit_str(&r); } else - if (!strcmp("DeleteApiAccessRule", av[i])) { + if (!strcmp("DeleteKeypair", av[i])) { json_object *jobj; auto_ptr_array struct ptr_array opa = {0}; struct ptr_array *pa = &opa; - struct osc_delete_api_access_rule_arg a = {0}; - struct osc_delete_api_access_rule_arg *s = &a; + struct osc_delete_keypair_arg a = {0}; + struct osc_delete_keypair_arg *s = &a; __attribute__((cleanup(files_cnt_cleanup))) char *files_cnt[MAX_FILES_PER_CMD] = {NULL}; int cret; cascade_struct = NULL; cascade_parser = NULL; - delete_api_access_rule_arg: + delete_keypair_arg: if (i + 1 < ac && av[i + 1][0] == '.' && av[i + 1][1] == '.') { char *next_a = &av[i + 1][2]; @@ -25455,7 +26762,7 @@ int main(int ac, char **av) } STRY(cascade_parser(cascade_struct, next_a, aa, pa)); i += incr; - goto delete_api_access_rule_arg; + goto delete_keypair_arg; } if (i + 1 < ac && av[i + 1][0] == '-' && av[i + 1][1] == '-') { @@ -25476,17 +26783,6 @@ int main(int ac, char **av) incr = 1; } } - if ((aret = argcmp(next_a, "ApiAccessRuleId")) == 0 || aret == '=' ) { - char *eq_ptr = strchr(next_a, '='); - if (eq_ptr) { - TRY((!*eq_ptr), "ApiAccessRuleId argument missing\n"); - aa = eq_ptr + 1; - incr = 1; - } - TRY(!aa, "ApiAccessRuleId argument missing\n"); - s->api_access_rule_id = aa; // string string - - } else if ((aret = argcmp(next_a, "DryRun")) == 0 || aret == '=' ) { char *eq_ptr = strchr(next_a, '='); if (eq_ptr) { @@ -25503,14 +26799,25 @@ int main(int ac, char **av) BAD_RET("DryRun require true/false\n"); } } else + if ((aret = argcmp(next_a, "KeypairName")) == 0 || aret == '=' ) { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "KeypairName argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + TRY(!aa, "KeypairName argument missing\n"); + s->keypair_name = aa; // string string + + } else { - BAD_RET("'%s' is not a valide argument for 'DeleteApiAccessRule'\n", next_a); + BAD_RET("'%s' is not a valide argument for 'DeleteKeypair'\n", next_a); } i += incr; - goto delete_api_access_rule_arg; + goto delete_keypair_arg; } - cret = osc_delete_api_access_rule(&e, &r, &a); - TRY(cret, "fail to call DeleteApiAccessRule: %s\n", curl_easy_strerror(cret)); + cret = osc_delete_keypair(&e, &r, &a); + TRY(cret, "fail to call DeleteKeypair: %s\n", curl_easy_strerror(cret)); CHK_BAD_RET(!r.buf, "connection sucessful, but empty responce\n"); if (program_flag & OAPI_RAW_OUTPUT) puts(r.buf); @@ -25523,19 +26830,19 @@ int main(int ac, char **av) } osc_deinit_str(&r); } else - if (!strcmp("DeleteAccessKey", av[i])) { + if (!strcmp("DeleteInternetService", av[i])) { json_object *jobj; auto_ptr_array struct ptr_array opa = {0}; struct ptr_array *pa = &opa; - struct osc_delete_access_key_arg a = {0}; - struct osc_delete_access_key_arg *s = &a; + struct osc_delete_internet_service_arg a = {0}; + struct osc_delete_internet_service_arg *s = &a; __attribute__((cleanup(files_cnt_cleanup))) char *files_cnt[MAX_FILES_PER_CMD] = {NULL}; int cret; cascade_struct = NULL; cascade_parser = NULL; - delete_access_key_arg: + delete_internet_service_arg: if (i + 1 < ac && av[i + 1][0] == '.' && av[i + 1][1] == '.') { char *next_a = &av[i + 1][2]; @@ -25553,7 +26860,7 @@ int main(int ac, char **av) } STRY(cascade_parser(cascade_struct, next_a, aa, pa)); i += incr; - goto delete_access_key_arg; + goto delete_internet_service_arg; } if (i + 1 < ac && av[i + 1][0] == '-' && av[i + 1][1] == '-') { @@ -25574,17 +26881,6 @@ int main(int ac, char **av) incr = 1; } } - if ((aret = argcmp(next_a, "AccessKeyId")) == 0 || aret == '=' ) { - char *eq_ptr = strchr(next_a, '='); - if (eq_ptr) { - TRY((!*eq_ptr), "AccessKeyId argument missing\n"); - aa = eq_ptr + 1; - incr = 1; - } - TRY(!aa, "AccessKeyId argument missing\n"); - s->access_key_id = aa; // string string - - } else if ((aret = argcmp(next_a, "DryRun")) == 0 || aret == '=' ) { char *eq_ptr = strchr(next_a, '='); if (eq_ptr) { @@ -25601,25 +26897,25 @@ int main(int ac, char **av) BAD_RET("DryRun require true/false\n"); } } else - if ((aret = argcmp(next_a, "UserName")) == 0 || aret == '=' ) { + if ((aret = argcmp(next_a, "InternetServiceId")) == 0 || aret == '=' ) { char *eq_ptr = strchr(next_a, '='); if (eq_ptr) { - TRY((!*eq_ptr), "UserName argument missing\n"); + TRY((!*eq_ptr), "InternetServiceId argument missing\n"); aa = eq_ptr + 1; incr = 1; } - TRY(!aa, "UserName argument missing\n"); - s->user_name = aa; // string string + TRY(!aa, "InternetServiceId argument missing\n"); + s->internet_service_id = aa; // string string } else { - BAD_RET("'%s' is not a valide argument for 'DeleteAccessKey'\n", next_a); + BAD_RET("'%s' is not a valide argument for 'DeleteInternetService'\n", next_a); } i += incr; - goto delete_access_key_arg; + goto delete_internet_service_arg; } - cret = osc_delete_access_key(&e, &r, &a); - TRY(cret, "fail to call DeleteAccessKey: %s\n", curl_easy_strerror(cret)); + cret = osc_delete_internet_service(&e, &r, &a); + TRY(cret, "fail to call DeleteInternetService: %s\n", curl_easy_strerror(cret)); CHK_BAD_RET(!r.buf, "connection sucessful, but empty responce\n"); if (program_flag & OAPI_RAW_OUTPUT) puts(r.buf); @@ -25632,19 +26928,19 @@ int main(int ac, char **av) } osc_deinit_str(&r); } else - if (!strcmp("CreateVpnConnectionRoute", av[i])) { + if (!strcmp("DeleteImage", av[i])) { json_object *jobj; auto_ptr_array struct ptr_array opa = {0}; struct ptr_array *pa = &opa; - struct osc_create_vpn_connection_route_arg a = {0}; - struct osc_create_vpn_connection_route_arg *s = &a; + struct osc_delete_image_arg a = {0}; + struct osc_delete_image_arg *s = &a; __attribute__((cleanup(files_cnt_cleanup))) char *files_cnt[MAX_FILES_PER_CMD] = {NULL}; int cret; cascade_struct = NULL; cascade_parser = NULL; - create_vpn_connection_route_arg: + delete_image_arg: if (i + 1 < ac && av[i + 1][0] == '.' && av[i + 1][1] == '.') { char *next_a = &av[i + 1][2]; @@ -25662,7 +26958,7 @@ int main(int ac, char **av) } STRY(cascade_parser(cascade_struct, next_a, aa, pa)); i += incr; - goto create_vpn_connection_route_arg; + goto delete_image_arg; } if (i + 1 < ac && av[i + 1][0] == '-' && av[i + 1][1] == '-') { @@ -25683,17 +26979,6 @@ int main(int ac, char **av) incr = 1; } } - if ((aret = argcmp(next_a, "DestinationIpRange")) == 0 || aret == '=' ) { - char *eq_ptr = strchr(next_a, '='); - if (eq_ptr) { - TRY((!*eq_ptr), "DestinationIpRange argument missing\n"); - aa = eq_ptr + 1; - incr = 1; - } - TRY(!aa, "DestinationIpRange argument missing\n"); - s->destination_ip_range = aa; // string string - - } else if ((aret = argcmp(next_a, "DryRun")) == 0 || aret == '=' ) { char *eq_ptr = strchr(next_a, '='); if (eq_ptr) { @@ -25710,25 +26995,25 @@ int main(int ac, char **av) BAD_RET("DryRun require true/false\n"); } } else - if ((aret = argcmp(next_a, "VpnConnectionId")) == 0 || aret == '=' ) { + if ((aret = argcmp(next_a, "ImageId")) == 0 || aret == '=' ) { char *eq_ptr = strchr(next_a, '='); if (eq_ptr) { - TRY((!*eq_ptr), "VpnConnectionId argument missing\n"); + TRY((!*eq_ptr), "ImageId argument missing\n"); aa = eq_ptr + 1; incr = 1; } - TRY(!aa, "VpnConnectionId argument missing\n"); - s->vpn_connection_id = aa; // string string + TRY(!aa, "ImageId argument missing\n"); + s->image_id = aa; // string string } else { - BAD_RET("'%s' is not a valide argument for 'CreateVpnConnectionRoute'\n", next_a); + BAD_RET("'%s' is not a valide argument for 'DeleteImage'\n", next_a); } i += incr; - goto create_vpn_connection_route_arg; + goto delete_image_arg; } - cret = osc_create_vpn_connection_route(&e, &r, &a); - TRY(cret, "fail to call CreateVpnConnectionRoute: %s\n", curl_easy_strerror(cret)); + cret = osc_delete_image(&e, &r, &a); + TRY(cret, "fail to call DeleteImage: %s\n", curl_easy_strerror(cret)); CHK_BAD_RET(!r.buf, "connection sucessful, but empty responce\n"); if (program_flag & OAPI_RAW_OUTPUT) puts(r.buf); @@ -25741,19 +27026,19 @@ int main(int ac, char **av) } osc_deinit_str(&r); } else - if (!strcmp("CreateVpnConnection", av[i])) { + if (!strcmp("DeleteFlexibleGpu", av[i])) { json_object *jobj; auto_ptr_array struct ptr_array opa = {0}; struct ptr_array *pa = &opa; - struct osc_create_vpn_connection_arg a = {0}; - struct osc_create_vpn_connection_arg *s = &a; + struct osc_delete_flexible_gpu_arg a = {0}; + struct osc_delete_flexible_gpu_arg *s = &a; __attribute__((cleanup(files_cnt_cleanup))) char *files_cnt[MAX_FILES_PER_CMD] = {NULL}; int cret; cascade_struct = NULL; cascade_parser = NULL; - create_vpn_connection_arg: + delete_flexible_gpu_arg: if (i + 1 < ac && av[i + 1][0] == '.' && av[i + 1][1] == '.') { char *next_a = &av[i + 1][2]; @@ -25771,7 +27056,7 @@ int main(int ac, char **av) } STRY(cascade_parser(cascade_struct, next_a, aa, pa)); i += incr; - goto create_vpn_connection_arg; + goto delete_flexible_gpu_arg; } if (i + 1 < ac && av[i + 1][0] == '-' && av[i + 1][1] == '-') { @@ -25792,28 +27077,6 @@ int main(int ac, char **av) incr = 1; } } - if ((aret = argcmp(next_a, "ClientGatewayId")) == 0 || aret == '=' ) { - char *eq_ptr = strchr(next_a, '='); - if (eq_ptr) { - TRY((!*eq_ptr), "ClientGatewayId argument missing\n"); - aa = eq_ptr + 1; - incr = 1; - } - TRY(!aa, "ClientGatewayId argument missing\n"); - s->client_gateway_id = aa; // string string - - } else - if ((aret = argcmp(next_a, "ConnectionType")) == 0 || aret == '=' ) { - char *eq_ptr = strchr(next_a, '='); - if (eq_ptr) { - TRY((!*eq_ptr), "ConnectionType argument missing\n"); - aa = eq_ptr + 1; - incr = 1; - } - TRY(!aa, "ConnectionType argument missing\n"); - s->connection_type = aa; // string string - - } else if ((aret = argcmp(next_a, "DryRun")) == 0 || aret == '=' ) { char *eq_ptr = strchr(next_a, '='); if (eq_ptr) { @@ -25830,41 +27093,25 @@ int main(int ac, char **av) BAD_RET("DryRun require true/false\n"); } } else - if ((aret = argcmp(next_a, "StaticRoutesOnly")) == 0 || aret == '=' ) { - char *eq_ptr = strchr(next_a, '='); - if (eq_ptr) { - TRY((!*eq_ptr), "StaticRoutesOnly argument missing\n"); - aa = eq_ptr + 1; - incr = 1; - } - s->is_set_static_routes_only = 1; - if (!aa || !strcasecmp(aa, "true")) { - s->static_routes_only = 1; - } else if (!strcasecmp(aa, "false")) { - s->static_routes_only = 0; - } else { - BAD_RET("StaticRoutesOnly require true/false\n"); - } - } else - if ((aret = argcmp(next_a, "VirtualGatewayId")) == 0 || aret == '=' ) { + if ((aret = argcmp(next_a, "FlexibleGpuId")) == 0 || aret == '=' ) { char *eq_ptr = strchr(next_a, '='); if (eq_ptr) { - TRY((!*eq_ptr), "VirtualGatewayId argument missing\n"); + TRY((!*eq_ptr), "FlexibleGpuId argument missing\n"); aa = eq_ptr + 1; incr = 1; } - TRY(!aa, "VirtualGatewayId argument missing\n"); - s->virtual_gateway_id = aa; // string string + TRY(!aa, "FlexibleGpuId argument missing\n"); + s->flexible_gpu_id = aa; // string string } else { - BAD_RET("'%s' is not a valide argument for 'CreateVpnConnection'\n", next_a); + BAD_RET("'%s' is not a valide argument for 'DeleteFlexibleGpu'\n", next_a); } i += incr; - goto create_vpn_connection_arg; + goto delete_flexible_gpu_arg; } - cret = osc_create_vpn_connection(&e, &r, &a); - TRY(cret, "fail to call CreateVpnConnection: %s\n", curl_easy_strerror(cret)); + cret = osc_delete_flexible_gpu(&e, &r, &a); + TRY(cret, "fail to call DeleteFlexibleGpu: %s\n", curl_easy_strerror(cret)); CHK_BAD_RET(!r.buf, "connection sucessful, but empty responce\n"); if (program_flag & OAPI_RAW_OUTPUT) puts(r.buf); @@ -25877,19 +27124,19 @@ int main(int ac, char **av) } osc_deinit_str(&r); } else - if (!strcmp("CreateVolume", av[i])) { + if (!strcmp("DeleteExportTask", av[i])) { json_object *jobj; auto_ptr_array struct ptr_array opa = {0}; struct ptr_array *pa = &opa; - struct osc_create_volume_arg a = {0}; - struct osc_create_volume_arg *s = &a; + struct osc_delete_export_task_arg a = {0}; + struct osc_delete_export_task_arg *s = &a; __attribute__((cleanup(files_cnt_cleanup))) char *files_cnt[MAX_FILES_PER_CMD] = {NULL}; int cret; cascade_struct = NULL; cascade_parser = NULL; - create_volume_arg: + delete_export_task_arg: if (i + 1 < ac && av[i + 1][0] == '.' && av[i + 1][1] == '.') { char *next_a = &av[i + 1][2]; @@ -25907,7 +27154,7 @@ int main(int ac, char **av) } STRY(cascade_parser(cascade_struct, next_a, aa, pa)); i += incr; - goto create_volume_arg; + goto delete_export_task_arg; } if (i + 1 < ac && av[i + 1][0] == '-' && av[i + 1][1] == '-') { @@ -25944,69 +27191,25 @@ int main(int ac, char **av) BAD_RET("DryRun require true/false\n"); } } else - if ((aret = argcmp(next_a, "Iops")) == 0 || aret == '=' ) { - char *eq_ptr = strchr(next_a, '='); - if (eq_ptr) { - TRY((!*eq_ptr), "Iops argument missing\n"); - aa = eq_ptr + 1; - incr = 1; - } - TRY(!aa, "Iops argument missing\n"); - s->is_set_iops = 1; - s->iops = atoi(aa); - } else - if ((aret = argcmp(next_a, "Size")) == 0 || aret == '=' ) { - char *eq_ptr = strchr(next_a, '='); - if (eq_ptr) { - TRY((!*eq_ptr), "Size argument missing\n"); - aa = eq_ptr + 1; - incr = 1; - } - TRY(!aa, "Size argument missing\n"); - s->is_set_size = 1; - s->size = atoi(aa); - } else - if ((aret = argcmp(next_a, "SnapshotId")) == 0 || aret == '=' ) { - char *eq_ptr = strchr(next_a, '='); - if (eq_ptr) { - TRY((!*eq_ptr), "SnapshotId argument missing\n"); - aa = eq_ptr + 1; - incr = 1; - } - TRY(!aa, "SnapshotId argument missing\n"); - s->snapshot_id = aa; // string string - - } else - if ((aret = argcmp(next_a, "SubregionName")) == 0 || aret == '=' ) { - char *eq_ptr = strchr(next_a, '='); - if (eq_ptr) { - TRY((!*eq_ptr), "SubregionName argument missing\n"); - aa = eq_ptr + 1; - incr = 1; - } - TRY(!aa, "SubregionName argument missing\n"); - s->subregion_name = aa; // string string - - } else - if ((aret = argcmp(next_a, "VolumeType")) == 0 || aret == '=' ) { + if ((aret = argcmp(next_a, "ExportTaskId")) == 0 || aret == '=' ) { char *eq_ptr = strchr(next_a, '='); if (eq_ptr) { - TRY((!*eq_ptr), "VolumeType argument missing\n"); + TRY((!*eq_ptr), "ExportTaskId argument missing\n"); aa = eq_ptr + 1; incr = 1; } - TRY(!aa, "VolumeType argument missing\n"); - s->volume_type = aa; // string string + TRY(!aa, "ExportTaskId argument missing\n"); + s->export_task_id = aa; // string string } else { - BAD_RET("'%s' is not a valide argument for 'CreateVolume'\n", next_a); + BAD_RET("'%s' is not a valide argument for 'DeleteExportTask'\n", next_a); } i += incr; - goto create_volume_arg; + goto delete_export_task_arg; } - cret = osc_create_volume(&e, &r, &a); - TRY(cret, "fail to call CreateVolume: %s\n", curl_easy_strerror(cret)); + cret = osc_delete_export_task(&e, &r, &a); + TRY(cret, "fail to call DeleteExportTask: %s\n", curl_easy_strerror(cret)); CHK_BAD_RET(!r.buf, "connection sucessful, but empty responce\n"); if (program_flag & OAPI_RAW_OUTPUT) puts(r.buf); @@ -26019,19 +27222,19 @@ int main(int ac, char **av) } osc_deinit_str(&r); } else - if (!strcmp("CreateVms", av[i])) { + if (!strcmp("DeleteDirectLinkInterface", av[i])) { json_object *jobj; auto_ptr_array struct ptr_array opa = {0}; struct ptr_array *pa = &opa; - struct osc_create_vms_arg a = {0}; - struct osc_create_vms_arg *s = &a; + struct osc_delete_direct_link_interface_arg a = {0}; + struct osc_delete_direct_link_interface_arg *s = &a; __attribute__((cleanup(files_cnt_cleanup))) char *files_cnt[MAX_FILES_PER_CMD] = {NULL}; int cret; cascade_struct = NULL; cascade_parser = NULL; - create_vms_arg: + delete_direct_link_interface_arg: if (i + 1 < ac && av[i + 1][0] == '.' && av[i + 1][1] == '.') { char *next_a = &av[i + 1][2]; @@ -26049,7 +27252,7 @@ int main(int ac, char **av) } STRY(cascade_parser(cascade_struct, next_a, aa, pa)); i += incr; - goto create_vms_arg; + goto delete_direct_link_interface_arg; } if (i + 1 < ac && av[i + 1][0] == '-' && av[i + 1][1] == '-') { @@ -26070,96 +27273,1806 @@ int main(int ac, char **av) incr = 1; } } - if ((aret = argcmp(next_a, "BlockDeviceMappings")) == 0 || aret == '=' ) { + if ((aret = argcmp(next_a, "DirectLinkInterfaceId")) == 0 || aret == '=' ) { char *eq_ptr = strchr(next_a, '='); if (eq_ptr) { - TRY((!*eq_ptr), "BlockDeviceMappings argument missing\n"); + TRY((!*eq_ptr), "DirectLinkInterfaceId argument missing\n"); aa = eq_ptr + 1; incr = 1; } - char *dot_pos = strchr(str, '.'); - - if (dot_pos) { - int pos; - char *endptr; + TRY(!aa, "DirectLinkInterfaceId argument missing\n"); + s->direct_link_interface_id = aa; // string string - ++dot_pos; - pos = strtoul(dot_pos, &endptr, 0); - if (endptr == dot_pos) - BAD_RET("'BlockDeviceMappings' require an index (example array ref BlockDeviceMappingVmCreation.BlockDeviceMappings.0)\n"); - else if (*endptr != '.') - BAD_RET("'BlockDeviceMappings' require a .\n"); - TRY_ALLOC_AT(s,block_device_mappings, pa, pos, sizeof(*s->block_device_mappings)); - cascade_struct = &s->block_device_mappings[pos]; - cascade_parser = block_device_mapping_vm_creation_parser; - if (endptr[1] == '.') { - ++endptr; - } - STRY(block_device_mapping_vm_creation_parser(&s->block_device_mappings[pos], endptr + 1, aa, pa)); - } else { - TRY(!aa, "BlockDeviceMappings argument missing\n"); - s->block_device_mappings_str = aa; // array ref BlockDeviceMappingVmCreation ref - } } else - if ((aret = argcmp(next_a, "BootOnCreation")) == 0 || aret == '=' ) { + if ((aret = argcmp(next_a, "DryRun")) == 0 || aret == '=' ) { char *eq_ptr = strchr(next_a, '='); if (eq_ptr) { - TRY((!*eq_ptr), "BootOnCreation argument missing\n"); + TRY((!*eq_ptr), "DryRun argument missing\n"); aa = eq_ptr + 1; incr = 1; } - s->is_set_boot_on_creation = 1; + s->is_set_dry_run = 1; if (!aa || !strcasecmp(aa, "true")) { - s->boot_on_creation = 1; + s->dry_run = 1; } else if (!strcasecmp(aa, "false")) { - s->boot_on_creation = 0; + s->dry_run = 0; } else { - BAD_RET("BootOnCreation require true/false\n"); + BAD_RET("DryRun require true/false\n"); } } else - if ((aret = argcmp(next_a, "BsuOptimized")) == 0 || aret == '=' ) { + { + BAD_RET("'%s' is not a valide argument for 'DeleteDirectLinkInterface'\n", next_a); + } + i += incr; + goto delete_direct_link_interface_arg; + } + cret = osc_delete_direct_link_interface(&e, &r, &a); + TRY(cret, "fail to call DeleteDirectLinkInterface: %s\n", curl_easy_strerror(cret)); + CHK_BAD_RET(!r.buf, "connection sucessful, but empty responce\n"); + if (program_flag & OAPI_RAW_OUTPUT) + puts(r.buf); + else { + jobj = json_tokener_parse(r.buf); + puts(json_object_to_json_string_ext(jobj, + JSON_C_TO_STRING_PRETTY | JSON_C_TO_STRING_NOSLASHESCAPE | + color_flag)); + json_object_put(jobj); + } + osc_deinit_str(&r); + } else + if (!strcmp("DeleteDirectLink", av[i])) { + json_object *jobj; + auto_ptr_array struct ptr_array opa = {0}; + struct ptr_array *pa = &opa; + struct osc_delete_direct_link_arg a = {0}; + struct osc_delete_direct_link_arg *s = &a; + __attribute__((cleanup(files_cnt_cleanup))) char *files_cnt[MAX_FILES_PER_CMD] = {NULL}; + int cret; + + cascade_struct = NULL; + cascade_parser = NULL; + + delete_direct_link_arg: + + if (i + 1 < ac && av[i + 1][0] == '.' && av[i + 1][1] == '.') { + char *next_a = &av[i + 1][2]; + char *aa = i + 2 < ac ? av[i + 2] : 0; + int incr = 2; + char *eq_ptr = strchr(next_a, '='); + + CHK_BAD_RET(!cascade_struct, "cascade need to be se first\n"); + if (eq_ptr) { + CHK_BAD_RET(!*eq_ptr, "cascade need an argument\n"); + incr = 1; + aa = eq_ptr + 1; + } else { + CHK_BAD_RET(!aa || aa[0] == '-', "cascade need an argument\n"); + } + STRY(cascade_parser(cascade_struct, next_a, aa, pa)); + i += incr; + goto delete_direct_link_arg; + } + + if (i + 1 < ac && av[i + 1][0] == '-' && av[i + 1][1] == '-') { + char *next_a = &av[i + 1][2]; + char *str = next_a; + char *aa = i + 2 < ac ? av[i + 2] : 0; + int aret = 0; + int incr = aa ? 2 : 1; + + if (aa && aa[0] == '-' && aa[1] == '-' && aa[2] != '-') { + if (!strcmp(aa, "--file")) { + TRY(i + 3 >= ac, "file name require"); + ++incr; + aa = read_file(files_cnt, av[i + 3]); + STRY(!aa); + } else { + aa = 0; + incr = 1; + } + } + if ((aret = argcmp(next_a, "DirectLinkId")) == 0 || aret == '=' ) { char *eq_ptr = strchr(next_a, '='); if (eq_ptr) { - TRY((!*eq_ptr), "BsuOptimized argument missing\n"); + TRY((!*eq_ptr), "DirectLinkId argument missing\n"); aa = eq_ptr + 1; incr = 1; } - s->is_set_bsu_optimized = 1; + TRY(!aa, "DirectLinkId argument missing\n"); + s->direct_link_id = aa; // string string + + } else + if ((aret = argcmp(next_a, "DryRun")) == 0 || aret == '=' ) { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "DryRun argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + s->is_set_dry_run = 1; if (!aa || !strcasecmp(aa, "true")) { - s->bsu_optimized = 1; + s->dry_run = 1; } else if (!strcasecmp(aa, "false")) { - s->bsu_optimized = 0; + s->dry_run = 0; } else { - BAD_RET("BsuOptimized require true/false\n"); + BAD_RET("DryRun require true/false\n"); } } else - if ((aret = argcmp(next_a, "ClientToken")) == 0 || aret == '=' ) { + { + BAD_RET("'%s' is not a valide argument for 'DeleteDirectLink'\n", next_a); + } + i += incr; + goto delete_direct_link_arg; + } + cret = osc_delete_direct_link(&e, &r, &a); + TRY(cret, "fail to call DeleteDirectLink: %s\n", curl_easy_strerror(cret)); + CHK_BAD_RET(!r.buf, "connection sucessful, but empty responce\n"); + if (program_flag & OAPI_RAW_OUTPUT) + puts(r.buf); + else { + jobj = json_tokener_parse(r.buf); + puts(json_object_to_json_string_ext(jobj, + JSON_C_TO_STRING_PRETTY | JSON_C_TO_STRING_NOSLASHESCAPE | + color_flag)); + json_object_put(jobj); + } + osc_deinit_str(&r); + } else + if (!strcmp("DeleteDhcpOptions", av[i])) { + json_object *jobj; + auto_ptr_array struct ptr_array opa = {0}; + struct ptr_array *pa = &opa; + struct osc_delete_dhcp_options_arg a = {0}; + struct osc_delete_dhcp_options_arg *s = &a; + __attribute__((cleanup(files_cnt_cleanup))) char *files_cnt[MAX_FILES_PER_CMD] = {NULL}; + int cret; + + cascade_struct = NULL; + cascade_parser = NULL; + + delete_dhcp_options_arg: + + if (i + 1 < ac && av[i + 1][0] == '.' && av[i + 1][1] == '.') { + char *next_a = &av[i + 1][2]; + char *aa = i + 2 < ac ? av[i + 2] : 0; + int incr = 2; + char *eq_ptr = strchr(next_a, '='); + + CHK_BAD_RET(!cascade_struct, "cascade need to be se first\n"); + if (eq_ptr) { + CHK_BAD_RET(!*eq_ptr, "cascade need an argument\n"); + incr = 1; + aa = eq_ptr + 1; + } else { + CHK_BAD_RET(!aa || aa[0] == '-', "cascade need an argument\n"); + } + STRY(cascade_parser(cascade_struct, next_a, aa, pa)); + i += incr; + goto delete_dhcp_options_arg; + } + + if (i + 1 < ac && av[i + 1][0] == '-' && av[i + 1][1] == '-') { + char *next_a = &av[i + 1][2]; + char *str = next_a; + char *aa = i + 2 < ac ? av[i + 2] : 0; + int aret = 0; + int incr = aa ? 2 : 1; + + if (aa && aa[0] == '-' && aa[1] == '-' && aa[2] != '-') { + if (!strcmp(aa, "--file")) { + TRY(i + 3 >= ac, "file name require"); + ++incr; + aa = read_file(files_cnt, av[i + 3]); + STRY(!aa); + } else { + aa = 0; + incr = 1; + } + } + if ((aret = argcmp(next_a, "DhcpOptionsSetId")) == 0 || aret == '=' ) { char *eq_ptr = strchr(next_a, '='); if (eq_ptr) { - TRY((!*eq_ptr), "ClientToken argument missing\n"); + TRY((!*eq_ptr), "DhcpOptionsSetId argument missing\n"); aa = eq_ptr + 1; incr = 1; } - TRY(!aa, "ClientToken argument missing\n"); - s->client_token = aa; // string string + TRY(!aa, "DhcpOptionsSetId argument missing\n"); + s->dhcp_options_set_id = aa; // string string } else - if ((aret = argcmp(next_a, "DeletionProtection")) == 0 || aret == '=' ) { + if ((aret = argcmp(next_a, "DryRun")) == 0 || aret == '=' ) { char *eq_ptr = strchr(next_a, '='); if (eq_ptr) { - TRY((!*eq_ptr), "DeletionProtection argument missing\n"); + TRY((!*eq_ptr), "DryRun argument missing\n"); aa = eq_ptr + 1; incr = 1; } - s->is_set_deletion_protection = 1; + s->is_set_dry_run = 1; if (!aa || !strcasecmp(aa, "true")) { - s->deletion_protection = 1; + s->dry_run = 1; } else if (!strcasecmp(aa, "false")) { - s->deletion_protection = 0; + s->dry_run = 0; } else { - BAD_RET("DeletionProtection require true/false\n"); + BAD_RET("DryRun require true/false\n"); } } else + { + BAD_RET("'%s' is not a valide argument for 'DeleteDhcpOptions'\n", next_a); + } + i += incr; + goto delete_dhcp_options_arg; + } + cret = osc_delete_dhcp_options(&e, &r, &a); + TRY(cret, "fail to call DeleteDhcpOptions: %s\n", curl_easy_strerror(cret)); + CHK_BAD_RET(!r.buf, "connection sucessful, but empty responce\n"); + if (program_flag & OAPI_RAW_OUTPUT) + puts(r.buf); + else { + jobj = json_tokener_parse(r.buf); + puts(json_object_to_json_string_ext(jobj, + JSON_C_TO_STRING_PRETTY | JSON_C_TO_STRING_NOSLASHESCAPE | + color_flag)); + json_object_put(jobj); + } + osc_deinit_str(&r); + } else + if (!strcmp("DeleteDedicatedGroup", av[i])) { + json_object *jobj; + auto_ptr_array struct ptr_array opa = {0}; + struct ptr_array *pa = &opa; + struct osc_delete_dedicated_group_arg a = {0}; + struct osc_delete_dedicated_group_arg *s = &a; + __attribute__((cleanup(files_cnt_cleanup))) char *files_cnt[MAX_FILES_PER_CMD] = {NULL}; + int cret; + + cascade_struct = NULL; + cascade_parser = NULL; + + delete_dedicated_group_arg: + + if (i + 1 < ac && av[i + 1][0] == '.' && av[i + 1][1] == '.') { + char *next_a = &av[i + 1][2]; + char *aa = i + 2 < ac ? av[i + 2] : 0; + int incr = 2; + char *eq_ptr = strchr(next_a, '='); + + CHK_BAD_RET(!cascade_struct, "cascade need to be se first\n"); + if (eq_ptr) { + CHK_BAD_RET(!*eq_ptr, "cascade need an argument\n"); + incr = 1; + aa = eq_ptr + 1; + } else { + CHK_BAD_RET(!aa || aa[0] == '-', "cascade need an argument\n"); + } + STRY(cascade_parser(cascade_struct, next_a, aa, pa)); + i += incr; + goto delete_dedicated_group_arg; + } + + if (i + 1 < ac && av[i + 1][0] == '-' && av[i + 1][1] == '-') { + char *next_a = &av[i + 1][2]; + char *str = next_a; + char *aa = i + 2 < ac ? av[i + 2] : 0; + int aret = 0; + int incr = aa ? 2 : 1; + + if (aa && aa[0] == '-' && aa[1] == '-' && aa[2] != '-') { + if (!strcmp(aa, "--file")) { + TRY(i + 3 >= ac, "file name require"); + ++incr; + aa = read_file(files_cnt, av[i + 3]); + STRY(!aa); + } else { + aa = 0; + incr = 1; + } + } + if ((aret = argcmp(next_a, "DedicatedGroupId")) == 0 || aret == '=' ) { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "DedicatedGroupId argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + TRY(!aa, "DedicatedGroupId argument missing\n"); + s->dedicated_group_id = aa; // string string + + } else + if ((aret = argcmp(next_a, "DryRun")) == 0 || aret == '=' ) { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "DryRun argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + s->is_set_dry_run = 1; + if (!aa || !strcasecmp(aa, "true")) { + s->dry_run = 1; + } else if (!strcasecmp(aa, "false")) { + s->dry_run = 0; + } else { + BAD_RET("DryRun require true/false\n"); + } + } else + if ((aret = argcmp(next_a, "Force")) == 0 || aret == '=' ) { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "Force argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + s->is_set_force = 1; + if (!aa || !strcasecmp(aa, "true")) { + s->force = 1; + } else if (!strcasecmp(aa, "false")) { + s->force = 0; + } else { + BAD_RET("Force require true/false\n"); + } + } else + { + BAD_RET("'%s' is not a valide argument for 'DeleteDedicatedGroup'\n", next_a); + } + i += incr; + goto delete_dedicated_group_arg; + } + cret = osc_delete_dedicated_group(&e, &r, &a); + TRY(cret, "fail to call DeleteDedicatedGroup: %s\n", curl_easy_strerror(cret)); + CHK_BAD_RET(!r.buf, "connection sucessful, but empty responce\n"); + if (program_flag & OAPI_RAW_OUTPUT) + puts(r.buf); + else { + jobj = json_tokener_parse(r.buf); + puts(json_object_to_json_string_ext(jobj, + JSON_C_TO_STRING_PRETTY | JSON_C_TO_STRING_NOSLASHESCAPE | + color_flag)); + json_object_put(jobj); + } + osc_deinit_str(&r); + } else + if (!strcmp("DeleteClientGateway", av[i])) { + json_object *jobj; + auto_ptr_array struct ptr_array opa = {0}; + struct ptr_array *pa = &opa; + struct osc_delete_client_gateway_arg a = {0}; + struct osc_delete_client_gateway_arg *s = &a; + __attribute__((cleanup(files_cnt_cleanup))) char *files_cnt[MAX_FILES_PER_CMD] = {NULL}; + int cret; + + cascade_struct = NULL; + cascade_parser = NULL; + + delete_client_gateway_arg: + + if (i + 1 < ac && av[i + 1][0] == '.' && av[i + 1][1] == '.') { + char *next_a = &av[i + 1][2]; + char *aa = i + 2 < ac ? av[i + 2] : 0; + int incr = 2; + char *eq_ptr = strchr(next_a, '='); + + CHK_BAD_RET(!cascade_struct, "cascade need to be se first\n"); + if (eq_ptr) { + CHK_BAD_RET(!*eq_ptr, "cascade need an argument\n"); + incr = 1; + aa = eq_ptr + 1; + } else { + CHK_BAD_RET(!aa || aa[0] == '-', "cascade need an argument\n"); + } + STRY(cascade_parser(cascade_struct, next_a, aa, pa)); + i += incr; + goto delete_client_gateway_arg; + } + + if (i + 1 < ac && av[i + 1][0] == '-' && av[i + 1][1] == '-') { + char *next_a = &av[i + 1][2]; + char *str = next_a; + char *aa = i + 2 < ac ? av[i + 2] : 0; + int aret = 0; + int incr = aa ? 2 : 1; + + if (aa && aa[0] == '-' && aa[1] == '-' && aa[2] != '-') { + if (!strcmp(aa, "--file")) { + TRY(i + 3 >= ac, "file name require"); + ++incr; + aa = read_file(files_cnt, av[i + 3]); + STRY(!aa); + } else { + aa = 0; + incr = 1; + } + } + if ((aret = argcmp(next_a, "ClientGatewayId")) == 0 || aret == '=' ) { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "ClientGatewayId argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + TRY(!aa, "ClientGatewayId argument missing\n"); + s->client_gateway_id = aa; // string string + + } else + if ((aret = argcmp(next_a, "DryRun")) == 0 || aret == '=' ) { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "DryRun argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + s->is_set_dry_run = 1; + if (!aa || !strcasecmp(aa, "true")) { + s->dry_run = 1; + } else if (!strcasecmp(aa, "false")) { + s->dry_run = 0; + } else { + BAD_RET("DryRun require true/false\n"); + } + } else + { + BAD_RET("'%s' is not a valide argument for 'DeleteClientGateway'\n", next_a); + } + i += incr; + goto delete_client_gateway_arg; + } + cret = osc_delete_client_gateway(&e, &r, &a); + TRY(cret, "fail to call DeleteClientGateway: %s\n", curl_easy_strerror(cret)); + CHK_BAD_RET(!r.buf, "connection sucessful, but empty responce\n"); + if (program_flag & OAPI_RAW_OUTPUT) + puts(r.buf); + else { + jobj = json_tokener_parse(r.buf); + puts(json_object_to_json_string_ext(jobj, + JSON_C_TO_STRING_PRETTY | JSON_C_TO_STRING_NOSLASHESCAPE | + color_flag)); + json_object_put(jobj); + } + osc_deinit_str(&r); + } else + if (!strcmp("DeleteCa", av[i])) { + json_object *jobj; + auto_ptr_array struct ptr_array opa = {0}; + struct ptr_array *pa = &opa; + struct osc_delete_ca_arg a = {0}; + struct osc_delete_ca_arg *s = &a; + __attribute__((cleanup(files_cnt_cleanup))) char *files_cnt[MAX_FILES_PER_CMD] = {NULL}; + int cret; + + cascade_struct = NULL; + cascade_parser = NULL; + + delete_ca_arg: + + if (i + 1 < ac && av[i + 1][0] == '.' && av[i + 1][1] == '.') { + char *next_a = &av[i + 1][2]; + char *aa = i + 2 < ac ? av[i + 2] : 0; + int incr = 2; + char *eq_ptr = strchr(next_a, '='); + + CHK_BAD_RET(!cascade_struct, "cascade need to be se first\n"); + if (eq_ptr) { + CHK_BAD_RET(!*eq_ptr, "cascade need an argument\n"); + incr = 1; + aa = eq_ptr + 1; + } else { + CHK_BAD_RET(!aa || aa[0] == '-', "cascade need an argument\n"); + } + STRY(cascade_parser(cascade_struct, next_a, aa, pa)); + i += incr; + goto delete_ca_arg; + } + + if (i + 1 < ac && av[i + 1][0] == '-' && av[i + 1][1] == '-') { + char *next_a = &av[i + 1][2]; + char *str = next_a; + char *aa = i + 2 < ac ? av[i + 2] : 0; + int aret = 0; + int incr = aa ? 2 : 1; + + if (aa && aa[0] == '-' && aa[1] == '-' && aa[2] != '-') { + if (!strcmp(aa, "--file")) { + TRY(i + 3 >= ac, "file name require"); + ++incr; + aa = read_file(files_cnt, av[i + 3]); + STRY(!aa); + } else { + aa = 0; + incr = 1; + } + } + if ((aret = argcmp(next_a, "CaId")) == 0 || aret == '=' ) { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "CaId argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + TRY(!aa, "CaId argument missing\n"); + s->ca_id = aa; // string string + + } else + if ((aret = argcmp(next_a, "DryRun")) == 0 || aret == '=' ) { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "DryRun argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + s->is_set_dry_run = 1; + if (!aa || !strcasecmp(aa, "true")) { + s->dry_run = 1; + } else if (!strcasecmp(aa, "false")) { + s->dry_run = 0; + } else { + BAD_RET("DryRun require true/false\n"); + } + } else + { + BAD_RET("'%s' is not a valide argument for 'DeleteCa'\n", next_a); + } + i += incr; + goto delete_ca_arg; + } + cret = osc_delete_ca(&e, &r, &a); + TRY(cret, "fail to call DeleteCa: %s\n", curl_easy_strerror(cret)); + CHK_BAD_RET(!r.buf, "connection sucessful, but empty responce\n"); + if (program_flag & OAPI_RAW_OUTPUT) + puts(r.buf); + else { + jobj = json_tokener_parse(r.buf); + puts(json_object_to_json_string_ext(jobj, + JSON_C_TO_STRING_PRETTY | JSON_C_TO_STRING_NOSLASHESCAPE | + color_flag)); + json_object_put(jobj); + } + osc_deinit_str(&r); + } else + if (!strcmp("DeleteApiAccessRule", av[i])) { + json_object *jobj; + auto_ptr_array struct ptr_array opa = {0}; + struct ptr_array *pa = &opa; + struct osc_delete_api_access_rule_arg a = {0}; + struct osc_delete_api_access_rule_arg *s = &a; + __attribute__((cleanup(files_cnt_cleanup))) char *files_cnt[MAX_FILES_PER_CMD] = {NULL}; + int cret; + + cascade_struct = NULL; + cascade_parser = NULL; + + delete_api_access_rule_arg: + + if (i + 1 < ac && av[i + 1][0] == '.' && av[i + 1][1] == '.') { + char *next_a = &av[i + 1][2]; + char *aa = i + 2 < ac ? av[i + 2] : 0; + int incr = 2; + char *eq_ptr = strchr(next_a, '='); + + CHK_BAD_RET(!cascade_struct, "cascade need to be se first\n"); + if (eq_ptr) { + CHK_BAD_RET(!*eq_ptr, "cascade need an argument\n"); + incr = 1; + aa = eq_ptr + 1; + } else { + CHK_BAD_RET(!aa || aa[0] == '-', "cascade need an argument\n"); + } + STRY(cascade_parser(cascade_struct, next_a, aa, pa)); + i += incr; + goto delete_api_access_rule_arg; + } + + if (i + 1 < ac && av[i + 1][0] == '-' && av[i + 1][1] == '-') { + char *next_a = &av[i + 1][2]; + char *str = next_a; + char *aa = i + 2 < ac ? av[i + 2] : 0; + int aret = 0; + int incr = aa ? 2 : 1; + + if (aa && aa[0] == '-' && aa[1] == '-' && aa[2] != '-') { + if (!strcmp(aa, "--file")) { + TRY(i + 3 >= ac, "file name require"); + ++incr; + aa = read_file(files_cnt, av[i + 3]); + STRY(!aa); + } else { + aa = 0; + incr = 1; + } + } + if ((aret = argcmp(next_a, "ApiAccessRuleId")) == 0 || aret == '=' ) { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "ApiAccessRuleId argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + TRY(!aa, "ApiAccessRuleId argument missing\n"); + s->api_access_rule_id = aa; // string string + + } else + if ((aret = argcmp(next_a, "DryRun")) == 0 || aret == '=' ) { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "DryRun argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + s->is_set_dry_run = 1; + if (!aa || !strcasecmp(aa, "true")) { + s->dry_run = 1; + } else if (!strcasecmp(aa, "false")) { + s->dry_run = 0; + } else { + BAD_RET("DryRun require true/false\n"); + } + } else + { + BAD_RET("'%s' is not a valide argument for 'DeleteApiAccessRule'\n", next_a); + } + i += incr; + goto delete_api_access_rule_arg; + } + cret = osc_delete_api_access_rule(&e, &r, &a); + TRY(cret, "fail to call DeleteApiAccessRule: %s\n", curl_easy_strerror(cret)); + CHK_BAD_RET(!r.buf, "connection sucessful, but empty responce\n"); + if (program_flag & OAPI_RAW_OUTPUT) + puts(r.buf); + else { + jobj = json_tokener_parse(r.buf); + puts(json_object_to_json_string_ext(jobj, + JSON_C_TO_STRING_PRETTY | JSON_C_TO_STRING_NOSLASHESCAPE | + color_flag)); + json_object_put(jobj); + } + osc_deinit_str(&r); + } else + if (!strcmp("DeleteAccessKey", av[i])) { + json_object *jobj; + auto_ptr_array struct ptr_array opa = {0}; + struct ptr_array *pa = &opa; + struct osc_delete_access_key_arg a = {0}; + struct osc_delete_access_key_arg *s = &a; + __attribute__((cleanup(files_cnt_cleanup))) char *files_cnt[MAX_FILES_PER_CMD] = {NULL}; + int cret; + + cascade_struct = NULL; + cascade_parser = NULL; + + delete_access_key_arg: + + if (i + 1 < ac && av[i + 1][0] == '.' && av[i + 1][1] == '.') { + char *next_a = &av[i + 1][2]; + char *aa = i + 2 < ac ? av[i + 2] : 0; + int incr = 2; + char *eq_ptr = strchr(next_a, '='); + + CHK_BAD_RET(!cascade_struct, "cascade need to be se first\n"); + if (eq_ptr) { + CHK_BAD_RET(!*eq_ptr, "cascade need an argument\n"); + incr = 1; + aa = eq_ptr + 1; + } else { + CHK_BAD_RET(!aa || aa[0] == '-', "cascade need an argument\n"); + } + STRY(cascade_parser(cascade_struct, next_a, aa, pa)); + i += incr; + goto delete_access_key_arg; + } + + if (i + 1 < ac && av[i + 1][0] == '-' && av[i + 1][1] == '-') { + char *next_a = &av[i + 1][2]; + char *str = next_a; + char *aa = i + 2 < ac ? av[i + 2] : 0; + int aret = 0; + int incr = aa ? 2 : 1; + + if (aa && aa[0] == '-' && aa[1] == '-' && aa[2] != '-') { + if (!strcmp(aa, "--file")) { + TRY(i + 3 >= ac, "file name require"); + ++incr; + aa = read_file(files_cnt, av[i + 3]); + STRY(!aa); + } else { + aa = 0; + incr = 1; + } + } + if ((aret = argcmp(next_a, "AccessKeyId")) == 0 || aret == '=' ) { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "AccessKeyId argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + TRY(!aa, "AccessKeyId argument missing\n"); + s->access_key_id = aa; // string string + + } else + if ((aret = argcmp(next_a, "DryRun")) == 0 || aret == '=' ) { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "DryRun argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + s->is_set_dry_run = 1; + if (!aa || !strcasecmp(aa, "true")) { + s->dry_run = 1; + } else if (!strcasecmp(aa, "false")) { + s->dry_run = 0; + } else { + BAD_RET("DryRun require true/false\n"); + } + } else + if ((aret = argcmp(next_a, "UserName")) == 0 || aret == '=' ) { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "UserName argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + TRY(!aa, "UserName argument missing\n"); + s->user_name = aa; // string string + + } else + { + BAD_RET("'%s' is not a valide argument for 'DeleteAccessKey'\n", next_a); + } + i += incr; + goto delete_access_key_arg; + } + cret = osc_delete_access_key(&e, &r, &a); + TRY(cret, "fail to call DeleteAccessKey: %s\n", curl_easy_strerror(cret)); + CHK_BAD_RET(!r.buf, "connection sucessful, but empty responce\n"); + if (program_flag & OAPI_RAW_OUTPUT) + puts(r.buf); + else { + jobj = json_tokener_parse(r.buf); + puts(json_object_to_json_string_ext(jobj, + JSON_C_TO_STRING_PRETTY | JSON_C_TO_STRING_NOSLASHESCAPE | + color_flag)); + json_object_put(jobj); + } + osc_deinit_str(&r); + } else + if (!strcmp("CreateVpnConnectionRoute", av[i])) { + json_object *jobj; + auto_ptr_array struct ptr_array opa = {0}; + struct ptr_array *pa = &opa; + struct osc_create_vpn_connection_route_arg a = {0}; + struct osc_create_vpn_connection_route_arg *s = &a; + __attribute__((cleanup(files_cnt_cleanup))) char *files_cnt[MAX_FILES_PER_CMD] = {NULL}; + int cret; + + cascade_struct = NULL; + cascade_parser = NULL; + + create_vpn_connection_route_arg: + + if (i + 1 < ac && av[i + 1][0] == '.' && av[i + 1][1] == '.') { + char *next_a = &av[i + 1][2]; + char *aa = i + 2 < ac ? av[i + 2] : 0; + int incr = 2; + char *eq_ptr = strchr(next_a, '='); + + CHK_BAD_RET(!cascade_struct, "cascade need to be se first\n"); + if (eq_ptr) { + CHK_BAD_RET(!*eq_ptr, "cascade need an argument\n"); + incr = 1; + aa = eq_ptr + 1; + } else { + CHK_BAD_RET(!aa || aa[0] == '-', "cascade need an argument\n"); + } + STRY(cascade_parser(cascade_struct, next_a, aa, pa)); + i += incr; + goto create_vpn_connection_route_arg; + } + + if (i + 1 < ac && av[i + 1][0] == '-' && av[i + 1][1] == '-') { + char *next_a = &av[i + 1][2]; + char *str = next_a; + char *aa = i + 2 < ac ? av[i + 2] : 0; + int aret = 0; + int incr = aa ? 2 : 1; + + if (aa && aa[0] == '-' && aa[1] == '-' && aa[2] != '-') { + if (!strcmp(aa, "--file")) { + TRY(i + 3 >= ac, "file name require"); + ++incr; + aa = read_file(files_cnt, av[i + 3]); + STRY(!aa); + } else { + aa = 0; + incr = 1; + } + } + if ((aret = argcmp(next_a, "DestinationIpRange")) == 0 || aret == '=' ) { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "DestinationIpRange argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + TRY(!aa, "DestinationIpRange argument missing\n"); + s->destination_ip_range = aa; // string string + + } else + if ((aret = argcmp(next_a, "DryRun")) == 0 || aret == '=' ) { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "DryRun argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + s->is_set_dry_run = 1; + if (!aa || !strcasecmp(aa, "true")) { + s->dry_run = 1; + } else if (!strcasecmp(aa, "false")) { + s->dry_run = 0; + } else { + BAD_RET("DryRun require true/false\n"); + } + } else + if ((aret = argcmp(next_a, "VpnConnectionId")) == 0 || aret == '=' ) { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "VpnConnectionId argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + TRY(!aa, "VpnConnectionId argument missing\n"); + s->vpn_connection_id = aa; // string string + + } else + { + BAD_RET("'%s' is not a valide argument for 'CreateVpnConnectionRoute'\n", next_a); + } + i += incr; + goto create_vpn_connection_route_arg; + } + cret = osc_create_vpn_connection_route(&e, &r, &a); + TRY(cret, "fail to call CreateVpnConnectionRoute: %s\n", curl_easy_strerror(cret)); + CHK_BAD_RET(!r.buf, "connection sucessful, but empty responce\n"); + if (program_flag & OAPI_RAW_OUTPUT) + puts(r.buf); + else { + jobj = json_tokener_parse(r.buf); + puts(json_object_to_json_string_ext(jobj, + JSON_C_TO_STRING_PRETTY | JSON_C_TO_STRING_NOSLASHESCAPE | + color_flag)); + json_object_put(jobj); + } + osc_deinit_str(&r); + } else + if (!strcmp("CreateVpnConnection", av[i])) { + json_object *jobj; + auto_ptr_array struct ptr_array opa = {0}; + struct ptr_array *pa = &opa; + struct osc_create_vpn_connection_arg a = {0}; + struct osc_create_vpn_connection_arg *s = &a; + __attribute__((cleanup(files_cnt_cleanup))) char *files_cnt[MAX_FILES_PER_CMD] = {NULL}; + int cret; + + cascade_struct = NULL; + cascade_parser = NULL; + + create_vpn_connection_arg: + + if (i + 1 < ac && av[i + 1][0] == '.' && av[i + 1][1] == '.') { + char *next_a = &av[i + 1][2]; + char *aa = i + 2 < ac ? av[i + 2] : 0; + int incr = 2; + char *eq_ptr = strchr(next_a, '='); + + CHK_BAD_RET(!cascade_struct, "cascade need to be se first\n"); + if (eq_ptr) { + CHK_BAD_RET(!*eq_ptr, "cascade need an argument\n"); + incr = 1; + aa = eq_ptr + 1; + } else { + CHK_BAD_RET(!aa || aa[0] == '-', "cascade need an argument\n"); + } + STRY(cascade_parser(cascade_struct, next_a, aa, pa)); + i += incr; + goto create_vpn_connection_arg; + } + + if (i + 1 < ac && av[i + 1][0] == '-' && av[i + 1][1] == '-') { + char *next_a = &av[i + 1][2]; + char *str = next_a; + char *aa = i + 2 < ac ? av[i + 2] : 0; + int aret = 0; + int incr = aa ? 2 : 1; + + if (aa && aa[0] == '-' && aa[1] == '-' && aa[2] != '-') { + if (!strcmp(aa, "--file")) { + TRY(i + 3 >= ac, "file name require"); + ++incr; + aa = read_file(files_cnt, av[i + 3]); + STRY(!aa); + } else { + aa = 0; + incr = 1; + } + } + if ((aret = argcmp(next_a, "ClientGatewayId")) == 0 || aret == '=' ) { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "ClientGatewayId argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + TRY(!aa, "ClientGatewayId argument missing\n"); + s->client_gateway_id = aa; // string string + + } else + if ((aret = argcmp(next_a, "ConnectionType")) == 0 || aret == '=' ) { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "ConnectionType argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + TRY(!aa, "ConnectionType argument missing\n"); + s->connection_type = aa; // string string + + } else + if ((aret = argcmp(next_a, "DryRun")) == 0 || aret == '=' ) { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "DryRun argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + s->is_set_dry_run = 1; + if (!aa || !strcasecmp(aa, "true")) { + s->dry_run = 1; + } else if (!strcasecmp(aa, "false")) { + s->dry_run = 0; + } else { + BAD_RET("DryRun require true/false\n"); + } + } else + if ((aret = argcmp(next_a, "StaticRoutesOnly")) == 0 || aret == '=' ) { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "StaticRoutesOnly argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + s->is_set_static_routes_only = 1; + if (!aa || !strcasecmp(aa, "true")) { + s->static_routes_only = 1; + } else if (!strcasecmp(aa, "false")) { + s->static_routes_only = 0; + } else { + BAD_RET("StaticRoutesOnly require true/false\n"); + } + } else + if ((aret = argcmp(next_a, "VirtualGatewayId")) == 0 || aret == '=' ) { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "VirtualGatewayId argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + TRY(!aa, "VirtualGatewayId argument missing\n"); + s->virtual_gateway_id = aa; // string string + + } else + { + BAD_RET("'%s' is not a valide argument for 'CreateVpnConnection'\n", next_a); + } + i += incr; + goto create_vpn_connection_arg; + } + cret = osc_create_vpn_connection(&e, &r, &a); + TRY(cret, "fail to call CreateVpnConnection: %s\n", curl_easy_strerror(cret)); + CHK_BAD_RET(!r.buf, "connection sucessful, but empty responce\n"); + if (program_flag & OAPI_RAW_OUTPUT) + puts(r.buf); + else { + jobj = json_tokener_parse(r.buf); + puts(json_object_to_json_string_ext(jobj, + JSON_C_TO_STRING_PRETTY | JSON_C_TO_STRING_NOSLASHESCAPE | + color_flag)); + json_object_put(jobj); + } + osc_deinit_str(&r); + } else + if (!strcmp("CreateVolume", av[i])) { + json_object *jobj; + auto_ptr_array struct ptr_array opa = {0}; + struct ptr_array *pa = &opa; + struct osc_create_volume_arg a = {0}; + struct osc_create_volume_arg *s = &a; + __attribute__((cleanup(files_cnt_cleanup))) char *files_cnt[MAX_FILES_PER_CMD] = {NULL}; + int cret; + + cascade_struct = NULL; + cascade_parser = NULL; + + create_volume_arg: + + if (i + 1 < ac && av[i + 1][0] == '.' && av[i + 1][1] == '.') { + char *next_a = &av[i + 1][2]; + char *aa = i + 2 < ac ? av[i + 2] : 0; + int incr = 2; + char *eq_ptr = strchr(next_a, '='); + + CHK_BAD_RET(!cascade_struct, "cascade need to be se first\n"); + if (eq_ptr) { + CHK_BAD_RET(!*eq_ptr, "cascade need an argument\n"); + incr = 1; + aa = eq_ptr + 1; + } else { + CHK_BAD_RET(!aa || aa[0] == '-', "cascade need an argument\n"); + } + STRY(cascade_parser(cascade_struct, next_a, aa, pa)); + i += incr; + goto create_volume_arg; + } + + if (i + 1 < ac && av[i + 1][0] == '-' && av[i + 1][1] == '-') { + char *next_a = &av[i + 1][2]; + char *str = next_a; + char *aa = i + 2 < ac ? av[i + 2] : 0; + int aret = 0; + int incr = aa ? 2 : 1; + + if (aa && aa[0] == '-' && aa[1] == '-' && aa[2] != '-') { + if (!strcmp(aa, "--file")) { + TRY(i + 3 >= ac, "file name require"); + ++incr; + aa = read_file(files_cnt, av[i + 3]); + STRY(!aa); + } else { + aa = 0; + incr = 1; + } + } + if ((aret = argcmp(next_a, "DryRun")) == 0 || aret == '=' ) { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "DryRun argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + s->is_set_dry_run = 1; + if (!aa || !strcasecmp(aa, "true")) { + s->dry_run = 1; + } else if (!strcasecmp(aa, "false")) { + s->dry_run = 0; + } else { + BAD_RET("DryRun require true/false\n"); + } + } else + if ((aret = argcmp(next_a, "Iops")) == 0 || aret == '=' ) { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "Iops argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + TRY(!aa, "Iops argument missing\n"); + s->is_set_iops = 1; + s->iops = atoi(aa); + } else + if ((aret = argcmp(next_a, "Size")) == 0 || aret == '=' ) { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "Size argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + TRY(!aa, "Size argument missing\n"); + s->is_set_size = 1; + s->size = atoi(aa); + } else + if ((aret = argcmp(next_a, "SnapshotId")) == 0 || aret == '=' ) { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "SnapshotId argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + TRY(!aa, "SnapshotId argument missing\n"); + s->snapshot_id = aa; // string string + + } else + if ((aret = argcmp(next_a, "SubregionName")) == 0 || aret == '=' ) { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "SubregionName argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + TRY(!aa, "SubregionName argument missing\n"); + s->subregion_name = aa; // string string + + } else + if ((aret = argcmp(next_a, "VolumeType")) == 0 || aret == '=' ) { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "VolumeType argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + TRY(!aa, "VolumeType argument missing\n"); + s->volume_type = aa; // string string + + } else + { + BAD_RET("'%s' is not a valide argument for 'CreateVolume'\n", next_a); + } + i += incr; + goto create_volume_arg; + } + cret = osc_create_volume(&e, &r, &a); + TRY(cret, "fail to call CreateVolume: %s\n", curl_easy_strerror(cret)); + CHK_BAD_RET(!r.buf, "connection sucessful, but empty responce\n"); + if (program_flag & OAPI_RAW_OUTPUT) + puts(r.buf); + else { + jobj = json_tokener_parse(r.buf); + puts(json_object_to_json_string_ext(jobj, + JSON_C_TO_STRING_PRETTY | JSON_C_TO_STRING_NOSLASHESCAPE | + color_flag)); + json_object_put(jobj); + } + osc_deinit_str(&r); + } else + if (!strcmp("CreateVms", av[i])) { + json_object *jobj; + auto_ptr_array struct ptr_array opa = {0}; + struct ptr_array *pa = &opa; + struct osc_create_vms_arg a = {0}; + struct osc_create_vms_arg *s = &a; + __attribute__((cleanup(files_cnt_cleanup))) char *files_cnt[MAX_FILES_PER_CMD] = {NULL}; + int cret; + + cascade_struct = NULL; + cascade_parser = NULL; + + create_vms_arg: + + if (i + 1 < ac && av[i + 1][0] == '.' && av[i + 1][1] == '.') { + char *next_a = &av[i + 1][2]; + char *aa = i + 2 < ac ? av[i + 2] : 0; + int incr = 2; + char *eq_ptr = strchr(next_a, '='); + + CHK_BAD_RET(!cascade_struct, "cascade need to be se first\n"); + if (eq_ptr) { + CHK_BAD_RET(!*eq_ptr, "cascade need an argument\n"); + incr = 1; + aa = eq_ptr + 1; + } else { + CHK_BAD_RET(!aa || aa[0] == '-', "cascade need an argument\n"); + } + STRY(cascade_parser(cascade_struct, next_a, aa, pa)); + i += incr; + goto create_vms_arg; + } + + if (i + 1 < ac && av[i + 1][0] == '-' && av[i + 1][1] == '-') { + char *next_a = &av[i + 1][2]; + char *str = next_a; + char *aa = i + 2 < ac ? av[i + 2] : 0; + int aret = 0; + int incr = aa ? 2 : 1; + + if (aa && aa[0] == '-' && aa[1] == '-' && aa[2] != '-') { + if (!strcmp(aa, "--file")) { + TRY(i + 3 >= ac, "file name require"); + ++incr; + aa = read_file(files_cnt, av[i + 3]); + STRY(!aa); + } else { + aa = 0; + incr = 1; + } + } + if ((aret = argcmp(next_a, "BlockDeviceMappings")) == 0 || aret == '=' ) { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "BlockDeviceMappings argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + char *dot_pos = strchr(str, '.'); + + if (dot_pos) { + int pos; + char *endptr; + + ++dot_pos; + pos = strtoul(dot_pos, &endptr, 0); + if (endptr == dot_pos) + BAD_RET("'BlockDeviceMappings' require an index (example array ref BlockDeviceMappingVmCreation.BlockDeviceMappings.0)\n"); + else if (*endptr != '.') + BAD_RET("'BlockDeviceMappings' require a .\n"); + TRY_ALLOC_AT(s,block_device_mappings, pa, pos, sizeof(*s->block_device_mappings)); + cascade_struct = &s->block_device_mappings[pos]; + cascade_parser = block_device_mapping_vm_creation_parser; + if (endptr[1] == '.') { + ++endptr; + } + STRY(block_device_mapping_vm_creation_parser(&s->block_device_mappings[pos], endptr + 1, aa, pa)); + } else { + TRY(!aa, "BlockDeviceMappings argument missing\n"); + s->block_device_mappings_str = aa; // array ref BlockDeviceMappingVmCreation ref + } + } else + if ((aret = argcmp(next_a, "BootOnCreation")) == 0 || aret == '=' ) { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "BootOnCreation argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + s->is_set_boot_on_creation = 1; + if (!aa || !strcasecmp(aa, "true")) { + s->boot_on_creation = 1; + } else if (!strcasecmp(aa, "false")) { + s->boot_on_creation = 0; + } else { + BAD_RET("BootOnCreation require true/false\n"); + } + } else + if ((aret = argcmp(next_a, "BsuOptimized")) == 0 || aret == '=' ) { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "BsuOptimized argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + s->is_set_bsu_optimized = 1; + if (!aa || !strcasecmp(aa, "true")) { + s->bsu_optimized = 1; + } else if (!strcasecmp(aa, "false")) { + s->bsu_optimized = 0; + } else { + BAD_RET("BsuOptimized require true/false\n"); + } + } else + if ((aret = argcmp(next_a, "ClientToken")) == 0 || aret == '=' ) { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "ClientToken argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + TRY(!aa, "ClientToken argument missing\n"); + s->client_token = aa; // string string + + } else + if ((aret = argcmp(next_a, "DeletionProtection")) == 0 || aret == '=' ) { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "DeletionProtection argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + s->is_set_deletion_protection = 1; + if (!aa || !strcasecmp(aa, "true")) { + s->deletion_protection = 1; + } else if (!strcasecmp(aa, "false")) { + s->deletion_protection = 0; + } else { + BAD_RET("DeletionProtection require true/false\n"); + } + } else + if ((aret = argcmp(next_a, "DryRun")) == 0 || aret == '=' ) { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "DryRun argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + s->is_set_dry_run = 1; + if (!aa || !strcasecmp(aa, "true")) { + s->dry_run = 1; + } else if (!strcasecmp(aa, "false")) { + s->dry_run = 0; + } else { + BAD_RET("DryRun require true/false\n"); + } + } else + if ((aret = argcmp(next_a, "ImageId")) == 0 || aret == '=' ) { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "ImageId argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + TRY(!aa, "ImageId argument missing\n"); + s->image_id = aa; // string string + + } else + if ((aret = argcmp(next_a, "KeypairName")) == 0 || aret == '=' ) { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "KeypairName argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + TRY(!aa, "KeypairName argument missing\n"); + s->keypair_name = aa; // string string + + } else + if ((aret = argcmp(next_a, "MaxVmsCount")) == 0 || aret == '=' ) { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "MaxVmsCount argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + TRY(!aa, "MaxVmsCount argument missing\n"); + s->is_set_max_vms_count = 1; + s->max_vms_count = atoi(aa); + } else + if ((aret = argcmp(next_a, "MinVmsCount")) == 0 || aret == '=' ) { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "MinVmsCount argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + TRY(!aa, "MinVmsCount argument missing\n"); + s->is_set_min_vms_count = 1; + s->min_vms_count = atoi(aa); + } else + if ((aret = argcmp(next_a, "NestedVirtualization")) == 0 || aret == '=' ) { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "NestedVirtualization argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + s->is_set_nested_virtualization = 1; + if (!aa || !strcasecmp(aa, "true")) { + s->nested_virtualization = 1; + } else if (!strcasecmp(aa, "false")) { + s->nested_virtualization = 0; + } else { + BAD_RET("NestedVirtualization require true/false\n"); + } + } else + if ((aret = argcmp(next_a, "Nics")) == 0 || aret == '=' ) { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "Nics argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + char *dot_pos = strchr(str, '.'); + + if (dot_pos) { + int pos; + char *endptr; + + ++dot_pos; + pos = strtoul(dot_pos, &endptr, 0); + if (endptr == dot_pos) + BAD_RET("'Nics' require an index (example array ref NicForVmCreation.Nics.0)\n"); + else if (*endptr != '.') + BAD_RET("'Nics' require a .\n"); + TRY_ALLOC_AT(s,nics, pa, pos, sizeof(*s->nics)); + cascade_struct = &s->nics[pos]; + cascade_parser = nic_for_vm_creation_parser; + if (endptr[1] == '.') { + ++endptr; + } + STRY(nic_for_vm_creation_parser(&s->nics[pos], endptr + 1, aa, pa)); + } else { + TRY(!aa, "Nics argument missing\n"); + s->nics_str = aa; // array ref NicForVmCreation ref + } + } else + if ((aret = argcmp(next_a, "Performance")) == 0 || aret == '=' ) { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "Performance argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + TRY(!aa, "Performance argument missing\n"); + s->performance = aa; // string string + + } else + if ((aret = argcmp(next_a, "Placement")) == 0 || aret == '=' ) { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "Placement argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + char *dot_pos; + + TRY(!aa, "Placement argument missing\n"); + dot_pos = strchr(str, '.'); + if (dot_pos++) { + cascade_struct = &s->placement; + cascade_parser = placement_parser; + if (*dot_pos == '.') { + ++dot_pos; + } + STRY(placement_parser(&s->placement, dot_pos, aa, pa)); + s->is_set_placement = 1; + } else { + s->placement_str = aa; + } + } else + if ((aret = argcmp(next_a, "PrivateIps")) == 0 || aret == '=' ) { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "PrivateIps argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + TRY(!aa, "PrivateIps argument missing\n"); + s->private_ips_str = aa; + } else if (!(aret = strcmp(str, "PrivateIps[]")) || aret == '=') { + TRY(!aa, "PrivateIps[] argument missing\n"); + SET_NEXT(s->private_ips, (aa), pa); + } else + if ((aret = argcmp(next_a, "SecurityGroupIds")) == 0 || aret == '=' ) { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "SecurityGroupIds argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + TRY(!aa, "SecurityGroupIds argument missing\n"); + s->security_group_ids_str = aa; + } else if (!(aret = strcmp(str, "SecurityGroupIds[]")) || aret == '=') { + TRY(!aa, "SecurityGroupIds[] argument missing\n"); + SET_NEXT(s->security_group_ids, (aa), pa); + } else + if ((aret = argcmp(next_a, "SecurityGroups")) == 0 || aret == '=' ) { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "SecurityGroups argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + TRY(!aa, "SecurityGroups argument missing\n"); + s->security_groups_str = aa; + } else if (!(aret = strcmp(str, "SecurityGroups[]")) || aret == '=') { + TRY(!aa, "SecurityGroups[] argument missing\n"); + SET_NEXT(s->security_groups, (aa), pa); + } else + if ((aret = argcmp(next_a, "SubnetId")) == 0 || aret == '=' ) { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "SubnetId argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + TRY(!aa, "SubnetId argument missing\n"); + s->subnet_id = aa; // string string + + } else + if ((aret = argcmp(next_a, "UserData")) == 0 || aret == '=' ) { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "UserData argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + TRY(!aa, "UserData argument missing\n"); + s->user_data = aa; // string string + + } else + if ((aret = argcmp(next_a, "VmInitiatedShutdownBehavior")) == 0 || aret == '=' ) { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "VmInitiatedShutdownBehavior argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + TRY(!aa, "VmInitiatedShutdownBehavior argument missing\n"); + s->vm_initiated_shutdown_behavior = aa; // string string + + } else + if ((aret = argcmp(next_a, "VmType")) == 0 || aret == '=' ) { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "VmType argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + TRY(!aa, "VmType argument missing\n"); + s->vm_type = aa; // string string + + } else + { + BAD_RET("'%s' is not a valide argument for 'CreateVms'\n", next_a); + } + i += incr; + goto create_vms_arg; + } + cret = osc_create_vms(&e, &r, &a); + TRY(cret, "fail to call CreateVms: %s\n", curl_easy_strerror(cret)); + CHK_BAD_RET(!r.buf, "connection sucessful, but empty responce\n"); + if (program_flag & OAPI_RAW_OUTPUT) + puts(r.buf); + else { + jobj = json_tokener_parse(r.buf); + puts(json_object_to_json_string_ext(jobj, + JSON_C_TO_STRING_PRETTY | JSON_C_TO_STRING_NOSLASHESCAPE | + color_flag)); + json_object_put(jobj); + } + osc_deinit_str(&r); + } else + if (!strcmp("CreateVmTemplate", av[i])) { + json_object *jobj; + auto_ptr_array struct ptr_array opa = {0}; + struct ptr_array *pa = &opa; + struct osc_create_vm_template_arg a = {0}; + struct osc_create_vm_template_arg *s = &a; + __attribute__((cleanup(files_cnt_cleanup))) char *files_cnt[MAX_FILES_PER_CMD] = {NULL}; + int cret; + + cascade_struct = NULL; + cascade_parser = NULL; + + create_vm_template_arg: + + if (i + 1 < ac && av[i + 1][0] == '.' && av[i + 1][1] == '.') { + char *next_a = &av[i + 1][2]; + char *aa = i + 2 < ac ? av[i + 2] : 0; + int incr = 2; + char *eq_ptr = strchr(next_a, '='); + + CHK_BAD_RET(!cascade_struct, "cascade need to be se first\n"); + if (eq_ptr) { + CHK_BAD_RET(!*eq_ptr, "cascade need an argument\n"); + incr = 1; + aa = eq_ptr + 1; + } else { + CHK_BAD_RET(!aa || aa[0] == '-', "cascade need an argument\n"); + } + STRY(cascade_parser(cascade_struct, next_a, aa, pa)); + i += incr; + goto create_vm_template_arg; + } + + if (i + 1 < ac && av[i + 1][0] == '-' && av[i + 1][1] == '-') { + char *next_a = &av[i + 1][2]; + char *str = next_a; + char *aa = i + 2 < ac ? av[i + 2] : 0; + int aret = 0; + int incr = aa ? 2 : 1; + + if (aa && aa[0] == '-' && aa[1] == '-' && aa[2] != '-') { + if (!strcmp(aa, "--file")) { + TRY(i + 3 >= ac, "file name require"); + ++incr; + aa = read_file(files_cnt, av[i + 3]); + STRY(!aa); + } else { + aa = 0; + incr = 1; + } + } + if ((aret = argcmp(next_a, "CpuCores")) == 0 || aret == '=' ) { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "CpuCores argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + TRY(!aa, "CpuCores argument missing\n"); + s->is_set_cpu_cores = 1; + s->cpu_cores = atoi(aa); + } else + if ((aret = argcmp(next_a, "CpuGeneration")) == 0 || aret == '=' ) { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "CpuGeneration argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + TRY(!aa, "CpuGeneration argument missing\n"); + s->cpu_generation = aa; // string string + + } else + if ((aret = argcmp(next_a, "CpuPerformance")) == 0 || aret == '=' ) { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "CpuPerformance argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + TRY(!aa, "CpuPerformance argument missing\n"); + s->cpu_performance = aa; // string string + + } else + if ((aret = argcmp(next_a, "Description")) == 0 || aret == '=' ) { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "Description argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + TRY(!aa, "Description argument missing\n"); + s->description = aa; // string string + + } else + if ((aret = argcmp(next_a, "DryRun")) == 0 || aret == '=' ) { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "DryRun argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + s->is_set_dry_run = 1; + if (!aa || !strcasecmp(aa, "true")) { + s->dry_run = 1; + } else if (!strcasecmp(aa, "false")) { + s->dry_run = 0; + } else { + BAD_RET("DryRun require true/false\n"); + } + } else + if ((aret = argcmp(next_a, "ImageId")) == 0 || aret == '=' ) { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "ImageId argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + TRY(!aa, "ImageId argument missing\n"); + s->image_id = aa; // string string + + } else + if ((aret = argcmp(next_a, "KeypairName")) == 0 || aret == '=' ) { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "KeypairName argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + TRY(!aa, "KeypairName argument missing\n"); + s->keypair_name = aa; // string string + + } else + if ((aret = argcmp(next_a, "Ram")) == 0 || aret == '=' ) { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "Ram argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + TRY(!aa, "Ram argument missing\n"); + s->is_set_ram = 1; + s->ram = atoi(aa); + } else + if ((aret = argcmp(next_a, "Tags")) == 0 || aret == '=' ) { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "Tags argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + char *dot_pos = strchr(str, '.'); + + if (dot_pos) { + int pos; + char *endptr; + + ++dot_pos; + pos = strtoul(dot_pos, &endptr, 0); + if (endptr == dot_pos) + BAD_RET("'Tags' require an index (example array ref ResourceTag.Tags.0)\n"); + else if (*endptr != '.') + BAD_RET("'Tags' require a .\n"); + TRY_ALLOC_AT(s,tags, pa, pos, sizeof(*s->tags)); + cascade_struct = &s->tags[pos]; + cascade_parser = resource_tag_parser; + if (endptr[1] == '.') { + ++endptr; + } + STRY(resource_tag_parser(&s->tags[pos], endptr + 1, aa, pa)); + } else { + TRY(!aa, "Tags argument missing\n"); + s->tags_str = aa; // array ref ResourceTag ref + } + } else + if ((aret = argcmp(next_a, "VmTemplateName")) == 0 || aret == '=' ) { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "VmTemplateName argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + TRY(!aa, "VmTemplateName argument missing\n"); + s->vm_template_name = aa; // string string + + } else + { + BAD_RET("'%s' is not a valide argument for 'CreateVmTemplate'\n", next_a); + } + i += incr; + goto create_vm_template_arg; + } + cret = osc_create_vm_template(&e, &r, &a); + TRY(cret, "fail to call CreateVmTemplate: %s\n", curl_easy_strerror(cret)); + CHK_BAD_RET(!r.buf, "connection sucessful, but empty responce\n"); + if (program_flag & OAPI_RAW_OUTPUT) + puts(r.buf); + else { + jobj = json_tokener_parse(r.buf); + puts(json_object_to_json_string_ext(jobj, + JSON_C_TO_STRING_PRETTY | JSON_C_TO_STRING_NOSLASHESCAPE | + color_flag)); + json_object_put(jobj); + } + osc_deinit_str(&r); + } else + if (!strcmp("CreateVmGroup", av[i])) { + json_object *jobj; + auto_ptr_array struct ptr_array opa = {0}; + struct ptr_array *pa = &opa; + struct osc_create_vm_group_arg a = {0}; + struct osc_create_vm_group_arg *s = &a; + __attribute__((cleanup(files_cnt_cleanup))) char *files_cnt[MAX_FILES_PER_CMD] = {NULL}; + int cret; + + cascade_struct = NULL; + cascade_parser = NULL; + + create_vm_group_arg: + + if (i + 1 < ac && av[i + 1][0] == '.' && av[i + 1][1] == '.') { + char *next_a = &av[i + 1][2]; + char *aa = i + 2 < ac ? av[i + 2] : 0; + int incr = 2; + char *eq_ptr = strchr(next_a, '='); + + CHK_BAD_RET(!cascade_struct, "cascade need to be se first\n"); + if (eq_ptr) { + CHK_BAD_RET(!*eq_ptr, "cascade need an argument\n"); + incr = 1; + aa = eq_ptr + 1; + } else { + CHK_BAD_RET(!aa || aa[0] == '-', "cascade need an argument\n"); + } + STRY(cascade_parser(cascade_struct, next_a, aa, pa)); + i += incr; + goto create_vm_group_arg; + } + + if (i + 1 < ac && av[i + 1][0] == '-' && av[i + 1][1] == '-') { + char *next_a = &av[i + 1][2]; + char *str = next_a; + char *aa = i + 2 < ac ? av[i + 2] : 0; + int aret = 0; + int incr = aa ? 2 : 1; + + if (aa && aa[0] == '-' && aa[1] == '-' && aa[2] != '-') { + if (!strcmp(aa, "--file")) { + TRY(i + 3 >= ac, "file name require"); + ++incr; + aa = read_file(files_cnt, av[i + 3]); + STRY(!aa); + } else { + aa = 0; + incr = 1; + } + } + if ((aret = argcmp(next_a, "Description")) == 0 || aret == '=' ) { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "Description argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + TRY(!aa, "Description argument missing\n"); + s->description = aa; // string string + + } else if ((aret = argcmp(next_a, "DryRun")) == 0 || aret == '=' ) { char *eq_ptr = strchr(next_a, '='); if (eq_ptr) { @@ -26176,70 +29089,45 @@ int main(int ac, char **av) BAD_RET("DryRun require true/false\n"); } } else - if ((aret = argcmp(next_a, "ImageId")) == 0 || aret == '=' ) { - char *eq_ptr = strchr(next_a, '='); - if (eq_ptr) { - TRY((!*eq_ptr), "ImageId argument missing\n"); - aa = eq_ptr + 1; - incr = 1; - } - TRY(!aa, "ImageId argument missing\n"); - s->image_id = aa; // string string - - } else - if ((aret = argcmp(next_a, "KeypairName")) == 0 || aret == '=' ) { + if ((aret = argcmp(next_a, "PositioningStrategy")) == 0 || aret == '=' ) { char *eq_ptr = strchr(next_a, '='); if (eq_ptr) { - TRY((!*eq_ptr), "KeypairName argument missing\n"); + TRY((!*eq_ptr), "PositioningStrategy argument missing\n"); aa = eq_ptr + 1; incr = 1; } - TRY(!aa, "KeypairName argument missing\n"); - s->keypair_name = aa; // string string + TRY(!aa, "PositioningStrategy argument missing\n"); + s->positioning_strategy = aa; // string string } else - if ((aret = argcmp(next_a, "MaxVmsCount")) == 0 || aret == '=' ) { + if ((aret = argcmp(next_a, "SecurityGroupIds")) == 0 || aret == '=' ) { char *eq_ptr = strchr(next_a, '='); if (eq_ptr) { - TRY((!*eq_ptr), "MaxVmsCount argument missing\n"); + TRY((!*eq_ptr), "SecurityGroupIds argument missing\n"); aa = eq_ptr + 1; incr = 1; } - TRY(!aa, "MaxVmsCount argument missing\n"); - s->is_set_max_vms_count = 1; - s->max_vms_count = atoi(aa); + TRY(!aa, "SecurityGroupIds argument missing\n"); + s->security_group_ids_str = aa; + } else if (!(aret = strcmp(str, "SecurityGroupIds[]")) || aret == '=') { + TRY(!aa, "SecurityGroupIds[] argument missing\n"); + SET_NEXT(s->security_group_ids, (aa), pa); } else - if ((aret = argcmp(next_a, "MinVmsCount")) == 0 || aret == '=' ) { + if ((aret = argcmp(next_a, "SubnetId")) == 0 || aret == '=' ) { char *eq_ptr = strchr(next_a, '='); if (eq_ptr) { - TRY((!*eq_ptr), "MinVmsCount argument missing\n"); + TRY((!*eq_ptr), "SubnetId argument missing\n"); aa = eq_ptr + 1; incr = 1; } - TRY(!aa, "MinVmsCount argument missing\n"); - s->is_set_min_vms_count = 1; - s->min_vms_count = atoi(aa); + TRY(!aa, "SubnetId argument missing\n"); + s->subnet_id = aa; // string string + } else - if ((aret = argcmp(next_a, "NestedVirtualization")) == 0 || aret == '=' ) { - char *eq_ptr = strchr(next_a, '='); - if (eq_ptr) { - TRY((!*eq_ptr), "NestedVirtualization argument missing\n"); - aa = eq_ptr + 1; - incr = 1; - } - s->is_set_nested_virtualization = 1; - if (!aa || !strcasecmp(aa, "true")) { - s->nested_virtualization = 1; - } else if (!strcasecmp(aa, "false")) { - s->nested_virtualization = 0; - } else { - BAD_RET("NestedVirtualization require true/false\n"); - } - } else - if ((aret = argcmp(next_a, "Nics")) == 0 || aret == '=' ) { + if ((aret = argcmp(next_a, "Tags")) == 0 || aret == '=' ) { char *eq_ptr = strchr(next_a, '='); if (eq_ptr) { - TRY((!*eq_ptr), "Nics argument missing\n"); + TRY((!*eq_ptr), "Tags argument missing\n"); aa = eq_ptr + 1; incr = 1; } @@ -26252,146 +29140,160 @@ int main(int ac, char **av) ++dot_pos; pos = strtoul(dot_pos, &endptr, 0); if (endptr == dot_pos) - BAD_RET("'Nics' require an index (example array ref NicForVmCreation.Nics.0)\n"); + BAD_RET("'Tags' require an index (example array ref ResourceTag.Tags.0)\n"); else if (*endptr != '.') - BAD_RET("'Nics' require a .\n"); - TRY_ALLOC_AT(s,nics, pa, pos, sizeof(*s->nics)); - cascade_struct = &s->nics[pos]; - cascade_parser = nic_for_vm_creation_parser; + BAD_RET("'Tags' require a .\n"); + TRY_ALLOC_AT(s,tags, pa, pos, sizeof(*s->tags)); + cascade_struct = &s->tags[pos]; + cascade_parser = resource_tag_parser; if (endptr[1] == '.') { ++endptr; } - STRY(nic_for_vm_creation_parser(&s->nics[pos], endptr + 1, aa, pa)); + STRY(resource_tag_parser(&s->tags[pos], endptr + 1, aa, pa)); } else { - TRY(!aa, "Nics argument missing\n"); - s->nics_str = aa; // array ref NicForVmCreation ref + TRY(!aa, "Tags argument missing\n"); + s->tags_str = aa; // array ref ResourceTag ref } } else - if ((aret = argcmp(next_a, "Performance")) == 0 || aret == '=' ) { + if ((aret = argcmp(next_a, "VmCount")) == 0 || aret == '=' ) { char *eq_ptr = strchr(next_a, '='); if (eq_ptr) { - TRY((!*eq_ptr), "Performance argument missing\n"); + TRY((!*eq_ptr), "VmCount argument missing\n"); aa = eq_ptr + 1; incr = 1; } - TRY(!aa, "Performance argument missing\n"); - s->performance = aa; // string string - + TRY(!aa, "VmCount argument missing\n"); + s->is_set_vm_count = 1; + s->vm_count = atoi(aa); } else - if ((aret = argcmp(next_a, "Placement")) == 0 || aret == '=' ) { + if ((aret = argcmp(next_a, "VmGroupName")) == 0 || aret == '=' ) { char *eq_ptr = strchr(next_a, '='); if (eq_ptr) { - TRY((!*eq_ptr), "Placement argument missing\n"); + TRY((!*eq_ptr), "VmGroupName argument missing\n"); aa = eq_ptr + 1; incr = 1; } - char *dot_pos; + TRY(!aa, "VmGroupName argument missing\n"); + s->vm_group_name = aa; // string string - TRY(!aa, "Placement argument missing\n"); - dot_pos = strchr(str, '.'); - if (dot_pos++) { - cascade_struct = &s->placement; - cascade_parser = placement_parser; - if (*dot_pos == '.') { - ++dot_pos; - } - STRY(placement_parser(&s->placement, dot_pos, aa, pa)); - s->is_set_placement = 1; - } else { - s->placement_str = aa; - } - } else - if ((aret = argcmp(next_a, "PrivateIps")) == 0 || aret == '=' ) { - char *eq_ptr = strchr(next_a, '='); - if (eq_ptr) { - TRY((!*eq_ptr), "PrivateIps argument missing\n"); - aa = eq_ptr + 1; - incr = 1; - } - TRY(!aa, "PrivateIps argument missing\n"); - s->private_ips_str = aa; - } else if (!(aret = strcmp(str, "PrivateIps[]")) || aret == '=') { - TRY(!aa, "PrivateIps[] argument missing\n"); - SET_NEXT(s->private_ips, (aa), pa); - } else - if ((aret = argcmp(next_a, "SecurityGroupIds")) == 0 || aret == '=' ) { - char *eq_ptr = strchr(next_a, '='); - if (eq_ptr) { - TRY((!*eq_ptr), "SecurityGroupIds argument missing\n"); - aa = eq_ptr + 1; - incr = 1; - } - TRY(!aa, "SecurityGroupIds argument missing\n"); - s->security_group_ids_str = aa; - } else if (!(aret = strcmp(str, "SecurityGroupIds[]")) || aret == '=') { - TRY(!aa, "SecurityGroupIds[] argument missing\n"); - SET_NEXT(s->security_group_ids, (aa), pa); - } else - if ((aret = argcmp(next_a, "SecurityGroups")) == 0 || aret == '=' ) { - char *eq_ptr = strchr(next_a, '='); - if (eq_ptr) { - TRY((!*eq_ptr), "SecurityGroups argument missing\n"); - aa = eq_ptr + 1; - incr = 1; - } - TRY(!aa, "SecurityGroups argument missing\n"); - s->security_groups_str = aa; - } else if (!(aret = strcmp(str, "SecurityGroups[]")) || aret == '=') { - TRY(!aa, "SecurityGroups[] argument missing\n"); - SET_NEXT(s->security_groups, (aa), pa); } else - if ((aret = argcmp(next_a, "SubnetId")) == 0 || aret == '=' ) { + if ((aret = argcmp(next_a, "VmTemplateId")) == 0 || aret == '=' ) { char *eq_ptr = strchr(next_a, '='); if (eq_ptr) { - TRY((!*eq_ptr), "SubnetId argument missing\n"); + TRY((!*eq_ptr), "VmTemplateId argument missing\n"); aa = eq_ptr + 1; incr = 1; } - TRY(!aa, "SubnetId argument missing\n"); - s->subnet_id = aa; // string string + TRY(!aa, "VmTemplateId argument missing\n"); + s->vm_template_id = aa; // string string } else - if ((aret = argcmp(next_a, "UserData")) == 0 || aret == '=' ) { - char *eq_ptr = strchr(next_a, '='); - if (eq_ptr) { - TRY((!*eq_ptr), "UserData argument missing\n"); - aa = eq_ptr + 1; - incr = 1; - } - TRY(!aa, "UserData argument missing\n"); - s->user_data = aa; // string string + { + BAD_RET("'%s' is not a valide argument for 'CreateVmGroup'\n", next_a); + } + i += incr; + goto create_vm_group_arg; + } + cret = osc_create_vm_group(&e, &r, &a); + TRY(cret, "fail to call CreateVmGroup: %s\n", curl_easy_strerror(cret)); + CHK_BAD_RET(!r.buf, "connection sucessful, but empty responce\n"); + if (program_flag & OAPI_RAW_OUTPUT) + puts(r.buf); + else { + jobj = json_tokener_parse(r.buf); + puts(json_object_to_json_string_ext(jobj, + JSON_C_TO_STRING_PRETTY | JSON_C_TO_STRING_NOSLASHESCAPE | + color_flag)); + json_object_put(jobj); + } + osc_deinit_str(&r); + } else + if (!strcmp("CreateVirtualGateway", av[i])) { + json_object *jobj; + auto_ptr_array struct ptr_array opa = {0}; + struct ptr_array *pa = &opa; + struct osc_create_virtual_gateway_arg a = {0}; + struct osc_create_virtual_gateway_arg *s = &a; + __attribute__((cleanup(files_cnt_cleanup))) char *files_cnt[MAX_FILES_PER_CMD] = {NULL}; + int cret; - } else - if ((aret = argcmp(next_a, "VmInitiatedShutdownBehavior")) == 0 || aret == '=' ) { + cascade_struct = NULL; + cascade_parser = NULL; + + create_virtual_gateway_arg: + + if (i + 1 < ac && av[i + 1][0] == '.' && av[i + 1][1] == '.') { + char *next_a = &av[i + 1][2]; + char *aa = i + 2 < ac ? av[i + 2] : 0; + int incr = 2; + char *eq_ptr = strchr(next_a, '='); + + CHK_BAD_RET(!cascade_struct, "cascade need to be se first\n"); + if (eq_ptr) { + CHK_BAD_RET(!*eq_ptr, "cascade need an argument\n"); + incr = 1; + aa = eq_ptr + 1; + } else { + CHK_BAD_RET(!aa || aa[0] == '-', "cascade need an argument\n"); + } + STRY(cascade_parser(cascade_struct, next_a, aa, pa)); + i += incr; + goto create_virtual_gateway_arg; + } + + if (i + 1 < ac && av[i + 1][0] == '-' && av[i + 1][1] == '-') { + char *next_a = &av[i + 1][2]; + char *str = next_a; + char *aa = i + 2 < ac ? av[i + 2] : 0; + int aret = 0; + int incr = aa ? 2 : 1; + + if (aa && aa[0] == '-' && aa[1] == '-' && aa[2] != '-') { + if (!strcmp(aa, "--file")) { + TRY(i + 3 >= ac, "file name require"); + ++incr; + aa = read_file(files_cnt, av[i + 3]); + STRY(!aa); + } else { + aa = 0; + incr = 1; + } + } + if ((aret = argcmp(next_a, "ConnectionType")) == 0 || aret == '=' ) { char *eq_ptr = strchr(next_a, '='); if (eq_ptr) { - TRY((!*eq_ptr), "VmInitiatedShutdownBehavior argument missing\n"); + TRY((!*eq_ptr), "ConnectionType argument missing\n"); aa = eq_ptr + 1; incr = 1; } - TRY(!aa, "VmInitiatedShutdownBehavior argument missing\n"); - s->vm_initiated_shutdown_behavior = aa; // string string + TRY(!aa, "ConnectionType argument missing\n"); + s->connection_type = aa; // string string } else - if ((aret = argcmp(next_a, "VmType")) == 0 || aret == '=' ) { + if ((aret = argcmp(next_a, "DryRun")) == 0 || aret == '=' ) { char *eq_ptr = strchr(next_a, '='); if (eq_ptr) { - TRY((!*eq_ptr), "VmType argument missing\n"); - aa = eq_ptr + 1; - incr = 1; - } - TRY(!aa, "VmType argument missing\n"); - s->vm_type = aa; // string string - - } else + TRY((!*eq_ptr), "DryRun argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + s->is_set_dry_run = 1; + if (!aa || !strcasecmp(aa, "true")) { + s->dry_run = 1; + } else if (!strcasecmp(aa, "false")) { + s->dry_run = 0; + } else { + BAD_RET("DryRun require true/false\n"); + } + } else { - BAD_RET("'%s' is not a valide argument for 'CreateVms'\n", next_a); + BAD_RET("'%s' is not a valide argument for 'CreateVirtualGateway'\n", next_a); } i += incr; - goto create_vms_arg; + goto create_virtual_gateway_arg; } - cret = osc_create_vms(&e, &r, &a); - TRY(cret, "fail to call CreateVms: %s\n", curl_easy_strerror(cret)); + cret = osc_create_virtual_gateway(&e, &r, &a); + TRY(cret, "fail to call CreateVirtualGateway: %s\n", curl_easy_strerror(cret)); CHK_BAD_RET(!r.buf, "connection sucessful, but empty responce\n"); if (program_flag & OAPI_RAW_OUTPUT) puts(r.buf); @@ -26404,19 +29306,19 @@ int main(int ac, char **av) } osc_deinit_str(&r); } else - if (!strcmp("CreateVmTemplate", av[i])) { + if (!strcmp("CreateUser", av[i])) { json_object *jobj; auto_ptr_array struct ptr_array opa = {0}; struct ptr_array *pa = &opa; - struct osc_create_vm_template_arg a = {0}; - struct osc_create_vm_template_arg *s = &a; + struct osc_create_user_arg a = {0}; + struct osc_create_user_arg *s = &a; __attribute__((cleanup(files_cnt_cleanup))) char *files_cnt[MAX_FILES_PER_CMD] = {NULL}; int cret; cascade_struct = NULL; cascade_parser = NULL; - create_vm_template_arg: + create_user_arg: if (i + 1 < ac && av[i + 1][0] == '.' && av[i + 1][1] == '.') { char *next_a = &av[i + 1][2]; @@ -26434,7 +29336,7 @@ int main(int ac, char **av) } STRY(cascade_parser(cascade_struct, next_a, aa, pa)); i += incr; - goto create_vm_template_arg; + goto create_user_arg; } if (i + 1 < ac && av[i + 1][0] == '-' && av[i + 1][1] == '-') { @@ -26455,50 +29357,6 @@ int main(int ac, char **av) incr = 1; } } - if ((aret = argcmp(next_a, "CpuCores")) == 0 || aret == '=' ) { - char *eq_ptr = strchr(next_a, '='); - if (eq_ptr) { - TRY((!*eq_ptr), "CpuCores argument missing\n"); - aa = eq_ptr + 1; - incr = 1; - } - TRY(!aa, "CpuCores argument missing\n"); - s->is_set_cpu_cores = 1; - s->cpu_cores = atoi(aa); - } else - if ((aret = argcmp(next_a, "CpuGeneration")) == 0 || aret == '=' ) { - char *eq_ptr = strchr(next_a, '='); - if (eq_ptr) { - TRY((!*eq_ptr), "CpuGeneration argument missing\n"); - aa = eq_ptr + 1; - incr = 1; - } - TRY(!aa, "CpuGeneration argument missing\n"); - s->cpu_generation = aa; // string string - - } else - if ((aret = argcmp(next_a, "CpuPerformance")) == 0 || aret == '=' ) { - char *eq_ptr = strchr(next_a, '='); - if (eq_ptr) { - TRY((!*eq_ptr), "CpuPerformance argument missing\n"); - aa = eq_ptr + 1; - incr = 1; - } - TRY(!aa, "CpuPerformance argument missing\n"); - s->cpu_performance = aa; // string string - - } else - if ((aret = argcmp(next_a, "Description")) == 0 || aret == '=' ) { - char *eq_ptr = strchr(next_a, '='); - if (eq_ptr) { - TRY((!*eq_ptr), "Description argument missing\n"); - aa = eq_ptr + 1; - incr = 1; - } - TRY(!aa, "Description argument missing\n"); - s->description = aa; // string string - - } else if ((aret = argcmp(next_a, "DryRun")) == 0 || aret == '=' ) { char *eq_ptr = strchr(next_a, '='); if (eq_ptr) { @@ -26515,89 +29373,36 @@ int main(int ac, char **av) BAD_RET("DryRun require true/false\n"); } } else - if ((aret = argcmp(next_a, "ImageId")) == 0 || aret == '=' ) { - char *eq_ptr = strchr(next_a, '='); - if (eq_ptr) { - TRY((!*eq_ptr), "ImageId argument missing\n"); - aa = eq_ptr + 1; - incr = 1; - } - TRY(!aa, "ImageId argument missing\n"); - s->image_id = aa; // string string - - } else - if ((aret = argcmp(next_a, "KeypairName")) == 0 || aret == '=' ) { - char *eq_ptr = strchr(next_a, '='); - if (eq_ptr) { - TRY((!*eq_ptr), "KeypairName argument missing\n"); - aa = eq_ptr + 1; - incr = 1; - } - TRY(!aa, "KeypairName argument missing\n"); - s->keypair_name = aa; // string string - - } else - if ((aret = argcmp(next_a, "Ram")) == 0 || aret == '=' ) { - char *eq_ptr = strchr(next_a, '='); - if (eq_ptr) { - TRY((!*eq_ptr), "Ram argument missing\n"); - aa = eq_ptr + 1; - incr = 1; - } - TRY(!aa, "Ram argument missing\n"); - s->is_set_ram = 1; - s->ram = atoi(aa); - } else - if ((aret = argcmp(next_a, "Tags")) == 0 || aret == '=' ) { + if ((aret = argcmp(next_a, "Path")) == 0 || aret == '=' ) { char *eq_ptr = strchr(next_a, '='); if (eq_ptr) { - TRY((!*eq_ptr), "Tags argument missing\n"); + TRY((!*eq_ptr), "Path argument missing\n"); aa = eq_ptr + 1; incr = 1; } - char *dot_pos = strchr(str, '.'); - - if (dot_pos) { - int pos; - char *endptr; + TRY(!aa, "Path argument missing\n"); + s->path = aa; // string string - ++dot_pos; - pos = strtoul(dot_pos, &endptr, 0); - if (endptr == dot_pos) - BAD_RET("'Tags' require an index (example array ref ResourceTag.Tags.0)\n"); - else if (*endptr != '.') - BAD_RET("'Tags' require a .\n"); - TRY_ALLOC_AT(s,tags, pa, pos, sizeof(*s->tags)); - cascade_struct = &s->tags[pos]; - cascade_parser = resource_tag_parser; - if (endptr[1] == '.') { - ++endptr; - } - STRY(resource_tag_parser(&s->tags[pos], endptr + 1, aa, pa)); - } else { - TRY(!aa, "Tags argument missing\n"); - s->tags_str = aa; // array ref ResourceTag ref - } } else - if ((aret = argcmp(next_a, "VmTemplateName")) == 0 || aret == '=' ) { + if ((aret = argcmp(next_a, "UserName")) == 0 || aret == '=' ) { char *eq_ptr = strchr(next_a, '='); if (eq_ptr) { - TRY((!*eq_ptr), "VmTemplateName argument missing\n"); + TRY((!*eq_ptr), "UserName argument missing\n"); aa = eq_ptr + 1; incr = 1; } - TRY(!aa, "VmTemplateName argument missing\n"); - s->vm_template_name = aa; // string string + TRY(!aa, "UserName argument missing\n"); + s->user_name = aa; // string string } else { - BAD_RET("'%s' is not a valide argument for 'CreateVmTemplate'\n", next_a); + BAD_RET("'%s' is not a valide argument for 'CreateUser'\n", next_a); } i += incr; - goto create_vm_template_arg; + goto create_user_arg; } - cret = osc_create_vm_template(&e, &r, &a); - TRY(cret, "fail to call CreateVmTemplate: %s\n", curl_easy_strerror(cret)); + cret = osc_create_user(&e, &r, &a); + TRY(cret, "fail to call CreateUser: %s\n", curl_easy_strerror(cret)); CHK_BAD_RET(!r.buf, "connection sucessful, but empty responce\n"); if (program_flag & OAPI_RAW_OUTPUT) puts(r.buf); @@ -26610,19 +29415,19 @@ int main(int ac, char **av) } osc_deinit_str(&r); } else - if (!strcmp("CreateVmGroup", av[i])) { + if (!strcmp("CreateTags", av[i])) { json_object *jobj; auto_ptr_array struct ptr_array opa = {0}; struct ptr_array *pa = &opa; - struct osc_create_vm_group_arg a = {0}; - struct osc_create_vm_group_arg *s = &a; + struct osc_create_tags_arg a = {0}; + struct osc_create_tags_arg *s = &a; __attribute__((cleanup(files_cnt_cleanup))) char *files_cnt[MAX_FILES_PER_CMD] = {NULL}; int cret; cascade_struct = NULL; cascade_parser = NULL; - create_vm_group_arg: + create_tags_arg: if (i + 1 < ac && av[i + 1][0] == '.' && av[i + 1][1] == '.') { char *next_a = &av[i + 1][2]; @@ -26640,7 +29445,7 @@ int main(int ac, char **av) } STRY(cascade_parser(cascade_struct, next_a, aa, pa)); i += incr; - goto create_vm_group_arg; + goto create_tags_arg; } if (i + 1 < ac && av[i + 1][0] == '-' && av[i + 1][1] == '-') { @@ -26661,17 +29466,6 @@ int main(int ac, char **av) incr = 1; } } - if ((aret = argcmp(next_a, "Description")) == 0 || aret == '=' ) { - char *eq_ptr = strchr(next_a, '='); - if (eq_ptr) { - TRY((!*eq_ptr), "Description argument missing\n"); - aa = eq_ptr + 1; - incr = 1; - } - TRY(!aa, "Description argument missing\n"); - s->description = aa; // string string - - } else if ((aret = argcmp(next_a, "DryRun")) == 0 || aret == '=' ) { char *eq_ptr = strchr(next_a, '='); if (eq_ptr) { @@ -26688,40 +29482,18 @@ int main(int ac, char **av) BAD_RET("DryRun require true/false\n"); } } else - if ((aret = argcmp(next_a, "PositioningStrategy")) == 0 || aret == '=' ) { - char *eq_ptr = strchr(next_a, '='); - if (eq_ptr) { - TRY((!*eq_ptr), "PositioningStrategy argument missing\n"); - aa = eq_ptr + 1; - incr = 1; - } - TRY(!aa, "PositioningStrategy argument missing\n"); - s->positioning_strategy = aa; // string string - - } else - if ((aret = argcmp(next_a, "SecurityGroupIds")) == 0 || aret == '=' ) { - char *eq_ptr = strchr(next_a, '='); - if (eq_ptr) { - TRY((!*eq_ptr), "SecurityGroupIds argument missing\n"); - aa = eq_ptr + 1; - incr = 1; - } - TRY(!aa, "SecurityGroupIds argument missing\n"); - s->security_group_ids_str = aa; - } else if (!(aret = strcmp(str, "SecurityGroupIds[]")) || aret == '=') { - TRY(!aa, "SecurityGroupIds[] argument missing\n"); - SET_NEXT(s->security_group_ids, (aa), pa); - } else - if ((aret = argcmp(next_a, "SubnetId")) == 0 || aret == '=' ) { + if ((aret = argcmp(next_a, "ResourceIds")) == 0 || aret == '=' ) { char *eq_ptr = strchr(next_a, '='); if (eq_ptr) { - TRY((!*eq_ptr), "SubnetId argument missing\n"); + TRY((!*eq_ptr), "ResourceIds argument missing\n"); aa = eq_ptr + 1; incr = 1; } - TRY(!aa, "SubnetId argument missing\n"); - s->subnet_id = aa; // string string - + TRY(!aa, "ResourceIds argument missing\n"); + s->resource_ids_str = aa; + } else if (!(aret = strcmp(str, "ResourceIds[]")) || aret == '=') { + TRY(!aa, "ResourceIds[] argument missing\n"); + SET_NEXT(s->resource_ids, (aa), pa); } else if ((aret = argcmp(next_a, "Tags")) == 0 || aret == '=' ) { char *eq_ptr = strchr(next_a, '='); @@ -26738,63 +29510,30 @@ int main(int ac, char **av) ++dot_pos; pos = strtoul(dot_pos, &endptr, 0); - if (endptr == dot_pos) - BAD_RET("'Tags' require an index (example array ref ResourceTag.Tags.0)\n"); - else if (*endptr != '.') - BAD_RET("'Tags' require a .\n"); - TRY_ALLOC_AT(s,tags, pa, pos, sizeof(*s->tags)); - cascade_struct = &s->tags[pos]; - cascade_parser = resource_tag_parser; - if (endptr[1] == '.') { - ++endptr; - } - STRY(resource_tag_parser(&s->tags[pos], endptr + 1, aa, pa)); - } else { - TRY(!aa, "Tags argument missing\n"); - s->tags_str = aa; // array ref ResourceTag ref - } - } else - if ((aret = argcmp(next_a, "VmCount")) == 0 || aret == '=' ) { - char *eq_ptr = strchr(next_a, '='); - if (eq_ptr) { - TRY((!*eq_ptr), "VmCount argument missing\n"); - aa = eq_ptr + 1; - incr = 1; - } - TRY(!aa, "VmCount argument missing\n"); - s->is_set_vm_count = 1; - s->vm_count = atoi(aa); - } else - if ((aret = argcmp(next_a, "VmGroupName")) == 0 || aret == '=' ) { - char *eq_ptr = strchr(next_a, '='); - if (eq_ptr) { - TRY((!*eq_ptr), "VmGroupName argument missing\n"); - aa = eq_ptr + 1; - incr = 1; - } - TRY(!aa, "VmGroupName argument missing\n"); - s->vm_group_name = aa; // string string - - } else - if ((aret = argcmp(next_a, "VmTemplateId")) == 0 || aret == '=' ) { - char *eq_ptr = strchr(next_a, '='); - if (eq_ptr) { - TRY((!*eq_ptr), "VmTemplateId argument missing\n"); - aa = eq_ptr + 1; - incr = 1; - } - TRY(!aa, "VmTemplateId argument missing\n"); - s->vm_template_id = aa; // string string - + if (endptr == dot_pos) + BAD_RET("'Tags' require an index (example array ref ResourceTag.Tags.0)\n"); + else if (*endptr != '.') + BAD_RET("'Tags' require a .\n"); + TRY_ALLOC_AT(s,tags, pa, pos, sizeof(*s->tags)); + cascade_struct = &s->tags[pos]; + cascade_parser = resource_tag_parser; + if (endptr[1] == '.') { + ++endptr; + } + STRY(resource_tag_parser(&s->tags[pos], endptr + 1, aa, pa)); + } else { + TRY(!aa, "Tags argument missing\n"); + s->tags_str = aa; // array ref ResourceTag ref + } } else { - BAD_RET("'%s' is not a valide argument for 'CreateVmGroup'\n", next_a); + BAD_RET("'%s' is not a valide argument for 'CreateTags'\n", next_a); } i += incr; - goto create_vm_group_arg; + goto create_tags_arg; } - cret = osc_create_vm_group(&e, &r, &a); - TRY(cret, "fail to call CreateVmGroup: %s\n", curl_easy_strerror(cret)); + cret = osc_create_tags(&e, &r, &a); + TRY(cret, "fail to call CreateTags: %s\n", curl_easy_strerror(cret)); CHK_BAD_RET(!r.buf, "connection sucessful, but empty responce\n"); if (program_flag & OAPI_RAW_OUTPUT) puts(r.buf); @@ -26807,19 +29546,19 @@ int main(int ac, char **av) } osc_deinit_str(&r); } else - if (!strcmp("CreateVirtualGateway", av[i])) { + if (!strcmp("CreateSubnet", av[i])) { json_object *jobj; auto_ptr_array struct ptr_array opa = {0}; struct ptr_array *pa = &opa; - struct osc_create_virtual_gateway_arg a = {0}; - struct osc_create_virtual_gateway_arg *s = &a; + struct osc_create_subnet_arg a = {0}; + struct osc_create_subnet_arg *s = &a; __attribute__((cleanup(files_cnt_cleanup))) char *files_cnt[MAX_FILES_PER_CMD] = {NULL}; int cret; cascade_struct = NULL; cascade_parser = NULL; - create_virtual_gateway_arg: + create_subnet_arg: if (i + 1 < ac && av[i + 1][0] == '.' && av[i + 1][1] == '.') { char *next_a = &av[i + 1][2]; @@ -26837,7 +29576,7 @@ int main(int ac, char **av) } STRY(cascade_parser(cascade_struct, next_a, aa, pa)); i += incr; - goto create_virtual_gateway_arg; + goto create_subnet_arg; } if (i + 1 < ac && av[i + 1][0] == '-' && av[i + 1][1] == '-') { @@ -26858,17 +29597,6 @@ int main(int ac, char **av) incr = 1; } } - if ((aret = argcmp(next_a, "ConnectionType")) == 0 || aret == '=' ) { - char *eq_ptr = strchr(next_a, '='); - if (eq_ptr) { - TRY((!*eq_ptr), "ConnectionType argument missing\n"); - aa = eq_ptr + 1; - incr = 1; - } - TRY(!aa, "ConnectionType argument missing\n"); - s->connection_type = aa; // string string - - } else if ((aret = argcmp(next_a, "DryRun")) == 0 || aret == '=' ) { char *eq_ptr = strchr(next_a, '='); if (eq_ptr) { @@ -26885,14 +29613,47 @@ int main(int ac, char **av) BAD_RET("DryRun require true/false\n"); } } else + if ((aret = argcmp(next_a, "IpRange")) == 0 || aret == '=' ) { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "IpRange argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + TRY(!aa, "IpRange argument missing\n"); + s->ip_range = aa; // string string + + } else + if ((aret = argcmp(next_a, "NetId")) == 0 || aret == '=' ) { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "NetId argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + TRY(!aa, "NetId argument missing\n"); + s->net_id = aa; // string string + + } else + if ((aret = argcmp(next_a, "SubregionName")) == 0 || aret == '=' ) { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "SubregionName argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + TRY(!aa, "SubregionName argument missing\n"); + s->subregion_name = aa; // string string + + } else { - BAD_RET("'%s' is not a valide argument for 'CreateVirtualGateway'\n", next_a); + BAD_RET("'%s' is not a valide argument for 'CreateSubnet'\n", next_a); } i += incr; - goto create_virtual_gateway_arg; + goto create_subnet_arg; } - cret = osc_create_virtual_gateway(&e, &r, &a); - TRY(cret, "fail to call CreateVirtualGateway: %s\n", curl_easy_strerror(cret)); + cret = osc_create_subnet(&e, &r, &a); + TRY(cret, "fail to call CreateSubnet: %s\n", curl_easy_strerror(cret)); CHK_BAD_RET(!r.buf, "connection sucessful, but empty responce\n"); if (program_flag & OAPI_RAW_OUTPUT) puts(r.buf); @@ -26905,19 +29666,19 @@ int main(int ac, char **av) } osc_deinit_str(&r); } else - if (!strcmp("CreateUser", av[i])) { + if (!strcmp("CreateSnapshotExportTask", av[i])) { json_object *jobj; auto_ptr_array struct ptr_array opa = {0}; struct ptr_array *pa = &opa; - struct osc_create_user_arg a = {0}; - struct osc_create_user_arg *s = &a; + struct osc_create_snapshot_export_task_arg a = {0}; + struct osc_create_snapshot_export_task_arg *s = &a; __attribute__((cleanup(files_cnt_cleanup))) char *files_cnt[MAX_FILES_PER_CMD] = {NULL}; int cret; cascade_struct = NULL; cascade_parser = NULL; - create_user_arg: + create_snapshot_export_task_arg: if (i + 1 < ac && av[i + 1][0] == '.' && av[i + 1][1] == '.') { char *next_a = &av[i + 1][2]; @@ -26935,7 +29696,7 @@ int main(int ac, char **av) } STRY(cascade_parser(cascade_struct, next_a, aa, pa)); i += incr; - goto create_user_arg; + goto create_snapshot_export_task_arg; } if (i + 1 < ac && av[i + 1][0] == '-' && av[i + 1][1] == '-') { @@ -26972,36 +29733,48 @@ int main(int ac, char **av) BAD_RET("DryRun require true/false\n"); } } else - if ((aret = argcmp(next_a, "Path")) == 0 || aret == '=' ) { + if ((aret = argcmp(next_a, "OsuExport")) == 0 || aret == '=' ) { char *eq_ptr = strchr(next_a, '='); if (eq_ptr) { - TRY((!*eq_ptr), "Path argument missing\n"); + TRY((!*eq_ptr), "OsuExport argument missing\n"); aa = eq_ptr + 1; incr = 1; } - TRY(!aa, "Path argument missing\n"); - s->path = aa; // string string + char *dot_pos; + TRY(!aa, "OsuExport argument missing\n"); + dot_pos = strchr(str, '.'); + if (dot_pos++) { + cascade_struct = &s->osu_export; + cascade_parser = osu_export_to_create_parser; + if (*dot_pos == '.') { + ++dot_pos; + } + STRY(osu_export_to_create_parser(&s->osu_export, dot_pos, aa, pa)); + s->is_set_osu_export = 1; + } else { + s->osu_export_str = aa; + } } else - if ((aret = argcmp(next_a, "UserName")) == 0 || aret == '=' ) { + if ((aret = argcmp(next_a, "SnapshotId")) == 0 || aret == '=' ) { char *eq_ptr = strchr(next_a, '='); if (eq_ptr) { - TRY((!*eq_ptr), "UserName argument missing\n"); + TRY((!*eq_ptr), "SnapshotId argument missing\n"); aa = eq_ptr + 1; incr = 1; } - TRY(!aa, "UserName argument missing\n"); - s->user_name = aa; // string string + TRY(!aa, "SnapshotId argument missing\n"); + s->snapshot_id = aa; // string string } else { - BAD_RET("'%s' is not a valide argument for 'CreateUser'\n", next_a); + BAD_RET("'%s' is not a valide argument for 'CreateSnapshotExportTask'\n", next_a); } i += incr; - goto create_user_arg; + goto create_snapshot_export_task_arg; } - cret = osc_create_user(&e, &r, &a); - TRY(cret, "fail to call CreateUser: %s\n", curl_easy_strerror(cret)); + cret = osc_create_snapshot_export_task(&e, &r, &a); + TRY(cret, "fail to call CreateSnapshotExportTask: %s\n", curl_easy_strerror(cret)); CHK_BAD_RET(!r.buf, "connection sucessful, but empty responce\n"); if (program_flag & OAPI_RAW_OUTPUT) puts(r.buf); @@ -27014,19 +29787,19 @@ int main(int ac, char **av) } osc_deinit_str(&r); } else - if (!strcmp("CreateTags", av[i])) { + if (!strcmp("CreateSnapshot", av[i])) { json_object *jobj; auto_ptr_array struct ptr_array opa = {0}; struct ptr_array *pa = &opa; - struct osc_create_tags_arg a = {0}; - struct osc_create_tags_arg *s = &a; + struct osc_create_snapshot_arg a = {0}; + struct osc_create_snapshot_arg *s = &a; __attribute__((cleanup(files_cnt_cleanup))) char *files_cnt[MAX_FILES_PER_CMD] = {NULL}; int cret; cascade_struct = NULL; cascade_parser = NULL; - create_tags_arg: + create_snapshot_arg: if (i + 1 < ac && av[i + 1][0] == '.' && av[i + 1][1] == '.') { char *next_a = &av[i + 1][2]; @@ -27044,7 +29817,7 @@ int main(int ac, char **av) } STRY(cascade_parser(cascade_struct, next_a, aa, pa)); i += incr; - goto create_tags_arg; + goto create_snapshot_arg; } if (i + 1 < ac && av[i + 1][0] == '-' && av[i + 1][1] == '-') { @@ -27065,6 +29838,17 @@ int main(int ac, char **av) incr = 1; } } + if ((aret = argcmp(next_a, "Description")) == 0 || aret == '=' ) { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "Description argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + TRY(!aa, "Description argument missing\n"); + s->description = aa; // string string + + } else if ((aret = argcmp(next_a, "DryRun")) == 0 || aret == '=' ) { char *eq_ptr = strchr(next_a, '='); if (eq_ptr) { @@ -27081,58 +29865,69 @@ int main(int ac, char **av) BAD_RET("DryRun require true/false\n"); } } else - if ((aret = argcmp(next_a, "ResourceIds")) == 0 || aret == '=' ) { + if ((aret = argcmp(next_a, "FileLocation")) == 0 || aret == '=' ) { char *eq_ptr = strchr(next_a, '='); if (eq_ptr) { - TRY((!*eq_ptr), "ResourceIds argument missing\n"); + TRY((!*eq_ptr), "FileLocation argument missing\n"); aa = eq_ptr + 1; incr = 1; } - TRY(!aa, "ResourceIds argument missing\n"); - s->resource_ids_str = aa; - } else if (!(aret = strcmp(str, "ResourceIds[]")) || aret == '=') { - TRY(!aa, "ResourceIds[] argument missing\n"); - SET_NEXT(s->resource_ids, (aa), pa); + TRY(!aa, "FileLocation argument missing\n"); + s->file_location = aa; // string string + } else - if ((aret = argcmp(next_a, "Tags")) == 0 || aret == '=' ) { + if ((aret = argcmp(next_a, "SnapshotSize")) == 0 || aret == '=' ) { char *eq_ptr = strchr(next_a, '='); if (eq_ptr) { - TRY((!*eq_ptr), "Tags argument missing\n"); + TRY((!*eq_ptr), "SnapshotSize argument missing\n"); aa = eq_ptr + 1; incr = 1; } - char *dot_pos = strchr(str, '.'); + TRY(!aa, "SnapshotSize argument missing\n"); + s->is_set_snapshot_size = 1; + s->snapshot_size = atoi(aa); + } else + if ((aret = argcmp(next_a, "SourceRegionName")) == 0 || aret == '=' ) { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "SourceRegionName argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + TRY(!aa, "SourceRegionName argument missing\n"); + s->source_region_name = aa; // string string - if (dot_pos) { - int pos; - char *endptr; + } else + if ((aret = argcmp(next_a, "SourceSnapshotId")) == 0 || aret == '=' ) { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "SourceSnapshotId argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + TRY(!aa, "SourceSnapshotId argument missing\n"); + s->source_snapshot_id = aa; // string string + + } else + if ((aret = argcmp(next_a, "VolumeId")) == 0 || aret == '=' ) { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "VolumeId argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + TRY(!aa, "VolumeId argument missing\n"); + s->volume_id = aa; // string string - ++dot_pos; - pos = strtoul(dot_pos, &endptr, 0); - if (endptr == dot_pos) - BAD_RET("'Tags' require an index (example array ref ResourceTag.Tags.0)\n"); - else if (*endptr != '.') - BAD_RET("'Tags' require a .\n"); - TRY_ALLOC_AT(s,tags, pa, pos, sizeof(*s->tags)); - cascade_struct = &s->tags[pos]; - cascade_parser = resource_tag_parser; - if (endptr[1] == '.') { - ++endptr; - } - STRY(resource_tag_parser(&s->tags[pos], endptr + 1, aa, pa)); - } else { - TRY(!aa, "Tags argument missing\n"); - s->tags_str = aa; // array ref ResourceTag ref - } } else { - BAD_RET("'%s' is not a valide argument for 'CreateTags'\n", next_a); + BAD_RET("'%s' is not a valide argument for 'CreateSnapshot'\n", next_a); } i += incr; - goto create_tags_arg; + goto create_snapshot_arg; } - cret = osc_create_tags(&e, &r, &a); - TRY(cret, "fail to call CreateTags: %s\n", curl_easy_strerror(cret)); + cret = osc_create_snapshot(&e, &r, &a); + TRY(cret, "fail to call CreateSnapshot: %s\n", curl_easy_strerror(cret)); CHK_BAD_RET(!r.buf, "connection sucessful, but empty responce\n"); if (program_flag & OAPI_RAW_OUTPUT) puts(r.buf); @@ -27145,19 +29940,19 @@ int main(int ac, char **av) } osc_deinit_str(&r); } else - if (!strcmp("CreateSubnet", av[i])) { + if (!strcmp("CreateServerCertificate", av[i])) { json_object *jobj; auto_ptr_array struct ptr_array opa = {0}; struct ptr_array *pa = &opa; - struct osc_create_subnet_arg a = {0}; - struct osc_create_subnet_arg *s = &a; + struct osc_create_server_certificate_arg a = {0}; + struct osc_create_server_certificate_arg *s = &a; __attribute__((cleanup(files_cnt_cleanup))) char *files_cnt[MAX_FILES_PER_CMD] = {NULL}; int cret; cascade_struct = NULL; cascade_parser = NULL; - create_subnet_arg: + create_server_certificate_arg: if (i + 1 < ac && av[i + 1][0] == '.' && av[i + 1][1] == '.') { char *next_a = &av[i + 1][2]; @@ -27175,7 +29970,7 @@ int main(int ac, char **av) } STRY(cascade_parser(cascade_struct, next_a, aa, pa)); i += incr; - goto create_subnet_arg; + goto create_server_certificate_arg; } if (i + 1 < ac && av[i + 1][0] == '-' && av[i + 1][1] == '-') { @@ -27196,6 +29991,28 @@ int main(int ac, char **av) incr = 1; } } + if ((aret = argcmp(next_a, "Body")) == 0 || aret == '=' ) { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "Body argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + TRY(!aa, "Body argument missing\n"); + s->body = aa; // string string + + } else + if ((aret = argcmp(next_a, "Chain")) == 0 || aret == '=' ) { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "Chain argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + TRY(!aa, "Chain argument missing\n"); + s->chain = aa; // string string + + } else if ((aret = argcmp(next_a, "DryRun")) == 0 || aret == '=' ) { char *eq_ptr = strchr(next_a, '='); if (eq_ptr) { @@ -27212,47 +30029,47 @@ int main(int ac, char **av) BAD_RET("DryRun require true/false\n"); } } else - if ((aret = argcmp(next_a, "IpRange")) == 0 || aret == '=' ) { + if ((aret = argcmp(next_a, "Name")) == 0 || aret == '=' ) { char *eq_ptr = strchr(next_a, '='); if (eq_ptr) { - TRY((!*eq_ptr), "IpRange argument missing\n"); + TRY((!*eq_ptr), "Name argument missing\n"); aa = eq_ptr + 1; incr = 1; } - TRY(!aa, "IpRange argument missing\n"); - s->ip_range = aa; // string string + TRY(!aa, "Name argument missing\n"); + s->name = aa; // string string } else - if ((aret = argcmp(next_a, "NetId")) == 0 || aret == '=' ) { + if ((aret = argcmp(next_a, "Path")) == 0 || aret == '=' ) { char *eq_ptr = strchr(next_a, '='); if (eq_ptr) { - TRY((!*eq_ptr), "NetId argument missing\n"); + TRY((!*eq_ptr), "Path argument missing\n"); aa = eq_ptr + 1; incr = 1; } - TRY(!aa, "NetId argument missing\n"); - s->net_id = aa; // string string + TRY(!aa, "Path argument missing\n"); + s->path = aa; // string string } else - if ((aret = argcmp(next_a, "SubregionName")) == 0 || aret == '=' ) { + if ((aret = argcmp(next_a, "PrivateKey")) == 0 || aret == '=' ) { char *eq_ptr = strchr(next_a, '='); if (eq_ptr) { - TRY((!*eq_ptr), "SubregionName argument missing\n"); + TRY((!*eq_ptr), "PrivateKey argument missing\n"); aa = eq_ptr + 1; incr = 1; } - TRY(!aa, "SubregionName argument missing\n"); - s->subregion_name = aa; // string string + TRY(!aa, "PrivateKey argument missing\n"); + s->private_key = aa; // string string } else { - BAD_RET("'%s' is not a valide argument for 'CreateSubnet'\n", next_a); + BAD_RET("'%s' is not a valide argument for 'CreateServerCertificate'\n", next_a); } i += incr; - goto create_subnet_arg; + goto create_server_certificate_arg; } - cret = osc_create_subnet(&e, &r, &a); - TRY(cret, "fail to call CreateSubnet: %s\n", curl_easy_strerror(cret)); + cret = osc_create_server_certificate(&e, &r, &a); + TRY(cret, "fail to call CreateServerCertificate: %s\n", curl_easy_strerror(cret)); CHK_BAD_RET(!r.buf, "connection sucessful, but empty responce\n"); if (program_flag & OAPI_RAW_OUTPUT) puts(r.buf); @@ -27265,19 +30082,19 @@ int main(int ac, char **av) } osc_deinit_str(&r); } else - if (!strcmp("CreateSnapshotExportTask", av[i])) { + if (!strcmp("CreateSecurityGroupRule", av[i])) { json_object *jobj; auto_ptr_array struct ptr_array opa = {0}; struct ptr_array *pa = &opa; - struct osc_create_snapshot_export_task_arg a = {0}; - struct osc_create_snapshot_export_task_arg *s = &a; + struct osc_create_security_group_rule_arg a = {0}; + struct osc_create_security_group_rule_arg *s = &a; __attribute__((cleanup(files_cnt_cleanup))) char *files_cnt[MAX_FILES_PER_CMD] = {NULL}; int cret; cascade_struct = NULL; cascade_parser = NULL; - create_snapshot_export_task_arg: + create_security_group_rule_arg: if (i + 1 < ac && av[i + 1][0] == '.' && av[i + 1][1] == '.') { char *next_a = &av[i + 1][2]; @@ -27295,7 +30112,7 @@ int main(int ac, char **av) } STRY(cascade_parser(cascade_struct, next_a, aa, pa)); i += incr; - goto create_snapshot_export_task_arg; + goto create_security_group_rule_arg; } if (i + 1 < ac && av[i + 1][0] == '-' && av[i + 1][1] == '-') { @@ -27332,48 +30149,133 @@ int main(int ac, char **av) BAD_RET("DryRun require true/false\n"); } } else - if ((aret = argcmp(next_a, "OsuExport")) == 0 || aret == '=' ) { + if ((aret = argcmp(next_a, "Flow")) == 0 || aret == '=' ) { char *eq_ptr = strchr(next_a, '='); if (eq_ptr) { - TRY((!*eq_ptr), "OsuExport argument missing\n"); + TRY((!*eq_ptr), "Flow argument missing\n"); aa = eq_ptr + 1; incr = 1; } - char *dot_pos; + TRY(!aa, "Flow argument missing\n"); + s->flow = aa; // string string - TRY(!aa, "OsuExport argument missing\n"); - dot_pos = strchr(str, '.'); - if (dot_pos++) { - cascade_struct = &s->osu_export; - cascade_parser = osu_export_to_create_parser; - if (*dot_pos == '.') { - ++dot_pos; - } - STRY(osu_export_to_create_parser(&s->osu_export, dot_pos, aa, pa)); - s->is_set_osu_export = 1; + } else + if ((aret = argcmp(next_a, "FromPortRange")) == 0 || aret == '=' ) { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "FromPortRange argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + TRY(!aa, "FromPortRange argument missing\n"); + s->is_set_from_port_range = 1; + s->from_port_range = atoi(aa); + } else + if ((aret = argcmp(next_a, "IpProtocol")) == 0 || aret == '=' ) { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "IpProtocol argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + TRY(!aa, "IpProtocol argument missing\n"); + s->ip_protocol = aa; // string string + + } else + if ((aret = argcmp(next_a, "IpRange")) == 0 || aret == '=' ) { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "IpRange argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + TRY(!aa, "IpRange argument missing\n"); + s->ip_range = aa; // string string + + } else + if ((aret = argcmp(next_a, "Rules")) == 0 || aret == '=' ) { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "Rules argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + char *dot_pos = strchr(str, '.'); + + if (dot_pos) { + int pos; + char *endptr; + + ++dot_pos; + pos = strtoul(dot_pos, &endptr, 0); + if (endptr == dot_pos) + BAD_RET("'Rules' require an index (example array ref SecurityGroupRule.Rules.0)\n"); + else if (*endptr != '.') + BAD_RET("'Rules' require a .\n"); + TRY_ALLOC_AT(s,rules, pa, pos, sizeof(*s->rules)); + cascade_struct = &s->rules[pos]; + cascade_parser = security_group_rule_parser; + if (endptr[1] == '.') { + ++endptr; + } + STRY(security_group_rule_parser(&s->rules[pos], endptr + 1, aa, pa)); } else { - s->osu_export_str = aa; - } + TRY(!aa, "Rules argument missing\n"); + s->rules_str = aa; // array ref SecurityGroupRule ref + } } else - if ((aret = argcmp(next_a, "SnapshotId")) == 0 || aret == '=' ) { + if ((aret = argcmp(next_a, "SecurityGroupAccountIdToLink")) == 0 || aret == '=' ) { char *eq_ptr = strchr(next_a, '='); if (eq_ptr) { - TRY((!*eq_ptr), "SnapshotId argument missing\n"); + TRY((!*eq_ptr), "SecurityGroupAccountIdToLink argument missing\n"); aa = eq_ptr + 1; incr = 1; } - TRY(!aa, "SnapshotId argument missing\n"); - s->snapshot_id = aa; // string string + TRY(!aa, "SecurityGroupAccountIdToLink argument missing\n"); + s->security_group_account_id_to_link = aa; // string string + + } else + if ((aret = argcmp(next_a, "SecurityGroupId")) == 0 || aret == '=' ) { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "SecurityGroupId argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + TRY(!aa, "SecurityGroupId argument missing\n"); + s->security_group_id = aa; // string string + + } else + if ((aret = argcmp(next_a, "SecurityGroupNameToLink")) == 0 || aret == '=' ) { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "SecurityGroupNameToLink argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + TRY(!aa, "SecurityGroupNameToLink argument missing\n"); + s->security_group_name_to_link = aa; // string string } else + if ((aret = argcmp(next_a, "ToPortRange")) == 0 || aret == '=' ) { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "ToPortRange argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + TRY(!aa, "ToPortRange argument missing\n"); + s->is_set_to_port_range = 1; + s->to_port_range = atoi(aa); + } else { - BAD_RET("'%s' is not a valide argument for 'CreateSnapshotExportTask'\n", next_a); + BAD_RET("'%s' is not a valide argument for 'CreateSecurityGroupRule'\n", next_a); } i += incr; - goto create_snapshot_export_task_arg; + goto create_security_group_rule_arg; } - cret = osc_create_snapshot_export_task(&e, &r, &a); - TRY(cret, "fail to call CreateSnapshotExportTask: %s\n", curl_easy_strerror(cret)); + cret = osc_create_security_group_rule(&e, &r, &a); + TRY(cret, "fail to call CreateSecurityGroupRule: %s\n", curl_easy_strerror(cret)); CHK_BAD_RET(!r.buf, "connection sucessful, but empty responce\n"); if (program_flag & OAPI_RAW_OUTPUT) puts(r.buf); @@ -27386,19 +30288,19 @@ int main(int ac, char **av) } osc_deinit_str(&r); } else - if (!strcmp("CreateSnapshot", av[i])) { + if (!strcmp("CreateSecurityGroup", av[i])) { json_object *jobj; auto_ptr_array struct ptr_array opa = {0}; struct ptr_array *pa = &opa; - struct osc_create_snapshot_arg a = {0}; - struct osc_create_snapshot_arg *s = &a; + struct osc_create_security_group_arg a = {0}; + struct osc_create_security_group_arg *s = &a; __attribute__((cleanup(files_cnt_cleanup))) char *files_cnt[MAX_FILES_PER_CMD] = {NULL}; int cret; cascade_struct = NULL; cascade_parser = NULL; - create_snapshot_arg: + create_security_group_arg: if (i + 1 < ac && av[i + 1][0] == '.' && av[i + 1][1] == '.') { char *next_a = &av[i + 1][2]; @@ -27416,7 +30318,7 @@ int main(int ac, char **av) } STRY(cascade_parser(cascade_struct, next_a, aa, pa)); i += incr; - goto create_snapshot_arg; + goto create_security_group_arg; } if (i + 1 < ac && av[i + 1][0] == '-' && av[i + 1][1] == '-') { @@ -27464,69 +30366,36 @@ int main(int ac, char **av) BAD_RET("DryRun require true/false\n"); } } else - if ((aret = argcmp(next_a, "FileLocation")) == 0 || aret == '=' ) { - char *eq_ptr = strchr(next_a, '='); - if (eq_ptr) { - TRY((!*eq_ptr), "FileLocation argument missing\n"); - aa = eq_ptr + 1; - incr = 1; - } - TRY(!aa, "FileLocation argument missing\n"); - s->file_location = aa; // string string - - } else - if ((aret = argcmp(next_a, "SnapshotSize")) == 0 || aret == '=' ) { - char *eq_ptr = strchr(next_a, '='); - if (eq_ptr) { - TRY((!*eq_ptr), "SnapshotSize argument missing\n"); - aa = eq_ptr + 1; - incr = 1; - } - TRY(!aa, "SnapshotSize argument missing\n"); - s->is_set_snapshot_size = 1; - s->snapshot_size = atoi(aa); - } else - if ((aret = argcmp(next_a, "SourceRegionName")) == 0 || aret == '=' ) { - char *eq_ptr = strchr(next_a, '='); - if (eq_ptr) { - TRY((!*eq_ptr), "SourceRegionName argument missing\n"); - aa = eq_ptr + 1; - incr = 1; - } - TRY(!aa, "SourceRegionName argument missing\n"); - s->source_region_name = aa; // string string - - } else - if ((aret = argcmp(next_a, "SourceSnapshotId")) == 0 || aret == '=' ) { + if ((aret = argcmp(next_a, "NetId")) == 0 || aret == '=' ) { char *eq_ptr = strchr(next_a, '='); if (eq_ptr) { - TRY((!*eq_ptr), "SourceSnapshotId argument missing\n"); + TRY((!*eq_ptr), "NetId argument missing\n"); aa = eq_ptr + 1; incr = 1; } - TRY(!aa, "SourceSnapshotId argument missing\n"); - s->source_snapshot_id = aa; // string string + TRY(!aa, "NetId argument missing\n"); + s->net_id = aa; // string string } else - if ((aret = argcmp(next_a, "VolumeId")) == 0 || aret == '=' ) { + if ((aret = argcmp(next_a, "SecurityGroupName")) == 0 || aret == '=' ) { char *eq_ptr = strchr(next_a, '='); if (eq_ptr) { - TRY((!*eq_ptr), "VolumeId argument missing\n"); + TRY((!*eq_ptr), "SecurityGroupName argument missing\n"); aa = eq_ptr + 1; incr = 1; } - TRY(!aa, "VolumeId argument missing\n"); - s->volume_id = aa; // string string + TRY(!aa, "SecurityGroupName argument missing\n"); + s->security_group_name = aa; // string string } else { - BAD_RET("'%s' is not a valide argument for 'CreateSnapshot'\n", next_a); + BAD_RET("'%s' is not a valide argument for 'CreateSecurityGroup'\n", next_a); } i += incr; - goto create_snapshot_arg; + goto create_security_group_arg; } - cret = osc_create_snapshot(&e, &r, &a); - TRY(cret, "fail to call CreateSnapshot: %s\n", curl_easy_strerror(cret)); + cret = osc_create_security_group(&e, &r, &a); + TRY(cret, "fail to call CreateSecurityGroup: %s\n", curl_easy_strerror(cret)); CHK_BAD_RET(!r.buf, "connection sucessful, but empty responce\n"); if (program_flag & OAPI_RAW_OUTPUT) puts(r.buf); @@ -27539,19 +30408,19 @@ int main(int ac, char **av) } osc_deinit_str(&r); } else - if (!strcmp("CreateServerCertificate", av[i])) { + if (!strcmp("CreateRouteTable", av[i])) { json_object *jobj; auto_ptr_array struct ptr_array opa = {0}; struct ptr_array *pa = &opa; - struct osc_create_server_certificate_arg a = {0}; - struct osc_create_server_certificate_arg *s = &a; + struct osc_create_route_table_arg a = {0}; + struct osc_create_route_table_arg *s = &a; __attribute__((cleanup(files_cnt_cleanup))) char *files_cnt[MAX_FILES_PER_CMD] = {NULL}; int cret; cascade_struct = NULL; cascade_parser = NULL; - create_server_certificate_arg: + create_route_table_arg: if (i + 1 < ac && av[i + 1][0] == '.' && av[i + 1][1] == '.') { char *next_a = &av[i + 1][2]; @@ -27569,7 +30438,7 @@ int main(int ac, char **av) } STRY(cascade_parser(cascade_struct, next_a, aa, pa)); i += incr; - goto create_server_certificate_arg; + goto create_route_table_arg; } if (i + 1 < ac && av[i + 1][0] == '-' && av[i + 1][1] == '-') { @@ -27590,28 +30459,6 @@ int main(int ac, char **av) incr = 1; } } - if ((aret = argcmp(next_a, "Body")) == 0 || aret == '=' ) { - char *eq_ptr = strchr(next_a, '='); - if (eq_ptr) { - TRY((!*eq_ptr), "Body argument missing\n"); - aa = eq_ptr + 1; - incr = 1; - } - TRY(!aa, "Body argument missing\n"); - s->body = aa; // string string - - } else - if ((aret = argcmp(next_a, "Chain")) == 0 || aret == '=' ) { - char *eq_ptr = strchr(next_a, '='); - if (eq_ptr) { - TRY((!*eq_ptr), "Chain argument missing\n"); - aa = eq_ptr + 1; - incr = 1; - } - TRY(!aa, "Chain argument missing\n"); - s->chain = aa; // string string - - } else if ((aret = argcmp(next_a, "DryRun")) == 0 || aret == '=' ) { char *eq_ptr = strchr(next_a, '='); if (eq_ptr) { @@ -27628,47 +30475,25 @@ int main(int ac, char **av) BAD_RET("DryRun require true/false\n"); } } else - if ((aret = argcmp(next_a, "Name")) == 0 || aret == '=' ) { - char *eq_ptr = strchr(next_a, '='); - if (eq_ptr) { - TRY((!*eq_ptr), "Name argument missing\n"); - aa = eq_ptr + 1; - incr = 1; - } - TRY(!aa, "Name argument missing\n"); - s->name = aa; // string string - - } else - if ((aret = argcmp(next_a, "Path")) == 0 || aret == '=' ) { - char *eq_ptr = strchr(next_a, '='); - if (eq_ptr) { - TRY((!*eq_ptr), "Path argument missing\n"); - aa = eq_ptr + 1; - incr = 1; - } - TRY(!aa, "Path argument missing\n"); - s->path = aa; // string string - - } else - if ((aret = argcmp(next_a, "PrivateKey")) == 0 || aret == '=' ) { + if ((aret = argcmp(next_a, "NetId")) == 0 || aret == '=' ) { char *eq_ptr = strchr(next_a, '='); if (eq_ptr) { - TRY((!*eq_ptr), "PrivateKey argument missing\n"); + TRY((!*eq_ptr), "NetId argument missing\n"); aa = eq_ptr + 1; incr = 1; } - TRY(!aa, "PrivateKey argument missing\n"); - s->private_key = aa; // string string + TRY(!aa, "NetId argument missing\n"); + s->net_id = aa; // string string } else { - BAD_RET("'%s' is not a valide argument for 'CreateServerCertificate'\n", next_a); + BAD_RET("'%s' is not a valide argument for 'CreateRouteTable'\n", next_a); } i += incr; - goto create_server_certificate_arg; + goto create_route_table_arg; } - cret = osc_create_server_certificate(&e, &r, &a); - TRY(cret, "fail to call CreateServerCertificate: %s\n", curl_easy_strerror(cret)); + cret = osc_create_route_table(&e, &r, &a); + TRY(cret, "fail to call CreateRouteTable: %s\n", curl_easy_strerror(cret)); CHK_BAD_RET(!r.buf, "connection sucessful, but empty responce\n"); if (program_flag & OAPI_RAW_OUTPUT) puts(r.buf); @@ -27681,19 +30506,19 @@ int main(int ac, char **av) } osc_deinit_str(&r); } else - if (!strcmp("CreateSecurityGroupRule", av[i])) { + if (!strcmp("CreateRoute", av[i])) { json_object *jobj; auto_ptr_array struct ptr_array opa = {0}; struct ptr_array *pa = &opa; - struct osc_create_security_group_rule_arg a = {0}; - struct osc_create_security_group_rule_arg *s = &a; + struct osc_create_route_arg a = {0}; + struct osc_create_route_arg *s = &a; __attribute__((cleanup(files_cnt_cleanup))) char *files_cnt[MAX_FILES_PER_CMD] = {NULL}; int cret; cascade_struct = NULL; cascade_parser = NULL; - create_security_group_rule_arg: + create_route_arg: if (i + 1 < ac && av[i + 1][0] == '.' && av[i + 1][1] == '.') { char *next_a = &av[i + 1][2]; @@ -27711,7 +30536,7 @@ int main(int ac, char **av) } STRY(cascade_parser(cascade_struct, next_a, aa, pa)); i += incr; - goto create_security_group_rule_arg; + goto create_route_arg; } if (i + 1 < ac && av[i + 1][0] == '-' && av[i + 1][1] == '-') { @@ -27732,6 +30557,17 @@ int main(int ac, char **av) incr = 1; } } + if ((aret = argcmp(next_a, "DestinationIpRange")) == 0 || aret == '=' ) { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "DestinationIpRange argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + TRY(!aa, "DestinationIpRange argument missing\n"); + s->destination_ip_range = aa; // string string + + } else if ((aret = argcmp(next_a, "DryRun")) == 0 || aret == '=' ) { char *eq_ptr = strchr(next_a, '='); if (eq_ptr) { @@ -27748,133 +30584,80 @@ int main(int ac, char **av) BAD_RET("DryRun require true/false\n"); } } else - if ((aret = argcmp(next_a, "Flow")) == 0 || aret == '=' ) { - char *eq_ptr = strchr(next_a, '='); - if (eq_ptr) { - TRY((!*eq_ptr), "Flow argument missing\n"); - aa = eq_ptr + 1; - incr = 1; - } - TRY(!aa, "Flow argument missing\n"); - s->flow = aa; // string string - - } else - if ((aret = argcmp(next_a, "FromPortRange")) == 0 || aret == '=' ) { - char *eq_ptr = strchr(next_a, '='); - if (eq_ptr) { - TRY((!*eq_ptr), "FromPortRange argument missing\n"); - aa = eq_ptr + 1; - incr = 1; - } - TRY(!aa, "FromPortRange argument missing\n"); - s->is_set_from_port_range = 1; - s->from_port_range = atoi(aa); - } else - if ((aret = argcmp(next_a, "IpProtocol")) == 0 || aret == '=' ) { + if ((aret = argcmp(next_a, "GatewayId")) == 0 || aret == '=' ) { char *eq_ptr = strchr(next_a, '='); if (eq_ptr) { - TRY((!*eq_ptr), "IpProtocol argument missing\n"); + TRY((!*eq_ptr), "GatewayId argument missing\n"); aa = eq_ptr + 1; incr = 1; } - TRY(!aa, "IpProtocol argument missing\n"); - s->ip_protocol = aa; // string string + TRY(!aa, "GatewayId argument missing\n"); + s->gateway_id = aa; // string string } else - if ((aret = argcmp(next_a, "IpRange")) == 0 || aret == '=' ) { + if ((aret = argcmp(next_a, "NatServiceId")) == 0 || aret == '=' ) { char *eq_ptr = strchr(next_a, '='); if (eq_ptr) { - TRY((!*eq_ptr), "IpRange argument missing\n"); + TRY((!*eq_ptr), "NatServiceId argument missing\n"); aa = eq_ptr + 1; incr = 1; } - TRY(!aa, "IpRange argument missing\n"); - s->ip_range = aa; // string string + TRY(!aa, "NatServiceId argument missing\n"); + s->nat_service_id = aa; // string string } else - if ((aret = argcmp(next_a, "Rules")) == 0 || aret == '=' ) { + if ((aret = argcmp(next_a, "NetPeeringId")) == 0 || aret == '=' ) { char *eq_ptr = strchr(next_a, '='); if (eq_ptr) { - TRY((!*eq_ptr), "Rules argument missing\n"); + TRY((!*eq_ptr), "NetPeeringId argument missing\n"); aa = eq_ptr + 1; incr = 1; } - char *dot_pos = strchr(str, '.'); - - if (dot_pos) { - int pos; - char *endptr; + TRY(!aa, "NetPeeringId argument missing\n"); + s->net_peering_id = aa; // string string - ++dot_pos; - pos = strtoul(dot_pos, &endptr, 0); - if (endptr == dot_pos) - BAD_RET("'Rules' require an index (example array ref SecurityGroupRule.Rules.0)\n"); - else if (*endptr != '.') - BAD_RET("'Rules' require a .\n"); - TRY_ALLOC_AT(s,rules, pa, pos, sizeof(*s->rules)); - cascade_struct = &s->rules[pos]; - cascade_parser = security_group_rule_parser; - if (endptr[1] == '.') { - ++endptr; - } - STRY(security_group_rule_parser(&s->rules[pos], endptr + 1, aa, pa)); - } else { - TRY(!aa, "Rules argument missing\n"); - s->rules_str = aa; // array ref SecurityGroupRule ref - } } else - if ((aret = argcmp(next_a, "SecurityGroupAccountIdToLink")) == 0 || aret == '=' ) { + if ((aret = argcmp(next_a, "NicId")) == 0 || aret == '=' ) { char *eq_ptr = strchr(next_a, '='); if (eq_ptr) { - TRY((!*eq_ptr), "SecurityGroupAccountIdToLink argument missing\n"); + TRY((!*eq_ptr), "NicId argument missing\n"); aa = eq_ptr + 1; incr = 1; } - TRY(!aa, "SecurityGroupAccountIdToLink argument missing\n"); - s->security_group_account_id_to_link = aa; // string string + TRY(!aa, "NicId argument missing\n"); + s->nic_id = aa; // string string } else - if ((aret = argcmp(next_a, "SecurityGroupId")) == 0 || aret == '=' ) { + if ((aret = argcmp(next_a, "RouteTableId")) == 0 || aret == '=' ) { char *eq_ptr = strchr(next_a, '='); if (eq_ptr) { - TRY((!*eq_ptr), "SecurityGroupId argument missing\n"); + TRY((!*eq_ptr), "RouteTableId argument missing\n"); aa = eq_ptr + 1; incr = 1; } - TRY(!aa, "SecurityGroupId argument missing\n"); - s->security_group_id = aa; // string string + TRY(!aa, "RouteTableId argument missing\n"); + s->route_table_id = aa; // string string } else - if ((aret = argcmp(next_a, "SecurityGroupNameToLink")) == 0 || aret == '=' ) { + if ((aret = argcmp(next_a, "VmId")) == 0 || aret == '=' ) { char *eq_ptr = strchr(next_a, '='); if (eq_ptr) { - TRY((!*eq_ptr), "SecurityGroupNameToLink argument missing\n"); + TRY((!*eq_ptr), "VmId argument missing\n"); aa = eq_ptr + 1; incr = 1; } - TRY(!aa, "SecurityGroupNameToLink argument missing\n"); - s->security_group_name_to_link = aa; // string string + TRY(!aa, "VmId argument missing\n"); + s->vm_id = aa; // string string } else - if ((aret = argcmp(next_a, "ToPortRange")) == 0 || aret == '=' ) { - char *eq_ptr = strchr(next_a, '='); - if (eq_ptr) { - TRY((!*eq_ptr), "ToPortRange argument missing\n"); - aa = eq_ptr + 1; - incr = 1; - } - TRY(!aa, "ToPortRange argument missing\n"); - s->is_set_to_port_range = 1; - s->to_port_range = atoi(aa); - } else { - BAD_RET("'%s' is not a valide argument for 'CreateSecurityGroupRule'\n", next_a); + BAD_RET("'%s' is not a valide argument for 'CreateRoute'\n", next_a); } i += incr; - goto create_security_group_rule_arg; + goto create_route_arg; } - cret = osc_create_security_group_rule(&e, &r, &a); - TRY(cret, "fail to call CreateSecurityGroupRule: %s\n", curl_easy_strerror(cret)); + cret = osc_create_route(&e, &r, &a); + TRY(cret, "fail to call CreateRoute: %s\n", curl_easy_strerror(cret)); CHK_BAD_RET(!r.buf, "connection sucessful, but empty responce\n"); if (program_flag & OAPI_RAW_OUTPUT) puts(r.buf); @@ -27887,19 +30670,19 @@ int main(int ac, char **av) } osc_deinit_str(&r); } else - if (!strcmp("CreateSecurityGroup", av[i])) { + if (!strcmp("CreatePublicIp", av[i])) { json_object *jobj; auto_ptr_array struct ptr_array opa = {0}; struct ptr_array *pa = &opa; - struct osc_create_security_group_arg a = {0}; - struct osc_create_security_group_arg *s = &a; + struct osc_create_public_ip_arg a = {0}; + struct osc_create_public_ip_arg *s = &a; __attribute__((cleanup(files_cnt_cleanup))) char *files_cnt[MAX_FILES_PER_CMD] = {NULL}; int cret; cascade_struct = NULL; cascade_parser = NULL; - create_security_group_arg: + create_public_ip_arg: if (i + 1 < ac && av[i + 1][0] == '.' && av[i + 1][1] == '.') { char *next_a = &av[i + 1][2]; @@ -27917,7 +30700,7 @@ int main(int ac, char **av) } STRY(cascade_parser(cascade_struct, next_a, aa, pa)); i += incr; - goto create_security_group_arg; + goto create_public_ip_arg; } if (i + 1 < ac && av[i + 1][0] == '-' && av[i + 1][1] == '-') { @@ -27938,17 +30721,6 @@ int main(int ac, char **av) incr = 1; } } - if ((aret = argcmp(next_a, "Description")) == 0 || aret == '=' ) { - char *eq_ptr = strchr(next_a, '='); - if (eq_ptr) { - TRY((!*eq_ptr), "Description argument missing\n"); - aa = eq_ptr + 1; - incr = 1; - } - TRY(!aa, "Description argument missing\n"); - s->description = aa; // string string - - } else if ((aret = argcmp(next_a, "DryRun")) == 0 || aret == '=' ) { char *eq_ptr = strchr(next_a, '='); if (eq_ptr) { @@ -27965,36 +30737,14 @@ int main(int ac, char **av) BAD_RET("DryRun require true/false\n"); } } else - if ((aret = argcmp(next_a, "NetId")) == 0 || aret == '=' ) { - char *eq_ptr = strchr(next_a, '='); - if (eq_ptr) { - TRY((!*eq_ptr), "NetId argument missing\n"); - aa = eq_ptr + 1; - incr = 1; - } - TRY(!aa, "NetId argument missing\n"); - s->net_id = aa; // string string - - } else - if ((aret = argcmp(next_a, "SecurityGroupName")) == 0 || aret == '=' ) { - char *eq_ptr = strchr(next_a, '='); - if (eq_ptr) { - TRY((!*eq_ptr), "SecurityGroupName argument missing\n"); - aa = eq_ptr + 1; - incr = 1; - } - TRY(!aa, "SecurityGroupName argument missing\n"); - s->security_group_name = aa; // string string - - } else { - BAD_RET("'%s' is not a valide argument for 'CreateSecurityGroup'\n", next_a); + BAD_RET("'%s' is not a valide argument for 'CreatePublicIp'\n", next_a); } i += incr; - goto create_security_group_arg; + goto create_public_ip_arg; } - cret = osc_create_security_group(&e, &r, &a); - TRY(cret, "fail to call CreateSecurityGroup: %s\n", curl_easy_strerror(cret)); + cret = osc_create_public_ip(&e, &r, &a); + TRY(cret, "fail to call CreatePublicIp: %s\n", curl_easy_strerror(cret)); CHK_BAD_RET(!r.buf, "connection sucessful, but empty responce\n"); if (program_flag & OAPI_RAW_OUTPUT) puts(r.buf); @@ -28007,19 +30757,19 @@ int main(int ac, char **av) } osc_deinit_str(&r); } else - if (!strcmp("CreateRouteTable", av[i])) { + if (!strcmp("CreateProductType", av[i])) { json_object *jobj; auto_ptr_array struct ptr_array opa = {0}; struct ptr_array *pa = &opa; - struct osc_create_route_table_arg a = {0}; - struct osc_create_route_table_arg *s = &a; + struct osc_create_product_type_arg a = {0}; + struct osc_create_product_type_arg *s = &a; __attribute__((cleanup(files_cnt_cleanup))) char *files_cnt[MAX_FILES_PER_CMD] = {NULL}; int cret; cascade_struct = NULL; cascade_parser = NULL; - create_route_table_arg: + create_product_type_arg: if (i + 1 < ac && av[i + 1][0] == '.' && av[i + 1][1] == '.') { char *next_a = &av[i + 1][2]; @@ -28037,7 +30787,7 @@ int main(int ac, char **av) } STRY(cascade_parser(cascade_struct, next_a, aa, pa)); i += incr; - goto create_route_table_arg; + goto create_product_type_arg; } if (i + 1 < ac && av[i + 1][0] == '-' && av[i + 1][1] == '-') { @@ -28058,6 +30808,17 @@ int main(int ac, char **av) incr = 1; } } + if ((aret = argcmp(next_a, "Description")) == 0 || aret == '=' ) { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "Description argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + TRY(!aa, "Description argument missing\n"); + s->description = aa; // string string + + } else if ((aret = argcmp(next_a, "DryRun")) == 0 || aret == '=' ) { char *eq_ptr = strchr(next_a, '='); if (eq_ptr) { @@ -28074,25 +30835,25 @@ int main(int ac, char **av) BAD_RET("DryRun require true/false\n"); } } else - if ((aret = argcmp(next_a, "NetId")) == 0 || aret == '=' ) { + if ((aret = argcmp(next_a, "Vendor")) == 0 || aret == '=' ) { char *eq_ptr = strchr(next_a, '='); if (eq_ptr) { - TRY((!*eq_ptr), "NetId argument missing\n"); + TRY((!*eq_ptr), "Vendor argument missing\n"); aa = eq_ptr + 1; incr = 1; } - TRY(!aa, "NetId argument missing\n"); - s->net_id = aa; // string string + TRY(!aa, "Vendor argument missing\n"); + s->vendor = aa; // string string } else { - BAD_RET("'%s' is not a valide argument for 'CreateRouteTable'\n", next_a); + BAD_RET("'%s' is not a valide argument for 'CreateProductType'\n", next_a); } i += incr; - goto create_route_table_arg; + goto create_product_type_arg; } - cret = osc_create_route_table(&e, &r, &a); - TRY(cret, "fail to call CreateRouteTable: %s\n", curl_easy_strerror(cret)); + cret = osc_create_product_type(&e, &r, &a); + TRY(cret, "fail to call CreateProductType: %s\n", curl_easy_strerror(cret)); CHK_BAD_RET(!r.buf, "connection sucessful, but empty responce\n"); if (program_flag & OAPI_RAW_OUTPUT) puts(r.buf); @@ -28105,19 +30866,19 @@ int main(int ac, char **av) } osc_deinit_str(&r); } else - if (!strcmp("CreateRoute", av[i])) { + if (!strcmp("CreatePolicyVersion", av[i])) { json_object *jobj; auto_ptr_array struct ptr_array opa = {0}; struct ptr_array *pa = &opa; - struct osc_create_route_arg a = {0}; - struct osc_create_route_arg *s = &a; + struct osc_create_policy_version_arg a = {0}; + struct osc_create_policy_version_arg *s = &a; __attribute__((cleanup(files_cnt_cleanup))) char *files_cnt[MAX_FILES_PER_CMD] = {NULL}; int cret; cascade_struct = NULL; cascade_parser = NULL; - create_route_arg: + create_policy_version_arg: if (i + 1 < ac && av[i + 1][0] == '.' && av[i + 1][1] == '.') { char *next_a = &av[i + 1][2]; @@ -28135,7 +30896,7 @@ int main(int ac, char **av) } STRY(cascade_parser(cascade_struct, next_a, aa, pa)); i += incr; - goto create_route_arg; + goto create_policy_version_arg; } if (i + 1 < ac && av[i + 1][0] == '-' && av[i + 1][1] == '-') { @@ -28156,107 +30917,52 @@ int main(int ac, char **av) incr = 1; } } - if ((aret = argcmp(next_a, "DestinationIpRange")) == 0 || aret == '=' ) { - char *eq_ptr = strchr(next_a, '='); - if (eq_ptr) { - TRY((!*eq_ptr), "DestinationIpRange argument missing\n"); - aa = eq_ptr + 1; - incr = 1; - } - TRY(!aa, "DestinationIpRange argument missing\n"); - s->destination_ip_range = aa; // string string - - } else - if ((aret = argcmp(next_a, "DryRun")) == 0 || aret == '=' ) { - char *eq_ptr = strchr(next_a, '='); - if (eq_ptr) { - TRY((!*eq_ptr), "DryRun argument missing\n"); - aa = eq_ptr + 1; - incr = 1; - } - s->is_set_dry_run = 1; - if (!aa || !strcasecmp(aa, "true")) { - s->dry_run = 1; - } else if (!strcasecmp(aa, "false")) { - s->dry_run = 0; - } else { - BAD_RET("DryRun require true/false\n"); - } - } else - if ((aret = argcmp(next_a, "GatewayId")) == 0 || aret == '=' ) { - char *eq_ptr = strchr(next_a, '='); - if (eq_ptr) { - TRY((!*eq_ptr), "GatewayId argument missing\n"); - aa = eq_ptr + 1; - incr = 1; - } - TRY(!aa, "GatewayId argument missing\n"); - s->gateway_id = aa; // string string - - } else - if ((aret = argcmp(next_a, "NatServiceId")) == 0 || aret == '=' ) { - char *eq_ptr = strchr(next_a, '='); - if (eq_ptr) { - TRY((!*eq_ptr), "NatServiceId argument missing\n"); - aa = eq_ptr + 1; - incr = 1; - } - TRY(!aa, "NatServiceId argument missing\n"); - s->nat_service_id = aa; // string string - - } else - if ((aret = argcmp(next_a, "NetPeeringId")) == 0 || aret == '=' ) { - char *eq_ptr = strchr(next_a, '='); - if (eq_ptr) { - TRY((!*eq_ptr), "NetPeeringId argument missing\n"); - aa = eq_ptr + 1; - incr = 1; - } - TRY(!aa, "NetPeeringId argument missing\n"); - s->net_peering_id = aa; // string string - - } else - if ((aret = argcmp(next_a, "NicId")) == 0 || aret == '=' ) { + if ((aret = argcmp(next_a, "Document")) == 0 || aret == '=' ) { char *eq_ptr = strchr(next_a, '='); if (eq_ptr) { - TRY((!*eq_ptr), "NicId argument missing\n"); + TRY((!*eq_ptr), "Document argument missing\n"); aa = eq_ptr + 1; incr = 1; } - TRY(!aa, "NicId argument missing\n"); - s->nic_id = aa; // string string + TRY(!aa, "Document argument missing\n"); + s->document = aa; // string string } else - if ((aret = argcmp(next_a, "RouteTableId")) == 0 || aret == '=' ) { + if ((aret = argcmp(next_a, "PolicyOrn")) == 0 || aret == '=' ) { char *eq_ptr = strchr(next_a, '='); if (eq_ptr) { - TRY((!*eq_ptr), "RouteTableId argument missing\n"); + TRY((!*eq_ptr), "PolicyOrn argument missing\n"); aa = eq_ptr + 1; incr = 1; } - TRY(!aa, "RouteTableId argument missing\n"); - s->route_table_id = aa; // string string + TRY(!aa, "PolicyOrn argument missing\n"); + s->policy_orn = aa; // string string } else - if ((aret = argcmp(next_a, "VmId")) == 0 || aret == '=' ) { + if ((aret = argcmp(next_a, "SetAsDefault")) == 0 || aret == '=' ) { char *eq_ptr = strchr(next_a, '='); if (eq_ptr) { - TRY((!*eq_ptr), "VmId argument missing\n"); + TRY((!*eq_ptr), "SetAsDefault argument missing\n"); aa = eq_ptr + 1; incr = 1; } - TRY(!aa, "VmId argument missing\n"); - s->vm_id = aa; // string string - - } else + s->is_set_set_as_default = 1; + if (!aa || !strcasecmp(aa, "true")) { + s->set_as_default = 1; + } else if (!strcasecmp(aa, "false")) { + s->set_as_default = 0; + } else { + BAD_RET("SetAsDefault require true/false\n"); + } + } else { - BAD_RET("'%s' is not a valide argument for 'CreateRoute'\n", next_a); + BAD_RET("'%s' is not a valide argument for 'CreatePolicyVersion'\n", next_a); } i += incr; - goto create_route_arg; + goto create_policy_version_arg; } - cret = osc_create_route(&e, &r, &a); - TRY(cret, "fail to call CreateRoute: %s\n", curl_easy_strerror(cret)); + cret = osc_create_policy_version(&e, &r, &a); + TRY(cret, "fail to call CreatePolicyVersion: %s\n", curl_easy_strerror(cret)); CHK_BAD_RET(!r.buf, "connection sucessful, but empty responce\n"); if (program_flag & OAPI_RAW_OUTPUT) puts(r.buf); @@ -28269,19 +30975,19 @@ int main(int ac, char **av) } osc_deinit_str(&r); } else - if (!strcmp("CreatePublicIp", av[i])) { + if (!strcmp("CreatePolicy", av[i])) { json_object *jobj; auto_ptr_array struct ptr_array opa = {0}; struct ptr_array *pa = &opa; - struct osc_create_public_ip_arg a = {0}; - struct osc_create_public_ip_arg *s = &a; + struct osc_create_policy_arg a = {0}; + struct osc_create_policy_arg *s = &a; __attribute__((cleanup(files_cnt_cleanup))) char *files_cnt[MAX_FILES_PER_CMD] = {NULL}; int cret; cascade_struct = NULL; cascade_parser = NULL; - create_public_ip_arg: + create_policy_arg: if (i + 1 < ac && av[i + 1][0] == '.' && av[i + 1][1] == '.') { char *next_a = &av[i + 1][2]; @@ -28299,7 +31005,7 @@ int main(int ac, char **av) } STRY(cascade_parser(cascade_struct, next_a, aa, pa)); i += incr; - goto create_public_ip_arg; + goto create_policy_arg; } if (i + 1 < ac && av[i + 1][0] == '-' && av[i + 1][1] == '-') { @@ -28320,6 +31026,28 @@ int main(int ac, char **av) incr = 1; } } + if ((aret = argcmp(next_a, "Description")) == 0 || aret == '=' ) { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "Description argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + TRY(!aa, "Description argument missing\n"); + s->description = aa; // string string + + } else + if ((aret = argcmp(next_a, "Document")) == 0 || aret == '=' ) { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "Document argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + TRY(!aa, "Document argument missing\n"); + s->document = aa; // string string + + } else if ((aret = argcmp(next_a, "DryRun")) == 0 || aret == '=' ) { char *eq_ptr = strchr(next_a, '='); if (eq_ptr) { @@ -28336,14 +31064,36 @@ int main(int ac, char **av) BAD_RET("DryRun require true/false\n"); } } else + if ((aret = argcmp(next_a, "Path")) == 0 || aret == '=' ) { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "Path argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + TRY(!aa, "Path argument missing\n"); + s->path = aa; // string string + + } else + if ((aret = argcmp(next_a, "PolicyName")) == 0 || aret == '=' ) { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "PolicyName argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + TRY(!aa, "PolicyName argument missing\n"); + s->policy_name = aa; // string string + + } else { - BAD_RET("'%s' is not a valide argument for 'CreatePublicIp'\n", next_a); + BAD_RET("'%s' is not a valide argument for 'CreatePolicy'\n", next_a); } i += incr; - goto create_public_ip_arg; + goto create_policy_arg; } - cret = osc_create_public_ip(&e, &r, &a); - TRY(cret, "fail to call CreatePublicIp: %s\n", curl_easy_strerror(cret)); + cret = osc_create_policy(&e, &r, &a); + TRY(cret, "fail to call CreatePolicy: %s\n", curl_easy_strerror(cret)); CHK_BAD_RET(!r.buf, "connection sucessful, but empty responce\n"); if (program_flag & OAPI_RAW_OUTPUT) puts(r.buf); @@ -30793,6 +33543,126 @@ int main(int ac, char **av) } osc_deinit_str(&r); } else + if (!strcmp("CreateDedicatedGroup", av[i])) { + json_object *jobj; + auto_ptr_array struct ptr_array opa = {0}; + struct ptr_array *pa = &opa; + struct osc_create_dedicated_group_arg a = {0}; + struct osc_create_dedicated_group_arg *s = &a; + __attribute__((cleanup(files_cnt_cleanup))) char *files_cnt[MAX_FILES_PER_CMD] = {NULL}; + int cret; + + cascade_struct = NULL; + cascade_parser = NULL; + + create_dedicated_group_arg: + + if (i + 1 < ac && av[i + 1][0] == '.' && av[i + 1][1] == '.') { + char *next_a = &av[i + 1][2]; + char *aa = i + 2 < ac ? av[i + 2] : 0; + int incr = 2; + char *eq_ptr = strchr(next_a, '='); + + CHK_BAD_RET(!cascade_struct, "cascade need to be se first\n"); + if (eq_ptr) { + CHK_BAD_RET(!*eq_ptr, "cascade need an argument\n"); + incr = 1; + aa = eq_ptr + 1; + } else { + CHK_BAD_RET(!aa || aa[0] == '-', "cascade need an argument\n"); + } + STRY(cascade_parser(cascade_struct, next_a, aa, pa)); + i += incr; + goto create_dedicated_group_arg; + } + + if (i + 1 < ac && av[i + 1][0] == '-' && av[i + 1][1] == '-') { + char *next_a = &av[i + 1][2]; + char *str = next_a; + char *aa = i + 2 < ac ? av[i + 2] : 0; + int aret = 0; + int incr = aa ? 2 : 1; + + if (aa && aa[0] == '-' && aa[1] == '-' && aa[2] != '-') { + if (!strcmp(aa, "--file")) { + TRY(i + 3 >= ac, "file name require"); + ++incr; + aa = read_file(files_cnt, av[i + 3]); + STRY(!aa); + } else { + aa = 0; + incr = 1; + } + } + if ((aret = argcmp(next_a, "CpuGeneration")) == 0 || aret == '=' ) { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "CpuGeneration argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + TRY(!aa, "CpuGeneration argument missing\n"); + s->is_set_cpu_generation = 1; + s->cpu_generation = atoi(aa); + } else + if ((aret = argcmp(next_a, "DryRun")) == 0 || aret == '=' ) { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "DryRun argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + s->is_set_dry_run = 1; + if (!aa || !strcasecmp(aa, "true")) { + s->dry_run = 1; + } else if (!strcasecmp(aa, "false")) { + s->dry_run = 0; + } else { + BAD_RET("DryRun require true/false\n"); + } + } else + if ((aret = argcmp(next_a, "Name")) == 0 || aret == '=' ) { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "Name argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + TRY(!aa, "Name argument missing\n"); + s->name = aa; // string string + + } else + if ((aret = argcmp(next_a, "SubregionName")) == 0 || aret == '=' ) { + char *eq_ptr = strchr(next_a, '='); + if (eq_ptr) { + TRY((!*eq_ptr), "SubregionName argument missing\n"); + aa = eq_ptr + 1; + incr = 1; + } + TRY(!aa, "SubregionName argument missing\n"); + s->subregion_name = aa; // string string + + } else + { + BAD_RET("'%s' is not a valide argument for 'CreateDedicatedGroup'\n", next_a); + } + i += incr; + goto create_dedicated_group_arg; + } + cret = osc_create_dedicated_group(&e, &r, &a); + TRY(cret, "fail to call CreateDedicatedGroup: %s\n", curl_easy_strerror(cret)); + CHK_BAD_RET(!r.buf, "connection sucessful, but empty responce\n"); + if (program_flag & OAPI_RAW_OUTPUT) + puts(r.buf); + else { + jobj = json_tokener_parse(r.buf); + puts(json_object_to_json_string_ext(jobj, + JSON_C_TO_STRING_PRETTY | JSON_C_TO_STRING_NOSLASHESCAPE | + color_flag)); + json_object_put(jobj); + } + osc_deinit_str(&r); + } else if (!strcmp("CreateClientGateway", av[i])) { json_object *jobj; auto_ptr_array struct ptr_array opa = {0}; diff --git a/oapi-cli-completion.bash b/oapi-cli-completion.bash index e0a692e..c2843e1 100644 --- a/oapi-cli-completion.bash +++ b/oapi-cli-completion.bash @@ -1,7 +1,7 @@ #/usr/bin/env bash UpdateVpnConnection() { - COMPREPLY=($(compgen -W " --ClientGatewayId --DryRun --VirtualGatewayId --VpnConnectionId --VpnOptions.Phase1Options.DpdTimeoutAction --VpnOptions.Phase1Options.DpdTimeoutSeconds --VpnOptions.Phase1Options.IkeVersions --VpnOptions.Phase1Options.Phase1DhGroupNumbers --VpnOptions.Phase1Options.Phase1EncryptionAlgorithms --VpnOptions.Phase1Options.Phase1IntegrityAlgorithms --VpnOptions.Phase1Options.Phase1LifetimeSeconds --VpnOptions.Phase1Options.ReplayWindowSize --VpnOptions.Phase1Options.StartupAction --VpnOptions.Phase2Options.Phase2DhGroupNumbers --VpnOptions.Phase2Options.Phase2EncryptionAlgorithms --VpnOptions.Phase2Options.Phase2IntegrityAlgorithms --VpnOptions.Phase2Options.Phase2LifetimeSeconds --VpnOptions.Phase2Options.PreSharedKey --VpnOptions.TunnelInsideIpRange" -- ${cur})) + COMPREPLY=($(compgen -W " --ClientGatewayId --DryRun --VirtualGatewayId --VpnConnectionId --VpnOptions.Phase2Options.PreSharedKey --VpnOptions.TunnelInsideIpRange" -- ${cur})) } UpdateVolume() { COMPREPLY=($(compgen -W " --DryRun --Iops --Size --VolumeId --VolumeType" -- ${cur})) @@ -27,6 +27,9 @@ UpdateSnapshot() { UpdateServerCertificate() { COMPREPLY=($(compgen -W " --DryRun --Name --NewName --NewPath" -- ${cur})) } +UpdateRouteTableLink() { + COMPREPLY=($(compgen -W " --DryRun --LinkRouteTableId --RouteTableId" -- ${cur})) +} UpdateRoutePropagation() { COMPREPLY=($(compgen -W " --DryRun --Enable --RouteTableId --VirtualGatewayId" -- ${cur})) } @@ -57,6 +60,9 @@ UpdateFlexibleGpu() { UpdateDirectLinkInterface() { COMPREPLY=($(compgen -W " --DirectLinkInterfaceId --DryRun --Mtu" -- ${cur})) } +UpdateDedicatedGroup() { + COMPREPLY=($(compgen -W " --DedicatedGroupId --DryRun --Name" -- ${cur})) +} UpdateCa() { COMPREPLY=($(compgen -W " --CaId --Description --DryRun" -- ${cur})) } @@ -87,6 +93,9 @@ UnlinkPublicIp() { UnlinkPrivateIps() { COMPREPLY=($(compgen -W " --DryRun --NicId --PrivateIps" -- ${cur})) } +UnlinkPolicy() { + COMPREPLY=($(compgen -W " --DryRun --PolicyOrn --UserName" -- ${cur})) +} UnlinkNic() { COMPREPLY=($(compgen -W " --DryRun --LinkNicId" -- ${cur})) } @@ -105,8 +114,8 @@ StopVms() { StartVms() { COMPREPLY=($(compgen -W " --DryRun --VmIds" -- ${cur})) } -SendResetPasswordEmail() { - COMPREPLY=($(compgen -W " --DryRun --Email" -- ${cur})) +SetDefaultPolicyVersion() { + COMPREPLY=($(compgen -W " --PolicyOrn --VersionId" -- ${cur})) } ScaleUpVmGroup() { COMPREPLY=($(compgen -W " --DryRun --VmAddition --VmGroupId" -- ${cur})) @@ -114,9 +123,6 @@ ScaleUpVmGroup() { ScaleDownVmGroup() { COMPREPLY=($(compgen -W " --DryRun --VmGroupId --VmSubtraction" -- ${cur})) } -ResetAccountPassword() { - COMPREPLY=($(compgen -W " --DryRun --Password --Token" -- ${cur})) -} RejectNetPeering() { COMPREPLY=($(compgen -W " --DryRun --NetPeeringId" -- ${cur})) } @@ -127,10 +133,10 @@ RebootVms() { COMPREPLY=($(compgen -W " --DryRun --VmIds" -- ${cur})) } ReadVpnConnections() { - COMPREPLY=($(compgen -W " --DryRun --Filters.BgpAsns --Filters.ClientGatewayIds --Filters.ConnectionTypes --Filters.RouteDestinationIpRanges --Filters.States --Filters.StaticRoutesOnly --Filters.TagKeys --Filters.TagValues --Filters.Tags --Filters.VirtualGatewayIds --Filters.VpnConnectionIds" -- ${cur})) + COMPREPLY=($(compgen -W " --DryRun --Filters.BgpAsns --Filters.ClientGatewayIds --Filters.ConnectionTypes --Filters.RouteDestinationIpRanges --Filters.States --Filters.StaticRoutesOnly --Filters.TagKeys --Filters.TagValues --Filters.Tags --Filters.VirtualGatewayIds --Filters.VpnConnectionIds --NextPageToken --ResultsPerPage" -- ${cur})) } ReadVolumes() { - COMPREPLY=($(compgen -W " --DryRun --Filters.CreationDates --Filters.LinkVolumeDeleteOnVmDeletion --Filters.LinkVolumeDeviceNames --Filters.LinkVolumeLinkDates --Filters.LinkVolumeLinkStates --Filters.LinkVolumeVmIds --Filters.SnapshotIds --Filters.SubregionNames --Filters.TagKeys --Filters.TagValues --Filters.Tags --Filters.VolumeIds --Filters.VolumeSizes --Filters.VolumeStates --Filters.VolumeTypes" -- ${cur})) + COMPREPLY=($(compgen -W " --DryRun --Filters.CreationDates --Filters.LinkVolumeDeleteOnVmDeletion --Filters.LinkVolumeDeviceNames --Filters.LinkVolumeLinkDates --Filters.LinkVolumeLinkStates --Filters.LinkVolumeVmIds --Filters.SnapshotIds --Filters.SubregionNames --Filters.TagKeys --Filters.TagValues --Filters.Tags --Filters.VolumeIds --Filters.VolumeSizes --Filters.VolumeStates --Filters.VolumeTypes --NextPageToken --ResultsPerPage" -- ${cur})) } ReadVmsState() { COMPREPLY=($(compgen -W " --AllVms --DryRun --Filters.MaintenanceEventCodes --Filters.MaintenanceEventDescriptions --Filters.MaintenanceEventsNotAfter --Filters.MaintenanceEventsNotBefore --Filters.SubregionNames --Filters.VmIds --Filters.VmStates" -- ${cur})) @@ -139,10 +145,10 @@ ReadVmsHealth() { COMPREPLY=($(compgen -W " --BackendVmIds --DryRun --LoadBalancerName" -- ${cur})) } ReadVms() { - COMPREPLY=($(compgen -W " --DryRun --Filters.TagKeys --Filters.TagValues --Filters.Tags --Filters.VmIds" -- ${cur})) + COMPREPLY=($(compgen -W " --DryRun --Filters.Architectures --Filters.BlockDeviceMappingDeleteOnVmDeletion --Filters.BlockDeviceMappingDeviceNames --Filters.BlockDeviceMappingLinkDates --Filters.BlockDeviceMappingStates --Filters.BlockDeviceMappingVolumeIds --Filters.ClientTokens --Filters.CreationDates --Filters.ImageIds --Filters.IsSourceDestChecked --Filters.KeypairNames --Filters.LaunchNumbers --Filters.Lifecycles --Filters.NetIds --Filters.NicAccountIds --Filters.NicDescriptions --Filters.NicIsSourceDestChecked --Filters.NicLinkNicDeleteOnVmDeletion --Filters.NicLinkNicDeviceNumbers --Filters.NicLinkNicLinkNicDates --Filters.NicLinkNicLinkNicIds --Filters.NicLinkNicStates --Filters.NicLinkNicVmAccountIds --Filters.NicLinkNicVmIds --Filters.NicLinkPublicIpAccountIds --Filters.NicLinkPublicIpLinkPublicIpIds --Filters.NicLinkPublicIpPublicIpIds --Filters.NicLinkPublicIpPublicIps --Filters.NicMacAddresses --Filters.NicNetIds --Filters.NicNicIds --Filters.NicPrivateIpsLinkPublicIpAccountIds --Filters.NicPrivateIpsLinkPublicIpIds --Filters.NicPrivateIpsPrimaryIp --Filters.NicPrivateIpsPrivateIps --Filters.NicSecurityGroupIds --Filters.NicSecurityGroupNames --Filters.NicStates --Filters.NicSubnetIds --Filters.NicSubregionNames --Filters.Platforms --Filters.PrivateIps --Filters.ProductCodes --Filters.PublicIps --Filters.ReservationIds --Filters.RootDeviceNames --Filters.RootDeviceTypes --Filters.SecurityGroupIds --Filters.SecurityGroupNames --Filters.StateReasonCodes --Filters.StateReasonMessages --Filters.StateReasons --Filters.SubnetIds --Filters.SubregionNames --Filters.TagKeys --Filters.TagValues --Filters.Tags --Filters.Tenancies --Filters.VmIds --Filters.VmSecurityGroupIds --Filters.VmSecurityGroupNames --Filters.VmStateCodes --Filters.VmStateNames --Filters.VmTypes --NextPageToken --ResultsPerPage" -- ${cur})) } ReadVmTypes() { - COMPREPLY=($(compgen -W " --DryRun --Filters.BsuOptimized --Filters.MemorySizes --Filters.VcoreCounts --Filters.VmTypeNames --Filters.VolumeCounts --Filters.VolumeSizes" -- ${cur})) + COMPREPLY=($(compgen -W " --DryRun --Filters.BsuOptimized --Filters.EphemeralsTypes --Filters.Eths --Filters.Gpus --Filters.MemorySizes --Filters.VcoreCounts --Filters.VmTypeNames --Filters.VolumeCounts --Filters.VolumeSizes" -- ${cur})) } ReadVmTemplates() { COMPREPLY=($(compgen -W " --DryRun --Filters.CpuCores --Filters.CpuGenerations --Filters.CpuPerformances --Filters.Descriptions --Filters.ImageIds --Filters.KeypairNames --Filters.Rams --Filters.TagKeys --Filters.TagValues --Filters.Tags --Filters.VmTemplateIds --Filters.VmTemplateNames" -- ${cur})) @@ -151,7 +157,7 @@ ReadVmGroups() { COMPREPLY=($(compgen -W " --DryRun --Filters.Descriptions --Filters.SecurityGroupIds --Filters.SubnetIds --Filters.TagKeys --Filters.TagValues --Filters.Tags --Filters.VmCounts --Filters.VmGroupIds --Filters.VmGroupNames --Filters.VmTemplateIds" -- ${cur})) } ReadVirtualGateways() { - COMPREPLY=($(compgen -W " --DryRun --Filters.ConnectionTypes --Filters.LinkNetIds --Filters.LinkStates --Filters.States --Filters.TagKeys --Filters.TagValues --Filters.Tags --Filters.VirtualGatewayIds" -- ${cur})) + COMPREPLY=($(compgen -W " --DryRun --Filters.ConnectionTypes --Filters.LinkNetIds --Filters.LinkStates --Filters.States --Filters.TagKeys --Filters.TagValues --Filters.Tags --Filters.VirtualGatewayIds --NextPageToken --ResultsPerPage" -- ${cur})) } ReadUsers() { COMPREPLY=($(compgen -W " --DryRun" -- ${cur})) @@ -160,7 +166,7 @@ ReadTags() { COMPREPLY=($(compgen -W " --DryRun --Filters.Keys --Filters.ResourceIds --Filters.ResourceTypes --Filters.Values" -- ${cur})) } ReadSubregions() { - COMPREPLY=($(compgen -W " --DryRun --Filters.SubregionNames" -- ${cur})) + COMPREPLY=($(compgen -W " --DryRun --Filters.RegionNames --Filters.States --Filters.SubregionNames" -- ${cur})) } ReadSubnets() { COMPREPLY=($(compgen -W " --DryRun --Filters.AvailableIpsCounts --Filters.IpRanges --Filters.NetIds --Filters.States --Filters.SubnetIds --Filters.SubregionNames --Filters.TagKeys --Filters.TagValues --Filters.Tags" -- ${cur})) @@ -175,13 +181,13 @@ ReadServerCertificates() { COMPREPLY=($(compgen -W " --DryRun --Filters.Paths" -- ${cur})) } ReadSecurityGroups() { - COMPREPLY=($(compgen -W " --DryRun --Filters.AccountIds --Filters.Descriptions --Filters.InboundRuleAccountIds --Filters.InboundRuleFromPortRanges --Filters.InboundRuleIpRanges --Filters.InboundRuleProtocols --Filters.InboundRuleSecurityGroupIds --Filters.InboundRuleSecurityGroupNames --Filters.InboundRuleToPortRanges --Filters.NetIds --Filters.OutboundRuleAccountIds --Filters.OutboundRuleFromPortRanges --Filters.OutboundRuleIpRanges --Filters.OutboundRuleProtocols --Filters.OutboundRuleSecurityGroupIds --Filters.OutboundRuleSecurityGroupNames --Filters.OutboundRuleToPortRanges --Filters.SecurityGroupIds --Filters.SecurityGroupNames --Filters.TagKeys --Filters.TagValues --Filters.Tags" -- ${cur})) + COMPREPLY=($(compgen -W " --DryRun --Filters.Descriptions --Filters.InboundRuleAccountIds --Filters.InboundRuleFromPortRanges --Filters.InboundRuleIpRanges --Filters.InboundRuleProtocols --Filters.InboundRuleSecurityGroupIds --Filters.InboundRuleSecurityGroupNames --Filters.InboundRuleToPortRanges --Filters.NetIds --Filters.OutboundRuleAccountIds --Filters.OutboundRuleFromPortRanges --Filters.OutboundRuleIpRanges --Filters.OutboundRuleProtocols --Filters.OutboundRuleSecurityGroupIds --Filters.OutboundRuleSecurityGroupNames --Filters.OutboundRuleToPortRanges --Filters.SecurityGroupIds --Filters.SecurityGroupNames --Filters.TagKeys --Filters.TagValues --Filters.Tags" -- ${cur})) } ReadSecretAccessKey() { COMPREPLY=($(compgen -W " --AccessKeyId --DryRun" -- ${cur})) } ReadRouteTables() { - COMPREPLY=($(compgen -W " --DryRun --Filters.LinkRouteTableIds --Filters.LinkRouteTableLinkRouteTableIds --Filters.LinkRouteTableMain --Filters.LinkSubnetIds --Filters.NetIds --Filters.RouteCreationMethods --Filters.RouteDestinationIpRanges --Filters.RouteDestinationServiceIds --Filters.RouteGatewayIds --Filters.RouteNatServiceIds --Filters.RouteNetPeeringIds --Filters.RouteStates --Filters.RouteTableIds --Filters.RouteVmIds --Filters.TagKeys --Filters.TagValues --Filters.Tags" -- ${cur})) + COMPREPLY=($(compgen -W " --DryRun --Filters.LinkRouteTableIds --Filters.LinkRouteTableLinkRouteTableIds --Filters.LinkRouteTableMain --Filters.LinkSubnetIds --Filters.NetIds --Filters.RouteCreationMethods --Filters.RouteDestinationIpRanges --Filters.RouteDestinationServiceIds --Filters.RouteGatewayIds --Filters.RouteNatServiceIds --Filters.RouteNetPeeringIds --Filters.RouteStates --Filters.RouteTableIds --Filters.RouteVmIds --Filters.TagKeys --Filters.TagValues --Filters.Tags --NextPageToken --ResultsPerPage" -- ${cur})) } ReadRegions() { COMPREPLY=($(compgen -W " --DryRun" -- ${cur})) @@ -190,7 +196,7 @@ ReadQuotas() { COMPREPLY=($(compgen -W " --DryRun --Filters.Collections --Filters.QuotaNames --Filters.QuotaTypes --Filters.ShortDescriptions" -- ${cur})) } ReadPublicIps() { - COMPREPLY=($(compgen -W " --DryRun --Filters.LinkPublicIpIds --Filters.NicAccountIds --Filters.NicIds --Filters.Placements --Filters.PrivateIps --Filters.PublicIpIds --Filters.PublicIps --Filters.TagKeys --Filters.TagValues --Filters.Tags --Filters.VmIds" -- ${cur})) + COMPREPLY=($(compgen -W " --DryRun --Filters.LinkPublicIpIds --Filters.NicAccountIds --Filters.NicIds --Filters.Placements --Filters.PrivateIps --Filters.PublicIpIds --Filters.PublicIps --Filters.TagKeys --Filters.TagValues --Filters.Tags --Filters.VmIds --NextPageToken --ResultsPerPage" -- ${cur})) } ReadPublicIpRanges() { COMPREPLY=($(compgen -W " --DryRun" -- ${cur})) @@ -201,6 +207,18 @@ ReadPublicCatalog() { ReadProductTypes() { COMPREPLY=($(compgen -W " --DryRun --Filters.ProductTypeIds" -- ${cur})) } +ReadPolicyVersions() { + COMPREPLY=($(compgen -W " --FirstItem --PolicyOrn --ResultsPerPage" -- ${cur})) +} +ReadPolicyVersion() { + COMPREPLY=($(compgen -W " --PolicyOrn --VersionId" -- ${cur})) +} +ReadPolicy() { + COMPREPLY=($(compgen -W " --PolicyOrn" -- ${cur})) +} +ReadPolicies() { + COMPREPLY=($(compgen -W " --DryRun --Filters.OnlyLinked --Filters.PathPrefix --Filters.Scope --FirstItem --ResultsPerPage" -- ${cur})) +} ReadNics() { COMPREPLY=($(compgen -W " --DryRun --Filters.Descriptions --Filters.IsSourceDestCheck --Filters.LinkNicDeleteOnVmDeletion --Filters.LinkNicDeviceNumbers --Filters.LinkNicLinkNicIds --Filters.LinkNicStates --Filters.LinkNicVmAccountIds --Filters.LinkNicVmIds --Filters.LinkPublicIpAccountIds --Filters.LinkPublicIpLinkPublicIpIds --Filters.LinkPublicIpPublicIpIds --Filters.LinkPublicIpPublicIps --Filters.MacAddresses --Filters.NetIds --Filters.NicIds --Filters.PrivateDnsNames --Filters.PrivateIpsLinkPublicIpAccountIds --Filters.PrivateIpsLinkPublicIpPublicIps --Filters.PrivateIpsPrimaryIp --Filters.PrivateIpsPrivateIps --Filters.SecurityGroupIds --Filters.SecurityGroupNames --Filters.States --Filters.SubnetIds --Filters.SubregionNames --Filters.TagKeys --Filters.TagValues --Filters.Tags" -- ${cur})) } @@ -208,16 +226,16 @@ ReadNets() { COMPREPLY=($(compgen -W " --DryRun --Filters.DhcpOptionsSetIds --Filters.IpRanges --Filters.IsDefault --Filters.NetIds --Filters.States --Filters.TagKeys --Filters.TagValues --Filters.Tags" -- ${cur})) } ReadNetPeerings() { - COMPREPLY=($(compgen -W " --DryRun --Filters.AccepterNetAccountIds --Filters.AccepterNetIpRanges --Filters.AccepterNetNetIds --Filters.NetPeeringIds --Filters.SourceNetAccountIds --Filters.SourceNetIpRanges --Filters.SourceNetNetIds --Filters.StateMessages --Filters.StateNames --Filters.TagKeys --Filters.TagValues --Filters.Tags" -- ${cur})) + COMPREPLY=($(compgen -W " --DryRun --Filters.AccepterNetAccountIds --Filters.AccepterNetIpRanges --Filters.AccepterNetNetIds --Filters.ExpirationDates --Filters.NetPeeringIds --Filters.SourceNetAccountIds --Filters.SourceNetIpRanges --Filters.SourceNetNetIds --Filters.StateMessages --Filters.StateNames --Filters.TagKeys --Filters.TagValues --Filters.Tags --NextPageToken --ResultsPerPage" -- ${cur})) } ReadNetAccessPoints() { - COMPREPLY=($(compgen -W " --DryRun --Filters.NetAccessPointIds --Filters.NetIds --Filters.ServiceNames --Filters.States --Filters.TagKeys --Filters.TagValues --Filters.Tags" -- ${cur})) + COMPREPLY=($(compgen -W " --DryRun --Filters.NetAccessPointIds --Filters.NetIds --Filters.ServiceNames --Filters.States --Filters.TagKeys --Filters.TagValues --Filters.Tags --NextPageToken --ResultsPerPage" -- ${cur})) } ReadNetAccessPointServices() { COMPREPLY=($(compgen -W " --DryRun --Filters.ServiceIds --Filters.ServiceNames" -- ${cur})) } ReadNatServices() { - COMPREPLY=($(compgen -W " --DryRun --Filters.NatServiceIds --Filters.NetIds --Filters.States --Filters.SubnetIds --Filters.TagKeys --Filters.TagValues --Filters.Tags" -- ${cur})) + COMPREPLY=($(compgen -W " --DryRun --Filters.NatServiceIds --Filters.NetIds --Filters.States --Filters.SubnetIds --Filters.TagKeys --Filters.TagValues --Filters.Tags --NextPageToken --ResultsPerPage" -- ${cur})) } ReadLocations() { COMPREPLY=($(compgen -W " --DryRun" -- ${cur})) @@ -231,14 +249,17 @@ ReadLoadBalancerTags() { ReadListenerRules() { COMPREPLY=($(compgen -W " --DryRun --Filters.ListenerRuleNames" -- ${cur})) } +ReadLinkedPolicies() { + COMPREPLY=($(compgen -W " --DryRun --Filters.PathPrefix --FirstItem --ResultsPerPage --UserName" -- ${cur})) +} ReadKeypairs() { - COMPREPLY=($(compgen -W " --DryRun --Filters.KeypairFingerprints --Filters.KeypairNames" -- ${cur})) + COMPREPLY=($(compgen -W " --DryRun --Filters.KeypairFingerprints --Filters.KeypairNames --Filters.KeypairTypes" -- ${cur})) } ReadInternetServices() { COMPREPLY=($(compgen -W " --DryRun --Filters.InternetServiceIds --Filters.LinkNetIds --Filters.LinkStates --Filters.TagKeys --Filters.TagValues --Filters.Tags" -- ${cur})) } ReadImages() { - COMPREPLY=($(compgen -W " --DryRun --Filters.AccountAliases --Filters.AccountIds --Filters.Architectures --Filters.BlockDeviceMappingDeleteOnVmDeletion --Filters.BlockDeviceMappingDeviceNames --Filters.BlockDeviceMappingSnapshotIds --Filters.BlockDeviceMappingVolumeSizes --Filters.BlockDeviceMappingVolumeTypes --Filters.Descriptions --Filters.FileLocations --Filters.Hypervisors --Filters.ImageIds --Filters.ImageNames --Filters.PermissionsToLaunchAccountIds --Filters.PermissionsToLaunchGlobalPermission --Filters.ProductCodes --Filters.RootDeviceNames --Filters.RootDeviceTypes --Filters.States --Filters.TagKeys --Filters.TagValues --Filters.Tags --Filters.VirtualizationTypes" -- ${cur})) + COMPREPLY=($(compgen -W " --DryRun --Filters.AccountAliases --Filters.AccountIds --Filters.Architectures --Filters.BlockDeviceMappingDeleteOnVmDeletion --Filters.BlockDeviceMappingDeviceNames --Filters.BlockDeviceMappingSnapshotIds --Filters.BlockDeviceMappingVolumeSizes --Filters.BlockDeviceMappingVolumeTypes --Filters.Descriptions --Filters.FileLocations --Filters.Hypervisors --Filters.ImageIds --Filters.ImageNames --Filters.PermissionsToLaunchAccountIds --Filters.PermissionsToLaunchGlobalPermission --Filters.ProductCodeNames --Filters.ProductCodes --Filters.RootDeviceNames --Filters.RootDeviceTypes --Filters.States --Filters.TagKeys --Filters.TagValues --Filters.Tags --Filters.VirtualizationTypes --NextPageToken --ResultsPerPage" -- ${cur})) } ReadImageExportTasks() { COMPREPLY=($(compgen -W " --DryRun --Filters.TaskIds" -- ${cur})) @@ -256,10 +277,13 @@ ReadDirectLinkInterfaces() { COMPREPLY=($(compgen -W " --DryRun --Filters.DirectLinkIds --Filters.DirectLinkInterfaceIds" -- ${cur})) } ReadDhcpOptions() { - COMPREPLY=($(compgen -W " --DryRun --Filters.Default --Filters.DhcpOptionsSetIds --Filters.DomainNameServers --Filters.DomainNames --Filters.LogServers --Filters.NtpServers --Filters.TagKeys --Filters.TagValues --Filters.Tags" -- ${cur})) + COMPREPLY=($(compgen -W " --DryRun --Filters.Default --Filters.DhcpOptionsSetIds --Filters.DomainNameServers --Filters.DomainNames --Filters.LogServers --Filters.NtpServers --Filters.TagKeys --Filters.TagValues --Filters.Tags --NextPageToken --ResultsPerPage" -- ${cur})) +} +ReadDedicatedGroups() { + COMPREPLY=($(compgen -W " --DryRun --Filters.CpuGenerations --Filters.DedicatedGroupIds --Filters.Names --Filters.SubregionNames" -- ${cur})) } ReadConsumptionAccount() { - COMPREPLY=($(compgen -W " --DryRun --FromDate --Overall --ToDate" -- ${cur})) + COMPREPLY=($(compgen -W " --DryRun --FromDate --Overall --ShowPrice --ToDate" -- ${cur})) } ReadConsoleOutput() { COMPREPLY=($(compgen -W " --DryRun --VmId" -- ${cur})) @@ -309,6 +333,9 @@ LinkPublicIp() { LinkPrivateIps() { COMPREPLY=($(compgen -W " --AllowRelink --DryRun --NicId --PrivateIps --SecondaryPrivateIpCount" -- ${cur})) } +LinkPolicy() { + COMPREPLY=($(compgen -W " --DryRun --PolicyOrn --UserName" -- ${cur})) +} LinkNic() { COMPREPLY=($(compgen -W " --DeviceNumber --DryRun --NicId --VmId" -- ${cur})) } @@ -375,6 +402,12 @@ DeleteRoute() { DeletePublicIp() { COMPREPLY=($(compgen -W " --DryRun --PublicIp --PublicIpId" -- ${cur})) } +DeletePolicyVersion() { + COMPREPLY=($(compgen -W " --PolicyOrn --VersionId" -- ${cur})) +} +DeletePolicy() { + COMPREPLY=($(compgen -W " --DryRun --PolicyOrn" -- ${cur})) +} DeleteNic() { COMPREPLY=($(compgen -W " --DryRun --NicId" -- ${cur})) } @@ -429,6 +462,9 @@ DeleteDirectLink() { DeleteDhcpOptions() { COMPREPLY=($(compgen -W " --DhcpOptionsSetId --DryRun" -- ${cur})) } +DeleteDedicatedGroup() { + COMPREPLY=($(compgen -W " --DedicatedGroupId --DryRun --Force" -- ${cur})) +} DeleteClientGateway() { COMPREPLY=($(compgen -W " --ClientGatewayId --DryRun" -- ${cur})) } @@ -495,6 +531,15 @@ CreateRoute() { CreatePublicIp() { COMPREPLY=($(compgen -W " --DryRun" -- ${cur})) } +CreateProductType() { + COMPREPLY=($(compgen -W " --Description --DryRun --Vendor" -- ${cur})) +} +CreatePolicyVersion() { + COMPREPLY=($(compgen -W " --Document --PolicyOrn --SetAsDefault" -- ${cur})) +} +CreatePolicy() { + COMPREPLY=($(compgen -W " --Description --Document --DryRun --Path --PolicyName" -- ${cur})) +} CreateNic() { COMPREPLY=($(compgen -W " --Description --DryRun --PrivateIps --SecurityGroupIds --SubnetId" -- ${cur})) } @@ -549,6 +594,9 @@ CreateDirectLink() { CreateDhcpOptions() { COMPREPLY=($(compgen -W " --DomainName --DomainNameServers --DryRun --LogServers --NtpServers" -- ${cur})) } +CreateDedicatedGroup() { + COMPREPLY=($(compgen -W " --CpuGeneration --DryRun --Name --SubregionName" -- ${cur})) +} CreateClientGateway() { COMPREPLY=($(compgen -W " --BgpAsn --ConnectionType --DryRun --PublicIp" -- ${cur})) } @@ -589,15 +637,15 @@ _cognac() case ${COMP_CWORD} in *) case ${prev} in - UpdateVpnConnection | UpdateVolume | UpdateVmTemplate | UpdateVmGroup | UpdateVm | UpdateUser | UpdateSubnet | UpdateSnapshot | UpdateServerCertificate | UpdateRoutePropagation | UpdateRoute | UpdateNic | UpdateNetAccessPoint | UpdateNet | UpdateLoadBalancer | UpdateListenerRule | UpdateImage | UpdateFlexibleGpu | UpdateDirectLinkInterface | UpdateCa | UpdateApiAccessRule | UpdateApiAccessPolicy | UpdateAccount | UpdateAccessKey | UnlinkVolume | UnlinkVirtualGateway | UnlinkRouteTable | UnlinkPublicIp | UnlinkPrivateIps | UnlinkNic | UnlinkLoadBalancerBackendMachines | UnlinkInternetService | UnlinkFlexibleGpu | StopVms | StartVms | SendResetPasswordEmail | ScaleUpVmGroup | ScaleDownVmGroup | ResetAccountPassword | RejectNetPeering | RegisterVmsInLoadBalancer | RebootVms | ReadVpnConnections | ReadVolumes | ReadVmsState | ReadVmsHealth | ReadVms | ReadVmTypes | ReadVmTemplates | ReadVmGroups | ReadVirtualGateways | ReadUsers | ReadTags | ReadSubregions | ReadSubnets | ReadSnapshots | ReadSnapshotExportTasks | ReadServerCertificates | ReadSecurityGroups | ReadSecretAccessKey | ReadRouteTables | ReadRegions | ReadQuotas | ReadPublicIps | ReadPublicIpRanges | ReadPublicCatalog | ReadProductTypes | ReadNics | ReadNets | ReadNetPeerings | ReadNetAccessPoints | ReadNetAccessPointServices | ReadNatServices | ReadLocations | ReadLoadBalancers | ReadLoadBalancerTags | ReadListenerRules | ReadKeypairs | ReadInternetServices | ReadImages | ReadImageExportTasks | ReadFlexibleGpus | ReadFlexibleGpuCatalog | ReadDirectLinks | ReadDirectLinkInterfaces | ReadDhcpOptions | ReadConsumptionAccount | ReadConsoleOutput | ReadClientGateways | ReadCatalogs | ReadCatalog | ReadCas | ReadApiLogs | ReadApiAccessRules | ReadApiAccessPolicy | ReadAdminPassword | ReadAccounts | ReadAccessKeys | LinkVolume | LinkVirtualGateway | LinkRouteTable | LinkPublicIp | LinkPrivateIps | LinkNic | LinkLoadBalancerBackendMachines | LinkInternetService | LinkFlexibleGpu | DeregisterVmsInLoadBalancer | DeleteVpnConnectionRoute | DeleteVpnConnection | DeleteVolume | DeleteVms | DeleteVmTemplate | DeleteVmGroup | DeleteVirtualGateway | DeleteUser | DeleteTags | DeleteSubnet | DeleteSnapshot | DeleteServerCertificate | DeleteSecurityGroupRule | DeleteSecurityGroup | DeleteRouteTable | DeleteRoute | DeletePublicIp | DeleteNic | DeleteNetPeering | DeleteNetAccessPoint | DeleteNet | DeleteNatService | DeleteLoadBalancerTags | DeleteLoadBalancerPolicy | DeleteLoadBalancerListeners | DeleteLoadBalancer | DeleteListenerRule | DeleteKeypair | DeleteInternetService | DeleteImage | DeleteFlexibleGpu | DeleteExportTask | DeleteDirectLinkInterface | DeleteDirectLink | DeleteDhcpOptions | DeleteClientGateway | DeleteCa | DeleteApiAccessRule | DeleteAccessKey | CreateVpnConnectionRoute | CreateVpnConnection | CreateVolume | CreateVms | CreateVmTemplate | CreateVmGroup | CreateVirtualGateway | CreateUser | CreateTags | CreateSubnet | CreateSnapshotExportTask | CreateSnapshot | CreateServerCertificate | CreateSecurityGroupRule | CreateSecurityGroup | CreateRouteTable | CreateRoute | CreatePublicIp | CreateNic | CreateNetPeering | CreateNetAccessPoint | CreateNet | CreateNatService | CreateLoadBalancerTags | CreateLoadBalancerPolicy | CreateLoadBalancerListeners | CreateLoadBalancer | CreateListenerRule | CreateKeypair | CreateInternetService | CreateImageExportTask | CreateImage | CreateFlexibleGpu | CreateDirectLinkInterface | CreateDirectLink | CreateDhcpOptions | CreateClientGateway | CreateCa | CreateApiAccessRule | CreateAccount | CreateAccessKey | CheckAuthentication | AcceptNetPeering) + UpdateVpnConnection | UpdateVolume | UpdateVmTemplate | UpdateVmGroup | UpdateVm | UpdateUser | UpdateSubnet | UpdateSnapshot | UpdateServerCertificate | UpdateRouteTableLink | UpdateRoutePropagation | UpdateRoute | UpdateNic | UpdateNetAccessPoint | UpdateNet | UpdateLoadBalancer | UpdateListenerRule | UpdateImage | UpdateFlexibleGpu | UpdateDirectLinkInterface | UpdateDedicatedGroup | UpdateCa | UpdateApiAccessRule | UpdateApiAccessPolicy | UpdateAccount | UpdateAccessKey | UnlinkVolume | UnlinkVirtualGateway | UnlinkRouteTable | UnlinkPublicIp | UnlinkPrivateIps | UnlinkPolicy | UnlinkNic | UnlinkLoadBalancerBackendMachines | UnlinkInternetService | UnlinkFlexibleGpu | StopVms | StartVms | SetDefaultPolicyVersion | ScaleUpVmGroup | ScaleDownVmGroup | RejectNetPeering | RegisterVmsInLoadBalancer | RebootVms | ReadVpnConnections | ReadVolumes | ReadVmsState | ReadVmsHealth | ReadVms | ReadVmTypes | ReadVmTemplates | ReadVmGroups | ReadVirtualGateways | ReadUsers | ReadTags | ReadSubregions | ReadSubnets | ReadSnapshots | ReadSnapshotExportTasks | ReadServerCertificates | ReadSecurityGroups | ReadSecretAccessKey | ReadRouteTables | ReadRegions | ReadQuotas | ReadPublicIps | ReadPublicIpRanges | ReadPublicCatalog | ReadProductTypes | ReadPolicyVersions | ReadPolicyVersion | ReadPolicy | ReadPolicies | ReadNics | ReadNets | ReadNetPeerings | ReadNetAccessPoints | ReadNetAccessPointServices | ReadNatServices | ReadLocations | ReadLoadBalancers | ReadLoadBalancerTags | ReadListenerRules | ReadLinkedPolicies | ReadKeypairs | ReadInternetServices | ReadImages | ReadImageExportTasks | ReadFlexibleGpus | ReadFlexibleGpuCatalog | ReadDirectLinks | ReadDirectLinkInterfaces | ReadDhcpOptions | ReadDedicatedGroups | ReadConsumptionAccount | ReadConsoleOutput | ReadClientGateways | ReadCatalogs | ReadCatalog | ReadCas | ReadApiLogs | ReadApiAccessRules | ReadApiAccessPolicy | ReadAdminPassword | ReadAccounts | ReadAccessKeys | LinkVolume | LinkVirtualGateway | LinkRouteTable | LinkPublicIp | LinkPrivateIps | LinkPolicy | LinkNic | LinkLoadBalancerBackendMachines | LinkInternetService | LinkFlexibleGpu | DeregisterVmsInLoadBalancer | DeleteVpnConnectionRoute | DeleteVpnConnection | DeleteVolume | DeleteVms | DeleteVmTemplate | DeleteVmGroup | DeleteVirtualGateway | DeleteUser | DeleteTags | DeleteSubnet | DeleteSnapshot | DeleteServerCertificate | DeleteSecurityGroupRule | DeleteSecurityGroup | DeleteRouteTable | DeleteRoute | DeletePublicIp | DeletePolicyVersion | DeletePolicy | DeleteNic | DeleteNetPeering | DeleteNetAccessPoint | DeleteNet | DeleteNatService | DeleteLoadBalancerTags | DeleteLoadBalancerPolicy | DeleteLoadBalancerListeners | DeleteLoadBalancer | DeleteListenerRule | DeleteKeypair | DeleteInternetService | DeleteImage | DeleteFlexibleGpu | DeleteExportTask | DeleteDirectLinkInterface | DeleteDirectLink | DeleteDhcpOptions | DeleteDedicatedGroup | DeleteClientGateway | DeleteCa | DeleteApiAccessRule | DeleteAccessKey | CreateVpnConnectionRoute | CreateVpnConnection | CreateVolume | CreateVms | CreateVmTemplate | CreateVmGroup | CreateVirtualGateway | CreateUser | CreateTags | CreateSubnet | CreateSnapshotExportTask | CreateSnapshot | CreateServerCertificate | CreateSecurityGroupRule | CreateSecurityGroup | CreateRouteTable | CreateRoute | CreatePublicIp | CreateProductType | CreatePolicyVersion | CreatePolicy | CreateNic | CreateNetPeering | CreateNetAccessPoint | CreateNet | CreateNatService | CreateLoadBalancerTags | CreateLoadBalancerPolicy | CreateLoadBalancerListeners | CreateLoadBalancer | CreateListenerRule | CreateKeypair | CreateInternetService | CreateImageExportTask | CreateImage | CreateFlexibleGpu | CreateDirectLinkInterface | CreateDirectLink | CreateDhcpOptions | CreateDedicatedGroup | CreateClientGateway | CreateCa | CreateApiAccessRule | CreateAccount | CreateAccessKey | CheckAuthentication | AcceptNetPeering) eval ${prev} ;; --help) - COMPREPLY=($(compgen -W "UpdateVpnConnection UpdateVolume UpdateVmTemplate UpdateVmGroup UpdateVm UpdateUser UpdateSubnet UpdateSnapshot UpdateServerCertificate UpdateRoutePropagation UpdateRoute UpdateNic UpdateNetAccessPoint UpdateNet UpdateLoadBalancer UpdateListenerRule UpdateImage UpdateFlexibleGpu UpdateDirectLinkInterface UpdateCa UpdateApiAccessRule UpdateApiAccessPolicy UpdateAccount UpdateAccessKey UnlinkVolume UnlinkVirtualGateway UnlinkRouteTable UnlinkPublicIp UnlinkPrivateIps UnlinkNic UnlinkLoadBalancerBackendMachines UnlinkInternetService UnlinkFlexibleGpu StopVms StartVms SendResetPasswordEmail ScaleUpVmGroup ScaleDownVmGroup ResetAccountPassword RejectNetPeering RegisterVmsInLoadBalancer RebootVms ReadVpnConnections ReadVolumes ReadVmsState ReadVmsHealth ReadVms ReadVmTypes ReadVmTemplates ReadVmGroups ReadVirtualGateways ReadUsers ReadTags ReadSubregions ReadSubnets ReadSnapshots ReadSnapshotExportTasks ReadServerCertificates ReadSecurityGroups ReadSecretAccessKey ReadRouteTables ReadRegions ReadQuotas ReadPublicIps ReadPublicIpRanges ReadPublicCatalog ReadProductTypes ReadNics ReadNets ReadNetPeerings ReadNetAccessPoints ReadNetAccessPointServices ReadNatServices ReadLocations ReadLoadBalancers ReadLoadBalancerTags ReadListenerRules ReadKeypairs ReadInternetServices ReadImages ReadImageExportTasks ReadFlexibleGpus ReadFlexibleGpuCatalog ReadDirectLinks ReadDirectLinkInterfaces ReadDhcpOptions ReadConsumptionAccount ReadConsoleOutput ReadClientGateways ReadCatalogs ReadCatalog ReadCas ReadApiLogs ReadApiAccessRules ReadApiAccessPolicy ReadAdminPassword ReadAccounts ReadAccessKeys LinkVolume LinkVirtualGateway LinkRouteTable LinkPublicIp LinkPrivateIps LinkNic LinkLoadBalancerBackendMachines LinkInternetService LinkFlexibleGpu DeregisterVmsInLoadBalancer DeleteVpnConnectionRoute DeleteVpnConnection DeleteVolume DeleteVms DeleteVmTemplate DeleteVmGroup DeleteVirtualGateway DeleteUser DeleteTags DeleteSubnet DeleteSnapshot DeleteServerCertificate DeleteSecurityGroupRule DeleteSecurityGroup DeleteRouteTable DeleteRoute DeletePublicIp DeleteNic DeleteNetPeering DeleteNetAccessPoint DeleteNet DeleteNatService DeleteLoadBalancerTags DeleteLoadBalancerPolicy DeleteLoadBalancerListeners DeleteLoadBalancer DeleteListenerRule DeleteKeypair DeleteInternetService DeleteImage DeleteFlexibleGpu DeleteExportTask DeleteDirectLinkInterface DeleteDirectLink DeleteDhcpOptions DeleteClientGateway DeleteCa DeleteApiAccessRule DeleteAccessKey CreateVpnConnectionRoute CreateVpnConnection CreateVolume CreateVms CreateVmTemplate CreateVmGroup CreateVirtualGateway CreateUser CreateTags CreateSubnet CreateSnapshotExportTask CreateSnapshot CreateServerCertificate CreateSecurityGroupRule CreateSecurityGroup CreateRouteTable CreateRoute CreatePublicIp CreateNic CreateNetPeering CreateNetAccessPoint CreateNet CreateNatService CreateLoadBalancerTags CreateLoadBalancerPolicy CreateLoadBalancerListeners CreateLoadBalancer CreateListenerRule CreateKeypair CreateInternetService CreateImageExportTask CreateImage CreateFlexibleGpu CreateDirectLinkInterface CreateDirectLink CreateDhcpOptions CreateClientGateway CreateCa CreateApiAccessRule CreateAccount CreateAccessKey CheckAuthentication AcceptNetPeering" -- ${cur})) + COMPREPLY=($(compgen -W "UpdateVpnConnection UpdateVolume UpdateVmTemplate UpdateVmGroup UpdateVm UpdateUser UpdateSubnet UpdateSnapshot UpdateServerCertificate UpdateRouteTableLink UpdateRoutePropagation UpdateRoute UpdateNic UpdateNetAccessPoint UpdateNet UpdateLoadBalancer UpdateListenerRule UpdateImage UpdateFlexibleGpu UpdateDirectLinkInterface UpdateDedicatedGroup UpdateCa UpdateApiAccessRule UpdateApiAccessPolicy UpdateAccount UpdateAccessKey UnlinkVolume UnlinkVirtualGateway UnlinkRouteTable UnlinkPublicIp UnlinkPrivateIps UnlinkPolicy UnlinkNic UnlinkLoadBalancerBackendMachines UnlinkInternetService UnlinkFlexibleGpu StopVms StartVms SetDefaultPolicyVersion ScaleUpVmGroup ScaleDownVmGroup RejectNetPeering RegisterVmsInLoadBalancer RebootVms ReadVpnConnections ReadVolumes ReadVmsState ReadVmsHealth ReadVms ReadVmTypes ReadVmTemplates ReadVmGroups ReadVirtualGateways ReadUsers ReadTags ReadSubregions ReadSubnets ReadSnapshots ReadSnapshotExportTasks ReadServerCertificates ReadSecurityGroups ReadSecretAccessKey ReadRouteTables ReadRegions ReadQuotas ReadPublicIps ReadPublicIpRanges ReadPublicCatalog ReadProductTypes ReadPolicyVersions ReadPolicyVersion ReadPolicy ReadPolicies ReadNics ReadNets ReadNetPeerings ReadNetAccessPoints ReadNetAccessPointServices ReadNatServices ReadLocations ReadLoadBalancers ReadLoadBalancerTags ReadListenerRules ReadLinkedPolicies ReadKeypairs ReadInternetServices ReadImages ReadImageExportTasks ReadFlexibleGpus ReadFlexibleGpuCatalog ReadDirectLinks ReadDirectLinkInterfaces ReadDhcpOptions ReadDedicatedGroups ReadConsumptionAccount ReadConsoleOutput ReadClientGateways ReadCatalogs ReadCatalog ReadCas ReadApiLogs ReadApiAccessRules ReadApiAccessPolicy ReadAdminPassword ReadAccounts ReadAccessKeys LinkVolume LinkVirtualGateway LinkRouteTable LinkPublicIp LinkPrivateIps LinkPolicy LinkNic LinkLoadBalancerBackendMachines LinkInternetService LinkFlexibleGpu DeregisterVmsInLoadBalancer DeleteVpnConnectionRoute DeleteVpnConnection DeleteVolume DeleteVms DeleteVmTemplate DeleteVmGroup DeleteVirtualGateway DeleteUser DeleteTags DeleteSubnet DeleteSnapshot DeleteServerCertificate DeleteSecurityGroupRule DeleteSecurityGroup DeleteRouteTable DeleteRoute DeletePublicIp DeletePolicyVersion DeletePolicy DeleteNic DeleteNetPeering DeleteNetAccessPoint DeleteNet DeleteNatService DeleteLoadBalancerTags DeleteLoadBalancerPolicy DeleteLoadBalancerListeners DeleteLoadBalancer DeleteListenerRule DeleteKeypair DeleteInternetService DeleteImage DeleteFlexibleGpu DeleteExportTask DeleteDirectLinkInterface DeleteDirectLink DeleteDhcpOptions DeleteDedicatedGroup DeleteClientGateway DeleteCa DeleteApiAccessRule DeleteAccessKey CreateVpnConnectionRoute CreateVpnConnection CreateVolume CreateVms CreateVmTemplate CreateVmGroup CreateVirtualGateway CreateUser CreateTags CreateSubnet CreateSnapshotExportTask CreateSnapshot CreateServerCertificate CreateSecurityGroupRule CreateSecurityGroup CreateRouteTable CreateRoute CreatePublicIp CreateProductType CreatePolicyVersion CreatePolicy CreateNic CreateNetPeering CreateNetAccessPoint CreateNet CreateNatService CreateLoadBalancerTags CreateLoadBalancerPolicy CreateLoadBalancerListeners CreateLoadBalancer CreateListenerRule CreateKeypair CreateInternetService CreateImageExportTask CreateImage CreateFlexibleGpu CreateDirectLinkInterface CreateDirectLink CreateDhcpOptions CreateDedicatedGroup CreateClientGateway CreateCa CreateApiAccessRule CreateAccount CreateAccessKey CheckAuthentication AcceptNetPeering" -- ${cur})) ;; *) PROFILES=$(_mk_profiles) - COMPREPLY=($(compgen -W "$PROFILES --config --login --password --authentication_method --color --insecure --raw-print --verbose --help -h --list-calls --version UpdateVpnConnection UpdateVolume UpdateVmTemplate UpdateVmGroup UpdateVm UpdateUser UpdateSubnet UpdateSnapshot UpdateServerCertificate UpdateRoutePropagation UpdateRoute UpdateNic UpdateNetAccessPoint UpdateNet UpdateLoadBalancer UpdateListenerRule UpdateImage UpdateFlexibleGpu UpdateDirectLinkInterface UpdateCa UpdateApiAccessRule UpdateApiAccessPolicy UpdateAccount UpdateAccessKey UnlinkVolume UnlinkVirtualGateway UnlinkRouteTable UnlinkPublicIp UnlinkPrivateIps UnlinkNic UnlinkLoadBalancerBackendMachines UnlinkInternetService UnlinkFlexibleGpu StopVms StartVms SendResetPasswordEmail ScaleUpVmGroup ScaleDownVmGroup ResetAccountPassword RejectNetPeering RegisterVmsInLoadBalancer RebootVms ReadVpnConnections ReadVolumes ReadVmsState ReadVmsHealth ReadVms ReadVmTypes ReadVmTemplates ReadVmGroups ReadVirtualGateways ReadUsers ReadTags ReadSubregions ReadSubnets ReadSnapshots ReadSnapshotExportTasks ReadServerCertificates ReadSecurityGroups ReadSecretAccessKey ReadRouteTables ReadRegions ReadQuotas ReadPublicIps ReadPublicIpRanges ReadPublicCatalog ReadProductTypes ReadNics ReadNets ReadNetPeerings ReadNetAccessPoints ReadNetAccessPointServices ReadNatServices ReadLocations ReadLoadBalancers ReadLoadBalancerTags ReadListenerRules ReadKeypairs ReadInternetServices ReadImages ReadImageExportTasks ReadFlexibleGpus ReadFlexibleGpuCatalog ReadDirectLinks ReadDirectLinkInterfaces ReadDhcpOptions ReadConsumptionAccount ReadConsoleOutput ReadClientGateways ReadCatalogs ReadCatalog ReadCas ReadApiLogs ReadApiAccessRules ReadApiAccessPolicy ReadAdminPassword ReadAccounts ReadAccessKeys LinkVolume LinkVirtualGateway LinkRouteTable LinkPublicIp LinkPrivateIps LinkNic LinkLoadBalancerBackendMachines LinkInternetService LinkFlexibleGpu DeregisterVmsInLoadBalancer DeleteVpnConnectionRoute DeleteVpnConnection DeleteVolume DeleteVms DeleteVmTemplate DeleteVmGroup DeleteVirtualGateway DeleteUser DeleteTags DeleteSubnet DeleteSnapshot DeleteServerCertificate DeleteSecurityGroupRule DeleteSecurityGroup DeleteRouteTable DeleteRoute DeletePublicIp DeleteNic DeleteNetPeering DeleteNetAccessPoint DeleteNet DeleteNatService DeleteLoadBalancerTags DeleteLoadBalancerPolicy DeleteLoadBalancerListeners DeleteLoadBalancer DeleteListenerRule DeleteKeypair DeleteInternetService DeleteImage DeleteFlexibleGpu DeleteExportTask DeleteDirectLinkInterface DeleteDirectLink DeleteDhcpOptions DeleteClientGateway DeleteCa DeleteApiAccessRule DeleteAccessKey CreateVpnConnectionRoute CreateVpnConnection CreateVolume CreateVms CreateVmTemplate CreateVmGroup CreateVirtualGateway CreateUser CreateTags CreateSubnet CreateSnapshotExportTask CreateSnapshot CreateServerCertificate CreateSecurityGroupRule CreateSecurityGroup CreateRouteTable CreateRoute CreatePublicIp CreateNic CreateNetPeering CreateNetAccessPoint CreateNet CreateNatService CreateLoadBalancerTags CreateLoadBalancerPolicy CreateLoadBalancerListeners CreateLoadBalancer CreateListenerRule CreateKeypair CreateInternetService CreateImageExportTask CreateImage CreateFlexibleGpu CreateDirectLinkInterface CreateDirectLink CreateDhcpOptions CreateClientGateway CreateCa CreateApiAccessRule CreateAccount CreateAccessKey CheckAuthentication AcceptNetPeering" -- ${cur})) + COMPREPLY=($(compgen -W "$PROFILES --config --login --password --authentication_method --color --insecure --raw-print --verbose --help -h --list-calls --version UpdateVpnConnection UpdateVolume UpdateVmTemplate UpdateVmGroup UpdateVm UpdateUser UpdateSubnet UpdateSnapshot UpdateServerCertificate UpdateRouteTableLink UpdateRoutePropagation UpdateRoute UpdateNic UpdateNetAccessPoint UpdateNet UpdateLoadBalancer UpdateListenerRule UpdateImage UpdateFlexibleGpu UpdateDirectLinkInterface UpdateDedicatedGroup UpdateCa UpdateApiAccessRule UpdateApiAccessPolicy UpdateAccount UpdateAccessKey UnlinkVolume UnlinkVirtualGateway UnlinkRouteTable UnlinkPublicIp UnlinkPrivateIps UnlinkPolicy UnlinkNic UnlinkLoadBalancerBackendMachines UnlinkInternetService UnlinkFlexibleGpu StopVms StartVms SetDefaultPolicyVersion ScaleUpVmGroup ScaleDownVmGroup RejectNetPeering RegisterVmsInLoadBalancer RebootVms ReadVpnConnections ReadVolumes ReadVmsState ReadVmsHealth ReadVms ReadVmTypes ReadVmTemplates ReadVmGroups ReadVirtualGateways ReadUsers ReadTags ReadSubregions ReadSubnets ReadSnapshots ReadSnapshotExportTasks ReadServerCertificates ReadSecurityGroups ReadSecretAccessKey ReadRouteTables ReadRegions ReadQuotas ReadPublicIps ReadPublicIpRanges ReadPublicCatalog ReadProductTypes ReadPolicyVersions ReadPolicyVersion ReadPolicy ReadPolicies ReadNics ReadNets ReadNetPeerings ReadNetAccessPoints ReadNetAccessPointServices ReadNatServices ReadLocations ReadLoadBalancers ReadLoadBalancerTags ReadListenerRules ReadLinkedPolicies ReadKeypairs ReadInternetServices ReadImages ReadImageExportTasks ReadFlexibleGpus ReadFlexibleGpuCatalog ReadDirectLinks ReadDirectLinkInterfaces ReadDhcpOptions ReadDedicatedGroups ReadConsumptionAccount ReadConsoleOutput ReadClientGateways ReadCatalogs ReadCatalog ReadCas ReadApiLogs ReadApiAccessRules ReadApiAccessPolicy ReadAdminPassword ReadAccounts ReadAccessKeys LinkVolume LinkVirtualGateway LinkRouteTable LinkPublicIp LinkPrivateIps LinkPolicy LinkNic LinkLoadBalancerBackendMachines LinkInternetService LinkFlexibleGpu DeregisterVmsInLoadBalancer DeleteVpnConnectionRoute DeleteVpnConnection DeleteVolume DeleteVms DeleteVmTemplate DeleteVmGroup DeleteVirtualGateway DeleteUser DeleteTags DeleteSubnet DeleteSnapshot DeleteServerCertificate DeleteSecurityGroupRule DeleteSecurityGroup DeleteRouteTable DeleteRoute DeletePublicIp DeletePolicyVersion DeletePolicy DeleteNic DeleteNetPeering DeleteNetAccessPoint DeleteNet DeleteNatService DeleteLoadBalancerTags DeleteLoadBalancerPolicy DeleteLoadBalancerListeners DeleteLoadBalancer DeleteListenerRule DeleteKeypair DeleteInternetService DeleteImage DeleteFlexibleGpu DeleteExportTask DeleteDirectLinkInterface DeleteDirectLink DeleteDhcpOptions DeleteDedicatedGroup DeleteClientGateway DeleteCa DeleteApiAccessRule DeleteAccessKey CreateVpnConnectionRoute CreateVpnConnection CreateVolume CreateVms CreateVmTemplate CreateVmGroup CreateVirtualGateway CreateUser CreateTags CreateSubnet CreateSnapshotExportTask CreateSnapshot CreateServerCertificate CreateSecurityGroupRule CreateSecurityGroup CreateRouteTable CreateRoute CreatePublicIp CreateProductType CreatePolicyVersion CreatePolicy CreateNic CreateNetPeering CreateNetAccessPoint CreateNet CreateNatService CreateLoadBalancerTags CreateLoadBalancerPolicy CreateLoadBalancerListeners CreateLoadBalancer CreateListenerRule CreateKeypair CreateInternetService CreateImageExportTask CreateImage CreateFlexibleGpu CreateDirectLinkInterface CreateDirectLink CreateDhcpOptions CreateDedicatedGroup CreateClientGateway CreateCa CreateApiAccessRule CreateAccount CreateAccessKey CheckAuthentication AcceptNetPeering" -- ${cur})) ;; esac ;; diff --git a/osc-sdk-C b/osc-sdk-C index d613c2d..0f0fcef 160000 --- a/osc-sdk-C +++ b/osc-sdk-C @@ -1 +1 @@ -Subproject commit d613c2d45d5f2ff6579f98563f0f86bd65b7594d +Subproject commit 0f0fcef1f2e9aa5e074bf23188e7d9e3a0550964 diff --git a/osc_sdk.c b/osc_sdk.c index 65e601d..9fbeb77 100644 --- a/osc_sdk.c +++ b/osc_sdk.c @@ -88,6 +88,7 @@ static const char *calls_name[] = { "UpdateSubnet", "UpdateSnapshot", "UpdateServerCertificate", + "UpdateRouteTableLink", "UpdateRoutePropagation", "UpdateRoute", "UpdateNic", @@ -98,6 +99,7 @@ static const char *calls_name[] = { "UpdateImage", "UpdateFlexibleGpu", "UpdateDirectLinkInterface", + "UpdateDedicatedGroup", "UpdateCa", "UpdateApiAccessRule", "UpdateApiAccessPolicy", @@ -108,16 +110,16 @@ static const char *calls_name[] = { "UnlinkRouteTable", "UnlinkPublicIp", "UnlinkPrivateIps", + "UnlinkPolicy", "UnlinkNic", "UnlinkLoadBalancerBackendMachines", "UnlinkInternetService", "UnlinkFlexibleGpu", "StopVms", "StartVms", - "SendResetPasswordEmail", + "SetDefaultPolicyVersion", "ScaleUpVmGroup", "ScaleDownVmGroup", - "ResetAccountPassword", "RejectNetPeering", "RegisterVmsInLoadBalancer", "RebootVms", @@ -146,6 +148,10 @@ static const char *calls_name[] = { "ReadPublicIpRanges", "ReadPublicCatalog", "ReadProductTypes", + "ReadPolicyVersions", + "ReadPolicyVersion", + "ReadPolicy", + "ReadPolicies", "ReadNics", "ReadNets", "ReadNetPeerings", @@ -156,6 +162,7 @@ static const char *calls_name[] = { "ReadLoadBalancers", "ReadLoadBalancerTags", "ReadListenerRules", + "ReadLinkedPolicies", "ReadKeypairs", "ReadInternetServices", "ReadImages", @@ -165,6 +172,7 @@ static const char *calls_name[] = { "ReadDirectLinks", "ReadDirectLinkInterfaces", "ReadDhcpOptions", + "ReadDedicatedGroups", "ReadConsumptionAccount", "ReadConsoleOutput", "ReadClientGateways", @@ -182,6 +190,7 @@ static const char *calls_name[] = { "LinkRouteTable", "LinkPublicIp", "LinkPrivateIps", + "LinkPolicy", "LinkNic", "LinkLoadBalancerBackendMachines", "LinkInternetService", @@ -204,6 +213,8 @@ static const char *calls_name[] = { "DeleteRouteTable", "DeleteRoute", "DeletePublicIp", + "DeletePolicyVersion", + "DeletePolicy", "DeleteNic", "DeleteNetPeering", "DeleteNetAccessPoint", @@ -222,6 +233,7 @@ static const char *calls_name[] = { "DeleteDirectLinkInterface", "DeleteDirectLink", "DeleteDhcpOptions", + "DeleteDedicatedGroup", "DeleteClientGateway", "DeleteCa", "DeleteApiAccessRule", @@ -244,6 +256,9 @@ static const char *calls_name[] = { "CreateRouteTable", "CreateRoute", "CreatePublicIp", + "CreateProductType", + "CreatePolicyVersion", + "CreatePolicy", "CreateNic", "CreateNetPeering", "CreateNetAccessPoint", @@ -262,6 +277,7 @@ static const char *calls_name[] = { "CreateDirectLinkInterface", "CreateDirectLink", "CreateDhcpOptions", + "CreateDedicatedGroup", "CreateClientGateway", "CreateCa", "CreateApiAccessRule", @@ -290,6 +306,8 @@ static const char *calls_descriptions[] = { "Usage: oapi-cli UpdateSnapshot --SnapshotId=snapshotid --PermissionsToCreateVolume=permissionstocreatevolume [OPTIONS]\n" "Modifies the permissions for a specified snapshot.\nYou must specify either the \n" "`Additions` or the `Removals` parameter.\nAfter sharing a snapshot with an \n" "account, the other account can create a copy of it that they own. For more \n" "information about copying snapshots, see [CreateSnapshot](#createsnapshot).\n" "\nRequired Argument: SnapshotId, PermissionsToCreateVolume \n" , "Usage: oapi-cli UpdateServerCertificate --Name=name [OPTIONS]\n" "Modifies the name and/or the path of a specified server certificate.\n" "\nRequired Argument: Name \n" +, + "Usage: oapi-cli UpdateRouteTableLink --RouteTableId=routetableid --LinkRouteTableId=linkroutetableid [OPTIONS]\n" "Replaces the route table associated with a specific Subnet in a Net with \n" "another one.\nAfter the route table is replaced, the Subnet uses the routes in \n" "the new route table it is associated with.\n" "\nRequired Argument: RouteTableId, LinkRouteTableId \n" , "Usage: oapi-cli UpdateRoutePropagation --Enable=enable --RouteTableId=routetableid --VirtualGatewayId=virtualgatewayid [OPTIONS]\n" "Configures the propagation of routes to a specified route table of a Net by a \n" "virtual gateway.\n" "\nRequired Argument: Enable, RouteTableId, VirtualGatewayId \n" , @@ -310,16 +328,18 @@ static const char *calls_descriptions[] = { "Usage: oapi-cli UpdateFlexibleGpu --FlexibleGpuId=flexiblegpuid [OPTIONS]\n" "Modifies a flexible GPU (fGPU) behavior.\n" "\nRequired Argument: FlexibleGpuId \n" , "Usage: oapi-cli UpdateDirectLinkInterface --DirectLinkInterfaceId=directlinkinterfaceid --Mtu=mtu [OPTIONS]\n" "Modifies the maximum transmission unit (MTU) of a DirectLink interface.\n" "\nRequired Argument: DirectLinkInterfaceId, Mtu \n" +, + "Usage: oapi-cli UpdateDedicatedGroup --DedicatedGroupId=dedicatedgroupid --Name=name [OPTIONS]\n" "> [WARNING]\n> This feature is currently in beta.\n\nModifies the name of a \n" "specified dedicated group.\n" "\nRequired Argument: DedicatedGroupId, Name \n" , "Usage: oapi-cli UpdateCa --CaId=caid [OPTIONS]\n" "Modifies the specified attribute of a Client Certificate Authority (CA).\n" "\nRequired Argument: CaId \n" , - "Usage: oapi-cli UpdateApiAccessRule --ApiAccessRuleId=apiaccessruleid [OPTIONS]\n" "Modifies a specified API access rule.\n\n**[NOTE]** \n- The new rule you \n" "specify fully replaces the old rule. Therefore, for a parameter that is not \n" "specified, any previously set value is deleted.\n- If, as result of your \n" "modification, you no longer have access to the APIs, you will need to contact \n" "the Support team to regain access. For more information, see [Technical \n" "Support](https://docs.outscale.com/en/userguide/Technical-Support.html).\n" "\nRequired Argument: ApiAccessRuleId \n" + "Usage: oapi-cli UpdateApiAccessRule --ApiAccessRuleId=apiaccessruleid [OPTIONS]\n" "Modifies a specified API access rule.\n\n**[WARNING]** \n- The new rule you \n" "specify fully replaces the old rule. Therefore, for a parameter that is not \n" "specified, any previously set value is deleted.\n- If, as result of your \n" "modification, you no longer have access to the APIs, you will need to contact \n" "the Support team to regain access. For more information, see [Technical \n" "Support](https://docs.outscale.com/en/userguide/Technical-Support.html).\n" "\nRequired Argument: ApiAccessRuleId \n" , - "Usage: oapi-cli UpdateApiAccessPolicy --MaxAccessKeyExpirationSeconds=maxaccesskeyexpirationseconds --RequireTrustedEnv=requiretrustedenv [OPTIONS]\n" "Updates the API access policy of your account.\n\n**[NOTE]**\nOnly one API \n" "access policy can be associated with your account.\n" "\nRequired Argument: MaxAccessKeyExpirationSeconds, RequireTrustedEnv \n" + "Usage: oapi-cli UpdateApiAccessPolicy --MaxAccessKeyExpirationSeconds=maxaccesskeyexpirationseconds --RequireTrustedEnv=requiretrustedenv [OPTIONS]\n" "Updates the API access policy of your account.\n\n**[IMPORTANT]**\nOnly one API \n" "access policy can be associated with your account.\n" "\nRequired Argument: MaxAccessKeyExpirationSeconds, RequireTrustedEnv \n" , "Usage: oapi-cli UpdateAccount [OPTIONS]\n" "Updates the account information for the account that sends the request.\n" "\nRequired Argument: \n" , - "Usage: oapi-cli UpdateAccessKey --AccessKeyId=accesskeyid --State=state [OPTIONS]\n" "Modifies the attributes of the specified access key of either your root account \n" "or an EIM user.\n\n**[NOTE]**\nTo protect against brute force attacks, the \n" "number of requests allowed for this method in a given time period is limited.\n" "\nRequired Argument: AccessKeyId, State \n" + "Usage: oapi-cli UpdateAccessKey --AccessKeyId=accesskeyid --State=state [OPTIONS]\n" "Modifies the attributes of the specified access key of either your root account \n" "or an EIM user.\n" "\nRequired Argument: AccessKeyId, State \n" , "Usage: oapi-cli UnlinkVolume --VolumeId=volumeid [OPTIONS]\n" "Detaches a Block Storage Unit (BSU) volume from a virtual machine (VM).\nTo \n" "detach the root device of a VM, this VM must be stopped.\n" "\nRequired Argument: VolumeId \n" , @@ -327,9 +347,11 @@ static const char *calls_descriptions[] = { , "Usage: oapi-cli UnlinkRouteTable --LinkRouteTableId=linkroutetableid [OPTIONS]\n" "Disassociates a Subnet from a route table.\nAfter disassociation, the Subnet \n" "can no longer use the routes in this route table, but uses the routes in the \n" "main route table of the Net instead.\n" "\nRequired Argument: LinkRouteTableId \n" , - "Usage: oapi-cli UnlinkPublicIp [OPTIONS]\n" "Disassociates a public IP from the virtual machine (VM) or network interface \n" "card (NIC) it is associated with.\n\n**[NOTE]**\nTo disassociate the public IP \n" "from a NAT service, you need to delete the NAT service. For more information, \n" "see the [DeleteNatService](#deletenatservice) method.\n" "\nRequired Argument: \n" + "Usage: oapi-cli UnlinkPublicIp [OPTIONS]\n" "Disassociates a public IP from the virtual machine (VM) or network interface \n" "card (NIC) it is associated with.\n\n**[IMPORTANT]**\nTo disassociate the \n" "public IP from a NAT service, you need to delete the NAT service. For more \n" "information, see the [DeleteNatService](#deletenatservice) method.\n" "\nRequired Argument: \n" , "Usage: oapi-cli UnlinkPrivateIps --NicId=nicid --PrivateIps=privateips [OPTIONS]\n" "Unassigns one or more secondary private IPs from a network interface card (NIC).\n" "\nRequired Argument: NicId, PrivateIps \n" +, + "Usage: oapi-cli UnlinkPolicy --PolicyOrn=policyorn --UserName=username [OPTIONS]\n" "Removes a managed policy from a specific user.\n" "\nRequired Argument: PolicyOrn, UserName \n" , "Usage: oapi-cli UnlinkNic --LinkNicId=linknicid [OPTIONS]\n" "Detaches a network interface card (NIC) from a virtual machine (VM).\nThe \n" "primary NIC cannot be detached.\n" "\nRequired Argument: LinkNicId \n" , @@ -343,13 +365,11 @@ static const char *calls_descriptions[] = { , "Usage: oapi-cli StartVms --VmIds=vmids [OPTIONS]\n" "Start one or more virtual machines (VMs).\nYou can start only VMs that are \n" "valid and that belong to you.\n" "\nRequired Argument: VmIds \n" , - "Usage: oapi-cli SendResetPasswordEmail --Email=email [OPTIONS]\n" "Sends an email to the email address provided for the account with a token to \n" "reset your password.\nYou need to provide this token when updating the account \n" "password using the ResetAccountPassword method.\n**[NOTE]**\nTo protect against \n" "brute force attacks, the number of requests allowed for this method in a given \n" "time period is limited.\n" "\nRequired Argument: Email \n" + "Usage: oapi-cli SetDefaultPolicyVersion --PolicyOrn=policyorn --VersionId=versionid [OPTIONS]\n" "Sets a specified version of a managed policy as the default (operative) \n" "one.\nYou can modify the default version of a policy at any time.\n" "\nRequired Argument: PolicyOrn, VersionId \n" , "Usage: oapi-cli ScaleUpVmGroup --VmGroupId=vmgroupid --VmAddition=vmaddition [OPTIONS]\n" "> [WARNING]\n> This feature is currently under development and may not function \n" "properly.\n\nCreates additional virtual machines (VMs) in a VM group.\nThe new \n" "VMs use the current version of the VM template.\n" "\nRequired Argument: VmGroupId, VmAddition \n" , "Usage: oapi-cli ScaleDownVmGroup --VmGroupId=vmgroupid --VmSubtraction=vmsubtraction [OPTIONS]\n" "> [WARNING]\n> This feature is currently under development and may not function \n" "properly.\n\nDeletes virtual machines (VMs) from a VM group.\nThe oldest VMs \n" "are the first to be deleted.\n" "\nRequired Argument: VmGroupId, VmSubtraction \n" -, - "Usage: oapi-cli ResetAccountPassword --Password=password --Token=token [OPTIONS]\n" "Replaces the account password with the new one you provide.\nYou must also \n" "provide the token you received by email when asking for a password reset using \n" "the SendResetPasswordEmail method.\nPassword strength is tested through \n" "heuristic algorithms. For more information, see the [zxcvbn \n" "GitHub](https://github.com/dropbox/zxcvbn).\n**[NOTE]**\nTo protect against \n" "brute force attacks, the number of requests allowed for this method in a given \n" "time period is limited.\n" "\nRequired Argument: Password, Token \n" , "Usage: oapi-cli RejectNetPeering --NetPeeringId=netpeeringid [OPTIONS]\n" "Rejects a Net peering request.\nThe Net peering must be in the \n" "`pending-acceptance` state to be rejected. The rejected Net peering is then in \n" "the `rejected` state.\n" "\nRequired Argument: NetPeeringId \n" , @@ -357,113 +377,125 @@ static const char *calls_descriptions[] = { , "Usage: oapi-cli RebootVms --VmIds=vmids [OPTIONS]\n" "Reboots one or more virtual machines (VMs).\nThis operation sends a reboot \n" "request to one or more specified VMs. This is an asynchronous action that \n" "queues this reboot request. This action only reboots VMs that are valid and \n" "that belong to you.\n" "\nRequired Argument: VmIds \n" , - "Usage: oapi-cli ReadVpnConnections [OPTIONS]\n" "Lists one or more VPN connections.\n\n**[NOTE]**\nIf you exceed the number of \n" "identical requests allowed for a configured time period, the \n" "`RequestLimitExceeded` error message is returned.\n" "\nRequired Argument: \n" + "Usage: oapi-cli ReadVpnConnections [OPTIONS]\n" "Lists one or more VPN connections.\n" "\nRequired Argument: \n" , - "Usage: oapi-cli ReadVolumes [OPTIONS]\n" "Lists one or more specified Block Storage Unit (BSU) volumes.\n\n**[NOTE]**\nIf \n" "you exceed the number of identical requests allowed for a configured time \n" "period, the `RequestLimitExceeded` error message is returned.\n" "\nRequired Argument: \n" + "Usage: oapi-cli ReadVolumes [OPTIONS]\n" "Lists one or more specified Block Storage Unit (BSU) volumes.\n" "\nRequired Argument: \n" , - "Usage: oapi-cli ReadVmsState [OPTIONS]\n" "Lists the status of one or more virtual machines (VMs).\n\n**[NOTE]**\nIf you \n" "exceed the number of identical requests allowed for a configured time period, \n" "the `RequestLimitExceeded` error message is returned.\n" "\nRequired Argument: \n" + "Usage: oapi-cli ReadVmsState [OPTIONS]\n" "Lists the status of one or more virtual machines (VMs).\n" "\nRequired Argument: \n" , - "Usage: oapi-cli ReadVmsHealth --LoadBalancerName=loadbalancername [OPTIONS]\n" "Lists the state of one or more back-end virtual machines (VMs) registered with \n" "a specified load balancer.\n\n**[NOTE]**\nIf you exceed the number of identical \n" "requests allowed for a configured time period, the `Throttling` error message \n" "is returned.\n" "\nRequired Argument: LoadBalancerName \n" + "Usage: oapi-cli ReadVmsHealth --LoadBalancerName=loadbalancername [OPTIONS]\n" "Lists the state of one or more back-end virtual machines (VMs) registered with \n" "a specified load balancer.\n" "\nRequired Argument: LoadBalancerName \n" , - "Usage: oapi-cli ReadVms [OPTIONS]\n" "Lists one or more of your virtual machines (VMs).\nIf you provide one or more \n" "VM IDs, this action returns a description for all of these VMs. If you do not \n" "provide any VM ID, this action returns a description for all of the VMs that \n" "belong to you. If you provide an invalid VM ID, an error is returned. If you \n" "provide the ID of a VM that does not belong to you, the description of this VM \n" "is not included in the response. The refresh interval for data returned by this \n" "action is one hour, meaning that a terminated VM may appear in the \n" "response.\n\n**[NOTE]**\nIf you exceed the number of identical requests allowed \n" "for a configured time period, the `RequestLimitExceeded` error message is \n" "returned.\n" "\nRequired Argument: \n" + "Usage: oapi-cli ReadVms [OPTIONS]\n" "Lists one or more of your virtual machines (VMs).\nIf you provide one or more \n" "VM IDs, this action returns a description for all of these VMs. If you do not \n" "provide any VM ID, this action returns a description for all of the VMs that \n" "belong to you. If you provide an invalid VM ID, an error is returned. If you \n" "provide the ID of a VM that does not belong to you, the description of this VM \n" "is not included in the response. The refresh interval for data returned by this \n" "action is one hour, meaning that a terminated VM may appear in the response.\n" "\nRequired Argument: \n" , - "Usage: oapi-cli ReadVmTypes [OPTIONS]\n" "Lists one or more predefined VM types.\n\n**[NOTE]**\nIf you exceed the number \n" "of identical requests allowed for a configured time period, the \n" "`RequestLimitExceeded` error message is returned.\n" "\nRequired Argument: \n" + "Usage: oapi-cli ReadVmTypes [OPTIONS]\n" "Lists one or more predefined VM types.\n" "\nRequired Argument: \n" , "Usage: oapi-cli ReadVmTemplates [OPTIONS]\n" "> [WARNING]\n> This feature is currently under development and may not function \n" "properly.\n\nLists one or more virtual machine (VM) templates.\n" "\nRequired Argument: \n" , "Usage: oapi-cli ReadVmGroups [OPTIONS]\n" "> [WARNING]\n> This feature is currently under development and may not function \n" "properly.\n\nLists one or more group of virtual machines (VMs).\n" "\nRequired Argument: \n" , - "Usage: oapi-cli ReadVirtualGateways [OPTIONS]\n" "Lists one or more virtual gateways.\n\n**[NOTE]**\nIf you exceed the number of \n" "identical requests allowed for a configured time period, the \n" "`RequestLimitExceeded` error message is returned.\n" "\nRequired Argument: \n" + "Usage: oapi-cli ReadVirtualGateways [OPTIONS]\n" "Lists one or more virtual gateways.\n" "\nRequired Argument: \n" , - "Usage: oapi-cli ReadUsers [OPTIONS]\n" "Lists all EIM users that have a specified path.\n" "\nRequired Argument: \n" + "Usage: oapi-cli ReadUsers [OPTIONS]\n" "Lists all EIM users that have a specified path.\nIf you do not specify a path, \n" "this action returns a list of all users in the account (or an empty list if \n" "there are none).\n" "\nRequired Argument: \n" , - "Usage: oapi-cli ReadTags [OPTIONS]\n" "Lists one or more tags for your resources.\n\n**[NOTE]**\nIf you exceed the \n" "number of identical requests allowed for a configured time period, the \n" "`RequestLimitExceeded` error message is returned.\n" "\nRequired Argument: \n" + "Usage: oapi-cli ReadTags [OPTIONS]\n" "Lists one or more tags for your resources.\n" "\nRequired Argument: \n" , - "Usage: oapi-cli ReadSubregions [OPTIONS]\n" "Lists one or more of the enabled Subregions that you can access in the current \n" "Region.\n\n**[NOTE]**\n- If you exceed the number of identical requests allowed \n" "for a configured time period, the `RequestLimitExceeded` error message is \n" "returned.\n- You can use this command to get information about Subregions only \n" "in a Region for which you have an account. Otherwise, the `AuthFailure` error \n" "message is returned.\n" "\nRequired Argument: \n" + "Usage: oapi-cli ReadSubregions [OPTIONS]\n" "Lists one or more of the enabled Subregions that you can access in the current \n" "Region.\n\nFor more information, see [About Regions, Endpoints, and \n" "Subregions](https://docs.outscale.com/en/userguide/About-Regions-Endpoints-and-S\n" "ubregions.html).\n" "\nRequired Argument: \n" , - "Usage: oapi-cli ReadSubnets [OPTIONS]\n" "Lists one or more of your Subnets.\nIf you do not specify any Subnet ID, this \n" "action describes all of your Subnets.\n\n**[NOTE]**\nIf you exceed the number \n" "of identical requests allowed for a configured time period, the \n" "`RequestLimitExceeded` error message is returned.\n" "\nRequired Argument: \n" + "Usage: oapi-cli ReadSubnets [OPTIONS]\n" "Lists one or more of your Subnets.\nIf you do not specify any Subnet ID, this \n" "action describes all of your Subnets.\n" "\nRequired Argument: \n" , - "Usage: oapi-cli ReadSnapshots [OPTIONS]\n" "Lists one or more snapshots that are available to you and the permissions to \n" "create volumes from them.\n\n**[NOTE]**\nIf you exceed the number of identical \n" "requests allowed for a configured time period, the `RequestLimitExceeded` error \n" "message is returned.\n" "\nRequired Argument: \n" + "Usage: oapi-cli ReadSnapshots [OPTIONS]\n" "Lists one or more snapshots that are available to you and the permissions to \n" "create volumes from them.\n" "\nRequired Argument: \n" , - "Usage: oapi-cli ReadSnapshotExportTasks [OPTIONS]\n" "Lists one or more snapshot export tasks.\n\n**[NOTE]**\nIf you exceed the \n" "number of identical requests allowed for a configured time period, the \n" "`RequestLimitExceeded` error message is returned.\n" "\nRequired Argument: \n" + "Usage: oapi-cli ReadSnapshotExportTasks [OPTIONS]\n" "Lists one or more snapshot export tasks.\n" "\nRequired Argument: \n" , "Usage: oapi-cli ReadServerCertificates [OPTIONS]\n" "Lists your server certificates.\n" "\nRequired Argument: \n" , - "Usage: oapi-cli ReadSecurityGroups [OPTIONS]\n" "Lists one or more security groups.\nYou can specify either the name of the \n" "security groups or their IDs.\n\n**[NOTE]**\nIf you exceed the number of \n" "identical requests allowed for a configured time period, the \n" "`RequestLimitExceeded` error message is returned.\n" "\nRequired Argument: \n" + "Usage: oapi-cli ReadSecurityGroups [OPTIONS]\n" "Lists one or more security groups.\nYou can specify either the name of the \n" "security groups or their IDs.\n" "\nRequired Argument: \n" , "Usage: oapi-cli ReadSecretAccessKey --AccessKeyId=accesskeyid [OPTIONS]\n" "Lists information about the specified access key of your root account, \n" "including its secret key.\n" "\nRequired Argument: AccessKeyId \n" , - "Usage: oapi-cli ReadRouteTables [OPTIONS]\n" "Lists one or more of your route tables.\nIn your Net, each Subnet must be \n" "associated with a route table. If a Subnet is not explicitly associated with a \n" "route table, it is implicitly associated with the main route table of the \n" "Net.\n\n**[NOTE]**\nIf you exceed the number of identical requests allowed for \n" "a configured time period, the `RequestLimitExceeded` error message is returned.\n" "\nRequired Argument: \n" + "Usage: oapi-cli ReadRouteTables [OPTIONS]\n" "Lists one or more of your route tables.\nIn your Net, each Subnet must be \n" "associated with a route table. If a Subnet is not explicitly associated with a \n" "route table, it is implicitly associated with the main route table of the Net.\n" "\nRequired Argument: \n" +, + "Usage: oapi-cli ReadRegions [OPTIONS]\n" "Lists one or more Regions of the OUTSCALE Cloud.\nFor more information, see \n" "[About Regions, Endpoints, and \n" "Subregions](https://docs.outscale.com/en/userguide/About-Regions-Endpoints-and-S\n" "ubregions.html).\n" "\nRequired Argument: \n" +, + "Usage: oapi-cli ReadQuotas [OPTIONS]\n" "Lists one or more of your quotas.\nFor more information, see [About Your \n" "Account](https://docs.outscale.com/en/userguide/About-Your-Account.html).\n" "\nRequired Argument: \n" +, + "Usage: oapi-cli ReadPublicIps [OPTIONS]\n" "Lists one or more public IPs allocated to your account.\nBy default, this \n" "action returns information about all your public IPs: available or associated \n" "with a virtual machine (VM), a network interface card (NIC) or a NAT service.\n" "\nRequired Argument: \n" +, + "Usage: oapi-cli ReadPublicIpRanges [OPTIONS]\n" "Gets the public IPv4 addresses in CIDR notation for the Region specified in the \n" "endpoint of the request. For more information, see [Regions, Endpoints, and \n" "Subregions \n" "Reference](https://docs.outscale.com/en/userguide/Regions-Endpoints-and-Subregio\n" "ns-Reference.html).\n" "\nRequired Argument: \n" , - "Usage: oapi-cli ReadRegions [OPTIONS]\n" "Lists one or more Regions of the OUTSCALE Cloud.\n" "\nRequired Argument: \n" + "Usage: oapi-cli ReadPublicCatalog [OPTIONS]\n" "Returns the price list of OUTSCALE products and services for the Region \n" "specified in the endpoint of the request. For more information, see [Regions, \n" "Endpoints, and Subregions \n" "Reference](https://docs.outscale.com/en/userguide/Regions-Endpoints-and-Subregio\n" "ns-Reference.html).\n" "\nRequired Argument: \n" , - "Usage: oapi-cli ReadQuotas [OPTIONS]\n" "Lists one or more of your quotas.\n\n**[NOTE]**\nIf you exceed the number of \n" "identical requests allowed for a configured time period, the \n" "`RequestLimitExceeded` error message is returned.\n" "\nRequired Argument: \n" + "Usage: oapi-cli ReadProductTypes [OPTIONS]\n" "Lists one or more product types.\n" "\nRequired Argument: \n" , - "Usage: oapi-cli ReadPublicIps [OPTIONS]\n" "Lists one or more public IPs allocated to your account.\nBy default, this \n" "action returns information about all your public IPs: available or associated \n" "with a virtual machine (VM), a network interface card (NIC) or a NAT \n" "service.\n\n**[NOTE]**\nIf you exceed the number of identical requests allowed \n" "for a configured time period, the `RequestLimitExceeded` error message is \n" "returned.\n" "\nRequired Argument: \n" + "Usage: oapi-cli ReadPolicyVersions --PolicyOrn=policyorn [OPTIONS]\n" "Lists information about all the policy versions of a specified managed policy.\n" "\nRequired Argument: PolicyOrn \n" , - "Usage: oapi-cli ReadPublicIpRanges [OPTIONS]\n" "Gets the public IPv4 addresses in CIDR notation for the Region specified in the \n" "endpoint of the request. For more information, see [Regions, Endpoints and \n" "Availability Zones \n" "Reference](https://docs.outscale.com/en/userguide/Regions-Endpoints-and-Availabi\n" "lity-Zones-Reference.html).\n" "\nRequired Argument: \n" + "Usage: oapi-cli ReadPolicyVersion --PolicyOrn=policyorn --VersionId=versionid [OPTIONS]\n" "Lists information about a specified version of a managed policy.\n" "\nRequired Argument: PolicyOrn, VersionId \n" , - "Usage: oapi-cli ReadPublicCatalog [OPTIONS]\n" "Returns the price list of OUTSCALE products and services for the Region \n" "specified in the endpoint of the request. For more information, see [Regions, \n" "Endpoints and Availability Zones \n" "Reference](https://docs.outscale.com/en/userguide/Regions-Endpoints-and-Availabi\n" "lity-Zones-Reference.html).\n" "\nRequired Argument: \n" + "Usage: oapi-cli ReadPolicy --PolicyOrn=policyorn [OPTIONS]\n" "Lists information about a specified managed policy.\n" "\nRequired Argument: PolicyOrn \n" , - "Usage: oapi-cli ReadProductTypes [OPTIONS]\n" "Lists one or more product types.\n\n**[NOTE]**\nIf you exceed the number of \n" "identical requests allowed for a configured time period, the \n" "`RequestLimitExceeded` error message is returned.\n" "\nRequired Argument: \n" + "Usage: oapi-cli ReadPolicies [OPTIONS]\n" "Lists all the managed policies available for your account.\n" "\nRequired Argument: \n" , - "Usage: oapi-cli ReadNics [OPTIONS]\n" "Lists one or more network interface cards (NICs).\nA NIC is a virtual network \n" "interface that you can attach to a virtual machine (VM) in a \n" "Net.\n\n**[NOTE]**\nIf you exceed the number of identical requests allowed for \n" "a configured time period, the `RequestLimitExceeded` error message is returned.\n" "\nRequired Argument: \n" + "Usage: oapi-cli ReadNics [OPTIONS]\n" "Lists one or more network interface cards (NICs).\nA NIC is a virtual network \n" "interface that you can attach to a virtual machine (VM) in a Net.\n" "\nRequired Argument: \n" , - "Usage: oapi-cli ReadNets [OPTIONS]\n" "Lists one or more Nets.\n\n**[NOTE]**\nIf you exceed the number of identical \n" "requests allowed for a configured time period, the `RequestLimitExceeded` error \n" "message is returned.\n" "\nRequired Argument: \n" + "Usage: oapi-cli ReadNets [OPTIONS]\n" "Lists one or more Nets.\n" "\nRequired Argument: \n" , - "Usage: oapi-cli ReadNetPeerings [OPTIONS]\n" "Lists one or more peering connections between two Nets.\n\n**[NOTE]**\nIf you \n" "exceed the number of identical requests allowed for a configured time period, \n" "the `RequestLimitExceeded` error message is returned.\n" "\nRequired Argument: \n" + "Usage: oapi-cli ReadNetPeerings [OPTIONS]\n" "Lists one or more peering connections between two Nets.\n" "\nRequired Argument: \n" , - "Usage: oapi-cli ReadNetAccessPoints [OPTIONS]\n" "Lists one or more Net access points.\n\n**[NOTE]**\nIf you exceed the number of \n" "identical requests allowed for a configured time period, the \n" "`RequestLimitExceeded` error message is returned.\n" "\nRequired Argument: \n" + "Usage: oapi-cli ReadNetAccessPoints [OPTIONS]\n" "Lists one or more Net access points.\n" "\nRequired Argument: \n" , - "Usage: oapi-cli ReadNetAccessPointServices [OPTIONS]\n" "Lists OUTSCALE services available to create Net access points.\nFor more \n" "information, see \n" "[CreateNetAccessPoint](#createnetaccesspoint).\n\n**[NOTE]**\nIf you exceed the \n" "number of identical requests allowed for a configured time period, the \n" "`RequestLimitExceeded` error message is returned.\n" "\nRequired Argument: \n" + "Usage: oapi-cli ReadNetAccessPointServices [OPTIONS]\n" "Lists OUTSCALE services available to create Net access points.\nFor more \n" "information, see [CreateNetAccessPoint](#createnetaccesspoint).\n" "\nRequired Argument: \n" , - "Usage: oapi-cli ReadNatServices [OPTIONS]\n" "Lists one or more network address translation (NAT) services.\n\n**[NOTE]**\nIf \n" "you exceed the number of identical requests allowed for a configured time \n" "period, the `RequestLimitExceeded` error message is returned.\n" "\nRequired Argument: \n" + "Usage: oapi-cli ReadNatServices [OPTIONS]\n" "Lists one or more network address translation (NAT) services.\n" "\nRequired Argument: \n" , - "Usage: oapi-cli ReadLocations [OPTIONS]\n" "Lists the locations, corresponding to datacenters, where you can set up a \n" "DirectLink.\n\n**[NOTE]**\nIf you exceed the number of identical requests \n" "allowed for a configured time period, the `Throttling` error message is \n" "returned.\n" "\nRequired Argument: \n" + "Usage: oapi-cli ReadLocations [OPTIONS]\n" "Lists the locations, corresponding to datacenters, where you can set up a \n" "DirectLink.\nFor more information, see [About \n" "DirectLink](https://docs.outscale.com/en/userguide/About-DirectLink.html).\n" "\nRequired Argument: \n" , - "Usage: oapi-cli ReadLoadBalancers [OPTIONS]\n" "Lists one or more load balancers and their attributes.\n\n**[NOTE]**\nIf you \n" "exceed the number of identical requests allowed for a configured time period, \n" "the `RequestLimitExceeded` error message is returned.\n" "\nRequired Argument: \n" + "Usage: oapi-cli ReadLoadBalancers [OPTIONS]\n" "Lists one or more load balancers and their attributes.\n" "\nRequired Argument: \n" , - "Usage: oapi-cli ReadLoadBalancerTags --LoadBalancerNames=loadbalancernames [OPTIONS]\n" "Lists the tags associated with one or more specified load \n" "balancers.\n\n**[NOTE]**\nIf you exceed the number of identical requests \n" "allowed for a configured time period, the `Throttling` error message is \n" "returned.\n" "\nRequired Argument: LoadBalancerNames \n" + "Usage: oapi-cli ReadLoadBalancerTags --LoadBalancerNames=loadbalancernames [OPTIONS]\n" "Lists the tags associated with one or more specified load balancers.\n" "\nRequired Argument: LoadBalancerNames \n" , "Usage: oapi-cli ReadListenerRules [OPTIONS]\n" "Lists one or more listener rules. By default, this action returns the full list \n" "of listener rules for the account.\n" "\nRequired Argument: \n" , - "Usage: oapi-cli ReadKeypairs [OPTIONS]\n" "Lists one or more of your keypairs.\n\n**[NOTE]**\nIf you exceed the number of \n" "identical requests allowed for a configured time period, the \n" "`RequestLimitExceeded` error message is returned.\n" "\nRequired Argument: \n" + "Usage: oapi-cli ReadLinkedPolicies [OPTIONS]\n" "Lists the managed policies linked to a specified user.\n" "\nRequired Argument: \n" , - "Usage: oapi-cli ReadInternetServices [OPTIONS]\n" "Lists one or more of your Internet services.\nAn Internet service enables your \n" "virtual machines (VMs) launched in a Net to connect to the Internet. By \n" "default, a Net includes an Internet service, and each Subnet is public. Every \n" "VM launched within a default Subnet has a private IP and a public \n" "IP.\n\n**[NOTE]**\nIf you exceed the number of identical requests allowed for a \n" "configured time period, the `RequestLimitExceeded` error message is returned.\n" "\nRequired Argument: \n" + "Usage: oapi-cli ReadKeypairs [OPTIONS]\n" "Lists one or more of your keypairs.\n" "\nRequired Argument: \n" , - "Usage: oapi-cli ReadImages [OPTIONS]\n" "Lists one or more OUTSCALE machine images (OMIs) you can use.\n\n**[NOTE]**\nIf \n" "you exceed the number of identical requests allowed for a configured time \n" "period, the `RequestLimitExceeded` error message is returned.\n" "\nRequired Argument: \n" + "Usage: oapi-cli ReadInternetServices [OPTIONS]\n" "Lists one or more of your Internet services.\nAn Internet service enables your \n" "virtual machines (VMs) launched in a Net to connect to the Internet. By \n" "default, a Net includes an Internet service, and each Subnet is public. Every \n" "VM launched within a default Subnet has a private IP and a public IP.\n" "\nRequired Argument: \n" , - "Usage: oapi-cli ReadImageExportTasks [OPTIONS]\n" "Lists one or more image export tasks.\n\n**[NOTE]**\nIf you exceed the number \n" "of identical requests allowed for a configured time period, the \n" "`RequestLimitExceeded` error message is returned.\n" "\nRequired Argument: \n" + "Usage: oapi-cli ReadImages [OPTIONS]\n" "Lists one or more OUTSCALE machine images (OMIs) you can use.\n" "\nRequired Argument: \n" , - "Usage: oapi-cli ReadFlexibleGpus [OPTIONS]\n" "Lists one or more flexible GPUs (fGPUs) allocated to your \n" "account.\n\n**[NOTE]**\nIf you exceed the number of identical requests allowed \n" "for a configured time period, the `RequestLimitExceeded` error message is \n" "returned.\n" "\nRequired Argument: \n" + "Usage: oapi-cli ReadImageExportTasks [OPTIONS]\n" "Lists one or more image export tasks.\n" "\nRequired Argument: \n" , - "Usage: oapi-cli ReadFlexibleGpuCatalog [OPTIONS]\n" "Lists all flexible GPUs available in the public catalog.\n\n**[NOTE]**\nIf you \n" "exceed the number of identical requests allowed for a configured time period, \n" "the `RequestLimitExceeded` error message is returned.\n" "\nRequired Argument: \n" + "Usage: oapi-cli ReadFlexibleGpus [OPTIONS]\n" "Lists one or more flexible GPUs (fGPUs) allocated to your account.\n" "\nRequired Argument: \n" , - "Usage: oapi-cli ReadDirectLinks [OPTIONS]\n" "Lists all DirectLinks in the Region.\n\n**[NOTE]**\nIf you exceed the number of \n" "identical requests allowed for a configured time period, the `Throttling` error \n" "message is returned.\n" "\nRequired Argument: \n" + "Usage: oapi-cli ReadFlexibleGpuCatalog [OPTIONS]\n" "Lists all flexible GPUs available in the public catalog.\n" "\nRequired Argument: \n" , - "Usage: oapi-cli ReadDirectLinkInterfaces [OPTIONS]\n" "Lists one or more of your DirectLink interfaces.\n\n**[NOTE]**\nIf you exceed \n" "the number of identical requests allowed for a configured time period, the \n" "`Throttling` error message is returned.\n" "\nRequired Argument: \n" + "Usage: oapi-cli ReadDirectLinks [OPTIONS]\n" "Lists all DirectLinks in the Region.\n" "\nRequired Argument: \n" , - "Usage: oapi-cli ReadDhcpOptions [OPTIONS]\n" "Gets information about the content of one or more DHCP options \n" "sets.\n\n**[NOTE]**\nIf you exceed the number of identical requests allowed for \n" "a configured time period, the `RequestLimitExceeded` error message is returned.\n" "\nRequired Argument: \n" + "Usage: oapi-cli ReadDirectLinkInterfaces [OPTIONS]\n" "Lists one or more of your DirectLink interfaces.\n" "\nRequired Argument: \n" , - "Usage: oapi-cli ReadConsumptionAccount --FromDate=fromdate --ToDate=todate [OPTIONS]\n" "Gets information about the consumption of your account for each billable \n" "resource within the specified time period.\n\n**[NOTE]**\nIf you exceed the \n" "number of identical requests allowed for a configured time period, the \n" "`Throttling` error message is returned.\n" "\nRequired Argument: FromDate, ToDate \n" + "Usage: oapi-cli ReadDhcpOptions [OPTIONS]\n" "Gets information about the content of one or more DHCP options sets.\n" "\nRequired Argument: \n" , - "Usage: oapi-cli ReadConsoleOutput --VmId=vmid [OPTIONS]\n" "Gets the console output for a virtual machine (VM). This console provides the \n" "most recent 64 KiB output.\n\n**[NOTE]**\nOn Windows VMs, the console is \n" "handled only on the first boot. It returns no output after the first boot.\n" "\nRequired Argument: VmId \n" + "Usage: oapi-cli ReadDedicatedGroups [OPTIONS]\n" "> [WARNING]\n> This feature is currently in beta.\n\nList one or more dedicated \n" "groups of virtual machines (VMs).\n" "\nRequired Argument: \n" , - "Usage: oapi-cli ReadClientGateways [OPTIONS]\n" "Lists one or more of your client gateways.\n\n**[NOTE]**\nIf you exceed the \n" "number of identical requests allowed for a configured time period, the \n" "`RequestLimitExceeded` error message is returned.\n" "\nRequired Argument: \n" + "Usage: oapi-cli ReadConsumptionAccount --FromDate=fromdate --ToDate=todate [OPTIONS]\n" "Gets information about the consumption of your account for each billable \n" "resource within the specified time period.\n" "\nRequired Argument: FromDate, ToDate \n" , - "Usage: oapi-cli ReadCatalogs [OPTIONS]\n" "Returns the price list of OUTSCALE products and services for the current Region \n" "within a specific time period.\n" "\nRequired Argument: \n" + "Usage: oapi-cli ReadConsoleOutput --VmId=vmid [OPTIONS]\n" "Gets the console output for a virtual machine (VM). This console provides the \n" "most recent 64 KiB output.\n\n**[IMPORTANT]**\nOn Windows VMs, the console is \n" "handled only on the first boot. It returns no output after the first boot.\n" "\nRequired Argument: VmId \n" , - "Usage: oapi-cli ReadCatalog [OPTIONS]\n" "Returns the price list of OUTSCALE products and services for the current Region.\n" "\nRequired Argument: \n" + "Usage: oapi-cli ReadClientGateways [OPTIONS]\n" "Lists one or more of your client gateways.\n" "\nRequired Argument: \n" +, + "Usage: oapi-cli ReadCatalogs [OPTIONS]\n" "Returns the price list of OUTSCALE services for the current Region within a \n" "specific time period.\n" "\nRequired Argument: \n" +, + "Usage: oapi-cli ReadCatalog [OPTIONS]\n" "Returns the price list of OUTSCALE services for the current Region.\n" "\nRequired Argument: \n" , "Usage: oapi-cli ReadCas [OPTIONS]\n" "Gets information about one or more of your Client Certificate Authorities (CAs).\n" "\nRequired Argument: \n" , - "Usage: oapi-cli ReadApiLogs [OPTIONS]\n" "Lists the logs of the API calls you have performed with this account. For more \n" "information, see [About OUTSCALE Monitoring Services \n" "(OMS)](https://docs.outscale.com/en/userguide/About-OUTSCALE-Monitoring-Services\n" "-(OMS).html).\n\n**[NOTE]**\nPast logs are accessible for up to 32 days.\nBy \n" "default, the retrieved interval is 48 hours. If neither of the \n" "`QueryDateBefore` nor `QueryDateAfter` parameters are specified, logs from the \n" "past 48 hours are retrieved. If you only specify one of two, logs are retrieved \n" "from a 2-day interval based on the date you provided. To retrieve logs beyond a \n" "2-day interval, specify both parameters.\n" "\nRequired Argument: \n" + "Usage: oapi-cli ReadApiLogs [OPTIONS]\n" "Lists the logs of the API calls you have performed with this \n" "account.\n\n**[IMPORTANT]**\nPast logs are accessible for up to 32 days.\nBy \n" "default, the retrieved interval is 48 hours. If neither of the \n" "`QueryDateBefore` nor `QueryDateAfter` parameters are specified, logs from the \n" "past 48 hours are retrieved. If you only specify one of two, logs are retrieved \n" "from a 2-day interval based on the date you provided. To retrieve logs beyond a \n" "2-day interval, specify both parameters.\nFor more information, see [About \n" "OUTSCALE Monitoring Services \n" "(OMS)](https://docs.outscale.com/en/userguide/About-OUTSCALE-Monitoring-Services\n" "-OMS.html).\n" "\nRequired Argument: \n" , "Usage: oapi-cli ReadApiAccessRules [OPTIONS]\n" "Lists one or more API access rules.\n" "\nRequired Argument: \n" , - "Usage: oapi-cli ReadApiAccessPolicy [OPTIONS]\n" "Gets information about the API access policy of your account.\n" "\nRequired Argument: \n" + "Usage: oapi-cli ReadApiAccessPolicy [OPTIONS]\n" "Gets information about the API access policy of your account.\nFor more \n" "information, see [About Your API Access \n" "Policy](https://docs.outscale.com/en/userguide/About-Your-API-Access-Policy.html\n" ").\n" "\nRequired Argument: \n" , - "Usage: oapi-cli ReadAdminPassword --VmId=vmid [OPTIONS]\n" "Gets the administrator password for a Windows running virtual machine \n" "(VM).\nThe administrator password is encrypted using the keypair you specified \n" "when launching the VM.\n\n**[NOTE]**\nThe administrator password is generated \n" "only on the first boot of the Windows VM. It is not returned after the first \n" "boot.\n" "\nRequired Argument: VmId \n" + "Usage: oapi-cli ReadAdminPassword --VmId=vmid [OPTIONS]\n" "Gets the administrator password for a Windows running virtual machine \n" "(VM).\nThe administrator password is encrypted using the keypair you specified \n" "when launching the VM.\n\n**[IMPORTANT]**\n* Only RSA keypairs can decrypt the \n" "password of a Windows VM.\n* The administrator password is generated only on \n" "the first boot of the Windows VM. It is not returned after the first boot.\n" "\nRequired Argument: VmId \n" , "Usage: oapi-cli ReadAccounts [OPTIONS]\n" "Gets information about the account that sent the request.\n" "\nRequired Argument: \n" , @@ -471,15 +503,17 @@ static const char *calls_descriptions[] = { , "Usage: oapi-cli LinkVolume --DeviceName=devicename --VmId=vmid --VolumeId=volumeid [OPTIONS]\n" "Attaches a Block Storage Unit (BSU) volume to a virtual machine (VM).\nThe \n" "volume and the VM must be in the same Subregion. The VM can be running or \n" "stopped. The volume is attached to the specified VM device.\n" "\nRequired Argument: DeviceName, VmId, VolumeId \n" , - "Usage: oapi-cli LinkVirtualGateway --NetId=netid --VirtualGatewayId=virtualgatewayid [OPTIONS]\n" "Attaches a virtual gateway to a Net.\n" "\nRequired Argument: NetId, VirtualGatewayId \n" + "Usage: oapi-cli LinkVirtualGateway --NetId=netid --VirtualGatewayId=virtualgatewayid [OPTIONS]\n" "Attaches a virtual gateway to a Net.\n\n**[IMPORTANT]**\nThis action can be \n" "done only if the virtual gateway is in the `available` state.\n" "\nRequired Argument: NetId, VirtualGatewayId \n" , "Usage: oapi-cli LinkRouteTable --RouteTableId=routetableid --SubnetId=subnetid [OPTIONS]\n" "Associates a Subnet with a route table.\nThe Subnet and the route table must be \n" "in the same Net. The traffic is routed according to the route table defined \n" "within this Net. You can associate a route table with several Subnets.\n" "\nRequired Argument: RouteTableId, SubnetId \n" , - "Usage: oapi-cli LinkPublicIp [OPTIONS]\n" "Associates a public IP with a virtual machine (VM) or a network interface card \n" "(NIC), in the public Cloud or in a Net. You can associate a public IP with only \n" "one VM or network interface at a time.\nTo associate a public IP in a Net, \n" "ensure that the Net has an Internet service attached. For more information, see \n" "the [LinkInternetService](#linkinternetservice) method.\nBy default, the public \n" "IP is disassociated every time you stop and start the VM. For a persistent \n" "association, you can add the `osc.fcu.eip.auto-attach` tag to the VM with the \n" "public IP as value. For more information, see the [CreateTags](#createtags) \n" "method.\n\n**[NOTE]**\nYou can associate a public IP with a network address \n" "translation (NAT) service only when creating the NAT service. To modify its \n" "public IP, you need to delete the NAT service and re-create it with the new \n" "public IP. For more information, see the [CreateNatService](#createnatservice) \n" "method.\n" "\nRequired Argument: \n" + "Usage: oapi-cli LinkPublicIp [OPTIONS]\n" "Associates a public IP with a virtual machine (VM) or a network interface card \n" "(NIC), in the public Cloud or in a Net. You can associate a public IP with only \n" "one VM or network interface at a time.\nTo associate a public IP in a Net, \n" "ensure that the Net has an Internet service attached. For more information, see \n" "the [LinkInternetService](#linkinternetservice) method.\nBy default, the public \n" "IP is disassociated every time you stop and start the VM. For a persistent \n" "association, you can add the `osc.fcu.eip.auto-attach` tag to the VM with the \n" "public IP as value. For more information, see the [CreateTags](#createtags) \n" "method.\n\n**[IMPORTANT]**\nYou can associate a public IP with a network \n" "address translation (NAT) service only when creating the NAT service. To modify \n" "its public IP, you need to delete the NAT service and re-create it with the new \n" "public IP. For more information, see the [CreateNatService](#createnatservice) \n" "method.\n" "\nRequired Argument: \n" , "Usage: oapi-cli LinkPrivateIps --NicId=nicid [OPTIONS]\n" "Assigns one or more secondary private IPs to a specified network interface card \n" "(NIC). This action is only available in a Net. The private IPs to be assigned \n" "can be added individually using the `PrivateIps` parameter, or you can specify \n" "the number of private IPs to be automatically chosen within the Subnet range \n" "using the `SecondaryPrivateIpCount` parameter. You can specify only one of \n" "these two parameters. If none of these parameters are specified, a private IP \n" "is chosen within the Subnet range.\n" "\nRequired Argument: NicId \n" , - "Usage: oapi-cli LinkNic --DeviceNumber=devicenumber --VmId=vmid --NicId=nicid [OPTIONS]\n" "Attaches a network interface card (NIC) to a virtual machine (VM).\nThe \n" "interface and the VM must be in the same Subregion. The VM can be either \n" "`running` or `stopped`. The NIC must be in the `available` state. For more \n" "information, see [Attaching an FNI to an \n" "Instance](https://docs.outscale.com/en/userguide/Attaching-an-FNI-to-an-Instance\n" ".html).\n" "\nRequired Argument: DeviceNumber, VmId, NicId \n" + "Usage: oapi-cli LinkPolicy --PolicyOrn=policyorn --UserName=username [OPTIONS]\n" "Links a managed policy to a specific user.\n" "\nRequired Argument: PolicyOrn, UserName \n" +, + "Usage: oapi-cli LinkNic --DeviceNumber=devicenumber --VmId=vmid --NicId=nicid [OPTIONS]\n" "Attaches a network interface card (NIC) to a virtual machine (VM).\nThe \n" "interface and the VM must be in the same Subregion. The VM can be either \n" "`running` or `stopped`. The NIC must be in the `available` state. For more \n" "information, see [Attaching a NIC to a \n" "VM](https://docs.outscale.com/en/userguide/Attaching-a-NIC-to-a-VM.html).\n" "\nRequired Argument: DeviceNumber, VmId, NicId \n" , "Usage: oapi-cli LinkLoadBalancerBackendMachines --LoadBalancerName=loadbalancername [OPTIONS]\n" "Attaches one or more virtual machines (VMs) to a specified load balancer. You \n" "need to specify at least the `BackendIps` or the `BackendVmIds` parameter.\nThe \n" "VMs can be in different Subnets and different Subregions than the load \n" "balancer, as long as the VMs and load balancers are all in the public Cloud or \n" "all in the same Net. It may take a little time for a VM to be registered with \n" "the load balancer. Once the VM is registered with a load balancer, it receives \n" "traffic and requests from this load balancer and is called a back-end VM.\n" "\nRequired Argument: LoadBalancerName \n" , @@ -503,11 +537,11 @@ static const char *calls_descriptions[] = { , "Usage: oapi-cli DeleteVirtualGateway --VirtualGatewayId=virtualgatewayid [OPTIONS]\n" "Deletes a specified virtual gateway.\nBefore deleting a virtual gateway, we \n" "recommend to detach it from the Net and delete the VPN connection.\n" "\nRequired Argument: VirtualGatewayId \n" , - "Usage: oapi-cli DeleteUser --UserName=username [OPTIONS]\n" "Deletes a specified EIM user. The EIM user must not belong to any group and \n" "have any key, signing certificate or attached policy.\n" "\nRequired Argument: UserName \n" + "Usage: oapi-cli DeleteUser --UserName=username [OPTIONS]\n" "Deletes a specified EIM user. The EIM user must not belong to any group, nor \n" "have any key or attached policy.\n" "\nRequired Argument: UserName \n" , "Usage: oapi-cli DeleteTags --ResourceIds=resourceids --Tags=tags [OPTIONS]\n" "Deletes one or more tags from the specified resources.\n" "\nRequired Argument: ResourceIds, Tags \n" , - "Usage: oapi-cli DeleteSubnet --SubnetId=subnetid [OPTIONS]\n" "Deletes a specified Subnet.\nBefore deleting the Subnet, you need to delete all \n" "resources associated with the Subnet:\n\n* Virtual machines (VMs)\n* Network \n" "Interface Cards (NICs)\n* Network Address Translation (NAT) gateways\n* Load \n" "balancers\n" "\nRequired Argument: SubnetId \n" + "Usage: oapi-cli DeleteSubnet --SubnetId=subnetid [OPTIONS]\n" "Deletes a specified Subnet.\nBefore deleting the Subnet, you need to delete all \n" "resources associated with the Subnet:\n\n* Virtual machines (VMs)\n* Network \n" "Interface Cards (NICs)\n* NAT services\n* Load balancers\n" "\nRequired Argument: SubnetId \n" , "Usage: oapi-cli DeleteSnapshot --SnapshotId=snapshotid [OPTIONS]\n" "Deletes a specified snapshot.\nYou cannot delete a snapshot that is currently \n" "used by an OUTSCALE machine image (OMI). To do so, you first need to delete the \n" "corresponding OMI. For more information, see the [DeleteImage](#deleteimage) \n" "method.\n" "\nRequired Argument: SnapshotId \n" , @@ -522,6 +556,10 @@ static const char *calls_descriptions[] = { "Usage: oapi-cli DeleteRoute --RouteTableId=routetableid --DestinationIpRange=destinationiprange [OPTIONS]\n" "Deletes a route from a specified route table.\n" "\nRequired Argument: RouteTableId, DestinationIpRange \n" , "Usage: oapi-cli DeletePublicIp [OPTIONS]\n" "Releases a public IP.\nYou can release a public IP associated with your \n" "account. This address is released in the public IP pool and can be used by \n" "someone else. Before releasing a public IP, ensure you updated all your \n" "resources communicating with this address.\n" "\nRequired Argument: \n" +, + "Usage: oapi-cli DeletePolicyVersion --PolicyOrn=policyorn --VersionId=versionid [OPTIONS]\n" "Deletes a specified version of a managed policy, if it is not set as the \n" "default one.\n" "\nRequired Argument: PolicyOrn, VersionId \n" +, + "Usage: oapi-cli DeletePolicy --PolicyOrn=policyorn [OPTIONS]\n" "Deletes a managed policy.\nBefore deleting a managed policy, you must unlink \n" "all users linked to it and delete all the versions of the policy using the \n" "`DeletePolicyVersion` method.\n" "\nRequired Argument: PolicyOrn \n" , "Usage: oapi-cli DeleteNic --NicId=nicid [OPTIONS]\n" "Deletes the specified network interface card (NIC).\nThe network interface must \n" "not be attached to any virtual machine (VM).\n" "\nRequired Argument: NicId \n" , @@ -557,101 +595,111 @@ static const char *calls_descriptions[] = { , "Usage: oapi-cli DeleteDirectLink --DirectLinkId=directlinkid [OPTIONS]\n" "Deletes a specified DirectLink.\nBefore deleting a DirectLink, ensure that all \n" "your DirectLink interfaces related to this DirectLink are deleted.\n" "\nRequired Argument: DirectLinkId \n" , - "Usage: oapi-cli DeleteDhcpOptions --DhcpOptionsSetId=dhcpoptionssetid [OPTIONS]\n" "Deletes a specified DHCP options set.\nBefore deleting a DHCP options set, you \n" "must disassociate it from the Nets you associated it with. To do so, you need \n" "to associate with each Net a new set of DHCP options, or the `default` one if \n" "you do not want to associate any DHCP options with the Net.\n\n**[NOTE]**\nYou \n" "cannot delete the `default` set.\n" "\nRequired Argument: DhcpOptionsSetId \n" + "Usage: oapi-cli DeleteDhcpOptions --DhcpOptionsSetId=dhcpoptionssetid [OPTIONS]\n" "Deletes a specified DHCP options set.\nBefore deleting a DHCP options set, you \n" "must disassociate it from the Nets you associated it with. To do so, you need \n" "to associate with each Net a new set of DHCP options, or the `default` one if \n" "you do not want to associate any DHCP options with the \n" "Net.\n\n**[IMPORTANT]**\nYou cannot delete the `default` set.\n" "\nRequired Argument: DhcpOptionsSetId \n" +, + "Usage: oapi-cli DeleteDedicatedGroup --DedicatedGroupId=dedicatedgroupid [OPTIONS]\n" "> [WARNING]\n> This feature is currently in beta.\n\nDeletes a specified \n" "dedicated group of virtual machines (VMs).\n\n**[WARNING]**\nA dedicated group \n" "can be deleted only if no VM or Net is in the dedicated group. Otherwise, you \n" "need to force the deletion.\nIf you force the deletion:\n- all VMs are \n" "terminated.\n- all Nets are deleted, and all resources associated with Nets are \n" "detached.\n" "\nRequired Argument: DedicatedGroupId \n" , "Usage: oapi-cli DeleteClientGateway --ClientGatewayId=clientgatewayid [OPTIONS]\n" "Deletes a client gateway.\nYou must delete the VPN connection before deleting \n" "the client gateway.\n" "\nRequired Argument: ClientGatewayId \n" , "Usage: oapi-cli DeleteCa --CaId=caid [OPTIONS]\n" "Deletes a specified Client Certificate Authority (CA).\n" "\nRequired Argument: CaId \n" , - "Usage: oapi-cli DeleteApiAccessRule --ApiAccessRuleId=apiaccessruleid [OPTIONS]\n" "Deletes a specified API access rule.\n\n**[NOTE]** \nYou cannot delete the last \n" "remaining API access rule. However, if you delete all the API access rules that \n" "allow you to access the APIs, you need to contact the Support team to regain \n" "access. For more information, see [Technical \n" "Support](https://docs.outscale.com/en/userguide/Technical-Support.html).\n" "\nRequired Argument: ApiAccessRuleId \n" + "Usage: oapi-cli DeleteApiAccessRule --ApiAccessRuleId=apiaccessruleid [OPTIONS]\n" "Deletes a specified API access rule.\n\n**[IMPORTANT]** \nYou cannot delete the \n" "last remaining API access rule. However, if you delete all the API access rules \n" "that allow you to access the APIs, you need to contact the Support team to \n" "regain access. For more information, see [Technical \n" "Support](https://docs.outscale.com/en/userguide/Technical-Support.html).\n" "\nRequired Argument: ApiAccessRuleId \n" , - "Usage: oapi-cli DeleteAccessKey --AccessKeyId=accesskeyid [OPTIONS]\n" "Deletes the specified access key of either your root account or an EIM \n" "user.\n\n**[NOTE]**\nTo protect against brute force attacks, the number of \n" "requests allowed for this method in a given time period is limited.\n" "\nRequired Argument: AccessKeyId \n" + "Usage: oapi-cli DeleteAccessKey --AccessKeyId=accesskeyid [OPTIONS]\n" "Deletes the specified access key of either your root account or an EIM \n" "user.\nThe access key of an EIM user must be in the `INACTIVE` state to be \n" "deleted.\n" "\nRequired Argument: AccessKeyId \n" , - "Usage: oapi-cli CreateVpnConnectionRoute --DestinationIpRange=destinationiprange --VpnConnectionId=vpnconnectionid [OPTIONS]\n" "Creates a static route to a VPN connection.\nThis enables you to select the \n" "network flows sent by the virtual gateway to the target VPN connection.\n" "\nRequired Argument: DestinationIpRange, VpnConnectionId \n" + "Usage: oapi-cli CreateVpnConnectionRoute --DestinationIpRange=destinationiprange --VpnConnectionId=vpnconnectionid [OPTIONS]\n" "Creates a static route to a VPN connection.\nThis enables you to select the \n" "network flows sent by the virtual gateway to the target VPN connection.\nFor \n" "more information, see [About Routing Configuration for VPN \n" "Connections](https://docs.outscale.com/en/userguide/About-Routing-Configuration-\n" "for-VPN-Connections.html).\n" "\nRequired Argument: DestinationIpRange, VpnConnectionId \n" , - "Usage: oapi-cli CreateVpnConnection --ClientGatewayId=clientgatewayid --ConnectionType=connectiontype --VirtualGatewayId=virtualgatewayid [OPTIONS]\n" "Creates a VPN connection between a specified virtual gateway and a specified \n" "client gateway.\nYou can create only one VPN connection between a virtual \n" "gateway and a client gateway.\n" "\nRequired Argument: ClientGatewayId, ConnectionType, VirtualGatewayId \n" + "Usage: oapi-cli CreateVpnConnection --ClientGatewayId=clientgatewayid --ConnectionType=connectiontype --VirtualGatewayId=virtualgatewayid [OPTIONS]\n" "Creates a VPN connection between a specified virtual gateway and a specified \n" "client gateway.\nYou can create only one VPN connection between a virtual \n" "gateway and a client gateway.\n\n**[IMPORTANT]**\nThis action can be done only \n" "if the virtual gateway is in the `available` state.\nFor more information, see \n" "[About VPN \n" "Connections](https://docs.outscale.com/en/userguide/About-VPN-Connections.html).\n" "\nRequired Argument: ClientGatewayId, ConnectionType, VirtualGatewayId \n" , - "Usage: oapi-cli CreateVolume --SubregionName=subregionname [OPTIONS]\n" "Creates a Block Storage Unit (BSU) volume in a specified Region.\nBSU volumes \n" "can be attached to a virtual machine (VM) in the same Subregion. You can create \n" "an empty volume or restore a volume from an existing snapshot.\nYou can create \n" "the following volume types: Enterprise (`io1`) for provisioned IOPS SSD \n" "volumes, Performance (`gp2`) for general purpose SSD volumes, or Magnetic \n" "(`standard`) volumes.\n" "\nRequired Argument: SubregionName \n" + "Usage: oapi-cli CreateVolume --SubregionName=subregionname [OPTIONS]\n" "Creates a Block Storage Unit (BSU) volume in a specified Region.\nBSU volumes \n" "can be attached to a virtual machine (VM) in the same Subregion. You can create \n" "an empty volume or restore a volume from an existing snapshot.\nYou can create \n" "the following volume types: Enterprise (`io1`) for provisioned IOPS SSD \n" "volumes, Performance (`gp2`) for general purpose SSD volumes, or Magnetic \n" "(`standard`) volumes.\nFor more information, see [About \n" "Volumes](https://docs.outscale.com/en/userguide/About-Volumes.html).\n" "\nRequired Argument: SubregionName \n" , - "Usage: oapi-cli CreateVms --ImageId=imageid [OPTIONS]\n" "Creates virtual machines (VMs), and then launches them.\nThis action enables \n" "you to create a specified number of VMs using an OUTSCALE machine image (OMI) \n" "that you are allowed to use, and then to automatically launch them.\nThe VMs \n" "remain in the `pending` state until they are created and ready to be used. Once \n" "automatically launched, they are in the `running` state.\nTo check the state of \n" "your VMs, call the [ReadVms](#readvms) method.\nIf not specified, the security \n" "group used by the service is the default one.\nThe metadata server enables you \n" "to get the public key provided when the VM is launched. Official OMIs contain a \n" "script to get this public key and put it inside the VM to provide secure access \n" "without password.\n" "\nRequired Argument: ImageId \n" + "Usage: oapi-cli CreateVms --ImageId=imageid [OPTIONS]\n" "Creates virtual machines (VMs), and then launches them.\nThis action enables \n" "you to create a specified number of VMs using an OUTSCALE machine image (OMI) \n" "that you are allowed to use, and then to automatically launch them.\nThe VMs \n" "remain in the `pending` state until they are created and ready to be used. Once \n" "automatically launched, they are in the `running` state.\nTo check the state of \n" "your VMs, call the [ReadVms](#readvms) method.\nIf not specified, the security \n" "group used by the service is the default one.\nThe metadata server enables you \n" "to get the public key provided when the VM is launched. Official OMIs contain a \n" "script to get this public key and put it inside the VM to provide secure access \n" "without password.\nFor more information, see [About \n" "VMs](https://docs.outscale.com/en/userguide/About-VMs.html).\n" "\nRequired Argument: ImageId \n" , "Usage: oapi-cli CreateVmTemplate --CpuCores=cpucores --CpuGeneration=cpugeneration --ImageId=imageid --Ram=ram --VmTemplateName=vmtemplatename [OPTIONS]\n" "> [WARNING]\n> This feature is currently under development and may not function \n" "properly.\n\nCreates a virtual machine (VM) template. You can then use the VM \n" "template to create VM groups.\nYou can create up to 50 VM templates in your \n" "account.\n" "\nRequired Argument: CpuCores, CpuGeneration, ImageId, Ram, VmTemplateName \n" , "Usage: oapi-cli CreateVmGroup --SecurityGroupIds=securitygroupids --SubnetId=subnetid --VmGroupName=vmgroupname --VmTemplateId=vmtemplateid --VmCount=vmcount [OPTIONS]\n" "> [WARNING]\n> This feature is currently under development and may not function \n" "properly.\n\nCreates a group of virtual machines (VMs) containing the same \n" "characteristics as a specified VM template, and then launches them.\nYou can \n" "create up to 100 VM groups in your account.\n" "\nRequired Argument: SecurityGroupIds, SubnetId, VmGroupName, VmTemplateId, VmCount \n" , - "Usage: oapi-cli CreateVirtualGateway --ConnectionType=connectiontype [OPTIONS]\n" "Creates a virtual gateway.\nA virtual gateway is the access point on the Net \n" "side of a VPN connection.\n" "\nRequired Argument: ConnectionType \n" + "Usage: oapi-cli CreateVirtualGateway --ConnectionType=connectiontype [OPTIONS]\n" "Creates a virtual gateway.\nA virtual gateway is the access point on the Net \n" "side of a VPN connection.\nFor more information, see [About Virtual \n" "Gateways](https://docs.outscale.com/en/userguide/About-Virtual-Gateways.html).\n" "\nRequired Argument: ConnectionType \n" +, + "Usage: oapi-cli CreateUser --UserName=username [OPTIONS]\n" "Creates an EIM user for your account.\nFor more information, see [About EIM \n" "Users](https://docs.outscale.com/en/userguide/About-EIM-Users.html).\n" "\nRequired Argument: UserName \n" +, + "Usage: oapi-cli CreateTags --ResourceIds=resourceids --Tags=tags [OPTIONS]\n" "Adds one or more tags to the specified resources.\nIf a tag with the same key \n" "already exists for the resource, the tag value is replaced.\nYou can tag the \n" "following resources using their IDs:\n\n* Virtual machines (VMs) \n" "(i-xxxxxxxx)\n* OMIs (ami-xxxxxxxx)\n* Volumes (vol-xxxxxxxx)\n* Snapshots \n" "(snap-xxxxxxxx)\n* Public IPs (eipalloc-xxxxxxxx)\n* Security groups \n" "(sg-xxxxxxxx)\n* Route tables (rtb-xxxxxxxx)\n* Network interface cards (NIC) \n" "(eni-xxxxxxxx)\n* Nets (vpc-xxxxxxxx)\n* Subnets (subnet-xxxxxxxx)\n* Net \n" "peerings (vpcx-xxxxxxxx)\n* Net endpoints (vpce-xxxxxxxx)\n* NAT services \n" "(nat-xxxxxxxx)\n* Internet services (igw-xxxxxxxx)\n* Client gateways \n" "(cgw-xxxxxxxx)\n* Virtual gateways (vgw-xxxxxxxx)\n* VPN connections \n" "(vpn-xxxxxxxx)\n* DHCP options (dopt-xxxxxxxx)\n* OMI export tasks \n" "(image-export-xxxxxxxx)\n* Snapshot export tasks (snap-export-xxxxxxxx)\n\nFor \n" "more information, see [About \n" "Tags](https://docs.outscale.com/en/userguide/About-Tags.html).\n" "\nRequired Argument: ResourceIds, Tags \n" , - "Usage: oapi-cli CreateUser --UserName=username [OPTIONS]\n" "Creates an EIM user for your account.\n" "\nRequired Argument: UserName \n" + "Usage: oapi-cli CreateSubnet --IpRange=iprange --NetId=netid [OPTIONS]\n" "Creates a Subnet in an existing Net.\nTo create a Subnet in a Net, you have to \n" "provide the ID of the Net and the IP range for the Subnet (its network range). \n" "Once the Subnet is created, you cannot modify its IP range.\nFor more \n" "information, see [About \n" "Nets](https://docs.outscale.com/en/userguide/About-Nets.html).\n" "\nRequired Argument: IpRange, NetId \n" , - "Usage: oapi-cli CreateTags --ResourceIds=resourceids --Tags=tags [OPTIONS]\n" "Adds one or more tags to the specified resources.\nIf a tag with the same key \n" "already exists for the resource, the tag value is replaced.\nYou can tag the \n" "following resources using their IDs:\n\n* Virtual machines (VMs) \n" "(i-xxxxxxxx)\n* OMIs (ami-xxxxxxxx)\n* Volumes (vol-xxxxxxxx)\n* Snapshots \n" "(snap-xxxxxxxx)\n* Public IPs (eipalloc-xxxxxxxx)\n* Security groups \n" "(sg-xxxxxxxx)\n* Route tables (rtb-xxxxxxxx)\n* Network interface cards (NIC) \n" "(eni-xxxxxxxx)\n* Nets (vpc-xxxxxxxx)\n* Subnets (subnet-xxxxxxxx)\n* Net \n" "peerings (vpcx-xxxxxxxx)\n* Net endpoints (vpce-xxxxxxxx)\n* NAT services \n" "(nat-xxxxxxxx)\n* Internet services (igw-xxxxxxxx)\n* Client gateways \n" "(cgw-xxxxxxxx)\n* Virtual gateways (vgw-xxxxxxxx)\n* VPN connections \n" "(vpn-xxxxxxxx)\n* DHCP options (dopt-xxxxxxxx)\n* OMI export tasks \n" "(image-export-xxxxxxxx)\n* Snapshot export tasks (snap-export-xxxxxxxx)\n" "\nRequired Argument: ResourceIds, Tags \n" + "Usage: oapi-cli CreateSnapshotExportTask --OsuExport=osuexport --SnapshotId=snapshotid [OPTIONS]\n" "Exports a snapshot to an OUTSCALE Object Storage (OOS) bucket.\nThis action \n" "enables you to create a backup of your snapshot or to copy it to another \n" "account. You, or other accounts you send a pre-signed URL to, can then download \n" "this snapshot from the bucket using the [CreateSnapshot](#createsnapshot) \n" "method.\nThis procedure enables you to copy a snapshot between accounts within \n" "the same Region or in different Regions. To copy a snapshot within the same \n" "Region, you can also use the [CreateSnapshot](#createsnapshot) direct method. \n" "The copy of the source snapshot is independent and belongs to you.\nFor more \n" "information, see [About \n" "Snapshots](https://docs.outscale.com/en/userguide/About-Snapshots.html).\n" "\nRequired Argument: OsuExport, SnapshotId \n" , - "Usage: oapi-cli CreateSubnet --IpRange=iprange --NetId=netid [OPTIONS]\n" "Creates a Subnet in an existing Net.\nTo create a Subnet in a Net, you have to \n" "provide the ID of the Net and the IP range for the Subnet (its network range). \n" "Once the Subnet is created, you cannot modify its IP range.\n" "\nRequired Argument: IpRange, NetId \n" + "Usage: oapi-cli CreateSnapshot [OPTIONS]\n" "Creates a snapshot. Snapshots are point-in-time images of a volume that you can \n" "use to back up your data or to create replicas of this volume.\nYou can use \n" "this method in three different ways:\n* **Creating from a volume**: You create \n" "a snapshot from one of your volumes.\n* **Copying a snapshot**: You copy an \n" "existing snapshot. The source snapshot can be one of your own snapshots, or a \n" "snapshot owned by another account that has granted you permission via the \n" "[UpdateSnapshot](#updatesnapshot) method.\n* **Importing from a bucket**: You \n" "import a snapshot located in an OUTSCALE Object Storage (OOS) bucket. First, \n" "the owner of the source snapshot must export it to the bucket by using the \n" "[CreateSnapshotExportTask](#createsnapshotexporttask) method. Then, they must \n" "grant you permission to read the snapshot via a pre-signed URL or Access \n" "Control Lists. For more information, see [Managing Access to Your Buckets and \n" "Objects](https://docs.outscale.com/en/userguide/Managing-Access-to-Your-Buckets-\n" "and-Objects.html).\n\nFor more information, see [About \n" "Snapshots](https://docs.outscale.com/en/userguide/About-Snapshots.html).\n" "\nRequired Argument: \n" , - "Usage: oapi-cli CreateSnapshotExportTask --OsuExport=osuexport --SnapshotId=snapshotid [OPTIONS]\n" "Exports a snapshot to an OUTSCALE Object Storage (OOS) bucket.\nThis action \n" "enables you to create a backup of your snapshot or to copy it to another \n" "account. You, or other users you send a pre-signed URL to, can then download \n" "this snapshot from the bucket using the [CreateSnapshot](#createsnapshot) \n" "method.\nThis procedure enables you to copy a snapshot between accounts within \n" "the same Region or in different Regions. To copy a snapshot within the same \n" "Region, you can also use the [CreateSnapshot](#createsnapshot) direct method. \n" "The copy of the source snapshot is independent and belongs to you.\n" "\nRequired Argument: OsuExport, SnapshotId \n" + "Usage: oapi-cli CreateServerCertificate --Body=body --PrivateKey=privatekey --Name=name [OPTIONS]\n" "Creates a server certificate and its matching private key.\nThese elements can \n" "be used with other services (for example, to configure SSL termination on load \n" "balancers).\nYou can also specify the chain of intermediate certification \n" "authorities if your certificate is not directly signed by a root one. You can \n" "specify multiple intermediate certification authorities in the \n" "`CertificateChain` parameter. To do so, concatenate all certificates in the \n" "correct order (the first certificate must be the authority of your certificate, \n" "the second must the the authority of the first one, and so on).\nThe private \n" "key must be a RSA key in PKCS1 form. To check this, open the PEM file and \n" "ensure its header reads as follows: BEGIN RSA PRIVATE KEY.\n[IMPORTANT]\nThis \n" "private key must not be protected by a password or a passphrase.\nFor more \n" "information, see [About Server Certificates in \n" "EIM](https://docs.outscale.com/en/userguide/About-Server-Certificates-in-EIM.htm\n" "l).\n" "\nRequired Argument: Body, PrivateKey, Name \n" , - "Usage: oapi-cli CreateSnapshot [OPTIONS]\n" "Creates a snapshot. Snapshots are point-in-time images of a volume that you can \n" "use to back up your data or to create replicas of this volume.\nYou can use \n" "this method in three different ways:\n* **Creating**: You create a snapshot \n" "from one of your volumes.
\n* **Copying**: You copy an existing \n" "snapshot. The source snapshot can be one of your own snapshots, or a snapshot \n" "owned by another account that has granted you permission via the \n" "[UpdateSnapshot](#updatesnapshot) method.
\n* **Importing**: You import \n" "a snapshot located in an OUTSCALE Object Storage (OOS) bucket. First, the owner \n" "of the source snapshot must export it to the bucket by using the \n" "[CreateSnapshotExportTask](#createsnapshotexporttask) method. Then, they must \n" "grant you read permission on the bucket via a pre-signed URL or Access Control \n" "Lists. For more information, see [Managing Access to Your Buckets and \n" "Objects](https://docs.outscale.com/en/userguide/Managing-Access-to-Your-Buckets-\n" "and-Objects.html).\n" "\nRequired Argument: \n" + "Usage: oapi-cli CreateSecurityGroupRule --SecurityGroupId=securitygroupid --Flow=flow [OPTIONS]\n" "Adds one or more rules to a security group.\nUse the `SecurityGroupId` \n" "parameter to specify the security group for which you want to create a \n" "rule.\nUse the `Flow` parameter to specify if you want an inbound rule or an \n" "outbound rule.\nAn inbound rule allows the security group to receive \n" "traffic:\n* Either from a specific IP range (`IpRange` parameter) on a specific \n" "port range (`FromPortRange` and `ToPortRange` parameters) and specific protocol \n" "(`IpProtocol` parameter).\n* Or from another specific security group \n" "(`SecurityGroupAccountIdToLink` and `SecurityGroupNameToLink` \n" "parameters).\n\n(Net only) An outbound rule works similarly but allows the \n" "security group to send traffic rather than receive traffic.\n\nAlternatively, \n" "you can use the `Rules` parameter to add several rules at the same \n" "time.\n\n**[NOTE]**\n* The modifications are effective as quickly as possible, \n" "but a small delay may occur.\n* By default, traffic between two security groups \n" "is allowed through both public and private IPs. To restrict traffic to private \n" "IPs only, contact our Support team at support@outscale.com.\n\nFor more \n" "information, see [About Security Group \n" "Rules](https://docs.outscale.com/en/userguide/About-Security-Group-Rules.html).\n" "\nRequired Argument: SecurityGroupId, Flow \n" , - "Usage: oapi-cli CreateServerCertificate --Body=body --PrivateKey=privatekey --Name=name [OPTIONS]\n" "Creates a server certificate and its matching private key.\nThese elements can \n" "be used with other services (for example, to configure SSL termination on load \n" "balancers).\nYou can also specify the chain of intermediate certification \n" "authorities if your certificate is not directly signed by a root one. You can \n" "specify multiple intermediate certification authorities in the \n" "`CertificateChain` parameter. To do so, concatenate all certificates in the \n" "correct order (the first certificate must be the authority of your certificate, \n" "the second must the the authority of the first one, and so on).\nThe private \n" "key must be a RSA key in PKCS1 form. To check this, open the PEM file and \n" "ensure its header reads as follows: BEGIN RSA PRIVATE KEY.\n[IMPORTANT]\nThis \n" "private key must not be protected by a password or a passphrase.\n" "\nRequired Argument: Body, PrivateKey, Name \n" + "Usage: oapi-cli CreateSecurityGroup --Description=description --SecurityGroupName=securitygroupname [OPTIONS]\n" "Creates a security group.\nThis action creates a security group either in the \n" "public Cloud or in a specified Net. By default, a default security group for \n" "use in the public Cloud and a default security group for use in a Net are \n" "created.\nWhen launching a virtual machine (VM), if no security group is \n" "explicitly specified, the appropriate default security group is assigned to the \n" "VM. Default security groups include a default rule granting VMs network access \n" "to each other.\nWhen creating a security group, you specify a name. Two \n" "security groups for use in the public Cloud or for use in a Net cannot have the \n" "same name.\nYou can have up to 500 security groups in the public Cloud. You can \n" "create up to 500 security groups per Net.\nTo add or remove rules, use the \n" "[CreateSecurityGroupRule](#createsecuritygrouprule) method.\nFor more \n" "information, see [About Security \n" "Groups](https://docs.outscale.com/en/userguide/About-Security-Groups.html).\n" "\nRequired Argument: Description, SecurityGroupName \n" , - "Usage: oapi-cli CreateSecurityGroupRule --SecurityGroupId=securitygroupid --Flow=flow [OPTIONS]\n" "Adds one or more rules to a security group.\nUse the `SecurityGroupId` \n" "parameter to specify the security group for which you want to create a \n" "rule.\nUse the `Flow` parameter to specify if you want an inbound rule or an \n" "outbound rule.\nAn inbound rule allows the security group to receive \n" "traffic:\n* Either from a specific IP range (`IpRange` parameter) on a specific \n" "port range (`FromPortRange` and `ToPortRange` parameters) and specific protocol \n" "(`IpProtocol` parameter).\n* Or from another specific security group \n" "(`SecurityGroupAccountIdToLink` and `SecurityGroupNameToLink` \n" "parameters).\n\n(Net only) An outbound rule works similarly but allows the \n" "security group to send traffic rather than receive traffic.\n\nAlternatively, \n" "you can use the `Rules` parameter to add several rules at the same \n" "time.\n\n**[NOTE]**\n* The modifications are effective as quickly as possible, \n" "but a small delay may occur.\n* By default, traffic between two security groups \n" "is allowed through both public and private IPs. To restrict traffic to private \n" "IPs only, contact our Support team at support@outscale.com.\n" "\nRequired Argument: SecurityGroupId, Flow \n" + "Usage: oapi-cli CreateRouteTable --NetId=netid [OPTIONS]\n" "Creates a route table for a specified Net.\nYou can then add routes and \n" "associate this route table with a Subnet.\nFor more information, see [About \n" "Route Tables](https://docs.outscale.com/en/userguide/About-Route-Tables.html).\n" "\nRequired Argument: NetId \n" , - "Usage: oapi-cli CreateSecurityGroup --Description=description --SecurityGroupName=securitygroupname [OPTIONS]\n" "Creates a security group.\nThis action creates a security group either in the \n" "public Cloud or in a specified Net. By default, a default security group for \n" "use in the public Cloud and a default security group for use in a Net are \n" "created.\nWhen launching a virtual machine (VM), if no security group is \n" "explicitly specified, the appropriate default security group is assigned to the \n" "VM. Default security groups include a default rule granting VMs network access \n" "to each other.\nWhen creating a security group, you specify a name. Two \n" "security groups for use in the public Cloud or for use in a Net cannot have the \n" "same name.\nYou can have up to 500 security groups in the public Cloud. You can \n" "create up to 500 security groups per Net.\nTo add or remove rules, use the \n" "[CreateSecurityGroupRule](#createsecuritygrouprule) method.\n" "\nRequired Argument: Description, SecurityGroupName \n" + "Usage: oapi-cli CreateRoute --DestinationIpRange=destinationiprange --RouteTableId=routetableid [OPTIONS]\n" "Creates a route in a specified route table within a specified Net.\nYou must \n" "specify one of the following elements as the target:\n\n* Net peering\n* NAT \n" "VM\n* Internet service\n* Virtual gateway\n* NAT service\n* Network interface \n" "card (NIC)\n\nThe routing algorithm is based on the most specific match.\nFor \n" "more information, see [About Route \n" "Tables](https://docs.outscale.com/en/userguide/About-Route-Tables.html).\n" "\nRequired Argument: DestinationIpRange, RouteTableId \n" , - "Usage: oapi-cli CreateRouteTable --NetId=netid [OPTIONS]\n" "Creates a route table for a specified Net.\nYou can then add routes and \n" "associate this route table with a Subnet.\n" "\nRequired Argument: NetId \n" + "Usage: oapi-cli CreatePublicIp [OPTIONS]\n" "Acquires a public IP for your account.\nA public IP is a static IP designed for \n" "dynamic Cloud computing. It can be associated with a virtual machine (VM) in \n" "the public Cloud or in a Net, a network interface card (NIC), a NAT \n" "service.\nFor more information, see [About Public \n" "IPs](https://docs.outscale.com/en/userguide/About-Public-IPs.html).\n" "\nRequired Argument: \n" , - "Usage: oapi-cli CreateRoute --DestinationIpRange=destinationiprange --RouteTableId=routetableid [OPTIONS]\n" "Creates a route in a specified route table within a specified Net.\nYou must \n" "specify one of the following elements as the target:\n\n* Net peering\n* NAT \n" "VM\n* Internet service\n* Virtual gateway\n* NAT service\n* Network interface \n" "card (NIC)\n\nThe routing algorithm is based on the most specific match.\n" "\nRequired Argument: DestinationIpRange, RouteTableId \n" + "Usage: oapi-cli CreateProductType --Description=description [OPTIONS]\n" "Creates a product type you can associate with an OMI for consumption monitoring \n" "and billing purposes.\n" "\nRequired Argument: Description \n" , - "Usage: oapi-cli CreatePublicIp [OPTIONS]\n" "Acquires a public IP for your account.\nA public IP is a static IP designed for \n" "dynamic Cloud computing. It can be associated with a virtual machine (VM) in \n" "the public Cloud or in a Net, a network interface card (NIC), a NAT service.\n" "\nRequired Argument: \n" + "Usage: oapi-cli CreatePolicyVersion --Document=document --PolicyOrn=policyorn [OPTIONS]\n" "Creates a version of a specified managed policy.\nA managed policy can have up \n" "to five versions.\n" "\nRequired Argument: Document, PolicyOrn \n" , - "Usage: oapi-cli CreateNic --SubnetId=subnetid [OPTIONS]\n" "Creates a network interface card (NIC) in the specified Subnet.\n" "\nRequired Argument: SubnetId \n" + "Usage: oapi-cli CreatePolicy --Document=document --PolicyName=policyname [OPTIONS]\n" "Creates a managed policy to apply to a user.\nThis action creates a policy \n" "version and sets v1 as the default one.\n" "\nRequired Argument: Document, PolicyName \n" , - "Usage: oapi-cli CreateNetPeering --AccepterNetId=accepternetid --SourceNetId=sourcenetid [OPTIONS]\n" "Requests a Net peering between a Net you own and a peer Net that belongs to you \n" "or another account.\nThis action creates a Net peering that remains in the \n" "`pending-acceptance` state until it is accepted by the owner of the peer Net. \n" "If the owner of the peer Net does not accept the request within 7 days, the \n" "state of the Net peering becomes `expired`. For more information, see \n" "[AcceptNetPeering](#acceptnetpeering).\n\n**[NOTE]**\n* Peered Nets must \n" "contain at least one virtual machine (VM) each before the creation of the Net \n" "peering.\n* The two Nets must not have overlapping IP ranges. Otherwise, the \n" "Net peering is in the `failed` state.\n* A peering connection between two Nets \n" "works both ways. Therefore, you do not need to create a B-to-A connection if an \n" "A-to-B connection is created and accepted.\n" "\nRequired Argument: AccepterNetId, SourceNetId \n" + "Usage: oapi-cli CreateNic --SubnetId=subnetid [OPTIONS]\n" "Creates a network interface card (NIC) in the specified Subnet.\nFor more \n" "information, see [About \n" "NICs](https://docs.outscale.com/en/userguide/About-NICs.html).\n" "\nRequired Argument: SubnetId \n" , - "Usage: oapi-cli CreateNetAccessPoint --ServiceName=servicename --NetId=netid [OPTIONS]\n" "Creates a Net access point to access an OUTSCALE service from this Net without \n" "using the Internet and public IPs.\nYou specify the service using its name. For \n" "more information about the available services, see \n" "[ReadNetAccessPointServices](#readnetaccesspointservices).\nTo control the \n" "routing of traffic between the Net and the specified service, you can specify \n" "one or more route tables. Virtual machines placed in Subnets associated with \n" "the specified route table thus use the Net access point to access the service. \n" "When you specify a route table, a route is automatically added to it with the \n" "destination set to the prefix list ID of the service, and the target set to the \n" "ID of the access point.\n" "\nRequired Argument: ServiceName, NetId \n" + "Usage: oapi-cli CreateNetPeering --AccepterNetId=accepternetid --SourceNetId=sourcenetid [OPTIONS]\n" "Requests a Net peering between a Net you own and a peer Net that belongs to you \n" "or another account.\nThis action creates a Net peering that remains in the \n" "`pending-acceptance` state until it is accepted by the owner of the peer Net. \n" "If the owner of the peer Net does not accept the request within 7 days, the \n" "state of the Net peering becomes `expired`. For more information, see \n" "[AcceptNetPeering](#acceptnetpeering).\n\n**[IMPORTANT]**\n* Peered Nets must \n" "contain at least one virtual machine (VM) each before the creation of the Net \n" "peering.\n* The two Nets must not have overlapping IP ranges. Otherwise, the \n" "Net peering is in the `failed` state.\n* A peering connection between two Nets \n" "works both ways. Therefore, you do not need to create a B-to-A connection if an \n" "A-to-B connection is created and accepted.\n\nFor more information, see [About \n" "Net Peerings](https://docs.outscale.com/en/userguide/About-Net-Peerings.html).\n" "\nRequired Argument: AccepterNetId, SourceNetId \n" , - "Usage: oapi-cli CreateNet --IpRange=iprange [OPTIONS]\n" "Creates a Net with a specified IP range.\nThe IP range (network range) of your \n" "Net must be between a /28 netmask (16 IPs) and a /16 netmask (65536 IPs).\n" "\nRequired Argument: IpRange \n" + "Usage: oapi-cli CreateNetAccessPoint --ServiceName=servicename --NetId=netid [OPTIONS]\n" "Creates a Net access point to access an OUTSCALE service from this Net without \n" "using the Internet and public IPs.\nYou specify the service using its name. For \n" "more information about the available services, see \n" "[ReadNetAccessPointServices](#readnetaccesspointservices).\nTo control the \n" "routing of traffic between the Net and the specified service, you can specify \n" "one or more route tables. Virtual machines placed in Subnets associated with \n" "the specified route table thus use the Net access point to access the service. \n" "When you specify a route table, a route is automatically added to it with the \n" "destination set to the prefix list ID of the service, and the target set to the \n" "ID of the access point.\nFor more information, see [About Net Access \n" "Points](https://docs.outscale.com/en/userguide/About-Net-Access-Points.html).\n" "\nRequired Argument: ServiceName, NetId \n" , - "Usage: oapi-cli CreateNatService --PublicIpId=publicipid --SubnetId=subnetid [OPTIONS]\n" "Creates a network address translation (NAT) service in the specified public \n" "Subnet of a Net.\nA NAT service enables virtual machines (VMs) placed in the \n" "private Subnet of this Net to connect to the Internet, without being accessible \n" "from the Internet.\nWhen creating a NAT service, you specify the allocation ID \n" "of the public IP you want to use as public IP for the NAT service. Once the NAT \n" "service is created, you need to create a route in the route table of the \n" "private Subnet, with 0.0.0.0/0 as destination and the ID of the NAT service as \n" "target. For more information, see [LinkPublicIP](#linkpublicip) and \n" "[CreateRoute](#createroute).\nThis action also enables you to create multiple \n" "NAT services in the same Net (one per public Subnet).\n\n**[NOTE]**\nYou cannot \n" "modify the public IP associated with a NAT service after its creation. To do \n" "so, you need to delete the NAT service and create a new one with another public \n" "IP.\n" "\nRequired Argument: PublicIpId, SubnetId \n" + "Usage: oapi-cli CreateNet --IpRange=iprange [OPTIONS]\n" "Creates a Net with a specified IP range.\nThe IP range (network range) of your \n" "Net must be between a /28 netmask (16 IPs) and a /16 netmask (65536 IPs).\nFor \n" "more information, see [About \n" "Nets](https://docs.outscale.com/en/userguide/About-Nets.html).\n" "\nRequired Argument: IpRange \n" , - "Usage: oapi-cli CreateLoadBalancerTags --LoadBalancerNames=loadbalancernames --Tags=tags [OPTIONS]\n" "Adds one or more tags to the specified load balancers.\nIf a tag with the same \n" "key already exists for the load balancer, the tag value is replaced.\n" "\nRequired Argument: LoadBalancerNames, Tags \n" + "Usage: oapi-cli CreateNatService --PublicIpId=publicipid --SubnetId=subnetid [OPTIONS]\n" "Creates a network address translation (NAT) service in the specified public \n" "Subnet of a Net.\nA NAT service enables virtual machines (VMs) placed in the \n" "private Subnet of this Net to connect to the Internet, without being accessible \n" "from the Internet.\nWhen creating a NAT service, you specify the allocation ID \n" "of the public IP you want to use as public IP for the NAT service. Once the NAT \n" "service is created, you need to create a route in the route table of the \n" "private Subnet, with 0.0.0.0/0 as destination and the ID of the NAT service as \n" "target. For more information, see [LinkPublicIP](#linkpublicip) and \n" "[CreateRoute](#createroute).\nThis action also enables you to create multiple \n" "NAT services in the same Net (one per public Subnet).\n\n**[IMPORTANT]**\nYou \n" "cannot modify the public IP associated with a NAT service after its creation. \n" "To do so, you need to delete the NAT service and create a new one with another \n" "public IP.\nFor more information, see [About NAT \n" "Services](https://docs.outscale.com/en/userguide/About-NAT-Services.html).\n" "\nRequired Argument: PublicIpId, SubnetId \n" , - "Usage: oapi-cli CreateLoadBalancerPolicy --PolicyType=policytype --LoadBalancerName=loadbalancername --PolicyName=policyname [OPTIONS]\n" "Creates a stickiness policy with sticky session lifetimes defined by the \n" "browser lifetime.\nThe created policy can be used with HTTP or HTTPS listeners \n" "only.\nIf this policy is implemented by a load balancer, this load balancer \n" "uses this cookie in all incoming requests to direct them to the specified \n" "back-end server virtual machine (VM). If this cookie is not present, the load \n" "balancer sends the request to any other server according to its load-balancing \n" "algorithm.\n\nYou can also create a stickiness policy with sticky session \n" "lifetimes following the lifetime of an application-generated cookie.\nUnlike \n" "the other type of stickiness policy, the lifetime of the special Load Balancer \n" "Unit (LBU) cookie follows the lifetime of the application-generated cookie \n" "specified in the policy configuration. The load balancer inserts a new \n" "stickiness cookie only when the application response includes a new application \n" "cookie.\nThe session stops being sticky if the application cookie is removed or \n" "expires, until a new application cookie is issued.\n" "\nRequired Argument: PolicyType, LoadBalancerName, PolicyName \n" + "Usage: oapi-cli CreateLoadBalancerTags --LoadBalancerNames=loadbalancernames --Tags=tags [OPTIONS]\n" "Adds one or more tags to the specified load balancers.\nIf a tag with the same \n" "key already exists for the load balancer, the tag value is replaced.\nFor more \n" "information, see [About \n" "Tags](https://docs.outscale.com/en/userguide/About-Tags.html).\n" "\nRequired Argument: LoadBalancerNames, Tags \n" , - "Usage: oapi-cli CreateLoadBalancerListeners --Listeners=listeners --LoadBalancerName=loadbalancername [OPTIONS]\n" "Creates one or more listeners for a specified load balancer.\n" "\nRequired Argument: Listeners, LoadBalancerName \n" + "Usage: oapi-cli CreateLoadBalancerPolicy --PolicyType=policytype --LoadBalancerName=loadbalancername --PolicyName=policyname [OPTIONS]\n" "Creates a stickiness policy with sticky session lifetimes defined by the \n" "browser lifetime.\nThe created policy can be used with HTTP or HTTPS listeners \n" "only.\nIf this policy is implemented by a load balancer, this load balancer \n" "uses this cookie in all incoming requests to direct them to the specified \n" "back-end server virtual machine (VM). If this cookie is not present, the load \n" "balancer sends the request to any other server according to its load-balancing \n" "algorithm.\n\nYou can also create a stickiness policy with sticky session \n" "lifetimes following the lifetime of an application-generated cookie.\nUnlike \n" "the other type of stickiness policy, the lifetime of the special Load Balancer \n" "Unit (LBU) cookie follows the lifetime of the application-generated cookie \n" "specified in the policy configuration. The load balancer inserts a new \n" "stickiness cookie only when the application response includes a new application \n" "cookie.\nThe session stops being sticky if the application cookie is removed or \n" "expires, until a new application cookie is issued.\nFor more information, see \n" "[About Load \n" "Balancers](https://docs.outscale.com/en/userguide/About-Load-Balancers.html).\n" "\nRequired Argument: PolicyType, LoadBalancerName, PolicyName \n" , - "Usage: oapi-cli CreateLoadBalancer --Listeners=listeners --LoadBalancerName=loadbalancername [OPTIONS]\n" "Creates a load balancer.\nThe load balancer is created with a unique Domain \n" "Name Service (DNS) name. It receives the incoming traffic and routes it to its \n" "registered virtual machines (VMs).\nBy default, this action creates an \n" "Internet-facing load balancer, resolving to public IPs. To create an internal \n" "load balancer in a Net, resolving to private IPs, use the `LoadBalancerType` \n" "parameter.\nYou must specify either the `Subnets` or the `SubregionNames` \n" "parameters.\n" "\nRequired Argument: Listeners, LoadBalancerName \n" + "Usage: oapi-cli CreateLoadBalancerListeners --Listeners=listeners --LoadBalancerName=loadbalancername [OPTIONS]\n" "Creates one or more listeners for a specified load balancer.\nFor more \n" "information, see [About Load \n" "Balancers](https://docs.outscale.com/en/userguide/About-Load-Balancers.html).\n" "\nRequired Argument: Listeners, LoadBalancerName \n" , - "Usage: oapi-cli CreateListenerRule --VmIds=vmids --Listener=listener --ListenerRule=listenerrule [OPTIONS]\n" "Creates a rule for traffic redirection for the specified listener. Each rule \n" "must have either the `HostNamePattern` or `PathPattern` parameter specified. \n" "Rules are treated in priority order, from the highest value to the lowest \n" "value.\nOnce the rule is created, you need to register backend VMs with it. For \n" "more information, see the \n" "[RegisterVmsInLoadBalancer](#registervmsinloadbalancer) method.\n" "\nRequired Argument: VmIds, Listener, ListenerRule \n" + "Usage: oapi-cli CreateLoadBalancer --Listeners=listeners --LoadBalancerName=loadbalancername [OPTIONS]\n" "Creates a load balancer.\nThe load balancer is created with a unique Domain \n" "Name Service (DNS) name. It receives the incoming traffic and routes it to its \n" "registered virtual machines (VMs).\nBy default, this action creates an \n" "Internet-facing load balancer, resolving to public IPs. To create an internal \n" "load balancer in a Net, resolving to private IPs, use the `LoadBalancerType` \n" "parameter.\nYou must specify either the `Subnets` or the `SubregionNames` \n" "parameters.\nFor more information, see [About Load \n" "Balancers](https://docs.outscale.com/en/userguide/About-Load-Balancers.html).\n" "\nRequired Argument: Listeners, LoadBalancerName \n" , - "Usage: oapi-cli CreateKeypair --KeypairName=keypairname [OPTIONS]\n" "Creates a 2048-bit RSA keypair with a specified name.\nThis action returns the \n" "private key that you need to save. The public key is stored by 3DS \n" "OUTSCALE.\n\nYou can also import a public key. The following types of key can \n" "be imported: RSA (minimum 2048 bits, recommended 4096 bits), ECDSA (minimum and \n" "recommended 256 bits), and Ed25519. The following formats can be used: PEM, \n" "PKCS8, RFC4716, and OpenSSH.\nThis action imports the public key of a keypair \n" "created by a third-party tool and uses it to create a keypair. The private key \n" "is never provided to 3DS OUTSCALE.\n" "\nRequired Argument: KeypairName \n" + "Usage: oapi-cli CreateListenerRule --VmIds=vmids --Listener=listener --ListenerRule=listenerrule [OPTIONS]\n" "Creates a rule for traffic redirection for the specified listener. Each rule \n" "must have either the `HostNamePattern` or `PathPattern` parameter specified. \n" "Rules are treated in priority order, from the highest value to the lowest \n" "value.\nOnce the rule is created, you need to register backend VMs with it. For \n" "more information, see the \n" "[RegisterVmsInLoadBalancer](#registervmsinloadbalancer) method.\nFor more \n" "information, see [About Load \n" "Balancers](https://docs.outscale.com/en/userguide/About-Load-Balancers.html).\n" "\nRequired Argument: VmIds, Listener, ListenerRule \n" , - "Usage: oapi-cli CreateInternetService [OPTIONS]\n" "Creates an Internet service you can use with a Net.\nAn Internet service \n" "enables your virtual machines (VMs) launched in a Net to connect to the \n" "Internet. By default, a Net includes an Internet service, and each Subnet is \n" "public. Every VM launched within a default Subnet has a private IP and a public \n" "IP.\n" "\nRequired Argument: \n" + "Usage: oapi-cli CreateKeypair --KeypairName=keypairname [OPTIONS]\n" "Creates a keypair to use with your virtual machines (VMs).\nYou can use this \n" "method in two different ways:\n* **Creating a keypair**: In that case, 3DS \n" "OUTSCALE creates a 2048-bit RSA keypair, stores its public key in your account, \n" "and returns its private key in the response of the call so that you can save it \n" "in a file.\nWhen you save the returned private key, make sure you replace the \n" "`\\n` escape sequences with real line breaks.\n* **Importing a keypair created \n" "locally**: If you already have a keypair that you have created locally with a \n" "third-party tool, you can import its public key in your account. The following \n" "types of key can be imported: RSA (2048 bits or preferably 4096 bits), ECDSA \n" "(256 bits), and Ed25519. The following formats can be used: PEM, PKCS8, \n" "RFC4716, and OpenSSH.\n\nFor more information, see [About \n" "Keypairs](https://docs.outscale.com/en/userguide/About-Keypairs.html).\n" "\nRequired Argument: KeypairName \n" , - "Usage: oapi-cli CreateImageExportTask --OsuExport=osuexport --ImageId=imageid [OPTIONS]\n" "Exports an Outscale machine image (OMI) to an OUTSCALE Object Storage (OOS) \n" "bucket.\nThis action enables you to copy an OMI between accounts in different \n" "Regions. To copy an OMI in the same Region, you can also use the \n" "[CreateImage](#createimage) method.\nThe copy of the OMI belongs to you and is \n" "independent from the source OMI.\n\n**[NOTE]**\nYou cannot export a shared or \n" "public OMI, as they do not belong to you. To do so, you must first copy it to \n" "your account. The copy then belongs to you and you can export it.\n" "\nRequired Argument: OsuExport, ImageId \n" + "Usage: oapi-cli CreateInternetService [OPTIONS]\n" "Creates an Internet service you can use with a Net.\nAn Internet service \n" "enables your virtual machines (VMs) launched in a Net to connect to the \n" "Internet. By default, a Net includes an Internet service, and each Subnet is \n" "public. Every VM launched within a default Subnet has a private IP and a public \n" "IP.\nFor more information, see [About Internet \n" "Services](https://docs.outscale.com/en/userguide/About-Internet-Services.html).\n" "\nRequired Argument: \n" , - "Usage: oapi-cli CreateImage [OPTIONS]\n" "Creates an OUTSCALE machine image (OMI) from an existing virtual machine (VM) \n" "which is either running or stopped.\nThis action also creates a snapshot of the \n" "root volume of the VM, as well as a snapshot of each Block Storage Unit (BSU) \n" "volume attached to the VM. For more information, see [About \n" "OMIs](https://docs.outscale.com/en/userguide/About-OMIs.html).\n\nYou can also \n" "use this method to copy an OMI to your account, from an account in the same \n" "Region. To do so, the owner of the source OMI must share it with your account. \n" "For more information about how to share an OMI with another account in the same \n" "Region, see [UpdateImage](#updateimage).\nTo copy an OMI between accounts in \n" "different Regions, the owner of the source OMI must first export it to an \n" "OUTSCALE Object Storage (OOS) bucket using the \n" "[CreateImageExportTask](#createimageexporttask) method, and then you need to \n" "create a copy of the image in your account.\nThe copy of the source OMI is \n" "independent and belongs to you.\n\nYou can also use this method to register an \n" "OMI to finalize its creation process.\nYou can register an OMI from a snapshot \n" "of a root device to create an OMI based on this snapshot. You can also register \n" "an OMI that has been exported to an S3-compatible bucket to create a copy of it \n" "in your account. For more information about OMI export to an OOS bucket, see \n" "[CreateImageExportTask](#createimageexporttask).\nYou can register an OMI using \n" "a pre-signed URL of the manifest file of the OMI. You do not need any \n" "permission for this OMI, or the bucket in which it is contained. The manifest \n" "file is obsolete seven days after a completed export as it contains pre-signed \n" "URLs to the appropriate snapshots (pre-signed URLs are valid for only seven \n" "days).\nOnce the OMI is registered, you can launch a VM from this OMI. The copy \n" "of the source OMI is independent and belongs to you.\n" "\nRequired Argument: \n" + "Usage: oapi-cli CreateImageExportTask --OsuExport=osuexport --ImageId=imageid [OPTIONS]\n" "Exports an Outscale machine image (OMI) to an OUTSCALE Object Storage (OOS) \n" "bucket.\nThis action enables you to copy an OMI between accounts in different \n" "Regions. To copy an OMI in the same Region, you can also use the \n" "[CreateImage](#createimage) method.\nThe copy of the OMI belongs to you and is \n" "independent from the source OMI.\n\n**[IMPORTANT]**\nYou cannot export a shared \n" "or public OMI, as they do not belong to you. To do so, you must first copy it \n" "to your account. The copy then belongs to you and you can export it.\nFor more \n" "information, see [About \n" "OMIs](https://docs.outscale.com/en/userguide/About-OMIs.html).\n" "\nRequired Argument: OsuExport, ImageId \n" , - "Usage: oapi-cli CreateFlexibleGpu --ModelName=modelname --SubregionName=subregionname [OPTIONS]\n" "Allocates a flexible GPU (fGPU) to your account.\nYou can then attach this fGPU \n" "to a virtual machine (VM).\n" "\nRequired Argument: ModelName, SubregionName \n" + "Usage: oapi-cli CreateImage [OPTIONS]\n" "Creates an OUTSCALE machine image (OMI).\nYou can use this method in different \n" "ways:\n* **Creating from a VM**: You create an OMI from one of your virtual \n" "machines (VMs).
\n* **Copying an OMI**: You copy an existing OMI. The source \n" "OMI can be one of your own OMIs, or an OMI owned by another account that has \n" "granted you permission via the [UpdateImage](#updateimage) method.
\n* \n" "**Registering from a snapshot**: You register an OMI from an existing snapshot. \n" "The source snapshot can be one of your own snapshots, or a snapshot owned by \n" "another account that has granted you permission via the \n" "[UpdateSnapshot](#updatesnapshot) method.
\n* **Registering from a bucket by \n" "using a manifest file**: You register an OMI from the manifest file of an OMI \n" "that was exported to an OUTSCALE Object Storage (OOS) bucket. First, the owner \n" "of the source OMI must export it to the bucket by using the \n" "[CreateImageExportTask](#createimageexporttask) method. Then, they must grant \n" "you permission to read the manifest file via a pre-signed URL or Access Control \n" "Lists. For more information, see [Managing Access to Your Buckets and \n" "Objects](https://docs.outscale.com/en/userguide/Managing-Access-to-Your-Buckets-\n" "and-Objects.html).\n* **Registering from a bucket without using a manifest \n" "file**: This is similar to the previous case but you manually specify all the \n" "information that would be in a manifest file instead of using a manifest \n" "file.\n\n**[TIP]**\nRegistering from a bucket enables you to copy an OMI across \n" "Regions.\n\nFor more information, see [About \n" "OMIs](https://docs.outscale.com/en/userguide/About-OMIs.html).\n" "\nRequired Argument: \n" , - "Usage: oapi-cli CreateDirectLinkInterface --DirectLinkId=directlinkid --DirectLinkInterface=directlinkinterface [OPTIONS]\n" "Creates a DirectLink interface.\nDirectLink interfaces enable you to reach one \n" "of your Nets through a virtual gateway.\n" "\nRequired Argument: DirectLinkId, DirectLinkInterface \n" + "Usage: oapi-cli CreateFlexibleGpu --ModelName=modelname --SubregionName=subregionname [OPTIONS]\n" "Allocates a flexible GPU (fGPU) to your account.\nYou can then attach this fGPU \n" "to a virtual machine (VM).\nFor more information, see [About Flexible \n" "GPUs](https://docs.outscale.com/en/userguide/About-Flexible-GPUs.html).\n" "\nRequired Argument: ModelName, SubregionName \n" , - "Usage: oapi-cli CreateDirectLink --Bandwidth=bandwidth --DirectLinkName=directlinkname --Location=location [OPTIONS]\n" "Creates a DirectLink between a customer network and a specified DirectLink \n" "location.\n" "\nRequired Argument: Bandwidth, DirectLinkName, Location \n" + "Usage: oapi-cli CreateDirectLinkInterface --DirectLinkId=directlinkid --DirectLinkInterface=directlinkinterface [OPTIONS]\n" "Creates a DirectLink interface.\nDirectLink interfaces enable you to reach one \n" "of your Nets through a virtual gateway.\nFor more information, see [About \n" "DirectLink](https://docs.outscale.com/en/userguide/About-DirectLink.html).\n" "\nRequired Argument: DirectLinkId, DirectLinkInterface \n" , - "Usage: oapi-cli CreateDhcpOptions [OPTIONS]\n" "Creates a set of DHCP options, that you can then associate with a Net using the \n" "[UpdateNet](#updatenet) method.\n" "\nRequired Argument: \n" + "Usage: oapi-cli CreateDirectLink --Bandwidth=bandwidth --DirectLinkName=directlinkname --Location=location [OPTIONS]\n" "Creates a DirectLink between a customer network and a specified DirectLink \n" "location.\nFor more information, see [About \n" "DirectLink](https://docs.outscale.com/en/userguide/About-DirectLink.html).\n" "\nRequired Argument: Bandwidth, DirectLinkName, Location \n" , - "Usage: oapi-cli CreateClientGateway --BgpAsn=bgpasn --PublicIp=publicip --ConnectionType=connectiontype [OPTIONS]\n" "Provides information about your client gateway.\nThis action registers \n" "information to identify the client gateway that you deployed in your \n" "network.\nTo open a tunnel to the client gateway, you must provide the \n" "communication protocol type, the fixed public IP of the gateway, and an \n" "Autonomous System Number (ASN).\n" "\nRequired Argument: BgpAsn, PublicIp, ConnectionType \n" + "Usage: oapi-cli CreateDhcpOptions [OPTIONS]\n" "Creates a set of DHCP options, that you can then associate with a Net using the \n" "[UpdateNet](#updatenet) method.\nFor more information, see [About DHCP \n" "Options](https://docs.outscale.com/en/userguide/About-DHCP-Options.html).\n" "\nRequired Argument: \n" , - "Usage: oapi-cli CreateCa --CaPem=capem [OPTIONS]\n" "Creates a Client Certificate Authority (CA).\n" "\nRequired Argument: CaPem \n" + "Usage: oapi-cli CreateDedicatedGroup --CpuGeneration=cpugeneration --Name=name --SubregionName=subregionname [OPTIONS]\n" "> [WARNING]\n> This feature is currently in beta.\n\nCreates a dedicated group \n" "for virtual machines (VMs).\nFor more information, see [About Dedicated \n" "Groups](https://docs.outscale.com/en/userguide/About-Dedicated-Groups.html).\n" "\nRequired Argument: CpuGeneration, Name, SubregionName \n" , - "Usage: oapi-cli CreateApiAccessRule [OPTIONS]\n" "Creates a rule to allow access to the API from your account.\nYou need to \n" "specify at least the `CaIds` or the `IpRanges` parameter.\n\n**[NOTE]**\nBy \n" "default, your account has a set of rules allowing global access that you can \n" "delete. For more information, see [About API Access \n" "Rules](https://docs.outscale.com/en/userguide/About-API-Access-Rules.html).\n" "\nRequired Argument: \n" + "Usage: oapi-cli CreateClientGateway --BgpAsn=bgpasn --PublicIp=publicip --ConnectionType=connectiontype [OPTIONS]\n" "Provides information about your client gateway.\nThis action registers \n" "information to identify the client gateway that you deployed in your \n" "network.\nTo open a tunnel to the client gateway, you must provide the \n" "communication protocol type, the fixed public IP of the gateway, and an \n" "Autonomous System Number (ASN).\nFor more information, see [About Client \n" "Gateways](https://docs.outscale.com/en/userguide/About-Client-Gateways.html).\n" "\nRequired Argument: BgpAsn, PublicIp, ConnectionType \n" , - "Usage: oapi-cli CreateAccount --City=city --CompanyName=companyname --Country=country --CustomerId=customerid --Email=email --FirstName=firstname --LastName=lastname --ZipCode=zipcode [OPTIONS]\n" "Creates an OUTSCALE account.\n\n**[NOTE]**\n* You need OUTSCALE credentials and \n" "the appropriate quotas to create an account via API. To get quotas, you can \n" "send an email to sales@outscale.com.\n* If you want to pass a numeral value as \n" "a string instead of an integer, you must wrap your string in additional quotes \n" "(for example, `'"92000"'`).\n" "\nRequired Argument: City, CompanyName, Country, CustomerId, Email, FirstName, LastName, ZipCode \n" + "Usage: oapi-cli CreateCa --CaPem=capem [OPTIONS]\n" "Creates a Client Certificate Authority (CA).\nFor more information, see [About \n" "API Access \n" "Rules](https://docs.outscale.com/en/userguide/About-API-Access-Rules.html).\n" "\nRequired Argument: CaPem \n" , - "Usage: oapi-cli CreateAccessKey [OPTIONS]\n" "Creates an access key for either your root account or an EIM user. The new key \n" "is automatically set to `ACTIVE`.\n" "\nRequired Argument: \n" + "Usage: oapi-cli CreateApiAccessRule [OPTIONS]\n" "Creates a rule to allow access to the API from your account.\nYou need to \n" "specify at least the `CaIds` or the `IpRanges` parameter.\n\n**[NOTE]**\nBy \n" "default, your account has a set of rules allowing global access, that you can \n" "delete.\nFor more information, see [About API Access \n" "Rules](https://docs.outscale.com/en/userguide/About-API-Access-Rules.html).\n" "\nRequired Argument: \n" +, + "Usage: oapi-cli CreateAccount --City=city --CompanyName=companyname --Country=country --CustomerId=customerid --Email=email --FirstName=firstname --LastName=lastname --ZipCode=zipcode [OPTIONS]\n" "Creates an OUTSCALE account.\n\n**[IMPORTANT]**\n* You need OUTSCALE \n" "credentials and the appropriate quotas to create an account via API. To get \n" "quotas, you can send an email to sales@outscale.com.\n* If you want to pass a \n" "numeral value as a string instead of an integer, you must wrap your string in \n" "additional quotes (for example, `'"92000"'`).\n\nFor more \n" "information, see [About Your \n" "Account](https://docs.outscale.com/en/userguide/About-Your-Account.html).\n" "\nRequired Argument: City, CompanyName, Country, CustomerId, Email, FirstName, LastName, ZipCode \n" +, + "Usage: oapi-cli CreateAccessKey [OPTIONS]\n" "Creates an access key for either your root account or an EIM user. The new key \n" "is automatically set to `ACTIVE`.\nFor more information, see [About Access \n" "Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html).\n" "\nRequired Argument: \n" , "Usage: oapi-cli CheckAuthentication --Login=login --Password=password [OPTIONS]\n" "Validates the authenticity of the account.\n" "\nRequired Argument: Login, Password \n" , - "Usage: oapi-cli AcceptNetPeering --NetPeeringId=netpeeringid [OPTIONS]\n" "Accepts a Net peering request.\nTo accept this request, you must be the owner \n" "of the peer Net. If you do not accept the request within 7 days, the state of \n" "the Net peering becomes `expired`.\n**[NOTE]**\nA peering connection between \n" "two Nets works both ways. Therefore, when an A-to-B peering connection is \n" "accepted, any pending B-to-A peering connection is automatically rejected as \n" "redundant.\n" "\nRequired Argument: NetPeeringId \n" + "Usage: oapi-cli AcceptNetPeering --NetPeeringId=netpeeringid [OPTIONS]\n" "Accepts a Net peering request.\nTo accept this request, you must be the owner \n" "of the peer Net. If you do not accept the request within 7 days, the state of \n" "the Net peering becomes `expired`.\n\n**[NOTE]**\nA peering connection between \n" "two Nets works both ways. Therefore, when an A-to-B peering connection is \n" "accepted, any pending B-to-A peering connection is automatically rejected as \n" "redundant.\n" "\nRequired Argument: NetPeeringId \n" , NULL }; @@ -666,53 +714,11 @@ static const char *calls_args_descriptions[] = { " The ID of the virtual gateway.\n" "VpnConnectionId: string\n" " The ID of the VPN connection you want to modify.\n" -"VpnOptions: ref VpnOptions\n" +"VpnOptions: ref VpnOptionsToUpdate\n" " Information about the VPN options.\n" - " -Phase1Options: ref Phase1Options\n" - " Information about Phase 1 of the Internet Key Exchange (IKE) \n" - " negotiation. When Phase 1 finishes successfully, peers proceed \n" - " to Phase 2 negotiations. \n" - " -DpdTimeoutAction: string\n" - " The action to carry out after a Dead Peer Detection (DPD) \n" - " timeout occurs.\n" - " -DpdTimeoutSeconds: int\n" - " The maximum waiting time for a Dead Peer Detection (DPD) \n" - " response before considering the peer as dead, in seconds.\n" - " -IkeVersions: array string\n" - " The Internet Key Exchange (IKE) versions allowed for the VPN \n" - " tunnel.\n" - " -Phase1DhGroupNumbers: array integer\n" - " The Diffie-Hellman (DH) group numbers allowed for the VPN \n" - " tunnel for phase 1.\n" - " -Phase1EncryptionAlgorithms: array string\n" - " The encryption algorithms allowed for the VPN tunnel for phase \n" - " 1.\n" - " -Phase1IntegrityAlgorithms: array string\n" - " The integrity algorithms allowed for the VPN tunnel for phase \n" - " 1.\n" - " -Phase1LifetimeSeconds: int\n" - " The lifetime for phase 1 of the IKE negotiation process, in \n" - " seconds.\n" - " -ReplayWindowSize: int\n" - " The number of packets in an IKE replay window.\n" - " -StartupAction: string\n" - " The action to carry out when establishing tunnels for a VPN \n" - " connection.\n" - " -Phase2Options: ref Phase2Options\n" + " -Phase2Options: ref Phase2OptionsToUpdate\n" " Information about Phase 2 of the Internet Key Exchange (IKE) \n" " negotiation. \n" - " -Phase2DhGroupNumbers: array integer\n" - " The Diffie-Hellman (DH) group numbers allowed for the VPN \n" - " tunnel for phase 2.\n" - " -Phase2EncryptionAlgorithms: array string\n" - " The encryption algorithms allowed for the VPN tunnel for phase \n" - " 2.\n" - " -Phase2IntegrityAlgorithms: array string\n" - " The integrity algorithms allowed for the VPN tunnel for phase \n" - " 2.\n" - " -Phase2LifetimeSeconds: int\n" - " The lifetime for phase 2 of the Internet Key Exchange (IKE) \n" - " negociation process, in seconds.\n" " -PreSharedKey: string\n" " The pre-shared key to establish the initial authentication \n" " between the client gateway and the virtual gateway. This key \n" @@ -726,21 +732,26 @@ static const char *calls_args_descriptions[] = { " If true, checks whether you have the required permissions to perform \n" " the action.\n" "Iops: int\n" - " The new number of I/O operations per second (IOPS). This parameter can \n" - " be specified only if you update an `io1` volume. The maximum number of \n" - " IOPS allowed for `io1` volumes is `13000` with a maximum performance \n" - " ratio of 300 IOPS per gibibyte. This modification is instantaneous on a \n" - " cold volume, not on a hot one.\n" + " **Cold volume**: the new number of I/O operations per second (IOPS). \n" + " This parameter can be specified only if you update an `io1` volume or \n" + " if you change the type of the volume for an `io1`. This modification is \n" + " instantaneous. \n**Hot volume**: the new number of I/O operations per \n" + " second (IOPS). This parameter can be specified only if you update an \n" + " `io1` volume. This modification is not instantaneous. \nThe maximum \n" + " number of IOPS allowed for `io1` volumes is `13000` with a maximum \n" + " performance ratio of 300 IOPS per gibibyte.\n" "Size: int\n" - " (cold volume only) The new size of the volume, in gibibytes (GiB). This \n" + " **Cold volume**: the new size of the volume, in gibibytes (GiB). This \n" " value must be equal to or greater than the current size of the volume. \n" - " This modification is not instantaneous.\n" + " This modification is not instantaneous. \n**Hot volume**: you cannot \n" + " change the size of a hot volume.\n" "VolumeId: string\n" " The ID of the volume you want to update.\n" "VolumeType: string\n" - " (cold volume only) The new type of the volume (`standard` \\| `io1` \\| \n" + " **Cold volume**: the new type of the volume (`standard` \\| `io1` \\| \n" " `gp2`). This modification is instantaneous. If you update to an `io1` \n" - " volume, you must also specify the `Iops` parameter.\n" + " volume, you must also specify the `Iops` parameter.\n**Hot volume**: \n" + " you cannot change the type of a hot volume.\n" , "Description: string\n" " A new description for the VM template.\n" @@ -820,9 +831,9 @@ static const char *calls_args_descriptions[] = { " not effective in the operating system of the VM. To complete the \n" " replacement and effectively apply the new keypair, you need to perform \n" " other actions inside the VM. For more information, see [Modifying the \n" - " Keypair of an \n" - " Instance](https://docs.outscale.com/en/userguide/Modifying-the-Keypair-o\n" - " f-an-Instance.html).\n" + " Keypair of a \n" + " VM](https://docs.outscale.com/en/userguide/Modifying-the-Keypair-of-a-VM\n" + " .html).\n" "NestedVirtualization: bool\n" " (dedicated tenancy only) If true, nested virtualization is enabled. If \n" " false, it is disabled.\n" @@ -839,8 +850,8 @@ static const char *calls_args_descriptions[] = { " set to `restart`, the VM stops then automatically restarts. If set to \n" " `terminate`, the VM stops and is terminated.\n" "VmType: string\n" - " The type of VM. For more information, see [Instance \n" - " Types](https://docs.outscale.com/en/userguide/Instance-Types.html).\n" + " The type of VM. For more information, see [VM \n" + " Types](https://docs.outscale.com/en/userguide/VM-Types.html).\n" , "DryRun: bool\n" " If true, checks whether you have the required permissions to perform \n" @@ -907,6 +918,14 @@ static const char *calls_args_descriptions[] = { "DryRun: bool\n" " If true, checks whether you have the required permissions to perform \n" " the action.\n" +"LinkRouteTableId: string\n" + " The ID of the current route table link.\n" +"RouteTableId: string\n" + " The ID of the new route table to associate with the Subnet.\n" +, + "DryRun: bool\n" + " If true, checks whether you have the required permissions to perform \n" + " the action.\n" "Enable: bool\n" " If true, a virtual gateway can propagate routes to a specified route \n" " table of a Net. If false, the propagation is disabled.\n" @@ -996,13 +1015,14 @@ static const char *calls_args_descriptions[] = { "HealthCheck: ref HealthCheck\n" " Information about the health check configuration.\n" " -CheckInterval: int\n" - " The number of seconds between two pings (between `5` and `600` \n" - " both included).\n" + " The number of seconds between two requests (between `5` and \n" + " `600` both included).\n" " -HealthyThreshold: int\n" - " The number of consecutive successful pings before considering \n" - " the VM as healthy (between `2` and `10` both included).\n" + " The number of consecutive successful requests before \n" + " considering the VM as healthy (between `2` and `10` both \n" + " included).\n" " -Path: string\n" - " If you use the HTTP or HTTPS protocols, the ping path.\n" + " If you use the HTTP or HTTPS protocols, the request URL path.\n" " -Port: int\n" " The port number (between `1` and `65535`, both included).\n" " -Protocol: string\n" @@ -1013,8 +1033,8 @@ static const char *calls_args_descriptions[] = { " VM as unhealthy, in seconds (between `2` and `60` both \n" " included).\n" " -UnhealthyThreshold: int\n" - " The number of consecutive failed pings before considering the \n" - " VM as unhealthy (between `2` and `10` both included).\n" + " The number of consecutive failed requests before considering \n" + " the VM as unhealthy (between `2` and `10` both included).\n" "LoadBalancerName: string\n" " The name of the load balancer.\n" "LoadBalancerPort: int\n" @@ -1107,6 +1127,14 @@ static const char *calls_args_descriptions[] = { "Mtu: int\n" " The maximum transmission unit (MTU) of the DirectLink interface, in \n" " bytes (always `1500`).\n" +, + "DedicatedGroupId: string\n" + " The ID of the dedicated group you want to update.\n" +"DryRun: bool\n" + " If true, checks whether you have the required permissions to perform \n" + " the action.\n" +"Name: string\n" + " The new name of the dedicated group.\n" , "CaId: string\n" " The ID of the CA.\n" @@ -1142,7 +1170,12 @@ static const char *calls_args_descriptions[] = { " access key of your account.\n" "RequireTrustedEnv: bool\n" " If true, a trusted session is activated, provided that you specify the \n" - " `MaxAccessKeyExpirationSeconds` parameter with a value greater than `0`.\n" + " `MaxAccessKeyExpirationSeconds` parameter with a value greater than \n" + " `0`.\nEnabling this will require you and all your users to log in to \n" + " Cockpit v2 using the WebAuthn method for multi-factor authentication. \n" + " For more information, see [About Authentication > Multi-Factor \n" + " Authentication](https://docs.outscale.com/en/userguide/About-Authenticat\n" + " ion.html#_multi_factor_authentication).\n" , "AdditionalEmails: array string\n" " One or more additional email addresses for the account. These addresses \n" @@ -1192,10 +1225,10 @@ static const char *calls_args_descriptions[] = { " `ACTIVE`, the access key is enabled and can be used to send requests. \n" " When set to `INACTIVE`, the access key is disabled.\n" "UserName: string\n" - " The name of the EIM the access key you want to modify is associated \n" - " with. If you do not specify a user name, this action modifies the \n" - " access key of the user who sends the request (which can be the root \n" - " account).\n" + " The name of the EIM user that the access key you want to modify is \n" + " associated with. If you do not specify a user name, this action \n" + " modifies the access key of the user who sends the request (which can be \n" + " the root account).\n" , "DryRun: bool\n" " If true, checks whether you have the required permissions to perform \n" @@ -1241,6 +1274,17 @@ static const char *calls_args_descriptions[] = { "DryRun: bool\n" " If true, checks whether you have the required permissions to perform \n" " the action.\n" +"PolicyOrn: string\n" + " The OUTSCALE Resource Name (ORN) of the policy. For more information, \n" + " see [Resource \n" + " Identifiers](https://docs.outscale.com/en/userguide/Resource-Identifiers\n" + " .html).\n" +"UserName: string\n" + " The name of the user you want to detach the policy from.\n" +, + "DryRun: bool\n" + " If true, checks whether you have the required permissions to perform \n" + " the action.\n" "LinkNicId: string\n" " The ID of the attachment operation.\n" , @@ -1282,11 +1326,13 @@ static const char *calls_args_descriptions[] = { "VmIds: array string\n" " One or more IDs of VMs.\n" , - "DryRun: bool\n" - " If true, checks whether you have the required permissions to perform \n" - " the action.\n" -"Email: string\n" - " The email address provided for the account.\n" + "PolicyOrn: string\n" + " The OUTSCALE Resource Name (ORN) of the policy. For more information, \n" + " see [Resource \n" + " Identifiers](https://docs.outscale.com/en/userguide/Resource-Identifiers\n" + " .html).\n" +"VersionId: string\n" + " The ID of the version.\n" , "DryRun: bool\n" " If true, checks whether you have the required permissions to perform \n" @@ -1307,14 +1353,6 @@ static const char *calls_args_descriptions[] = { "DryRun: bool\n" " If true, checks whether you have the required permissions to perform \n" " the action.\n" -"Password: string\n" - " The new password for the account.\n" -"Token: string\n" - " The token you received at the email address provided for the account.\n" -, - "DryRun: bool\n" - " If true, checks whether you have the required permissions to perform \n" - " the action.\n" "NetPeeringId: string\n" " The ID of the Net peering you want to reject.\n" , @@ -1371,6 +1409,12 @@ static const char *calls_args_descriptions[] = { " The IDs of the virtual gateways.\n" " -VpnConnectionIds: array string\n" " The IDs of the VPN connections.\n" +"NextPageToken: string\n" + " The token to request the next page of results. Each token refers to a \n" + " specific page.\n" +"ResultsPerPage: int\n" + " The maximum number of logs returned in a single response (between \n" + " `1`and `1000`, both included). By default, `100`.\n" , "DryRun: bool\n" " If true, checks whether you have the required permissions to perform \n" @@ -1415,6 +1459,12 @@ static const char *calls_args_descriptions[] = { " `in-use` \\| `updating` \\| `deleting` \\| `error`).\n" " -VolumeTypes: array string\n" " The types of the volumes (`standard` \\| `gp2` \\| `io1`).\n" +"NextPageToken: string\n" + " The token to request the next page of results. Each token refers to a \n" + " specific page.\n" +"ResultsPerPage: int\n" + " The maximum number of logs returned in a single response (between \n" + " `1`and `1000`, both included). By default, `100`.\n" , "AllVms: bool\n" " If true, includes the status of all VMs. By default or if set to false, \n" @@ -1455,6 +1505,136 @@ static const char *calls_args_descriptions[] = { " the action.\n" "Filters: ref FiltersVm\n" " One or more filters.\n" + " -Architectures: array string\n" + " The architectures of the VMs (`i386` \\| `x86_64`).\n" + " -BlockDeviceMappingDeleteOnVmDeletion: bool\n" + " Whether the BSU volumes are deleted when terminating the VMs.\n" + " -BlockDeviceMappingDeviceNames: array string\n" + " The device names for the BSU volumes (in the format \n" + " `/dev/sdX`, `/dev/sdXX`, `/dev/xvdX`, or `/dev/xvdXX`).\n" + " -BlockDeviceMappingLinkDates: array string\n" + " The link dates for the BSU volumes mapped to the VMs (for \n" + " example, `2016-01-23T18:45:30.000Z`).\n" + " -BlockDeviceMappingStates: array string\n" + " The states for the BSU volumes (`attaching` \\| `attached` \\| \n" + " `detaching` \\| `detached`).\n" + " -BlockDeviceMappingVolumeIds: array string\n" + " The volume IDs of the BSU volumes.\n" + " -ClientTokens: array string\n" + " The idempotency tokens provided when launching the VMs.\n" + " -CreationDates: array string\n" + " The dates when the VMs were launched.\n" + " -ImageIds: array string\n" + " The IDs of the OMIs used to launch the VMs.\n" + " -IsSourceDestChecked: bool\n" + " Whether the source/destination checking is enabled (true) or \n" + " disabled (false).\n" + " -KeypairNames: array string\n" + " The names of the keypairs used when launching the VMs.\n" + " -LaunchNumbers: array integer\n" + " The numbers for the VMs when launching a group of several VMs \n" + " (for example, `0`, `1`, `2`, and so on).\n" + " -Lifecycles: array string\n" + " Whether the VMs are Spot Instances (spot).\n" + " -NetIds: array string\n" + " The IDs of the Nets in which the VMs are running.\n" + " -NicAccountIds: array string\n" + " The IDs of the NICs.\n" + " -NicDescriptions: array string\n" + " The descriptions of the NICs.\n" + " -NicIsSourceDestChecked: bool\n" + " Whether the source/destination checking is enabled (true) or \n" + " disabled (false).\n" + " -NicLinkNicDeleteOnVmDeletion: bool\n" + " Whether the NICs are deleted when the VMs they are attached to \n" + " are deleted.\n" + " -NicLinkNicDeviceNumbers: array integer\n" + " The device numbers the NICs are attached to.\n" + " -NicLinkNicLinkNicDates: array string\n" + " The dates and time when the NICs were attached to the VMs.\n" + " -NicLinkNicLinkNicIds: array string\n" + " The IDs of the NIC attachments.\n" + " -NicLinkNicStates: array string\n" + " The states of the attachments.\n" + " -NicLinkNicVmAccountIds: array string\n" + " The account IDs of the owners of the VMs the NICs are attached \n" + " to.\n" + " -NicLinkNicVmIds: array string\n" + " The IDs of the VMs the NICs are attached to.\n" + " -NicLinkPublicIpAccountIds: array string\n" + " The account IDs of the owners of the public IPs associated \n" + " with the NICs.\n" + " -NicLinkPublicIpLinkPublicIpIds: array string\n" + " The association IDs returned when the public IPs were \n" + " associated with the NICs.\n" + " -NicLinkPublicIpPublicIpIds: array string\n" + " The allocation IDs returned when the public IPs were allocated \n" + " to their accounts.\n" + " -NicLinkPublicIpPublicIps: array string\n" + " The public IPs associated with the NICs.\n" + " -NicMacAddresses: array string\n" + " The Media Access Control (MAC) addresses of the NICs.\n" + " -NicNetIds: array string\n" + " The IDs of the Nets where the NICs are located.\n" + " -NicNicIds: array string\n" + " The IDs of the NICs.\n" + " -NicPrivateIpsLinkPublicIpAccountIds: array string\n" + " The account IDs of the owner of the public IPs associated with \n" + " the private IPs.\n" + " -NicPrivateIpsLinkPublicIpIds: array string\n" + " The public IPs associated with the private IPs.\n" + " -NicPrivateIpsPrimaryIp: bool\n" + " Whether the private IPs are the primary IPs associated with \n" + " the NICs.\n" + " -NicPrivateIpsPrivateIps: array string\n" + " The private IPs of the NICs.\n" + " -NicSecurityGroupIds: array string\n" + " The IDs of the security groups associated with the NICs.\n" + " -NicSecurityGroupNames: array string\n" + " The names of the security groups associated with the NICs.\n" + " -NicStates: array string\n" + " The states of the NICs (`available` \\| `in-use`).\n" + " -NicSubnetIds: array string\n" + " The IDs of the Subnets for the NICs.\n" + " -NicSubregionNames: array string\n" + " The Subregions where the NICs are located.\n" + " -Platforms: array string\n" + " The platforms. Use windows if you have Windows VMs. Otherwise, \n" + " leave this filter blank.\n" + " -PrivateIps: array string\n" + " The private IPs of the VMs.\n" + " -ProductCodes: array string\n" + " The product codes associated with the OMI used to create the \n" + " VMs.\n" + " -PublicIps: array string\n" + " The public IPs of the VMs.\n" + " -ReservationIds: array string\n" + " The IDs of the reservation of the VMs, created every time you \n" + " launch VMs. These reservation IDs can be associated with \n" + " several VMs when you lauch a group of VMs using the same launch \n" + " request.\n" + " -RootDeviceNames: array string\n" + " The names of the root devices for the VMs (for example, \n" + " `/dev/sda1`)\n" + " -RootDeviceTypes: array string\n" + " The root devices types used by the VMs (always `ebs`)\n" + " -SecurityGroupIds: array string\n" + " The IDs of the security groups for the VMs (only in the public \n" + " Cloud).\n" + " -SecurityGroupNames: array string\n" + " The names of the security groups for the VMs (only in the \n" + " public Cloud).\n" + " -StateReasonCodes: array integer\n" + " The reason codes for the state changes.\n" + " -StateReasonMessages: array string\n" + " The messages describing the state changes.\n" + " -StateReasons: array string\n" + " The reasons explaining the current states of the VMs. This \n" + " filter is like the `StateReasonCodes` one.\n" + " -SubnetIds: array string\n" + " The IDs of the Subnets for the VMs.\n" + " -SubregionNames: array string\n" + " The names of the Subregions of the VMs.\n" " -TagKeys: array string\n" " The keys of the tags associated with the VMs.\n" " -TagValues: array string\n" @@ -1464,8 +1644,33 @@ static const char *calls_args_descriptions[] = { " in the following format: \n" " \"Filters\":{\"Tags\":[\"TAGKEY=TAGVALUE&quo\n" " t;]}.\n" + " -Tenancies: array string\n" + " The tenancies of the VMs (`dedicated` \\| `default` \\| \n" + " `host`).\n" " -VmIds: array string\n" " One or more IDs of VMs.\n" + " -VmSecurityGroupIds: array string\n" + " The IDs of the security groups for the VMs.\n" + " -VmSecurityGroupNames: array string\n" + " The names of the security group for the VMs.\n" + " -VmStateCodes: array integer\n" + " The state codes of the VMs: `-1` (quarantine), `0` (pending), \n" + " `16` (running), `32` (shutting-down), `48` (terminated), `64` \n" + " (stopping), and `80` (stopped).\n" + " -VmStateNames: array string\n" + " The state names of the VMs (`pending` \\| `running` \\| \n" + " `stopping` \\| `stopped` \\| `shutting-down` \\| `terminated` \n" + " \\| `quarantine`).\n" + " -VmTypes: array string\n" + " The VM types (for example, t2.micro). For more information, \n" + " see [VM \n" + " Types](https://docs.outscale.com/en/userguide/VM-Types.html).\n" +"NextPageToken: string\n" + " The token to request the next page of results. Each token refers to a \n" + " specific page.\n" +"ResultsPerPage: int\n" + " The maximum number of logs returned in a single response (between \n" + " `1`and `1000`, both included). By default, `100`.\n" , "DryRun: bool\n" " If true, checks whether you have the required permissions to perform \n" @@ -1475,14 +1680,19 @@ static const char *calls_args_descriptions[] = { " -BsuOptimized: bool\n" " This parameter is not available. It is present in our API for \n" " the sake of historical compatibility with AWS.\n" + " -EphemeralsTypes: array string\n" + " The types of ephemeral storage disk.\n" + " -Eths: array integer\n" + " The number of Ethernet interfaces available.\n" + " -Gpus: array integer\n" + " The number of GPUs available.\n" " -MemorySizes: array double\n" " The amounts of memory, in gibibytes (GiB).\n" " -VcoreCounts: array integer\n" " The numbers of vCores.\n" " -VmTypeNames: array string\n" - " The names of the VM types. For more information, see [Instance \n" - " Types](https://docs.outscale.com/en/userguide/Instance-Types.htm\n" - " l).\n" + " The names of the VM types. For more information, see [VM \n" + " Types](https://docs.outscale.com/en/userguide/VM-Types.html).\n" " -VolumeCounts: array integer\n" " The maximum number of ephemeral storage disks.\n" " -VolumeSizes: array integer\n" @@ -1514,8 +1724,8 @@ static const char *calls_args_descriptions[] = { " -Tags: array string\n" " The key/value combination of the tags associated with the VM \n" " templates, in the following format: \n" - " \n" - " \"Filters\":{\"Tags\":[\"TAGKEY=TAGVALUE\"]}.\n" + " \"Filters\":{\"Tags\":[\"TAGKEY=TAGVALUE&quo\n" + " t;]}.\n" " -VmTemplateIds: array string\n" " The IDs of the VM templates.\n" " -VmTemplateNames: array string\n" @@ -1525,7 +1735,6 @@ static const char *calls_args_descriptions[] = { " If true, checks whether you have the required permissions to perform \n" " the action.\n" "Filters: ref FiltersVmGroup\n" - " ReadVmGroupsRequest_Filters\n" " One or more filters.\n" " -Descriptions: array string\n" " The descriptions of the VM groups.\n" @@ -1579,6 +1788,12 @@ static const char *calls_args_descriptions[] = { " t;]}.\n" " -VirtualGatewayIds: array string\n" " The IDs of the virtual gateways.\n" +"NextPageToken: string\n" + " The token to request the next page of results. Each token refers to a \n" + " specific page.\n" +"ResultsPerPage: int\n" + " The maximum number of logs returned in a single response (between \n" + " `1`and `1000`, both included). By default, `100`.\n" , "DryRun: bool\n" " If true, checks whether you have the required permissions to perform \n" @@ -1614,6 +1829,10 @@ static const char *calls_args_descriptions[] = { " the action.\n" "Filters: ref FiltersSubregion\n" " One or more filters.\n" + " -RegionNames: array string\n" + " The names of the Regions containing the Subregions.\n" + " -States: array string\n" + " The states of the Subregions.\n" " -SubregionNames: array string\n" " The names of the Subregions.\n" , @@ -1661,8 +1880,7 @@ static const char *calls_args_descriptions[] = { " The beginning of the time period, in ISO 8601 date-time format \n" " (for example, `2020-06-14T00:00:00.000Z`).\n" " -PermissionsToCreateVolumeAccountIds: array string\n" - " The account IDs of one or more users who have permissions to \n" - " create volumes.\n" + " The account IDs which have permissions to create volumes.\n" " -PermissionsToCreateVolumeGlobalPermission: bool\n" " If true, lists all public volumes. If false, lists all private \n" " volumes.\n" @@ -1712,8 +1930,6 @@ static const char *calls_args_descriptions[] = { " the action.\n" "Filters: ref FiltersSecurityGroup\n" " One or more filters.\n" - " -AccountIds: array string\n" - " The account IDs of the owners of the security groups.\n" " -Descriptions: array string\n" " The descriptions of the security groups.\n" " -InboundRuleAccountIds: array string\n" @@ -1822,6 +2038,12 @@ static const char *calls_args_descriptions[] = { " route tables, in the following format: \n" " \"Filters\":{\"Tags\":[\"TAGKEY=TAGVALUE&quo\n" " t;]}.\n" +"NextPageToken: string\n" + " The token to request the next page of results. Each token refers to a \n" + " specific page.\n" +"ResultsPerPage: int\n" + " The maximum number of logs returned in a single response (between \n" + " `1`and `1000`, both included). By default, `100`.\n" , "DryRun: bool\n" " If true, checks whether you have the required permissions to perform \n" @@ -1874,6 +2096,12 @@ static const char *calls_args_descriptions[] = { " t;]}.\n" " -VmIds: array string\n" " The IDs of the VMs.\n" +"NextPageToken: string\n" + " The token to request the next page of results. Each token refers to a \n" + " specific page.\n" +"ResultsPerPage: int\n" + " The maximum number of logs returned in a single response (between \n" + " `1`and `1000`, both included). By default, `100`.\n" , "DryRun: bool\n" " If true, checks whether you have the required permissions to perform \n" @@ -1890,6 +2118,49 @@ static const char *calls_args_descriptions[] = { " One or more filters.\n" " -ProductTypeIds: array string\n" " The IDs of the product types.\n" +, + "FirstItem: int\n" + " The item starting the list of policies requested.\n" +"PolicyOrn: string\n" + " The OUTSCALE Resource Name (ORN) of the policy. For more information, \n" + " see [Resource \n" + " Identifiers](https://docs.outscale.com/en/userguide/Resource-Identifiers\n" + " .html).\n" +"ResultsPerPage: int\n" + " The maximum number of items that can be returned in a single response \n" + " (by default, 100).\n" +, + "PolicyOrn: string\n" + " The OUTSCALE Resource Name (ORN) of the policy. For more information, \n" + " see [Resource \n" + " Identifiers](https://docs.outscale.com/en/userguide/Resource-Identifiers\n" + " .html).\n" +"VersionId: string\n" + " The ID of the policy version.\n" +, + "PolicyOrn: string\n" + " The OUTSCALE Resource Name (ORN) of the policy. For more information, \n" + " see [Resource \n" + " Identifiers](https://docs.outscale.com/en/userguide/Resource-Identifiers\n" + " .html).\n" +, + "DryRun: bool\n" + " If true, checks whether you have the required permissions to perform \n" + " the action.\n" +"Filters: ref ReadPoliciesFilters\n" + " One or more filters.\n" + " -OnlyLinked: bool\n" + " If set to true, lists only the policies attached to a user.\n" + " -PathPrefix: string\n" + " The path prefix you can use to filter the results, set to a \n" + " slash (`/`) by default.\n" + " -Scope: string\n" + " The scope to filter policies (`ALL` \\| `OWS` \\| `local`).\n" +"FirstItem: int\n" + " The item starting the list of policies requested.\n" +"ResultsPerPage: int\n" + " The maximum number of items that can be returned in a single response \n" + " (by default, 100).\n" , "DryRun: bool\n" " If true, checks whether you have the required permissions to perform \n" @@ -1980,7 +2251,7 @@ static const char *calls_args_descriptions[] = { " The IDs of the Nets.\n" " -States: array string\n" " The states of the Nets (`pending` \\| `available` \\| \n" - " `deleted`).\n" + " `deleting`).\n" " -TagKeys: array string\n" " The keys of the tags associated with the Nets.\n" " -TagValues: array string\n" @@ -2003,6 +2274,10 @@ static const char *calls_args_descriptions[] = { " `10.0.0.0/24`).\n" " -AccepterNetNetIds: array string\n" " The IDs of the peer Nets.\n" + " -ExpirationDates: array string\n" + " The dates and times at which the Net peerings expire, in ISO \n" + " 8601 date-time format (for example, \n" + " `2020-06-14T00:00:00.000Z`).\n" " -NetPeeringIds: array string\n" " The IDs of the Net peerings.\n" " -SourceNetAccountIds: array string\n" @@ -2026,6 +2301,12 @@ static const char *calls_args_descriptions[] = { " peerings, in the following format: \n" " \"Filters\":{\"Tags\":[\"TAGKEY=TAGVALUE&quo\n" " t;]}.\n" +"NextPageToken: string\n" + " The token to request the next page of results. Each token refers to a \n" + " specific page.\n" +"ResultsPerPage: int\n" + " The maximum number of logs returned in a single response (between \n" + " `1`and `1000`, both included). By default, `100`.\n" , "DryRun: bool\n" " If true, checks whether you have the required permissions to perform \n" @@ -2051,6 +2332,12 @@ static const char *calls_args_descriptions[] = { " access points, in the following format: \n" " \"Filters\":{\"Tags\":[\"TAGKEY=TAGVALUE&quo\n" " t;]}.\n" +"NextPageToken: string\n" + " The token to request the next page of results. Each token refers to a \n" + " specific page.\n" +"ResultsPerPage: int\n" + " The maximum number of logs returned in a single response (between \n" + " `1`and `1000`, both included). By default, `100`.\n" , "DryRun: bool\n" " If true, checks whether you have the required permissions to perform \n" @@ -2085,6 +2372,12 @@ static const char *calls_args_descriptions[] = { " services, in the following format: \n" " \"Filters\":{\"Tags\":[\"TAGKEY=TAGVALUE&quo\n" " t;]}.\n" +"NextPageToken: string\n" + " The token to request the next page of results. Each token refers to a \n" + " specific page.\n" +"ResultsPerPage: int\n" + " The maximum number of logs returned in a single response (between \n" + " `1`and `1000`, both included). By default, `100`.\n" , "DryRun: bool\n" " If true, checks whether you have the required permissions to perform \n" @@ -2115,12 +2408,32 @@ static const char *calls_args_descriptions[] = { "DryRun: bool\n" " If true, checks whether you have the required permissions to perform \n" " the action.\n" +"Filters: ref ReadLinkedPoliciesFilters\n" + " One or more filters.\n" + " -PathPrefix: string\n" + " The path prefix of the policies, set to a slash (`/`) by \n" + " default.\n" +"FirstItem: int\n" + " The item starting the list of policies requested.\n" +"ResultsPerPage: int\n" + " The maximum number of items that can be returned in a single response \n" + " (by default, 100).\n" +"UserName: string\n" + " The name of the user the policies are linked to.\n" +, + "DryRun: bool\n" + " If true, checks whether you have the required permissions to perform \n" + " the action.\n" "Filters: ref FiltersKeypair\n" " One or more filters.\n" " -KeypairFingerprints: array string\n" " The fingerprints of the keypairs.\n" " -KeypairNames: array string\n" " The names of the keypairs.\n" + " -KeypairTypes: array string\n" + " The types of the keypairs (`ssh-rsa`, `ssh-ed25519`, \n" + " `ecdsa-sha2-nistp256`, `ecdsa-sha2-nistp384`, or \n" + " `ecdsa-sha2-nistp521`).\n" , "DryRun: bool\n" " If true, checks whether you have the required permissions to perform \n" @@ -2134,7 +2447,7 @@ static const char *calls_args_descriptions[] = { " -LinkStates: array string\n" " The current states of the attachments between the Internet \n" " services and the Nets (only `available`, if the Internet \n" - " gateway is attached to a VPC).\n" + " gateway is attached to a Net).\n" " -TagKeys: array string\n" " The keys of the tags associated with the Internet services.\n" " -TagValues: array string\n" @@ -2179,17 +2492,18 @@ static const char *calls_args_descriptions[] = { " -ImageNames: array string\n" " The names of the OMIs, provided when they were created.\n" " -PermissionsToLaunchAccountIds: array string\n" - " The account IDs of the users who have launch permissions for \n" - " the OMIs.\n" + " The account IDs which have launch permissions for the OMIs.\n" " -PermissionsToLaunchGlobalPermission: bool\n" " If true, lists all public OMIs. If false, lists all private \n" " OMIs.\n" + " -ProductCodeNames: array string\n" + " The names of the product codes associated with the OMI.\n" " -ProductCodes: array string\n" " The product codes associated with the OMI.\n" " -RootDeviceNames: array string\n" " The name of the root device. This value must be /dev/sda1.\n" " -RootDeviceTypes: array string\n" - " The types of root device used by the OMIs (always `bsu`).\n" + " The types of root device used by the OMIs (`bsu` or `ebs`).\n" " -States: array string\n" " The states of the OMIs (`pending` \\| `available` \\| \n" " `failed`).\n" @@ -2204,6 +2518,12 @@ static const char *calls_args_descriptions[] = { " t;]}.\n" " -VirtualizationTypes: array string\n" " The virtualization types (always `hvm`).\n" +"NextPageToken: string\n" + " The token to request the next page of results. Each token refers to a \n" + " specific page.\n" +"ResultsPerPage: int\n" + " The maximum number of logs returned in a single response (between \n" + " `1`and `1000`, both included). By default, `100`.\n" , "DryRun: bool\n" " If true, checks whether you have the required permissions to perform \n" @@ -2288,6 +2608,28 @@ static const char *calls_args_descriptions[] = { " options sets, in the following format: \n" " \"Filters\":{\"Tags\":[\"TAGKEY=TAGVALUE&quo\n" " t;]}.\n" +"NextPageToken: string\n" + " The token to request the next page of results. Each token refers to a \n" + " specific page.\n" +"ResultsPerPage: int\n" + " The maximum number of logs returned in a single response (between \n" + " `1`and `1000`, both included). By default, `100`.\n" +, + "DryRun: bool\n" + " If true, checks whether you have the required permissions to perform \n" + " the action.\n" +"Filters: ref FiltersDedicatedGroup\n" + " One or more filters.\n" + " -CpuGenerations: array integer\n" + " The processor generation for the VMs in the dedicated group \n" + " (for example, `4`).\n" + " -DedicatedGroupIds: array string\n" + " The IDs of the dedicated groups.\n" + " -Names: array string\n" + " The names of the dedicated groups.\n" + " -SubregionNames: array string\n" + " The names of the Subregions in which the dedicated groups are \n" + " located.\n" , "DryRun: bool\n" " If true, checks whether you have the required permissions to perform \n" @@ -2302,6 +2644,12 @@ static const char *calls_args_descriptions[] = { " consumption of your paying account and all linked accounts (if the \n" " account that sends this request is a paying account) or returns nothing \n" " (if the account that sends this request is a linked account).\n" +"ShowPrice: bool\n" + " By default or if false, returns only the consumption of the specific \n" + " account that sends this request. If true, returns the unit price of the \n" + " consumed resource, and the total price of the consumed resource during \n" + " the specified time period in the currency of the catalog of the Region \n" + " where the API method was used.\n" "ToDate: string\n" " The end of the time period, in ISO 8601 date format (for example, \n" " `2020-06-30`). The date-time format is also accepted, but only with a \n" @@ -2345,7 +2693,6 @@ static const char *calls_args_descriptions[] = { " If true, checks whether you have the required permissions to perform \n" " the action.\n" "Filters: ref FiltersCatalogs\n" - " ReadCatalogsRequest_Filters\n" " One or more filters.\n" " -CurrentCatalogOnly: bool\n" " By default or if set to true, only returns the current \n" @@ -2538,9 +2885,9 @@ static const char *calls_args_descriptions[] = { "AllowRelink: bool\n" " If true, allows the public IP to be associated with the VM or NIC that \n" " you specify even if it is already associated with another VM or NIC. If \n" - " false, prevents the EIP from being associated with the VM or NIC that \n" - " you specify if it is already associated with another VM or NIC. (By \n" - " default, true in the public Cloud, false in a Net.)\n" + " false, prevents the public IP from being associated with the VM or NIC \n" + " that you specify if it is already associated with another VM or NIC. \n" + " (By default, true in the public Cloud, false in a Net.)\n" "DryRun: bool\n" " If true, checks whether you have the required permissions to perform \n" " the action.\n" @@ -2576,6 +2923,18 @@ static const char *calls_args_descriptions[] = { " the IP range of the Subnet.\n" "SecondaryPrivateIpCount: int\n" " The number of secondary private IPs to assign to the NIC.\n" +, + "DryRun: bool\n" + " If true, checks whether you have the required permissions to perform \n" + " the action.\n" +"PolicyOrn: string\n" + " The OUTSCALE Resource Name (ORN) of the policy. For more information, \n" + " see [Resource \n" + " Identifiers](https://docs.outscale.com/en/userguide/Resource-Identifiers\n" + " .html).\n" +"UserName: string\n" + " The name of the user you want to link the policy to (between 1 and 64 \n" + " characters).\n" , "DeviceNumber: int\n" " The index of the VM device for the NIC attachment (between `1` and `7`, \n" @@ -2801,6 +3160,23 @@ static const char *calls_args_descriptions[] = { "PublicIpId: string\n" " The ID representing the association of the public IP with the VM or the \n" " NIC. In a Net, this parameter is required.\n" +, + "PolicyOrn: string\n" + " The OUTSCALE Resource Name (ORN) of the policy. For more information, \n" + " see [Resource \n" + " Identifiers](https://docs.outscale.com/en/userguide/Resource-Identifiers\n" + " .html).\n" +"VersionId: string\n" + " The ID of the version of the policy you want to delete.\n" +, + "DryRun: bool\n" + " If true, checks whether you have the required permissions to perform \n" + " the action.\n" +"PolicyOrn: string\n" + " The OUTSCALE Resource Name (ORN) of the policy you want to delete. For \n" + " more information, see [Resource \n" + " Identifiers](https://docs.outscale.com/en/userguide/Resource-Identifiers\n" + " .html).\n" , "DryRun: bool\n" " If true, checks whether you have the required permissions to perform \n" @@ -2918,6 +3294,15 @@ static const char *calls_args_descriptions[] = { "DryRun: bool\n" " If true, checks whether you have the required permissions to perform \n" " the action.\n" +, + "DedicatedGroupId: string\n" + " The ID of the dedicated group you want to delete.\n" +"DryRun: bool\n" + " If true, checks whether you have the required permissions to perform \n" + " the action.\n" +"Force: bool\n" + " If true, forces the deletion of the dedicated group and all its \n" + " dependencies.\n" , "ClientGatewayId: string\n" " The ID of the client gateway you want to delete.\n" @@ -2964,9 +3349,10 @@ static const char *calls_args_descriptions[] = { " If true, checks whether you have the required permissions to perform \n" " the action.\n" "StaticRoutesOnly: bool\n" - " If false, the VPN connection uses dynamic routing with Border Gateway \n" - " Protocol (BGP). If true, routing is controlled using static routes. For \n" - " more information about how to create and delete static routes, see \n" + " By default or if false, the VPN connection uses dynamic routing with \n" + " Border Gateway Protocol (BGP). If true, routing is controlled using \n" + " static routes. For more information about how to create and delete \n" + " static routes, see \n" " [CreateVpnConnectionRoute](#createvpnconnectionroute) and \n" " [DeleteVpnConnectionRoute](#deletevpnconnectionroute).\n" "VirtualGatewayId: string\n" @@ -3116,7 +3502,8 @@ static const char *calls_args_descriptions[] = { " The name of the Subregion. If you specify this parameter, you \n" " must not specify the `Nics` parameter.\n" " -Tenancy: string\n" - " The tenancy of the VM (`default` \\| `dedicated`).\n" + " The tenancy of the VM (`default`, `dedicated`, or a dedicated \n" + " group ID).\n" "PrivateIps: array string\n" " One or more private IPs of the VM.\n" "SecurityGroupIds: array string\n" @@ -3141,8 +3528,8 @@ static const char *calls_args_descriptions[] = { " still returned. If the specified or converted TINA type includes a \n" " performance flag, this performance flag is applied regardless of the \n" " value you may have provided in the `Performance` parameter. For more \n" - " information, see [Instance \n" - " Types](https://docs.outscale.com/en/userguide/Instance-Types.html).\n" + " information, see [VM \n" + " Types](https://docs.outscale.com/en/userguide/VM-Types.html).\n" , "CpuCores: int\n" " The number of vCores to use for each VM.\n" @@ -3213,9 +3600,14 @@ static const char *calls_args_descriptions[] = { " If true, checks whether you have the required permissions to perform \n" " the action.\n" "Path: string\n" - " The path to the EIM user you want to create (by default, `/`).\n" + " The path to the EIM user you want to create (by default, `/`). This \n" + " path name must begin and end with a slash (/), and contain between 1 \n" + " and 512 alphanumeric characters and/or slashes (/), or underscores (_).\n" "UserName: string\n" - " The name of the EIM user you want to create.\n" + " The name of the EIM user you want to create. This user name must \n" + " contain between 1 and 64 alphanumeric characters and/or pluses (+), \n" + " equals (=), commas (,), periods (.), at signs (@), dashes (-), or \n" + " underscores (_).\n" , "DryRun: bool\n" " If true, checks whether you have the required permissions to perform \n" @@ -3240,7 +3632,7 @@ static const char *calls_args_descriptions[] = { " of the Net one. In case of several Subnets in a Net, their IP ranges \n" " must not overlap. The smallest Subnet you can create uses a /29 netmask \n" " (eight IPs). For more information, see [About \n" - " VPCs](https://docs.outscale.com/en/userguide/About-VPCs.html).\n" + " Nets](https://docs.outscale.com/en/userguide/About-Nets.html).\n" "NetId: string\n" " The ID of the Net for which you want to create a Subnet.\n" "SubregionName: string\n" @@ -3277,24 +3669,26 @@ static const char *calls_args_descriptions[] = { " If true, checks whether you have the required permissions to perform \n" " the action.\n" "FileLocation: string\n" - " (When importing) The pre-signed URL of the snapshot you want to import, \n" - " or the normal URL of the snapshot if you have permission on the OOS \n" - " bucket. For more information, see [Configuring a Pre-signed \n" + " **(when importing from a bucket)** The pre-signed URL of the snapshot \n" + " you want to import, or the normal URL of the snapshot if you have \n" + " permission on the OOS bucket. For more information, see [Configuring a \n" + " Pre-signed \n" " URL](https://docs.outscale.com/en/userguide/Configuring-a-Pre-signed-URL\n" " .html) or [Managing Access to Your Buckets and \n" " Objects](https://docs.outscale.com/en/userguide/Managing-Access-to-Your-\n" " Buckets-and-Objects.html).\n" "SnapshotSize: int\n" - " (When importing) The size of the snapshot you want to create in your \n" - " account, in bytes. This size must be greater than or equal to the size \n" - " of the original, uncompressed snapshot.\n" + " **(when importing from a bucket)** The size of the snapshot you want to \n" + " create in your account, in bytes. This size must be greater than or \n" + " equal to the size of the original, uncompressed snapshot.\n" "SourceRegionName: string\n" - " (When copying) The name of the source Region, which must be the same as \n" - " the Region of your account.\n" + " **(when copying a snapshot)** The name of the source Region, which must \n" + " be the same as the Region of your account.\n" "SourceSnapshotId: string\n" - " (When copying) The ID of the snapshot you want to copy.\n" + " **(when copying a snapshot)** The ID of the snapshot you want to copy.\n" "VolumeId: string\n" - " (When creating) The ID of the volume you want to create a snapshot of.\n" + " **(when creating from a volume)** The ID of the volume you want to \n" + " create a snapshot of.\n" , "Body: string\n" " The PEM-encoded X509 certificate.With OSC CLI, use the following syntax \n" @@ -3392,9 +3786,9 @@ static const char *calls_args_descriptions[] = { " `Rules` parameter and its subparameters.\n" , "Description: string\n" - " A description for the security group, with a maximum length of 255 \n" - " [ASCII printable \n" - " characters](https://en.wikipedia.org/wiki/ASCII#Printable_characters).\n" + " A description for the security group.\nThis description can contain \n" + " between 1 and 255 characters. Allowed characters are `a-z`, `A-Z`, \n" + " `0-9`, accented letters, spaces, and `_.-:/()#,@[]+=&;{}!$*`.\n" "DryRun: bool\n" " If true, checks whether you have the required permissions to perform \n" " the action.\n" @@ -3402,8 +3796,9 @@ static const char *calls_args_descriptions[] = { " The ID of the Net for the security group.\n" "SecurityGroupName: string\n" " The name of the security group.\nThis name must not start with \n" - " `sg-`.
\nThis name must be unique and contain between 1 and 255 \n" - " ASCII characters. Accented letters are not allowed.\n" + " `sg-`.\nThis name must be unique and contain between 1 and 255 \n" + " characters. Allowed characters are `a-z`, `A-Z`, `0-9`, spaces, and \n" + " `_.-:/()#,@[]+=&;{}!$*`.\n" , "DryRun: bool\n" " If true, checks whether you have the required permissions to perform \n" @@ -3433,6 +3828,43 @@ static const char *calls_args_descriptions[] = { "DryRun: bool\n" " If true, checks whether you have the required permissions to perform \n" " the action.\n" +, + "Description: string\n" + " The description of the product type.\n" +"DryRun: bool\n" + " If true, checks whether you have the required permissions to perform \n" + " the action.\n" +"Vendor: string\n" + " The vendor of the product type.\n" +, + "Document: string\n" + " The policy document, corresponding to a JSON string that contains the \n" + " policy. For more information, see [EIM Reference \n" + " Information](https://docs.outscale.com/en/userguide/EIM-Reference-Inform\n" + " ation.html).\n" +"PolicyOrn: string\n" + " The OUTSCALE Resource Name (ORN) of the policy. For more information, \n" + " see [Resource \n" + " Identifiers](https://docs.outscale.com/en/userguide/Resource-Identifiers\n" + " .html).\n" +"SetAsDefault: bool\n" + " If set to true, the new policy version is set as the default version \n" + " and becomes the operative one.\n" +, + "Description: string\n" + " A description for the policy.\n" +"Document: string\n" + " The policy document, corresponding to a JSON string that contains the \n" + " policy. For more information, see [EIM Reference \n" + " Information](https://docs.outscale.com/en/userguide/EIM-Reference-Inform\n" + " ation.html).\n" +"DryRun: bool\n" + " If true, checks whether you have the required permissions to perform \n" + " the action.\n" +"Path: string\n" + " The path of the policy.\n" +"PolicyName: string\n" + " The name of the policy.\n" , "Description: string\n" " A description for the NIC.\n" @@ -3478,9 +3910,11 @@ static const char *calls_args_descriptions[] = { "IpRange: string\n" " The IP range for the Net, in CIDR notation (for example, `10.0.0.0/16`).\n" "Tenancy: string\n" - " The tenancy options for the VMs (`default` if a VM created in a Net can \n" - " be launched with any tenancy, `dedicated` if it can be launched with \n" - " dedicated tenancy VMs running on single-tenant hardware).\n" + " The tenancy options for the VMs:\n- `default` if a VM created in a Net \n" + " can be launched with any tenancy.\n- `dedicated` if it can be launched \n" + " with dedicated tenancy VMs running on single-tenant hardware.\n- \n" + " `dedicated group ID`: if it can be launched in a dedicated group on \n" + " single-tenant hardware.\n" , "DryRun: bool\n" " If true, checks whether you have the required permissions to perform \n" @@ -3647,7 +4081,8 @@ static const char *calls_args_descriptions[] = { " printable \n" " characters](https://en.wikipedia.org/wiki/ASCII#Printable_characters).\n" "PublicKey: string\n" - " The public key. It must be Base64-encoded.\n" + " The public key to import in your account, if you are importing an \n" + " existing keypair. This value must be Base64-encoded.\n" , "DryRun: bool\n" " If true, checks whether you have the required permissions to perform \n" @@ -3679,10 +4114,11 @@ static const char *calls_args_descriptions[] = { " The prefix for the key of the OOS object.\n" , "Architecture: string\n" - " The architecture of the OMI (by default, `i386` if you specified the \n" - " `FileLocation` or `RootDeviceName` parameter).\n" + " **(when registering from a snapshot, or from a bucket without using a \n" + " manifest file)** The architecture of the OMI (`i386` or `x84_64`).\n" "BlockDeviceMappings: array ref BlockDeviceMappingImage\n" - " One or more block device mappings.\n" + " **(when registering from a snapshot, or from a bucket without using a \n" + " manifest file)** One or more block device mappings.\n" " One or more parameters used to automatically set up volumes \n" " when the VM is created.\n" " -Bsu: ref BsuToCreate\n" @@ -3725,34 +4161,37 @@ static const char *calls_args_descriptions[] = { " If true, checks whether you have the required permissions to perform \n" " the action.\n" "FileLocation: string\n" - " The pre-signed URL of the OMI manifest file, or the full path to the \n" - " OMI stored in a bucket. If you specify this parameter, a copy of the \n" - " OMI is created in your account. You must specify only one of the \n" - " following parameters: `FileLocation`, `RootDeviceName`, `SourceImageId` \n" - " or `VmId`.\n" + " **(when registering from a bucket by using a manifest file)** The \n" + " pre-signed URL of the manifest file for the OMI you want to register. \n" + " For more information, see [Configuring a Pre-signed \n" + " URL](https://docs.outscale.com/en/userguide/Configuring-a-Pre-signed-URL\n" + " .html) or [Managing Access to Your Buckets and \n" + " Objects](https://docs.outscale.com/en/userguide/Managing-Access-to-Your-\n" + " Buckets-and-Objects.html).\nYou can also specify the normal URL of the \n" + " OMI if you have permission on the OOS bucket, without using the \n" + " manifest file, but in that case, you need to manually specify through \n" + " the other parameters all the information that would otherwise be read \n" + " from the manifest file.\n" "ImageName: string\n" " A unique name for the new OMI.\nConstraints: 3-128 alphanumeric \n" - " characters, underscores (_), spaces ( ), parentheses (()), slashes (/), \n" - " periods (.), or dashes (-).\n" + " characters, underscores (`_`), spaces (` `), parentheses (`()`), \n" + " slashes (`/`), periods (`.`), or dashes (`-`).\n" "NoReboot: bool\n" - " If false, the VM shuts down before creating the OMI and then reboots. \n" - " If true, the VM does not.\n" + " **(when creating from a VM)** If false, the VM shuts down before \n" + " creating the OMI and then reboots. If true, the VM does not.\n" "ProductCodes: array string\n" " The product codes associated with the OMI.\n" "RootDeviceName: string\n" - " The name of the root device. You must specify only one of the following \n" - " parameters: `FileLocation`, `RootDeviceName`, `SourceImageId` or `VmId`.\n" + " **(when registering from a snapshot, or from a bucket without using a \n" + " manifest file)** The name of the root device for the new OMI.\n" "SourceImageId: string\n" - " The ID of the OMI you want to copy. You must specify only one of the \n" - " following parameters: `FileLocation`, `RootDeviceName`, `SourceImageId` \n" - " or `VmId`.\n" + " **(when copying an OMI)** The ID of the OMI you want to copy.\n" "SourceRegionName: string\n" - " The name of the source Region, which must be the same as the Region of \n" - " your account.\n" + " **(when copying an OMI)** The name of the source Region (always the \n" + " same as the Region of your account).\n" "VmId: string\n" - " The ID of the VM from which you want to create the OMI. You must \n" - " specify only one of the following parameters: `FileLocation`, \n" - " `RootDeviceName`, `SourceImageId` or `VmId`.\n" + " **(when creating from a VM)** The ID of the VM from which you want to \n" + " create the OMI.\n" , "DeleteOnVmDeletion: bool\n" " If true, the fGPU is deleted when the VM is terminated.\n" @@ -3791,7 +4230,8 @@ static const char *calls_args_descriptions[] = { " -VirtualGatewayId: string\n" " The ID of the target virtual gateway.\n" " -Vlan: int\n" - " The VLAN number associated with the DirectLink interface.\n" + " The VLAN number associated with the DirectLink interface. This \n" + " number must be unique and be between `2` and `4094`.\n" "DryRun: bool\n" " If true, checks whether you have the required permissions to perform \n" " the action.\n" @@ -3828,11 +4268,24 @@ static const char *calls_args_descriptions[] = { " The IPs of the Network Time Protocol (NTP) servers. You must specify at \n" " least one of the following parameters: `DomainName`, \n" " `DomainNameServers`, `LogServers`, or `NtpServers`.\n" +, + "CpuGeneration: int\n" + " The processor generation for the VMs in the dedicated group (for \n" + " example, `4`).\n" +"DryRun: bool\n" + " If true, checks whether you have the required permissions to perform \n" + " the action.\n" +"Name: string\n" + " A name for the dedicated group.\n" +"SubregionName: string\n" + " The Subregion in which you want to create the dedicated group.\n" , "BgpAsn: int\n" " The Autonomous System Number (ASN) used by the Border Gateway Protocol \n" " (BGP) to find the path to your client gateway through the Internet. \n" - " This number must be between `1` and `4294967295`.\n" + "
\nThis number must be between `1` and `4294967295`. If you do not \n" + " have an ASN, you can choose one between 64512 and 65534, or between \n" + " 4200000000 and 4294967294.\n" "ConnectionType: string\n" " The communication protocol used to establish tunnel with your client \n" " gateway (only `ipsec.1` is supported).\n" @@ -4316,6 +4769,7 @@ static int catalog_entry_setter(struct catalog_entry *args, struct osc_str *data static int catalogs_setter(struct catalogs *args, struct osc_str *data); static int client_gateway_setter(struct client_gateway *args, struct osc_str *data); static int consumption_entry_setter(struct consumption_entry *args, struct osc_str *data); +static int dedicated_group_setter(struct dedicated_group *args, struct osc_str *data); static int dhcp_options_set_setter(struct dhcp_options_set *args, struct osc_str *data); static int direct_link_setter(struct direct_link *args, struct osc_str *data); static int direct_link_interface_setter(struct direct_link_interface *args, struct osc_str *data); @@ -4327,6 +4781,7 @@ static int filters_api_log_setter(struct filters_api_log *args, struct osc_str * static int filters_ca_setter(struct filters_ca *args, struct osc_str *data); static int filters_catalogs_setter(struct filters_catalogs *args, struct osc_str *data); static int filters_client_gateway_setter(struct filters_client_gateway *args, struct osc_str *data); +static int filters_dedicated_group_setter(struct filters_dedicated_group *args, struct osc_str *data); static int filters_dhcp_options_setter(struct filters_dhcp_options *args, struct osc_str *data); static int filters_direct_link_setter(struct filters_direct_link *args, struct osc_str *data); static int filters_direct_link_interface_setter(struct filters_direct_link_interface *args, struct osc_str *data); @@ -4375,6 +4830,7 @@ static int link_nic_to_update_setter(struct link_nic_to_update *args, struct osc static int link_public_ip_setter(struct link_public_ip *args, struct osc_str *data); static int link_public_ip_light_for_vm_setter(struct link_public_ip_light_for_vm *args, struct osc_str *data); static int link_route_table_setter(struct link_route_table *args, struct osc_str *data); +static int linked_policy_setter(struct linked_policy *args, struct osc_str *data); static int linked_volume_setter(struct linked_volume *args, struct osc_str *data); static int listener_setter(struct listener *args, struct osc_str *data); static int listener_for_creation_setter(struct listener_for_creation *args, struct osc_str *data); @@ -4404,7 +4860,10 @@ static int permissions_on_resource_setter(struct permissions_on_resource *args, static int permissions_on_resource_creation_setter(struct permissions_on_resource_creation *args, struct osc_str *data); static int phase1_options_setter(struct phase1_options *args, struct osc_str *data); static int phase2_options_setter(struct phase2_options *args, struct osc_str *data); +static int phase2_options_to_update_setter(struct phase2_options_to_update *args, struct osc_str *data); static int placement_setter(struct placement *args, struct osc_str *data); +static int policy_setter(struct policy *args, struct osc_str *data); +static int policy_version_setter(struct policy_version *args, struct osc_str *data); static int private_ip_setter(struct private_ip *args, struct osc_str *data); static int private_ip_light_setter(struct private_ip_light *args, struct osc_str *data); static int private_ip_light_for_vm_setter(struct private_ip_light_for_vm *args, struct osc_str *data); @@ -4413,6 +4872,8 @@ static int public_ip_setter(struct public_ip *args, struct osc_str *data); static int public_ip_light_setter(struct public_ip_light *args, struct osc_str *data); static int quota_setter(struct quota *args, struct osc_str *data); static int quota_types_setter(struct quota_types *args, struct osc_str *data); +static int read_linked_policies_filters_setter(struct read_linked_policies_filters *args, struct osc_str *data); +static int read_policies_filters_setter(struct read_policies_filters *args, struct osc_str *data); static int region_setter(struct region *args, struct osc_str *data); static int resource_load_balancer_tag_setter(struct resource_load_balancer_tag *args, struct osc_str *data); static int resource_tag_setter(struct resource_tag *args, struct osc_str *data); @@ -4446,6 +4907,7 @@ static int vm_type_setter(struct vm_type *args, struct osc_str *data); static int volume_setter(struct volume *args, struct osc_str *data); static int vpn_connection_setter(struct vpn_connection *args, struct osc_str *data); static int vpn_options_setter(struct vpn_options *args, struct osc_str *data); +static int vpn_options_to_update_setter(struct vpn_options_to_update *args, struct osc_str *data); static int with_setter(struct with *args, struct osc_str *data); static int accepter_net_setter(struct accepter_net *args, struct osc_str *data) { int count_args = 0; @@ -5132,6 +5594,10 @@ static int consumption_entry_setter(struct consumption_entry *args, struct osc_s ARG_TO_JSON_STR("\"PayingAccountId\":", args->paying_account_id); ret += 1; } + if (args->is_set_price || args->price) { + ARG_TO_JSON(Price, double, args->price); + ret += 1; + } if (args->service) { TRY_APPEND_COL(count_args, data); ARG_TO_JSON_STR("\"Service\":", args->service); @@ -5157,44 +5623,109 @@ static int consumption_entry_setter(struct consumption_entry *args, struct osc_s ARG_TO_JSON_STR("\"Type\":", args->type); ret += 1; } + if (args->is_set_unit_price || args->unit_price) { + ARG_TO_JSON(UnitPrice, double, args->unit_price); + ret += 1; + } if (args->is_set_value || args->value) { ARG_TO_JSON(Value, double, args->value); ret += 1; } return !!ret; } -static int dhcp_options_set_setter(struct dhcp_options_set *args, struct osc_str *data) { +static int dedicated_group_setter(struct dedicated_group *args, struct osc_str *data) { int count_args = 0; int ret = 0; - if (args->is_set_default_arg) { - ARG_TO_JSON(Default, bool, args->default_arg); + if (args->account_id) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"AccountId\":", args->account_id); ret += 1; } - if (args->dhcp_options_set_id) { + if (args->is_set_cpu_generation || args->cpu_generation) { + ARG_TO_JSON(CpuGeneration, int, args->cpu_generation); + ret += 1; + } + if (args->dedicated_group_id) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"DhcpOptionsSetId\":", args->dhcp_options_set_id); + ARG_TO_JSON_STR("\"DedicatedGroupId\":", args->dedicated_group_id); ret += 1; } - if (args->domain_name) { + if (args->name) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"DomainName\":", args->domain_name); + ARG_TO_JSON_STR("\"Name\":", args->name); ret += 1; } - if (args->domain_name_servers) { + if (args->net_ids) { char **as; TRY_APPEND_COL(count_args, data); - STRY(osc_str_append_string(data, "\"DomainNameServers\":[" )); - for (as = args->domain_name_servers; *as > 0; ++as) { - if (as != args->domain_name_servers) + STRY(osc_str_append_string(data, "\"NetIds\":[" )); + for (as = args->net_ids; *as > 0; ++as) { + if (as != args->net_ids) STRY(osc_str_append_string(data, "," )); ARG_TO_JSON_STR("", *as); } STRY(osc_str_append_string(data, "]" )); ret += 1; - } else if (args->domain_name_servers_str) { - ARG_TO_JSON(DomainNameServers, string, args->domain_name_servers_str); - ret += 1; + } else if (args->net_ids_str) { + ARG_TO_JSON(NetIds, string, args->net_ids_str); + ret += 1; + } + if (args->subregion_name) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"SubregionName\":", args->subregion_name); + ret += 1; + } + if (args->vm_ids) { + char **as; + + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"VmIds\":[" )); + for (as = args->vm_ids; *as > 0; ++as) { + if (as != args->vm_ids) + STRY(osc_str_append_string(data, "," )); + ARG_TO_JSON_STR("", *as); + } + STRY(osc_str_append_string(data, "]" )); + ret += 1; + } else if (args->vm_ids_str) { + ARG_TO_JSON(VmIds, string, args->vm_ids_str); + ret += 1; + } + return !!ret; +} +static int dhcp_options_set_setter(struct dhcp_options_set *args, struct osc_str *data) { + int count_args = 0; + int ret = 0; + if (args->is_set_default_arg) { + ARG_TO_JSON(Default, bool, args->default_arg); + ret += 1; + } + if (args->dhcp_options_set_id) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"DhcpOptionsSetId\":", args->dhcp_options_set_id); + ret += 1; + } + if (args->domain_name) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"DomainName\":", args->domain_name); + ret += 1; + } + if (args->domain_name_servers) { + char **as; + + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"DomainNameServers\":[" )); + for (as = args->domain_name_servers; *as > 0; ++as) { + if (as != args->domain_name_servers) + STRY(osc_str_append_string(data, "," )); + ARG_TO_JSON_STR("", *as); + } + STRY(osc_str_append_string(data, "]" )); + ret += 1; + } else if (args->domain_name_servers_str) { + ARG_TO_JSON(DomainNameServers, string, args->domain_name_servers_str); + ret += 1; } if (args->log_servers) { char **as; @@ -5872,6 +6403,75 @@ static int filters_client_gateway_setter(struct filters_client_gateway *args, st } return !!ret; } +static int filters_dedicated_group_setter(struct filters_dedicated_group *args, struct osc_str *data) { + int count_args = 0; + int ret = 0; + if (args->cpu_generations) { + int *ip; + + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"CpuGenerations\":[" )); + for (ip = args->cpu_generations; *ip > 0; ++ip) { + if (ip != args->cpu_generations) + STRY(osc_str_append_string(data, "," )); + STRY(osc_str_append_int(data, *ip)); + } + STRY(osc_str_append_string(data, "]" )); + ret += 1; + } else if (args->cpu_generations_str) { + ARG_TO_JSON(CpuGenerations, string, args->cpu_generations_str); + ret += 1; + } + if (args->dedicated_group_ids) { + char **as; + + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"DedicatedGroupIds\":[" )); + for (as = args->dedicated_group_ids; *as > 0; ++as) { + if (as != args->dedicated_group_ids) + STRY(osc_str_append_string(data, "," )); + ARG_TO_JSON_STR("", *as); + } + STRY(osc_str_append_string(data, "]" )); + ret += 1; + } else if (args->dedicated_group_ids_str) { + ARG_TO_JSON(DedicatedGroupIds, string, args->dedicated_group_ids_str); + ret += 1; + } + if (args->names) { + char **as; + + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"Names\":[" )); + for (as = args->names; *as > 0; ++as) { + if (as != args->names) + STRY(osc_str_append_string(data, "," )); + ARG_TO_JSON_STR("", *as); + } + STRY(osc_str_append_string(data, "]" )); + ret += 1; + } else if (args->names_str) { + ARG_TO_JSON(Names, string, args->names_str); + ret += 1; + } + if (args->subregion_names) { + char **as; + + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"SubregionNames\":[" )); + for (as = args->subregion_names; *as > 0; ++as) { + if (as != args->subregion_names) + STRY(osc_str_append_string(data, "," )); + ARG_TO_JSON_STR("", *as); + } + STRY(osc_str_append_string(data, "]" )); + ret += 1; + } else if (args->subregion_names_str) { + ARG_TO_JSON(SubregionNames, string, args->subregion_names_str); + ret += 1; + } + return !!ret; +} static int filters_dhcp_options_setter(struct filters_dhcp_options *args, struct osc_str *data) { int count_args = 0; int ret = 0; @@ -6412,6 +7012,22 @@ static int filters_image_setter(struct filters_image *args, struct osc_str *data ARG_TO_JSON(PermissionsToLaunchGlobalPermission, bool, args->permissions_to_launch_global_permission); ret += 1; } + if (args->product_code_names) { + char **as; + + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"ProductCodeNames\":[" )); + for (as = args->product_code_names; *as > 0; ++as) { + if (as != args->product_code_names) + STRY(osc_str_append_string(data, "," )); + ARG_TO_JSON_STR("", *as); + } + STRY(osc_str_append_string(data, "]" )); + ret += 1; + } else if (args->product_code_names_str) { + ARG_TO_JSON(ProductCodeNames, string, args->product_code_names_str); + ret += 1; + } if (args->product_codes) { char **as; @@ -6678,6 +7294,22 @@ static int filters_keypair_setter(struct filters_keypair *args, struct osc_str * ARG_TO_JSON(KeypairNames, string, args->keypair_names_str); ret += 1; } + if (args->keypair_types) { + char **as; + + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"KeypairTypes\":[" )); + for (as = args->keypair_types; *as > 0; ++as) { + if (as != args->keypair_types) + STRY(osc_str_append_string(data, "," )); + ARG_TO_JSON_STR("", *as); + } + STRY(osc_str_append_string(data, "]" )); + ret += 1; + } else if (args->keypair_types_str) { + ARG_TO_JSON(KeypairTypes, string, args->keypair_types_str); + ret += 1; + } return !!ret; } static int filters_listener_rule_setter(struct filters_listener_rule *args, struct osc_str *data) { @@ -7128,6 +7760,22 @@ static int filters_net_peering_setter(struct filters_net_peering *args, struct o ARG_TO_JSON(AccepterNetNetIds, string, args->accepter_net_net_ids_str); ret += 1; } + if (args->expiration_dates) { + char **as; + + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"ExpirationDates\":[" )); + for (as = args->expiration_dates; *as > 0; ++as) { + if (as != args->expiration_dates) + STRY(osc_str_append_string(data, "," )); + ARG_TO_JSON_STR("", *as); + } + STRY(osc_str_append_string(data, "]" )); + ret += 1; + } else if (args->expiration_dates_str) { + ARG_TO_JSON(ExpirationDates, string, args->expiration_dates_str); + ret += 1; + } if (args->net_peering_ids) { char **as; @@ -8230,22 +8878,6 @@ static int filters_route_table_setter(struct filters_route_table *args, struct o static int filters_security_group_setter(struct filters_security_group *args, struct osc_str *data) { int count_args = 0; int ret = 0; - if (args->account_ids) { - char **as; - - TRY_APPEND_COL(count_args, data); - STRY(osc_str_append_string(data, "\"AccountIds\":[" )); - for (as = args->account_ids; *as > 0; ++as) { - if (as != args->account_ids) - STRY(osc_str_append_string(data, "," )); - ARG_TO_JSON_STR("", *as); - } - STRY(osc_str_append_string(data, "]" )); - ret += 1; - } else if (args->account_ids_str) { - ARG_TO_JSON(AccountIds, string, args->account_ids_str); - ret += 1; - } if (args->descriptions) { char **as; @@ -9005,6 +9637,38 @@ static int filters_subnet_setter(struct filters_subnet *args, struct osc_str *da static int filters_subregion_setter(struct filters_subregion *args, struct osc_str *data) { int count_args = 0; int ret = 0; + if (args->region_names) { + char **as; + + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"RegionNames\":[" )); + for (as = args->region_names; *as > 0; ++as) { + if (as != args->region_names) + STRY(osc_str_append_string(data, "," )); + ARG_TO_JSON_STR("", *as); + } + STRY(osc_str_append_string(data, "]" )); + ret += 1; + } else if (args->region_names_str) { + ARG_TO_JSON(RegionNames, string, args->region_names_str); + ret += 1; + } + if (args->states) { + char **as; + + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"States\":[" )); + for (as = args->states; *as > 0; ++as) { + if (as != args->states) + STRY(osc_str_append_string(data, "," )); + ARG_TO_JSON_STR("", *as); + } + STRY(osc_str_append_string(data, "]" )); + ret += 1; + } else if (args->states_str) { + ARG_TO_JSON(States, string, args->states_str); + ret += 1; + } if (args->subregion_names) { char **as; @@ -9228,124 +9892,1024 @@ static int filters_virtual_gateway_setter(struct filters_virtual_gateway *args, static int filters_vm_setter(struct filters_vm *args, struct osc_str *data) { int count_args = 0; int ret = 0; - if (args->tag_keys) { + if (args->architectures) { char **as; TRY_APPEND_COL(count_args, data); - STRY(osc_str_append_string(data, "\"TagKeys\":[" )); - for (as = args->tag_keys; *as > 0; ++as) { - if (as != args->tag_keys) + STRY(osc_str_append_string(data, "\"Architectures\":[" )); + for (as = args->architectures; *as > 0; ++as) { + if (as != args->architectures) STRY(osc_str_append_string(data, "," )); ARG_TO_JSON_STR("", *as); } STRY(osc_str_append_string(data, "]" )); ret += 1; - } else if (args->tag_keys_str) { - ARG_TO_JSON(TagKeys, string, args->tag_keys_str); + } else if (args->architectures_str) { + ARG_TO_JSON(Architectures, string, args->architectures_str); ret += 1; } - if (args->tag_values) { + if (args->is_set_block_device_mapping_delete_on_vm_deletion) { + ARG_TO_JSON(BlockDeviceMappingDeleteOnVmDeletion, bool, args->block_device_mapping_delete_on_vm_deletion); + ret += 1; + } + if (args->block_device_mapping_device_names) { char **as; TRY_APPEND_COL(count_args, data); - STRY(osc_str_append_string(data, "\"TagValues\":[" )); - for (as = args->tag_values; *as > 0; ++as) { - if (as != args->tag_values) + STRY(osc_str_append_string(data, "\"BlockDeviceMappingDeviceNames\":[" )); + for (as = args->block_device_mapping_device_names; *as > 0; ++as) { + if (as != args->block_device_mapping_device_names) STRY(osc_str_append_string(data, "," )); ARG_TO_JSON_STR("", *as); } STRY(osc_str_append_string(data, "]" )); ret += 1; - } else if (args->tag_values_str) { - ARG_TO_JSON(TagValues, string, args->tag_values_str); + } else if (args->block_device_mapping_device_names_str) { + ARG_TO_JSON(BlockDeviceMappingDeviceNames, string, args->block_device_mapping_device_names_str); ret += 1; } - if (args->tags) { + if (args->block_device_mapping_link_dates) { char **as; TRY_APPEND_COL(count_args, data); - STRY(osc_str_append_string(data, "\"Tags\":[" )); - for (as = args->tags; *as > 0; ++as) { - if (as != args->tags) + STRY(osc_str_append_string(data, "\"BlockDeviceMappingLinkDates\":[" )); + for (as = args->block_device_mapping_link_dates; *as > 0; ++as) { + if (as != args->block_device_mapping_link_dates) STRY(osc_str_append_string(data, "," )); ARG_TO_JSON_STR("", *as); } STRY(osc_str_append_string(data, "]" )); ret += 1; - } else if (args->tags_str) { - ARG_TO_JSON(Tags, string, args->tags_str); + } else if (args->block_device_mapping_link_dates_str) { + ARG_TO_JSON(BlockDeviceMappingLinkDates, string, args->block_device_mapping_link_dates_str); ret += 1; } - if (args->vm_ids) { + if (args->block_device_mapping_states) { char **as; TRY_APPEND_COL(count_args, data); - STRY(osc_str_append_string(data, "\"VmIds\":[" )); - for (as = args->vm_ids; *as > 0; ++as) { - if (as != args->vm_ids) + STRY(osc_str_append_string(data, "\"BlockDeviceMappingStates\":[" )); + for (as = args->block_device_mapping_states; *as > 0; ++as) { + if (as != args->block_device_mapping_states) STRY(osc_str_append_string(data, "," )); ARG_TO_JSON_STR("", *as); } STRY(osc_str_append_string(data, "]" )); ret += 1; - } else if (args->vm_ids_str) { - ARG_TO_JSON(VmIds, string, args->vm_ids_str); + } else if (args->block_device_mapping_states_str) { + ARG_TO_JSON(BlockDeviceMappingStates, string, args->block_device_mapping_states_str); ret += 1; } - return !!ret; -} -static int filters_vm_group_setter(struct filters_vm_group *args, struct osc_str *data) { - int count_args = 0; - int ret = 0; - if (args->descriptions) { + if (args->block_device_mapping_volume_ids) { char **as; TRY_APPEND_COL(count_args, data); - STRY(osc_str_append_string(data, "\"Descriptions\":[" )); - for (as = args->descriptions; *as > 0; ++as) { - if (as != args->descriptions) + STRY(osc_str_append_string(data, "\"BlockDeviceMappingVolumeIds\":[" )); + for (as = args->block_device_mapping_volume_ids; *as > 0; ++as) { + if (as != args->block_device_mapping_volume_ids) STRY(osc_str_append_string(data, "," )); ARG_TO_JSON_STR("", *as); } STRY(osc_str_append_string(data, "]" )); ret += 1; - } else if (args->descriptions_str) { - ARG_TO_JSON(Descriptions, string, args->descriptions_str); + } else if (args->block_device_mapping_volume_ids_str) { + ARG_TO_JSON(BlockDeviceMappingVolumeIds, string, args->block_device_mapping_volume_ids_str); ret += 1; } - if (args->security_group_ids) { + if (args->client_tokens) { char **as; TRY_APPEND_COL(count_args, data); - STRY(osc_str_append_string(data, "\"SecurityGroupIds\":[" )); - for (as = args->security_group_ids; *as > 0; ++as) { - if (as != args->security_group_ids) + STRY(osc_str_append_string(data, "\"ClientTokens\":[" )); + for (as = args->client_tokens; *as > 0; ++as) { + if (as != args->client_tokens) STRY(osc_str_append_string(data, "," )); ARG_TO_JSON_STR("", *as); } STRY(osc_str_append_string(data, "]" )); ret += 1; - } else if (args->security_group_ids_str) { - ARG_TO_JSON(SecurityGroupIds, string, args->security_group_ids_str); + } else if (args->client_tokens_str) { + ARG_TO_JSON(ClientTokens, string, args->client_tokens_str); ret += 1; } - if (args->subnet_ids) { + if (args->creation_dates) { char **as; TRY_APPEND_COL(count_args, data); - STRY(osc_str_append_string(data, "\"SubnetIds\":[" )); - for (as = args->subnet_ids; *as > 0; ++as) { - if (as != args->subnet_ids) + STRY(osc_str_append_string(data, "\"CreationDates\":[" )); + for (as = args->creation_dates; *as > 0; ++as) { + if (as != args->creation_dates) STRY(osc_str_append_string(data, "," )); ARG_TO_JSON_STR("", *as); } STRY(osc_str_append_string(data, "]" )); ret += 1; - } else if (args->subnet_ids_str) { - ARG_TO_JSON(SubnetIds, string, args->subnet_ids_str); + } else if (args->creation_dates_str) { + ARG_TO_JSON(CreationDates, string, args->creation_dates_str); ret += 1; } - if (args->tag_keys) { + if (args->image_ids) { + char **as; + + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"ImageIds\":[" )); + for (as = args->image_ids; *as > 0; ++as) { + if (as != args->image_ids) + STRY(osc_str_append_string(data, "," )); + ARG_TO_JSON_STR("", *as); + } + STRY(osc_str_append_string(data, "]" )); + ret += 1; + } else if (args->image_ids_str) { + ARG_TO_JSON(ImageIds, string, args->image_ids_str); + ret += 1; + } + if (args->is_set_is_source_dest_checked) { + ARG_TO_JSON(IsSourceDestChecked, bool, args->is_source_dest_checked); + ret += 1; + } + if (args->keypair_names) { + char **as; + + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"KeypairNames\":[" )); + for (as = args->keypair_names; *as > 0; ++as) { + if (as != args->keypair_names) + STRY(osc_str_append_string(data, "," )); + ARG_TO_JSON_STR("", *as); + } + STRY(osc_str_append_string(data, "]" )); + ret += 1; + } else if (args->keypair_names_str) { + ARG_TO_JSON(KeypairNames, string, args->keypair_names_str); + ret += 1; + } + if (args->launch_numbers) { + int *ip; + + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"LaunchNumbers\":[" )); + for (ip = args->launch_numbers; *ip > 0; ++ip) { + if (ip != args->launch_numbers) + STRY(osc_str_append_string(data, "," )); + STRY(osc_str_append_int(data, *ip)); + } + STRY(osc_str_append_string(data, "]" )); + ret += 1; + } else if (args->launch_numbers_str) { + ARG_TO_JSON(LaunchNumbers, string, args->launch_numbers_str); + ret += 1; + } + if (args->lifecycles) { + char **as; + + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"Lifecycles\":[" )); + for (as = args->lifecycles; *as > 0; ++as) { + if (as != args->lifecycles) + STRY(osc_str_append_string(data, "," )); + ARG_TO_JSON_STR("", *as); + } + STRY(osc_str_append_string(data, "]" )); + ret += 1; + } else if (args->lifecycles_str) { + ARG_TO_JSON(Lifecycles, string, args->lifecycles_str); + ret += 1; + } + if (args->net_ids) { + char **as; + + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"NetIds\":[" )); + for (as = args->net_ids; *as > 0; ++as) { + if (as != args->net_ids) + STRY(osc_str_append_string(data, "," )); + ARG_TO_JSON_STR("", *as); + } + STRY(osc_str_append_string(data, "]" )); + ret += 1; + } else if (args->net_ids_str) { + ARG_TO_JSON(NetIds, string, args->net_ids_str); + ret += 1; + } + if (args->nic_account_ids) { + char **as; + + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"NicAccountIds\":[" )); + for (as = args->nic_account_ids; *as > 0; ++as) { + if (as != args->nic_account_ids) + STRY(osc_str_append_string(data, "," )); + ARG_TO_JSON_STR("", *as); + } + STRY(osc_str_append_string(data, "]" )); + ret += 1; + } else if (args->nic_account_ids_str) { + ARG_TO_JSON(NicAccountIds, string, args->nic_account_ids_str); + ret += 1; + } + if (args->nic_descriptions) { + char **as; + + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"NicDescriptions\":[" )); + for (as = args->nic_descriptions; *as > 0; ++as) { + if (as != args->nic_descriptions) + STRY(osc_str_append_string(data, "," )); + ARG_TO_JSON_STR("", *as); + } + STRY(osc_str_append_string(data, "]" )); + ret += 1; + } else if (args->nic_descriptions_str) { + ARG_TO_JSON(NicDescriptions, string, args->nic_descriptions_str); + ret += 1; + } + if (args->is_set_nic_is_source_dest_checked) { + ARG_TO_JSON(NicIsSourceDestChecked, bool, args->nic_is_source_dest_checked); + ret += 1; + } + if (args->is_set_nic_link_nic_delete_on_vm_deletion) { + ARG_TO_JSON(NicLinkNicDeleteOnVmDeletion, bool, args->nic_link_nic_delete_on_vm_deletion); + ret += 1; + } + if (args->nic_link_nic_device_numbers) { + int *ip; + + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"NicLinkNicDeviceNumbers\":[" )); + for (ip = args->nic_link_nic_device_numbers; *ip > 0; ++ip) { + if (ip != args->nic_link_nic_device_numbers) + STRY(osc_str_append_string(data, "," )); + STRY(osc_str_append_int(data, *ip)); + } + STRY(osc_str_append_string(data, "]" )); + ret += 1; + } else if (args->nic_link_nic_device_numbers_str) { + ARG_TO_JSON(NicLinkNicDeviceNumbers, string, args->nic_link_nic_device_numbers_str); + ret += 1; + } + if (args->nic_link_nic_link_nic_dates) { + char **as; + + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"NicLinkNicLinkNicDates\":[" )); + for (as = args->nic_link_nic_link_nic_dates; *as > 0; ++as) { + if (as != args->nic_link_nic_link_nic_dates) + STRY(osc_str_append_string(data, "," )); + ARG_TO_JSON_STR("", *as); + } + STRY(osc_str_append_string(data, "]" )); + ret += 1; + } else if (args->nic_link_nic_link_nic_dates_str) { + ARG_TO_JSON(NicLinkNicLinkNicDates, string, args->nic_link_nic_link_nic_dates_str); + ret += 1; + } + if (args->nic_link_nic_link_nic_ids) { + char **as; + + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"NicLinkNicLinkNicIds\":[" )); + for (as = args->nic_link_nic_link_nic_ids; *as > 0; ++as) { + if (as != args->nic_link_nic_link_nic_ids) + STRY(osc_str_append_string(data, "," )); + ARG_TO_JSON_STR("", *as); + } + STRY(osc_str_append_string(data, "]" )); + ret += 1; + } else if (args->nic_link_nic_link_nic_ids_str) { + ARG_TO_JSON(NicLinkNicLinkNicIds, string, args->nic_link_nic_link_nic_ids_str); + ret += 1; + } + if (args->nic_link_nic_states) { + char **as; + + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"NicLinkNicStates\":[" )); + for (as = args->nic_link_nic_states; *as > 0; ++as) { + if (as != args->nic_link_nic_states) + STRY(osc_str_append_string(data, "," )); + ARG_TO_JSON_STR("", *as); + } + STRY(osc_str_append_string(data, "]" )); + ret += 1; + } else if (args->nic_link_nic_states_str) { + ARG_TO_JSON(NicLinkNicStates, string, args->nic_link_nic_states_str); + ret += 1; + } + if (args->nic_link_nic_vm_account_ids) { + char **as; + + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"NicLinkNicVmAccountIds\":[" )); + for (as = args->nic_link_nic_vm_account_ids; *as > 0; ++as) { + if (as != args->nic_link_nic_vm_account_ids) + STRY(osc_str_append_string(data, "," )); + ARG_TO_JSON_STR("", *as); + } + STRY(osc_str_append_string(data, "]" )); + ret += 1; + } else if (args->nic_link_nic_vm_account_ids_str) { + ARG_TO_JSON(NicLinkNicVmAccountIds, string, args->nic_link_nic_vm_account_ids_str); + ret += 1; + } + if (args->nic_link_nic_vm_ids) { + char **as; + + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"NicLinkNicVmIds\":[" )); + for (as = args->nic_link_nic_vm_ids; *as > 0; ++as) { + if (as != args->nic_link_nic_vm_ids) + STRY(osc_str_append_string(data, "," )); + ARG_TO_JSON_STR("", *as); + } + STRY(osc_str_append_string(data, "]" )); + ret += 1; + } else if (args->nic_link_nic_vm_ids_str) { + ARG_TO_JSON(NicLinkNicVmIds, string, args->nic_link_nic_vm_ids_str); + ret += 1; + } + if (args->nic_link_public_ip_account_ids) { + char **as; + + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"NicLinkPublicIpAccountIds\":[" )); + for (as = args->nic_link_public_ip_account_ids; *as > 0; ++as) { + if (as != args->nic_link_public_ip_account_ids) + STRY(osc_str_append_string(data, "," )); + ARG_TO_JSON_STR("", *as); + } + STRY(osc_str_append_string(data, "]" )); + ret += 1; + } else if (args->nic_link_public_ip_account_ids_str) { + ARG_TO_JSON(NicLinkPublicIpAccountIds, string, args->nic_link_public_ip_account_ids_str); + ret += 1; + } + if (args->nic_link_public_ip_link_public_ip_ids) { + char **as; + + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"NicLinkPublicIpLinkPublicIpIds\":[" )); + for (as = args->nic_link_public_ip_link_public_ip_ids; *as > 0; ++as) { + if (as != args->nic_link_public_ip_link_public_ip_ids) + STRY(osc_str_append_string(data, "," )); + ARG_TO_JSON_STR("", *as); + } + STRY(osc_str_append_string(data, "]" )); + ret += 1; + } else if (args->nic_link_public_ip_link_public_ip_ids_str) { + ARG_TO_JSON(NicLinkPublicIpLinkPublicIpIds, string, args->nic_link_public_ip_link_public_ip_ids_str); + ret += 1; + } + if (args->nic_link_public_ip_public_ip_ids) { + char **as; + + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"NicLinkPublicIpPublicIpIds\":[" )); + for (as = args->nic_link_public_ip_public_ip_ids; *as > 0; ++as) { + if (as != args->nic_link_public_ip_public_ip_ids) + STRY(osc_str_append_string(data, "," )); + ARG_TO_JSON_STR("", *as); + } + STRY(osc_str_append_string(data, "]" )); + ret += 1; + } else if (args->nic_link_public_ip_public_ip_ids_str) { + ARG_TO_JSON(NicLinkPublicIpPublicIpIds, string, args->nic_link_public_ip_public_ip_ids_str); + ret += 1; + } + if (args->nic_link_public_ip_public_ips) { + char **as; + + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"NicLinkPublicIpPublicIps\":[" )); + for (as = args->nic_link_public_ip_public_ips; *as > 0; ++as) { + if (as != args->nic_link_public_ip_public_ips) + STRY(osc_str_append_string(data, "," )); + ARG_TO_JSON_STR("", *as); + } + STRY(osc_str_append_string(data, "]" )); + ret += 1; + } else if (args->nic_link_public_ip_public_ips_str) { + ARG_TO_JSON(NicLinkPublicIpPublicIps, string, args->nic_link_public_ip_public_ips_str); + ret += 1; + } + if (args->nic_mac_addresses) { + char **as; + + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"NicMacAddresses\":[" )); + for (as = args->nic_mac_addresses; *as > 0; ++as) { + if (as != args->nic_mac_addresses) + STRY(osc_str_append_string(data, "," )); + ARG_TO_JSON_STR("", *as); + } + STRY(osc_str_append_string(data, "]" )); + ret += 1; + } else if (args->nic_mac_addresses_str) { + ARG_TO_JSON(NicMacAddresses, string, args->nic_mac_addresses_str); + ret += 1; + } + if (args->nic_net_ids) { + char **as; + + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"NicNetIds\":[" )); + for (as = args->nic_net_ids; *as > 0; ++as) { + if (as != args->nic_net_ids) + STRY(osc_str_append_string(data, "," )); + ARG_TO_JSON_STR("", *as); + } + STRY(osc_str_append_string(data, "]" )); + ret += 1; + } else if (args->nic_net_ids_str) { + ARG_TO_JSON(NicNetIds, string, args->nic_net_ids_str); + ret += 1; + } + if (args->nic_nic_ids) { + char **as; + + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"NicNicIds\":[" )); + for (as = args->nic_nic_ids; *as > 0; ++as) { + if (as != args->nic_nic_ids) + STRY(osc_str_append_string(data, "," )); + ARG_TO_JSON_STR("", *as); + } + STRY(osc_str_append_string(data, "]" )); + ret += 1; + } else if (args->nic_nic_ids_str) { + ARG_TO_JSON(NicNicIds, string, args->nic_nic_ids_str); + ret += 1; + } + if (args->nic_private_ips_link_public_ip_account_ids) { + char **as; + + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"NicPrivateIpsLinkPublicIpAccountIds\":[" )); + for (as = args->nic_private_ips_link_public_ip_account_ids; *as > 0; ++as) { + if (as != args->nic_private_ips_link_public_ip_account_ids) + STRY(osc_str_append_string(data, "," )); + ARG_TO_JSON_STR("", *as); + } + STRY(osc_str_append_string(data, "]" )); + ret += 1; + } else if (args->nic_private_ips_link_public_ip_account_ids_str) { + ARG_TO_JSON(NicPrivateIpsLinkPublicIpAccountIds, string, args->nic_private_ips_link_public_ip_account_ids_str); + ret += 1; + } + if (args->nic_private_ips_link_public_ip_ids) { + char **as; + + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"NicPrivateIpsLinkPublicIpIds\":[" )); + for (as = args->nic_private_ips_link_public_ip_ids; *as > 0; ++as) { + if (as != args->nic_private_ips_link_public_ip_ids) + STRY(osc_str_append_string(data, "," )); + ARG_TO_JSON_STR("", *as); + } + STRY(osc_str_append_string(data, "]" )); + ret += 1; + } else if (args->nic_private_ips_link_public_ip_ids_str) { + ARG_TO_JSON(NicPrivateIpsLinkPublicIpIds, string, args->nic_private_ips_link_public_ip_ids_str); + ret += 1; + } + if (args->is_set_nic_private_ips_primary_ip) { + ARG_TO_JSON(NicPrivateIpsPrimaryIp, bool, args->nic_private_ips_primary_ip); + ret += 1; + } + if (args->nic_private_ips_private_ips) { + char **as; + + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"NicPrivateIpsPrivateIps\":[" )); + for (as = args->nic_private_ips_private_ips; *as > 0; ++as) { + if (as != args->nic_private_ips_private_ips) + STRY(osc_str_append_string(data, "," )); + ARG_TO_JSON_STR("", *as); + } + STRY(osc_str_append_string(data, "]" )); + ret += 1; + } else if (args->nic_private_ips_private_ips_str) { + ARG_TO_JSON(NicPrivateIpsPrivateIps, string, args->nic_private_ips_private_ips_str); + ret += 1; + } + if (args->nic_security_group_ids) { + char **as; + + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"NicSecurityGroupIds\":[" )); + for (as = args->nic_security_group_ids; *as > 0; ++as) { + if (as != args->nic_security_group_ids) + STRY(osc_str_append_string(data, "," )); + ARG_TO_JSON_STR("", *as); + } + STRY(osc_str_append_string(data, "]" )); + ret += 1; + } else if (args->nic_security_group_ids_str) { + ARG_TO_JSON(NicSecurityGroupIds, string, args->nic_security_group_ids_str); + ret += 1; + } + if (args->nic_security_group_names) { + char **as; + + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"NicSecurityGroupNames\":[" )); + for (as = args->nic_security_group_names; *as > 0; ++as) { + if (as != args->nic_security_group_names) + STRY(osc_str_append_string(data, "," )); + ARG_TO_JSON_STR("", *as); + } + STRY(osc_str_append_string(data, "]" )); + ret += 1; + } else if (args->nic_security_group_names_str) { + ARG_TO_JSON(NicSecurityGroupNames, string, args->nic_security_group_names_str); + ret += 1; + } + if (args->nic_states) { + char **as; + + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"NicStates\":[" )); + for (as = args->nic_states; *as > 0; ++as) { + if (as != args->nic_states) + STRY(osc_str_append_string(data, "," )); + ARG_TO_JSON_STR("", *as); + } + STRY(osc_str_append_string(data, "]" )); + ret += 1; + } else if (args->nic_states_str) { + ARG_TO_JSON(NicStates, string, args->nic_states_str); + ret += 1; + } + if (args->nic_subnet_ids) { + char **as; + + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"NicSubnetIds\":[" )); + for (as = args->nic_subnet_ids; *as > 0; ++as) { + if (as != args->nic_subnet_ids) + STRY(osc_str_append_string(data, "," )); + ARG_TO_JSON_STR("", *as); + } + STRY(osc_str_append_string(data, "]" )); + ret += 1; + } else if (args->nic_subnet_ids_str) { + ARG_TO_JSON(NicSubnetIds, string, args->nic_subnet_ids_str); + ret += 1; + } + if (args->nic_subregion_names) { + char **as; + + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"NicSubregionNames\":[" )); + for (as = args->nic_subregion_names; *as > 0; ++as) { + if (as != args->nic_subregion_names) + STRY(osc_str_append_string(data, "," )); + ARG_TO_JSON_STR("", *as); + } + STRY(osc_str_append_string(data, "]" )); + ret += 1; + } else if (args->nic_subregion_names_str) { + ARG_TO_JSON(NicSubregionNames, string, args->nic_subregion_names_str); + ret += 1; + } + if (args->platforms) { + char **as; + + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"Platforms\":[" )); + for (as = args->platforms; *as > 0; ++as) { + if (as != args->platforms) + STRY(osc_str_append_string(data, "," )); + ARG_TO_JSON_STR("", *as); + } + STRY(osc_str_append_string(data, "]" )); + ret += 1; + } else if (args->platforms_str) { + ARG_TO_JSON(Platforms, string, args->platforms_str); + ret += 1; + } + if (args->private_ips) { + char **as; + + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"PrivateIps\":[" )); + for (as = args->private_ips; *as > 0; ++as) { + if (as != args->private_ips) + STRY(osc_str_append_string(data, "," )); + ARG_TO_JSON_STR("", *as); + } + STRY(osc_str_append_string(data, "]" )); + ret += 1; + } else if (args->private_ips_str) { + ARG_TO_JSON(PrivateIps, string, args->private_ips_str); + ret += 1; + } + if (args->product_codes) { + char **as; + + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"ProductCodes\":[" )); + for (as = args->product_codes; *as > 0; ++as) { + if (as != args->product_codes) + STRY(osc_str_append_string(data, "," )); + ARG_TO_JSON_STR("", *as); + } + STRY(osc_str_append_string(data, "]" )); + ret += 1; + } else if (args->product_codes_str) { + ARG_TO_JSON(ProductCodes, string, args->product_codes_str); + ret += 1; + } + if (args->public_ips) { + char **as; + + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"PublicIps\":[" )); + for (as = args->public_ips; *as > 0; ++as) { + if (as != args->public_ips) + STRY(osc_str_append_string(data, "," )); + ARG_TO_JSON_STR("", *as); + } + STRY(osc_str_append_string(data, "]" )); + ret += 1; + } else if (args->public_ips_str) { + ARG_TO_JSON(PublicIps, string, args->public_ips_str); + ret += 1; + } + if (args->reservation_ids) { + char **as; + + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"ReservationIds\":[" )); + for (as = args->reservation_ids; *as > 0; ++as) { + if (as != args->reservation_ids) + STRY(osc_str_append_string(data, "," )); + ARG_TO_JSON_STR("", *as); + } + STRY(osc_str_append_string(data, "]" )); + ret += 1; + } else if (args->reservation_ids_str) { + ARG_TO_JSON(ReservationIds, string, args->reservation_ids_str); + ret += 1; + } + if (args->root_device_names) { + char **as; + + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"RootDeviceNames\":[" )); + for (as = args->root_device_names; *as > 0; ++as) { + if (as != args->root_device_names) + STRY(osc_str_append_string(data, "," )); + ARG_TO_JSON_STR("", *as); + } + STRY(osc_str_append_string(data, "]" )); + ret += 1; + } else if (args->root_device_names_str) { + ARG_TO_JSON(RootDeviceNames, string, args->root_device_names_str); + ret += 1; + } + if (args->root_device_types) { + char **as; + + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"RootDeviceTypes\":[" )); + for (as = args->root_device_types; *as > 0; ++as) { + if (as != args->root_device_types) + STRY(osc_str_append_string(data, "," )); + ARG_TO_JSON_STR("", *as); + } + STRY(osc_str_append_string(data, "]" )); + ret += 1; + } else if (args->root_device_types_str) { + ARG_TO_JSON(RootDeviceTypes, string, args->root_device_types_str); + ret += 1; + } + if (args->security_group_ids) { + char **as; + + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"SecurityGroupIds\":[" )); + for (as = args->security_group_ids; *as > 0; ++as) { + if (as != args->security_group_ids) + STRY(osc_str_append_string(data, "," )); + ARG_TO_JSON_STR("", *as); + } + STRY(osc_str_append_string(data, "]" )); + ret += 1; + } else if (args->security_group_ids_str) { + ARG_TO_JSON(SecurityGroupIds, string, args->security_group_ids_str); + ret += 1; + } + if (args->security_group_names) { + char **as; + + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"SecurityGroupNames\":[" )); + for (as = args->security_group_names; *as > 0; ++as) { + if (as != args->security_group_names) + STRY(osc_str_append_string(data, "," )); + ARG_TO_JSON_STR("", *as); + } + STRY(osc_str_append_string(data, "]" )); + ret += 1; + } else if (args->security_group_names_str) { + ARG_TO_JSON(SecurityGroupNames, string, args->security_group_names_str); + ret += 1; + } + if (args->state_reason_codes) { + int *ip; + + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"StateReasonCodes\":[" )); + for (ip = args->state_reason_codes; *ip > 0; ++ip) { + if (ip != args->state_reason_codes) + STRY(osc_str_append_string(data, "," )); + STRY(osc_str_append_int(data, *ip)); + } + STRY(osc_str_append_string(data, "]" )); + ret += 1; + } else if (args->state_reason_codes_str) { + ARG_TO_JSON(StateReasonCodes, string, args->state_reason_codes_str); + ret += 1; + } + if (args->state_reason_messages) { + char **as; + + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"StateReasonMessages\":[" )); + for (as = args->state_reason_messages; *as > 0; ++as) { + if (as != args->state_reason_messages) + STRY(osc_str_append_string(data, "," )); + ARG_TO_JSON_STR("", *as); + } + STRY(osc_str_append_string(data, "]" )); + ret += 1; + } else if (args->state_reason_messages_str) { + ARG_TO_JSON(StateReasonMessages, string, args->state_reason_messages_str); + ret += 1; + } + if (args->state_reasons) { + char **as; + + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"StateReasons\":[" )); + for (as = args->state_reasons; *as > 0; ++as) { + if (as != args->state_reasons) + STRY(osc_str_append_string(data, "," )); + ARG_TO_JSON_STR("", *as); + } + STRY(osc_str_append_string(data, "]" )); + ret += 1; + } else if (args->state_reasons_str) { + ARG_TO_JSON(StateReasons, string, args->state_reasons_str); + ret += 1; + } + if (args->subnet_ids) { + char **as; + + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"SubnetIds\":[" )); + for (as = args->subnet_ids; *as > 0; ++as) { + if (as != args->subnet_ids) + STRY(osc_str_append_string(data, "," )); + ARG_TO_JSON_STR("", *as); + } + STRY(osc_str_append_string(data, "]" )); + ret += 1; + } else if (args->subnet_ids_str) { + ARG_TO_JSON(SubnetIds, string, args->subnet_ids_str); + ret += 1; + } + if (args->subregion_names) { + char **as; + + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"SubregionNames\":[" )); + for (as = args->subregion_names; *as > 0; ++as) { + if (as != args->subregion_names) + STRY(osc_str_append_string(data, "," )); + ARG_TO_JSON_STR("", *as); + } + STRY(osc_str_append_string(data, "]" )); + ret += 1; + } else if (args->subregion_names_str) { + ARG_TO_JSON(SubregionNames, string, args->subregion_names_str); + ret += 1; + } + if (args->tag_keys) { + char **as; + + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"TagKeys\":[" )); + for (as = args->tag_keys; *as > 0; ++as) { + if (as != args->tag_keys) + STRY(osc_str_append_string(data, "," )); + ARG_TO_JSON_STR("", *as); + } + STRY(osc_str_append_string(data, "]" )); + ret += 1; + } else if (args->tag_keys_str) { + ARG_TO_JSON(TagKeys, string, args->tag_keys_str); + ret += 1; + } + if (args->tag_values) { + char **as; + + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"TagValues\":[" )); + for (as = args->tag_values; *as > 0; ++as) { + if (as != args->tag_values) + STRY(osc_str_append_string(data, "," )); + ARG_TO_JSON_STR("", *as); + } + STRY(osc_str_append_string(data, "]" )); + ret += 1; + } else if (args->tag_values_str) { + ARG_TO_JSON(TagValues, string, args->tag_values_str); + ret += 1; + } + if (args->tags) { + char **as; + + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"Tags\":[" )); + for (as = args->tags; *as > 0; ++as) { + if (as != args->tags) + STRY(osc_str_append_string(data, "," )); + ARG_TO_JSON_STR("", *as); + } + STRY(osc_str_append_string(data, "]" )); + ret += 1; + } else if (args->tags_str) { + ARG_TO_JSON(Tags, string, args->tags_str); + ret += 1; + } + if (args->tenancies) { + char **as; + + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"Tenancies\":[" )); + for (as = args->tenancies; *as > 0; ++as) { + if (as != args->tenancies) + STRY(osc_str_append_string(data, "," )); + ARG_TO_JSON_STR("", *as); + } + STRY(osc_str_append_string(data, "]" )); + ret += 1; + } else if (args->tenancies_str) { + ARG_TO_JSON(Tenancies, string, args->tenancies_str); + ret += 1; + } + if (args->vm_ids) { + char **as; + + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"VmIds\":[" )); + for (as = args->vm_ids; *as > 0; ++as) { + if (as != args->vm_ids) + STRY(osc_str_append_string(data, "," )); + ARG_TO_JSON_STR("", *as); + } + STRY(osc_str_append_string(data, "]" )); + ret += 1; + } else if (args->vm_ids_str) { + ARG_TO_JSON(VmIds, string, args->vm_ids_str); + ret += 1; + } + if (args->vm_security_group_ids) { + char **as; + + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"VmSecurityGroupIds\":[" )); + for (as = args->vm_security_group_ids; *as > 0; ++as) { + if (as != args->vm_security_group_ids) + STRY(osc_str_append_string(data, "," )); + ARG_TO_JSON_STR("", *as); + } + STRY(osc_str_append_string(data, "]" )); + ret += 1; + } else if (args->vm_security_group_ids_str) { + ARG_TO_JSON(VmSecurityGroupIds, string, args->vm_security_group_ids_str); + ret += 1; + } + if (args->vm_security_group_names) { + char **as; + + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"VmSecurityGroupNames\":[" )); + for (as = args->vm_security_group_names; *as > 0; ++as) { + if (as != args->vm_security_group_names) + STRY(osc_str_append_string(data, "," )); + ARG_TO_JSON_STR("", *as); + } + STRY(osc_str_append_string(data, "]" )); + ret += 1; + } else if (args->vm_security_group_names_str) { + ARG_TO_JSON(VmSecurityGroupNames, string, args->vm_security_group_names_str); + ret += 1; + } + if (args->vm_state_codes) { + int *ip; + + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"VmStateCodes\":[" )); + for (ip = args->vm_state_codes; *ip > 0; ++ip) { + if (ip != args->vm_state_codes) + STRY(osc_str_append_string(data, "," )); + STRY(osc_str_append_int(data, *ip)); + } + STRY(osc_str_append_string(data, "]" )); + ret += 1; + } else if (args->vm_state_codes_str) { + ARG_TO_JSON(VmStateCodes, string, args->vm_state_codes_str); + ret += 1; + } + if (args->vm_state_names) { + char **as; + + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"VmStateNames\":[" )); + for (as = args->vm_state_names; *as > 0; ++as) { + if (as != args->vm_state_names) + STRY(osc_str_append_string(data, "," )); + ARG_TO_JSON_STR("", *as); + } + STRY(osc_str_append_string(data, "]" )); + ret += 1; + } else if (args->vm_state_names_str) { + ARG_TO_JSON(VmStateNames, string, args->vm_state_names_str); + ret += 1; + } + if (args->vm_types) { + char **as; + + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"VmTypes\":[" )); + for (as = args->vm_types; *as > 0; ++as) { + if (as != args->vm_types) + STRY(osc_str_append_string(data, "," )); + ARG_TO_JSON_STR("", *as); + } + STRY(osc_str_append_string(data, "]" )); + ret += 1; + } else if (args->vm_types_str) { + ARG_TO_JSON(VmTypes, string, args->vm_types_str); + ret += 1; + } + return !!ret; +} +static int filters_vm_group_setter(struct filters_vm_group *args, struct osc_str *data) { + int count_args = 0; + int ret = 0; + if (args->descriptions) { + char **as; + + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"Descriptions\":[" )); + for (as = args->descriptions; *as > 0; ++as) { + if (as != args->descriptions) + STRY(osc_str_append_string(data, "," )); + ARG_TO_JSON_STR("", *as); + } + STRY(osc_str_append_string(data, "]" )); + ret += 1; + } else if (args->descriptions_str) { + ARG_TO_JSON(Descriptions, string, args->descriptions_str); + ret += 1; + } + if (args->security_group_ids) { + char **as; + + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"SecurityGroupIds\":[" )); + for (as = args->security_group_ids; *as > 0; ++as) { + if (as != args->security_group_ids) + STRY(osc_str_append_string(data, "," )); + ARG_TO_JSON_STR("", *as); + } + STRY(osc_str_append_string(data, "]" )); + ret += 1; + } else if (args->security_group_ids_str) { + ARG_TO_JSON(SecurityGroupIds, string, args->security_group_ids_str); + ret += 1; + } + if (args->subnet_ids) { + char **as; + + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"SubnetIds\":[" )); + for (as = args->subnet_ids; *as > 0; ++as) { + if (as != args->subnet_ids) + STRY(osc_str_append_string(data, "," )); + ARG_TO_JSON_STR("", *as); + } + STRY(osc_str_append_string(data, "]" )); + ret += 1; + } else if (args->subnet_ids_str) { + ARG_TO_JSON(SubnetIds, string, args->subnet_ids_str); + ret += 1; + } + if (args->tag_keys) { char **as; TRY_APPEND_COL(count_args, data); @@ -9663,6 +11227,54 @@ static int filters_vm_type_setter(struct filters_vm_type *args, struct osc_str * ARG_TO_JSON(BsuOptimized, bool, args->bsu_optimized); ret += 1; } + if (args->ephemerals_types) { + char **as; + + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"EphemeralsTypes\":[" )); + for (as = args->ephemerals_types; *as > 0; ++as) { + if (as != args->ephemerals_types) + STRY(osc_str_append_string(data, "," )); + ARG_TO_JSON_STR("", *as); + } + STRY(osc_str_append_string(data, "]" )); + ret += 1; + } else if (args->ephemerals_types_str) { + ARG_TO_JSON(EphemeralsTypes, string, args->ephemerals_types_str); + ret += 1; + } + if (args->eths) { + int *ip; + + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"Eths\":[" )); + for (ip = args->eths; *ip > 0; ++ip) { + if (ip != args->eths) + STRY(osc_str_append_string(data, "," )); + STRY(osc_str_append_int(data, *ip)); + } + STRY(osc_str_append_string(data, "]" )); + ret += 1; + } else if (args->eths_str) { + ARG_TO_JSON(Eths, string, args->eths_str); + ret += 1; + } + if (args->gpus) { + int *ip; + + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"Gpus\":[" )); + for (ip = args->gpus; *ip > 0; ++ip) { + if (ip != args->gpus) + STRY(osc_str_append_string(data, "," )); + STRY(osc_str_append_int(data, *ip)); + } + STRY(osc_str_append_string(data, "]" )); + ret += 1; + } else if (args->gpus_str) { + ARG_TO_JSON(Gpus, string, args->gpus_str); + ret += 1; + } if (args->memory_sizes) { double *ip; @@ -10621,6 +12233,11 @@ static int keypair_setter(struct keypair *args, struct osc_str *data) { ARG_TO_JSON_STR("\"KeypairName\":", args->keypair_name); ret += 1; } + if (args->keypair_type) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"KeypairType\":", args->keypair_type); + ret += 1; + } return !!ret; } static int keypair_created_setter(struct keypair_created *args, struct osc_str *data) { @@ -10636,6 +12253,11 @@ static int keypair_created_setter(struct keypair_created *args, struct osc_str * ARG_TO_JSON_STR("\"KeypairName\":", args->keypair_name); ret += 1; } + if (args->keypair_type) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"KeypairType\":", args->keypair_type); + ret += 1; + } if (args->private_key) { TRY_APPEND_COL(count_args, data); ARG_TO_JSON_STR("\"PrivateKey\":", args->private_key); @@ -10775,6 +12397,11 @@ static int link_route_table_setter(struct link_route_table *args, struct osc_str ARG_TO_JSON(Main, bool, args->main); ret += 1; } + if (args->net_id) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"NetId\":", args->net_id); + ret += 1; + } if (args->route_table_id) { TRY_APPEND_COL(count_args, data); ARG_TO_JSON_STR("\"RouteTableId\":", args->route_table_id); @@ -10787,6 +12414,36 @@ static int link_route_table_setter(struct link_route_table *args, struct osc_str } return !!ret; } +static int linked_policy_setter(struct linked_policy *args, struct osc_str *data) { + int count_args = 0; + int ret = 0; + if (args->creation_date) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"CreationDate\":", args->creation_date); + ret += 1; + } + if (args->last_modification_date) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"LastModificationDate\":", args->last_modification_date); + ret += 1; + } + if (args->orn) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"Orn\":", args->orn); + ret += 1; + } + if (args->policy_id) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"PolicyId\":", args->policy_id); + ret += 1; + } + if (args->policy_name) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"PolicyName\":", args->policy_name); + ret += 1; + } + return !!ret; +} static int linked_volume_setter(struct linked_volume *args, struct osc_str *data) { int count_args = 0; int ret = 0; @@ -11535,6 +13192,11 @@ static int net_peering_setter(struct net_peering *args, struct osc_str *data) { STRY(osc_str_append_string(data, "}" )); ret += 1; } + if (args->expiration_date) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"ExpirationDate\":", args->expiration_date); + ret += 1; + } if (args->net_peering_id) { TRY_APPEND_COL(count_args, data); ARG_TO_JSON_STR("\"NetPeeringId\":", args->net_peering_id); @@ -12205,19 +13867,106 @@ static int phase2_options_setter(struct phase2_options *args, struct osc_str *da ARG_TO_JSON_STR("\"PreSharedKey\":", args->pre_shared_key); ret += 1; } - return !!ret; -} -static int placement_setter(struct placement *args, struct osc_str *data) { - int count_args = 0; - int ret = 0; - if (args->subregion_name) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"SubregionName\":", args->subregion_name); + return !!ret; +} +static int phase2_options_to_update_setter(struct phase2_options_to_update *args, struct osc_str *data) { + int count_args = 0; + int ret = 0; + if (args->pre_shared_key) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"PreSharedKey\":", args->pre_shared_key); + ret += 1; + } + return !!ret; +} +static int placement_setter(struct placement *args, struct osc_str *data) { + int count_args = 0; + int ret = 0; + if (args->subregion_name) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"SubregionName\":", args->subregion_name); + ret += 1; + } + if (args->tenancy) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"Tenancy\":", args->tenancy); + ret += 1; + } + return !!ret; +} +static int policy_setter(struct policy *args, struct osc_str *data) { + int count_args = 0; + int ret = 0; + if (args->creation_date) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"CreationDate\":", args->creation_date); + ret += 1; + } + if (args->description) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"Description\":", args->description); + ret += 1; + } + if (args->is_set_is_linkable) { + ARG_TO_JSON(IsLinkable, bool, args->is_linkable); + ret += 1; + } + if (args->last_modification_date) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"LastModificationDate\":", args->last_modification_date); + ret += 1; + } + if (args->orn) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"Orn\":", args->orn); + ret += 1; + } + if (args->path) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"Path\":", args->path); + ret += 1; + } + if (args->policy_default_version_id) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"PolicyDefaultVersionId\":", args->policy_default_version_id); + ret += 1; + } + if (args->policy_id) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"PolicyId\":", args->policy_id); + ret += 1; + } + if (args->policy_name) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"PolicyName\":", args->policy_name); + ret += 1; + } + if (args->is_set_resources_count || args->resources_count) { + ARG_TO_JSON(ResourcesCount, int, args->resources_count); + ret += 1; + } + return !!ret; +} +static int policy_version_setter(struct policy_version *args, struct osc_str *data) { + int count_args = 0; + int ret = 0; + if (args->body) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"Body\":", args->body); + ret += 1; + } + if (args->creation_date) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"CreationDate\":", args->creation_date); + ret += 1; + } + if (args->is_set_default_version) { + ARG_TO_JSON(DefaultVersion, bool, args->default_version); ret += 1; } - if (args->tenancy) { + if (args->version_id) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"Tenancy\":", args->tenancy); + ARG_TO_JSON_STR("\"VersionId\":", args->version_id); ret += 1; } return !!ret; @@ -12453,6 +14202,35 @@ static int quota_types_setter(struct quota_types *args, struct osc_str *data) { } return !!ret; } +static int read_linked_policies_filters_setter(struct read_linked_policies_filters *args, struct osc_str *data) { + int count_args = 0; + int ret = 0; + if (args->path_prefix) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"PathPrefix\":", args->path_prefix); + ret += 1; + } + return !!ret; +} +static int read_policies_filters_setter(struct read_policies_filters *args, struct osc_str *data) { + int count_args = 0; + int ret = 0; + if (args->is_set_only_linked) { + ARG_TO_JSON(OnlyLinked, bool, args->only_linked); + ret += 1; + } + if (args->path_prefix) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"PathPrefix\":", args->path_prefix); + ret += 1; + } + if (args->scope) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"Scope\":", args->scope); + ret += 1; + } + return !!ret; +} static int region_setter(struct region *args, struct osc_str *data) { int count_args = 0; int ret = 0; @@ -13790,6 +15568,19 @@ static int vm_type_setter(struct vm_type *args, struct osc_str *data) { ARG_TO_JSON(BsuOptimized, bool, args->bsu_optimized); ret += 1; } + if (args->ephemerals_type) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"EphemeralsType\":", args->ephemerals_type); + ret += 1; + } + if (args->is_set_eth || args->eth) { + ARG_TO_JSON(Eth, int, args->eth); + ret += 1; + } + if (args->is_set_gpu || args->gpu) { + ARG_TO_JSON(Gpu, int, args->gpu); + ret += 1; + } if (args->is_set_max_private_ips || args->max_private_ips) { ARG_TO_JSON(MaxPrivateIps, int, args->max_private_ips); ret += 1; @@ -14029,6 +15820,26 @@ static int vpn_options_setter(struct vpn_options *args, struct osc_str *data) { } return !!ret; } +static int vpn_options_to_update_setter(struct vpn_options_to_update *args, struct osc_str *data) { + int count_args = 0; + int ret = 0; + if (args->phase2_options_str) { + ARG_TO_JSON(Phase2Options, string, args->phase2_options_str); + ret += 1; + } else if (args->is_set_phase2_options) { + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"Phase2Options\": { " )); + STRY(phase2_options_to_update_setter(&args->phase2_options, data) < 0); + STRY(osc_str_append_string(data, "}" )); + ret += 1; + } + if (args->tunnel_inside_ip_range) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"TunnelInsideIpRange\":", args->tunnel_inside_ip_range); + ret += 1; + } + return !!ret; +} static int with_setter(struct with *args, struct osc_str *data) { int count_args = 0; int ret = 0; @@ -14132,7 +15943,7 @@ static int update_vpn_connection_data(struct osc_update_vpn_connection_arg *arg } else if (args->is_set_vpn_options) { TRY_APPEND_COL(count_args, data); STRY(osc_str_append_string(data, "\"VpnOptions\": { " )); - STRY(vpn_options_setter(&args->vpn_options, data) < 0); + STRY(vpn_options_to_update_setter(&args->vpn_options, data) < 0); STRY(osc_str_append_string(data, "}" )); ret += 1; } @@ -14734,6 +16545,59 @@ int osc_update_server_certificate(struct osc_env *e, struct osc_str *out, struct osc_deinit_str(&data); return res; } +static int update_route_table_link_data(struct osc_update_route_table_link_arg *args, struct osc_str *data) +{ + int ret = 0; + int count_args = 0; + + if (!args) + return 0; + osc_str_append_string(data, "{"); + if (args->is_set_dry_run) { + ARG_TO_JSON(DryRun, bool, args->dry_run); + ret += 1; + } + if (args->link_route_table_id) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"LinkRouteTableId\":", args->link_route_table_id); + ret += 1; + } + if (args->route_table_id) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"RouteTableId\":", args->route_table_id); + ret += 1; + } + osc_str_append_string(data, "}"); + return !!ret; +} + +int osc_update_route_table_link(struct osc_env *e, struct osc_str *out, struct osc_update_route_table_link_arg *args) +{ + CURLcode res = CURLE_OUT_OF_MEMORY; + struct osc_str data; + struct osc_str end_call; + int r; + + osc_init_str(&data); + osc_init_str(&end_call); + r = update_route_table_link_data(args, &data); + if (r < 0) + goto out; + + osc_str_append_string(&end_call, e->endpoint.buf); + osc_str_append_string(&end_call, "/api/v1/UpdateRouteTableLink"); + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); + if (e->flag & OSC_VERBOSE_MODE) { + printf("\n%s\n\n", data.buf); + } + res = curl_easy_perform(e->c); +out: + osc_deinit_str(&end_call); + osc_deinit_str(&data); + return res; +} static int update_route_propagation_data(struct osc_update_route_propagation_arg *args, struct osc_str *data) { int ret = 0; @@ -15419,6 +17283,59 @@ int osc_update_direct_link_interface(struct osc_env *e, struct osc_str *out, str osc_deinit_str(&data); return res; } +static int update_dedicated_group_data(struct osc_update_dedicated_group_arg *args, struct osc_str *data) +{ + int ret = 0; + int count_args = 0; + + if (!args) + return 0; + osc_str_append_string(data, "{"); + if (args->dedicated_group_id) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"DedicatedGroupId\":", args->dedicated_group_id); + ret += 1; + } + if (args->is_set_dry_run) { + ARG_TO_JSON(DryRun, bool, args->dry_run); + ret += 1; + } + if (args->name) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"Name\":", args->name); + ret += 1; + } + osc_str_append_string(data, "}"); + return !!ret; +} + +int osc_update_dedicated_group(struct osc_env *e, struct osc_str *out, struct osc_update_dedicated_group_arg *args) +{ + CURLcode res = CURLE_OUT_OF_MEMORY; + struct osc_str data; + struct osc_str end_call; + int r; + + osc_init_str(&data); + osc_init_str(&end_call); + r = update_dedicated_group_data(args, &data); + if (r < 0) + goto out; + + osc_str_append_string(&end_call, e->endpoint.buf); + osc_str_append_string(&end_call, "/api/v1/UpdateDedicatedGroup"); + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); + if (e->flag & OSC_VERBOSE_MODE) { + printf("\n%s\n\n", data.buf); + } + res = curl_easy_perform(e->c); +out: + osc_deinit_str(&end_call); + osc_deinit_str(&data); + return res; +} static int update_ca_data(struct osc_update_ca_arg *args, struct osc_str *data) { int ret = 0; @@ -16076,6 +17993,59 @@ int osc_unlink_private_ips(struct osc_env *e, struct osc_str *out, struct osc_un osc_deinit_str(&data); return res; } +static int unlink_policy_data(struct osc_unlink_policy_arg *args, struct osc_str *data) +{ + int ret = 0; + int count_args = 0; + + if (!args) + return 0; + osc_str_append_string(data, "{"); + if (args->is_set_dry_run) { + ARG_TO_JSON(DryRun, bool, args->dry_run); + ret += 1; + } + if (args->policy_orn) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"PolicyOrn\":", args->policy_orn); + ret += 1; + } + if (args->user_name) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"UserName\":", args->user_name); + ret += 1; + } + osc_str_append_string(data, "}"); + return !!ret; +} + +int osc_unlink_policy(struct osc_env *e, struct osc_str *out, struct osc_unlink_policy_arg *args) +{ + CURLcode res = CURLE_OUT_OF_MEMORY; + struct osc_str data; + struct osc_str end_call; + int r; + + osc_init_str(&data); + osc_init_str(&end_call); + r = unlink_policy_data(args, &data); + if (r < 0) + goto out; + + osc_str_append_string(&end_call, e->endpoint.buf); + osc_str_append_string(&end_call, "/api/v1/UnlinkPolicy"); + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); + if (e->flag & OSC_VERBOSE_MODE) { + printf("\n%s\n\n", data.buf); + } + res = curl_easy_perform(e->c); +out: + osc_deinit_str(&end_call); + osc_deinit_str(&data); + return res; +} static int unlink_nic_data(struct osc_unlink_nic_arg *args, struct osc_str *data) { int ret = 0; @@ -16427,7 +18397,7 @@ int osc_start_vms(struct osc_env *e, struct osc_str *out, struct osc_start_vms_a osc_deinit_str(&data); return res; } -static int send_reset_password_email_data(struct osc_send_reset_password_email_arg *args, struct osc_str *data) +static int set_default_policy_version_data(struct osc_set_default_policy_version_arg *args, struct osc_str *data) { int ret = 0; int count_args = 0; @@ -16435,20 +18405,21 @@ static int send_reset_password_email_data(struct osc_send_reset_password_email_ if (!args) return 0; osc_str_append_string(data, "{"); - if (args->is_set_dry_run) { - ARG_TO_JSON(DryRun, bool, args->dry_run); + if (args->policy_orn) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"PolicyOrn\":", args->policy_orn); ret += 1; } - if (args->email) { + if (args->version_id) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"Email\":", args->email); + ARG_TO_JSON_STR("\"VersionId\":", args->version_id); ret += 1; } osc_str_append_string(data, "}"); return !!ret; } -int osc_send_reset_password_email(struct osc_env *e, struct osc_str *out, struct osc_send_reset_password_email_arg *args) +int osc_set_default_policy_version(struct osc_env *e, struct osc_str *out, struct osc_set_default_policy_version_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; @@ -16457,12 +18428,12 @@ int osc_send_reset_password_email(struct osc_env *e, struct osc_str *out, struct osc_init_str(&data); osc_init_str(&end_call); - r = send_reset_password_email_data(args, &data); + r = set_default_policy_version_data(args, &data); if (r < 0) goto out; osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/SendResetPasswordEmail"); + osc_str_append_string(&end_call, "/api/v1/SetDefaultPolicyVersion"); curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); @@ -16509,64 +18480,12 @@ int osc_scale_up_vm_group(struct osc_env *e, struct osc_str *out, struct osc_sca osc_init_str(&data); osc_init_str(&end_call); - r = scale_up_vm_group_data(args, &data); - if (r < 0) - goto out; - - osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/ScaleUpVmGroup"); - curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); - curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); - curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); - if (e->flag & OSC_VERBOSE_MODE) { - printf("\n%s\n\n", data.buf); - } - res = curl_easy_perform(e->c); -out: - osc_deinit_str(&end_call); - osc_deinit_str(&data); - return res; -} -static int scale_down_vm_group_data(struct osc_scale_down_vm_group_arg *args, struct osc_str *data) -{ - int ret = 0; - int count_args = 0; - - if (!args) - return 0; - osc_str_append_string(data, "{"); - if (args->is_set_dry_run) { - ARG_TO_JSON(DryRun, bool, args->dry_run); - ret += 1; - } - if (args->vm_group_id) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"VmGroupId\":", args->vm_group_id); - ret += 1; - } - if (args->is_set_vm_subtraction || args->vm_subtraction) { - ARG_TO_JSON(VmSubtraction, int, args->vm_subtraction); - ret += 1; - } - osc_str_append_string(data, "}"); - return !!ret; -} - -int osc_scale_down_vm_group(struct osc_env *e, struct osc_str *out, struct osc_scale_down_vm_group_arg *args) -{ - CURLcode res = CURLE_OUT_OF_MEMORY; - struct osc_str data; - struct osc_str end_call; - int r; - - osc_init_str(&data); - osc_init_str(&end_call); - r = scale_down_vm_group_data(args, &data); + r = scale_up_vm_group_data(args, &data); if (r < 0) goto out; osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/ScaleDownVmGroup"); + osc_str_append_string(&end_call, "/api/v1/ScaleUpVmGroup"); curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); @@ -16579,7 +18498,7 @@ int osc_scale_down_vm_group(struct osc_env *e, struct osc_str *out, struct osc_s osc_deinit_str(&data); return res; } -static int reset_account_password_data(struct osc_reset_account_password_arg *args, struct osc_str *data) +static int scale_down_vm_group_data(struct osc_scale_down_vm_group_arg *args, struct osc_str *data) { int ret = 0; int count_args = 0; @@ -16591,21 +18510,20 @@ static int reset_account_password_data(struct osc_reset_account_password_arg *a ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } - if (args->password) { + if (args->vm_group_id) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"Password\":", args->password); + ARG_TO_JSON_STR("\"VmGroupId\":", args->vm_group_id); ret += 1; } - if (args->token) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"Token\":", args->token); + if (args->is_set_vm_subtraction || args->vm_subtraction) { + ARG_TO_JSON(VmSubtraction, int, args->vm_subtraction); ret += 1; } osc_str_append_string(data, "}"); return !!ret; } -int osc_reset_account_password(struct osc_env *e, struct osc_str *out, struct osc_reset_account_password_arg *args) +int osc_scale_down_vm_group(struct osc_env *e, struct osc_str *out, struct osc_scale_down_vm_group_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; @@ -16614,12 +18532,12 @@ int osc_reset_account_password(struct osc_env *e, struct osc_str *out, struct os osc_init_str(&data); osc_init_str(&end_call); - r = reset_account_password_data(args, &data); + r = scale_down_vm_group_data(args, &data); if (r < 0) goto out; osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/ResetAccountPassword"); + osc_str_append_string(&end_call, "/api/v1/ScaleDownVmGroup"); curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); @@ -16825,6 +18743,15 @@ static int read_vpn_connections_data(struct osc_read_vpn_connections_arg *args, STRY(osc_str_append_string(data, "}" )); ret += 1; } + if (args->next_page_token) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"NextPageToken\":", args->next_page_token); + ret += 1; + } + if (args->is_set_results_per_page || args->results_per_page) { + ARG_TO_JSON(ResultsPerPage, int, args->results_per_page); + ret += 1; + } osc_str_append_string(data, "}"); return !!ret; } @@ -16878,6 +18805,15 @@ static int read_volumes_data(struct osc_read_volumes_arg *args, struct osc_str STRY(osc_str_append_string(data, "}" )); ret += 1; } + if (args->next_page_token) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"NextPageToken\":", args->next_page_token); + ret += 1; + } + if (args->is_set_results_per_page || args->results_per_page) { + ARG_TO_JSON(ResultsPerPage, int, args->results_per_page); + ret += 1; + } osc_str_append_string(data, "}"); return !!ret; } @@ -17052,6 +18988,15 @@ static int read_vms_data(struct osc_read_vms_arg *args, struct osc_str *data) STRY(osc_str_append_string(data, "}" )); ret += 1; } + if (args->next_page_token) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"NextPageToken\":", args->next_page_token); + ret += 1; + } + if (args->is_set_results_per_page || args->results_per_page) { + ARG_TO_JSON(ResultsPerPage, int, args->results_per_page); + ret += 1; + } osc_str_append_string(data, "}"); return !!ret; } @@ -17264,6 +19209,15 @@ static int read_virtual_gateways_data(struct osc_read_virtual_gateways_arg *arg STRY(osc_str_append_string(data, "}" )); ret += 1; } + if (args->next_page_token) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"NextPageToken\":", args->next_page_token); + ret += 1; + } + if (args->is_set_results_per_page || args->results_per_page) { + ARG_TO_JSON(ResultsPerPage, int, args->results_per_page); + ret += 1; + } osc_str_append_string(data, "}"); return !!ret; } @@ -17523,7 +19477,214 @@ static int read_snapshots_data(struct osc_read_snapshots_arg *args, struct osc_ return !!ret; } -int osc_read_snapshots(struct osc_env *e, struct osc_str *out, struct osc_read_snapshots_arg *args) +int osc_read_snapshots(struct osc_env *e, struct osc_str *out, struct osc_read_snapshots_arg *args) +{ + CURLcode res = CURLE_OUT_OF_MEMORY; + struct osc_str data; + struct osc_str end_call; + int r; + + osc_init_str(&data); + osc_init_str(&end_call); + r = read_snapshots_data(args, &data); + if (r < 0) + goto out; + + osc_str_append_string(&end_call, e->endpoint.buf); + osc_str_append_string(&end_call, "/api/v1/ReadSnapshots"); + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); + if (e->flag & OSC_VERBOSE_MODE) { + printf("\n%s\n\n", data.buf); + } + res = curl_easy_perform(e->c); +out: + osc_deinit_str(&end_call); + osc_deinit_str(&data); + return res; +} +static int read_snapshot_export_tasks_data(struct osc_read_snapshot_export_tasks_arg *args, struct osc_str *data) +{ + int ret = 0; + int count_args = 0; + + if (!args) + return 0; + osc_str_append_string(data, "{"); + if (args->is_set_dry_run) { + ARG_TO_JSON(DryRun, bool, args->dry_run); + ret += 1; + } + if (args->filters_str) { + ARG_TO_JSON(Filters, string, args->filters_str); + ret += 1; + } else if (args->is_set_filters) { + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"Filters\": { " )); + STRY(filters_export_task_setter(&args->filters, data) < 0); + STRY(osc_str_append_string(data, "}" )); + ret += 1; + } + osc_str_append_string(data, "}"); + return !!ret; +} + +int osc_read_snapshot_export_tasks(struct osc_env *e, struct osc_str *out, struct osc_read_snapshot_export_tasks_arg *args) +{ + CURLcode res = CURLE_OUT_OF_MEMORY; + struct osc_str data; + struct osc_str end_call; + int r; + + osc_init_str(&data); + osc_init_str(&end_call); + r = read_snapshot_export_tasks_data(args, &data); + if (r < 0) + goto out; + + osc_str_append_string(&end_call, e->endpoint.buf); + osc_str_append_string(&end_call, "/api/v1/ReadSnapshotExportTasks"); + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); + if (e->flag & OSC_VERBOSE_MODE) { + printf("\n%s\n\n", data.buf); + } + res = curl_easy_perform(e->c); +out: + osc_deinit_str(&end_call); + osc_deinit_str(&data); + return res; +} +static int read_server_certificates_data(struct osc_read_server_certificates_arg *args, struct osc_str *data) +{ + int ret = 0; + int count_args = 0; + + if (!args) + return 0; + osc_str_append_string(data, "{"); + if (args->is_set_dry_run) { + ARG_TO_JSON(DryRun, bool, args->dry_run); + ret += 1; + } + if (args->filters_str) { + ARG_TO_JSON(Filters, string, args->filters_str); + ret += 1; + } else if (args->is_set_filters) { + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"Filters\": { " )); + STRY(filters_server_certificate_setter(&args->filters, data) < 0); + STRY(osc_str_append_string(data, "}" )); + ret += 1; + } + osc_str_append_string(data, "}"); + return !!ret; +} + +int osc_read_server_certificates(struct osc_env *e, struct osc_str *out, struct osc_read_server_certificates_arg *args) +{ + CURLcode res = CURLE_OUT_OF_MEMORY; + struct osc_str data; + struct osc_str end_call; + int r; + + osc_init_str(&data); + osc_init_str(&end_call); + r = read_server_certificates_data(args, &data); + if (r < 0) + goto out; + + osc_str_append_string(&end_call, e->endpoint.buf); + osc_str_append_string(&end_call, "/api/v1/ReadServerCertificates"); + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); + if (e->flag & OSC_VERBOSE_MODE) { + printf("\n%s\n\n", data.buf); + } + res = curl_easy_perform(e->c); +out: + osc_deinit_str(&end_call); + osc_deinit_str(&data); + return res; +} +static int read_security_groups_data(struct osc_read_security_groups_arg *args, struct osc_str *data) +{ + int ret = 0; + int count_args = 0; + + if (!args) + return 0; + osc_str_append_string(data, "{"); + if (args->is_set_dry_run) { + ARG_TO_JSON(DryRun, bool, args->dry_run); + ret += 1; + } + if (args->filters_str) { + ARG_TO_JSON(Filters, string, args->filters_str); + ret += 1; + } else if (args->is_set_filters) { + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"Filters\": { " )); + STRY(filters_security_group_setter(&args->filters, data) < 0); + STRY(osc_str_append_string(data, "}" )); + ret += 1; + } + osc_str_append_string(data, "}"); + return !!ret; +} + +int osc_read_security_groups(struct osc_env *e, struct osc_str *out, struct osc_read_security_groups_arg *args) +{ + CURLcode res = CURLE_OUT_OF_MEMORY; + struct osc_str data; + struct osc_str end_call; + int r; + + osc_init_str(&data); + osc_init_str(&end_call); + r = read_security_groups_data(args, &data); + if (r < 0) + goto out; + + osc_str_append_string(&end_call, e->endpoint.buf); + osc_str_append_string(&end_call, "/api/v1/ReadSecurityGroups"); + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); + if (e->flag & OSC_VERBOSE_MODE) { + printf("\n%s\n\n", data.buf); + } + res = curl_easy_perform(e->c); +out: + osc_deinit_str(&end_call); + osc_deinit_str(&data); + return res; +} +static int read_secret_access_key_data(struct osc_read_secret_access_key_arg *args, struct osc_str *data) +{ + int ret = 0; + int count_args = 0; + + if (!args) + return 0; + osc_str_append_string(data, "{"); + if (args->access_key_id) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"AccessKeyId\":", args->access_key_id); + ret += 1; + } + if (args->is_set_dry_run) { + ARG_TO_JSON(DryRun, bool, args->dry_run); + ret += 1; + } + osc_str_append_string(data, "}"); + return !!ret; +} + +int osc_read_secret_access_key(struct osc_env *e, struct osc_str *out, struct osc_read_secret_access_key_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; @@ -17532,12 +19693,12 @@ int osc_read_snapshots(struct osc_env *e, struct osc_str *out, struct osc_read_s osc_init_str(&data); osc_init_str(&end_call); - r = read_snapshots_data(args, &data); + r = read_secret_access_key_data(args, &data); if (r < 0) goto out; osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/ReadSnapshots"); + osc_str_append_string(&end_call, "/api/v1/ReadSecretAccessKey"); curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); @@ -17550,7 +19711,7 @@ int osc_read_snapshots(struct osc_env *e, struct osc_str *out, struct osc_read_s osc_deinit_str(&data); return res; } -static int read_snapshot_export_tasks_data(struct osc_read_snapshot_export_tasks_arg *args, struct osc_str *data) +static int read_route_tables_data(struct osc_read_route_tables_arg *args, struct osc_str *data) { int ret = 0; int count_args = 0; @@ -17568,15 +19729,24 @@ static int read_snapshot_export_tasks_data(struct osc_read_snapshot_export_task } else if (args->is_set_filters) { TRY_APPEND_COL(count_args, data); STRY(osc_str_append_string(data, "\"Filters\": { " )); - STRY(filters_export_task_setter(&args->filters, data) < 0); + STRY(filters_route_table_setter(&args->filters, data) < 0); STRY(osc_str_append_string(data, "}" )); ret += 1; } + if (args->next_page_token) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"NextPageToken\":", args->next_page_token); + ret += 1; + } + if (args->is_set_results_per_page || args->results_per_page) { + ARG_TO_JSON(ResultsPerPage, int, args->results_per_page); + ret += 1; + } osc_str_append_string(data, "}"); return !!ret; } -int osc_read_snapshot_export_tasks(struct osc_env *e, struct osc_str *out, struct osc_read_snapshot_export_tasks_arg *args) +int osc_read_route_tables(struct osc_env *e, struct osc_str *out, struct osc_read_route_tables_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; @@ -17585,12 +19755,12 @@ int osc_read_snapshot_export_tasks(struct osc_env *e, struct osc_str *out, struc osc_init_str(&data); osc_init_str(&end_call); - r = read_snapshot_export_tasks_data(args, &data); + r = read_route_tables_data(args, &data); if (r < 0) goto out; osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/ReadSnapshotExportTasks"); + osc_str_append_string(&end_call, "/api/v1/ReadRouteTables"); curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); @@ -17603,7 +19773,7 @@ int osc_read_snapshot_export_tasks(struct osc_env *e, struct osc_str *out, struc osc_deinit_str(&data); return res; } -static int read_server_certificates_data(struct osc_read_server_certificates_arg *args, struct osc_str *data) +static int read_regions_data(struct osc_read_regions_arg *args, struct osc_str *data) { int ret = 0; int count_args = 0; @@ -17615,21 +19785,11 @@ static int read_server_certificates_data(struct osc_read_server_certificates_ar ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } - if (args->filters_str) { - ARG_TO_JSON(Filters, string, args->filters_str); - ret += 1; - } else if (args->is_set_filters) { - TRY_APPEND_COL(count_args, data); - STRY(osc_str_append_string(data, "\"Filters\": { " )); - STRY(filters_server_certificate_setter(&args->filters, data) < 0); - STRY(osc_str_append_string(data, "}" )); - ret += 1; - } osc_str_append_string(data, "}"); return !!ret; } -int osc_read_server_certificates(struct osc_env *e, struct osc_str *out, struct osc_read_server_certificates_arg *args) +int osc_read_regions(struct osc_env *e, struct osc_str *out, struct osc_read_regions_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; @@ -17638,12 +19798,12 @@ int osc_read_server_certificates(struct osc_env *e, struct osc_str *out, struct osc_init_str(&data); osc_init_str(&end_call); - r = read_server_certificates_data(args, &data); + r = read_regions_data(args, &data); if (r < 0) goto out; osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/ReadServerCertificates"); + osc_str_append_string(&end_call, "/api/v1/ReadRegions"); curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); @@ -17656,7 +19816,7 @@ int osc_read_server_certificates(struct osc_env *e, struct osc_str *out, struct osc_deinit_str(&data); return res; } -static int read_security_groups_data(struct osc_read_security_groups_arg *args, struct osc_str *data) +static int read_quotas_data(struct osc_read_quotas_arg *args, struct osc_str *data) { int ret = 0; int count_args = 0; @@ -17674,7 +19834,7 @@ static int read_security_groups_data(struct osc_read_security_groups_arg *args, } else if (args->is_set_filters) { TRY_APPEND_COL(count_args, data); STRY(osc_str_append_string(data, "\"Filters\": { " )); - STRY(filters_security_group_setter(&args->filters, data) < 0); + STRY(filters_quota_setter(&args->filters, data) < 0); STRY(osc_str_append_string(data, "}" )); ret += 1; } @@ -17682,7 +19842,7 @@ static int read_security_groups_data(struct osc_read_security_groups_arg *args, return !!ret; } -int osc_read_security_groups(struct osc_env *e, struct osc_str *out, struct osc_read_security_groups_arg *args) +int osc_read_quotas(struct osc_env *e, struct osc_str *out, struct osc_read_quotas_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; @@ -17691,12 +19851,12 @@ int osc_read_security_groups(struct osc_env *e, struct osc_str *out, struct osc_ osc_init_str(&data); osc_init_str(&end_call); - r = read_security_groups_data(args, &data); + r = read_quotas_data(args, &data); if (r < 0) goto out; osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/ReadSecurityGroups"); + osc_str_append_string(&end_call, "/api/v1/ReadQuotas"); curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); @@ -17709,7 +19869,7 @@ int osc_read_security_groups(struct osc_env *e, struct osc_str *out, struct osc_ osc_deinit_str(&data); return res; } -static int read_secret_access_key_data(struct osc_read_secret_access_key_arg *args, struct osc_str *data) +static int read_public_ips_data(struct osc_read_public_ips_arg *args, struct osc_str *data) { int ret = 0; int count_args = 0; @@ -17717,20 +19877,34 @@ static int read_secret_access_key_data(struct osc_read_secret_access_key_arg *a if (!args) return 0; osc_str_append_string(data, "{"); - if (args->access_key_id) { + if (args->is_set_dry_run) { + ARG_TO_JSON(DryRun, bool, args->dry_run); + ret += 1; + } + if (args->filters_str) { + ARG_TO_JSON(Filters, string, args->filters_str); + ret += 1; + } else if (args->is_set_filters) { + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"Filters\": { " )); + STRY(filters_public_ip_setter(&args->filters, data) < 0); + STRY(osc_str_append_string(data, "}" )); + ret += 1; + } + if (args->next_page_token) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"AccessKeyId\":", args->access_key_id); + ARG_TO_JSON_STR("\"NextPageToken\":", args->next_page_token); ret += 1; } - if (args->is_set_dry_run) { - ARG_TO_JSON(DryRun, bool, args->dry_run); + if (args->is_set_results_per_page || args->results_per_page) { + ARG_TO_JSON(ResultsPerPage, int, args->results_per_page); ret += 1; } osc_str_append_string(data, "}"); return !!ret; } -int osc_read_secret_access_key(struct osc_env *e, struct osc_str *out, struct osc_read_secret_access_key_arg *args) +int osc_read_public_ips(struct osc_env *e, struct osc_str *out, struct osc_read_public_ips_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; @@ -17739,12 +19913,12 @@ int osc_read_secret_access_key(struct osc_env *e, struct osc_str *out, struct os osc_init_str(&data); osc_init_str(&end_call); - r = read_secret_access_key_data(args, &data); + r = read_public_ips_data(args, &data); if (r < 0) goto out; osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/ReadSecretAccessKey"); + osc_str_append_string(&end_call, "/api/v1/ReadPublicIps"); curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); @@ -17757,7 +19931,7 @@ int osc_read_secret_access_key(struct osc_env *e, struct osc_str *out, struct os osc_deinit_str(&data); return res; } -static int read_route_tables_data(struct osc_read_route_tables_arg *args, struct osc_str *data) +static int read_public_ip_ranges_data(struct osc_read_public_ip_ranges_arg *args, struct osc_str *data) { int ret = 0; int count_args = 0; @@ -17769,21 +19943,11 @@ static int read_route_tables_data(struct osc_read_route_tables_arg *args, struc ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } - if (args->filters_str) { - ARG_TO_JSON(Filters, string, args->filters_str); - ret += 1; - } else if (args->is_set_filters) { - TRY_APPEND_COL(count_args, data); - STRY(osc_str_append_string(data, "\"Filters\": { " )); - STRY(filters_route_table_setter(&args->filters, data) < 0); - STRY(osc_str_append_string(data, "}" )); - ret += 1; - } osc_str_append_string(data, "}"); return !!ret; } -int osc_read_route_tables(struct osc_env *e, struct osc_str *out, struct osc_read_route_tables_arg *args) +int osc_read_public_ip_ranges(struct osc_env *e, struct osc_str *out, struct osc_read_public_ip_ranges_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; @@ -17792,12 +19956,12 @@ int osc_read_route_tables(struct osc_env *e, struct osc_str *out, struct osc_rea osc_init_str(&data); osc_init_str(&end_call); - r = read_route_tables_data(args, &data); + r = read_public_ip_ranges_data(args, &data); if (r < 0) goto out; osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/ReadRouteTables"); + osc_str_append_string(&end_call, "/api/v1/ReadPublicIpRanges"); curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); @@ -17810,7 +19974,7 @@ int osc_read_route_tables(struct osc_env *e, struct osc_str *out, struct osc_rea osc_deinit_str(&data); return res; } -static int read_regions_data(struct osc_read_regions_arg *args, struct osc_str *data) +static int read_public_catalog_data(struct osc_read_public_catalog_arg *args, struct osc_str *data) { int ret = 0; int count_args = 0; @@ -17826,7 +19990,7 @@ static int read_regions_data(struct osc_read_regions_arg *args, struct osc_str return !!ret; } -int osc_read_regions(struct osc_env *e, struct osc_str *out, struct osc_read_regions_arg *args) +int osc_read_public_catalog(struct osc_env *e, struct osc_str *out, struct osc_read_public_catalog_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; @@ -17835,12 +19999,12 @@ int osc_read_regions(struct osc_env *e, struct osc_str *out, struct osc_read_reg osc_init_str(&data); osc_init_str(&end_call); - r = read_regions_data(args, &data); + r = read_public_catalog_data(args, &data); if (r < 0) goto out; osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/ReadRegions"); + osc_str_append_string(&end_call, "/api/v1/ReadPublicCatalog"); curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); @@ -17853,7 +20017,7 @@ int osc_read_regions(struct osc_env *e, struct osc_str *out, struct osc_read_reg osc_deinit_str(&data); return res; } -static int read_quotas_data(struct osc_read_quotas_arg *args, struct osc_str *data) +static int read_product_types_data(struct osc_read_product_types_arg *args, struct osc_str *data) { int ret = 0; int count_args = 0; @@ -17871,7 +20035,7 @@ static int read_quotas_data(struct osc_read_quotas_arg *args, struct osc_str *d } else if (args->is_set_filters) { TRY_APPEND_COL(count_args, data); STRY(osc_str_append_string(data, "\"Filters\": { " )); - STRY(filters_quota_setter(&args->filters, data) < 0); + STRY(filters_product_type_setter(&args->filters, data) < 0); STRY(osc_str_append_string(data, "}" )); ret += 1; } @@ -17879,7 +20043,7 @@ static int read_quotas_data(struct osc_read_quotas_arg *args, struct osc_str *d return !!ret; } -int osc_read_quotas(struct osc_env *e, struct osc_str *out, struct osc_read_quotas_arg *args) +int osc_read_product_types(struct osc_env *e, struct osc_str *out, struct osc_read_product_types_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; @@ -17888,12 +20052,12 @@ int osc_read_quotas(struct osc_env *e, struct osc_str *out, struct osc_read_quot osc_init_str(&data); osc_init_str(&end_call); - r = read_quotas_data(args, &data); + r = read_product_types_data(args, &data); if (r < 0) goto out; osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/ReadQuotas"); + osc_str_append_string(&end_call, "/api/v1/ReadProductTypes"); curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); @@ -17906,7 +20070,7 @@ int osc_read_quotas(struct osc_env *e, struct osc_str *out, struct osc_read_quot osc_deinit_str(&data); return res; } -static int read_public_ips_data(struct osc_read_public_ips_arg *args, struct osc_str *data) +static int read_policy_versions_data(struct osc_read_policy_versions_arg *args, struct osc_str *data) { int ret = 0; int count_args = 0; @@ -17914,25 +20078,24 @@ static int read_public_ips_data(struct osc_read_public_ips_arg *args, struct os if (!args) return 0; osc_str_append_string(data, "{"); - if (args->is_set_dry_run) { - ARG_TO_JSON(DryRun, bool, args->dry_run); + if (args->is_set_first_item || args->first_item) { + ARG_TO_JSON(FirstItem, int, args->first_item); ret += 1; } - if (args->filters_str) { - ARG_TO_JSON(Filters, string, args->filters_str); - ret += 1; - } else if (args->is_set_filters) { - TRY_APPEND_COL(count_args, data); - STRY(osc_str_append_string(data, "\"Filters\": { " )); - STRY(filters_public_ip_setter(&args->filters, data) < 0); - STRY(osc_str_append_string(data, "}" )); - ret += 1; + if (args->policy_orn) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"PolicyOrn\":", args->policy_orn); + ret += 1; + } + if (args->is_set_results_per_page || args->results_per_page) { + ARG_TO_JSON(ResultsPerPage, int, args->results_per_page); + ret += 1; } osc_str_append_string(data, "}"); return !!ret; } -int osc_read_public_ips(struct osc_env *e, struct osc_str *out, struct osc_read_public_ips_arg *args) +int osc_read_policy_versions(struct osc_env *e, struct osc_str *out, struct osc_read_policy_versions_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; @@ -17941,12 +20104,12 @@ int osc_read_public_ips(struct osc_env *e, struct osc_str *out, struct osc_read_ osc_init_str(&data); osc_init_str(&end_call); - r = read_public_ips_data(args, &data); + r = read_policy_versions_data(args, &data); if (r < 0) goto out; osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/ReadPublicIps"); + osc_str_append_string(&end_call, "/api/v1/ReadPolicyVersions"); curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); @@ -17959,7 +20122,7 @@ int osc_read_public_ips(struct osc_env *e, struct osc_str *out, struct osc_read_ osc_deinit_str(&data); return res; } -static int read_public_ip_ranges_data(struct osc_read_public_ip_ranges_arg *args, struct osc_str *data) +static int read_policy_version_data(struct osc_read_policy_version_arg *args, struct osc_str *data) { int ret = 0; int count_args = 0; @@ -17967,15 +20130,21 @@ static int read_public_ip_ranges_data(struct osc_read_public_ip_ranges_arg *arg if (!args) return 0; osc_str_append_string(data, "{"); - if (args->is_set_dry_run) { - ARG_TO_JSON(DryRun, bool, args->dry_run); + if (args->policy_orn) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"PolicyOrn\":", args->policy_orn); + ret += 1; + } + if (args->version_id) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"VersionId\":", args->version_id); ret += 1; } osc_str_append_string(data, "}"); return !!ret; } -int osc_read_public_ip_ranges(struct osc_env *e, struct osc_str *out, struct osc_read_public_ip_ranges_arg *args) +int osc_read_policy_version(struct osc_env *e, struct osc_str *out, struct osc_read_policy_version_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; @@ -17984,12 +20153,12 @@ int osc_read_public_ip_ranges(struct osc_env *e, struct osc_str *out, struct osc osc_init_str(&data); osc_init_str(&end_call); - r = read_public_ip_ranges_data(args, &data); + r = read_policy_version_data(args, &data); if (r < 0) goto out; osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/ReadPublicIpRanges"); + osc_str_append_string(&end_call, "/api/v1/ReadPolicyVersion"); curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); @@ -18002,7 +20171,7 @@ int osc_read_public_ip_ranges(struct osc_env *e, struct osc_str *out, struct osc osc_deinit_str(&data); return res; } -static int read_public_catalog_data(struct osc_read_public_catalog_arg *args, struct osc_str *data) +static int read_policy_data(struct osc_read_policy_arg *args, struct osc_str *data) { int ret = 0; int count_args = 0; @@ -18010,15 +20179,16 @@ static int read_public_catalog_data(struct osc_read_public_catalog_arg *args, s if (!args) return 0; osc_str_append_string(data, "{"); - if (args->is_set_dry_run) { - ARG_TO_JSON(DryRun, bool, args->dry_run); + if (args->policy_orn) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"PolicyOrn\":", args->policy_orn); ret += 1; } osc_str_append_string(data, "}"); return !!ret; } -int osc_read_public_catalog(struct osc_env *e, struct osc_str *out, struct osc_read_public_catalog_arg *args) +int osc_read_policy(struct osc_env *e, struct osc_str *out, struct osc_read_policy_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; @@ -18027,12 +20197,12 @@ int osc_read_public_catalog(struct osc_env *e, struct osc_str *out, struct osc_r osc_init_str(&data); osc_init_str(&end_call); - r = read_public_catalog_data(args, &data); + r = read_policy_data(args, &data); if (r < 0) goto out; osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/ReadPublicCatalog"); + osc_str_append_string(&end_call, "/api/v1/ReadPolicy"); curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); @@ -18045,7 +20215,7 @@ int osc_read_public_catalog(struct osc_env *e, struct osc_str *out, struct osc_r osc_deinit_str(&data); return res; } -static int read_product_types_data(struct osc_read_product_types_arg *args, struct osc_str *data) +static int read_policies_data(struct osc_read_policies_arg *args, struct osc_str *data) { int ret = 0; int count_args = 0; @@ -18063,15 +20233,23 @@ static int read_product_types_data(struct osc_read_product_types_arg *args, str } else if (args->is_set_filters) { TRY_APPEND_COL(count_args, data); STRY(osc_str_append_string(data, "\"Filters\": { " )); - STRY(filters_product_type_setter(&args->filters, data) < 0); + STRY(read_policies_filters_setter(&args->filters, data) < 0); STRY(osc_str_append_string(data, "}" )); ret += 1; } + if (args->is_set_first_item || args->first_item) { + ARG_TO_JSON(FirstItem, int, args->first_item); + ret += 1; + } + if (args->is_set_results_per_page || args->results_per_page) { + ARG_TO_JSON(ResultsPerPage, int, args->results_per_page); + ret += 1; + } osc_str_append_string(data, "}"); return !!ret; } -int osc_read_product_types(struct osc_env *e, struct osc_str *out, struct osc_read_product_types_arg *args) +int osc_read_policies(struct osc_env *e, struct osc_str *out, struct osc_read_policies_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; @@ -18080,12 +20258,12 @@ int osc_read_product_types(struct osc_env *e, struct osc_str *out, struct osc_re osc_init_str(&data); osc_init_str(&end_call); - r = read_product_types_data(args, &data); + r = read_policies_data(args, &data); if (r < 0) goto out; osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/ReadProductTypes"); + osc_str_append_string(&end_call, "/api/v1/ReadPolicies"); curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); @@ -18226,6 +20404,15 @@ static int read_net_peerings_data(struct osc_read_net_peerings_arg *args, struc STRY(osc_str_append_string(data, "}" )); ret += 1; } + if (args->next_page_token) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"NextPageToken\":", args->next_page_token); + ret += 1; + } + if (args->is_set_results_per_page || args->results_per_page) { + ARG_TO_JSON(ResultsPerPage, int, args->results_per_page); + ret += 1; + } osc_str_append_string(data, "}"); return !!ret; } @@ -18279,6 +20466,15 @@ static int read_net_access_points_data(struct osc_read_net_access_points_arg *a STRY(osc_str_append_string(data, "}" )); ret += 1; } + if (args->next_page_token) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"NextPageToken\":", args->next_page_token); + ret += 1; + } + if (args->is_set_results_per_page || args->results_per_page) { + ARG_TO_JSON(ResultsPerPage, int, args->results_per_page); + ret += 1; + } osc_str_append_string(data, "}"); return !!ret; } @@ -18385,6 +20581,15 @@ static int read_nat_services_data(struct osc_read_nat_services_arg *args, struc STRY(osc_str_append_string(data, "}" )); ret += 1; } + if (args->next_page_token) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"NextPageToken\":", args->next_page_token); + ret += 1; + } + if (args->is_set_results_per_page || args->results_per_page) { + ARG_TO_JSON(ResultsPerPage, int, args->results_per_page); + ret += 1; + } osc_str_append_string(data, "}"); return !!ret; } @@ -18512,7 +20717,66 @@ int osc_read_load_balancers(struct osc_env *e, struct osc_str *out, struct osc_r osc_deinit_str(&data); return res; } -static int read_load_balancer_tags_data(struct osc_read_load_balancer_tags_arg *args, struct osc_str *data) +static int read_load_balancer_tags_data(struct osc_read_load_balancer_tags_arg *args, struct osc_str *data) +{ + int ret = 0; + int count_args = 0; + + if (!args) + return 0; + osc_str_append_string(data, "{"); + if (args->is_set_dry_run) { + ARG_TO_JSON(DryRun, bool, args->dry_run); + ret += 1; + } + if (args->load_balancer_names) { + char **as; + + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"LoadBalancerNames\":[" )); + for (as = args->load_balancer_names; *as > 0; ++as) { + if (as != args->load_balancer_names) + STRY(osc_str_append_string(data, "," )); + ARG_TO_JSON_STR("", *as); + } + STRY(osc_str_append_string(data, "]" )); + ret += 1; + } else if (args->load_balancer_names_str) { + ARG_TO_JSON(LoadBalancerNames, string, args->load_balancer_names_str); + ret += 1; + } + osc_str_append_string(data, "}"); + return !!ret; +} + +int osc_read_load_balancer_tags(struct osc_env *e, struct osc_str *out, struct osc_read_load_balancer_tags_arg *args) +{ + CURLcode res = CURLE_OUT_OF_MEMORY; + struct osc_str data; + struct osc_str end_call; + int r; + + osc_init_str(&data); + osc_init_str(&end_call); + r = read_load_balancer_tags_data(args, &data); + if (r < 0) + goto out; + + osc_str_append_string(&end_call, e->endpoint.buf); + osc_str_append_string(&end_call, "/api/v1/ReadLoadBalancerTags"); + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); + if (e->flag & OSC_VERBOSE_MODE) { + printf("\n%s\n\n", data.buf); + } + res = curl_easy_perform(e->c); +out: + osc_deinit_str(&end_call); + osc_deinit_str(&data); + return res; +} +static int read_listener_rules_data(struct osc_read_listener_rules_arg *args, struct osc_str *data) { int ret = 0; int count_args = 0; @@ -18524,27 +20788,21 @@ static int read_load_balancer_tags_data(struct osc_read_load_balancer_tags_arg ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } - if (args->load_balancer_names) { - char **as; - - TRY_APPEND_COL(count_args, data); - STRY(osc_str_append_string(data, "\"LoadBalancerNames\":[" )); - for (as = args->load_balancer_names; *as > 0; ++as) { - if (as != args->load_balancer_names) - STRY(osc_str_append_string(data, "," )); - ARG_TO_JSON_STR("", *as); - } - STRY(osc_str_append_string(data, "]" )); - ret += 1; - } else if (args->load_balancer_names_str) { - ARG_TO_JSON(LoadBalancerNames, string, args->load_balancer_names_str); + if (args->filters_str) { + ARG_TO_JSON(Filters, string, args->filters_str); ret += 1; + } else if (args->is_set_filters) { + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"Filters\": { " )); + STRY(filters_listener_rule_setter(&args->filters, data) < 0); + STRY(osc_str_append_string(data, "}" )); + ret += 1; } osc_str_append_string(data, "}"); return !!ret; } -int osc_read_load_balancer_tags(struct osc_env *e, struct osc_str *out, struct osc_read_load_balancer_tags_arg *args) +int osc_read_listener_rules(struct osc_env *e, struct osc_str *out, struct osc_read_listener_rules_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; @@ -18553,12 +20811,12 @@ int osc_read_load_balancer_tags(struct osc_env *e, struct osc_str *out, struct o osc_init_str(&data); osc_init_str(&end_call); - r = read_load_balancer_tags_data(args, &data); + r = read_listener_rules_data(args, &data); if (r < 0) goto out; osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/ReadLoadBalancerTags"); + osc_str_append_string(&end_call, "/api/v1/ReadListenerRules"); curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); @@ -18571,7 +20829,7 @@ int osc_read_load_balancer_tags(struct osc_env *e, struct osc_str *out, struct o osc_deinit_str(&data); return res; } -static int read_listener_rules_data(struct osc_read_listener_rules_arg *args, struct osc_str *data) +static int read_linked_policies_data(struct osc_read_linked_policies_arg *args, struct osc_str *data) { int ret = 0; int count_args = 0; @@ -18589,15 +20847,28 @@ static int read_listener_rules_data(struct osc_read_listener_rules_arg *args, s } else if (args->is_set_filters) { TRY_APPEND_COL(count_args, data); STRY(osc_str_append_string(data, "\"Filters\": { " )); - STRY(filters_listener_rule_setter(&args->filters, data) < 0); + STRY(read_linked_policies_filters_setter(&args->filters, data) < 0); STRY(osc_str_append_string(data, "}" )); ret += 1; } + if (args->is_set_first_item || args->first_item) { + ARG_TO_JSON(FirstItem, int, args->first_item); + ret += 1; + } + if (args->is_set_results_per_page || args->results_per_page) { + ARG_TO_JSON(ResultsPerPage, int, args->results_per_page); + ret += 1; + } + if (args->user_name) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"UserName\":", args->user_name); + ret += 1; + } osc_str_append_string(data, "}"); return !!ret; } -int osc_read_listener_rules(struct osc_env *e, struct osc_str *out, struct osc_read_listener_rules_arg *args) +int osc_read_linked_policies(struct osc_env *e, struct osc_str *out, struct osc_read_linked_policies_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; @@ -18606,12 +20877,12 @@ int osc_read_listener_rules(struct osc_env *e, struct osc_str *out, struct osc_r osc_init_str(&data); osc_init_str(&end_call); - r = read_listener_rules_data(args, &data); + r = read_linked_policies_data(args, &data); if (r < 0) goto out; osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/ReadListenerRules"); + osc_str_append_string(&end_call, "/api/v1/ReadLinkedPolicies"); curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); @@ -18752,6 +21023,15 @@ static int read_images_data(struct osc_read_images_arg *args, struct osc_str *d STRY(osc_str_append_string(data, "}" )); ret += 1; } + if (args->next_page_token) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"NextPageToken\":", args->next_page_token); + ret += 1; + } + if (args->is_set_results_per_page || args->results_per_page) { + ARG_TO_JSON(ResultsPerPage, int, args->results_per_page); + ret += 1; + } osc_str_append_string(data, "}"); return !!ret; } @@ -19060,6 +21340,15 @@ static int read_dhcp_options_data(struct osc_read_dhcp_options_arg *args, struc STRY(osc_str_append_string(data, "}" )); ret += 1; } + if (args->next_page_token) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"NextPageToken\":", args->next_page_token); + ret += 1; + } + if (args->is_set_results_per_page || args->results_per_page) { + ARG_TO_JSON(ResultsPerPage, int, args->results_per_page); + ret += 1; + } osc_str_append_string(data, "}"); return !!ret; } @@ -19091,6 +21380,59 @@ int osc_read_dhcp_options(struct osc_env *e, struct osc_str *out, struct osc_rea osc_deinit_str(&data); return res; } +static int read_dedicated_groups_data(struct osc_read_dedicated_groups_arg *args, struct osc_str *data) +{ + int ret = 0; + int count_args = 0; + + if (!args) + return 0; + osc_str_append_string(data, "{"); + if (args->is_set_dry_run) { + ARG_TO_JSON(DryRun, bool, args->dry_run); + ret += 1; + } + if (args->filters_str) { + ARG_TO_JSON(Filters, string, args->filters_str); + ret += 1; + } else if (args->is_set_filters) { + TRY_APPEND_COL(count_args, data); + STRY(osc_str_append_string(data, "\"Filters\": { " )); + STRY(filters_dedicated_group_setter(&args->filters, data) < 0); + STRY(osc_str_append_string(data, "}" )); + ret += 1; + } + osc_str_append_string(data, "}"); + return !!ret; +} + +int osc_read_dedicated_groups(struct osc_env *e, struct osc_str *out, struct osc_read_dedicated_groups_arg *args) +{ + CURLcode res = CURLE_OUT_OF_MEMORY; + struct osc_str data; + struct osc_str end_call; + int r; + + osc_init_str(&data); + osc_init_str(&end_call); + r = read_dedicated_groups_data(args, &data); + if (r < 0) + goto out; + + osc_str_append_string(&end_call, e->endpoint.buf); + osc_str_append_string(&end_call, "/api/v1/ReadDedicatedGroups"); + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); + if (e->flag & OSC_VERBOSE_MODE) { + printf("\n%s\n\n", data.buf); + } + res = curl_easy_perform(e->c); +out: + osc_deinit_str(&end_call); + osc_deinit_str(&data); + return res; +} static int read_consumption_account_data(struct osc_read_consumption_account_arg *args, struct osc_str *data) { int ret = 0; @@ -19112,6 +21454,10 @@ static int read_consumption_account_data(struct osc_read_consumption_account_ar ARG_TO_JSON(Overall, bool, args->overall); ret += 1; } + if (args->is_set_show_price) { + ARG_TO_JSON(ShowPrice, bool, args->show_price); + ret += 1; + } if (args->to_date) { TRY_APPEND_COL(count_args, data); ARG_TO_JSON_STR("\"ToDate\":", args->to_date); @@ -20023,6 +22369,59 @@ int osc_link_private_ips(struct osc_env *e, struct osc_str *out, struct osc_link osc_deinit_str(&data); return res; } +static int link_policy_data(struct osc_link_policy_arg *args, struct osc_str *data) +{ + int ret = 0; + int count_args = 0; + + if (!args) + return 0; + osc_str_append_string(data, "{"); + if (args->is_set_dry_run) { + ARG_TO_JSON(DryRun, bool, args->dry_run); + ret += 1; + } + if (args->policy_orn) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"PolicyOrn\":", args->policy_orn); + ret += 1; + } + if (args->user_name) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"UserName\":", args->user_name); + ret += 1; + } + osc_str_append_string(data, "}"); + return !!ret; +} + +int osc_link_policy(struct osc_env *e, struct osc_str *out, struct osc_link_policy_arg *args) +{ + CURLcode res = CURLE_OUT_OF_MEMORY; + struct osc_str data; + struct osc_str end_call; + int r; + + osc_init_str(&data); + osc_init_str(&end_call); + r = link_policy_data(args, &data); + if (r < 0) + goto out; + + osc_str_append_string(&end_call, e->endpoint.buf); + osc_str_append_string(&end_call, "/api/v1/LinkPolicy"); + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); + if (e->flag & OSC_VERBOSE_MODE) { + printf("\n%s\n\n", data.buf); + } + res = curl_easy_perform(e->c); +out: + osc_deinit_str(&end_call); + osc_deinit_str(&data); + return res; +} static int link_nic_data(struct osc_link_nic_arg *args, struct osc_str *data) { int ret = 0; @@ -21191,7 +23590,109 @@ int osc_delete_route(struct osc_env *e, struct osc_str *out, struct osc_delete_r goto out; osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/DeleteRoute"); + osc_str_append_string(&end_call, "/api/v1/DeleteRoute"); + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); + if (e->flag & OSC_VERBOSE_MODE) { + printf("\n%s\n\n", data.buf); + } + res = curl_easy_perform(e->c); +out: + osc_deinit_str(&end_call); + osc_deinit_str(&data); + return res; +} +static int delete_public_ip_data(struct osc_delete_public_ip_arg *args, struct osc_str *data) +{ + int ret = 0; + int count_args = 0; + + if (!args) + return 0; + osc_str_append_string(data, "{"); + if (args->is_set_dry_run) { + ARG_TO_JSON(DryRun, bool, args->dry_run); + ret += 1; + } + if (args->public_ip) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"PublicIp\":", args->public_ip); + ret += 1; + } + if (args->public_ip_id) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"PublicIpId\":", args->public_ip_id); + ret += 1; + } + osc_str_append_string(data, "}"); + return !!ret; +} + +int osc_delete_public_ip(struct osc_env *e, struct osc_str *out, struct osc_delete_public_ip_arg *args) +{ + CURLcode res = CURLE_OUT_OF_MEMORY; + struct osc_str data; + struct osc_str end_call; + int r; + + osc_init_str(&data); + osc_init_str(&end_call); + r = delete_public_ip_data(args, &data); + if (r < 0) + goto out; + + osc_str_append_string(&end_call, e->endpoint.buf); + osc_str_append_string(&end_call, "/api/v1/DeletePublicIp"); + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); + if (e->flag & OSC_VERBOSE_MODE) { + printf("\n%s\n\n", data.buf); + } + res = curl_easy_perform(e->c); +out: + osc_deinit_str(&end_call); + osc_deinit_str(&data); + return res; +} +static int delete_policy_version_data(struct osc_delete_policy_version_arg *args, struct osc_str *data) +{ + int ret = 0; + int count_args = 0; + + if (!args) + return 0; + osc_str_append_string(data, "{"); + if (args->policy_orn) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"PolicyOrn\":", args->policy_orn); + ret += 1; + } + if (args->version_id) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"VersionId\":", args->version_id); + ret += 1; + } + osc_str_append_string(data, "}"); + return !!ret; +} + +int osc_delete_policy_version(struct osc_env *e, struct osc_str *out, struct osc_delete_policy_version_arg *args) +{ + CURLcode res = CURLE_OUT_OF_MEMORY; + struct osc_str data; + struct osc_str end_call; + int r; + + osc_init_str(&data); + osc_init_str(&end_call); + r = delete_policy_version_data(args, &data); + if (r < 0) + goto out; + + osc_str_append_string(&end_call, e->endpoint.buf); + osc_str_append_string(&end_call, "/api/v1/DeletePolicyVersion"); curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); @@ -21204,7 +23705,7 @@ int osc_delete_route(struct osc_env *e, struct osc_str *out, struct osc_delete_r osc_deinit_str(&data); return res; } -static int delete_public_ip_data(struct osc_delete_public_ip_arg *args, struct osc_str *data) +static int delete_policy_data(struct osc_delete_policy_arg *args, struct osc_str *data) { int ret = 0; int count_args = 0; @@ -21216,21 +23717,16 @@ static int delete_public_ip_data(struct osc_delete_public_ip_arg *args, struct ARG_TO_JSON(DryRun, bool, args->dry_run); ret += 1; } - if (args->public_ip) { - TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"PublicIp\":", args->public_ip); - ret += 1; - } - if (args->public_ip_id) { + if (args->policy_orn) { TRY_APPEND_COL(count_args, data); - ARG_TO_JSON_STR("\"PublicIpId\":", args->public_ip_id); + ARG_TO_JSON_STR("\"PolicyOrn\":", args->policy_orn); ret += 1; } osc_str_append_string(data, "}"); return !!ret; } -int osc_delete_public_ip(struct osc_env *e, struct osc_str *out, struct osc_delete_public_ip_arg *args) +int osc_delete_policy(struct osc_env *e, struct osc_str *out, struct osc_delete_policy_arg *args) { CURLcode res = CURLE_OUT_OF_MEMORY; struct osc_str data; @@ -21239,12 +23735,12 @@ int osc_delete_public_ip(struct osc_env *e, struct osc_str *out, struct osc_dele osc_init_str(&data); osc_init_str(&end_call); - r = delete_public_ip_data(args, &data); + r = delete_policy_data(args, &data); if (r < 0) goto out; osc_str_append_string(&end_call, e->endpoint.buf); - osc_str_append_string(&end_call, "/api/v1/DeletePublicIp"); + osc_str_append_string(&end_call, "/api/v1/DeletePolicy"); curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); @@ -22171,6 +24667,58 @@ int osc_delete_dhcp_options(struct osc_env *e, struct osc_str *out, struct osc_d osc_deinit_str(&data); return res; } +static int delete_dedicated_group_data(struct osc_delete_dedicated_group_arg *args, struct osc_str *data) +{ + int ret = 0; + int count_args = 0; + + if (!args) + return 0; + osc_str_append_string(data, "{"); + if (args->dedicated_group_id) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"DedicatedGroupId\":", args->dedicated_group_id); + ret += 1; + } + if (args->is_set_dry_run) { + ARG_TO_JSON(DryRun, bool, args->dry_run); + ret += 1; + } + if (args->is_set_force) { + ARG_TO_JSON(Force, bool, args->force); + ret += 1; + } + osc_str_append_string(data, "}"); + return !!ret; +} + +int osc_delete_dedicated_group(struct osc_env *e, struct osc_str *out, struct osc_delete_dedicated_group_arg *args) +{ + CURLcode res = CURLE_OUT_OF_MEMORY; + struct osc_str data; + struct osc_str end_call; + int r; + + osc_init_str(&data); + osc_init_str(&end_call); + r = delete_dedicated_group_data(args, &data); + if (r < 0) + goto out; + + osc_str_append_string(&end_call, e->endpoint.buf); + osc_str_append_string(&end_call, "/api/v1/DeleteDedicatedGroup"); + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); + if (e->flag & OSC_VERBOSE_MODE) { + printf("\n%s\n\n", data.buf); + } + res = curl_easy_perform(e->c); +out: + osc_deinit_str(&end_call); + osc_deinit_str(&data); + return res; +} static int delete_client_gateway_data(struct osc_delete_client_gateway_arg *args, struct osc_str *data) { int ret = 0; @@ -23715,6 +26263,175 @@ int osc_create_public_ip(struct osc_env *e, struct osc_str *out, struct osc_crea osc_deinit_str(&data); return res; } +static int create_product_type_data(struct osc_create_product_type_arg *args, struct osc_str *data) +{ + int ret = 0; + int count_args = 0; + + if (!args) + return 0; + osc_str_append_string(data, "{"); + if (args->description) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"Description\":", args->description); + ret += 1; + } + if (args->is_set_dry_run) { + ARG_TO_JSON(DryRun, bool, args->dry_run); + ret += 1; + } + if (args->vendor) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"Vendor\":", args->vendor); + ret += 1; + } + osc_str_append_string(data, "}"); + return !!ret; +} + +int osc_create_product_type(struct osc_env *e, struct osc_str *out, struct osc_create_product_type_arg *args) +{ + CURLcode res = CURLE_OUT_OF_MEMORY; + struct osc_str data; + struct osc_str end_call; + int r; + + osc_init_str(&data); + osc_init_str(&end_call); + r = create_product_type_data(args, &data); + if (r < 0) + goto out; + + osc_str_append_string(&end_call, e->endpoint.buf); + osc_str_append_string(&end_call, "/api/v1/CreateProductType"); + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); + if (e->flag & OSC_VERBOSE_MODE) { + printf("\n%s\n\n", data.buf); + } + res = curl_easy_perform(e->c); +out: + osc_deinit_str(&end_call); + osc_deinit_str(&data); + return res; +} +static int create_policy_version_data(struct osc_create_policy_version_arg *args, struct osc_str *data) +{ + int ret = 0; + int count_args = 0; + + if (!args) + return 0; + osc_str_append_string(data, "{"); + if (args->document) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"Document\":", args->document); + ret += 1; + } + if (args->policy_orn) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"PolicyOrn\":", args->policy_orn); + ret += 1; + } + if (args->is_set_set_as_default) { + ARG_TO_JSON(SetAsDefault, bool, args->set_as_default); + ret += 1; + } + osc_str_append_string(data, "}"); + return !!ret; +} + +int osc_create_policy_version(struct osc_env *e, struct osc_str *out, struct osc_create_policy_version_arg *args) +{ + CURLcode res = CURLE_OUT_OF_MEMORY; + struct osc_str data; + struct osc_str end_call; + int r; + + osc_init_str(&data); + osc_init_str(&end_call); + r = create_policy_version_data(args, &data); + if (r < 0) + goto out; + + osc_str_append_string(&end_call, e->endpoint.buf); + osc_str_append_string(&end_call, "/api/v1/CreatePolicyVersion"); + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); + if (e->flag & OSC_VERBOSE_MODE) { + printf("\n%s\n\n", data.buf); + } + res = curl_easy_perform(e->c); +out: + osc_deinit_str(&end_call); + osc_deinit_str(&data); + return res; +} +static int create_policy_data(struct osc_create_policy_arg *args, struct osc_str *data) +{ + int ret = 0; + int count_args = 0; + + if (!args) + return 0; + osc_str_append_string(data, "{"); + if (args->description) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"Description\":", args->description); + ret += 1; + } + if (args->document) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"Document\":", args->document); + ret += 1; + } + if (args->is_set_dry_run) { + ARG_TO_JSON(DryRun, bool, args->dry_run); + ret += 1; + } + if (args->path) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"Path\":", args->path); + ret += 1; + } + if (args->policy_name) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"PolicyName\":", args->policy_name); + ret += 1; + } + osc_str_append_string(data, "}"); + return !!ret; +} + +int osc_create_policy(struct osc_env *e, struct osc_str *out, struct osc_create_policy_arg *args) +{ + CURLcode res = CURLE_OUT_OF_MEMORY; + struct osc_str data; + struct osc_str end_call; + int r; + + osc_init_str(&data); + osc_init_str(&end_call); + r = create_policy_data(args, &data); + if (r < 0) + goto out; + + osc_str_append_string(&end_call, e->endpoint.buf); + osc_str_append_string(&end_call, "/api/v1/CreatePolicy"); + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); + if (e->flag & OSC_VERBOSE_MODE) { + printf("\n%s\n\n", data.buf); + } + res = curl_easy_perform(e->c); +out: + osc_deinit_str(&end_call); + osc_deinit_str(&data); + return res; +} static int create_nic_data(struct osc_create_nic_arg *args, struct osc_str *data) { int ret = 0; @@ -25010,6 +27727,63 @@ int osc_create_dhcp_options(struct osc_env *e, struct osc_str *out, struct osc_c osc_deinit_str(&data); return res; } +static int create_dedicated_group_data(struct osc_create_dedicated_group_arg *args, struct osc_str *data) +{ + int ret = 0; + int count_args = 0; + + if (!args) + return 0; + osc_str_append_string(data, "{"); + if (args->is_set_cpu_generation || args->cpu_generation) { + ARG_TO_JSON(CpuGeneration, int, args->cpu_generation); + ret += 1; + } + if (args->is_set_dry_run) { + ARG_TO_JSON(DryRun, bool, args->dry_run); + ret += 1; + } + if (args->name) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"Name\":", args->name); + ret += 1; + } + if (args->subregion_name) { + TRY_APPEND_COL(count_args, data); + ARG_TO_JSON_STR("\"SubregionName\":", args->subregion_name); + ret += 1; + } + osc_str_append_string(data, "}"); + return !!ret; +} + +int osc_create_dedicated_group(struct osc_env *e, struct osc_str *out, struct osc_create_dedicated_group_arg *args) +{ + CURLcode res = CURLE_OUT_OF_MEMORY; + struct osc_str data; + struct osc_str end_call; + int r; + + osc_init_str(&data); + osc_init_str(&end_call); + r = create_dedicated_group_data(args, &data); + if (r < 0) + goto out; + + osc_str_append_string(&end_call, e->endpoint.buf); + osc_str_append_string(&end_call, "/api/v1/CreateDedicatedGroup"); + curl_easy_setopt(e->c, CURLOPT_URL, end_call.buf); + curl_easy_setopt(e->c, CURLOPT_POSTFIELDS, r ? data.buf : ""); + curl_easy_setopt(e->c, CURLOPT_WRITEDATA, out); + if (e->flag & OSC_VERBOSE_MODE) { + printf("\n%s\n\n", data.buf); + } + res = curl_easy_perform(e->c); +out: + osc_deinit_str(&end_call); + osc_deinit_str(&data); + return res; +} static int create_client_gateway_data(struct osc_create_client_gateway_arg *args, struct osc_str *data) { int ret = 0; diff --git a/osc_sdk.h b/osc_sdk.h index a23f40b..d5aa050 100644 --- a/osc_sdk.h +++ b/osc_sdk.h @@ -70,8 +70,8 @@ struct osc_str { #define OSC_ENV_FREE_AK_SK (OSC_ENV_FREE_AK | OSC_ENV_FREE_SK) -#define OSC_API_VERSION "1.27" -#define OSC_SDK_VERSION 0X000600 +#define OSC_API_VERSION "1.28.5" +#define OSC_SDK_VERSION 0X000700 enum osc_auth_method { OSC_AKSK_METHOD, @@ -288,8 +288,14 @@ struct api_access_policy { /* * If true, a trusted session is activated, allowing you to bypass * Certificate Authorities (CAs) enforcement. For more information, see - * the `ApiKeyAuth` authentication scheme in the - * [Authentication](#authentication) section. + * [About Your API Access + * Policy](https://docs.outscale.com/en/userguide/About-Your-API-Access-P + * olicy.html).
\nIf this is enabled, it is required that you and + * all your users log in to Cockpit v2 using the WebAuthn method for + * multi-factor authentication. For more information, see [About + * Authentication > Multi-Factor + * Authentication](https://docs.outscale.com/en/userguide/About-Authentic + * ation.html#_multi_factor_authentication). */ int is_set_require_trusted_env; int require_trusted_env; /* bool */ @@ -767,6 +773,13 @@ struct consumption_entry { * can be different from your account in the `AccountId` parameter. */ char *paying_account_id; /* string */ + /* + * The total price of the consumed resource during the specified time + * period, in the currency of the catalog of the Region where the API + * method was used. + */ + int is_set_price; + double price; /* double */ /* * The service of the API call (`TinaOS-FCU`, `TinaOS-LBU`, * `TinaOS-DirectLink`, `TinaOS-OOS`, or `TinaOS-OSU`). @@ -788,6 +801,12 @@ struct consumption_entry { * The type of resource, depending on the API call. */ char *type; /* string */ + /* + * The unit price of the consumed resource, in the currency of the + * catalog of the Region where the API method was used. + */ + int is_set_unit_price; + double unit_price; /* double */ /* * The consumed amount for the resource. The unit depends on the * resource type. For more information, see the `Title` element. @@ -796,6 +815,40 @@ struct consumption_entry { double value; /* double */ }; +struct dedicated_group { + /* + * The account ID of the owners of the dedicated group. + */ + char *account_id; /* string */ + /* + * The processor generation. + */ + int is_set_cpu_generation; + int cpu_generation; /* int */ + /* + * The ID of the dedicated group. + */ + char *dedicated_group_id; /* string */ + /* + * The name of the dedicated group. + */ + char *name; /* string */ + /* + * The IDs of the Nets in the dedicated group. + */ + char *net_ids_str; + char **net_ids; /* array string */ + /* + * The name of the Subregion in which the dedicated group is located. + */ + char *subregion_name; /* string */ + /* + * The IDs of the VMs in the dedicated group. + */ + char *vm_ids_str; + char **vm_ids; /* array string */ +}; + struct dhcp_options_set { /* * If true, the DHCP options set is a default one. If false, it is not. @@ -904,7 +957,8 @@ struct direct_link_interface { */ char *virtual_gateway_id; /* string */ /* - * The VLAN number associated with the DirectLink interface. + * The VLAN number associated with the DirectLink interface. This number + * must be unique and be between `2` and `4094`. */ int is_set_vlan; int vlan; /* int */ @@ -1172,6 +1226,30 @@ struct filters_client_gateway { char **tags; /* array string */ }; +struct filters_dedicated_group { + /* + * The processor generation for the VMs in the dedicated group (for + * example, `4`). + */ + char *cpu_generations_str; + int *cpu_generations; /* array integer */ + /* + * The IDs of the dedicated groups. + */ + char *dedicated_group_ids_str; + char **dedicated_group_ids; /* array string */ + /* + * The names of the dedicated groups. + */ + char *names_str; + char **names; /* array string */ + /* + * The names of the Subregions in which the dedicated groups are located. + */ + char *subregion_names_str; + char **subregion_names; /* array string */ +}; + struct filters_dhcp_options { /* * If true, lists all default DHCP options set. If false, lists all @@ -1363,7 +1441,7 @@ struct filters_image { char *image_names_str; char **image_names; /* array string */ /* - * The account IDs of the users who have launch permissions for the OMIs. + * The account IDs which have launch permissions for the OMIs. */ char *permissions_to_launch_account_ids_str; char **permissions_to_launch_account_ids; /* array string */ @@ -1372,6 +1450,11 @@ struct filters_image { */ int is_set_permissions_to_launch_global_permission; int permissions_to_launch_global_permission; /* bool */ + /* + * The names of the product codes associated with the OMI. + */ + char *product_code_names_str; + char **product_code_names; /* array string */ /* * The product codes associated with the OMI. */ @@ -1383,7 +1466,7 @@ struct filters_image { char *root_device_names_str; char **root_device_names; /* array string */ /* - * The types of root device used by the OMIs (always `bsu`). + * The types of root device used by the OMIs (`bsu` or `ebs`). */ char *root_device_types_str; char **root_device_types; /* array string */ @@ -1430,7 +1513,7 @@ struct filters_internet_service { /* * The current states of the attachments between the Internet services * and the Nets (only `available`, if the Internet gateway is attached - * to a VPC). + * to a Net). */ char *link_states_str; char **link_states; /* array string */ @@ -1464,6 +1547,13 @@ struct filters_keypair { */ char *keypair_names_str; char **keypair_names; /* array string */ + /* + * The types of the keypairs (`ssh-rsa`, `ssh-ed25519`, + * `ecdsa-sha2-nistp256`, `ecdsa-sha2-nistp384`, or + * `ecdsa-sha2-nistp521`). + */ + char *keypair_types_str; + char **keypair_types; /* array string */ }; struct filters_listener_rule { @@ -1546,7 +1636,7 @@ struct filters_net { char *net_ids_str; char **net_ids; /* array string */ /* - * The states of the Nets (`pending` \\| `available` \\| `deleted`). + * The states of the Nets (`pending` \\| `available` \\| `deleting`). */ char *states_str; char **states; /* array string */ @@ -1628,6 +1718,12 @@ struct filters_net_peering { */ char *accepter_net_net_ids_str; char **accepter_net_net_ids; /* array string */ + /* + * The dates and times at which the Net peerings expire, in ISO 8601 + * date-time format (for example, `2020-06-14T00:00:00.000Z`). + */ + char *expiration_dates_str; + char **expiration_dates; /* array string */ /* * The IDs of the Net peerings. */ @@ -2012,11 +2108,6 @@ struct filters_route_table { }; struct filters_security_group { - /* - * The account IDs of the owners of the security groups. - */ - char *account_ids_str; - char **account_ids; /* array string */ /* * The descriptions of the security groups. */ @@ -2177,8 +2268,7 @@ struct filters_snapshot { */ char *from_creation_date; /* string */ /* - * The account IDs of one or more users who have permissions to create - * volumes. + * The account IDs which have permissions to create volumes. */ char *permissions_to_create_volume_account_ids_str; char **permissions_to_create_volume_account_ids; /* array string */ @@ -2290,6 +2380,16 @@ struct filters_subnet { }; struct filters_subregion { + /* + * The names of the Regions containing the Subregions. + */ + char *region_names_str; + char **region_names; /* array string */ + /* + * The states of the Subregions. + */ + char *states_str; + char **states; /* array string */ /* * The names of the Subregions. */ @@ -2379,6 +2479,292 @@ struct filters_virtual_gateway { }; struct filters_vm { + /* + * The architectures of the VMs (`i386` \\| `x86_64`). + */ + char *architectures_str; + char **architectures; /* array string */ + /* + * Whether the BSU volumes are deleted when terminating the VMs. + */ + int is_set_block_device_mapping_delete_on_vm_deletion; + int block_device_mapping_delete_on_vm_deletion; /* bool */ + /* + * The device names for the BSU volumes (in the format `/dev/sdX`, + * `/dev/sdXX`, `/dev/xvdX`, or `/dev/xvdXX`). + */ + char *block_device_mapping_device_names_str; + char **block_device_mapping_device_names; /* array string */ + /* + * The link dates for the BSU volumes mapped to the VMs (for example, + * `2016-01-23T18:45:30.000Z`). + */ + char *block_device_mapping_link_dates_str; + char **block_device_mapping_link_dates; /* array string */ + /* + * The states for the BSU volumes (`attaching` \\| `attached` \\| + * `detaching` \\| `detached`). + */ + char *block_device_mapping_states_str; + char **block_device_mapping_states; /* array string */ + /* + * The volume IDs of the BSU volumes. + */ + char *block_device_mapping_volume_ids_str; + char **block_device_mapping_volume_ids; /* array string */ + /* + * The idempotency tokens provided when launching the VMs. + */ + char *client_tokens_str; + char **client_tokens; /* array string */ + /* + * The dates when the VMs were launched. + */ + char *creation_dates_str; + char **creation_dates; /* array string */ + /* + * The IDs of the OMIs used to launch the VMs. + */ + char *image_ids_str; + char **image_ids; /* array string */ + /* + * Whether the source/destination checking is enabled (true) or disabled + * (false). + */ + int is_set_is_source_dest_checked; + int is_source_dest_checked; /* bool */ + /* + * The names of the keypairs used when launching the VMs. + */ + char *keypair_names_str; + char **keypair_names; /* array string */ + /* + * The numbers for the VMs when launching a group of several VMs (for + * example, `0`, `1`, `2`, and so on). + */ + char *launch_numbers_str; + int *launch_numbers; /* array integer */ + /* + * Whether the VMs are Spot Instances (spot). + */ + char *lifecycles_str; + char **lifecycles; /* array string */ + /* + * The IDs of the Nets in which the VMs are running. + */ + char *net_ids_str; + char **net_ids; /* array string */ + /* + * The IDs of the NICs. + */ + char *nic_account_ids_str; + char **nic_account_ids; /* array string */ + /* + * The descriptions of the NICs. + */ + char *nic_descriptions_str; + char **nic_descriptions; /* array string */ + /* + * Whether the source/destination checking is enabled (true) or disabled + * (false). + */ + int is_set_nic_is_source_dest_checked; + int nic_is_source_dest_checked; /* bool */ + /* + * Whether the NICs are deleted when the VMs they are attached to are + * deleted. + */ + int is_set_nic_link_nic_delete_on_vm_deletion; + int nic_link_nic_delete_on_vm_deletion; /* bool */ + /* + * The device numbers the NICs are attached to. + */ + char *nic_link_nic_device_numbers_str; + int *nic_link_nic_device_numbers; /* array integer */ + /* + * The dates and time when the NICs were attached to the VMs. + */ + char *nic_link_nic_link_nic_dates_str; + char **nic_link_nic_link_nic_dates; /* array string */ + /* + * The IDs of the NIC attachments. + */ + char *nic_link_nic_link_nic_ids_str; + char **nic_link_nic_link_nic_ids; /* array string */ + /* + * The states of the attachments. + */ + char *nic_link_nic_states_str; + char **nic_link_nic_states; /* array string */ + /* + * The account IDs of the owners of the VMs the NICs are attached to. + */ + char *nic_link_nic_vm_account_ids_str; + char **nic_link_nic_vm_account_ids; /* array string */ + /* + * The IDs of the VMs the NICs are attached to. + */ + char *nic_link_nic_vm_ids_str; + char **nic_link_nic_vm_ids; /* array string */ + /* + * The account IDs of the owners of the public IPs associated with the + * NICs. + */ + char *nic_link_public_ip_account_ids_str; + char **nic_link_public_ip_account_ids; /* array string */ + /* + * The association IDs returned when the public IPs were associated with + * the NICs. + */ + char *nic_link_public_ip_link_public_ip_ids_str; + char **nic_link_public_ip_link_public_ip_ids; /* array string */ + /* + * The allocation IDs returned when the public IPs were allocated to + * their accounts. + */ + char *nic_link_public_ip_public_ip_ids_str; + char **nic_link_public_ip_public_ip_ids; /* array string */ + /* + * The public IPs associated with the NICs. + */ + char *nic_link_public_ip_public_ips_str; + char **nic_link_public_ip_public_ips; /* array string */ + /* + * The Media Access Control (MAC) addresses of the NICs. + */ + char *nic_mac_addresses_str; + char **nic_mac_addresses; /* array string */ + /* + * The IDs of the Nets where the NICs are located. + */ + char *nic_net_ids_str; + char **nic_net_ids; /* array string */ + /* + * The IDs of the NICs. + */ + char *nic_nic_ids_str; + char **nic_nic_ids; /* array string */ + /* + * The account IDs of the owner of the public IPs associated with the + * private IPs. + */ + char *nic_private_ips_link_public_ip_account_ids_str; + char **nic_private_ips_link_public_ip_account_ids; /* array string */ + /* + * The public IPs associated with the private IPs. + */ + char *nic_private_ips_link_public_ip_ids_str; + char **nic_private_ips_link_public_ip_ids; /* array string */ + /* + * Whether the private IPs are the primary IPs associated with the NICs. + */ + int is_set_nic_private_ips_primary_ip; + int nic_private_ips_primary_ip; /* bool */ + /* + * The private IPs of the NICs. + */ + char *nic_private_ips_private_ips_str; + char **nic_private_ips_private_ips; /* array string */ + /* + * The IDs of the security groups associated with the NICs. + */ + char *nic_security_group_ids_str; + char **nic_security_group_ids; /* array string */ + /* + * The names of the security groups associated with the NICs. + */ + char *nic_security_group_names_str; + char **nic_security_group_names; /* array string */ + /* + * The states of the NICs (`available` \\| `in-use`). + */ + char *nic_states_str; + char **nic_states; /* array string */ + /* + * The IDs of the Subnets for the NICs. + */ + char *nic_subnet_ids_str; + char **nic_subnet_ids; /* array string */ + /* + * The Subregions where the NICs are located. + */ + char *nic_subregion_names_str; + char **nic_subregion_names; /* array string */ + /* + * The platforms. Use windows if you have Windows VMs. Otherwise, leave + * this filter blank. + */ + char *platforms_str; + char **platforms; /* array string */ + /* + * The private IPs of the VMs. + */ + char *private_ips_str; + char **private_ips; /* array string */ + /* + * The product codes associated with the OMI used to create the VMs. + */ + char *product_codes_str; + char **product_codes; /* array string */ + /* + * The public IPs of the VMs. + */ + char *public_ips_str; + char **public_ips; /* array string */ + /* + * The IDs of the reservation of the VMs, created every time you launch + * VMs. These reservation IDs can be associated with several VMs when + * you lauch a group of VMs using the same launch request. + */ + char *reservation_ids_str; + char **reservation_ids; /* array string */ + /* + * The names of the root devices for the VMs (for example, `/dev/sda1`) + */ + char *root_device_names_str; + char **root_device_names; /* array string */ + /* + * The root devices types used by the VMs (always `ebs`) + */ + char *root_device_types_str; + char **root_device_types; /* array string */ + /* + * The IDs of the security groups for the VMs (only in the public Cloud). + */ + char *security_group_ids_str; + char **security_group_ids; /* array string */ + /* + * The names of the security groups for the VMs (only in the public + * Cloud). + */ + char *security_group_names_str; + char **security_group_names; /* array string */ + /* + * The reason codes for the state changes. + */ + char *state_reason_codes_str; + int *state_reason_codes; /* array integer */ + /* + * The messages describing the state changes. + */ + char *state_reason_messages_str; + char **state_reason_messages; /* array string */ + /* + * The reasons explaining the current states of the VMs. This filter is + * like the `StateReasonCodes` one. + */ + char *state_reasons_str; + char **state_reasons; /* array string */ + /* + * The IDs of the Subnets for the VMs. + */ + char *subnet_ids_str; + char **subnet_ids; /* array string */ + /* + * The names of the Subregions of the VMs. + */ + char *subregion_names_str; + char **subregion_names; /* array string */ /* * The keys of the tags associated with the VMs. */ @@ -2396,11 +2782,45 @@ struct filters_vm { */ char *tags_str; char **tags; /* array string */ + /* + * The tenancies of the VMs (`dedicated` \\| `default` \\| `host`). + */ + char *tenancies_str; + char **tenancies; /* array string */ /* * One or more IDs of VMs. */ char *vm_ids_str; char **vm_ids; /* array string */ + /* + * The IDs of the security groups for the VMs. + */ + char *vm_security_group_ids_str; + char **vm_security_group_ids; /* array string */ + /* + * The names of the security group for the VMs. + */ + char *vm_security_group_names_str; + char **vm_security_group_names; /* array string */ + /* + * The state codes of the VMs: `-1` (quarantine), `0` (pending), `16` + * (running), `32` (shutting-down), `48` (terminated), `64` (stopping), + * and `80` (stopped). + */ + char *vm_state_codes_str; + int *vm_state_codes; /* array integer */ + /* + * The state names of the VMs (`pending` \\| `running` \\| `stopping` + * \\| `stopped` \\| `shutting-down` \\| `terminated` \\| `quarantine`). + */ + char *vm_state_names_str; + char **vm_state_names; /* array string */ + /* + * The VM types (for example, t2.micro). For more information, see [VM + * Types](https://docs.outscale.com/en/userguide/VM-Types.html). + */ + char *vm_types_str; + char **vm_types; /* array string */ }; struct filters_vm_group { @@ -2507,7 +2927,7 @@ struct filters_vm_template { /* * The key/value combination of the tags associated with the VM * templates, in the following format: - * \Filters\:{\Tags\:[\TAGKEY=TAGVALUE\]}. + * "Filters":{"Tags":["TAGKEY=TAGVALUE"]}. */ char *tags_str; char **tags; /* array string */ @@ -2530,6 +2950,21 @@ struct filters_vm_type { */ int is_set_bsu_optimized; int bsu_optimized; /* bool */ + /* + * The types of ephemeral storage disk. + */ + char *ephemerals_types_str; + char **ephemerals_types; /* array string */ + /* + * The number of Ethernet interfaces available. + */ + char *eths_str; + int *eths; /* array integer */ + /* + * The number of GPUs available. + */ + char *gpus_str; + int *gpus; /* array integer */ /* * The amounts of memory, in gibibytes (GiB). */ @@ -2541,8 +2976,8 @@ struct filters_vm_type { char *vcore_counts_str; int *vcore_counts; /* array integer */ /* - * The names of the VM types. For more information, see [Instance - * Types](https://docs.outscale.com/en/userguide/Instance-Types.html). + * The names of the VM types. For more information, see [VM + * Types](https://docs.outscale.com/en/userguide/VM-Types.html). */ char *vm_type_names_str; char **vm_type_names; /* array string */ @@ -2812,19 +3247,19 @@ struct flexible_gpu_catalog { struct health_check { /* - * The number of seconds between two pings (between `5` and `600` both - * included). + * The number of seconds between two requests (between `5` and `600` + * both included). */ int is_set_check_interval; int check_interval; /* int */ /* - * The number of consecutive successful pings before considering the VM - * as healthy (between `2` and `10` both included). + * The number of consecutive successful requests before considering the + * VM as healthy (between `2` and `10` both included). */ int is_set_healthy_threshold; int healthy_threshold; /* int */ /* - * If you use the HTTP or HTTPS protocols, the ping path. + * If you use the HTTP or HTTPS protocols, the request URL path. */ char *path; /* string */ /* @@ -2844,8 +3279,8 @@ struct health_check { int is_set_timeout; int timeout; /* int */ /* - * The number of consecutive failed pings before considering the VM as - * unhealthy (between `2` and `10` both included). + * The number of consecutive failed requests before considering the VM + * as unhealthy (between `2` and `10` both included). */ int is_set_unhealthy_threshold; int unhealthy_threshold; /* int */ @@ -2889,7 +3324,7 @@ struct image { */ char *account_id; /* string */ /* - * The architecture of the OMI (by default, `i386`). + * The architecture of the OMI. */ char *architecture; /* string */ /* @@ -2946,7 +3381,7 @@ struct image { */ char *description; /* string */ /* - * The location of the bucket where the OMI files are stored. + * The location from which the OMI files were created. */ char *file_location; /* string */ /* @@ -3123,11 +3558,17 @@ struct keypair { * The name of the keypair. */ char *keypair_name; /* string */ + /* + * The type of the keypair (`ssh-rsa`, `ssh-ed25519`, + * `ecdsa-sha2-nistp256`, `ecdsa-sha2-nistp384`, or + * `ecdsa-sha2-nistp521`). + */ + char *keypair_type; /* string */ }; struct keypair_created { /* - * The MD5 public key fingerprint as specified in section 4 of RFC 4716. + * The MD5 public key fingerprint, as specified in section 4 of RFC 4716. */ char *keypair_fingerprint; /* string */ /* @@ -3135,8 +3576,16 @@ struct keypair_created { */ char *keypair_name; /* string */ /* - * The private key. When saving the private key in a .rsa file, replace - * the `\\n` escape sequences with line breaks. + * The type of the keypair (`ssh-rsa`, `ssh-ed25519`, + * `ecdsa-sha2-nistp256`, `ecdsa-sha2-nistp384`, or + * `ecdsa-sha2-nistp521`). + */ + char *keypair_type; /* string */ + /* + * The private key, returned only if you are creating a keypair (not if + * you are importing). When you save this private key in a .rsa file, + * make sure you replace the `\\n` escape sequences with real line + * breaks. */ char *private_key; /* string */ }; @@ -3257,6 +3706,10 @@ struct link_route_table { */ int is_set_main; int main; /* bool */ + /* + * The ID of the Net. + */ + char *net_id; /* string */ /* * The ID of the route table. */ @@ -3267,6 +3720,32 @@ struct link_route_table { char *subnet_id; /* string */ }; +struct linked_policy { + /* + * The date and time of creation of the attached policy. + */ + char *creation_date; /* string */ + /* + * The date and time at which the attached policy was last modified. + */ + char *last_modification_date; /* string */ + /* + * The Outscale Resource Name (ORN) of the policy. For more information, + * see [Resource + * Identifiers](https://docs.outscale.com/en/userguide/Resource-Identifie + * rs.html). + */ + char *orn; /* string */ + /* + * The ID of the policy. + */ + char *policy_id; /* string */ + /* + * The name of the policy. + */ + char *policy_name; /* string */ +}; + struct linked_volume { /* * If true, the volume is deleted when terminating the VM. If false, the @@ -3496,13 +3975,14 @@ struct load_balancer { /* * Information about the health check configuration. * -CheckInterval: int - * The number of seconds between two pings (between `5` and `600` - * both included). + * The number of seconds between two requests (between `5` and + * `600` both included). * -HealthyThreshold: int - * The number of consecutive successful pings before considering - * the VM as healthy (between `2` and `10` both included). + * The number of consecutive successful requests before + * considering the VM as healthy (between `2` and `10` both + * included). * -Path: string - * If you use the HTTP or HTTPS protocols, the ping path. + * If you use the HTTP or HTTPS protocols, the request URL path. * -Port: int * The port number (between `1` and `65535`, both included). * -Protocol: string @@ -3513,8 +3993,8 @@ struct load_balancer { * VM as unhealthy, in seconds (between `2` and `60` both * included). * -UnhealthyThreshold: int - * The number of consecutive failed pings before considering the - * VM as unhealthy (between `2` and `10` both included). + * The number of consecutive failed requests before considering + * the VM as unhealthy (between `2` and `10` both included). */ char *health_check_str; int is_set_health_check; @@ -3837,7 +4317,7 @@ struct net { */ char *net_id; /* string */ /* - * The state of the Net (`pending` \\| `available` \\| `deleted`). + * The state of the Net (`pending` \\| `available` \\| `deleting`). */ char *state; /* string */ /* @@ -3935,6 +4415,10 @@ struct net_peering { char *accepter_net_str; int is_set_accepter_net; struct accepter_net accepter_net; /* ref AccepterNet */ + /* + * The date and time at which the Net peerings expire. + */ + char *expiration_date; /* string */ /* * The ID of the Net peering. */ @@ -4458,6 +4942,15 @@ struct phase2_options { char *pre_shared_key; /* string */ }; +struct phase2_options_to_update { + /* + * The pre-shared key to establish the initial authentication between + * the client gateway and the virtual gateway. This key can contain any + * character except line breaks and double quotes ("). + */ + char *pre_shared_key; /* string */ +}; + struct placement { /* * The name of the Subregion. If you specify this parameter, you must @@ -4465,11 +4958,80 @@ struct placement { */ char *subregion_name; /* string */ /* - * The tenancy of the VM (`default` \\| `dedicated`). + * The tenancy of the VM (`default`, `dedicated`, or a dedicated group + * ID). */ char *tenancy; /* string */ }; +struct policy { + /* + * The date and time of creation of the policy. + */ + char *creation_date; /* string */ + /* + * A friendly name for the policy (between 0 and 1000 characters). + */ + char *description; /* string */ + /* + * Indicates whether the policy can be linked to a group or an EIM user. + */ + int is_set_is_linkable; + int is_linkable; /* bool */ + /* + * The date and time at which the policy was last modified. + */ + char *last_modification_date; /* string */ + /* + * The OUTSCALE Resource Name (ORN) of the policy. For more information, + * see [Resource + * Identifiers](https://docs.outscale.com/en/userguide/Resource-Identifie + * rs.html). + */ + char *orn; /* string */ + /* + * The path to the policy. + */ + char *path; /* string */ + /* + * The ID of the policy default version. + */ + char *policy_default_version_id; /* string */ + /* + * The ID of the policy. + */ + char *policy_id; /* string */ + /* + * The name of the policy. + */ + char *policy_name; /* string */ + /* + * The number of resources attached to the policy. + */ + int is_set_resources_count; + int resources_count; /* int */ +}; + +struct policy_version { + /* + * The policy document as a json string. + */ + char *body; /* string */ + /* + * The date and time of creation of the version. + */ + char *creation_date; /* string */ + /* + * If true, the version is the default one. + */ + int is_set_default_version; + int default_version; /* bool */ + /* + * The ID of the version. + */ + char *version_id; /* string */ +}; + struct private_ip { /* * If true, the IP is the primary private IP of the NIC. @@ -4622,8 +5184,8 @@ struct quota { */ char *description; /* string */ /* - * The maximum value of the quota for the OUTSCALE user account (if - * there is no limit, `0`). + * The maximum value of the quota for the account (if there is no limit, + * `0`). */ int is_set_max_value; int max_value; /* int */ @@ -4640,7 +5202,7 @@ struct quota { */ char *short_description; /* string */ /* - * The limit value currently used by the OUTSCALE user account. + * The limit value currently used by the account. */ int is_set_used_value; int used_value; /* int */ @@ -4653,15 +5215,15 @@ struct quota_types { */ char *quota_type; /* string */ /* - * One or more quotas associated with the user. + * One or more quotas associated with the account. * Information about the quota. * -AccountId: string * The account ID of the owner of the quotas. * -Description: string * The description of the quota. * -MaxValue: int - * The maximum value of the quota for the OUTSCALE user account - * (if there is no limit, `0`). + * The maximum value of the quota for the account (if there is no + * limit, `0`). * -Name: string * The unique name of the quota. * -QuotaCollection: string @@ -4669,11 +5231,35 @@ struct quota_types { * -ShortDescription: string * The description of the quota. * -UsedValue: int - * The limit value currently used by the OUTSCALE user account. + * The limit value currently used by the account. + */ + char *quotas_str; + int nb_quotas; + struct quota *quotas; /* array ref Quota */ +}; + +struct read_linked_policies_filters { + /* + * The path prefix of the policies, set to a slash (`/`) by default. + */ + char *path_prefix; /* string */ +}; + +struct read_policies_filters { + /* + * If set to true, lists only the policies attached to a user. */ - char *quotas_str; - int nb_quotas; - struct quota *quotas; /* array ref Quota */ + int is_set_only_linked; + int only_linked; /* bool */ + /* + * The path prefix you can use to filter the results, set to a slash + * (`/`) by default. + */ + char *path_prefix; /* string */ + /* + * The scope to filter policies (`ALL` \\| `OWS` \\| `local`). + */ + char *scope; /* string */ }; struct region { @@ -4787,6 +5373,8 @@ struct route_table { * Subnet. * -Main: bool * If true, the route table is the main one. + * -NetId: string + * The ID of the Net. * -RouteTableId: string * The ID of the route table. * -SubnetId: string @@ -4858,7 +5446,7 @@ struct route_table { struct security_group { /* - * The account ID of a user that has been granted permission. + * The account ID that has been granted permission. */ char *account_id; /* string */ /* @@ -5273,8 +5861,7 @@ struct subregion { */ char *region_name; /* string */ /* - * The state of the Subregion (`available` \\| `information` \\| - * `impaired` \\| `unavailable`). + * The state of the Subregion. */ char *state; /* string */ /* @@ -5548,7 +6135,8 @@ struct vm { * The name of the Subregion. If you specify this parameter, you * must not specify the `Nics` parameter. * -Tenancy: string - * The tenancy of the VM (`default` \\| `dedicated`). + * The tenancy of the VM (`default`, `dedicated`, or a dedicated + * group ID). */ char *placement_str; int is_set_placement; @@ -5579,7 +6167,7 @@ struct vm { */ char *reservation_id; /* string */ /* - * The name of the root device for the VM (for example, `/dev/vda1`). + * The name of the root device for the VM (for example, `/dev/sda1`). */ char *root_device_name; /* string */ /* @@ -5636,8 +6224,8 @@ struct vm { */ char *vm_initiated_shutdown_behavior; /* string */ /* - * The type of VM. For more information, see [Instance - * Types](https://docs.outscale.com/en/userguide/Instance-Types.html). + * The type of VM. For more information, see [VM + * Types](https://docs.outscale.com/en/userguide/VM-Types.html). */ char *vm_type; /* string */ }; @@ -5821,6 +6409,20 @@ struct vm_type { */ int is_set_bsu_optimized; int bsu_optimized; /* bool */ + /* + * The type of ephemeral storage disk. + */ + char *ephemerals_type; /* string */ + /* + * The number of Ethernet interface available. + */ + int is_set_eth; + int eth; /* int */ + /* + * The number of GPU available. + */ + int is_set_gpu; + int gpu; /* int */ /* * The maximum number of private IPs per network interface card (NIC). */ @@ -6133,6 +6735,26 @@ struct vpn_connection { struct vpn_options vpn_options; /* ref VpnOptions */ }; +struct vpn_options_to_update { + /* + * Information about Phase 2 of the Internet Key Exchange (IKE) + * negotiation. + * -PreSharedKey: string + * The pre-shared key to establish the initial authentication + * between the client gateway and the virtual gateway. This key + * can contain any character except line breaks and double quotes + * ("). + */ + char *phase2_options_str; + int is_set_phase2_options; + struct phase2_options_to_update phase2_options; /* ref Phase2OptionsToUpdate */ + /* + * The range of inside IPs for the tunnel. This must be a /30 CIDR block + * from the 169.254.254.0/24 range. + */ + char *tunnel_inside_ip_range; /* string */ +}; + struct with { /* * By default or if set to true, the account ID is displayed. @@ -6244,53 +6866,9 @@ struct osc_update_vpn_connection_arg { char *vpn_connection_id; /* string */ /* * Information about the VPN options. - * -Phase1Options: ref Phase1Options - * Information about Phase 1 of the Internet Key Exchange (IKE) - * negotiation. When Phase 1 finishes successfully, peers proceed - * to Phase 2 negotiations. - * -DpdTimeoutAction: string - * The action to carry out after a Dead Peer Detection (DPD) - * timeout occurs. - * -DpdTimeoutSeconds: int - * The maximum waiting time for a Dead Peer Detection (DPD) - * response before considering the peer as dead, in seconds. - * -IkeVersions: array string - * The Internet Key Exchange (IKE) versions allowed for the VPN - * tunnel. - * -Phase1DhGroupNumbers: array integer - * The Diffie-Hellman (DH) group numbers allowed for the VPN - * tunnel for phase 1. - * -Phase1EncryptionAlgorithms: array string - * The encryption algorithms allowed for the VPN tunnel for - * phase - * 1. - * -Phase1IntegrityAlgorithms: array string - * The integrity algorithms allowed for the VPN tunnel for phase - * 1. - * -Phase1LifetimeSeconds: int - * The lifetime for phase 1 of the IKE negotiation process, in - * seconds. - * -ReplayWindowSize: int - * The number of packets in an IKE replay window. - * -StartupAction: string - * The action to carry out when establishing tunnels for a VPN - * connection. - * -Phase2Options: ref Phase2Options + * -Phase2Options: ref Phase2OptionsToUpdate * Information about Phase 2 of the Internet Key Exchange (IKE) * negotiation. - * -Phase2DhGroupNumbers: array integer - * The Diffie-Hellman (DH) group numbers allowed for the VPN - * tunnel for phase 2. - * -Phase2EncryptionAlgorithms: array string - * The encryption algorithms allowed for the VPN tunnel for - * phase - * 2. - * -Phase2IntegrityAlgorithms: array string - * The integrity algorithms allowed for the VPN tunnel for phase - * 2. - * -Phase2LifetimeSeconds: int - * The lifetime for phase 2 of the Internet Key Exchange (IKE) - * negociation process, in seconds. * -PreSharedKey: string * The pre-shared key to establish the initial authentication * between the client gateway and the virtual gateway. This key @@ -6303,7 +6881,7 @@ struct osc_update_vpn_connection_arg { */ char *vpn_options_str; int is_set_vpn_options; - struct vpn_options vpn_options; /* ref VpnOptions */ + struct vpn_options_to_update vpn_options; /* ref VpnOptionsToUpdate */ }; struct osc_update_volume_arg { @@ -6315,18 +6893,22 @@ struct osc_update_volume_arg { int is_set_dry_run; int dry_run; /* bool */ /* - * The new number of I/O operations per second (IOPS). This parameter - * can be specified only if you update an `io1` volume. The maximum - * number of IOPS allowed for `io1` volumes is `13000` with a maximum - * performance ratio of 300 IOPS per gibibyte. This modification is - * instantaneous on a cold volume, not on a hot one. + * **Cold volume**: the new number of I/O operations per second (IOPS). + * This parameter can be specified only if you update an `io1` volume or + * if you change the type of the volume for an `io1`. This modification + * is instantaneous.
\n**Hot volume**: the new number of I/O + * operations per second (IOPS). This parameter can be specified only if + * you update an `io1` volume. This modification is not instantaneous. + *

\nThe maximum number of IOPS allowed for `io1` volumes is + * `13000` with a maximum performance ratio of 300 IOPS per gibibyte. */ int is_set_iops; int iops; /* int */ /* - * (cold volume only) The new size of the volume, in gibibytes (GiB). - * This value must be equal to or greater than the current size of the - * volume. This modification is not instantaneous. + * **Cold volume**: the new size of the volume, in gibibytes (GiB). This + * value must be equal to or greater than the current size of the + * volume. This modification is not instantaneous.
\n**Hot + * volume**: you cannot change the size of a hot volume. */ int is_set_size; int size; /* int */ @@ -6335,9 +6917,10 @@ struct osc_update_volume_arg { */ char *volume_id; /* string */ /* - * (cold volume only) The new type of the volume (`standard` \\| `io1` - * \\| `gp2`). This modification is instantaneous. If you update to an - * `io1` volume, you must also specify the `Iops` parameter. + * **Cold volume**: the new type of the volume (`standard` \\| `io1` \\| + * `gp2`). This modification is instantaneous. If you update to an `io1` + * volume, you must also specify the `Iops` parameter.
\n**Hot + * volume**: you cannot change the type of a hot volume. */ char *volume_type; /* string */ }; @@ -6474,9 +7057,9 @@ struct osc_update_vm_arg { * still not effective in the operating system of the VM. To complete * the replacement and effectively apply the new keypair, you need to * perform other actions inside the VM. For more information, see - * [Modifying the Keypair of an - * Instance](https://docs.outscale.com/en/userguide/Modifying-the-Keypair - * -of-an-Instance.html). + * [Modifying the Keypair of a + * VM](https://docs.outscale.com/en/userguide/Modifying-the-Keypair-of-a- + * VM.html). */ char *keypair_name; /* string */ /* @@ -6509,8 +7092,8 @@ struct osc_update_vm_arg { */ char *vm_initiated_shutdown_behavior; /* string */ /* - * The type of VM. For more information, see [Instance - * Types](https://docs.outscale.com/en/userguide/Instance-Types.html). + * The type of VM. For more information, see [VM + * Types](https://docs.outscale.com/en/userguide/VM-Types.html). */ char *vm_type; /* string */ }; @@ -6624,6 +7207,24 @@ struct osc_update_server_certificate_arg { char *new_path; /* string */ }; +struct osc_update_route_table_link_arg { + /* Required: route_table_id, link_route_table_id */ + /* + * If true, checks whether you have the required permissions to perform + * the action. + */ + int is_set_dry_run; + int dry_run; /* bool */ + /* + * The ID of the current route table link. + */ + char *link_route_table_id; /* string */ + /* + * The ID of the new route table to associate with the Subnet. + */ + char *route_table_id; /* string */ +}; + struct osc_update_route_propagation_arg { /* Required: enable, route_table_id, virtual_gateway_id */ /* @@ -6800,13 +7401,14 @@ struct osc_update_load_balancer_arg { /* * Information about the health check configuration. * -CheckInterval: int - * The number of seconds between two pings (between `5` and `600` - * both included). + * The number of seconds between two requests (between `5` and + * `600` both included). * -HealthyThreshold: int - * The number of consecutive successful pings before considering - * the VM as healthy (between `2` and `10` both included). + * The number of consecutive successful requests before + * considering the VM as healthy (between `2` and `10` both + * included). * -Path: string - * If you use the HTTP or HTTPS protocols, the ping path. + * If you use the HTTP or HTTPS protocols, the request URL path. * -Port: int * The port number (between `1` and `65535`, both included). * -Protocol: string @@ -6817,8 +7419,8 @@ struct osc_update_load_balancer_arg { * VM as unhealthy, in seconds (between `2` and `60` both * included). * -UnhealthyThreshold: int - * The number of consecutive failed pings before considering the - * VM as unhealthy (between `2` and `10` both included). + * The number of consecutive failed requests before considering + * the VM as unhealthy (between `2` and `10` both included). */ char *health_check_str; int is_set_health_check; @@ -6981,6 +7583,24 @@ struct osc_update_direct_link_interface_arg { int mtu; /* int */ }; +struct osc_update_dedicated_group_arg { + /* Required: dedicated_group_id, name */ + /* + * The ID of the dedicated group you want to update. + */ + char *dedicated_group_id; /* string */ + /* + * If true, checks whether you have the required permissions to perform + * the action. + */ + int is_set_dry_run; + int dry_run; /* bool */ + /* + * The new name of the dedicated group. + */ + char *name; /* string */ +}; + struct osc_update_ca_arg { /* Required: ca_id */ /* @@ -7053,7 +7673,12 @@ struct osc_update_api_access_policy_arg { /* * If true, a trusted session is activated, provided that you specify * the `MaxAccessKeyExpirationSeconds` parameter with a value greater - * than `0`. + * than `0`.
\nEnabling this will require you and all your users to + * log in to Cockpit v2 using the WebAuthn method for multi-factor + * authentication. For more information, see [About Authentication > + * Multi-Factor + * Authentication](https://docs.outscale.com/en/userguide/About-Authentic + * ation.html#_multi_factor_authentication). */ int is_set_require_trusted_env; int require_trusted_env; /* bool */ @@ -7152,10 +7777,10 @@ struct osc_update_access_key_arg { */ char *state; /* string */ /* - * The name of the EIM the access key you want to modify is associated - * with. If you do not specify a user name, this action modifies the - * access key of the user who sends the request (which can be the root - * account). + * The name of the EIM user that the access key you want to modify is + * associated with. If you do not specify a user name, this action + * modifies the access key of the user who sends the request (which can + * be the root account). */ char *user_name; /* string */ }; @@ -7252,6 +7877,27 @@ struct osc_unlink_private_ips_arg { char **private_ips; /* array string */ }; +struct osc_unlink_policy_arg { + /* Required: policy_orn, user_name */ + /* + * If true, checks whether you have the required permissions to perform + * the action. + */ + int is_set_dry_run; + int dry_run; /* bool */ + /* + * The OUTSCALE Resource Name (ORN) of the policy. For more information, + * see [Resource + * Identifiers](https://docs.outscale.com/en/userguide/Resource-Identifie + * rs.html). + */ + char *policy_orn; /* string */ + /* + * The name of the user you want to detach the policy from. + */ + char *user_name; /* string */ +}; + struct osc_unlink_nic_arg { /* Required: link_nic_id */ /* @@ -7357,18 +8003,19 @@ struct osc_start_vms_arg { char **vm_ids; /* array string */ }; -struct osc_send_reset_password_email_arg { - /* Required: email */ +struct osc_set_default_policy_version_arg { + /* Required: policy_orn, version_id */ /* - * If true, checks whether you have the required permissions to perform - * the action. + * The OUTSCALE Resource Name (ORN) of the policy. For more information, + * see [Resource + * Identifiers](https://docs.outscale.com/en/userguide/Resource-Identifie + * rs.html). */ - int is_set_dry_run; - int dry_run; /* bool */ + char *policy_orn; /* string */ /* - * The email address provided for the account. + * The ID of the version. */ - char *email; /* string */ + char *version_id; /* string */ }; struct osc_scale_up_vm_group_arg { @@ -7409,24 +8056,6 @@ struct osc_scale_down_vm_group_arg { int vm_subtraction; /* int */ }; -struct osc_reset_account_password_arg { - /* Required: password, token */ - /* - * If true, checks whether you have the required permissions to perform - * the action. - */ - int is_set_dry_run; - int dry_run; /* bool */ - /* - * The new password for the account. - */ - char *password; /* string */ - /* - * The token you received at the email address provided for the account. - */ - char *token; /* string */ -}; - struct osc_reject_net_peering_arg { /* Required: net_peering_id */ /* @@ -7523,6 +8152,17 @@ struct osc_read_vpn_connections_arg { char *filters_str; int is_set_filters; struct filters_vpn_connection filters; /* ref FiltersVpnConnection */ + /* + * The token to request the next page of results. Each token refers to a + * specific page. + */ + char *next_page_token; /* string */ + /* + * The maximum number of logs returned in a single response (between + * `1`and `1000`, both included). By default, `100`. + */ + int is_set_results_per_page; + int results_per_page; /* int */ }; struct osc_read_volumes_arg { @@ -7577,6 +8217,17 @@ struct osc_read_volumes_arg { char *filters_str; int is_set_filters; struct filters_volume filters; /* ref FiltersVolume */ + /* + * The token to request the next page of results. Each token refers to a + * specific page. + */ + char *next_page_token; /* string */ + /* + * The maximum number of logs returned in a single response (between + * `1`and `1000`, both included). By default, `100`. + */ + int is_set_results_per_page; + int results_per_page; /* int */ }; struct osc_read_vms_state_arg { @@ -7647,6 +8298,136 @@ struct osc_read_vms_arg { int dry_run; /* bool */ /* * One or more filters. + * -Architectures: array string + * The architectures of the VMs (`i386` \\| `x86_64`). + * -BlockDeviceMappingDeleteOnVmDeletion: bool + * Whether the BSU volumes are deleted when terminating the VMs. + * -BlockDeviceMappingDeviceNames: array string + * The device names for the BSU volumes (in the format + * `/dev/sdX`, `/dev/sdXX`, `/dev/xvdX`, or `/dev/xvdXX`). + * -BlockDeviceMappingLinkDates: array string + * The link dates for the BSU volumes mapped to the VMs (for + * example, `2016-01-23T18:45:30.000Z`). + * -BlockDeviceMappingStates: array string + * The states for the BSU volumes (`attaching` \\| `attached` \\| + * `detaching` \\| `detached`). + * -BlockDeviceMappingVolumeIds: array string + * The volume IDs of the BSU volumes. + * -ClientTokens: array string + * The idempotency tokens provided when launching the VMs. + * -CreationDates: array string + * The dates when the VMs were launched. + * -ImageIds: array string + * The IDs of the OMIs used to launch the VMs. + * -IsSourceDestChecked: bool + * Whether the source/destination checking is enabled (true) or + * disabled (false). + * -KeypairNames: array string + * The names of the keypairs used when launching the VMs. + * -LaunchNumbers: array integer + * The numbers for the VMs when launching a group of several VMs + * (for example, `0`, `1`, `2`, and so on). + * -Lifecycles: array string + * Whether the VMs are Spot Instances (spot). + * -NetIds: array string + * The IDs of the Nets in which the VMs are running. + * -NicAccountIds: array string + * The IDs of the NICs. + * -NicDescriptions: array string + * The descriptions of the NICs. + * -NicIsSourceDestChecked: bool + * Whether the source/destination checking is enabled (true) or + * disabled (false). + * -NicLinkNicDeleteOnVmDeletion: bool + * Whether the NICs are deleted when the VMs they are attached to + * are deleted. + * -NicLinkNicDeviceNumbers: array integer + * The device numbers the NICs are attached to. + * -NicLinkNicLinkNicDates: array string + * The dates and time when the NICs were attached to the VMs. + * -NicLinkNicLinkNicIds: array string + * The IDs of the NIC attachments. + * -NicLinkNicStates: array string + * The states of the attachments. + * -NicLinkNicVmAccountIds: array string + * The account IDs of the owners of the VMs the NICs are attached + * to. + * -NicLinkNicVmIds: array string + * The IDs of the VMs the NICs are attached to. + * -NicLinkPublicIpAccountIds: array string + * The account IDs of the owners of the public IPs associated + * with the NICs. + * -NicLinkPublicIpLinkPublicIpIds: array string + * The association IDs returned when the public IPs were + * associated with the NICs. + * -NicLinkPublicIpPublicIpIds: array string + * The allocation IDs returned when the public IPs were allocated + * to their accounts. + * -NicLinkPublicIpPublicIps: array string + * The public IPs associated with the NICs. + * -NicMacAddresses: array string + * The Media Access Control (MAC) addresses of the NICs. + * -NicNetIds: array string + * The IDs of the Nets where the NICs are located. + * -NicNicIds: array string + * The IDs of the NICs. + * -NicPrivateIpsLinkPublicIpAccountIds: array string + * The account IDs of the owner of the public IPs associated with + * the private IPs. + * -NicPrivateIpsLinkPublicIpIds: array string + * The public IPs associated with the private IPs. + * -NicPrivateIpsPrimaryIp: bool + * Whether the private IPs are the primary IPs associated with + * the NICs. + * -NicPrivateIpsPrivateIps: array string + * The private IPs of the NICs. + * -NicSecurityGroupIds: array string + * The IDs of the security groups associated with the NICs. + * -NicSecurityGroupNames: array string + * The names of the security groups associated with the NICs. + * -NicStates: array string + * The states of the NICs (`available` \\| `in-use`). + * -NicSubnetIds: array string + * The IDs of the Subnets for the NICs. + * -NicSubregionNames: array string + * The Subregions where the NICs are located. + * -Platforms: array string + * The platforms. Use windows if you have Windows VMs. Otherwise, + * leave this filter blank. + * -PrivateIps: array string + * The private IPs of the VMs. + * -ProductCodes: array string + * The product codes associated with the OMI used to create the + * VMs. + * -PublicIps: array string + * The public IPs of the VMs. + * -ReservationIds: array string + * The IDs of the reservation of the VMs, created every time you + * launch VMs. These reservation IDs can be associated with + * several VMs when you lauch a group of VMs using the same launch + * request. + * -RootDeviceNames: array string + * The names of the root devices for the VMs (for example, + * `/dev/sda1`) + * -RootDeviceTypes: array string + * The root devices types used by the VMs (always `ebs`) + * -SecurityGroupIds: array string + * The IDs of the security groups for the VMs (only in the public + * Cloud). + * -SecurityGroupNames: array string + * The names of the security groups for the VMs (only in the + * public Cloud). + * -StateReasonCodes: array integer + * The reason codes for the state changes. + * -StateReasonMessages: array string + * The messages describing the state changes. + * -StateReasons: array string + * The reasons explaining the current states of the VMs. This + * filter is like the `StateReasonCodes` one. + * -SubnetIds: array string + * The IDs of the Subnets for the VMs. + * -SubregionNames: array string + * The names of the Subregions of the VMs. * -TagKeys: array string * The keys of the tags associated with the VMs. * -TagValues: array string @@ -7656,12 +8437,42 @@ struct osc_read_vms_arg { * in the following format: * "Filters":{"Tags":["TAGKEY=TAGVALUE&quo * t;]}. + * -Tenancies: array string + * The tenancies of the VMs (`dedicated` \\| `default` \\| + * `host`). * -VmIds: array string * One or more IDs of VMs. + * -VmSecurityGroupIds: array string + * The IDs of the security groups for the VMs. + * -VmSecurityGroupNames: array string + * The names of the security group for the VMs. + * -VmStateCodes: array integer + * The state codes of the VMs: `-1` (quarantine), `0` (pending), + * `16` (running), `32` (shutting-down), `48` (terminated), `64` + * (stopping), and `80` (stopped). + * -VmStateNames: array string + * The state names of the VMs (`pending` \\| `running` \\| + * `stopping` \\| `stopped` \\| `shutting-down` \\| `terminated` + * \\| `quarantine`). + * -VmTypes: array string + * The VM types (for example, t2.micro). For more information, + * see [VM + * Types](https://docs.outscale.com/en/userguide/VM-Types.html). */ char *filters_str; int is_set_filters; struct filters_vm filters; /* ref FiltersVm */ + /* + * The token to request the next page of results. Each token refers to a + * specific page. + */ + char *next_page_token; /* string */ + /* + * The maximum number of logs returned in a single response (between + * `1`and `1000`, both included). By default, `100`. + */ + int is_set_results_per_page; + int results_per_page; /* int */ }; struct osc_read_vm_types_arg { @@ -7677,14 +8488,19 @@ struct osc_read_vm_types_arg { * -BsuOptimized: bool * This parameter is not available. It is present in our API for * the sake of historical compatibility with AWS. + * -EphemeralsTypes: array string + * The types of ephemeral storage disk. + * -Eths: array integer + * The number of Ethernet interfaces available. + * -Gpus: array integer + * The number of GPUs available. * -MemorySizes: array double * The amounts of memory, in gibibytes (GiB). * -VcoreCounts: array integer * The numbers of vCores. * -VmTypeNames: array string - * The names of the VM types. For more information, see [Instance - * Types](https://docs.outscale.com/en/userguide/Instance-Types.htm - * l). + * The names of the VM types. For more information, see [VM + * Types](https://docs.outscale.com/en/userguide/VM-Types.html). * -VolumeCounts: array integer * The maximum number of ephemeral storage disks. * -VolumeSizes: array integer @@ -7726,7 +8542,8 @@ struct osc_read_vm_templates_arg { * -Tags: array string * The key/value combination of the tags associated with the VM * templates, in the following format: - * \Filters\:{\Tags\:[\TAGKEY=TAGVALUE\]}. + * "Filters":{"Tags":["TAGKEY=TAGVALUE&quo + * t;]}. * -VmTemplateIds: array string * The IDs of the VM templates. * -VmTemplateNames: array string @@ -7746,7 +8563,6 @@ struct osc_read_vm_groups_arg { int is_set_dry_run; int dry_run; /* bool */ /* - * ReadVmGroupsRequest_Filters * One or more filters. * -Descriptions: array string * The descriptions of the VM groups. @@ -7814,6 +8630,17 @@ struct osc_read_virtual_gateways_arg { char *filters_str; int is_set_filters; struct filters_virtual_gateway filters; /* ref FiltersVirtualGateway */ + /* + * The token to request the next page of results. Each token refers to a + * specific page. + */ + char *next_page_token; /* string */ + /* + * The maximum number of logs returned in a single response (between + * `1`and `1000`, both included). By default, `100`. + */ + int is_set_results_per_page; + int results_per_page; /* int */ }; struct osc_read_users_arg { @@ -7871,6 +8698,10 @@ struct osc_read_subregions_arg { int dry_run; /* bool */ /* * One or more filters. + * -RegionNames: array string + * The names of the Regions containing the Subregions. + * -States: array string + * The states of the Subregions. * -SubregionNames: array string * The names of the Subregions. */ @@ -7938,8 +8769,7 @@ struct osc_read_snapshots_arg { * The beginning of the time period, in ISO 8601 date-time format * (for example, `2020-06-14T00:00:00.000Z`). * -PermissionsToCreateVolumeAccountIds: array string - * The account IDs of one or more users who have permissions to - * create volumes. + * The account IDs which have permissions to create volumes. * -PermissionsToCreateVolumeGlobalPermission: bool * If true, lists all public volumes. If false, lists all private * volumes. @@ -8019,8 +8849,6 @@ struct osc_read_security_groups_arg { int dry_run; /* bool */ /* * One or more filters. - * -AccountIds: array string - * The account IDs of the owners of the security groups. * -Descriptions: array string * The descriptions of the security groups. * -InboundRuleAccountIds: array string @@ -8151,6 +8979,17 @@ struct osc_read_route_tables_arg { char *filters_str; int is_set_filters; struct filters_route_table filters; /* ref FiltersRouteTable */ + /* + * The token to request the next page of results. Each token refers to a + * specific page. + */ + char *next_page_token; /* string */ + /* + * The maximum number of logs returned in a single response (between + * `1`and `1000`, both included). By default, `100`. + */ + int is_set_results_per_page; + int results_per_page; /* int */ }; struct osc_read_regions_arg { @@ -8226,9 +9065,20 @@ struct osc_read_public_ips_arg { * -VmIds: array string * The IDs of the VMs. */ - char *filters_str; - int is_set_filters; - struct filters_public_ip filters; /* ref FiltersPublicIp */ + char *filters_str; + int is_set_filters; + struct filters_public_ip filters; /* ref FiltersPublicIp */ + /* + * The token to request the next page of results. Each token refers to a + * specific page. + */ + char *next_page_token; /* string */ + /* + * The maximum number of logs returned in a single response (between + * `1`and `1000`, both included). By default, `100`. + */ + int is_set_results_per_page; + int results_per_page; /* int */ }; struct osc_read_public_ip_ranges_arg { @@ -8269,6 +9119,88 @@ struct osc_read_product_types_arg { struct filters_product_type filters; /* ref FiltersProductType */ }; +struct osc_read_policy_versions_arg { + /* Required: policy_orn */ + /* + * The item starting the list of policies requested. + */ + int is_set_first_item; + int first_item; /* int */ + /* + * The OUTSCALE Resource Name (ORN) of the policy. For more information, + * see [Resource + * Identifiers](https://docs.outscale.com/en/userguide/Resource-Identifie + * rs.html). + */ + char *policy_orn; /* string */ + /* + * The maximum number of items that can be returned in a single response + * (by default, 100). + */ + int is_set_results_per_page; + int results_per_page; /* int */ +}; + +struct osc_read_policy_version_arg { + /* Required: policy_orn, version_id */ + /* + * The OUTSCALE Resource Name (ORN) of the policy. For more information, + * see [Resource + * Identifiers](https://docs.outscale.com/en/userguide/Resource-Identifie + * rs.html). + */ + char *policy_orn; /* string */ + /* + * The ID of the policy version. + */ + char *version_id; /* string */ +}; + +struct osc_read_policy_arg { + /* Required: policy_orn */ + /* + * The OUTSCALE Resource Name (ORN) of the policy. For more information, + * see [Resource + * Identifiers](https://docs.outscale.com/en/userguide/Resource-Identifie + * rs.html). + */ + char *policy_orn; /* string */ +}; + +struct osc_read_policies_arg { + /* Required:none */ + /* + * If true, checks whether you have the required permissions to perform + * the action. + */ + int is_set_dry_run; + int dry_run; /* bool */ + /* + * One or more filters. + * -OnlyLinked: bool + * If set to true, lists only the policies attached to a user. + * -PathPrefix: string + * The path prefix you can use to filter the results, set to a + * slash (`/`) by default. + * -Scope: string + * The scope to filter policies (`ALL` \\| `OWS` \\| `local`). + */ + char *filters_str; + int is_set_filters; + struct read_policies_filters filters; /* ref ReadPoliciesFilters */ + /* + * The item starting the list of policies requested. + */ + int is_set_first_item; + int first_item; /* int */ + /* + * The maximum number of items that can be returned in a single response + * (by default, 100). + */ + int is_set_results_per_page; + int results_per_page; /* int */ +}; + struct osc_read_nics_arg { /* Required:none */ /* @@ -8373,7 +9305,7 @@ struct osc_read_nets_arg { * The IDs of the Nets. * -States: array string * The states of the Nets (`pending` \\| `available` \\| - * `deleted`). + * `deleting`). * -TagKeys: array string * The keys of the tags associated with the Nets. * -TagValues: array string @@ -8406,6 +9338,10 @@ struct osc_read_net_peerings_arg { * `10.0.0.0/24`). * -AccepterNetNetIds: array string * The IDs of the peer Nets. + * -ExpirationDates: array string + * The dates and times at which the Net peerings expire, in ISO + * 8601 date-time format (for example, + * `2020-06-14T00:00:00.000Z`). * -NetPeeringIds: array string * The IDs of the Net peerings. * -SourceNetAccountIds: array string @@ -8433,6 +9369,17 @@ struct osc_read_net_peerings_arg { char *filters_str; int is_set_filters; struct filters_net_peering filters; /* ref FiltersNetPeering */ + /* + * The token to request the next page of results. Each token refers to a + * specific page. + */ + char *next_page_token; /* string */ + /* + * The maximum number of logs returned in a single response (between + * `1`and `1000`, both included). By default, `100`. + */ + int is_set_results_per_page; + int results_per_page; /* int */ }; struct osc_read_net_access_points_arg { @@ -8468,6 +9415,17 @@ struct osc_read_net_access_points_arg { char *filters_str; int is_set_filters; struct filters_net_access_point filters; /* ref FiltersNetAccessPoint */ + /* + * The token to request the next page of results. Each token refers to a + * specific page. + */ + char *next_page_token; /* string */ + /* + * The maximum number of logs returned in a single response (between + * `1`and `1000`, both included). By default, `100`. + */ + int is_set_results_per_page; + int results_per_page; /* int */ }; struct osc_read_net_access_point_services_arg { @@ -8522,6 +9480,17 @@ struct osc_read_nat_services_arg { char *filters_str; int is_set_filters; struct filters_nat_service filters; /* ref FiltersNatService */ + /* + * The token to request the next page of results. Each token refers to a + * specific page. + */ + char *next_page_token; /* string */ + /* + * The maximum number of logs returned in a single response (between + * `1`and `1000`, both included). By default, `100`. + */ + int is_set_results_per_page; + int results_per_page; /* int */ }; struct osc_read_locations_arg { @@ -8585,6 +9554,40 @@ struct osc_read_listener_rules_arg { struct filters_listener_rule filters; /* ref FiltersListenerRule */ }; +struct osc_read_linked_policies_arg { + /* Required:none */ + /* + * If true, checks whether you have the required permissions to perform + * the action. + */ + int is_set_dry_run; + int dry_run; /* bool */ + /* + * One or more filters. + * -PathPrefix: string + * The path prefix of the policies, set to a slash (`/`) by + * default. + */ + char *filters_str; + int is_set_filters; + struct read_linked_policies_filters filters; /* ref ReadLinkedPoliciesFilters */ + /* + * The item starting the list of policies requested. + */ + int is_set_first_item; + int first_item; /* int */ + /* + * The maximum number of items that can be returned in a single response + * (by default, 100). + */ + int is_set_results_per_page; + int results_per_page; /* int */ + /* + * The name of the user the policies are linked to. + */ + char *user_name; /* string */ +}; + struct osc_read_keypairs_arg { /* Required:none */ /* @@ -8599,6 +9602,10 @@ struct osc_read_keypairs_arg { * The fingerprints of the keypairs. * -KeypairNames: array string * The names of the keypairs. + * -KeypairTypes: array string + * The types of the keypairs (`ssh-rsa`, `ssh-ed25519`, + * `ecdsa-sha2-nistp256`, `ecdsa-sha2-nistp384`, or + * `ecdsa-sha2-nistp521`). */ char *filters_str; int is_set_filters; @@ -8622,7 +9629,7 @@ struct osc_read_internet_services_arg { * -LinkStates: array string * The current states of the attachments between the Internet * services and the Nets (only `available`, if the Internet - * gateway is attached to a VPC). + * gateway is attached to a Net). * -TagKeys: array string * The keys of the tags associated with the Internet services. * -TagValues: array string @@ -8677,17 +9684,18 @@ struct osc_read_images_arg { * -ImageNames: array string * The names of the OMIs, provided when they were created. * -PermissionsToLaunchAccountIds: array string - * The account IDs of the users who have launch permissions for - * the OMIs. + * The account IDs which have launch permissions for the OMIs. * -PermissionsToLaunchGlobalPermission: bool * If true, lists all public OMIs. If false, lists all private * OMIs. + * -ProductCodeNames: array string + * The names of the product codes associated with the OMI. * -ProductCodes: array string * The product codes associated with the OMI. * -RootDeviceNames: array string * The name of the root device. This value must be /dev/sda1. * -RootDeviceTypes: array string - * The types of root device used by the OMIs (always `bsu`). + * The types of root device used by the OMIs (`bsu` or `ebs`). * -States: array string * The states of the OMIs (`pending` \\| `available` \\| * `failed`). @@ -8706,6 +9714,17 @@ struct osc_read_images_arg { char *filters_str; int is_set_filters; struct filters_image filters; /* ref FiltersImage */ + /* + * The token to request the next page of results. Each token refers to a + * specific page. + */ + char *next_page_token; /* string */ + /* + * The maximum number of logs returned in a single response (between + * `1`and `1000`, both included). By default, `100`. + */ + int is_set_results_per_page; + int results_per_page; /* int */ }; struct osc_read_image_export_tasks_arg { @@ -8846,6 +9865,43 @@ struct osc_read_dhcp_options_arg { char *filters_str; int is_set_filters; struct filters_dhcp_options filters; /* ref FiltersDhcpOptions */ + /* + * The token to request the next page of results. Each token refers to a + * specific page. + */ + char *next_page_token; /* string */ + /* + * The maximum number of logs returned in a single response (between + * `1`and `1000`, both included). By default, `100`. + */ + int is_set_results_per_page; + int results_per_page; /* int */ +}; + +struct osc_read_dedicated_groups_arg { + /* Required:none */ + /* + * If true, checks whether you have the required permissions to perform + * the action. + */ + int is_set_dry_run; + int dry_run; /* bool */ + /* + * One or more filters. + * -CpuGenerations: array integer + * The processor generation for the VMs in the dedicated group + * (for example, `4`). + * -DedicatedGroupIds: array string + * The IDs of the dedicated groups. + * -Names: array string + * The names of the dedicated groups. + * -SubregionNames: array string + * The names of the Subregions in which the dedicated groups are + * located. + */ + char *filters_str; + int is_set_filters; + struct filters_dedicated_group filters; /* ref FiltersDedicatedGroup */ }; struct osc_read_consumption_account_arg { @@ -8872,6 +9928,15 @@ struct osc_read_consumption_account_arg { */ int is_set_overall; int overall; /* bool */ + /* + * By default or if false, returns only the consumption of the specific + * account that sends this request. If true, returns the unit price of + * the consumed resource, and the total price of the consumed resource + * during the specified time period in the currency of the catalog of + * the Region where the API method was used. + */ + int is_set_show_price; + int show_price; /* bool */ /* * The end of the time period, in ISO 8601 date format (for example, * `2020-06-30`). The date-time format is also accepted, but only with a @@ -8941,7 +10006,6 @@ struct osc_read_catalogs_arg { int is_set_dry_run; int dry_run; /* bool */ /* - * ReadCatalogsRequest_Filters * One or more filters. * -CurrentCatalogOnly: bool * By default or if set to true, only returns the current @@ -9250,9 +10314,9 @@ struct osc_link_public_ip_arg { /* * If true, allows the public IP to be associated with the VM or NIC * that you specify even if it is already associated with another VM or - * NIC. If false, prevents the EIP from being associated with the VM or - * NIC that you specify if it is already associated with another VM or - * NIC. (By default, true in the public Cloud, false in a Net.) + * NIC. If false, prevents the public IP from being associated with the + * VM or NIC that you specify if it is already associated with another + * VM or NIC. (By default, true in the public Cloud, false in a Net.) */ int is_set_allow_relink; int allow_relink; /* bool */ @@ -9324,6 +10388,28 @@ struct osc_link_private_ips_arg { int secondary_private_ip_count; /* int */ }; +struct osc_link_policy_arg { + /* Required: policy_orn, user_name */ + /* + * If true, checks whether you have the required permissions to perform + * the action. + */ + int is_set_dry_run; + int dry_run; /* bool */ + /* + * The OUTSCALE Resource Name (ORN) of the policy. For more information, + * see [Resource + * Identifiers](https://docs.outscale.com/en/userguide/Resource-Identifie + * rs.html). + */ + char *policy_orn; /* string */ + /* + * The name of the user you want to link the policy to (between 1 and 64 + * characters). + */ + char *user_name; /* string */ +}; + struct osc_link_nic_arg { /* Required: device_number, vm_id, nic_id */ /* @@ -9778,6 +10864,38 @@ struct osc_delete_public_ip_arg { char *public_ip_id; /* string */ }; +struct osc_delete_policy_version_arg { + /* Required: policy_orn, version_id */ + /* + * The OUTSCALE Resource Name (ORN) of the policy. For more information, + * see [Resource + * Identifiers](https://docs.outscale.com/en/userguide/Resource-Identifie + * rs.html). + */ + char *policy_orn; /* string */ + /* + * The ID of the version of the policy you want to delete. + */ + char *version_id; /* string */ +}; + +struct osc_delete_policy_arg { + /* Required: policy_orn */ + /* + * If true, checks whether you have the required permissions to perform + * the action. + */ + int is_set_dry_run; + int dry_run; /* bool */ + /* + * The OUTSCALE Resource Name (ORN) of the policy you want to delete. + * For more information, see [Resource + * Identifiers](https://docs.outscale.com/en/userguide/Resource-Identifie + * rs.html). + */ + char *policy_orn; /* string */ +}; + struct osc_delete_nic_arg { /* Required: nic_id */ /* @@ -10049,6 +11167,26 @@ struct osc_delete_dhcp_options_arg { int dry_run; /* bool */ }; +struct osc_delete_dedicated_group_arg { + /* Required: dedicated_group_id */ + /* + * The ID of the dedicated group you want to delete. + */ + char *dedicated_group_id; /* string */ + /* + * If true, checks whether you have the required permissions to perform + * the action. + */ + int is_set_dry_run; + int dry_run; /* bool */ + /* + * If true, forces the deletion of the dedicated group and all its + * dependencies. + */ + int is_set_force; + int force; /* bool */ +}; + struct osc_delete_client_gateway_arg { /* Required: client_gateway_id */ /* @@ -10147,10 +11285,11 @@ struct osc_create_vpn_connection_arg { int is_set_dry_run; int dry_run; /* bool */ /* - * If false, the VPN connection uses dynamic routing with Border Gateway - * Protocol (BGP). If true, routing is controlled using static routes. - * For more information about how to create and delete static routes, - * see [CreateVpnConnectionRoute](#createvpnconnectionroute) and + * By default or if false, the VPN connection uses dynamic routing with + * Border Gateway Protocol (BGP). If true, routing is controlled using + * static routes. For more information about how to create and delete + * static routes, see + * [CreateVpnConnectionRoute](#createvpnconnectionroute) and * [DeleteVpnConnectionRoute](#deletevpnconnectionroute). */ int is_set_static_routes_only; @@ -10365,7 +11504,8 @@ struct osc_create_vms_arg { * The name of the Subregion. If you specify this parameter, you * must not specify the `Nics` parameter. * -Tenancy: string - * The tenancy of the VM (`default` \\| `dedicated`). + * The tenancy of the VM (`default`, `dedicated`, or a dedicated + * group ID). */ char *placement_str; int is_set_placement; @@ -10409,8 +11549,8 @@ struct osc_create_vms_arg { * AWS type is still returned. If the specified or converted TINA type * includes a performance flag, this performance flag is applied * regardless of the value you may have provided in the `Performance` - * parameter. For more information, see [Instance - * Types](https://docs.outscale.com/en/userguide/Instance-Types.html). + * parameter. For more information, see [VM + * Types](https://docs.outscale.com/en/userguide/VM-Types.html). */ char *vm_type; /* string */ }; @@ -10551,11 +11691,17 @@ struct osc_create_user_arg { int is_set_dry_run; int dry_run; /* bool */ /* - * The path to the EIM user you want to create (by default, `/`). + * The path to the EIM user you want to create (by default, `/`). This + * path name must begin and end with a slash (/), and contain between 1 + * and 512 alphanumeric characters and/or slashes (/), or underscores + * (_). */ char *path; /* string */ /* - * The name of the EIM user you want to create. + * The name of the EIM user you want to create. This user name must + * contain between 1 and 64 alphanumeric characters and/or pluses (+), + * equals (=), commas (,), periods (.), at signs (@), dashes (-), or + * underscores (_). */ char *user_name; /* string */ }; @@ -10601,7 +11747,7 @@ struct osc_create_subnet_arg { * or a subset of the Net one. In case of several Subnets in a Net, * their IP ranges must not overlap. The smallest Subnet you can create * uses a /29 netmask (eight IPs). For more information, see [About - * VPCs](https://docs.outscale.com/en/userguide/About-VPCs.html). + * Nets](https://docs.outscale.com/en/userguide/About-Nets.html). */ char *ip_range; /* string */ /* @@ -10664,9 +11810,10 @@ struct osc_create_snapshot_arg { int is_set_dry_run; int dry_run; /* bool */ /* - * (When importing) The pre-signed URL of the snapshot you want to - * import, or the normal URL of the snapshot if you have permission on - * the OOS bucket. For more information, see [Configuring a Pre-signed + * **(when importing from a bucket)** The pre-signed URL of the snapshot + * you want to import, or the normal URL of the snapshot if you have + * permission on the OOS bucket. For more information, see [Configuring + * a Pre-signed * URL](https://docs.outscale.com/en/userguide/Configuring-a-Pre-signed-U * RL.html) or [Managing Access to Your Buckets and * Objects](https://docs.outscale.com/en/userguide/Managing-Access-to-You @@ -10674,23 +11821,24 @@ struct osc_create_snapshot_arg { */ char *file_location; /* string */ /* - * (When importing) The size of the snapshot you want to create in your - * account, in bytes. This size must be greater than or equal to the - * size of the original, uncompressed snapshot. + * **(when importing from a bucket)** The size of the snapshot you want + * to create in your account, in bytes. This size must be greater than + * or equal to the size of the original, uncompressed snapshot. */ int is_set_snapshot_size; int snapshot_size; /* int */ /* - * (When copying) The name of the source Region, which must be the same - * as the Region of your account. + * **(when copying a snapshot)** The name of the source Region, which + * must be the same as the Region of your account. */ char *source_region_name; /* string */ /* - * (When copying) The ID of the snapshot you want to copy. + * **(when copying a snapshot)** The ID of the snapshot you want to copy. */ char *source_snapshot_id; /* string */ /* - * (When creating) The ID of the volume you want to create a snapshot of. + * **(when creating from a volume)** The ID of the volume you want to + * create a snapshot of. */ char *volume_id; /* string */ }; @@ -10839,9 +11987,9 @@ struct osc_create_security_group_rule_arg { struct osc_create_security_group_arg { /* Required: description, security_group_name */ /* - * A description for the security group, with a maximum length of 255 - * [ASCII printable - * characters](https://en.wikipedia.org/wiki/ASCII#Printable_characters). + * A description for the security group.
\nThis description can + * contain between 1 and 255 characters. Allowed characters are `a-z`, + * `A-Z`, `0-9`, accented letters, spaces, and `_.-:/()#,@[]+=&;{}!$*`. */ char *description; /* string */ /* @@ -10856,8 +12004,9 @@ struct osc_create_security_group_arg { char *net_id; /* string */ /* * The name of the security group.
\nThis name must not start with - * `sg-`.
\nThis name must be unique and contain between 1 and 255 - * ASCII characters. Accented letters are not allowed. + * `sg-`.
\nThis name must be unique and contain between 1 and 255 + * characters. Allowed characters are `a-z`, `A-Z`, `0-9`, spaces, and + * `_.-:/()#,@[]+=&;{}!$*`. */ char *security_group_name; /* string */ }; @@ -10925,6 +12074,77 @@ struct osc_create_public_ip_arg { int dry_run; /* bool */ }; +struct osc_create_product_type_arg { + /* Required: description */ + /* + * The description of the product type. + */ + char *description; /* string */ + /* + * If true, checks whether you have the required permissions to perform + * the action. + */ + int is_set_dry_run; + int dry_run; /* bool */ + /* + * The vendor of the product type. + */ + char *vendor; /* string */ +}; + +struct osc_create_policy_version_arg { + /* Required: document, policy_orn */ + /* + * The policy document, corresponding to a JSON string that contains the + * policy. For more information, see [EIM Reference + * Information](https://docs.outscale.com/en/userguide/EIM-Reference-Info + * rmation.html). + */ + char *document; /* string */ + /* + * The OUTSCALE Resource Name (ORN) of the policy. For more information, + * see [Resource + * Identifiers](https://docs.outscale.com/en/userguide/Resource-Identifie + * rs.html). + */ + char *policy_orn; /* string */ + /* + * If set to true, the new policy version is set as the default version + * and becomes the operative one. + */ + int is_set_set_as_default; + int set_as_default; /* bool */ +}; + +struct osc_create_policy_arg { + /* Required: document, policy_name */ + /* + * A description for the policy. + */ + char *description; /* string */ + /* + * The policy document, corresponding to a JSON string that contains the + * policy. For more information, see [EIM Reference + * Information](https://docs.outscale.com/en/userguide/EIM-Reference-Info + * rmation.html). + */ + char *document; /* string */ + /* + * If true, checks whether you have the required permissions to perform + * the action. + */ + int is_set_dry_run; + int dry_run; /* bool */ + /* + * The path of the policy. + */ + char *path; /* string */ + /* + * The name of the policy. + */ + char *policy_name; /* string */ +}; + struct osc_create_nic_arg { /* Required: subnet_id */ /* @@ -11017,9 +12237,11 @@ struct osc_create_net_arg { */ char *ip_range; /* string */ /* - * The tenancy options for the VMs (`default` if a VM created in a Net - * can be launched with any tenancy, `dedicated` if it can be launched - * with dedicated tenancy VMs running on single-tenant hardware). + * The tenancy options for the VMs:
\n- `default` if a VM created + * in a Net can be launched with any tenancy.
\n- `dedicated` if it + * can be launched with dedicated tenancy VMs running on single-tenant + * hardware.
\n- `dedicated group ID`: if it can be launched in a + * dedicated group on single-tenant hardware. */ char *tenancy; /* string */ }; @@ -11294,7 +12516,8 @@ struct osc_create_keypair_arg { */ char *keypair_name; /* string */ /* - * The public key. It must be Base64-encoded. + * The public key to import in your account, if you are importing an + * existing keypair. This value must be Base64-encoded. */ char *public_key; /* string */ }; @@ -11349,12 +12572,13 @@ struct osc_create_image_export_task_arg { struct osc_create_image_arg { /* Required:none */ /* - * The architecture of the OMI (by default, `i386` if you specified the - * `FileLocation` or `RootDeviceName` parameter). + * **(when registering from a snapshot, or from a bucket without using a + * manifest file)** The architecture of the OMI (`i386` or `x84_64`). */ char *architecture; /* string */ /* - * One or more block device mappings. + * **(when registering from a snapshot, or from a bucket without using a + * manifest file)** One or more block device mappings. * One or more parameters used to automatically set up volumes * when the VM is created. * -Bsu: ref BsuToCreate @@ -11408,22 +12632,28 @@ struct osc_create_image_arg { int is_set_dry_run; int dry_run; /* bool */ /* - * The pre-signed URL of the OMI manifest file, or the full path to the - * OMI stored in a bucket. If you specify this parameter, a copy of the - * OMI is created in your account. You must specify only one of the - * following parameters: `FileLocation`, `RootDeviceName`, - * `SourceImageId` or `VmId`. + * **(when registering from a bucket by using a manifest file)** The + * pre-signed URL of the manifest file for the OMI you want to register. + * For more information, see [Configuring a Pre-signed + * URL](https://docs.outscale.com/en/userguide/Configuring-a-Pre-signed-U + * RL.html) or [Managing Access to Your Buckets and + * Objects](https://docs.outscale.com/en/userguide/Managing-Access-to-You + * r-Buckets-and-Objects.html).
\nYou can also specify the normal + * URL of the OMI if you have permission on the OOS bucket, without + * using the manifest file, but in that case, you need to manually + * specify through the other parameters all the information that would + * otherwise be read from the manifest file. */ char *file_location; /* string */ /* * A unique name for the new OMI.
\nConstraints: 3-128 alphanumeric - * characters, underscores (_), spaces ( ), parentheses (()), slashes - * (/), periods (.), or dashes (-). + * characters, underscores (`_`), spaces (` `), parentheses (`()`), + * slashes (`/`), periods (`.`), or dashes (`-`). */ char *image_name; /* string */ /* - * If false, the VM shuts down before creating the OMI and then reboots. - * If true, the VM does not. + * **(when creating from a VM)** If false, the VM shuts down before + * creating the OMI and then reboots. If true, the VM does not. */ int is_set_no_reboot; int no_reboot; /* bool */ @@ -11433,26 +12663,22 @@ struct osc_create_image_arg { char *product_codes_str; char **product_codes; /* array string */ /* - * The name of the root device. You must specify only one of the - * following parameters: `FileLocation`, `RootDeviceName`, - * `SourceImageId` or `VmId`. + * **(when registering from a snapshot, or from a bucket without using a + * manifest file)** The name of the root device for the new OMI. */ char *root_device_name; /* string */ /* - * The ID of the OMI you want to copy. You must specify only one of the - * following parameters: `FileLocation`, `RootDeviceName`, - * `SourceImageId` or `VmId`. + * **(when copying an OMI)** The ID of the OMI you want to copy. */ char *source_image_id; /* string */ /* - * The name of the source Region, which must be the same as the Region - * of your account. + * **(when copying an OMI)** The name of the source Region (always the + * same as the Region of your account). */ char *source_region_name; /* string */ /* - * The ID of the VM from which you want to create the OMI. You must - * specify only one of the following parameters: `FileLocation`, - * `RootDeviceName`, `SourceImageId` or `VmId`. + * **(when creating from a VM)** The ID of the VM from which you want to + * create the OMI. */ char *vm_id; /* string */ }; @@ -11514,7 +12740,8 @@ struct osc_create_direct_link_interface_arg { * -VirtualGatewayId: string * The ID of the target virtual gateway. * -Vlan: int - * The VLAN number associated with the DirectLink interface. + * The VLAN number associated with the DirectLink interface. This + * number must be unique and be between `2` and `4094`. */ char *direct_link_interface_str; int is_set_direct_link_interface; @@ -11589,12 +12816,38 @@ struct osc_create_dhcp_options_arg { char **ntp_servers; /* array string */ }; +struct osc_create_dedicated_group_arg { + /* Required: cpu_generation, name, subregion_name */ + /* + * The processor generation for the VMs in the dedicated group (for + * example, `4`). + */ + int is_set_cpu_generation; + int cpu_generation; /* int */ + /* + * If true, checks whether you have the required permissions to perform + * the action. + */ + int is_set_dry_run; + int dry_run; /* bool */ + /* + * A name for the dedicated group. + */ + char *name; /* string */ + /* + * The Subregion in which you want to create the dedicated group. + */ + char *subregion_name; /* string */ +}; + struct osc_create_client_gateway_arg { /* Required: bgp_asn, public_ip, connection_type */ /* * The Autonomous System Number (ASN) used by the Border Gateway * Protocol (BGP) to find the path to your client gateway through the - * Internet. This number must be between `1` and `4294967295`. + * Internet.
\nThis number must be between `1` and `4294967295`. If + * you do not have an ASN, you can choose one between 64512 and 65534, + * or between 4200000000 and 4294967294. */ int is_set_bgp_asn; int bgp_asn; /* int */ @@ -11878,6 +13131,7 @@ int osc_update_user(struct osc_env *e, struct osc_str *out, struct osc_update_us int osc_update_subnet(struct osc_env *e, struct osc_str *out, struct osc_update_subnet_arg *args); int osc_update_snapshot(struct osc_env *e, struct osc_str *out, struct osc_update_snapshot_arg *args); int osc_update_server_certificate(struct osc_env *e, struct osc_str *out, struct osc_update_server_certificate_arg *args); +int osc_update_route_table_link(struct osc_env *e, struct osc_str *out, struct osc_update_route_table_link_arg *args); int osc_update_route_propagation(struct osc_env *e, struct osc_str *out, struct osc_update_route_propagation_arg *args); int osc_update_route(struct osc_env *e, struct osc_str *out, struct osc_update_route_arg *args); int osc_update_nic(struct osc_env *e, struct osc_str *out, struct osc_update_nic_arg *args); @@ -11888,6 +13142,7 @@ int osc_update_listener_rule(struct osc_env *e, struct osc_str *out, struct osc_ int osc_update_image(struct osc_env *e, struct osc_str *out, struct osc_update_image_arg *args); int osc_update_flexible_gpu(struct osc_env *e, struct osc_str *out, struct osc_update_flexible_gpu_arg *args); int osc_update_direct_link_interface(struct osc_env *e, struct osc_str *out, struct osc_update_direct_link_interface_arg *args); +int osc_update_dedicated_group(struct osc_env *e, struct osc_str *out, struct osc_update_dedicated_group_arg *args); int osc_update_ca(struct osc_env *e, struct osc_str *out, struct osc_update_ca_arg *args); int osc_update_api_access_rule(struct osc_env *e, struct osc_str *out, struct osc_update_api_access_rule_arg *args); int osc_update_api_access_policy(struct osc_env *e, struct osc_str *out, struct osc_update_api_access_policy_arg *args); @@ -11898,16 +13153,16 @@ int osc_unlink_virtual_gateway(struct osc_env *e, struct osc_str *out, struct os int osc_unlink_route_table(struct osc_env *e, struct osc_str *out, struct osc_unlink_route_table_arg *args); int osc_unlink_public_ip(struct osc_env *e, struct osc_str *out, struct osc_unlink_public_ip_arg *args); int osc_unlink_private_ips(struct osc_env *e, struct osc_str *out, struct osc_unlink_private_ips_arg *args); +int osc_unlink_policy(struct osc_env *e, struct osc_str *out, struct osc_unlink_policy_arg *args); int osc_unlink_nic(struct osc_env *e, struct osc_str *out, struct osc_unlink_nic_arg *args); int osc_unlink_load_balancer_backend_machines(struct osc_env *e, struct osc_str *out, struct osc_unlink_load_balancer_backend_machines_arg *args); int osc_unlink_internet_service(struct osc_env *e, struct osc_str *out, struct osc_unlink_internet_service_arg *args); int osc_unlink_flexible_gpu(struct osc_env *e, struct osc_str *out, struct osc_unlink_flexible_gpu_arg *args); int osc_stop_vms(struct osc_env *e, struct osc_str *out, struct osc_stop_vms_arg *args); int osc_start_vms(struct osc_env *e, struct osc_str *out, struct osc_start_vms_arg *args); -int osc_send_reset_password_email(struct osc_env *e, struct osc_str *out, struct osc_send_reset_password_email_arg *args); +int osc_set_default_policy_version(struct osc_env *e, struct osc_str *out, struct osc_set_default_policy_version_arg *args); int osc_scale_up_vm_group(struct osc_env *e, struct osc_str *out, struct osc_scale_up_vm_group_arg *args); int osc_scale_down_vm_group(struct osc_env *e, struct osc_str *out, struct osc_scale_down_vm_group_arg *args); -int osc_reset_account_password(struct osc_env *e, struct osc_str *out, struct osc_reset_account_password_arg *args); int osc_reject_net_peering(struct osc_env *e, struct osc_str *out, struct osc_reject_net_peering_arg *args); int osc_register_vms_in_load_balancer(struct osc_env *e, struct osc_str *out, struct osc_register_vms_in_load_balancer_arg *args); int osc_reboot_vms(struct osc_env *e, struct osc_str *out, struct osc_reboot_vms_arg *args); @@ -11936,6 +13191,10 @@ int osc_read_public_ips(struct osc_env *e, struct osc_str *out, struct osc_read_ int osc_read_public_ip_ranges(struct osc_env *e, struct osc_str *out, struct osc_read_public_ip_ranges_arg *args); int osc_read_public_catalog(struct osc_env *e, struct osc_str *out, struct osc_read_public_catalog_arg *args); int osc_read_product_types(struct osc_env *e, struct osc_str *out, struct osc_read_product_types_arg *args); +int osc_read_policy_versions(struct osc_env *e, struct osc_str *out, struct osc_read_policy_versions_arg *args); +int osc_read_policy_version(struct osc_env *e, struct osc_str *out, struct osc_read_policy_version_arg *args); +int osc_read_policy(struct osc_env *e, struct osc_str *out, struct osc_read_policy_arg *args); +int osc_read_policies(struct osc_env *e, struct osc_str *out, struct osc_read_policies_arg *args); int osc_read_nics(struct osc_env *e, struct osc_str *out, struct osc_read_nics_arg *args); int osc_read_nets(struct osc_env *e, struct osc_str *out, struct osc_read_nets_arg *args); int osc_read_net_peerings(struct osc_env *e, struct osc_str *out, struct osc_read_net_peerings_arg *args); @@ -11946,6 +13205,7 @@ int osc_read_locations(struct osc_env *e, struct osc_str *out, struct osc_read_l int osc_read_load_balancers(struct osc_env *e, struct osc_str *out, struct osc_read_load_balancers_arg *args); int osc_read_load_balancer_tags(struct osc_env *e, struct osc_str *out, struct osc_read_load_balancer_tags_arg *args); int osc_read_listener_rules(struct osc_env *e, struct osc_str *out, struct osc_read_listener_rules_arg *args); +int osc_read_linked_policies(struct osc_env *e, struct osc_str *out, struct osc_read_linked_policies_arg *args); int osc_read_keypairs(struct osc_env *e, struct osc_str *out, struct osc_read_keypairs_arg *args); int osc_read_internet_services(struct osc_env *e, struct osc_str *out, struct osc_read_internet_services_arg *args); int osc_read_images(struct osc_env *e, struct osc_str *out, struct osc_read_images_arg *args); @@ -11955,6 +13215,7 @@ int osc_read_flexible_gpu_catalog(struct osc_env *e, struct osc_str *out, struct int osc_read_direct_links(struct osc_env *e, struct osc_str *out, struct osc_read_direct_links_arg *args); int osc_read_direct_link_interfaces(struct osc_env *e, struct osc_str *out, struct osc_read_direct_link_interfaces_arg *args); int osc_read_dhcp_options(struct osc_env *e, struct osc_str *out, struct osc_read_dhcp_options_arg *args); +int osc_read_dedicated_groups(struct osc_env *e, struct osc_str *out, struct osc_read_dedicated_groups_arg *args); int osc_read_consumption_account(struct osc_env *e, struct osc_str *out, struct osc_read_consumption_account_arg *args); int osc_read_console_output(struct osc_env *e, struct osc_str *out, struct osc_read_console_output_arg *args); int osc_read_client_gateways(struct osc_env *e, struct osc_str *out, struct osc_read_client_gateways_arg *args); @@ -11972,6 +13233,7 @@ int osc_link_virtual_gateway(struct osc_env *e, struct osc_str *out, struct osc_ int osc_link_route_table(struct osc_env *e, struct osc_str *out, struct osc_link_route_table_arg *args); int osc_link_public_ip(struct osc_env *e, struct osc_str *out, struct osc_link_public_ip_arg *args); int osc_link_private_ips(struct osc_env *e, struct osc_str *out, struct osc_link_private_ips_arg *args); +int osc_link_policy(struct osc_env *e, struct osc_str *out, struct osc_link_policy_arg *args); int osc_link_nic(struct osc_env *e, struct osc_str *out, struct osc_link_nic_arg *args); int osc_link_load_balancer_backend_machines(struct osc_env *e, struct osc_str *out, struct osc_link_load_balancer_backend_machines_arg *args); int osc_link_internet_service(struct osc_env *e, struct osc_str *out, struct osc_link_internet_service_arg *args); @@ -11994,6 +13256,8 @@ int osc_delete_security_group(struct osc_env *e, struct osc_str *out, struct osc int osc_delete_route_table(struct osc_env *e, struct osc_str *out, struct osc_delete_route_table_arg *args); int osc_delete_route(struct osc_env *e, struct osc_str *out, struct osc_delete_route_arg *args); int osc_delete_public_ip(struct osc_env *e, struct osc_str *out, struct osc_delete_public_ip_arg *args); +int osc_delete_policy_version(struct osc_env *e, struct osc_str *out, struct osc_delete_policy_version_arg *args); +int osc_delete_policy(struct osc_env *e, struct osc_str *out, struct osc_delete_policy_arg *args); int osc_delete_nic(struct osc_env *e, struct osc_str *out, struct osc_delete_nic_arg *args); int osc_delete_net_peering(struct osc_env *e, struct osc_str *out, struct osc_delete_net_peering_arg *args); int osc_delete_net_access_point(struct osc_env *e, struct osc_str *out, struct osc_delete_net_access_point_arg *args); @@ -12012,6 +13276,7 @@ int osc_delete_export_task(struct osc_env *e, struct osc_str *out, struct osc_de int osc_delete_direct_link_interface(struct osc_env *e, struct osc_str *out, struct osc_delete_direct_link_interface_arg *args); int osc_delete_direct_link(struct osc_env *e, struct osc_str *out, struct osc_delete_direct_link_arg *args); int osc_delete_dhcp_options(struct osc_env *e, struct osc_str *out, struct osc_delete_dhcp_options_arg *args); +int osc_delete_dedicated_group(struct osc_env *e, struct osc_str *out, struct osc_delete_dedicated_group_arg *args); int osc_delete_client_gateway(struct osc_env *e, struct osc_str *out, struct osc_delete_client_gateway_arg *args); int osc_delete_ca(struct osc_env *e, struct osc_str *out, struct osc_delete_ca_arg *args); int osc_delete_api_access_rule(struct osc_env *e, struct osc_str *out, struct osc_delete_api_access_rule_arg *args); @@ -12034,6 +13299,9 @@ int osc_create_security_group(struct osc_env *e, struct osc_str *out, struct osc int osc_create_route_table(struct osc_env *e, struct osc_str *out, struct osc_create_route_table_arg *args); int osc_create_route(struct osc_env *e, struct osc_str *out, struct osc_create_route_arg *args); int osc_create_public_ip(struct osc_env *e, struct osc_str *out, struct osc_create_public_ip_arg *args); +int osc_create_product_type(struct osc_env *e, struct osc_str *out, struct osc_create_product_type_arg *args); +int osc_create_policy_version(struct osc_env *e, struct osc_str *out, struct osc_create_policy_version_arg *args); +int osc_create_policy(struct osc_env *e, struct osc_str *out, struct osc_create_policy_arg *args); int osc_create_nic(struct osc_env *e, struct osc_str *out, struct osc_create_nic_arg *args); int osc_create_net_peering(struct osc_env *e, struct osc_str *out, struct osc_create_net_peering_arg *args); int osc_create_net_access_point(struct osc_env *e, struct osc_str *out, struct osc_create_net_access_point_arg *args); @@ -12052,6 +13320,7 @@ int osc_create_flexible_gpu(struct osc_env *e, struct osc_str *out, struct osc_c int osc_create_direct_link_interface(struct osc_env *e, struct osc_str *out, struct osc_create_direct_link_interface_arg *args); int osc_create_direct_link(struct osc_env *e, struct osc_str *out, struct osc_create_direct_link_arg *args); int osc_create_dhcp_options(struct osc_env *e, struct osc_str *out, struct osc_create_dhcp_options_arg *args); +int osc_create_dedicated_group(struct osc_env *e, struct osc_str *out, struct osc_create_dedicated_group_arg *args); int osc_create_client_gateway(struct osc_env *e, struct osc_str *out, struct osc_create_client_gateway_arg *args); int osc_create_ca(struct osc_env *e, struct osc_str *out, struct osc_create_ca_arg *args); int osc_create_api_access_rule(struct osc_env *e, struct osc_str *out, struct osc_create_api_access_rule_arg *args); diff --git a/version b/version index 0ea3a94..0d91a54 100644 --- a/version +++ b/version @@ -1 +1 @@ -0.2.0 +0.3.0