From b02011d158ce37a1d67cd16c3ce93fca408dfb2f Mon Sep 17 00:00:00 2001 From: Thalia Wang Date: Mon, 9 Jan 2023 15:36:37 -0800 Subject: [PATCH 01/10] Resolve merge conflicts --- src/aks-preview/HISTORY.rst | 4 + src/aks-preview/azext_aks_preview/_consts.py | 16 ++ src/aks-preview/azext_aks_preview/_help.py | 174 ++++++++++++++- src/aks-preview/azext_aks_preview/_params.py | 55 +++++ .../azext_aks_preview/_validators.py | 27 +++ src/aks-preview/azext_aks_preview/custom.py | 36 +++- .../maintenanceconfiguration.py | 200 ++++++++++++++---- .../tests/latest/data/maintenancewindow.json | 23 ++ .../tests/latest/test_aks_commands.py | 117 ++++++++++ .../latest/test_maintenanceconfiguration.py | 188 ++++++++++++++++ .../tests/latest/test_validators.py | 40 ++++ src/aks-preview/setup.py | 2 +- 12 files changed, 829 insertions(+), 53 deletions(-) create mode 100644 src/aks-preview/azext_aks_preview/tests/latest/data/maintenancewindow.json create mode 100644 src/aks-preview/azext_aks_preview/tests/latest/test_maintenanceconfiguration.py diff --git a/src/aks-preview/HISTORY.rst b/src/aks-preview/HISTORY.rst index 549254e34fe..9cce8cfa9f0 100644 --- a/src/aks-preview/HISTORY.rst +++ b/src/aks-preview/HISTORY.rst @@ -12,6 +12,10 @@ To release a new version, please select a new version number (usually plus 1 to Pending +++++++ +0.5.123 ++++++++ +* Update command group `az aks maintenanceconfiguration` to enable the creation of *aksManagedAutoUpgradeSchedule* and *aksManagedNodeOSUpgradeSchedule*. + 0.5.122 +++++++ * Vendor new SDK and bump API version to 2022-11-02-preview. diff --git a/src/aks-preview/azext_aks_preview/_consts.py b/src/aks-preview/azext_aks_preview/_consts.py index c2a83411077..584be6982db 100644 --- a/src/aks-preview/azext_aks_preview/_consts.py +++ b/src/aks-preview/azext_aks_preview/_consts.py @@ -213,3 +213,19 @@ 'tEYNEGZaRElFU79WcEF0cH+ZW0+jJ95xE3thZffRz6QI6yF63m8aC9l9bbdJS2zg\n' \ 'Yv8W+lCZi//ODeOBUugr++z9uj+vGk47JDSpV0n4JOun3ALUDJ0gqmcS\n' \ '-----END CERTIFICATE-----' + +# consts for maintenance configuration schedule type +CONST_DAILY_MAINTENANCE_SCHEDULE = "Daily" +CONST_WEEKLY_MAINTENANCE_SCHEDULE = "Weekly" +CONST_ABSOLUTEMONTHLY_MAINTENANCE_SCHEDULE = "AbsoluteMonthly" +CONST_RELATIVEMONTHLY_MAINTENANCE_SCHEDULE = "RelativeMonthly" + +CONST_WEEKINDEX_FIRST = "First" +CONST_WEEKINDEX_SECOND = "Second" +CONST_WEEKINDEX_THIRD = "Third" +CONST_WEEKINDEX_FOURTH = "Fourth" +CONST_WEEKINDEX_LAST = "Last" + +CONST_DEFAULT_CONFIGURATION_NAME = "default" +CONST_AUTOUPGRADE_CONFIGURATION_NAME = "aksManagedAutoUpgradeSchedule" +CONST_NODEOSUPGRADE_CONFIGURATION_NAME = "aksManagedNodeOSUpgradeSchedule" diff --git a/src/aks-preview/azext_aks_preview/_help.py b/src/aks-preview/azext_aks_preview/_help.py index 17f5044e6ba..3e37cbfe7dd 100644 --- a/src/aks-preview/azext_aks_preview/_help.py +++ b/src/aks-preview/azext_aks_preview/_help.py @@ -1065,23 +1065,56 @@ parameters: - name: --weekday type: string - short-summary: A day in week on which maintenance is allowed. E.g. Monday + short-summary: A day in week on which maintenance is allowed. E.g. Monday. Applicable to default maintenance configuration only. - name: --start-hour type: string - short-summary: The start time of 1 hour window which maintenance is allowd. E.g. 1 means it's allowd between 1:00 am and 2:00 am + short-summary: The start time of 1 hour window which maintenance is allowd. E.g. 1 means it's allowd between 1:00 am and 2:00 am. Applicable to default maintenance configuration only. + - name: --schedule-type + type: string + short-summary: Choose either 'Daily', 'Weekly', 'AbsoluteMonthly' or 'RelativeMonthly' for your maintenance schedule. Only applicable to 'aksManagedAutoUpgradeSchedule' and 'aksManagedNodeOSUpgradeSchedule' maintenance configuration. + - name: --start-date + type: string + short-summary: The date the maintenance configuration activates. If not specified, the maintenance window will be active right away." + - name: --start-time + type: string + short-summary: The start time of the maintenance window. Accepted values are from '00:00' to '23:59'. '--utc-offset' applies to this field. For example, '02:00' with '--utc-offset +02:00' means UTC time '00:00'. + - name: --duration + type: int + short-summary: The length of maintenance window range from 4 to 24 hours. + - name: --utc-offset + type: string + short-summary: The UTC offset in format +/-HH:mm. For example, '+05:30' for IST and '-07:00' for PST. If not specified, the default is '+00:00'. + - name: --interval-days + type: int + short-summary: Specifies the number of days between each set of occurrences for daily schedule type. + - name: --interval-weeks + type: int + short-summary: Specifies the number of weeks between each set of occurrences. Applicable to weekly schedule types only. + - name: --interval-months + type: int + short-summary: Specifies the number of months between each set of occurrences. Applicable to absolute and relative monthly schedule types. + - name: --day-of-week + type: string + short-summary: Specifies on which day of the week the maintenance occurs. E.g. "Monday". Applicable to weekly and relative monthly schedule types. + - name: --day-of-month + type: int + short-summary: Specifies on which day of the month the maintenance occurs. E.g. 1 indicates the 1st of the month. Applicable to absolute monthly schedule type only. + - name: --week-index + type: string + short-summary: Specifies on which instance of the allowed days specified in '--day-of-week' the maintenance occurs. Applicable to relative monthly schedule type only. - name: --config-file type: string short-summary: the maintenance configuration json file. examples: - - name: Add a maintenance configuration with --weekday and --start-hour. + - name: Add default maintenance configuration with --weekday and --start-hour. text: | az aks maintenanceconfiguration add -g MyResourceGroup --cluster-name test1 -n default --weekday Monday --start-hour 1 The maintenance is allowed on Monday 1:00am to 2:00am - - name: Add a maintenance configuration with --weekday. The maintenance is allowd on any time of that day. + - name: Add default maintenance configuration with --weekday. The maintenance is allowd on any time of that day. text: | az aks maintenanceconfiguration add -g MyResourceGroup --cluster-name test1 -n default --weekday Monday The maintenance is allowed on Monday. - - name: Add a maintenance configuration with maintenance configuration json file + - name: Add default maintenance configuration with maintenance configuration json file text: | az aks maintenanceconfiguration add -g MyResourceGroup --cluster-name test1 -n default --config-file ./test.json The content of json file looks below. It means the maintenance is allowed on UTC time Tuesday 1:00am - 3:00 am and Wednesday 1:00am - 2:00am, 6:00am-7:00am @@ -1114,6 +1147,50 @@ } ] } + - name: Add aksManagedNodeOSUpgradeSchedule maintenance configuration with daily schedule. + text: | + az aks maintenanceconfiguration add -g MyResourceGroup --cluster-name test1 -n aksManagedNodeOSUpgradeSchedule --schedule-type Daily --interval-days 2 --duration 12 --utc-offset=-08:00 --start-date 2023-01-16 --start-time 00:00 + The maintenance is allowed from 00:00 to 12:00 (adjusted with UTC offset: -08:00) every two days, and this configuration will be effective from 2023-01-16. + - name: Add aksManagedNodeOSUpgradeSchedule maintenance configuration with weekly schedule. + text: | + az aks maintenanceconfiguration add -g MyResourceGroup --cluster-name test1 -n aksManagedNodeOSUpgradeSchedule --schedule-type Weekly --day-of-week Friday --interval-weeks 3 --duration 8 --utc-offset +05:30 --start-date 2023-01-16 --start-time 09:30 + The maintenance is allowed on Friday from 09:30 to 17:30 (adjusted with UTC offset: +05:30) every three weeks, and this configuration will be effective from 2023-01-16. + - name: Add aksManagedAutoUpgradeSchedule maintenance configuration with absolute monthly schedule. + text: | + az aks maintenanceconfiguration add -g MyResourceGroup --cluster-name test1 -n aksManagedAutoUpgradeSchedule --schedule-type AbsoluteMonthly --day-of-month 15 --interval-months 1 --duration 6 --utc-offset +05:30 --start-date 2023-01-16 --start-time 09:30 + The maintenance is allowed on the 15th of the month from 09:30 to 15:30 (adjusted with UTC offset: +05:30) every month, and this configuration will be effective from 2023-01-16. + - name: Add aksManagedAutoUpgradeSchedule maintenance configuration with relative monthly schedule. + text: | + az aks maintenanceconfiguration add -g MyResourceGroup --cluster-name test1 -n aksManagedAutoUpgradeSchedule --schedule-type RelativeMonthly --day-of-week Tuesday --week-index Last --interval-months 3 --duration 6 --start-date 2023-01-16 --start-time 09:30 + The maintenance is allowed on the last Tuesday from 09:30 to 15:30 in default UTC time every 3 months, and this configuration will be effective from 2023-01-16. + - name: Add aksManagedAutoUpgradeSchedule maintenance configuration with json file. + text: | + az aks maintenanceconfiguration add -g MyResourceGroup --cluster-name test1 -n aksManagedAutoUpgradeSchedule --config-file ./test.json + The content of json file looks below. It means the maintenance is allowed on the 1st of the month from 09:00 to 13:00 (adjusted with UTC offset: -08:00) every 3 months, and this configuration will be effective from 2023-01-16. + No maintenance is allowed from 2022-12-23 to 2023-01-05 and from 2023-11-23 to 2023-11-26 even if they are allowed in the above monthly setting + { + "maintenanceWindow": { + "schedule": { + "absoluteMonthly": { + "intervalMonths": 3, + "dayOfMonth": 1 + } + }, + "durationHours": 4, + "utcOffset": "-08:00", + "startTime": "09:00", + "notAllowedDates": [ + { + "start": "2022-12-23", + "end": "2023-01-05" + }, + { + "start": "2023-11-23", + "end": "2023-11-26" + } + ] + } + } """ helps['aks maintenanceconfiguration update'] = """ @@ -1122,23 +1199,56 @@ parameters: - name: --weekday type: string - short-summary: A day in week on which maintenance is allowed. E.g. Monday + short-summary: A day in week on which maintenance is allowed. E.g. Monday. Applicable to default maintenance configuration only. - name: --start-hour type: string - short-summary: The start time of 1 hour window which maintenance is allowd. E.g. 1 means it's allowd between 1:00 am and 2:00 am + short-summary: The start time of 1 hour window which maintenance is allowd. E.g. 1 means it's allowd between 1:00 am and 2:00 am. Applicable to default maintenance configuration only. + - name: --schedule-type + type: string + short-summary: Choose either 'Daily', 'Weekly', 'AbsoluteMonthly' or 'RelativeMonthly' for your maintenance schedule. Only applicable to 'aksManagedAutoUpgradeSchedule' and 'aksManagedNodeOSUpgradeSchedule' maintenance configuration. + - name: --start-date + type: string + short-summary: The date the maintenance configuration activates. If not specified, the maintenance window will be active right away." + - name: --start-time + type: string + short-summary: The start time of the maintenance window. Accepted values are from '00:00' to '23:59'. '--utc-offset' applies to this field. For example, '02:00' with '--utc-offset +02:00' means UTC time '00:00'. + - name: --duration + type: int + short-summary: The length of maintenance window range from 4 to 24 hours. + - name: --utc-offset + type: string + short-summary: The UTC offset in format +/-HH:mm. For example, '+05:30' for IST and '-07:00' for PST. If not specified, the default is '+00:00'. + - name: --interval-days + type: int + short-summary: Specifies the number of days between each set of occurrences for daily schedule type. + - name: --interval-weeks + type: int + short-summary: Specifies the number of weeks between each set of occurrences. Applicable to weekly schedule types only. + - name: --interval-months + type: int + short-summary: Specifies the number of months between each set of occurrences. Applicable to absolute and relative monthly schedule types. + - name: --day-of-week + type: string + short-summary: Specifies on which day of the week the maintenance occurs. E.g. "Monday". Applicable to weekly and relative monthly schedule types. + - name: --day-of-month + type: int + short-summary: Specifies on which day of the month the maintenance occurs. E.g. 1 indicates the 1st of the month. Applicable to absolute monthly schedule type only. + - name: --week-index + type: string + short-summary: Specifies on which instance of the allowed days specified in '--day-of-week' the maintenance occurs. Applicable to relative monthly schedule type only. - name: --config-file type: string short-summary: the maintenance configuration json file. examples: - - name: Update a maintenance configuration with --weekday and --start-hour. + - name: Update default maintenance configuration with --weekday and --start-hour. text: | az aks maintenanceconfiguration update -g MyResourceGroup --cluster-name test1 -n default --weekday Monday --start-hour 1 The maintenance is allowed on Monday 1:00am to 2:00am - - name: Update a maintenance configuration with --weekday.The maintenance is allowd on any time of that day. + - name: Update default maintenance configuration with --weekday.The maintenance is allowd on any time of that day. text: | az aks maintenanceconfiguration update -g MyResourceGroup --cluster-name test1 -n default --weekday Monday The maintenance is allowed on Monday. - - name: Update a maintenance configuration with maintenance configuration json file + - name: Update default maintenance configuration with maintenance configuration json file text: | az aks maintenanceconfiguration update -g MyResourceGroup --cluster-name test1 -n default --config-file ./test.json The content of json file looks below. It means the maintenance is allowed on UTC time Tuesday 1:00am - 3:00 am and Wednesday 1:00am - 2:00am, 6:00am-7:00am @@ -1171,6 +1281,50 @@ } ] } + - name: Update aksManagedNodeOSUpgradeSchedule maintenance configuration with daily schedule. + text: | + az aks maintenanceconfiguration update -g MyResourceGroup --cluster-name test1 -n aksManagedNodeOSUpgradeSchedule --schedule-type Daily --interval-days 2 --duration 12 --utc-offset=-08:00 --start-date 2023-01-16 --start-time 00:00 + The maintenance is allowed from 00:00 to 12:00 (adjusted with UTC offset: -08:00) every two days. This configuration will be effective from 2023-01-16. + - name: Update aksManagedNodeOSUpgradeSchedule maintenance configuration with weekly schedule. + text: | + az aks maintenanceconfiguration update -g MyResourceGroup --cluster-name test1 -n aksManagedNodeOSUpgradeSchedule --schedule-type Weekly --day-of-week Friday --interval-weeks 3 --duration 8 --utc-offset +05:30 --start-date 2023-01-16 --start-time 09:30 + The maintenance is allowed on Friday from 09:30 to 17:30 (adjusted with UTC offset: +05:30) every three weeks. This configuration will be effective from 2023-01-16. + - name: Update aksManagedAutoUpgradeSchedule maintenance configuration with absolute monthly schedule. + text: | + az aks maintenanceconfiguration update -g MyResourceGroup --cluster-name test1 -n aksManagedAutoUpgradeSchedule --schedule-type AbsoluteMonthly --day-of-month 15 --interval-months 1 --duration 6 --utc-offset +05:30 --start-date 2023-01-16 --start-time 09:30 + The maintenance is allowed on the 15th of the month from 09:30 to 15:30 (adjusted with UTC offset: +05:30) every month. This configuration will be effective from 2023-01-16. + - name: Update aksManagedAutoUpgradeSchedule maintenance configuration with relative monthly schedule. + text: | + az aks maintenanceconfiguration update -g MyResourceGroup --cluster-name test1 -n aksManagedAutoUpgradeSchedule --schedule-type RelativeMonthly --day-of-week Tuesday --week-index Last --interval-months 3 --duration 6 --start-date 2023-01-16 --start-time 09:30 + The maintenance is allowed on the last Tuesday from 09:30 to 15:30 in default UTC time every 3 months. This configuration will be effective from 2023-01-16. + - name: Update aksManagedAutoUpgradeSchedule maintenance configuration with json file. + text: | + az aks maintenanceconfiguration update -g MyResourceGroup --cluster-name test1 -n aksManagedAutoUpgradeSchedule --config-file ./test.json + The content of json file looks below. It means the maintenance is allowed on the 1st of the month from 09:00 to 13:00 (adjusted with UTC offset: -08:00) every 3 months, and this configuration will be effective from 2023-01-16. + No maintenance is allowed from 2022-12-23 to 2023-01-05 and from 2023-11-23 to 2023-11-26 even if they are allowed in the above monthly setting + { + "maintenanceWindow": { + "schedule": { + "absoluteMonthly": { + "intervalMonths": 3, + "dayOfMonth": 1 + } + }, + "durationHours": 4, + "utcOffset": "-08:00", + "startTime": "09:00", + "notAllowedDates": [ + { + "start": "2022-12-23", + "end": "2023-01-05" + }, + { + "start": "2023-11-23", + "end": "2023-11-26" + } + ] + } + } """ helps['aks nodepool'] = """ diff --git a/src/aks-preview/azext_aks_preview/_params.py b/src/aks-preview/azext_aks_preview/_params.py index ebe1a9bf28a..74fb8d4f41a 100644 --- a/src/aks-preview/azext_aks_preview/_params.py +++ b/src/aks-preview/azext_aks_preview/_params.py @@ -71,6 +71,15 @@ CONST_DISK_DRIVER_V2, CONST_AZURE_KEYVAULT_NETWORK_ACCESS_PUBLIC, CONST_AZURE_KEYVAULT_NETWORK_ACCESS_PRIVATE, + CONST_DAILY_MAINTENANCE_SCHEDULE, + CONST_WEEKLY_MAINTENANCE_SCHEDULE, + CONST_ABSOLUTEMONTHLY_MAINTENANCE_SCHEDULE, + CONST_RELATIVEMONTHLY_MAINTENANCE_SCHEDULE, + CONST_WEEKINDEX_FIRST, + CONST_WEEKINDEX_SECOND, + CONST_WEEKINDEX_THIRD, + CONST_WEEKINDEX_FOURTH, + CONST_WEEKINDEX_LAST, ) from azext_aks_preview._validators import ( validate_acr, @@ -133,6 +142,9 @@ validate_disable_windows_outbound_nat, validate_allowed_host_ports, validate_application_security_groups, + validate_utc_offset, + validate_start_date, + validate_start_time, ) # candidates for enumeration @@ -177,6 +189,22 @@ CONST_NONE_UPGRADE_CHANNEL, ] +# consts for maintenance configuration +schedule_types = [ + CONST_DAILY_MAINTENANCE_SCHEDULE, + CONST_WEEKLY_MAINTENANCE_SCHEDULE, + CONST_ABSOLUTEMONTHLY_MAINTENANCE_SCHEDULE, + CONST_RELATIVEMONTHLY_MAINTENANCE_SCHEDULE, +] + +week_indexes = [ + CONST_WEEKINDEX_FIRST, + CONST_WEEKINDEX_SECOND, + CONST_WEEKINDEX_THIRD, + CONST_WEEKINDEX_FOURTH, + CONST_WEEKINDEX_LAST, +] + # consts for credential credential_formats = [CONST_CREDENTIAL_FORMAT_AZURE, CONST_CREDENTIAL_FORMAT_EXEC] @@ -570,6 +598,33 @@ def load_arguments(self, _): '--weekday'], help='weekday on which maintenance can happen. e.g. Monday', required=False) c.argument('start_hour', type=int, options_list=[ '--start-hour'], help='maintenance start hour of 1 hour window on the weekday. e.g. 1 means 1:00am - 2:00am', required=False) + c.argument('schedule_type', options_list=['--schedule-type'], + arg_type=get_enum_type(schedule_types), + help='Schedule type for non-default maintenance configuration.', required=False) + c.argument('interval_days', options_list=['--interval-days'], type=int, + help='The number of days between each set of occurrences for Daily schedule.', required=False) + c.argument('interval_weeks', options_list=['--interval-weeks'], type=int, + help='The number of weeks between each set of occurrences for Weekly schedule.', required=False) + c.argument('interval_months', options_list=['--interval-months'], type=int, + help='The number of months between each set of occurrences for AbsoluteMonthly or RelativeMonthly schedule.', required=False) + c.argument('day_of_week', options_list=['--day-of-week'], + help='Specifies on which day of the week the maintenance occurs for Weekly or RelativeMonthly schedule.', required=False) + c.argument('day_of_month', options_list=['--day-of-month'], + help='Specifies on which date of the month the maintenance occurs for AbsoluteMonthly schedule.', required=False) + c.argument('week_index', options_list=['--week-index'], + arg_type=get_enum_type(week_indexes), + help='Specifies on which instance of the weekday specified in --day-of-week the maintenance occurs for RelativeMonthly schedule.', required=False) + c.argument('duration_hours', options_list=['--duration'], type=int, + help='The length of maintenance window. The value ranges from 4 to 24 hours.', required=False) + c.argument('utc_offset', options_list=['--utc-offset'], + validator=validate_utc_offset, + help='The UTC offset in format +/-HH:mm. e.g. -08:00 or +05:30.', required=False) + c.argument('start_date', options_list=['--start-date'], + validator=validate_start_date, + help='The date the maintenance window activates. e.g. 2023-01-01.', required=False) + c.argument('start_time', options_list=['--start-time'], + validator=validate_start_time, + help='The start time of the maintenance window. e.g. 09:30.', required=False) for scope in ['aks maintenanceconfiguration show', 'aks maintenanceconfiguration delete']: with self.argument_context(scope) as c: diff --git a/src/aks-preview/azext_aks_preview/_validators.py b/src/aks-preview/azext_aks_preview/_validators.py index 1fae5270b13..c467face631 100644 --- a/src/aks-preview/azext_aks_preview/_validators.py +++ b/src/aks-preview/azext_aks_preview/_validators.py @@ -803,3 +803,30 @@ def validate_application_security_groups(namespace): for asg in asg_ids.split(","): if not is_valid_resource_id(asg): raise InvalidArgumentValueError(asg + " is not a valid Azure resource ID.") + +def validate_utc_offset(namespace): + """Validates --utc-offset for aks maintenanceconfiguration add/update commands.""" + if namespace.utc_offset is None: + return + utc_offset_regex = re.compile(r'^[+-]\d{2}:\d{2}$') + found = utc_offset_regex.findall(namespace.utc_offset) + if not found: + raise InvalidArgumentValueError('--utc-offset must be in format: "+/-HH:mm". For example, "+05:30" and "-12:00".') + +def validate_start_date(namespace): + """Validates --start-date for aks maintenanceconfiguration add/update commands.""" + if namespace.start_date is None: + return + start_dt_regex = re.compile(r'^\d{4}-\d{2}-\d{2}$') + found = start_dt_regex.findall(namespace.start_date) + if not found: + raise InvalidArgumentValueError('--start-date must be in format: "yyyy-MM-dd". For example, "2023-01-01".') + +def validate_start_time(namespace): + """Validates --start-time for aks maintenanceconfiguration add/update commands.""" + if namespace.start_time is None: + return + start_time_regex = re.compile(r'^\d{2}:\d{2}$') + found = start_time_regex.findall(namespace.start_time) + if not found: + raise InvalidArgumentValueError('--start-time must be in format "HH:mm". For example, "09:30" and "17:00".') \ No newline at end of file diff --git a/src/aks-preview/azext_aks_preview/custom.py b/src/aks-preview/azext_aks_preview/custom.py index e809fbaa46f..2fc5b610caf 100644 --- a/src/aks-preview/azext_aks_preview/custom.py +++ b/src/aks-preview/azext_aks_preview/custom.py @@ -503,14 +503,27 @@ def aks_maintenanceconfiguration_add( config_name, config_file, weekday, - start_hour + start_hour, + schedule_type, + interval_days, + interval_weeks, + interval_months, + day_of_week, + day_of_month, + week_index, + duration_hours, + utc_offset, + start_date, + start_time ): configs = client.list_by_managed_cluster(resource_group_name, cluster_name) for config in configs: if config.name == config_name: raise CLIError("Maintenance configuration '{}' already exists, please try a different name, " "use 'aks maintenanceconfiguration list' to get current list of maitenance configurations".format(config_name)) - return aks_maintenanceconfiguration_update_internal(cmd, client, resource_group_name, cluster_name, config_name, config_file, weekday, start_hour) + # DO NOT MOVE: get all the original parameters and save them as a dictionary + raw_parameters = locals() + return aks_maintenanceconfiguration_update_internal(cmd, client, raw_parameters) def aks_maintenanceconfiguration_update( @@ -521,7 +534,18 @@ def aks_maintenanceconfiguration_update( config_name, config_file, weekday, - start_hour + start_hour, + schedule_type, + interval_days, + interval_weeks, + interval_months, + day_of_week, + day_of_month, + week_index, + duration_hours, + utc_offset, + start_date, + start_time ): configs = client.list_by_managed_cluster(resource_group_name, cluster_name) found = False @@ -532,9 +556,9 @@ def aks_maintenanceconfiguration_update( if not found: raise CLIError("Maintenance configuration '{}' doesn't exist." "use 'aks maintenanceconfiguration list' to get current list of maitenance configurations".format(config_name)) - - return aks_maintenanceconfiguration_update_internal(cmd, client, resource_group_name, cluster_name, config_name, config_file, weekday, start_hour) - + # DO NOT MOVE: get all the original parameters and save them as a dictionary + raw_parameters = locals() + return aks_maintenanceconfiguration_update_internal(cmd, client, raw_parameters) # pylint: disable=too-many-locals def aks_create( diff --git a/src/aks-preview/azext_aks_preview/maintenanceconfiguration.py b/src/aks-preview/azext_aks_preview/maintenanceconfiguration.py index 79c0ba3a4a6..a97646c675a 100644 --- a/src/aks-preview/azext_aks_preview/maintenanceconfiguration.py +++ b/src/aks-preview/azext_aks_preview/maintenanceconfiguration.py @@ -7,47 +7,175 @@ from knack.util import CLIError from knack.log import get_logger from azure.cli.core.util import get_file_json +from azure.cli.core.azclierror import ( + InvalidArgumentValueError, + RequiredArgumentMissingError, + MutuallyExclusiveArgumentError, +) + +from azext_aks_preview._consts import ( + CONST_DAILY_MAINTENANCE_SCHEDULE, + CONST_WEEKLY_MAINTENANCE_SCHEDULE, + CONST_ABSOLUTEMONTHLY_MAINTENANCE_SCHEDULE, + CONST_RELATIVEMONTHLY_MAINTENANCE_SCHEDULE, + CONST_DEFAULT_CONFIGURATION_NAME, + CONST_AUTOUPGRADE_CONFIGURATION_NAME, + CONST_NODEOSUPGRADE_CONFIGURATION_NAME, +) + from azext_aks_preview._client_factory import CUSTOM_MGMT_AKS_PREVIEW logger = get_logger(__name__) +def aks_maintenanceconfiguration_update_internal(cmd, client, raw_parameters): + resource_group_name = raw_parameters.get("resource_group_name") + cluster_name = raw_parameters.get("cluster_name") + config_name = raw_parameters.get("config_name") + config = getMaintenanceConfiguration(cmd, raw_parameters) + return client.create_or_update(resource_group_name=resource_group_name, resource_name=cluster_name, config_name=config_name, parameters=config) + +def getMaintenanceConfiguration(cmd, raw_parameters): + config_file = raw_parameters.get("config_file") + if config_file is not None: + mcr = get_file_json(config_file) + logger.info(mcr) + return mcr -def getMaintenanceConfiguration(cmd, config_file, weekday, start_hour): - if config_file is not None and weekday is not None: - raise CLIError('either config-file or weekday can be supplied.') - if weekday is None and start_hour is not None: - raise CLIError('if maintenance-start-hour is supplied, maintenance-weekday must be supplied too.') - # get models + config_name = raw_parameters.get("config_name") + if config_name == CONST_DEFAULT_CONFIGURATION_NAME: + return constructDefaultMaintenanceConfiguration(cmd, raw_parameters) + elif config_name == CONST_AUTOUPGRADE_CONFIGURATION_NAME or config_name == CONST_NODEOSUPGRADE_CONFIGURATION_NAME: + return constructDedicatedMaintenanceConfiguration(cmd, raw_parameters) + else: + raise InvalidArgumentValueError('--config-name must be one of default, aksManagedAutoUpgradeSchedule or aksManagedNodeOSUpgradeSchedule, not {}'.format(config_name)) + +def constructDefaultMaintenanceConfiguration(cmd, raw_parameters): + weekday = raw_parameters.get("weekday") + start_hour = raw_parameters.get("start_hour") + schedule_type = raw_parameters.get("schedule_type") + + if weekday is None or start_hour is None: + raise RequiredArgumentMissingError('Please specify --weekday and --start-hour for default maintenance configuration, or use --config-file instead.') + if schedule_type is not None: + raise MutuallyExclusiveArgumentError('--schedule-type is not supported for default maintenance configuration.') + MaintenanceConfiguration = cmd.get_models('MaintenanceConfiguration', resource_type=CUSTOM_MGMT_AKS_PREVIEW, operation_group='maintenance_configurations') TimeInWeek = cmd.get_models('TimeInWeek', resource_type=CUSTOM_MGMT_AKS_PREVIEW, operation_group='maintenance_configurations') + + dict = {} + dict["day"] = weekday + dict["hour_slots"] = [start_hour] + timeInWeek = TimeInWeek(**dict) + result = MaintenanceConfiguration() + result.time_in_week = [timeInWeek] + result.not_allowed_time = [] + return result - if weekday is not None: - dict = {} - dict["day"] = weekday - if start_hour is not None: - dict["hour_slots"] = [start_hour] - timeInWeek = TimeInWeek(**dict) - result = MaintenanceConfiguration() - result.time_in_week = [timeInWeek] - result.not_allowed_time = [] - return result - - maintenance_config = get_file_json(config_file) - logger.info(maintenance_config) - return maintenance_config - - -def aks_maintenanceconfiguration_update_internal( - cmd, - client, - resource_group_name, - cluster_name, - config_name, - config_file, - weekday, - start_hour -): - logger.info('resource_group_name: %s, cluster_name: %s, config_name: %s, config_file: %s, weekday: %s, start_hour: %s ', resource_group_name, cluster_name, config_name, config_file, weekday, start_hour) - - config = getMaintenanceConfiguration(cmd, config_file, weekday, start_hour) - return client.create_or_update(resource_group_name=resource_group_name, resource_name=cluster_name, config_name=config_name, parameters=config) +def constructDedicatedMaintenanceConfiguration(cmd, raw_parameters): + weekday = raw_parameters.get("weekday") + start_hour = raw_parameters.get("start_hour") + if weekday is not None or start_hour is not None: + raise MutuallyExclusiveArgumentError('--weekday and --start-hour are only applicable to default maintenance configuration.') + + maintenanceConfiguration = cmd.get_models('MaintenanceConfiguration', resource_type=CUSTOM_MGMT_AKS_PREVIEW, operation_group='maintenance_configurations') + result = maintenanceConfiguration() + result.maintenance_window = constructMaintenanceWindow(cmd, raw_parameters) + return result + +def constructMaintenanceWindow(cmd, raw_parameters): + schedule = constructSchedule(cmd, raw_parameters) + start_date = raw_parameters.get("start_date") + start_time = raw_parameters.get("start_time") + duration_hours = raw_parameters.get("duration_hours") + utc_offset = raw_parameters.get("utc_offset") + + if start_time is None: + raise RequiredArgumentMissingError('Please specify --start-time for maintenance window.') + if duration_hours is None: + raise RequiredArgumentMissingError('Please specify --duration-hours for maintenance window.') + + MaintenanceWindow = cmd.get_models('MaintenanceWindow', resource_type=CUSTOM_MGMT_AKS_PREVIEW, operation_group='maintenance_configurations') + maintenanceWindow = MaintenanceWindow( + schedule=schedule, + start_date=start_date, + start_time=start_time, + duration_hours=duration_hours, + utc_offset=utc_offset + ) + return maintenanceWindow + +def constructSchedule(cmd, raw_parameters): + schedule_type = raw_parameters.get("schedule_type") + interval_days = raw_parameters.get("interval_days") + interval_weeks = raw_parameters.get("interval_weeks") + interval_months = raw_parameters.get("interval_months") + day_of_week = raw_parameters.get("day_of_week") + day_of_month = raw_parameters.get("day_of_month") + week_index = raw_parameters.get("week_index") + + Schedule = cmd.get_models('Schedule', resource_type=CUSTOM_MGMT_AKS_PREVIEW, operation_group='maintenance_configurations') + schedule = Schedule() + + if schedule_type == CONST_DAILY_MAINTENANCE_SCHEDULE: + schedule.daily = constructDailySchedule(cmd, interval_days, interval_weeks, interval_months, day_of_week, day_of_month, week_index) + elif schedule_type == CONST_WEEKLY_MAINTENANCE_SCHEDULE: + schedule.weekly = constructWeeklySchedule(cmd, interval_days, interval_weeks, interval_months, day_of_week, day_of_month, week_index) + elif schedule_type == CONST_ABSOLUTEMONTHLY_MAINTENANCE_SCHEDULE: + schedule.absolute_monthly = constructAbsoluteMonthlySchedule(cmd, interval_days, interval_weeks, interval_months, day_of_week, day_of_month, week_index) + elif schedule_type == CONST_RELATIVEMONTHLY_MAINTENANCE_SCHEDULE: + schedule.relative_monthly = constructRelativeMonthlySchedule(cmd, interval_days, interval_weeks, interval_months, day_of_week, day_of_month, week_index) + else : + raise InvalidArgumentValueError('--schedule-type must be one of Daily, Weekly, AbsoluteMonthly or RelativeMonthly.') + return schedule + +def constructDailySchedule(cmd, interval_days, interval_weeks, interval_months, day_of_week, day_of_month, week_index): + if interval_days is None: + raise RequiredArgumentMissingError("Please specify --interval-days when using daily schedule.") + if interval_weeks is not None or interval_months is not None or day_of_week is not None or day_of_month is not None or week_index is not None: + raise MutuallyExclusiveArgumentError('--interval-weeks, --interval-months, --day-of-week, --day-of-month and --week-index cannot be used for Daily schedule.') + + DailySchedule = cmd.get_models('DailySchedule', resource_type=CUSTOM_MGMT_AKS_PREVIEW, operation_group='maintenance_configurations') + dailySchedule = DailySchedule( + interval_days=interval_days + ) + return dailySchedule + +def constructWeeklySchedule(cmd, interval_days, interval_weeks, interval_months, day_of_week, day_of_month, week_index): + if interval_weeks is None or day_of_week is None: + raise RequiredArgumentMissingError("Please specify --interval-weeks and --day-of-week when using weekly schedule.") + if interval_days is not None or interval_months is not None or day_of_month is not None or week_index is not None: + raise MutuallyExclusiveArgumentError('--interval-months, --day-of-month and --week-index cannot be used for Weekly schedule.') + + WeeklySchedule = cmd.get_models('WeeklySchedule', resource_type=CUSTOM_MGMT_AKS_PREVIEW, operation_group='maintenance_configurations') + weeklySchedule = WeeklySchedule( + interval_weeks=interval_weeks, + day_of_week=day_of_week + ) + return weeklySchedule + +def constructAbsoluteMonthlySchedule(cmd, interval_days, interval_weeks, interval_months, day_of_week, day_of_month, week_index): + if interval_months is None or day_of_month is None: + raise RequiredArgumentMissingError("Please specify --interval-months and --day-of-month when using absolute monthly schedule.") + if interval_days is not None or interval_weeks is not None or day_of_week is not None or week_index is not None: + raise MutuallyExclusiveArgumentError('--interval-days, --interval-weeks, --day-of-week and --week-index cannot be used for AbsoluteMonthly schedule.') + + AbsoluteMonthlySchedule = cmd.get_models('AbsoluteMonthlySchedule', resource_type=CUSTOM_MGMT_AKS_PREVIEW, operation_group='maintenance_configurations') + absoluteMonthlySchedule = AbsoluteMonthlySchedule( + interval_months=interval_months, + day_of_month=day_of_month + ) + return absoluteMonthlySchedule + +def constructRelativeMonthlySchedule(cmd, interval_days, interval_weeks, interval_months, day_of_week, day_of_month, week_index): + if interval_months is None or day_of_week is None or week_index is None: + raise RequiredArgumentMissingError("Please specify --interval-months, --day-of-week and --week-index when using relative monthly schedule.") + if interval_days is not None or interval_weeks is not None or day_of_month is not None: + raise MutuallyExclusiveArgumentError('--interval-days, --interval-weeks and --day-of-month cannot be used for RelativeMonthly schedule.') + + RelativeMonthlySchedule = cmd.get_models('RelativeMonthlySchedule', resource_type=CUSTOM_MGMT_AKS_PREVIEW, operation_group='maintenance_configurations') + relativeMonthlySchedule = RelativeMonthlySchedule( + interval_months=interval_months, + day_of_week=day_of_week, + week_index=week_index + ) + return relativeMonthlySchedule diff --git a/src/aks-preview/azext_aks_preview/tests/latest/data/maintenancewindow.json b/src/aks-preview/azext_aks_preview/tests/latest/data/maintenancewindow.json new file mode 100644 index 00000000000..fdd4358a1db --- /dev/null +++ b/src/aks-preview/azext_aks_preview/tests/latest/data/maintenancewindow.json @@ -0,0 +1,23 @@ +{ + "maintenanceWindow": { + "schedule": { + "absoluteMonthly": { + "intervalMonths": 3, + "dayOfMonth": 1 + } + }, + "durationHours": 4, + "utcOffset": "-08:00", + "startTime": "09:00", + "notAllowedDates": [ + { + "start": "2022-12-23", + "end": "2023-01-05" + }, + { + "start": "2023-11-23", + "end": "2023-11-26" + } + ] + } +} \ No newline at end of file diff --git a/src/aks-preview/azext_aks_preview/tests/latest/test_aks_commands.py b/src/aks-preview/azext_aks_preview/tests/latest/test_aks_commands.py index 1c8044e8df1..b24c0112e21 100644 --- a/src/aks-preview/azext_aks_preview/tests/latest/test_aks_commands.py +++ b/src/aks-preview/azext_aks_preview/tests/latest/test_aks_commands.py @@ -8,6 +8,7 @@ import subprocess import tempfile import time +import datetime from azext_aks_preview.tests.latest.custom_preparers import ( AKSCustomResourceGroupPreparer, @@ -3690,6 +3691,122 @@ def test_aks_enable_utlra_ssd(self, resource_group, resource_group_location): # delete self.cmd( 'aks delete -g {resource_group} -n {name} --yes --no-wait', checks=[self.is_empty()]) + + @AllowLargeResponse() + @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') + def test_aks_maintenancewindow(self, resource_group, resource_group_location): + aks_name = self.create_random_name('cliakstest', 16) + self.kwargs.update({ + 'resource_group': resource_group, + 'name': aks_name, + 'mc_path': _get_test_data_file('maintenancewindow.json'), + 'auto_upgrade_config_name': 'aksManagedAutoUpgradeSchedule', + 'node_os_upgrade_config_name': 'aksManagedNodeOSUpgradeSchedule', + 'ssh_key_value': self.generate_ssh_keys(), + 'future_date': (datetime.datetime.now() + datetime.timedelta(days=10)).strftime("%Y-%m-%d") + }) + + create_cmd = 'aks create --resource-group={resource_group} --name={name} --ssh-key-value={ssh_key_value}' + self.cmd(create_cmd, checks=[ + self.check('provisioningState', 'Succeeded') + ]) + + # add dedicated maintenanceconfiguration for cluster autoupgrade + maintenance_configuration_add_cmd = 'aks maintenanceconfiguration add ' \ + '-g {resource_group} --cluster-name {name} ' \ + '-n {auto_upgrade_config_name} ' \ + '--schedule-type Weekly ' \ + '--day-of-week Friday ' \ + '--interval-weeks 3 ' \ + '--duration 8 ' \ + '--utc-offset +05:30 ' \ + '--start-date {future_date} ' \ + '--start-time 00:00 ' + + self.cmd( + maintenance_configuration_add_cmd, checks=[ + self.exists('maintenanceWindow.schedule.weekly'), + self.check('maintenanceWindow.schedule.weekly.dayOfWeek', 'Friday'), + self.check('maintenanceWindow.schedule.weekly.intervalWeeks', 3), + self.check('maintenanceWindow.durationHours', 8), + self.check('maintenanceWindow.utcOffset', '+05:30'), + self.check('maintenanceWindow.startDate', '{future_date}'), + self.check('maintenanceWindow.startTime', '00:00')] + ) + + # add dedicated maintenanceconfiguration for node os autoupgrade + maintenance_configuration_add_cmd = 'aks maintenanceconfiguration add ' \ + '-g {resource_group} --cluster-name {name} ' \ + '-n {node_os_upgrade_config_name} ' \ + '--schedule-type RelativeMonthly ' \ + '--day-of-week Tuesday ' \ + '--week-index Last ' \ + '--interval-months 1 ' \ + '--duration 12 ' \ + '--start-time 09:00 ' \ + '--utc-offset=-08:00 ' \ + '--start-date {future_date} ' + + self.cmd( + maintenance_configuration_add_cmd, checks=[ + self.exists('maintenanceWindow.schedule.relativeMonthly'), + self.check('maintenanceWindow.schedule.relativeMonthly.dayOfWeek', 'Tuesday'), + self.check('maintenanceWindow.schedule.relativeMonthly.intervalMonths', 1), + self.check('maintenanceWindow.durationHours', 12), + self.check('maintenanceWindow.utcOffset', '-08:00'), + self.check('maintenanceWindow.startDate', '{future_date}'), + self.check('maintenanceWindow.startTime', '09:00')] + ) + + # maintenanceconfiguration list + maintenance_configuration_list_cmd = 'aks maintenanceconfiguration list ' \ + '-g {resource_group} --cluster-name {name}' + self.cmd(maintenance_configuration_list_cmd, checks=[self.check('length(@)', 2)]) + + # update maintenanceconfiguration from config file + maintenance_configuration_update_cmd = 'aks maintenanceconfiguration update ' \ + '-g {resource_group} --cluster-name {name} ' \ + '-n {auto_upgrade_config_name} ' \ + '--config-file {mc_path}' + + self.cmd( + maintenance_configuration_update_cmd, checks=[ + self.exists('maintenanceWindow.schedule.absoluteMonthly'), + self.check('maintenanceWindow.schedule.absoluteMonthly.dayOfMonth', 1), + self.check('maintenanceWindow.schedule.absoluteMonthly.intervalMonths', 3), + self.check('maintenanceWindow.durationHours', 4), + self.check('maintenanceWindow.utcOffset', '-08:00'), + self.check('maintenanceWindow.startTime', '09:00'), + self.check('maintenanceWindow.notAllowedDates | length(@)', 2)] + ) + + # maintenanceconfiguration show + maintenance_configuration_show_cmd = 'aks maintenanceconfiguration show ' \ + '-g {resource_group} --cluster-name {name} ' \ + '-n {auto_upgrade_config_name}' + self.cmd( + maintenance_configuration_show_cmd, checks=[ + self.check("name == '{auto_upgrade_config_name}'", True)] + ) + + # maintenanceconfiguration delete + maintenance_configuration_delete_cmd = 'aks maintenanceconfiguration delete ' \ + '-g {resource_group} --cluster-name {name} ' \ + '-n {auto_upgrade_config_name}' + self.cmd(maintenance_configuration_delete_cmd, checks=[self.is_empty()]) + + maintenance_configuration_delete_cmd = 'aks maintenanceconfiguration delete ' \ + '-g {resource_group} --cluster-name {name} ' \ + '-n {node_os_upgrade_config_name}' + self.cmd(maintenance_configuration_delete_cmd, checks=[self.is_empty()]) + + # maintenanceconfiguration list + maintenance_configuration_list_cmd = 'aks maintenanceconfiguration list ' \ + '-g {resource_group} --cluster-name {name}' + self.cmd(maintenance_configuration_list_cmd, checks=[self.is_empty()]) + + # delete + self.cmd('aks delete -g {resource_group} -n {name} --yes --no-wait', checks=[self.is_empty()]) @AllowLargeResponse() @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') diff --git a/src/aks-preview/azext_aks_preview/tests/latest/test_maintenanceconfiguration.py b/src/aks-preview/azext_aks_preview/tests/latest/test_maintenanceconfiguration.py new file mode 100644 index 00000000000..a540c72707e --- /dev/null +++ b/src/aks-preview/azext_aks_preview/tests/latest/test_maintenanceconfiguration.py @@ -0,0 +1,188 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- +import unittest +from types import SimpleNamespace + +# from azure.cli.core.util import CLIError +from azure.cli.core.azclierror import ( + InvalidArgumentValueError, + RequiredArgumentMissingError, + MutuallyExclusiveArgumentError, +) +from azext_aks_preview.__init__ import register_aks_preview_resource_type +import azext_aks_preview.maintenanceconfiguration as mc +from azure.cli.command_modules.acs.tests.latest.mocks import MockCLI, MockCmd + +class TestAddMaintenanceConfiguration(unittest.TestCase): + def test_add_maintenance_configuration_with_invalid_name(self): + cmd = SimpleNamespace() + raw_parameters = { + "resource_group_name": "test_rg", + "cluster_name": "test_cluster", + "config_name": "something", + } + + err = ("--config-name must be one of default, aksManagedAutoUpgradeSchedule or aksManagedNodeOSUpgradeSchedule, not something") + with self.assertRaises(InvalidArgumentValueError) as cm: + mc.aks_maintenanceconfiguration_update_internal(cmd, None, raw_parameters) + self.assertEqual(str(cm.exception), err) + + def test_add_default_maintenance_configuration_with_schedule_type(self): + cmd = SimpleNamespace() + raw_parameters = { + "resource_group_name": "test_rg", + "cluster_name": "test_cluster", + "config_name": "default", + "weekday": "Monday", + "start_hour": 1, + "schedule_type": "Weekly", + } + + err = ("--schedule-type is not supported for default maintenance configuration.") + with self.assertRaises(MutuallyExclusiveArgumentError) as cm: + mc.aks_maintenanceconfiguration_update_internal(cmd, None, raw_parameters) + self.assertEqual(str(cm.exception), err) + + def test_add_non_default_schedule_with_weekday(self): + cmd = SimpleNamespace() + raw_parameters = { + "resource_group_name": "test_rg", + "cluster_name": "test_cluster", + "config_name": "aksManagedAutoUpgradeSchedule", + "weekday": "Monday", + } + + err = ("--weekday and --start-hour are only applicable to default maintenance configuration.") + with self.assertRaises(MutuallyExclusiveArgumentError) as cm: + mc.aks_maintenanceconfiguration_update_internal(cmd, None, raw_parameters) + self.assertEqual(str(cm.exception), err) + + def test_add_daily_schedule_with_missing_options(self): + register_aks_preview_resource_type() + cli_ctx = MockCLI() + cmd = MockCmd(cli_ctx) + raw_parameters = { + "resource_group_name": "test_rg", + "cluster_name": "test_cluster", + "config_name": "aksManagedAutoUpgradeSchedule", + "schedule_type": "Daily", + } + + err = ("Please specify --interval-days when using daily schedule.") + with self.assertRaises(RequiredArgumentMissingError) as cm: + mc.aks_maintenanceconfiguration_update_internal(cmd, None, raw_parameters) + self.assertEqual(str(cm.exception), err) + + def test_add_daily_schedule_with_invalid_options(self): + register_aks_preview_resource_type() + cli_ctx = MockCLI() + cmd = MockCmd(cli_ctx) + raw_parameters = { + "resource_group_name": "test_rg", + "cluster_name": "test_cluster", + "config_name": "aksManagedAutoUpgradeSchedule", + "schedule_type": "Daily", + "interval_days": 3, + "day_of_week": "Monday", + } + + err = ("--interval-weeks, --interval-months, --day-of-week, --day-of-month and --week-index cannot be used for Daily schedule.") + with self.assertRaises(MutuallyExclusiveArgumentError) as cm: + mc.aks_maintenanceconfiguration_update_internal(cmd, None, raw_parameters) + self.assertEqual(str(cm.exception), err) + + def test_add_weekly_schedule_with_invalid_options(self): + register_aks_preview_resource_type() + cli_ctx = MockCLI() + cmd = MockCmd(cli_ctx) + raw_parameters = { + "resource_group_name": "test_rg", + "cluster_name": "test_cluster", + "config_name": "aksManagedAutoUpgradeSchedule", + "schedule_type": "Weekly", + "day_of_week": "Monday", + "interval_weeks": 3, + "week_index": "First", + } + + err = ("--interval-months, --day-of-month and --week-index cannot be used for Weekly schedule.") + with self.assertRaises(MutuallyExclusiveArgumentError) as cm: + mc.aks_maintenanceconfiguration_update_internal(cmd, None, raw_parameters) + self.assertEqual(str(cm.exception), err) + + def test_add_absolute_monthly_schedule_with_missing_options(self): + register_aks_preview_resource_type() + cli_ctx = MockCLI() + cmd = MockCmd(cli_ctx) + raw_parameters = { + "resource_group_name": "test_rg", + "cluster_name": "test_cluster", + "config_name": "aksManagedAutoUpgradeSchedule", + "schedule_type": "AbsoluteMonthly", + "day_of_week": "Monday", + "interval_months": 3, + } + + err = ("Please specify --interval-months and --day-of-month when using absolute monthly schedule.") + with self.assertRaises(RequiredArgumentMissingError) as cm: + mc.aks_maintenanceconfiguration_update_internal(cmd, None, raw_parameters) + self.assertEqual(str(cm.exception), err) + + def test_add_absolute_monthly_schedule_with_invalid_options(self): + register_aks_preview_resource_type() + cli_ctx = MockCLI() + cmd = MockCmd(cli_ctx) + raw_parameters = { + "resource_group_name": "test_rg", + "cluster_name": "test_cluster", + "config_name": "aksManagedAutoUpgradeSchedule", + "schedule_type": "AbsoluteMonthly", + "day_of_month": 15, + "interval_months": 3, + "week_index": "First", + } + + err = ("--interval-days, --interval-weeks, --day-of-week and --week-index cannot be used for AbsoluteMonthly schedule.") + with self.assertRaises(MutuallyExclusiveArgumentError) as cm: + mc.aks_maintenanceconfiguration_update_internal(cmd, None, raw_parameters) + self.assertEqual(str(cm.exception), err) + + def test_add_relative_monthly_schedule_with_missing_options(self): + register_aks_preview_resource_type() + cli_ctx = MockCLI() + cmd = MockCmd(cli_ctx) + raw_parameters = { + "resource_group_name": "test_rg", + "cluster_name": "test_cluster", + "config_name": "aksManagedAutoUpgradeSchedule", + "schedule_type": "RelativeMonthly", + "day_of_week": "Monday", + "interval_months": 3, + } + + err = ("Please specify --interval-months, --day-of-week and --week-index when using relative monthly schedule.") + with self.assertRaises(RequiredArgumentMissingError) as cm: + mc.aks_maintenanceconfiguration_update_internal(cmd, None, raw_parameters) + self.assertEqual(str(cm.exception), err) + + def test_add_dedicated_schedule_with_missing_options(self): + register_aks_preview_resource_type() + cli_ctx = MockCLI() + cmd = MockCmd(cli_ctx) + raw_parameters = { + "resource_group_name": "test_rg", + "cluster_name": "test_cluster", + "config_name": "aksManagedAutoUpgradeSchedule", + "schedule_type": "AbsoluteMonthly", + "day_of_month": 1, + "interval_months": 3, + "start_time": "00:00", + } + + err = ("Please specify --duration-hours for maintenance window.") + with self.assertRaises(RequiredArgumentMissingError) as cm: + mc.aks_maintenanceconfiguration_update_internal(cmd, None, raw_parameters) + self.assertEqual(str(cm.exception), err) + \ No newline at end of file diff --git a/src/aks-preview/azext_aks_preview/tests/latest/test_validators.py b/src/aks-preview/azext_aks_preview/tests/latest/test_validators.py index 989e0077a35..09437d42085 100644 --- a/src/aks-preview/azext_aks_preview/tests/latest/test_validators.py +++ b/src/aks-preview/azext_aks_preview/tests/latest/test_validators.py @@ -599,6 +599,46 @@ def test_multiple_application_security_groups(self): namespace ) +class MaintenanceWindowNameSpace: + def __init__(self, utc_offset=None, start_date=None, start_time=None): + self.utc_offset = utc_offset + self.start_date = start_date + self.start_time = start_time + +class TestValidateMaintenanceWindow(unittest.TestCase): + def test_invalid_utc_offset(self): + namespace = MaintenanceWindowNameSpace(utc_offset="5:00") + err = '--utc-offset must be in format: "+/-HH:mm". For example, "+05:30" and "-12:00".' + with self.assertRaises(InvalidArgumentValueError) as cm: + validators.validate_utc_offset(namespace) + self.assertEqual(str(cm.exception), err) + + def test_valid_utc_offset(self): + namespace = MaintenanceWindowNameSpace(utc_offset="+05:00") + validators.validate_utc_offset(namespace) + + def test_invalid_start_date(self): + namespace = MaintenanceWindowNameSpace(start_date="2023/01/01") + err = '--start-date must be in format: "yyyy-MM-dd". For example, "2023-01-01".' + with self.assertRaises(InvalidArgumentValueError) as cm: + validators.validate_start_date(namespace) + self.assertEqual(str(cm.exception), err) + + def test_valid_start_datet(self): + namespace = MaintenanceWindowNameSpace(start_date="2023-01-01") + validators.validate_start_date(namespace) + + def test_invalid_start_time(self): + namespace = MaintenanceWindowNameSpace(start_time="3am") + err = '--start-time must be in format "HH:mm". For example, "09:30" and "17:00".' + with self.assertRaises(InvalidArgumentValueError) as cm: + validators.validate_start_time(namespace) + self.assertEqual(str(cm.exception), err) + + def test_valid_start_time(self): + namespace = MaintenanceWindowNameSpace(start_date="00:30") + validators.validate_start_time(namespace) + if __name__ == "__main__": unittest.main() diff --git a/src/aks-preview/setup.py b/src/aks-preview/setup.py index 38524efbfe9..149c82a3f15 100644 --- a/src/aks-preview/setup.py +++ b/src/aks-preview/setup.py @@ -9,7 +9,7 @@ from setuptools import setup, find_packages -VERSION = "0.5.122" +VERSION = "0.5.123" CLASSIFIERS = [ "Development Status :: 4 - Beta", From 2f47d6aa85da8329e0b6b2b09fbca060e664a3e1 Mon Sep 17 00:00:00 2001 From: Thalia Wang Date: Mon, 9 Jan 2023 19:36:04 -0800 Subject: [PATCH 02/10] Fx indent --- src/aks-preview/azext_aks_preview/_help.py | 28 +++++------ src/aks-preview/azext_aks_preview/_params.py | 48 +++++++++---------- .../azext_aks_preview/_validators.py | 5 +- src/aks-preview/azext_aks_preview/custom.py | 1 + .../maintenanceconfiguration.py | 38 +++++++++------ 5 files changed, 66 insertions(+), 54 deletions(-) diff --git a/src/aks-preview/azext_aks_preview/_help.py b/src/aks-preview/azext_aks_preview/_help.py index 3e37cbfe7dd..f2390c684c9 100644 --- a/src/aks-preview/azext_aks_preview/_help.py +++ b/src/aks-preview/azext_aks_preview/_help.py @@ -1074,7 +1074,7 @@ short-summary: Choose either 'Daily', 'Weekly', 'AbsoluteMonthly' or 'RelativeMonthly' for your maintenance schedule. Only applicable to 'aksManagedAutoUpgradeSchedule' and 'aksManagedNodeOSUpgradeSchedule' maintenance configuration. - name: --start-date type: string - short-summary: The date the maintenance configuration activates. If not specified, the maintenance window will be active right away." + short-summary: The date the maintenance configuration activates. If not specified, the maintenance window will be active right away." - name: --start-time type: string short-summary: The start time of the maintenance window. Accepted values are from '00:00' to '23:59'. '--utc-offset' applies to this field. For example, '02:00' with '--utc-offset +02:00' means UTC time '00:00'. @@ -1101,7 +1101,7 @@ short-summary: Specifies on which day of the month the maintenance occurs. E.g. 1 indicates the 1st of the month. Applicable to absolute monthly schedule type only. - name: --week-index type: string - short-summary: Specifies on which instance of the allowed days specified in '--day-of-week' the maintenance occurs. Applicable to relative monthly schedule type only. + short-summary: Specifies on which instance of the allowed days specified in '--day-of-week' the maintenance occurs. Applicable to relative monthly schedule type only. - name: --config-file type: string short-summary: the maintenance configuration json file. @@ -1153,16 +1153,16 @@ The maintenance is allowed from 00:00 to 12:00 (adjusted with UTC offset: -08:00) every two days, and this configuration will be effective from 2023-01-16. - name: Add aksManagedNodeOSUpgradeSchedule maintenance configuration with weekly schedule. text: | - az aks maintenanceconfiguration add -g MyResourceGroup --cluster-name test1 -n aksManagedNodeOSUpgradeSchedule --schedule-type Weekly --day-of-week Friday --interval-weeks 3 --duration 8 --utc-offset +05:30 --start-date 2023-01-16 --start-time 09:30 + az aks maintenanceconfiguration add -g MyResourceGroup --cluster-name test1 -n aksManagedNodeOSUpgradeSchedule --schedule-type Weekly --day-of-week Friday --interval-weeks 3 --duration 8 --utc-offset +05:30 --start-date 2023-01-16 --start-time 09:30 The maintenance is allowed on Friday from 09:30 to 17:30 (adjusted with UTC offset: +05:30) every three weeks, and this configuration will be effective from 2023-01-16. - name: Add aksManagedAutoUpgradeSchedule maintenance configuration with absolute monthly schedule. text: | - az aks maintenanceconfiguration add -g MyResourceGroup --cluster-name test1 -n aksManagedAutoUpgradeSchedule --schedule-type AbsoluteMonthly --day-of-month 15 --interval-months 1 --duration 6 --utc-offset +05:30 --start-date 2023-01-16 --start-time 09:30 + az aks maintenanceconfiguration add -g MyResourceGroup --cluster-name test1 -n aksManagedAutoUpgradeSchedule --schedule-type AbsoluteMonthly --day-of-month 15 --interval-months 1 --duration 6 --utc-offset +05:30 --start-date 2023-01-16 --start-time 09:30 The maintenance is allowed on the 15th of the month from 09:30 to 15:30 (adjusted with UTC offset: +05:30) every month, and this configuration will be effective from 2023-01-16. - name: Add aksManagedAutoUpgradeSchedule maintenance configuration with relative monthly schedule. text: | - az aks maintenanceconfiguration add -g MyResourceGroup --cluster-name test1 -n aksManagedAutoUpgradeSchedule --schedule-type RelativeMonthly --day-of-week Tuesday --week-index Last --interval-months 3 --duration 6 --start-date 2023-01-16 --start-time 09:30 - The maintenance is allowed on the last Tuesday from 09:30 to 15:30 in default UTC time every 3 months, and this configuration will be effective from 2023-01-16. + az aks maintenanceconfiguration add -g MyResourceGroup --cluster-name test1 -n aksManagedAutoUpgradeSchedule --schedule-type RelativeMonthly --day-of-week Tuesday --week-index Last --interval-months 3 --duration 6 --start-date 2023-01-16 --start-time 09:30 + The maintenance is allowed on the last Tuesday from 09:30 to 15:30 in default UTC time every 3 months, and this configuration will be effective from 2023-01-16. - name: Add aksManagedAutoUpgradeSchedule maintenance configuration with json file. text: | az aks maintenanceconfiguration add -g MyResourceGroup --cluster-name test1 -n aksManagedAutoUpgradeSchedule --config-file ./test.json @@ -1190,7 +1190,7 @@ } ] } - } + } """ helps['aks maintenanceconfiguration update'] = """ @@ -1208,7 +1208,7 @@ short-summary: Choose either 'Daily', 'Weekly', 'AbsoluteMonthly' or 'RelativeMonthly' for your maintenance schedule. Only applicable to 'aksManagedAutoUpgradeSchedule' and 'aksManagedNodeOSUpgradeSchedule' maintenance configuration. - name: --start-date type: string - short-summary: The date the maintenance configuration activates. If not specified, the maintenance window will be active right away." + short-summary: The date the maintenance configuration activates. If not specified, the maintenance window will be active right away." - name: --start-time type: string short-summary: The start time of the maintenance window. Accepted values are from '00:00' to '23:59'. '--utc-offset' applies to this field. For example, '02:00' with '--utc-offset +02:00' means UTC time '00:00'. @@ -1235,7 +1235,7 @@ short-summary: Specifies on which day of the month the maintenance occurs. E.g. 1 indicates the 1st of the month. Applicable to absolute monthly schedule type only. - name: --week-index type: string - short-summary: Specifies on which instance of the allowed days specified in '--day-of-week' the maintenance occurs. Applicable to relative monthly schedule type only. + short-summary: Specifies on which instance of the allowed days specified in '--day-of-week' the maintenance occurs. Applicable to relative monthly schedule type only. - name: --config-file type: string short-summary: the maintenance configuration json file. @@ -1287,16 +1287,16 @@ The maintenance is allowed from 00:00 to 12:00 (adjusted with UTC offset: -08:00) every two days. This configuration will be effective from 2023-01-16. - name: Update aksManagedNodeOSUpgradeSchedule maintenance configuration with weekly schedule. text: | - az aks maintenanceconfiguration update -g MyResourceGroup --cluster-name test1 -n aksManagedNodeOSUpgradeSchedule --schedule-type Weekly --day-of-week Friday --interval-weeks 3 --duration 8 --utc-offset +05:30 --start-date 2023-01-16 --start-time 09:30 + az aks maintenanceconfiguration update -g MyResourceGroup --cluster-name test1 -n aksManagedNodeOSUpgradeSchedule --schedule-type Weekly --day-of-week Friday --interval-weeks 3 --duration 8 --utc-offset +05:30 --start-date 2023-01-16 --start-time 09:30 The maintenance is allowed on Friday from 09:30 to 17:30 (adjusted with UTC offset: +05:30) every three weeks. This configuration will be effective from 2023-01-16. - name: Update aksManagedAutoUpgradeSchedule maintenance configuration with absolute monthly schedule. text: | - az aks maintenanceconfiguration update -g MyResourceGroup --cluster-name test1 -n aksManagedAutoUpgradeSchedule --schedule-type AbsoluteMonthly --day-of-month 15 --interval-months 1 --duration 6 --utc-offset +05:30 --start-date 2023-01-16 --start-time 09:30 + az aks maintenanceconfiguration update -g MyResourceGroup --cluster-name test1 -n aksManagedAutoUpgradeSchedule --schedule-type AbsoluteMonthly --day-of-month 15 --interval-months 1 --duration 6 --utc-offset +05:30 --start-date 2023-01-16 --start-time 09:30 The maintenance is allowed on the 15th of the month from 09:30 to 15:30 (adjusted with UTC offset: +05:30) every month. This configuration will be effective from 2023-01-16. - name: Update aksManagedAutoUpgradeSchedule maintenance configuration with relative monthly schedule. text: | - az aks maintenanceconfiguration update -g MyResourceGroup --cluster-name test1 -n aksManagedAutoUpgradeSchedule --schedule-type RelativeMonthly --day-of-week Tuesday --week-index Last --interval-months 3 --duration 6 --start-date 2023-01-16 --start-time 09:30 - The maintenance is allowed on the last Tuesday from 09:30 to 15:30 in default UTC time every 3 months. This configuration will be effective from 2023-01-16. + az aks maintenanceconfiguration update -g MyResourceGroup --cluster-name test1 -n aksManagedAutoUpgradeSchedule --schedule-type RelativeMonthly --day-of-week Tuesday --week-index Last --interval-months 3 --duration 6 --start-date 2023-01-16 --start-time 09:30 + The maintenance is allowed on the last Tuesday from 09:30 to 15:30 in default UTC time every 3 months. This configuration will be effective from 2023-01-16. - name: Update aksManagedAutoUpgradeSchedule maintenance configuration with json file. text: | az aks maintenanceconfiguration update -g MyResourceGroup --cluster-name test1 -n aksManagedAutoUpgradeSchedule --config-file ./test.json @@ -1324,7 +1324,7 @@ } ] } - } + } """ helps['aks nodepool'] = """ diff --git a/src/aks-preview/azext_aks_preview/_params.py b/src/aks-preview/azext_aks_preview/_params.py index 74fb8d4f41a..645ffbc0c55 100644 --- a/src/aks-preview/azext_aks_preview/_params.py +++ b/src/aks-preview/azext_aks_preview/_params.py @@ -598,33 +598,31 @@ def load_arguments(self, _): '--weekday'], help='weekday on which maintenance can happen. e.g. Monday', required=False) c.argument('start_hour', type=int, options_list=[ '--start-hour'], help='maintenance start hour of 1 hour window on the weekday. e.g. 1 means 1:00am - 2:00am', required=False) - c.argument('schedule_type', options_list=['--schedule-type'], - arg_type=get_enum_type(schedule_types), - help='Schedule type for non-default maintenance configuration.', required=False) - c.argument('interval_days', options_list=['--interval-days'], type=int, - help='The number of days between each set of occurrences for Daily schedule.', required=False) - c.argument('interval_weeks', options_list=['--interval-weeks'], type=int, - help='The number of weeks between each set of occurrences for Weekly schedule.', required=False) - c.argument('interval_months', options_list=['--interval-months'], type=int, - help='The number of months between each set of occurrences for AbsoluteMonthly or RelativeMonthly schedule.', required=False) - c.argument('day_of_week', options_list=['--day-of-week'], - help='Specifies on which day of the week the maintenance occurs for Weekly or RelativeMonthly schedule.', required=False) + c.argument('schedule_type', options_list=['--schedule-type'], arg_type=get_enum_type(schedule_types), + help='Schedule type for non-default maintenance configuration.', required=False) + c.argument('interval_days', options_list=['--interval-days'], type=int, + help='The number of days between each set of occurrences for Daily schedule.', required=False) + c.argument('interval_weeks', options_list=['--interval-weeks'], type=int, + help='The number of weeks between each set of occurrences for Weekly schedule.', required=False) + c.argument('interval_months', options_list=['--interval-months'], type=int, + help='The number of months between each set of occurrences for AbsoluteMonthly or RelativeMonthly schedule.', required=False) + c.argument('day_of_week', options_list=['--day-of-week'], + help='Specifies on which day of the week the maintenance occurs for Weekly or RelativeMonthly schedule.', required=False) c.argument('day_of_month', options_list=['--day-of-month'], - help='Specifies on which date of the month the maintenance occurs for AbsoluteMonthly schedule.', required=False) - c.argument('week_index', options_list=['--week-index'], - arg_type=get_enum_type(week_indexes), - help='Specifies on which instance of the weekday specified in --day-of-week the maintenance occurs for RelativeMonthly schedule.', required=False) - c.argument('duration_hours', options_list=['--duration'], type=int, - help='The length of maintenance window. The value ranges from 4 to 24 hours.', required=False) - c.argument('utc_offset', options_list=['--utc-offset'], - validator=validate_utc_offset, - help='The UTC offset in format +/-HH:mm. e.g. -08:00 or +05:30.', required=False) - c.argument('start_date', options_list=['--start-date'], - validator=validate_start_date, - help='The date the maintenance window activates. e.g. 2023-01-01.', required=False) + help='Specifies on which date of the month the maintenance occurs for AbsoluteMonthly schedule.', required=False) + c.argument('week_index', options_list=['--week-index'], + arg_type=get_enum_type(week_indexes), + help='Specifies on which instance of the weekday specified in --day-of-week the maintenance occurs for RelativeMonthly schedule.', required=False) + c.argument('duration_hours', options_list=['--duration'], type=int, + help='The length of maintenance window. The value ranges from 4 to 24 hours.', required=False) + c.argument('utc_offset', options_list=[ + '--utc-offset'], validator=validate_utc_offset, help='The UTC offset in format +/-HH:mm. e.g. -08:00 or +05:30.', required=False) + c.argument('start_date', options_list=[ + '--start-date'], validator=validate_start_date, + help='The date the maintenance window activates. e.g. 2023-01-01.', required=False) c.argument('start_time', options_list=['--start-time'], - validator=validate_start_time, - help='The start time of the maintenance window. e.g. 09:30.', required=False) + validator=validate_start_time, + help='The start time of the maintenance window. e.g. 09:30.', required=False) for scope in ['aks maintenanceconfiguration show', 'aks maintenanceconfiguration delete']: with self.argument_context(scope) as c: diff --git a/src/aks-preview/azext_aks_preview/_validators.py b/src/aks-preview/azext_aks_preview/_validators.py index c467face631..fd6830c1eff 100644 --- a/src/aks-preview/azext_aks_preview/_validators.py +++ b/src/aks-preview/azext_aks_preview/_validators.py @@ -804,6 +804,7 @@ def validate_application_security_groups(namespace): if not is_valid_resource_id(asg): raise InvalidArgumentValueError(asg + " is not a valid Azure resource ID.") + def validate_utc_offset(namespace): """Validates --utc-offset for aks maintenanceconfiguration add/update commands.""" if namespace.utc_offset is None: @@ -813,6 +814,7 @@ def validate_utc_offset(namespace): if not found: raise InvalidArgumentValueError('--utc-offset must be in format: "+/-HH:mm". For example, "+05:30" and "-12:00".') + def validate_start_date(namespace): """Validates --start-date for aks maintenanceconfiguration add/update commands.""" if namespace.start_date is None: @@ -822,6 +824,7 @@ def validate_start_date(namespace): if not found: raise InvalidArgumentValueError('--start-date must be in format: "yyyy-MM-dd". For example, "2023-01-01".') + def validate_start_time(namespace): """Validates --start-time for aks maintenanceconfiguration add/update commands.""" if namespace.start_time is None: @@ -829,4 +832,4 @@ def validate_start_time(namespace): start_time_regex = re.compile(r'^\d{2}:\d{2}$') found = start_time_regex.findall(namespace.start_time) if not found: - raise InvalidArgumentValueError('--start-time must be in format "HH:mm". For example, "09:30" and "17:00".') \ No newline at end of file + raise InvalidArgumentValueError('--start-time must be in format "HH:mm". For example, "09:30" and "17:00".') diff --git a/src/aks-preview/azext_aks_preview/custom.py b/src/aks-preview/azext_aks_preview/custom.py index 2fc5b610caf..6bf513ec9b4 100644 --- a/src/aks-preview/azext_aks_preview/custom.py +++ b/src/aks-preview/azext_aks_preview/custom.py @@ -560,6 +560,7 @@ def aks_maintenanceconfiguration_update( raw_parameters = locals() return aks_maintenanceconfiguration_update_internal(cmd, client, raw_parameters) + # pylint: disable=too-many-locals def aks_create( cmd, diff --git a/src/aks-preview/azext_aks_preview/maintenanceconfiguration.py b/src/aks-preview/azext_aks_preview/maintenanceconfiguration.py index a97646c675a..08fe1e04529 100644 --- a/src/aks-preview/azext_aks_preview/maintenanceconfiguration.py +++ b/src/aks-preview/azext_aks_preview/maintenanceconfiguration.py @@ -27,6 +27,7 @@ logger = get_logger(__name__) + def aks_maintenanceconfiguration_update_internal(cmd, client, raw_parameters): resource_group_name = raw_parameters.get("resource_group_name") cluster_name = raw_parameters.get("cluster_name") @@ -34,6 +35,7 @@ def aks_maintenanceconfiguration_update_internal(cmd, client, raw_parameters): config = getMaintenanceConfiguration(cmd, raw_parameters) return client.create_or_update(resource_group_name=resource_group_name, resource_name=cluster_name, config_name=config_name, parameters=config) + def getMaintenanceConfiguration(cmd, raw_parameters): config_file = raw_parameters.get("config_file") if config_file is not None: @@ -41,7 +43,7 @@ def getMaintenanceConfiguration(cmd, raw_parameters): logger.info(mcr) return mcr - config_name = raw_parameters.get("config_name") + config_name = raw_parameters.get("config_name") if config_name == CONST_DEFAULT_CONFIGURATION_NAME: return constructDefaultMaintenanceConfiguration(cmd, raw_parameters) elif config_name == CONST_AUTOUPGRADE_CONFIGURATION_NAME or config_name == CONST_NODEOSUPGRADE_CONFIGURATION_NAME: @@ -49,6 +51,7 @@ def getMaintenanceConfiguration(cmd, raw_parameters): else: raise InvalidArgumentValueError('--config-name must be one of default, aksManagedAutoUpgradeSchedule or aksManagedNodeOSUpgradeSchedule, not {}'.format(config_name)) + def constructDefaultMaintenanceConfiguration(cmd, raw_parameters): weekday = raw_parameters.get("weekday") start_hour = raw_parameters.get("start_hour") @@ -58,10 +61,10 @@ def constructDefaultMaintenanceConfiguration(cmd, raw_parameters): raise RequiredArgumentMissingError('Please specify --weekday and --start-hour for default maintenance configuration, or use --config-file instead.') if schedule_type is not None: raise MutuallyExclusiveArgumentError('--schedule-type is not supported for default maintenance configuration.') - + MaintenanceConfiguration = cmd.get_models('MaintenanceConfiguration', resource_type=CUSTOM_MGMT_AKS_PREVIEW, operation_group='maintenance_configurations') TimeInWeek = cmd.get_models('TimeInWeek', resource_type=CUSTOM_MGMT_AKS_PREVIEW, operation_group='maintenance_configurations') - + dict = {} dict["day"] = weekday dict["hour_slots"] = [start_hour] @@ -71,17 +74,19 @@ def constructDefaultMaintenanceConfiguration(cmd, raw_parameters): result.not_allowed_time = [] return result + def constructDedicatedMaintenanceConfiguration(cmd, raw_parameters): weekday = raw_parameters.get("weekday") start_hour = raw_parameters.get("start_hour") if weekday is not None or start_hour is not None: raise MutuallyExclusiveArgumentError('--weekday and --start-hour are only applicable to default maintenance configuration.') - - maintenanceConfiguration = cmd.get_models('MaintenanceConfiguration', resource_type=CUSTOM_MGMT_AKS_PREVIEW, operation_group='maintenance_configurations') + + maintenanceConfiguration = cmd.get_models('MaintenanceConfiguration', resource_type=CUSTOM_MGMT_AKS_PREVIEW, operation_group='maintenance_configurations') result = maintenanceConfiguration() result.maintenance_window = constructMaintenanceWindow(cmd, raw_parameters) return result + def constructMaintenanceWindow(cmd, raw_parameters): schedule = constructSchedule(cmd, raw_parameters) start_date = raw_parameters.get("start_date") @@ -104,6 +109,7 @@ def constructMaintenanceWindow(cmd, raw_parameters): ) return maintenanceWindow + def constructSchedule(cmd, raw_parameters): schedule_type = raw_parameters.get("schedule_type") interval_days = raw_parameters.get("interval_days") @@ -112,7 +118,7 @@ def constructSchedule(cmd, raw_parameters): day_of_week = raw_parameters.get("day_of_week") day_of_month = raw_parameters.get("day_of_month") week_index = raw_parameters.get("week_index") - + Schedule = cmd.get_models('Schedule', resource_type=CUSTOM_MGMT_AKS_PREVIEW, operation_group='maintenance_configurations') schedule = Schedule() @@ -124,28 +130,30 @@ def constructSchedule(cmd, raw_parameters): schedule.absolute_monthly = constructAbsoluteMonthlySchedule(cmd, interval_days, interval_weeks, interval_months, day_of_week, day_of_month, week_index) elif schedule_type == CONST_RELATIVEMONTHLY_MAINTENANCE_SCHEDULE: schedule.relative_monthly = constructRelativeMonthlySchedule(cmd, interval_days, interval_weeks, interval_months, day_of_week, day_of_month, week_index) - else : + else: raise InvalidArgumentValueError('--schedule-type must be one of Daily, Weekly, AbsoluteMonthly or RelativeMonthly.') return schedule + def constructDailySchedule(cmd, interval_days, interval_weeks, interval_months, day_of_week, day_of_month, week_index): if interval_days is None: raise RequiredArgumentMissingError("Please specify --interval-days when using daily schedule.") if interval_weeks is not None or interval_months is not None or day_of_week is not None or day_of_month is not None or week_index is not None: raise MutuallyExclusiveArgumentError('--interval-weeks, --interval-months, --day-of-week, --day-of-month and --week-index cannot be used for Daily schedule.') - + DailySchedule = cmd.get_models('DailySchedule', resource_type=CUSTOM_MGMT_AKS_PREVIEW, operation_group='maintenance_configurations') dailySchedule = DailySchedule( interval_days=interval_days ) return dailySchedule + def constructWeeklySchedule(cmd, interval_days, interval_weeks, interval_months, day_of_week, day_of_month, week_index): if interval_weeks is None or day_of_week is None: raise RequiredArgumentMissingError("Please specify --interval-weeks and --day-of-week when using weekly schedule.") if interval_days is not None or interval_months is not None or day_of_month is not None or week_index is not None: - raise MutuallyExclusiveArgumentError('--interval-months, --day-of-month and --week-index cannot be used for Weekly schedule.') - + raise MutuallyExclusiveArgumentError('--interval-months, --day-of-month and --week-index cannot be used for Weekly schedule.') + WeeklySchedule = cmd.get_models('WeeklySchedule', resource_type=CUSTOM_MGMT_AKS_PREVIEW, operation_group='maintenance_configurations') weeklySchedule = WeeklySchedule( interval_weeks=interval_weeks, @@ -153,12 +161,13 @@ def constructWeeklySchedule(cmd, interval_days, interval_weeks, interval_months, ) return weeklySchedule + def constructAbsoluteMonthlySchedule(cmd, interval_days, interval_weeks, interval_months, day_of_week, day_of_month, week_index): if interval_months is None or day_of_month is None: raise RequiredArgumentMissingError("Please specify --interval-months and --day-of-month when using absolute monthly schedule.") if interval_days is not None or interval_weeks is not None or day_of_week is not None or week_index is not None: - raise MutuallyExclusiveArgumentError('--interval-days, --interval-weeks, --day-of-week and --week-index cannot be used for AbsoluteMonthly schedule.') - + raise MutuallyExclusiveArgumentError('--interval-days, --interval-weeks, --day-of-week and --week-index cannot be used for AbsoluteMonthly schedule.') + AbsoluteMonthlySchedule = cmd.get_models('AbsoluteMonthlySchedule', resource_type=CUSTOM_MGMT_AKS_PREVIEW, operation_group='maintenance_configurations') absoluteMonthlySchedule = AbsoluteMonthlySchedule( interval_months=interval_months, @@ -166,12 +175,13 @@ def constructAbsoluteMonthlySchedule(cmd, interval_days, interval_weeks, interva ) return absoluteMonthlySchedule + def constructRelativeMonthlySchedule(cmd, interval_days, interval_weeks, interval_months, day_of_week, day_of_month, week_index): if interval_months is None or day_of_week is None or week_index is None: raise RequiredArgumentMissingError("Please specify --interval-months, --day-of-week and --week-index when using relative monthly schedule.") if interval_days is not None or interval_weeks is not None or day_of_month is not None: - raise MutuallyExclusiveArgumentError('--interval-days, --interval-weeks and --day-of-month cannot be used for RelativeMonthly schedule.') - + raise MutuallyExclusiveArgumentError('--interval-days, --interval-weeks and --day-of-month cannot be used for RelativeMonthly schedule.') + RelativeMonthlySchedule = cmd.get_models('RelativeMonthlySchedule', resource_type=CUSTOM_MGMT_AKS_PREVIEW, operation_group='maintenance_configurations') relativeMonthlySchedule = RelativeMonthlySchedule( interval_months=interval_months, From 2702d72ebac67979dca9249c3835b89fcac7bbe8 Mon Sep 17 00:00:00 2001 From: Thalia Wang Date: Mon, 9 Jan 2023 20:05:28 -0800 Subject: [PATCH 03/10] Missed one --- .../maintenanceconfiguration.py | 2 +- .../test_aks_maintenancewindow.yaml | 1233 +++++++++++++++++ .../tests/latest/test_aks_commands.py | 2 +- 3 files changed, 1235 insertions(+), 2 deletions(-) create mode 100644 src/aks-preview/azext_aks_preview/tests/latest/recordings/test_aks_maintenancewindow.yaml diff --git a/src/aks-preview/azext_aks_preview/maintenanceconfiguration.py b/src/aks-preview/azext_aks_preview/maintenanceconfiguration.py index 08fe1e04529..6d70730ef8d 100644 --- a/src/aks-preview/azext_aks_preview/maintenanceconfiguration.py +++ b/src/aks-preview/azext_aks_preview/maintenanceconfiguration.py @@ -153,7 +153,7 @@ def constructWeeklySchedule(cmd, interval_days, interval_weeks, interval_months, raise RequiredArgumentMissingError("Please specify --interval-weeks and --day-of-week when using weekly schedule.") if interval_days is not None or interval_months is not None or day_of_month is not None or week_index is not None: raise MutuallyExclusiveArgumentError('--interval-months, --day-of-month and --week-index cannot be used for Weekly schedule.') - + WeeklySchedule = cmd.get_models('WeeklySchedule', resource_type=CUSTOM_MGMT_AKS_PREVIEW, operation_group='maintenance_configurations') weeklySchedule = WeeklySchedule( interval_weeks=interval_weeks, diff --git a/src/aks-preview/azext_aks_preview/tests/latest/recordings/test_aks_maintenancewindow.yaml b/src/aks-preview/azext_aks_preview/tests/latest/recordings/test_aks_maintenancewindow.yaml new file mode 100644 index 00000000000..6f41481dd17 --- /dev/null +++ b/src/aks-preview/azext_aks_preview/tests/latest/recordings/test_aks_maintenancewindow.yaml @@ -0,0 +1,1233 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --ssh-key-value + User-Agent: + - AZURECLI/2.44.0 (DOCKER) azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.10.2 + (Linux-5.10.104-linuxkit-x86_64-with) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001?api-version=2021-04-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001","name":"clitest000001","type":"Microsoft.Resources/resourceGroups","location":"westus2","tags":{"product":"azurecli","cause":"automation","date":"2023-01-10T04:00:35Z"},"properties":{"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '305' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 10 Jan 2023 04:00:36 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: '{"location": "westus2", "identity": {"type": "SystemAssigned"}, "properties": + {"kubernetesVersion": "", "dnsPrefix": "cliakstest-clitestmsdswmbyg-8ecadf", + "agentPoolProfiles": [{"count": 3, "vmSize": "Standard_DS2_v2", "osDiskSizeGB": + 0, "workloadRuntime": "OCIContainer", "osType": "Linux", "enableAutoScaling": + false, "type": "VirtualMachineScaleSets", "mode": "System", "orchestratorVersion": + "", "upgradeSettings": {}, "enableNodePublicIP": false, "enableCustomCATrust": + false, "scaleSetPriority": "Regular", "scaleSetEvictionPolicy": "Delete", "spotMaxPrice": + -1.0, "nodeTaints": [], "enableEncryptionAtHost": false, "enableUltraSSD": false, + "enableFIPS": false, "networkProfile": {}, "name": "nodepool1"}], "linuxProfile": + {"adminUsername": "azureuser", "ssh": {"publicKeys": [{"keyData": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCbIg1guRHbI0lV11wWDt1r2cUdcNd27CJsg+SfgC7miZeubtwUhbsPdhMQsfDyhOWHq1+ZL0M+nJZV63d/1dhmhtgyOqejUwrPlzKhydsbrsdUor+JmNJDdW01v7BXHyuymT8G4s09jCasNOwiufbP/qp72ruu0bIA1nySsvlf9pCQAuFkAnVnf/rFhUlOkhtRpwcq8SUNY2zRHR/EKb/4NWY1JzR4sa3q2fWIJdrrX0DvLoa5g9bIEd4Df79ba7v+yiUBOS0zT2ll+z4g9izHK3EO5d8hL4jYxcjKs+wcslSYRWrascfscLgMlMGh0CdKeNTDjHpGPncaf3Z+FwwwjWeuiNBxv7bJo13/8B/098KlVDl4GZqsoBCEjPyJfV6hO0y/LkRGkk7oHWKgeWAfKtfLItRp00eZ4fcJNK9kCaSMmEugoZWcI7NGbZXzqFWqbpRI7NcDP9+WIQ+i9U5vqWsqd/zng4kbuAJ6UuKqIzB0upYrLShfQE3SAck8oaLhJqqq56VfDuASNpJKidV+zq27HfSBmbXnkR/5AK337dc3MXKJypoK/QPMLKUAP5XLPbs+NddJQV7EZXd29DLgp+fRIg3edpKdO7ZErWhv7d+3Kws+e1Y+ypmR2WIVSwVyBEUfgv2C8Ts9gnTF4pNcEY/S2aBicz5Ew2+jdyGNQQ== + test@example.com\n"}]}}, "addonProfiles": {}, "enableRBAC": true, "enablePodSecurityPolicy": + false, "networkProfile": {"networkPlugin": "kubenet", "podCidr": "10.244.0.0/16", + "serviceCidr": "10.0.0.0/16", "dnsServiceIP": "10.0.0.10", "dockerBridgeCidr": + "172.17.0.1/16", "outboundType": "loadBalancer", "loadBalancerSku": "standard"}, + "disableLocalAccounts": false, "storageProfile": {}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + Content-Length: + - '1909' + Content-Type: + - application/json + ParameterSetName: + - --resource-group --name --ssh-key-value + User-Agent: + - AZURECLI/2.44.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/21.0.0b + Python/3.10.2 (Linux-5.10.104-linuxkit-x86_64-with) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002?api-version=2022-11-02-preview + response: + body: + string: "{\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002\"\ + ,\n \"location\": \"westus2\",\n \"name\": \"cliakstest000002\",\n \"type\"\ + : \"Microsoft.ContainerService/ManagedClusters\",\n \"properties\": {\n \ + \ \"provisioningState\": \"Creating\",\n \"powerState\": {\n \"code\"\ + : \"Running\"\n },\n \"kubernetesVersion\": \"1.23.12\",\n \"currentKubernetesVersion\"\ + : \"1.23.12\",\n \"dnsPrefix\": \"cliakstest-clitestmsdswmbyg-8ecadf\",\n\ + \ \"fqdn\": \"cliakstest-clitestmsdswmbyg-8ecadf-b81f0ea5.hcp.westus2.azmk8s.io\"\ + ,\n \"azurePortalFQDN\": \"cliakstest-clitestmsdswmbyg-8ecadf-b81f0ea5.portal.hcp.westus2.azmk8s.io\"\ + ,\n \"agentPoolProfiles\": [\n {\n \"name\": \"nodepool1\",\n \ + \ \"count\": 3,\n \"vmSize\": \"Standard_DS2_v2\",\n \"osDiskSizeGB\"\ + : 128,\n \"osDiskType\": \"Managed\",\n \"kubeletDiskType\": \"OS\"\ + ,\n \"workloadRuntime\": \"OCIContainer\",\n \"maxPods\": 110,\n \ + \ \"type\": \"VirtualMachineScaleSets\",\n \"enableAutoScaling\": false,\n\ + \ \"provisioningState\": \"Creating\",\n \"powerState\": {\n \ + \ \"code\": \"Running\"\n },\n \"orchestratorVersion\": \"1.23.12\"\ + ,\n \"currentOrchestratorVersion\": \"1.23.12\",\n \"enableNodePublicIP\"\ + : false,\n \"enableCustomCATrust\": false,\n \"mode\": \"System\"\ + ,\n \"enableEncryptionAtHost\": false,\n \"enableUltraSSD\": false,\n\ + \ \"osType\": \"Linux\",\n \"osSKU\": \"Ubuntu\",\n \"nodeImageVersion\"\ + : \"AKSUbuntu-1804gen2containerd-2022.12.15\",\n \"upgradeSettings\":\ + \ {},\n \"enableFIPS\": false,\n \"networkProfile\": {}\n }\n \ + \ ],\n \"linuxProfile\": {\n \"adminUsername\": \"azureuser\",\n \ + \ \"ssh\": {\n \"publicKeys\": [\n {\n \"keyData\": \"ssh-rsa\ + \ AAAAB3NzaC1yc2EAAAADAQABAAACAQCbIg1guRHbI0lV11wWDt1r2cUdcNd27CJsg+SfgC7miZeubtwUhbsPdhMQsfDyhOWHq1+ZL0M+nJZV63d/1dhmhtgyOqejUwrPlzKhydsbrsdUor+JmNJDdW01v7BXHyuymT8G4s09jCasNOwiufbP/qp72ruu0bIA1nySsvlf9pCQAuFkAnVnf/rFhUlOkhtRpwcq8SUNY2zRHR/EKb/4NWY1JzR4sa3q2fWIJdrrX0DvLoa5g9bIEd4Df79ba7v+yiUBOS0zT2ll+z4g9izHK3EO5d8hL4jYxcjKs+wcslSYRWrascfscLgMlMGh0CdKeNTDjHpGPncaf3Z+FwwwjWeuiNBxv7bJo13/8B/098KlVDl4GZqsoBCEjPyJfV6hO0y/LkRGkk7oHWKgeWAfKtfLItRp00eZ4fcJNK9kCaSMmEugoZWcI7NGbZXzqFWqbpRI7NcDP9+WIQ+i9U5vqWsqd/zng4kbuAJ6UuKqIzB0upYrLShfQE3SAck8oaLhJqqq56VfDuASNpJKidV+zq27HfSBmbXnkR/5AK337dc3MXKJypoK/QPMLKUAP5XLPbs+NddJQV7EZXd29DLgp+fRIg3edpKdO7ZErWhv7d+3Kws+e1Y+ypmR2WIVSwVyBEUfgv2C8Ts9gnTF4pNcEY/S2aBicz5Ew2+jdyGNQQ==\ + \ test@example.com\\n\"\n }\n ]\n }\n },\n \"servicePrincipalProfile\"\ + : {\n \"clientId\":\"00000000-0000-0000-0000-000000000001\"\n },\n \ + \ \"nodeResourceGroup\": \"MC_clitest000001_cliakstest000002_westus2\",\n\ + \ \"enableRBAC\": true,\n \"enablePodSecurityPolicy\": false,\n \"networkProfile\"\ + : {\n \"networkPlugin\": \"kubenet\",\n \"loadBalancerSku\": \"standard\"\ + ,\n \"loadBalancerProfile\": {\n \"managedOutboundIPs\": {\n \"\ + count\": 1\n },\n \"backendPoolType\": \"nodeIPConfiguration\"\n \ + \ },\n \"podCidr\": \"10.244.0.0/16\",\n \"serviceCidr\": \"10.0.0.0/16\"\ + ,\n \"dnsServiceIP\": \"10.0.0.10\",\n \"dockerBridgeCidr\": \"172.17.0.1/16\"\ + ,\n \"outboundType\": \"loadBalancer\",\n \"podCidrs\": [\n \"10.244.0.0/16\"\ + \n ],\n \"serviceCidrs\": [\n \"10.0.0.0/16\"\n ],\n \"ipFamilies\"\ + : [\n \"IPv4\"\n ]\n },\n \"maxAgentPools\": 100,\n \"disableLocalAccounts\"\ + : false,\n \"securityProfile\": {},\n \"storageProfile\": {\n \"diskCSIDriver\"\ + : {\n \"enabled\": true,\n \"version\": \"v1\"\n },\n \"fileCSIDriver\"\ + : {\n \"enabled\": true\n },\n \"snapshotController\": {\n \"\ + enabled\": true\n }\n },\n \"oidcIssuerProfile\": {\n \"enabled\"\ + : false\n },\n \"workloadAutoScalerProfile\": {}\n },\n \"identity\"\ + : {\n \"type\": \"SystemAssigned\",\n \"principalId\":\"00000000-0000-0000-0000-000000000001\"\ + ,\n \"tenantId\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\"\n },\n \"sku\"\ + : {\n \"name\": \"Basic\",\n \"tier\": \"Free\"\n }\n }" + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/6cfb5057-0a99-4d4f-a52c-dc30ac870910?api-version=2016-03-30 + cache-control: + - no-cache + content-length: + - '3809' + content-type: + - application/json + date: + - Tue, 10 Jan 2023 04:00:42 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --ssh-key-value + User-Agent: + - AZURECLI/2.44.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/21.0.0b + Python/3.10.2 (Linux-5.10.104-linuxkit-x86_64-with) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/6cfb5057-0a99-4d4f-a52c-dc30ac870910?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"5750fb6c-990a-4f4d-a52c-dc30ac870910\",\n \"status\"\ + : \"InProgress\",\n \"startTime\": \"2023-01-10T04:00:42.495534Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '125' + content-type: + - application/json + date: + - Tue, 10 Jan 2023 04:01:12 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --ssh-key-value + User-Agent: + - AZURECLI/2.44.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/21.0.0b + Python/3.10.2 (Linux-5.10.104-linuxkit-x86_64-with) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/6cfb5057-0a99-4d4f-a52c-dc30ac870910?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"5750fb6c-990a-4f4d-a52c-dc30ac870910\",\n \"status\"\ + : \"InProgress\",\n \"startTime\": \"2023-01-10T04:00:42.495534Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '125' + content-type: + - application/json + date: + - Tue, 10 Jan 2023 04:01:42 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --ssh-key-value + User-Agent: + - AZURECLI/2.44.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/21.0.0b + Python/3.10.2 (Linux-5.10.104-linuxkit-x86_64-with) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/6cfb5057-0a99-4d4f-a52c-dc30ac870910?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"5750fb6c-990a-4f4d-a52c-dc30ac870910\",\n \"status\"\ + : \"InProgress\",\n \"startTime\": \"2023-01-10T04:00:42.495534Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '125' + content-type: + - application/json + date: + - Tue, 10 Jan 2023 04:02:13 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --ssh-key-value + User-Agent: + - AZURECLI/2.44.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/21.0.0b + Python/3.10.2 (Linux-5.10.104-linuxkit-x86_64-with) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/6cfb5057-0a99-4d4f-a52c-dc30ac870910?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"5750fb6c-990a-4f4d-a52c-dc30ac870910\",\n \"status\"\ + : \"InProgress\",\n \"startTime\": \"2023-01-10T04:00:42.495534Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '125' + content-type: + - application/json + date: + - Tue, 10 Jan 2023 04:02:43 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --ssh-key-value + User-Agent: + - AZURECLI/2.44.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/21.0.0b + Python/3.10.2 (Linux-5.10.104-linuxkit-x86_64-with) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/6cfb5057-0a99-4d4f-a52c-dc30ac870910?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"5750fb6c-990a-4f4d-a52c-dc30ac870910\",\n \"status\"\ + : \"InProgress\",\n \"startTime\": \"2023-01-10T04:00:42.495534Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '125' + content-type: + - application/json + date: + - Tue, 10 Jan 2023 04:03:13 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --ssh-key-value + User-Agent: + - AZURECLI/2.44.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/21.0.0b + Python/3.10.2 (Linux-5.10.104-linuxkit-x86_64-with) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/6cfb5057-0a99-4d4f-a52c-dc30ac870910?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"5750fb6c-990a-4f4d-a52c-dc30ac870910\",\n \"status\"\ + : \"InProgress\",\n \"startTime\": \"2023-01-10T04:00:42.495534Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '125' + content-type: + - application/json + date: + - Tue, 10 Jan 2023 04:03:43 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --ssh-key-value + User-Agent: + - AZURECLI/2.44.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/21.0.0b + Python/3.10.2 (Linux-5.10.104-linuxkit-x86_64-with) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/6cfb5057-0a99-4d4f-a52c-dc30ac870910?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"5750fb6c-990a-4f4d-a52c-dc30ac870910\",\n \"status\"\ + : \"Succeeded\",\n \"startTime\": \"2023-01-10T04:00:42.495534Z\",\n \"\ + endTime\": \"2023-01-10T04:03:54.3790327Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '169' + content-type: + - application/json + date: + - Tue, 10 Jan 2023 04:04:13 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --ssh-key-value + User-Agent: + - AZURECLI/2.44.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/21.0.0b + Python/3.10.2 (Linux-5.10.104-linuxkit-x86_64-with) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002?api-version=2022-11-02-preview + response: + body: + string: "{\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002\"\ + ,\n \"location\": \"westus2\",\n \"name\": \"cliakstest000002\",\n \"type\"\ + : \"Microsoft.ContainerService/ManagedClusters\",\n \"properties\": {\n \ + \ \"provisioningState\": \"Succeeded\",\n \"powerState\": {\n \"code\"\ + : \"Running\"\n },\n \"kubernetesVersion\": \"1.23.12\",\n \"currentKubernetesVersion\"\ + : \"1.23.12\",\n \"dnsPrefix\": \"cliakstest-clitestmsdswmbyg-8ecadf\",\n\ + \ \"fqdn\": \"cliakstest-clitestmsdswmbyg-8ecadf-b81f0ea5.hcp.westus2.azmk8s.io\"\ + ,\n \"azurePortalFQDN\": \"cliakstest-clitestmsdswmbyg-8ecadf-b81f0ea5.portal.hcp.westus2.azmk8s.io\"\ + ,\n \"agentPoolProfiles\": [\n {\n \"name\": \"nodepool1\",\n \ + \ \"count\": 3,\n \"vmSize\": \"Standard_DS2_v2\",\n \"osDiskSizeGB\"\ + : 128,\n \"osDiskType\": \"Managed\",\n \"kubeletDiskType\": \"OS\"\ + ,\n \"workloadRuntime\": \"OCIContainer\",\n \"maxPods\": 110,\n \ + \ \"type\": \"VirtualMachineScaleSets\",\n \"enableAutoScaling\": false,\n\ + \ \"provisioningState\": \"Succeeded\",\n \"powerState\": {\n \ + \ \"code\": \"Running\"\n },\n \"orchestratorVersion\": \"1.23.12\"\ + ,\n \"currentOrchestratorVersion\": \"1.23.12\",\n \"enableNodePublicIP\"\ + : false,\n \"enableCustomCATrust\": false,\n \"mode\": \"System\"\ + ,\n \"enableEncryptionAtHost\": false,\n \"enableUltraSSD\": false,\n\ + \ \"osType\": \"Linux\",\n \"osSKU\": \"Ubuntu\",\n \"nodeImageVersion\"\ + : \"AKSUbuntu-1804gen2containerd-2022.12.15\",\n \"upgradeSettings\":\ + \ {},\n \"enableFIPS\": false,\n \"networkProfile\": {}\n }\n \ + \ ],\n \"linuxProfile\": {\n \"adminUsername\": \"azureuser\",\n \ + \ \"ssh\": {\n \"publicKeys\": [\n {\n \"keyData\": \"ssh-rsa\ + \ AAAAB3NzaC1yc2EAAAADAQABAAACAQCbIg1guRHbI0lV11wWDt1r2cUdcNd27CJsg+SfgC7miZeubtwUhbsPdhMQsfDyhOWHq1+ZL0M+nJZV63d/1dhmhtgyOqejUwrPlzKhydsbrsdUor+JmNJDdW01v7BXHyuymT8G4s09jCasNOwiufbP/qp72ruu0bIA1nySsvlf9pCQAuFkAnVnf/rFhUlOkhtRpwcq8SUNY2zRHR/EKb/4NWY1JzR4sa3q2fWIJdrrX0DvLoa5g9bIEd4Df79ba7v+yiUBOS0zT2ll+z4g9izHK3EO5d8hL4jYxcjKs+wcslSYRWrascfscLgMlMGh0CdKeNTDjHpGPncaf3Z+FwwwjWeuiNBxv7bJo13/8B/098KlVDl4GZqsoBCEjPyJfV6hO0y/LkRGkk7oHWKgeWAfKtfLItRp00eZ4fcJNK9kCaSMmEugoZWcI7NGbZXzqFWqbpRI7NcDP9+WIQ+i9U5vqWsqd/zng4kbuAJ6UuKqIzB0upYrLShfQE3SAck8oaLhJqqq56VfDuASNpJKidV+zq27HfSBmbXnkR/5AK337dc3MXKJypoK/QPMLKUAP5XLPbs+NddJQV7EZXd29DLgp+fRIg3edpKdO7ZErWhv7d+3Kws+e1Y+ypmR2WIVSwVyBEUfgv2C8Ts9gnTF4pNcEY/S2aBicz5Ew2+jdyGNQQ==\ + \ test@example.com\\n\"\n }\n ]\n }\n },\n \"servicePrincipalProfile\"\ + : {\n \"clientId\":\"00000000-0000-0000-0000-000000000001\"\n },\n \ + \ \"nodeResourceGroup\": \"MC_clitest000001_cliakstest000002_westus2\",\n\ + \ \"enableRBAC\": true,\n \"enablePodSecurityPolicy\": false,\n \"networkProfile\"\ + : {\n \"networkPlugin\": \"kubenet\",\n \"loadBalancerSku\": \"Standard\"\ + ,\n \"loadBalancerProfile\": {\n \"managedOutboundIPs\": {\n \"\ + count\": 1\n },\n \"effectiveOutboundIPs\": [\n {\n \"\ + id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_clitest000001_cliakstest000002_westus2/providers/Microsoft.Network/publicIPAddresses/47645b20-67ab-4b73-ba0c-84b52d356507\"\ + \n }\n ],\n \"backendPoolType\": \"nodeIPConfiguration\"\n \ + \ },\n \"podCidr\": \"10.244.0.0/16\",\n \"serviceCidr\": \"10.0.0.0/16\"\ + ,\n \"dnsServiceIP\": \"10.0.0.10\",\n \"dockerBridgeCidr\": \"172.17.0.1/16\"\ + ,\n \"outboundType\": \"loadBalancer\",\n \"podCidrs\": [\n \"10.244.0.0/16\"\ + \n ],\n \"serviceCidrs\": [\n \"10.0.0.0/16\"\n ],\n \"ipFamilies\"\ + : [\n \"IPv4\"\n ]\n },\n \"maxAgentPools\": 100,\n \"identityProfile\"\ + : {\n \"kubeletidentity\": {\n \"resourceId\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/MC_clitest000001_cliakstest000002_westus2/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cliakstest000002-agentpool\"\ + ,\n \"clientId\":\"00000000-0000-0000-0000-000000000001\",\n \"objectId\"\ + :\"00000000-0000-0000-0000-000000000001\"\n }\n },\n \"disableLocalAccounts\"\ + : false,\n \"securityProfile\": {},\n \"storageProfile\": {\n \"diskCSIDriver\"\ + : {\n \"enabled\": true,\n \"version\": \"v1\"\n },\n \"fileCSIDriver\"\ + : {\n \"enabled\": true\n },\n \"snapshotController\": {\n \"\ + enabled\": true\n }\n },\n \"oidcIssuerProfile\": {\n \"enabled\"\ + : false\n },\n \"workloadAutoScalerProfile\": {}\n },\n \"identity\"\ + : {\n \"type\": \"SystemAssigned\",\n \"principalId\":\"00000000-0000-0000-0000-000000000001\"\ + ,\n \"tenantId\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\"\n },\n \"sku\"\ + : {\n \"name\": \"Basic\",\n \"tier\": \"Free\"\n }\n }" + headers: + cache-control: + - no-cache + content-length: + - '4462' + content-type: + - application/json + date: + - Tue, 10 Jan 2023 04:04:13 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - aks maintenanceconfiguration add + Connection: + - keep-alive + ParameterSetName: + - -g --cluster-name -n --schedule-type --day-of-week --interval-weeks --duration + --utc-offset --start-date --start-time + User-Agent: + - AZURECLI/2.44.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/21.0.0b + Python/3.10.2 (Linux-5.10.104-linuxkit-x86_64-with) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002/maintenanceConfigurations?api-version=2022-11-02-preview + response: + body: + string: "{\n \"value\": []\n }" + headers: + cache-control: + - no-cache + content-length: + - '18' + content-type: + - application/json + date: + - Tue, 10 Jan 2023 04:04:15 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: '{"properties": {"maintenanceWindow": {"schedule": {"weekly": {"intervalWeeks": + 3, "dayOfWeek": "Friday"}}, "durationHours": 8, "utcOffset": "+05:30", "startDate": + "2023-01-20", "startTime": "00:00"}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - aks maintenanceconfiguration add + Connection: + - keep-alive + Content-Length: + - '200' + Content-Type: + - application/json + ParameterSetName: + - -g --cluster-name -n --schedule-type --day-of-week --interval-weeks --duration + --utc-offset --start-date --start-time + User-Agent: + - AZURECLI/2.44.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/21.0.0b + Python/3.10.2 (Linux-5.10.104-linuxkit-x86_64-with) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002/maintenanceConfigurations/aksManagedAutoUpgradeSchedule?api-version=2022-11-02-preview + response: + body: + string: "{\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002/maintenanceConfigurations/aksManagedAutoUpgradeSchedule\"\ + ,\n \"name\": \"aksManagedAutoUpgradeSchedule\",\n \"properties\": {\n \ + \ \"maintenanceWindow\": {\n \"schedule\": {\n \"weekly\": {\n \ + \ \"intervalWeeks\": 3,\n \"dayOfWeek\": \"Friday\"\n }\n },\n\ + \ \"durationHours\": 8,\n \"utcOffset\": \"+05:30\",\n \"startDate\"\ + : \"2023-01-20\",\n \"startTime\": \"00:00\"\n }\n }\n }" + headers: + cache-control: + - no-cache + content-length: + - '528' + content-type: + - application/json + date: + - Tue, 10 Jan 2023 04:04:15 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - aks maintenanceconfiguration add + Connection: + - keep-alive + ParameterSetName: + - -g --cluster-name -n --schedule-type --day-of-week --week-index --interval-months + --duration --start-time --utc-offset --start-date + User-Agent: + - AZURECLI/2.44.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/21.0.0b + Python/3.10.2 (Linux-5.10.104-linuxkit-x86_64-with) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002/maintenanceConfigurations?api-version=2022-11-02-preview + response: + body: + string: "{\n \"value\": [\n {\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002/maintenanceConfigurations/aksManagedAutoUpgradeSchedule\"\ + ,\n \"name\": \"aksManagedAutoUpgradeSchedule\",\n \"properties\": {\n\ + \ \"maintenanceWindow\": {\n \"schedule\": {\n \"weekly\":\ + \ {\n \"intervalWeeks\": 3,\n \"dayOfWeek\": \"Friday\"\n \ + \ }\n },\n \"durationHours\": 8,\n \"utcOffset\": \"+05:30\"\ + ,\n \"startDate\": \"2023-01-20\",\n \"startTime\": \"00:00\"\n\ + \ }\n }\n }\n ]\n }" + headers: + cache-control: + - no-cache + content-length: + - '587' + content-type: + - application/json + date: + - Tue, 10 Jan 2023 04:04:16 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: '{"properties": {"maintenanceWindow": {"schedule": {"relativeMonthly": {"intervalMonths": + 1, "weekIndex": "Last", "dayOfWeek": "Tuesday"}}, "durationHours": 12, "utcOffset": + "-08:00", "startDate": "2023-01-20", "startTime": "09:00"}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - aks maintenanceconfiguration add + Connection: + - keep-alive + Content-Length: + - '233' + Content-Type: + - application/json + ParameterSetName: + - -g --cluster-name -n --schedule-type --day-of-week --week-index --interval-months + --duration --start-time --utc-offset --start-date + User-Agent: + - AZURECLI/2.44.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/21.0.0b + Python/3.10.2 (Linux-5.10.104-linuxkit-x86_64-with) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002/maintenanceConfigurations/aksManagedNodeOSUpgradeSchedule?api-version=2022-11-02-preview + response: + body: + string: "{\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002/maintenanceConfigurations/aksManagedNodeOSUpgradeSchedule\"\ + ,\n \"name\": \"aksManagedNodeOSUpgradeSchedule\",\n \"properties\": {\n\ + \ \"maintenanceWindow\": {\n \"schedule\": {\n \"relativeMonthly\"\ + : {\n \"intervalMonths\": 1,\n \"dayOfWeek\": \"Tuesday\",\n \ + \ \"weekIndex\": \"Last\"\n }\n },\n \"durationHours\": 12,\n\ + \ \"utcOffset\": \"-08:00\",\n \"startDate\": \"2023-01-20\",\n \"\ + startTime\": \"09:00\"\n }\n }\n }" + headers: + cache-control: + - no-cache + content-length: + - '571' + content-type: + - application/json + date: + - Tue, 10 Jan 2023 04:04:17 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - aks maintenanceconfiguration list + Connection: + - keep-alive + ParameterSetName: + - -g --cluster-name + User-Agent: + - AZURECLI/2.44.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/21.0.0b + Python/3.10.2 (Linux-5.10.104-linuxkit-x86_64-with) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002/maintenanceConfigurations?api-version=2022-11-02-preview + response: + body: + string: "{\n \"value\": [\n {\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002/maintenanceConfigurations/aksManagedAutoUpgradeSchedule\"\ + ,\n \"name\": \"aksManagedAutoUpgradeSchedule\",\n \"properties\": {\n\ + \ \"maintenanceWindow\": {\n \"schedule\": {\n \"weekly\":\ + \ {\n \"intervalWeeks\": 3,\n \"dayOfWeek\": \"Friday\"\n \ + \ }\n },\n \"durationHours\": 8,\n \"utcOffset\": \"+05:30\"\ + ,\n \"startDate\": \"2023-01-20\",\n \"startTime\": \"00:00\"\n\ + \ }\n }\n },\n {\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002/maintenanceConfigurations/aksManagedNodeOSUpgradeSchedule\"\ + ,\n \"name\": \"aksManagedNodeOSUpgradeSchedule\",\n \"properties\"\ + : {\n \"maintenanceWindow\": {\n \"schedule\": {\n \"relativeMonthly\"\ + : {\n \"intervalMonths\": 1,\n \"dayOfWeek\": \"Tuesday\",\n\ + \ \"weekIndex\": \"Last\"\n }\n },\n \"durationHours\"\ + : 12,\n \"utcOffset\": \"-08:00\",\n \"startDate\": \"2023-01-20\"\ + ,\n \"startTime\": \"09:00\"\n }\n }\n }\n ]\n }" + headers: + cache-control: + - no-cache + content-length: + - '1199' + content-type: + - application/json + date: + - Tue, 10 Jan 2023 04:04:17 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - aks maintenanceconfiguration update + Connection: + - keep-alive + ParameterSetName: + - -g --cluster-name -n --config-file + User-Agent: + - AZURECLI/2.44.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/21.0.0b + Python/3.10.2 (Linux-5.10.104-linuxkit-x86_64-with) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002/maintenanceConfigurations?api-version=2022-11-02-preview + response: + body: + string: "{\n \"value\": [\n {\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002/maintenanceConfigurations/aksManagedAutoUpgradeSchedule\"\ + ,\n \"name\": \"aksManagedAutoUpgradeSchedule\",\n \"properties\": {\n\ + \ \"maintenanceWindow\": {\n \"schedule\": {\n \"weekly\":\ + \ {\n \"intervalWeeks\": 3,\n \"dayOfWeek\": \"Friday\"\n \ + \ }\n },\n \"durationHours\": 8,\n \"utcOffset\": \"+05:30\"\ + ,\n \"startDate\": \"2023-01-20\",\n \"startTime\": \"00:00\"\n\ + \ }\n }\n },\n {\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002/maintenanceConfigurations/aksManagedNodeOSUpgradeSchedule\"\ + ,\n \"name\": \"aksManagedNodeOSUpgradeSchedule\",\n \"properties\"\ + : {\n \"maintenanceWindow\": {\n \"schedule\": {\n \"relativeMonthly\"\ + : {\n \"intervalMonths\": 1,\n \"dayOfWeek\": \"Tuesday\",\n\ + \ \"weekIndex\": \"Last\"\n }\n },\n \"durationHours\"\ + : 12,\n \"utcOffset\": \"-08:00\",\n \"startDate\": \"2023-01-20\"\ + ,\n \"startTime\": \"09:00\"\n }\n }\n }\n ]\n }" + headers: + cache-control: + - no-cache + content-length: + - '1199' + content-type: + - application/json + date: + - Tue, 10 Jan 2023 04:04:18 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: '{"properties": {"maintenanceWindow": {"schedule": {"absoluteMonthly": {"intervalMonths": + 3, "dayOfMonth": 1}}, "durationHours": 4, "utcOffset": "-08:00", "startTime": + "09:00", "notAllowedDates": [{"start": "2022-12-23", "end": "2023-01-05"}, {"start": + "2023-11-23", "end": "2023-11-26"}]}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - aks maintenanceconfiguration update + Connection: + - keep-alive + Content-Length: + - '290' + Content-Type: + - application/json + ParameterSetName: + - -g --cluster-name -n --config-file + User-Agent: + - AZURECLI/2.44.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/21.0.0b + Python/3.10.2 (Linux-5.10.104-linuxkit-x86_64-with) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002/maintenanceConfigurations/aksManagedAutoUpgradeSchedule?api-version=2022-11-02-preview + response: + body: + string: "{\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002/maintenanceConfigurations/aksManagedAutoUpgradeSchedule\"\ + ,\n \"name\": \"aksManagedAutoUpgradeSchedule\",\n \"properties\": {\n \ + \ \"maintenanceWindow\": {\n \"schedule\": {\n \"absoluteMonthly\"\ + : {\n \"intervalMonths\": 3,\n \"dayOfMonth\": 1\n }\n },\n\ + \ \"durationHours\": 4,\n \"utcOffset\": \"-08:00\",\n \"startDate\"\ + : \"2023-01-09\",\n \"startTime\": \"09:00\",\n \"notAllowedDates\"\ + : [\n {\n \"start\": \"2022-12-23\",\n \"end\": \"2023-01-05\"\ + \n },\n {\n \"start\": \"2023-11-23\",\n \"end\": \"2023-11-26\"\ + \n }\n ]\n }\n }\n }" + headers: + cache-control: + - no-cache + content-length: + - '703' + content-type: + - application/json + date: + - Tue, 10 Jan 2023 04:04:18 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - aks maintenanceconfiguration show + Connection: + - keep-alive + ParameterSetName: + - -g --cluster-name -n + User-Agent: + - AZURECLI/2.44.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/21.0.0b + Python/3.10.2 (Linux-5.10.104-linuxkit-x86_64-with) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002/maintenanceConfigurations/aksManagedAutoUpgradeSchedule?api-version=2022-11-02-preview + response: + body: + string: "{\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002/maintenanceConfigurations/aksManagedAutoUpgradeSchedule\"\ + ,\n \"name\": \"aksManagedAutoUpgradeSchedule\",\n \"properties\": {\n \ + \ \"maintenanceWindow\": {\n \"schedule\": {\n \"absoluteMonthly\"\ + : {\n \"intervalMonths\": 3,\n \"dayOfMonth\": 1\n }\n },\n\ + \ \"durationHours\": 4,\n \"utcOffset\": \"-08:00\",\n \"startDate\"\ + : \"2023-01-09\",\n \"startTime\": \"09:00\",\n \"notAllowedDates\"\ + : [\n {\n \"start\": \"2022-12-23\",\n \"end\": \"2023-01-05\"\ + \n },\n {\n \"start\": \"2023-11-23\",\n \"end\": \"2023-11-26\"\ + \n }\n ]\n }\n }\n }" + headers: + cache-control: + - no-cache + content-length: + - '703' + content-type: + - application/json + date: + - Tue, 10 Jan 2023 04:04:18 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - aks maintenanceconfiguration delete + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - -g --cluster-name -n + User-Agent: + - AZURECLI/2.44.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/21.0.0b + Python/3.10.2 (Linux-5.10.104-linuxkit-x86_64-with) + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002/maintenanceConfigurations/aksManagedAutoUpgradeSchedule?api-version=2022-11-02-preview + response: + body: + string: '' + headers: + cache-control: + - no-cache + content-length: + - '0' + date: + - Tue, 10 Jan 2023 04:04:20 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-deletes: + - '14999' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - aks maintenanceconfiguration delete + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - -g --cluster-name -n + User-Agent: + - AZURECLI/2.44.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/21.0.0b + Python/3.10.2 (Linux-5.10.104-linuxkit-x86_64-with) + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002/maintenanceConfigurations/aksManagedNodeOSUpgradeSchedule?api-version=2022-11-02-preview + response: + body: + string: '' + headers: + cache-control: + - no-cache + content-length: + - '0' + date: + - Tue, 10 Jan 2023 04:04:21 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-deletes: + - '14999' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - aks maintenanceconfiguration list + Connection: + - keep-alive + ParameterSetName: + - -g --cluster-name + User-Agent: + - AZURECLI/2.44.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/21.0.0b + Python/3.10.2 (Linux-5.10.104-linuxkit-x86_64-with) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002/maintenanceConfigurations?api-version=2022-11-02-preview + response: + body: + string: "{\n \"value\": []\n }" + headers: + cache-control: + - no-cache + content-length: + - '18' + content-type: + - application/json + date: + - Tue, 10 Jan 2023 04:04:21 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - aks delete + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - -g -n --yes --no-wait + User-Agent: + - AZURECLI/2.44.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/21.0.0b + Python/3.10.2 (Linux-5.10.104-linuxkit-x86_64-with) + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002?api-version=2022-11-02-preview + response: + body: + string: '' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/b5b67062-c7ab-4087-b06b-be4a7b77dfa6?api-version=2016-03-30 + cache-control: + - no-cache + content-length: + - '0' + date: + - Tue, 10 Jan 2023 04:04:23 GMT + expires: + - '-1' + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operationresults/b5b67062-c7ab-4087-b06b-be4a7b77dfa6?api-version=2016-03-30 + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-deletes: + - '14999' + status: + code: 202 + message: Accepted +version: 1 diff --git a/src/aks-preview/azext_aks_preview/tests/latest/test_aks_commands.py b/src/aks-preview/azext_aks_preview/tests/latest/test_aks_commands.py index b24c0112e21..e77b857ecd2 100644 --- a/src/aks-preview/azext_aks_preview/tests/latest/test_aks_commands.py +++ b/src/aks-preview/azext_aks_preview/tests/latest/test_aks_commands.py @@ -3694,7 +3694,7 @@ def test_aks_enable_utlra_ssd(self, resource_group, resource_group_location): @AllowLargeResponse() @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') - def test_aks_maintenancewindow(self, resource_group, resource_group_location): + def test_aks_maintenancewindow(self, resource_group, resource_group_location): aks_name = self.create_random_name('cliakstest', 16) self.kwargs.update({ 'resource_group': resource_group, From e812c9a221653ab785d03227c5cc0ffbee944a63 Mon Sep 17 00:00:00 2001 From: Thalia Wang Date: Tue, 10 Jan 2023 19:31:50 -0800 Subject: [PATCH 04/10] Remove options list --- src/aks-preview/azext_aks_preview/_params.py | 44 +++--- .../test_aks_maintenancewindow.yaml | 134 +++++++++--------- 2 files changed, 85 insertions(+), 93 deletions(-) diff --git a/src/aks-preview/azext_aks_preview/_params.py b/src/aks-preview/azext_aks_preview/_params.py index 645ffbc0c55..2d835689829 100644 --- a/src/aks-preview/azext_aks_preview/_params.py +++ b/src/aks-preview/azext_aks_preview/_params.py @@ -596,33 +596,25 @@ def load_arguments(self, _): '--config-file'], help='The config json file.', required=False) c.argument('weekday', options_list=[ '--weekday'], help='weekday on which maintenance can happen. e.g. Monday', required=False) - c.argument('start_hour', type=int, options_list=[ - '--start-hour'], help='maintenance start hour of 1 hour window on the weekday. e.g. 1 means 1:00am - 2:00am', required=False) - c.argument('schedule_type', options_list=['--schedule-type'], arg_type=get_enum_type(schedule_types), + c.argument('start_hour', type=int, required=False, options_list=[ + '--start-hour'], help='maintenance start hour of 1 hour window on the weekday. e.g. 1 means 1:00am - 2:00am') + c.argument('schedule_type', arg_type=get_enum_type(schedule_types), help='Schedule type for non-default maintenance configuration.', required=False) - c.argument('interval_days', options_list=['--interval-days'], type=int, - help='The number of days between each set of occurrences for Daily schedule.', required=False) - c.argument('interval_weeks', options_list=['--interval-weeks'], type=int, - help='The number of weeks between each set of occurrences for Weekly schedule.', required=False) - c.argument('interval_months', options_list=['--interval-months'], type=int, - help='The number of months between each set of occurrences for AbsoluteMonthly or RelativeMonthly schedule.', required=False) - c.argument('day_of_week', options_list=['--day-of-week'], - help='Specifies on which day of the week the maintenance occurs for Weekly or RelativeMonthly schedule.', required=False) - c.argument('day_of_month', options_list=['--day-of-month'], - help='Specifies on which date of the month the maintenance occurs for AbsoluteMonthly schedule.', required=False) - c.argument('week_index', options_list=['--week-index'], - arg_type=get_enum_type(week_indexes), - help='Specifies on which instance of the weekday specified in --day-of-week the maintenance occurs for RelativeMonthly schedule.', required=False) - c.argument('duration_hours', options_list=['--duration'], type=int, - help='The length of maintenance window. The value ranges from 4 to 24 hours.', required=False) - c.argument('utc_offset', options_list=[ - '--utc-offset'], validator=validate_utc_offset, help='The UTC offset in format +/-HH:mm. e.g. -08:00 or +05:30.', required=False) - c.argument('start_date', options_list=[ - '--start-date'], validator=validate_start_date, - help='The date the maintenance window activates. e.g. 2023-01-01.', required=False) - c.argument('start_time', options_list=['--start-time'], - validator=validate_start_time, - help='The start time of the maintenance window. e.g. 09:30.', required=False) + c.argument('interval_days', type=int, help='The number of days between each set of occurrences for Daily schedule.', required=False) + c.argument('interval_weeks', type=int, help='The number of weeks between each set of occurrences for Weekly schedule.', required=False) + c.argument('interval_months', type=int, help='The number of months between each set of occurrences for AbsoluteMonthly or RelativeMonthly schedule.', required=False) + c.argument('day_of_week', help='Specifies on which day of the week the maintenance occurs for Weekly or RelativeMonthly schedule.', required=False) + c.argument('day_of_month', help='Specifies on which date of the month the maintenance occurs for AbsoluteMonthly schedule.', required=False) + c.argument('week_index', arg_type=get_enum_type(week_indexes), required=False, + help='Specifies on which instance of the weekday specified in --day-of-week the maintenance occurs for RelativeMonthly schedule.') + c.argument('duration_hours', options_list=['--duration'], type=int, required=False, + help='The length of maintenance window. The value ranges from 4 to 24 hours.') + c.argument('utc_offset', validator=validate_utc_offset, required=False, + help='The UTC offset in format +/-HH:mm. e.g. -08:00 or +05:30.') + c.argument('start_date', validator=validate_start_date, required=False, + help='The date the maintenance window activates. e.g. 2023-01-01.') + c.argument('start_time', validator=validate_start_time, required=False, + help='The start time of the maintenance window. e.g. 09:30.') for scope in ['aks maintenanceconfiguration show', 'aks maintenanceconfiguration delete']: with self.argument_context(scope) as c: diff --git a/src/aks-preview/azext_aks_preview/tests/latest/recordings/test_aks_maintenancewindow.yaml b/src/aks-preview/azext_aks_preview/tests/latest/recordings/test_aks_maintenancewindow.yaml index 6f41481dd17..81b69760e9d 100644 --- a/src/aks-preview/azext_aks_preview/tests/latest/recordings/test_aks_maintenancewindow.yaml +++ b/src/aks-preview/azext_aks_preview/tests/latest/recordings/test_aks_maintenancewindow.yaml @@ -19,7 +19,7 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001?api-version=2021-04-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001","name":"clitest000001","type":"Microsoft.Resources/resourceGroups","location":"westus2","tags":{"product":"azurecli","cause":"automation","date":"2023-01-10T04:00:35Z"},"properties":{"provisioningState":"Succeeded"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001","name":"clitest000001","type":"Microsoft.Resources/resourceGroups","location":"westus2","tags":{"product":"azurecli","cause":"automation","date":"2023-01-11T03:26:23Z"},"properties":{"provisioningState":"Succeeded"}}' headers: cache-control: - no-cache @@ -28,7 +28,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 10 Jan 2023 04:00:36 GMT + - Wed, 11 Jan 2023 03:26:25 GMT expires: - '-1' pragma: @@ -44,7 +44,7 @@ interactions: message: OK - request: body: '{"location": "westus2", "identity": {"type": "SystemAssigned"}, "properties": - {"kubernetesVersion": "", "dnsPrefix": "cliakstest-clitestmsdswmbyg-8ecadf", + {"kubernetesVersion": "", "dnsPrefix": "cliakstest-clitestgzvnw564a-8ecadf", "agentPoolProfiles": [{"count": 3, "vmSize": "Standard_DS2_v2", "osDiskSizeGB": 0, "workloadRuntime": "OCIContainer", "osType": "Linux", "enableAutoScaling": false, "type": "VirtualMachineScaleSets", "mode": "System", "orchestratorVersion": @@ -85,9 +85,9 @@ interactions: : \"Microsoft.ContainerService/ManagedClusters\",\n \"properties\": {\n \ \ \"provisioningState\": \"Creating\",\n \"powerState\": {\n \"code\"\ : \"Running\"\n },\n \"kubernetesVersion\": \"1.23.12\",\n \"currentKubernetesVersion\"\ - : \"1.23.12\",\n \"dnsPrefix\": \"cliakstest-clitestmsdswmbyg-8ecadf\",\n\ - \ \"fqdn\": \"cliakstest-clitestmsdswmbyg-8ecadf-b81f0ea5.hcp.westus2.azmk8s.io\"\ - ,\n \"azurePortalFQDN\": \"cliakstest-clitestmsdswmbyg-8ecadf-b81f0ea5.portal.hcp.westus2.azmk8s.io\"\ + : \"1.23.12\",\n \"dnsPrefix\": \"cliakstest-clitestgzvnw564a-8ecadf\",\n\ + \ \"fqdn\": \"cliakstest-clitestgzvnw564a-8ecadf-7045006e.hcp.westus2.azmk8s.io\"\ + ,\n \"azurePortalFQDN\": \"cliakstest-clitestgzvnw564a-8ecadf-7045006e.portal.hcp.westus2.azmk8s.io\"\ ,\n \"agentPoolProfiles\": [\n {\n \"name\": \"nodepool1\",\n \ \ \"count\": 3,\n \"vmSize\": \"Standard_DS2_v2\",\n \"osDiskSizeGB\"\ : 128,\n \"osDiskType\": \"Managed\",\n \"kubeletDiskType\": \"OS\"\ @@ -126,7 +126,7 @@ interactions: : {\n \"name\": \"Basic\",\n \"tier\": \"Free\"\n }\n }" headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/6cfb5057-0a99-4d4f-a52c-dc30ac870910?api-version=2016-03-30 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/73e7318e-1dda-491b-8cbb-89eb24e1d199?api-version=2016-03-30 cache-control: - no-cache content-length: @@ -134,7 +134,7 @@ interactions: content-type: - application/json date: - - Tue, 10 Jan 2023 04:00:42 GMT + - Wed, 11 Jan 2023 03:26:30 GMT expires: - '-1' pragma: @@ -167,11 +167,11 @@ interactions: - AZURECLI/2.44.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/21.0.0b Python/3.10.2 (Linux-5.10.104-linuxkit-x86_64-with) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/6cfb5057-0a99-4d4f-a52c-dc30ac870910?api-version=2016-03-30 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/73e7318e-1dda-491b-8cbb-89eb24e1d199?api-version=2016-03-30 response: body: - string: "{\n \"name\": \"5750fb6c-990a-4f4d-a52c-dc30ac870910\",\n \"status\"\ - : \"InProgress\",\n \"startTime\": \"2023-01-10T04:00:42.495534Z\"\n }" + string: "{\n \"name\": \"8e31e773-da1d-1b49-8cbb-89eb24e1d199\",\n \"status\"\ + : \"InProgress\",\n \"startTime\": \"2023-01-11T03:26:29.833302Z\"\n }" headers: cache-control: - no-cache @@ -180,7 +180,7 @@ interactions: content-type: - application/json date: - - Tue, 10 Jan 2023 04:01:12 GMT + - Wed, 11 Jan 2023 03:27:00 GMT expires: - '-1' pragma: @@ -215,11 +215,11 @@ interactions: - AZURECLI/2.44.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/21.0.0b Python/3.10.2 (Linux-5.10.104-linuxkit-x86_64-with) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/6cfb5057-0a99-4d4f-a52c-dc30ac870910?api-version=2016-03-30 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/73e7318e-1dda-491b-8cbb-89eb24e1d199?api-version=2016-03-30 response: body: - string: "{\n \"name\": \"5750fb6c-990a-4f4d-a52c-dc30ac870910\",\n \"status\"\ - : \"InProgress\",\n \"startTime\": \"2023-01-10T04:00:42.495534Z\"\n }" + string: "{\n \"name\": \"8e31e773-da1d-1b49-8cbb-89eb24e1d199\",\n \"status\"\ + : \"InProgress\",\n \"startTime\": \"2023-01-11T03:26:29.833302Z\"\n }" headers: cache-control: - no-cache @@ -228,7 +228,7 @@ interactions: content-type: - application/json date: - - Tue, 10 Jan 2023 04:01:42 GMT + - Wed, 11 Jan 2023 03:27:30 GMT expires: - '-1' pragma: @@ -263,11 +263,11 @@ interactions: - AZURECLI/2.44.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/21.0.0b Python/3.10.2 (Linux-5.10.104-linuxkit-x86_64-with) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/6cfb5057-0a99-4d4f-a52c-dc30ac870910?api-version=2016-03-30 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/73e7318e-1dda-491b-8cbb-89eb24e1d199?api-version=2016-03-30 response: body: - string: "{\n \"name\": \"5750fb6c-990a-4f4d-a52c-dc30ac870910\",\n \"status\"\ - : \"InProgress\",\n \"startTime\": \"2023-01-10T04:00:42.495534Z\"\n }" + string: "{\n \"name\": \"8e31e773-da1d-1b49-8cbb-89eb24e1d199\",\n \"status\"\ + : \"InProgress\",\n \"startTime\": \"2023-01-11T03:26:29.833302Z\"\n }" headers: cache-control: - no-cache @@ -276,7 +276,7 @@ interactions: content-type: - application/json date: - - Tue, 10 Jan 2023 04:02:13 GMT + - Wed, 11 Jan 2023 03:28:00 GMT expires: - '-1' pragma: @@ -311,11 +311,11 @@ interactions: - AZURECLI/2.44.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/21.0.0b Python/3.10.2 (Linux-5.10.104-linuxkit-x86_64-with) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/6cfb5057-0a99-4d4f-a52c-dc30ac870910?api-version=2016-03-30 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/73e7318e-1dda-491b-8cbb-89eb24e1d199?api-version=2016-03-30 response: body: - string: "{\n \"name\": \"5750fb6c-990a-4f4d-a52c-dc30ac870910\",\n \"status\"\ - : \"InProgress\",\n \"startTime\": \"2023-01-10T04:00:42.495534Z\"\n }" + string: "{\n \"name\": \"8e31e773-da1d-1b49-8cbb-89eb24e1d199\",\n \"status\"\ + : \"InProgress\",\n \"startTime\": \"2023-01-11T03:26:29.833302Z\"\n }" headers: cache-control: - no-cache @@ -324,7 +324,7 @@ interactions: content-type: - application/json date: - - Tue, 10 Jan 2023 04:02:43 GMT + - Wed, 11 Jan 2023 03:28:30 GMT expires: - '-1' pragma: @@ -359,11 +359,11 @@ interactions: - AZURECLI/2.44.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/21.0.0b Python/3.10.2 (Linux-5.10.104-linuxkit-x86_64-with) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/6cfb5057-0a99-4d4f-a52c-dc30ac870910?api-version=2016-03-30 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/73e7318e-1dda-491b-8cbb-89eb24e1d199?api-version=2016-03-30 response: body: - string: "{\n \"name\": \"5750fb6c-990a-4f4d-a52c-dc30ac870910\",\n \"status\"\ - : \"InProgress\",\n \"startTime\": \"2023-01-10T04:00:42.495534Z\"\n }" + string: "{\n \"name\": \"8e31e773-da1d-1b49-8cbb-89eb24e1d199\",\n \"status\"\ + : \"InProgress\",\n \"startTime\": \"2023-01-11T03:26:29.833302Z\"\n }" headers: cache-control: - no-cache @@ -372,7 +372,7 @@ interactions: content-type: - application/json date: - - Tue, 10 Jan 2023 04:03:13 GMT + - Wed, 11 Jan 2023 03:29:00 GMT expires: - '-1' pragma: @@ -407,11 +407,11 @@ interactions: - AZURECLI/2.44.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/21.0.0b Python/3.10.2 (Linux-5.10.104-linuxkit-x86_64-with) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/6cfb5057-0a99-4d4f-a52c-dc30ac870910?api-version=2016-03-30 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/73e7318e-1dda-491b-8cbb-89eb24e1d199?api-version=2016-03-30 response: body: - string: "{\n \"name\": \"5750fb6c-990a-4f4d-a52c-dc30ac870910\",\n \"status\"\ - : \"InProgress\",\n \"startTime\": \"2023-01-10T04:00:42.495534Z\"\n }" + string: "{\n \"name\": \"8e31e773-da1d-1b49-8cbb-89eb24e1d199\",\n \"status\"\ + : \"InProgress\",\n \"startTime\": \"2023-01-11T03:26:29.833302Z\"\n }" headers: cache-control: - no-cache @@ -420,7 +420,7 @@ interactions: content-type: - application/json date: - - Tue, 10 Jan 2023 04:03:43 GMT + - Wed, 11 Jan 2023 03:29:31 GMT expires: - '-1' pragma: @@ -455,12 +455,12 @@ interactions: - AZURECLI/2.44.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/21.0.0b Python/3.10.2 (Linux-5.10.104-linuxkit-x86_64-with) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/6cfb5057-0a99-4d4f-a52c-dc30ac870910?api-version=2016-03-30 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/73e7318e-1dda-491b-8cbb-89eb24e1d199?api-version=2016-03-30 response: body: - string: "{\n \"name\": \"5750fb6c-990a-4f4d-a52c-dc30ac870910\",\n \"status\"\ - : \"Succeeded\",\n \"startTime\": \"2023-01-10T04:00:42.495534Z\",\n \"\ - endTime\": \"2023-01-10T04:03:54.3790327Z\"\n }" + string: "{\n \"name\": \"8e31e773-da1d-1b49-8cbb-89eb24e1d199\",\n \"status\"\ + : \"Succeeded\",\n \"startTime\": \"2023-01-11T03:26:29.833302Z\",\n \"\ + endTime\": \"2023-01-11T03:29:38.2722962Z\"\n }" headers: cache-control: - no-cache @@ -469,7 +469,7 @@ interactions: content-type: - application/json date: - - Tue, 10 Jan 2023 04:04:13 GMT + - Wed, 11 Jan 2023 03:30:01 GMT expires: - '-1' pragma: @@ -512,9 +512,9 @@ interactions: : \"Microsoft.ContainerService/ManagedClusters\",\n \"properties\": {\n \ \ \"provisioningState\": \"Succeeded\",\n \"powerState\": {\n \"code\"\ : \"Running\"\n },\n \"kubernetesVersion\": \"1.23.12\",\n \"currentKubernetesVersion\"\ - : \"1.23.12\",\n \"dnsPrefix\": \"cliakstest-clitestmsdswmbyg-8ecadf\",\n\ - \ \"fqdn\": \"cliakstest-clitestmsdswmbyg-8ecadf-b81f0ea5.hcp.westus2.azmk8s.io\"\ - ,\n \"azurePortalFQDN\": \"cliakstest-clitestmsdswmbyg-8ecadf-b81f0ea5.portal.hcp.westus2.azmk8s.io\"\ + : \"1.23.12\",\n \"dnsPrefix\": \"cliakstest-clitestgzvnw564a-8ecadf\",\n\ + \ \"fqdn\": \"cliakstest-clitestgzvnw564a-8ecadf-7045006e.hcp.westus2.azmk8s.io\"\ + ,\n \"azurePortalFQDN\": \"cliakstest-clitestgzvnw564a-8ecadf-7045006e.portal.hcp.westus2.azmk8s.io\"\ ,\n \"agentPoolProfiles\": [\n {\n \"name\": \"nodepool1\",\n \ \ \"count\": 3,\n \"vmSize\": \"Standard_DS2_v2\",\n \"osDiskSizeGB\"\ : 128,\n \"osDiskType\": \"Managed\",\n \"kubeletDiskType\": \"OS\"\ @@ -538,7 +538,7 @@ interactions: : {\n \"networkPlugin\": \"kubenet\",\n \"loadBalancerSku\": \"Standard\"\ ,\n \"loadBalancerProfile\": {\n \"managedOutboundIPs\": {\n \"\ count\": 1\n },\n \"effectiveOutboundIPs\": [\n {\n \"\ - id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_clitest000001_cliakstest000002_westus2/providers/Microsoft.Network/publicIPAddresses/47645b20-67ab-4b73-ba0c-84b52d356507\"\ + id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_clitest000001_cliakstest000002_westus2/providers/Microsoft.Network/publicIPAddresses/a6715bf1-2bdd-4237-8069-64a87c792b31\"\ \n }\n ],\n \"backendPoolType\": \"nodeIPConfiguration\"\n \ \ },\n \"podCidr\": \"10.244.0.0/16\",\n \"serviceCidr\": \"10.0.0.0/16\"\ ,\n \"dnsServiceIP\": \"10.0.0.10\",\n \"dockerBridgeCidr\": \"172.17.0.1/16\"\ @@ -564,7 +564,7 @@ interactions: content-type: - application/json date: - - Tue, 10 Jan 2023 04:04:13 GMT + - Wed, 11 Jan 2023 03:30:01 GMT expires: - '-1' pragma: @@ -612,7 +612,7 @@ interactions: content-type: - application/json date: - - Tue, 10 Jan 2023 04:04:15 GMT + - Wed, 11 Jan 2023 03:30:03 GMT expires: - '-1' pragma: @@ -633,7 +633,7 @@ interactions: - request: body: '{"properties": {"maintenanceWindow": {"schedule": {"weekly": {"intervalWeeks": 3, "dayOfWeek": "Friday"}}, "durationHours": 8, "utcOffset": "+05:30", "startDate": - "2023-01-20", "startTime": "00:00"}}}' + "2023-01-21", "startTime": "00:00"}}}' headers: Accept: - application/json @@ -662,7 +662,7 @@ interactions: \ \"maintenanceWindow\": {\n \"schedule\": {\n \"weekly\": {\n \ \ \"intervalWeeks\": 3,\n \"dayOfWeek\": \"Friday\"\n }\n },\n\ \ \"durationHours\": 8,\n \"utcOffset\": \"+05:30\",\n \"startDate\"\ - : \"2023-01-20\",\n \"startTime\": \"00:00\"\n }\n }\n }" + : \"2023-01-21\",\n \"startTime\": \"00:00\"\n }\n }\n }" headers: cache-control: - no-cache @@ -671,7 +671,7 @@ interactions: content-type: - application/json date: - - Tue, 10 Jan 2023 04:04:15 GMT + - Wed, 11 Jan 2023 03:30:04 GMT expires: - '-1' pragma: @@ -717,7 +717,7 @@ interactions: \ \"maintenanceWindow\": {\n \"schedule\": {\n \"weekly\":\ \ {\n \"intervalWeeks\": 3,\n \"dayOfWeek\": \"Friday\"\n \ \ }\n },\n \"durationHours\": 8,\n \"utcOffset\": \"+05:30\"\ - ,\n \"startDate\": \"2023-01-20\",\n \"startTime\": \"00:00\"\n\ + ,\n \"startDate\": \"2023-01-21\",\n \"startTime\": \"00:00\"\n\ \ }\n }\n }\n ]\n }" headers: cache-control: @@ -727,7 +727,7 @@ interactions: content-type: - application/json date: - - Tue, 10 Jan 2023 04:04:16 GMT + - Wed, 11 Jan 2023 03:30:04 GMT expires: - '-1' pragma: @@ -748,7 +748,7 @@ interactions: - request: body: '{"properties": {"maintenanceWindow": {"schedule": {"relativeMonthly": {"intervalMonths": 1, "weekIndex": "Last", "dayOfWeek": "Tuesday"}}, "durationHours": 12, "utcOffset": - "-08:00", "startDate": "2023-01-20", "startTime": "09:00"}}}' + "-08:00", "startDate": "2023-01-21", "startTime": "09:00"}}}' headers: Accept: - application/json @@ -777,7 +777,7 @@ interactions: \ \"maintenanceWindow\": {\n \"schedule\": {\n \"relativeMonthly\"\ : {\n \"intervalMonths\": 1,\n \"dayOfWeek\": \"Tuesday\",\n \ \ \"weekIndex\": \"Last\"\n }\n },\n \"durationHours\": 12,\n\ - \ \"utcOffset\": \"-08:00\",\n \"startDate\": \"2023-01-20\",\n \"\ + \ \"utcOffset\": \"-08:00\",\n \"startDate\": \"2023-01-21\",\n \"\ startTime\": \"09:00\"\n }\n }\n }" headers: cache-control: @@ -787,7 +787,7 @@ interactions: content-type: - application/json date: - - Tue, 10 Jan 2023 04:04:17 GMT + - Wed, 11 Jan 2023 03:30:10 GMT expires: - '-1' pragma: @@ -832,13 +832,13 @@ interactions: \ \"maintenanceWindow\": {\n \"schedule\": {\n \"weekly\":\ \ {\n \"intervalWeeks\": 3,\n \"dayOfWeek\": \"Friday\"\n \ \ }\n },\n \"durationHours\": 8,\n \"utcOffset\": \"+05:30\"\ - ,\n \"startDate\": \"2023-01-20\",\n \"startTime\": \"00:00\"\n\ + ,\n \"startDate\": \"2023-01-21\",\n \"startTime\": \"00:00\"\n\ \ }\n }\n },\n {\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002/maintenanceConfigurations/aksManagedNodeOSUpgradeSchedule\"\ ,\n \"name\": \"aksManagedNodeOSUpgradeSchedule\",\n \"properties\"\ : {\n \"maintenanceWindow\": {\n \"schedule\": {\n \"relativeMonthly\"\ : {\n \"intervalMonths\": 1,\n \"dayOfWeek\": \"Tuesday\",\n\ \ \"weekIndex\": \"Last\"\n }\n },\n \"durationHours\"\ - : 12,\n \"utcOffset\": \"-08:00\",\n \"startDate\": \"2023-01-20\"\ + : 12,\n \"utcOffset\": \"-08:00\",\n \"startDate\": \"2023-01-21\"\ ,\n \"startTime\": \"09:00\"\n }\n }\n }\n ]\n }" headers: cache-control: @@ -848,7 +848,7 @@ interactions: content-type: - application/json date: - - Tue, 10 Jan 2023 04:04:17 GMT + - Wed, 11 Jan 2023 03:30:11 GMT expires: - '-1' pragma: @@ -891,13 +891,13 @@ interactions: \ \"maintenanceWindow\": {\n \"schedule\": {\n \"weekly\":\ \ {\n \"intervalWeeks\": 3,\n \"dayOfWeek\": \"Friday\"\n \ \ }\n },\n \"durationHours\": 8,\n \"utcOffset\": \"+05:30\"\ - ,\n \"startDate\": \"2023-01-20\",\n \"startTime\": \"00:00\"\n\ + ,\n \"startDate\": \"2023-01-21\",\n \"startTime\": \"00:00\"\n\ \ }\n }\n },\n {\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002/maintenanceConfigurations/aksManagedNodeOSUpgradeSchedule\"\ ,\n \"name\": \"aksManagedNodeOSUpgradeSchedule\",\n \"properties\"\ : {\n \"maintenanceWindow\": {\n \"schedule\": {\n \"relativeMonthly\"\ : {\n \"intervalMonths\": 1,\n \"dayOfWeek\": \"Tuesday\",\n\ \ \"weekIndex\": \"Last\"\n }\n },\n \"durationHours\"\ - : 12,\n \"utcOffset\": \"-08:00\",\n \"startDate\": \"2023-01-20\"\ + : 12,\n \"utcOffset\": \"-08:00\",\n \"startDate\": \"2023-01-21\"\ ,\n \"startTime\": \"09:00\"\n }\n }\n }\n ]\n }" headers: cache-control: @@ -907,7 +907,7 @@ interactions: content-type: - application/json date: - - Tue, 10 Jan 2023 04:04:18 GMT + - Wed, 11 Jan 2023 03:30:11 GMT expires: - '-1' pragma: @@ -957,7 +957,7 @@ interactions: \ \"maintenanceWindow\": {\n \"schedule\": {\n \"absoluteMonthly\"\ : {\n \"intervalMonths\": 3,\n \"dayOfMonth\": 1\n }\n },\n\ \ \"durationHours\": 4,\n \"utcOffset\": \"-08:00\",\n \"startDate\"\ - : \"2023-01-09\",\n \"startTime\": \"09:00\",\n \"notAllowedDates\"\ + : \"2023-01-10\",\n \"startTime\": \"09:00\",\n \"notAllowedDates\"\ : [\n {\n \"start\": \"2022-12-23\",\n \"end\": \"2023-01-05\"\ \n },\n {\n \"start\": \"2023-11-23\",\n \"end\": \"2023-11-26\"\ \n }\n ]\n }\n }\n }" @@ -969,7 +969,7 @@ interactions: content-type: - application/json date: - - Tue, 10 Jan 2023 04:04:18 GMT + - Wed, 11 Jan 2023 03:30:12 GMT expires: - '-1' pragma: @@ -1014,7 +1014,7 @@ interactions: \ \"maintenanceWindow\": {\n \"schedule\": {\n \"absoluteMonthly\"\ : {\n \"intervalMonths\": 3,\n \"dayOfMonth\": 1\n }\n },\n\ \ \"durationHours\": 4,\n \"utcOffset\": \"-08:00\",\n \"startDate\"\ - : \"2023-01-09\",\n \"startTime\": \"09:00\",\n \"notAllowedDates\"\ + : \"2023-01-10\",\n \"startTime\": \"09:00\",\n \"notAllowedDates\"\ : [\n {\n \"start\": \"2022-12-23\",\n \"end\": \"2023-01-05\"\ \n },\n {\n \"start\": \"2023-11-23\",\n \"end\": \"2023-11-26\"\ \n }\n ]\n }\n }\n }" @@ -1026,7 +1026,7 @@ interactions: content-type: - application/json date: - - Tue, 10 Jan 2023 04:04:18 GMT + - Wed, 11 Jan 2023 03:30:13 GMT expires: - '-1' pragma: @@ -1073,7 +1073,7 @@ interactions: content-length: - '0' date: - - Tue, 10 Jan 2023 04:04:20 GMT + - Wed, 11 Jan 2023 03:30:14 GMT expires: - '-1' pragma: @@ -1118,7 +1118,7 @@ interactions: content-length: - '0' date: - - Tue, 10 Jan 2023 04:04:21 GMT + - Wed, 11 Jan 2023 03:30:15 GMT expires: - '-1' pragma: @@ -1163,7 +1163,7 @@ interactions: content-type: - application/json date: - - Tue, 10 Jan 2023 04:04:21 GMT + - Wed, 11 Jan 2023 03:30:16 GMT expires: - '-1' pragma: @@ -1206,17 +1206,17 @@ interactions: string: '' headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/b5b67062-c7ab-4087-b06b-be4a7b77dfa6?api-version=2016-03-30 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/8980aac6-52d2-47bb-9d25-bb591de6c4c5?api-version=2016-03-30 cache-control: - no-cache content-length: - '0' date: - - Tue, 10 Jan 2023 04:04:23 GMT + - Wed, 11 Jan 2023 03:30:17 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operationresults/b5b67062-c7ab-4087-b06b-be4a7b77dfa6?api-version=2016-03-30 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operationresults/8980aac6-52d2-47bb-9d25-bb591de6c4c5?api-version=2016-03-30 pragma: - no-cache server: From 017c732a7b5962462b575c1c9a3e8cb6d47beff7 Mon Sep 17 00:00:00 2001 From: Thalia Wang Date: Wed, 11 Jan 2023 21:08:54 -0800 Subject: [PATCH 05/10] Address comments --- src/aks-preview/HISTORY.rst | 4 ++- src/aks-preview/azext_aks_preview/_help.py | 28 +++++++++--------- src/aks-preview/azext_aks_preview/_params.py | 31 +++++++++----------- 3 files changed, 31 insertions(+), 32 deletions(-) diff --git a/src/aks-preview/HISTORY.rst b/src/aks-preview/HISTORY.rst index 9cce8cfa9f0..087618f1537 100644 --- a/src/aks-preview/HISTORY.rst +++ b/src/aks-preview/HISTORY.rst @@ -14,7 +14,9 @@ Pending 0.5.123 +++++++ -* Update command group `az aks maintenanceconfiguration` to enable the creation of *aksManagedAutoUpgradeSchedule* and *aksManagedNodeOSUpgradeSchedule*. +* Update command group `az aks maintenanceconfiguration` to support the creation of dedicated maintenance configurations: + * *aksManagedAutoUpgradeSchedule* for scheduled cluster auto-upgrade + * *aksManagedNodeOSUpgradeSchedule* for scheduled node os auto-upgrade 0.5.122 +++++++ diff --git a/src/aks-preview/azext_aks_preview/_help.py b/src/aks-preview/azext_aks_preview/_help.py index f2390c684c9..7ae02539419 100644 --- a/src/aks-preview/azext_aks_preview/_help.py +++ b/src/aks-preview/azext_aks_preview/_help.py @@ -1086,25 +1086,25 @@ short-summary: The UTC offset in format +/-HH:mm. For example, '+05:30' for IST and '-07:00' for PST. If not specified, the default is '+00:00'. - name: --interval-days type: int - short-summary: Specifies the number of days between each set of occurrences for daily schedule type. + short-summary: The number of days between each set of occurrences for daily schedule type. - name: --interval-weeks type: int - short-summary: Specifies the number of weeks between each set of occurrences. Applicable to weekly schedule types only. + short-summary: The number of weeks between each set of occurrences. Applicable to weekly schedule types only. - name: --interval-months type: int - short-summary: Specifies the number of months between each set of occurrences. Applicable to absolute and relative monthly schedule types. + short-summary: The number of months between each set of occurrences. Applicable to absolute and relative monthly schedule types. - name: --day-of-week type: string - short-summary: Specifies on which day of the week the maintenance occurs. E.g. "Monday". Applicable to weekly and relative monthly schedule types. + short-summary: Specify on which day of the week the maintenance occurs. E.g. "Monday". Applicable to weekly and relative monthly schedule types. - name: --day-of-month type: int - short-summary: Specifies on which day of the month the maintenance occurs. E.g. 1 indicates the 1st of the month. Applicable to absolute monthly schedule type only. + short-summary: Specify on which day of the month the maintenance occurs. E.g. 1 indicates the 1st of the month. Applicable to absolute monthly schedule type only. - name: --week-index type: string - short-summary: Specifies on which instance of the allowed days specified in '--day-of-week' the maintenance occurs. Applicable to relative monthly schedule type only. + short-summary: Specify on which instance of the allowed days specified in '--day-of-week' the maintenance occurs. Applicable to relative monthly schedule type only. - name: --config-file type: string - short-summary: the maintenance configuration json file. + short-summary: The maintenance configuration json file. examples: - name: Add default maintenance configuration with --weekday and --start-hour. text: | @@ -1220,25 +1220,25 @@ short-summary: The UTC offset in format +/-HH:mm. For example, '+05:30' for IST and '-07:00' for PST. If not specified, the default is '+00:00'. - name: --interval-days type: int - short-summary: Specifies the number of days between each set of occurrences for daily schedule type. + short-summary: The number of days between each set of occurrences for daily schedule type. - name: --interval-weeks type: int - short-summary: Specifies the number of weeks between each set of occurrences. Applicable to weekly schedule types only. + short-summary: The number of weeks between each set of occurrences. Applicable to weekly schedule types only. - name: --interval-months type: int - short-summary: Specifies the number of months between each set of occurrences. Applicable to absolute and relative monthly schedule types. + short-summary: The number of months between each set of occurrences. Applicable to absolute and relative monthly schedule types. - name: --day-of-week type: string - short-summary: Specifies on which day of the week the maintenance occurs. E.g. "Monday". Applicable to weekly and relative monthly schedule types. + short-summary: Specify on which day of the week the maintenance occurs. E.g. "Monday". Applicable to weekly and relative monthly schedule types. - name: --day-of-month type: int - short-summary: Specifies on which day of the month the maintenance occurs. E.g. 1 indicates the 1st of the month. Applicable to absolute monthly schedule type only. + short-summary: Specify on which day of the month the maintenance occurs. E.g. 1 indicates the 1st of the month. Applicable to absolute monthly schedule type only. - name: --week-index type: string - short-summary: Specifies on which instance of the allowed days specified in '--day-of-week' the maintenance occurs. Applicable to relative monthly schedule type only. + short-summary: Specify on which instance of the allowed days specified in '--day-of-week' the maintenance occurs. Applicable to relative monthly schedule type only. - name: --config-file type: string - short-summary: the maintenance configuration json file. + short-summary: The maintenance configuration json file. examples: - name: Update default maintenance configuration with --weekday and --start-hour. text: | diff --git a/src/aks-preview/azext_aks_preview/_params.py b/src/aks-preview/azext_aks_preview/_params.py index 2d835689829..7bdc7d3348b 100644 --- a/src/aks-preview/azext_aks_preview/_params.py +++ b/src/aks-preview/azext_aks_preview/_params.py @@ -592,28 +592,25 @@ def load_arguments(self, _): with self.argument_context(scope) as c: c.argument('config_name', options_list=[ '--name', '-n'], help='The config name.') - c.argument('config_file', options_list=[ - '--config-file'], help='The config json file.', required=False) - c.argument('weekday', options_list=[ - '--weekday'], help='weekday on which maintenance can happen. e.g. Monday', required=False) - c.argument('start_hour', type=int, required=False, options_list=[ - '--start-hour'], help='maintenance start hour of 1 hour window on the weekday. e.g. 1 means 1:00am - 2:00am') + c.argument('config_file', help='The config json file.') + c.argument('weekday', help='weekday on which maintenance can happen. e.g. Monday') + c.argument('start_hour', type=int, help='maintenance start hour of 1 hour window on the weekday. e.g. 1 means 1:00am - 2:00am') c.argument('schedule_type', arg_type=get_enum_type(schedule_types), - help='Schedule type for non-default maintenance configuration.', required=False) - c.argument('interval_days', type=int, help='The number of days between each set of occurrences for Daily schedule.', required=False) - c.argument('interval_weeks', type=int, help='The number of weeks between each set of occurrences for Weekly schedule.', required=False) - c.argument('interval_months', type=int, help='The number of months between each set of occurrences for AbsoluteMonthly or RelativeMonthly schedule.', required=False) - c.argument('day_of_week', help='Specifies on which day of the week the maintenance occurs for Weekly or RelativeMonthly schedule.', required=False) - c.argument('day_of_month', help='Specifies on which date of the month the maintenance occurs for AbsoluteMonthly schedule.', required=False) - c.argument('week_index', arg_type=get_enum_type(week_indexes), required=False, + help='Schedule type for non-default maintenance configuration.') + c.argument('interval_days', type=int, help='The number of days between each set of occurrences for Daily schedule.') + c.argument('interval_weeks', type=int, help='The number of weeks between each set of occurrences for Weekly schedule.') + c.argument('interval_months', type=int, help='The number of months between each set of occurrences for AbsoluteMonthly or RelativeMonthly schedule.') + c.argument('day_of_week', help='Specifies on which day of the week the maintenance occurs for Weekly or RelativeMonthly schedule.') + c.argument('day_of_month', help='Specifies on which date of the month the maintenance occurs for AbsoluteMonthly schedule.') + c.argument('week_index', arg_type=get_enum_type(week_indexes), help='Specifies on which instance of the weekday specified in --day-of-week the maintenance occurs for RelativeMonthly schedule.') - c.argument('duration_hours', options_list=['--duration'], type=int, required=False, + c.argument('duration_hours', options_list=['--duration'], type=int, help='The length of maintenance window. The value ranges from 4 to 24 hours.') - c.argument('utc_offset', validator=validate_utc_offset, required=False, + c.argument('utc_offset', validator=validate_utc_offset, help='The UTC offset in format +/-HH:mm. e.g. -08:00 or +05:30.') - c.argument('start_date', validator=validate_start_date, required=False, + c.argument('start_date', validator=validate_start_date, help='The date the maintenance window activates. e.g. 2023-01-01.') - c.argument('start_time', validator=validate_start_time, required=False, + c.argument('start_time', validator=validate_start_time, help='The start time of the maintenance window. e.g. 09:30.') for scope in ['aks maintenanceconfiguration show', 'aks maintenanceconfiguration delete']: From 104b9993247b85d2fa90c971435c862280d7d1e0 Mon Sep 17 00:00:00 2001 From: Thalia Wang Date: Wed, 11 Jan 2023 21:56:11 -0800 Subject: [PATCH 06/10] Fx --- src/aks-preview/azext_aks_preview/_params.py | 28 +- .../test_aks_maintenancewindow.yaml | 1496 ++++++++++++++++- 2 files changed, 1434 insertions(+), 90 deletions(-) diff --git a/src/aks-preview/azext_aks_preview/_params.py b/src/aks-preview/azext_aks_preview/_params.py index 7bdc7d3348b..ea3b61f03cd 100644 --- a/src/aks-preview/azext_aks_preview/_params.py +++ b/src/aks-preview/azext_aks_preview/_params.py @@ -592,25 +592,25 @@ def load_arguments(self, _): with self.argument_context(scope) as c: c.argument('config_name', options_list=[ '--name', '-n'], help='The config name.') - c.argument('config_file', help='The config json file.') - c.argument('weekday', help='weekday on which maintenance can happen. e.g. Monday') - c.argument('start_hour', type=int, help='maintenance start hour of 1 hour window on the weekday. e.g. 1 means 1:00am - 2:00am') - c.argument('schedule_type', arg_type=get_enum_type(schedule_types), + c.argument('config_file', help='The config json file.', required=False) + c.argument('weekday', help='weekday on which maintenance can happen. e.g. Monday', required=False) + c.argument('start_hour', type=int, help='maintenance start hour of 1 hour window on the weekday. e.g. 1 means 1:00am - 2:00am', required=False) + c.argument('schedule_type', arg_type=get_enum_type(schedule_types), required=False, help='Schedule type for non-default maintenance configuration.') - c.argument('interval_days', type=int, help='The number of days between each set of occurrences for Daily schedule.') - c.argument('interval_weeks', type=int, help='The number of weeks between each set of occurrences for Weekly schedule.') - c.argument('interval_months', type=int, help='The number of months between each set of occurrences for AbsoluteMonthly or RelativeMonthly schedule.') - c.argument('day_of_week', help='Specifies on which day of the week the maintenance occurs for Weekly or RelativeMonthly schedule.') - c.argument('day_of_month', help='Specifies on which date of the month the maintenance occurs for AbsoluteMonthly schedule.') - c.argument('week_index', arg_type=get_enum_type(week_indexes), + c.argument('interval_days', type=int, help='The number of days between each set of occurrences for Daily schedule.', required=False) + c.argument('interval_weeks', type=int, help='The number of weeks between each set of occurrences for Weekly schedule.', required=False) + c.argument('interval_months', type=int, help='The number of months between each set of occurrences for AbsoluteMonthly or RelativeMonthly schedule.', required=False) + c.argument('day_of_week', help='Specifies on which day of the week the maintenance occurs for Weekly or RelativeMonthly schedule.', required=False) + c.argument('day_of_month', help='Specifies on which date of the month the maintenance occurs for AbsoluteMonthly schedule.', required=False) + c.argument('week_index', arg_type=get_enum_type(week_indexes), required=False, help='Specifies on which instance of the weekday specified in --day-of-week the maintenance occurs for RelativeMonthly schedule.') - c.argument('duration_hours', options_list=['--duration'], type=int, + c.argument('duration_hours', options_list=['--duration'], type=int, required=False, help='The length of maintenance window. The value ranges from 4 to 24 hours.') - c.argument('utc_offset', validator=validate_utc_offset, + c.argument('utc_offset', validator=validate_utc_offset, required=False, help='The UTC offset in format +/-HH:mm. e.g. -08:00 or +05:30.') - c.argument('start_date', validator=validate_start_date, + c.argument('start_date', validator=validate_start_date, required=False, help='The date the maintenance window activates. e.g. 2023-01-01.') - c.argument('start_time', validator=validate_start_time, + c.argument('start_time', validator=validate_start_time, required=False, help='The start time of the maintenance window. e.g. 09:30.') for scope in ['aks maintenanceconfiguration show', 'aks maintenanceconfiguration delete']: diff --git a/src/aks-preview/azext_aks_preview/tests/latest/recordings/test_aks_maintenancewindow.yaml b/src/aks-preview/azext_aks_preview/tests/latest/recordings/test_aks_maintenancewindow.yaml index 81b69760e9d..25ae9e07f23 100644 --- a/src/aks-preview/azext_aks_preview/tests/latest/recordings/test_aks_maintenancewindow.yaml +++ b/src/aks-preview/azext_aks_preview/tests/latest/recordings/test_aks_maintenancewindow.yaml @@ -19,7 +19,7 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001?api-version=2021-04-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001","name":"clitest000001","type":"Microsoft.Resources/resourceGroups","location":"westus2","tags":{"product":"azurecli","cause":"automation","date":"2023-01-11T03:26:23Z"},"properties":{"provisioningState":"Succeeded"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001","name":"clitest000001","type":"Microsoft.Resources/resourceGroups","location":"westus2","tags":{"product":"azurecli","cause":"automation","date":"2023-01-12T05:38:04Z"},"properties":{"provisioningState":"Succeeded"}}' headers: cache-control: - no-cache @@ -28,7 +28,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Wed, 11 Jan 2023 03:26:25 GMT + - Thu, 12 Jan 2023 05:38:05 GMT expires: - '-1' pragma: @@ -44,7 +44,7 @@ interactions: message: OK - request: body: '{"location": "westus2", "identity": {"type": "SystemAssigned"}, "properties": - {"kubernetesVersion": "", "dnsPrefix": "cliakstest-clitestgzvnw564a-8ecadf", + {"kubernetesVersion": "", "dnsPrefix": "cliakstest-clitestlteu5piy7-8ecadf", "agentPoolProfiles": [{"count": 3, "vmSize": "Standard_DS2_v2", "osDiskSizeGB": 0, "workloadRuntime": "OCIContainer", "osType": "Linux", "enableAutoScaling": false, "type": "VirtualMachineScaleSets", "mode": "System", "orchestratorVersion": @@ -85,9 +85,9 @@ interactions: : \"Microsoft.ContainerService/ManagedClusters\",\n \"properties\": {\n \ \ \"provisioningState\": \"Creating\",\n \"powerState\": {\n \"code\"\ : \"Running\"\n },\n \"kubernetesVersion\": \"1.23.12\",\n \"currentKubernetesVersion\"\ - : \"1.23.12\",\n \"dnsPrefix\": \"cliakstest-clitestgzvnw564a-8ecadf\",\n\ - \ \"fqdn\": \"cliakstest-clitestgzvnw564a-8ecadf-7045006e.hcp.westus2.azmk8s.io\"\ - ,\n \"azurePortalFQDN\": \"cliakstest-clitestgzvnw564a-8ecadf-7045006e.portal.hcp.westus2.azmk8s.io\"\ + : \"1.23.12\",\n \"dnsPrefix\": \"cliakstest-clitestlteu5piy7-8ecadf\",\n\ + \ \"fqdn\": \"cliakstest-clitestlteu5piy7-8ecadf-e45cd01c.hcp.westus2.azmk8s.io\"\ + ,\n \"azurePortalFQDN\": \"cliakstest-clitestlteu5piy7-8ecadf-e45cd01c.portal.hcp.westus2.azmk8s.io\"\ ,\n \"agentPoolProfiles\": [\n {\n \"name\": \"nodepool1\",\n \ \ \"count\": 3,\n \"vmSize\": \"Standard_DS2_v2\",\n \"osDiskSizeGB\"\ : 128,\n \"osDiskType\": \"Managed\",\n \"kubeletDiskType\": \"OS\"\ @@ -99,7 +99,7 @@ interactions: : false,\n \"enableCustomCATrust\": false,\n \"mode\": \"System\"\ ,\n \"enableEncryptionAtHost\": false,\n \"enableUltraSSD\": false,\n\ \ \"osType\": \"Linux\",\n \"osSKU\": \"Ubuntu\",\n \"nodeImageVersion\"\ - : \"AKSUbuntu-1804gen2containerd-2022.12.15\",\n \"upgradeSettings\":\ + : \"AKSUbuntu-1804gen2containerd-2022.12.19\",\n \"upgradeSettings\":\ \ {},\n \"enableFIPS\": false,\n \"networkProfile\": {}\n }\n \ \ ],\n \"linuxProfile\": {\n \"adminUsername\": \"azureuser\",\n \ \ \"ssh\": {\n \"publicKeys\": [\n {\n \"keyData\": \"ssh-rsa\ @@ -126,7 +126,7 @@ interactions: : {\n \"name\": \"Basic\",\n \"tier\": \"Free\"\n }\n }" headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/73e7318e-1dda-491b-8cbb-89eb24e1d199?api-version=2016-03-30 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/925be499-3335-46a6-9987-e36f226af67a?api-version=2016-03-30 cache-control: - no-cache content-length: @@ -134,7 +134,7 @@ interactions: content-type: - application/json date: - - Wed, 11 Jan 2023 03:26:30 GMT + - Thu, 12 Jan 2023 05:38:11 GMT expires: - '-1' pragma: @@ -167,20 +167,20 @@ interactions: - AZURECLI/2.44.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/21.0.0b Python/3.10.2 (Linux-5.10.104-linuxkit-x86_64-with) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/73e7318e-1dda-491b-8cbb-89eb24e1d199?api-version=2016-03-30 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/925be499-3335-46a6-9987-e36f226af67a?api-version=2016-03-30 response: body: - string: "{\n \"name\": \"8e31e773-da1d-1b49-8cbb-89eb24e1d199\",\n \"status\"\ - : \"InProgress\",\n \"startTime\": \"2023-01-11T03:26:29.833302Z\"\n }" + string: "{\n \"name\": \"99e45b92-3533-a646-9987-e36f226af67a\",\n \"status\"\ + : \"InProgress\",\n \"startTime\": \"2023-01-12T05:38:11.6004171Z\"\n }" headers: cache-control: - no-cache content-length: - - '125' + - '126' content-type: - application/json date: - - Wed, 11 Jan 2023 03:27:00 GMT + - Thu, 12 Jan 2023 05:38:41 GMT expires: - '-1' pragma: @@ -215,20 +215,20 @@ interactions: - AZURECLI/2.44.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/21.0.0b Python/3.10.2 (Linux-5.10.104-linuxkit-x86_64-with) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/73e7318e-1dda-491b-8cbb-89eb24e1d199?api-version=2016-03-30 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/925be499-3335-46a6-9987-e36f226af67a?api-version=2016-03-30 response: body: - string: "{\n \"name\": \"8e31e773-da1d-1b49-8cbb-89eb24e1d199\",\n \"status\"\ - : \"InProgress\",\n \"startTime\": \"2023-01-11T03:26:29.833302Z\"\n }" + string: "{\n \"name\": \"99e45b92-3533-a646-9987-e36f226af67a\",\n \"status\"\ + : \"InProgress\",\n \"startTime\": \"2023-01-12T05:38:11.6004171Z\"\n }" headers: cache-control: - no-cache content-length: - - '125' + - '126' content-type: - application/json date: - - Wed, 11 Jan 2023 03:27:30 GMT + - Thu, 12 Jan 2023 05:39:11 GMT expires: - '-1' pragma: @@ -263,20 +263,20 @@ interactions: - AZURECLI/2.44.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/21.0.0b Python/3.10.2 (Linux-5.10.104-linuxkit-x86_64-with) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/73e7318e-1dda-491b-8cbb-89eb24e1d199?api-version=2016-03-30 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/925be499-3335-46a6-9987-e36f226af67a?api-version=2016-03-30 response: body: - string: "{\n \"name\": \"8e31e773-da1d-1b49-8cbb-89eb24e1d199\",\n \"status\"\ - : \"InProgress\",\n \"startTime\": \"2023-01-11T03:26:29.833302Z\"\n }" + string: "{\n \"name\": \"99e45b92-3533-a646-9987-e36f226af67a\",\n \"status\"\ + : \"InProgress\",\n \"startTime\": \"2023-01-12T05:38:11.6004171Z\"\n }" headers: cache-control: - no-cache content-length: - - '125' + - '126' content-type: - application/json date: - - Wed, 11 Jan 2023 03:28:00 GMT + - Thu, 12 Jan 2023 05:39:41 GMT expires: - '-1' pragma: @@ -311,20 +311,20 @@ interactions: - AZURECLI/2.44.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/21.0.0b Python/3.10.2 (Linux-5.10.104-linuxkit-x86_64-with) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/73e7318e-1dda-491b-8cbb-89eb24e1d199?api-version=2016-03-30 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/925be499-3335-46a6-9987-e36f226af67a?api-version=2016-03-30 response: body: - string: "{\n \"name\": \"8e31e773-da1d-1b49-8cbb-89eb24e1d199\",\n \"status\"\ - : \"InProgress\",\n \"startTime\": \"2023-01-11T03:26:29.833302Z\"\n }" + string: "{\n \"name\": \"99e45b92-3533-a646-9987-e36f226af67a\",\n \"status\"\ + : \"InProgress\",\n \"startTime\": \"2023-01-12T05:38:11.6004171Z\"\n }" headers: cache-control: - no-cache content-length: - - '125' + - '126' content-type: - application/json date: - - Wed, 11 Jan 2023 03:28:30 GMT + - Thu, 12 Jan 2023 05:40:11 GMT expires: - '-1' pragma: @@ -359,20 +359,20 @@ interactions: - AZURECLI/2.44.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/21.0.0b Python/3.10.2 (Linux-5.10.104-linuxkit-x86_64-with) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/73e7318e-1dda-491b-8cbb-89eb24e1d199?api-version=2016-03-30 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/925be499-3335-46a6-9987-e36f226af67a?api-version=2016-03-30 response: body: - string: "{\n \"name\": \"8e31e773-da1d-1b49-8cbb-89eb24e1d199\",\n \"status\"\ - : \"InProgress\",\n \"startTime\": \"2023-01-11T03:26:29.833302Z\"\n }" + string: "{\n \"name\": \"99e45b92-3533-a646-9987-e36f226af67a\",\n \"status\"\ + : \"InProgress\",\n \"startTime\": \"2023-01-12T05:38:11.6004171Z\"\n }" headers: cache-control: - no-cache content-length: - - '125' + - '126' content-type: - application/json date: - - Wed, 11 Jan 2023 03:29:00 GMT + - Thu, 12 Jan 2023 05:40:41 GMT expires: - '-1' pragma: @@ -407,20 +407,20 @@ interactions: - AZURECLI/2.44.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/21.0.0b Python/3.10.2 (Linux-5.10.104-linuxkit-x86_64-with) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/73e7318e-1dda-491b-8cbb-89eb24e1d199?api-version=2016-03-30 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/925be499-3335-46a6-9987-e36f226af67a?api-version=2016-03-30 response: body: - string: "{\n \"name\": \"8e31e773-da1d-1b49-8cbb-89eb24e1d199\",\n \"status\"\ - : \"InProgress\",\n \"startTime\": \"2023-01-11T03:26:29.833302Z\"\n }" + string: "{\n \"name\": \"99e45b92-3533-a646-9987-e36f226af67a\",\n \"status\"\ + : \"InProgress\",\n \"startTime\": \"2023-01-12T05:38:11.6004171Z\"\n }" headers: cache-control: - no-cache content-length: - - '125' + - '126' content-type: - application/json date: - - Wed, 11 Jan 2023 03:29:31 GMT + - Thu, 12 Jan 2023 05:41:12 GMT expires: - '-1' pragma: @@ -455,21 +455,1365 @@ interactions: - AZURECLI/2.44.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/21.0.0b Python/3.10.2 (Linux-5.10.104-linuxkit-x86_64-with) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/73e7318e-1dda-491b-8cbb-89eb24e1d199?api-version=2016-03-30 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/925be499-3335-46a6-9987-e36f226af67a?api-version=2016-03-30 response: body: - string: "{\n \"name\": \"8e31e773-da1d-1b49-8cbb-89eb24e1d199\",\n \"status\"\ - : \"Succeeded\",\n \"startTime\": \"2023-01-11T03:26:29.833302Z\",\n \"\ - endTime\": \"2023-01-11T03:29:38.2722962Z\"\n }" + string: "{\n \"name\": \"99e45b92-3533-a646-9987-e36f226af67a\",\n \"status\"\ + : \"InProgress\",\n \"startTime\": \"2023-01-12T05:38:11.6004171Z\"\n }" headers: cache-control: - no-cache content-length: - - '169' + - '126' content-type: - application/json date: - - Wed, 11 Jan 2023 03:30:01 GMT + - Thu, 12 Jan 2023 05:41:42 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --ssh-key-value + User-Agent: + - AZURECLI/2.44.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/21.0.0b + Python/3.10.2 (Linux-5.10.104-linuxkit-x86_64-with) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/925be499-3335-46a6-9987-e36f226af67a?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"99e45b92-3533-a646-9987-e36f226af67a\",\n \"status\"\ + : \"InProgress\",\n \"startTime\": \"2023-01-12T05:38:11.6004171Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Thu, 12 Jan 2023 05:42:12 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --ssh-key-value + User-Agent: + - AZURECLI/2.44.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/21.0.0b + Python/3.10.2 (Linux-5.10.104-linuxkit-x86_64-with) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/925be499-3335-46a6-9987-e36f226af67a?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"99e45b92-3533-a646-9987-e36f226af67a\",\n \"status\"\ + : \"InProgress\",\n \"startTime\": \"2023-01-12T05:38:11.6004171Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Thu, 12 Jan 2023 05:42:42 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --ssh-key-value + User-Agent: + - AZURECLI/2.44.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/21.0.0b + Python/3.10.2 (Linux-5.10.104-linuxkit-x86_64-with) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/925be499-3335-46a6-9987-e36f226af67a?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"99e45b92-3533-a646-9987-e36f226af67a\",\n \"status\"\ + : \"InProgress\",\n \"startTime\": \"2023-01-12T05:38:11.6004171Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Thu, 12 Jan 2023 05:43:12 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --ssh-key-value + User-Agent: + - AZURECLI/2.44.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/21.0.0b + Python/3.10.2 (Linux-5.10.104-linuxkit-x86_64-with) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/925be499-3335-46a6-9987-e36f226af67a?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"99e45b92-3533-a646-9987-e36f226af67a\",\n \"status\"\ + : \"InProgress\",\n \"startTime\": \"2023-01-12T05:38:11.6004171Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Thu, 12 Jan 2023 05:43:42 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --ssh-key-value + User-Agent: + - AZURECLI/2.44.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/21.0.0b + Python/3.10.2 (Linux-5.10.104-linuxkit-x86_64-with) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/925be499-3335-46a6-9987-e36f226af67a?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"99e45b92-3533-a646-9987-e36f226af67a\",\n \"status\"\ + : \"InProgress\",\n \"startTime\": \"2023-01-12T05:38:11.6004171Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Thu, 12 Jan 2023 05:44:13 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --ssh-key-value + User-Agent: + - AZURECLI/2.44.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/21.0.0b + Python/3.10.2 (Linux-5.10.104-linuxkit-x86_64-with) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/925be499-3335-46a6-9987-e36f226af67a?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"99e45b92-3533-a646-9987-e36f226af67a\",\n \"status\"\ + : \"InProgress\",\n \"startTime\": \"2023-01-12T05:38:11.6004171Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Thu, 12 Jan 2023 05:44:43 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --ssh-key-value + User-Agent: + - AZURECLI/2.44.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/21.0.0b + Python/3.10.2 (Linux-5.10.104-linuxkit-x86_64-with) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/925be499-3335-46a6-9987-e36f226af67a?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"99e45b92-3533-a646-9987-e36f226af67a\",\n \"status\"\ + : \"InProgress\",\n \"startTime\": \"2023-01-12T05:38:11.6004171Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Thu, 12 Jan 2023 05:45:13 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --ssh-key-value + User-Agent: + - AZURECLI/2.44.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/21.0.0b + Python/3.10.2 (Linux-5.10.104-linuxkit-x86_64-with) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/925be499-3335-46a6-9987-e36f226af67a?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"99e45b92-3533-a646-9987-e36f226af67a\",\n \"status\"\ + : \"InProgress\",\n \"startTime\": \"2023-01-12T05:38:11.6004171Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Thu, 12 Jan 2023 05:45:43 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --ssh-key-value + User-Agent: + - AZURECLI/2.44.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/21.0.0b + Python/3.10.2 (Linux-5.10.104-linuxkit-x86_64-with) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/925be499-3335-46a6-9987-e36f226af67a?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"99e45b92-3533-a646-9987-e36f226af67a\",\n \"status\"\ + : \"InProgress\",\n \"startTime\": \"2023-01-12T05:38:11.6004171Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Thu, 12 Jan 2023 05:46:13 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --ssh-key-value + User-Agent: + - AZURECLI/2.44.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/21.0.0b + Python/3.10.2 (Linux-5.10.104-linuxkit-x86_64-with) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/925be499-3335-46a6-9987-e36f226af67a?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"99e45b92-3533-a646-9987-e36f226af67a\",\n \"status\"\ + : \"InProgress\",\n \"startTime\": \"2023-01-12T05:38:11.6004171Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Thu, 12 Jan 2023 05:46:43 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --ssh-key-value + User-Agent: + - AZURECLI/2.44.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/21.0.0b + Python/3.10.2 (Linux-5.10.104-linuxkit-x86_64-with) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/925be499-3335-46a6-9987-e36f226af67a?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"99e45b92-3533-a646-9987-e36f226af67a\",\n \"status\"\ + : \"InProgress\",\n \"startTime\": \"2023-01-12T05:38:11.6004171Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Thu, 12 Jan 2023 05:47:13 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --ssh-key-value + User-Agent: + - AZURECLI/2.44.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/21.0.0b + Python/3.10.2 (Linux-5.10.104-linuxkit-x86_64-with) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/925be499-3335-46a6-9987-e36f226af67a?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"99e45b92-3533-a646-9987-e36f226af67a\",\n \"status\"\ + : \"InProgress\",\n \"startTime\": \"2023-01-12T05:38:11.6004171Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Thu, 12 Jan 2023 05:47:43 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --ssh-key-value + User-Agent: + - AZURECLI/2.44.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/21.0.0b + Python/3.10.2 (Linux-5.10.104-linuxkit-x86_64-with) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/925be499-3335-46a6-9987-e36f226af67a?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"99e45b92-3533-a646-9987-e36f226af67a\",\n \"status\"\ + : \"InProgress\",\n \"startTime\": \"2023-01-12T05:38:11.6004171Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Thu, 12 Jan 2023 05:48:13 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --ssh-key-value + User-Agent: + - AZURECLI/2.44.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/21.0.0b + Python/3.10.2 (Linux-5.10.104-linuxkit-x86_64-with) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/925be499-3335-46a6-9987-e36f226af67a?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"99e45b92-3533-a646-9987-e36f226af67a\",\n \"status\"\ + : \"InProgress\",\n \"startTime\": \"2023-01-12T05:38:11.6004171Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Thu, 12 Jan 2023 05:48:43 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --ssh-key-value + User-Agent: + - AZURECLI/2.44.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/21.0.0b + Python/3.10.2 (Linux-5.10.104-linuxkit-x86_64-with) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/925be499-3335-46a6-9987-e36f226af67a?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"99e45b92-3533-a646-9987-e36f226af67a\",\n \"status\"\ + : \"InProgress\",\n \"startTime\": \"2023-01-12T05:38:11.6004171Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Thu, 12 Jan 2023 05:49:13 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --ssh-key-value + User-Agent: + - AZURECLI/2.44.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/21.0.0b + Python/3.10.2 (Linux-5.10.104-linuxkit-x86_64-with) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/925be499-3335-46a6-9987-e36f226af67a?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"99e45b92-3533-a646-9987-e36f226af67a\",\n \"status\"\ + : \"InProgress\",\n \"startTime\": \"2023-01-12T05:38:11.6004171Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Thu, 12 Jan 2023 05:49:44 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --ssh-key-value + User-Agent: + - AZURECLI/2.44.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/21.0.0b + Python/3.10.2 (Linux-5.10.104-linuxkit-x86_64-with) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/925be499-3335-46a6-9987-e36f226af67a?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"99e45b92-3533-a646-9987-e36f226af67a\",\n \"status\"\ + : \"InProgress\",\n \"startTime\": \"2023-01-12T05:38:11.6004171Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Thu, 12 Jan 2023 05:50:14 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --ssh-key-value + User-Agent: + - AZURECLI/2.44.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/21.0.0b + Python/3.10.2 (Linux-5.10.104-linuxkit-x86_64-with) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/925be499-3335-46a6-9987-e36f226af67a?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"99e45b92-3533-a646-9987-e36f226af67a\",\n \"status\"\ + : \"InProgress\",\n \"startTime\": \"2023-01-12T05:38:11.6004171Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Thu, 12 Jan 2023 05:50:44 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --ssh-key-value + User-Agent: + - AZURECLI/2.44.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/21.0.0b + Python/3.10.2 (Linux-5.10.104-linuxkit-x86_64-with) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/925be499-3335-46a6-9987-e36f226af67a?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"99e45b92-3533-a646-9987-e36f226af67a\",\n \"status\"\ + : \"InProgress\",\n \"startTime\": \"2023-01-12T05:38:11.6004171Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Thu, 12 Jan 2023 05:51:14 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --ssh-key-value + User-Agent: + - AZURECLI/2.44.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/21.0.0b + Python/3.10.2 (Linux-5.10.104-linuxkit-x86_64-with) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/925be499-3335-46a6-9987-e36f226af67a?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"99e45b92-3533-a646-9987-e36f226af67a\",\n \"status\"\ + : \"InProgress\",\n \"startTime\": \"2023-01-12T05:38:11.6004171Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Thu, 12 Jan 2023 05:51:44 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --ssh-key-value + User-Agent: + - AZURECLI/2.44.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/21.0.0b + Python/3.10.2 (Linux-5.10.104-linuxkit-x86_64-with) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/925be499-3335-46a6-9987-e36f226af67a?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"99e45b92-3533-a646-9987-e36f226af67a\",\n \"status\"\ + : \"InProgress\",\n \"startTime\": \"2023-01-12T05:38:11.6004171Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Thu, 12 Jan 2023 05:52:15 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --ssh-key-value + User-Agent: + - AZURECLI/2.44.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/21.0.0b + Python/3.10.2 (Linux-5.10.104-linuxkit-x86_64-with) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/925be499-3335-46a6-9987-e36f226af67a?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"99e45b92-3533-a646-9987-e36f226af67a\",\n \"status\"\ + : \"InProgress\",\n \"startTime\": \"2023-01-12T05:38:11.6004171Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Thu, 12 Jan 2023 05:52:45 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --ssh-key-value + User-Agent: + - AZURECLI/2.44.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/21.0.0b + Python/3.10.2 (Linux-5.10.104-linuxkit-x86_64-with) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/925be499-3335-46a6-9987-e36f226af67a?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"99e45b92-3533-a646-9987-e36f226af67a\",\n \"status\"\ + : \"InProgress\",\n \"startTime\": \"2023-01-12T05:38:11.6004171Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Thu, 12 Jan 2023 05:53:15 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --ssh-key-value + User-Agent: + - AZURECLI/2.44.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/21.0.0b + Python/3.10.2 (Linux-5.10.104-linuxkit-x86_64-with) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/925be499-3335-46a6-9987-e36f226af67a?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"99e45b92-3533-a646-9987-e36f226af67a\",\n \"status\"\ + : \"InProgress\",\n \"startTime\": \"2023-01-12T05:38:11.6004171Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Thu, 12 Jan 2023 05:53:45 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --ssh-key-value + User-Agent: + - AZURECLI/2.44.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/21.0.0b + Python/3.10.2 (Linux-5.10.104-linuxkit-x86_64-with) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/925be499-3335-46a6-9987-e36f226af67a?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"99e45b92-3533-a646-9987-e36f226af67a\",\n \"status\"\ + : \"InProgress\",\n \"startTime\": \"2023-01-12T05:38:11.6004171Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Thu, 12 Jan 2023 05:54:15 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --ssh-key-value + User-Agent: + - AZURECLI/2.44.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/21.0.0b + Python/3.10.2 (Linux-5.10.104-linuxkit-x86_64-with) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/925be499-3335-46a6-9987-e36f226af67a?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"99e45b92-3533-a646-9987-e36f226af67a\",\n \"status\"\ + : \"InProgress\",\n \"startTime\": \"2023-01-12T05:38:11.6004171Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Thu, 12 Jan 2023 05:54:46 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --ssh-key-value + User-Agent: + - AZURECLI/2.44.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/21.0.0b + Python/3.10.2 (Linux-5.10.104-linuxkit-x86_64-with) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/925be499-3335-46a6-9987-e36f226af67a?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"99e45b92-3533-a646-9987-e36f226af67a\",\n \"status\"\ + : \"InProgress\",\n \"startTime\": \"2023-01-12T05:38:11.6004171Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Thu, 12 Jan 2023 05:55:16 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --ssh-key-value + User-Agent: + - AZURECLI/2.44.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/21.0.0b + Python/3.10.2 (Linux-5.10.104-linuxkit-x86_64-with) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/925be499-3335-46a6-9987-e36f226af67a?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"99e45b92-3533-a646-9987-e36f226af67a\",\n \"status\"\ + : \"Succeeded\",\n \"startTime\": \"2023-01-12T05:38:11.6004171Z\",\n \"\ + endTime\": \"2023-01-12T05:55:20.4223788Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '170' + content-type: + - application/json + date: + - Thu, 12 Jan 2023 05:55:46 GMT expires: - '-1' pragma: @@ -512,9 +1856,9 @@ interactions: : \"Microsoft.ContainerService/ManagedClusters\",\n \"properties\": {\n \ \ \"provisioningState\": \"Succeeded\",\n \"powerState\": {\n \"code\"\ : \"Running\"\n },\n \"kubernetesVersion\": \"1.23.12\",\n \"currentKubernetesVersion\"\ - : \"1.23.12\",\n \"dnsPrefix\": \"cliakstest-clitestgzvnw564a-8ecadf\",\n\ - \ \"fqdn\": \"cliakstest-clitestgzvnw564a-8ecadf-7045006e.hcp.westus2.azmk8s.io\"\ - ,\n \"azurePortalFQDN\": \"cliakstest-clitestgzvnw564a-8ecadf-7045006e.portal.hcp.westus2.azmk8s.io\"\ + : \"1.23.12\",\n \"dnsPrefix\": \"cliakstest-clitestlteu5piy7-8ecadf\",\n\ + \ \"fqdn\": \"cliakstest-clitestlteu5piy7-8ecadf-e45cd01c.hcp.westus2.azmk8s.io\"\ + ,\n \"azurePortalFQDN\": \"cliakstest-clitestlteu5piy7-8ecadf-e45cd01c.portal.hcp.westus2.azmk8s.io\"\ ,\n \"agentPoolProfiles\": [\n {\n \"name\": \"nodepool1\",\n \ \ \"count\": 3,\n \"vmSize\": \"Standard_DS2_v2\",\n \"osDiskSizeGB\"\ : 128,\n \"osDiskType\": \"Managed\",\n \"kubeletDiskType\": \"OS\"\ @@ -526,7 +1870,7 @@ interactions: : false,\n \"enableCustomCATrust\": false,\n \"mode\": \"System\"\ ,\n \"enableEncryptionAtHost\": false,\n \"enableUltraSSD\": false,\n\ \ \"osType\": \"Linux\",\n \"osSKU\": \"Ubuntu\",\n \"nodeImageVersion\"\ - : \"AKSUbuntu-1804gen2containerd-2022.12.15\",\n \"upgradeSettings\":\ + : \"AKSUbuntu-1804gen2containerd-2022.12.19\",\n \"upgradeSettings\":\ \ {},\n \"enableFIPS\": false,\n \"networkProfile\": {}\n }\n \ \ ],\n \"linuxProfile\": {\n \"adminUsername\": \"azureuser\",\n \ \ \"ssh\": {\n \"publicKeys\": [\n {\n \"keyData\": \"ssh-rsa\ @@ -538,7 +1882,7 @@ interactions: : {\n \"networkPlugin\": \"kubenet\",\n \"loadBalancerSku\": \"Standard\"\ ,\n \"loadBalancerProfile\": {\n \"managedOutboundIPs\": {\n \"\ count\": 1\n },\n \"effectiveOutboundIPs\": [\n {\n \"\ - id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_clitest000001_cliakstest000002_westus2/providers/Microsoft.Network/publicIPAddresses/a6715bf1-2bdd-4237-8069-64a87c792b31\"\ + id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_clitest000001_cliakstest000002_westus2/providers/Microsoft.Network/publicIPAddresses/765aabe4-878a-4de8-929c-afd6a1f728e7\"\ \n }\n ],\n \"backendPoolType\": \"nodeIPConfiguration\"\n \ \ },\n \"podCidr\": \"10.244.0.0/16\",\n \"serviceCidr\": \"10.0.0.0/16\"\ ,\n \"dnsServiceIP\": \"10.0.0.10\",\n \"dockerBridgeCidr\": \"172.17.0.1/16\"\ @@ -564,7 +1908,7 @@ interactions: content-type: - application/json date: - - Wed, 11 Jan 2023 03:30:01 GMT + - Thu, 12 Jan 2023 05:55:46 GMT expires: - '-1' pragma: @@ -612,7 +1956,7 @@ interactions: content-type: - application/json date: - - Wed, 11 Jan 2023 03:30:03 GMT + - Thu, 12 Jan 2023 05:55:47 GMT expires: - '-1' pragma: @@ -633,7 +1977,7 @@ interactions: - request: body: '{"properties": {"maintenanceWindow": {"schedule": {"weekly": {"intervalWeeks": 3, "dayOfWeek": "Friday"}}, "durationHours": 8, "utcOffset": "+05:30", "startDate": - "2023-01-21", "startTime": "00:00"}}}' + "2023-01-22", "startTime": "00:00"}}}' headers: Accept: - application/json @@ -662,7 +2006,7 @@ interactions: \ \"maintenanceWindow\": {\n \"schedule\": {\n \"weekly\": {\n \ \ \"intervalWeeks\": 3,\n \"dayOfWeek\": \"Friday\"\n }\n },\n\ \ \"durationHours\": 8,\n \"utcOffset\": \"+05:30\",\n \"startDate\"\ - : \"2023-01-21\",\n \"startTime\": \"00:00\"\n }\n }\n }" + : \"2023-01-22\",\n \"startTime\": \"00:00\"\n }\n }\n }" headers: cache-control: - no-cache @@ -671,7 +2015,7 @@ interactions: content-type: - application/json date: - - Wed, 11 Jan 2023 03:30:04 GMT + - Thu, 12 Jan 2023 05:55:48 GMT expires: - '-1' pragma: @@ -717,7 +2061,7 @@ interactions: \ \"maintenanceWindow\": {\n \"schedule\": {\n \"weekly\":\ \ {\n \"intervalWeeks\": 3,\n \"dayOfWeek\": \"Friday\"\n \ \ }\n },\n \"durationHours\": 8,\n \"utcOffset\": \"+05:30\"\ - ,\n \"startDate\": \"2023-01-21\",\n \"startTime\": \"00:00\"\n\ + ,\n \"startDate\": \"2023-01-22\",\n \"startTime\": \"00:00\"\n\ \ }\n }\n }\n ]\n }" headers: cache-control: @@ -727,7 +2071,7 @@ interactions: content-type: - application/json date: - - Wed, 11 Jan 2023 03:30:04 GMT + - Thu, 12 Jan 2023 05:55:48 GMT expires: - '-1' pragma: @@ -748,7 +2092,7 @@ interactions: - request: body: '{"properties": {"maintenanceWindow": {"schedule": {"relativeMonthly": {"intervalMonths": 1, "weekIndex": "Last", "dayOfWeek": "Tuesday"}}, "durationHours": 12, "utcOffset": - "-08:00", "startDate": "2023-01-21", "startTime": "09:00"}}}' + "-08:00", "startDate": "2023-01-22", "startTime": "09:00"}}}' headers: Accept: - application/json @@ -777,7 +2121,7 @@ interactions: \ \"maintenanceWindow\": {\n \"schedule\": {\n \"relativeMonthly\"\ : {\n \"intervalMonths\": 1,\n \"dayOfWeek\": \"Tuesday\",\n \ \ \"weekIndex\": \"Last\"\n }\n },\n \"durationHours\": 12,\n\ - \ \"utcOffset\": \"-08:00\",\n \"startDate\": \"2023-01-21\",\n \"\ + \ \"utcOffset\": \"-08:00\",\n \"startDate\": \"2023-01-22\",\n \"\ startTime\": \"09:00\"\n }\n }\n }" headers: cache-control: @@ -787,7 +2131,7 @@ interactions: content-type: - application/json date: - - Wed, 11 Jan 2023 03:30:10 GMT + - Thu, 12 Jan 2023 05:55:48 GMT expires: - '-1' pragma: @@ -832,13 +2176,13 @@ interactions: \ \"maintenanceWindow\": {\n \"schedule\": {\n \"weekly\":\ \ {\n \"intervalWeeks\": 3,\n \"dayOfWeek\": \"Friday\"\n \ \ }\n },\n \"durationHours\": 8,\n \"utcOffset\": \"+05:30\"\ - ,\n \"startDate\": \"2023-01-21\",\n \"startTime\": \"00:00\"\n\ + ,\n \"startDate\": \"2023-01-22\",\n \"startTime\": \"00:00\"\n\ \ }\n }\n },\n {\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002/maintenanceConfigurations/aksManagedNodeOSUpgradeSchedule\"\ ,\n \"name\": \"aksManagedNodeOSUpgradeSchedule\",\n \"properties\"\ : {\n \"maintenanceWindow\": {\n \"schedule\": {\n \"relativeMonthly\"\ : {\n \"intervalMonths\": 1,\n \"dayOfWeek\": \"Tuesday\",\n\ \ \"weekIndex\": \"Last\"\n }\n },\n \"durationHours\"\ - : 12,\n \"utcOffset\": \"-08:00\",\n \"startDate\": \"2023-01-21\"\ + : 12,\n \"utcOffset\": \"-08:00\",\n \"startDate\": \"2023-01-22\"\ ,\n \"startTime\": \"09:00\"\n }\n }\n }\n ]\n }" headers: cache-control: @@ -848,7 +2192,7 @@ interactions: content-type: - application/json date: - - Wed, 11 Jan 2023 03:30:11 GMT + - Thu, 12 Jan 2023 05:55:49 GMT expires: - '-1' pragma: @@ -891,13 +2235,13 @@ interactions: \ \"maintenanceWindow\": {\n \"schedule\": {\n \"weekly\":\ \ {\n \"intervalWeeks\": 3,\n \"dayOfWeek\": \"Friday\"\n \ \ }\n },\n \"durationHours\": 8,\n \"utcOffset\": \"+05:30\"\ - ,\n \"startDate\": \"2023-01-21\",\n \"startTime\": \"00:00\"\n\ + ,\n \"startDate\": \"2023-01-22\",\n \"startTime\": \"00:00\"\n\ \ }\n }\n },\n {\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002/maintenanceConfigurations/aksManagedNodeOSUpgradeSchedule\"\ ,\n \"name\": \"aksManagedNodeOSUpgradeSchedule\",\n \"properties\"\ : {\n \"maintenanceWindow\": {\n \"schedule\": {\n \"relativeMonthly\"\ : {\n \"intervalMonths\": 1,\n \"dayOfWeek\": \"Tuesday\",\n\ \ \"weekIndex\": \"Last\"\n }\n },\n \"durationHours\"\ - : 12,\n \"utcOffset\": \"-08:00\",\n \"startDate\": \"2023-01-21\"\ + : 12,\n \"utcOffset\": \"-08:00\",\n \"startDate\": \"2023-01-22\"\ ,\n \"startTime\": \"09:00\"\n }\n }\n }\n ]\n }" headers: cache-control: @@ -907,7 +2251,7 @@ interactions: content-type: - application/json date: - - Wed, 11 Jan 2023 03:30:11 GMT + - Thu, 12 Jan 2023 05:55:49 GMT expires: - '-1' pragma: @@ -957,7 +2301,7 @@ interactions: \ \"maintenanceWindow\": {\n \"schedule\": {\n \"absoluteMonthly\"\ : {\n \"intervalMonths\": 3,\n \"dayOfMonth\": 1\n }\n },\n\ \ \"durationHours\": 4,\n \"utcOffset\": \"-08:00\",\n \"startDate\"\ - : \"2023-01-10\",\n \"startTime\": \"09:00\",\n \"notAllowedDates\"\ + : \"2023-01-11\",\n \"startTime\": \"09:00\",\n \"notAllowedDates\"\ : [\n {\n \"start\": \"2022-12-23\",\n \"end\": \"2023-01-05\"\ \n },\n {\n \"start\": \"2023-11-23\",\n \"end\": \"2023-11-26\"\ \n }\n ]\n }\n }\n }" @@ -969,7 +2313,7 @@ interactions: content-type: - application/json date: - - Wed, 11 Jan 2023 03:30:12 GMT + - Thu, 12 Jan 2023 05:55:50 GMT expires: - '-1' pragma: @@ -1014,7 +2358,7 @@ interactions: \ \"maintenanceWindow\": {\n \"schedule\": {\n \"absoluteMonthly\"\ : {\n \"intervalMonths\": 3,\n \"dayOfMonth\": 1\n }\n },\n\ \ \"durationHours\": 4,\n \"utcOffset\": \"-08:00\",\n \"startDate\"\ - : \"2023-01-10\",\n \"startTime\": \"09:00\",\n \"notAllowedDates\"\ + : \"2023-01-11\",\n \"startTime\": \"09:00\",\n \"notAllowedDates\"\ : [\n {\n \"start\": \"2022-12-23\",\n \"end\": \"2023-01-05\"\ \n },\n {\n \"start\": \"2023-11-23\",\n \"end\": \"2023-11-26\"\ \n }\n ]\n }\n }\n }" @@ -1026,7 +2370,7 @@ interactions: content-type: - application/json date: - - Wed, 11 Jan 2023 03:30:13 GMT + - Thu, 12 Jan 2023 05:55:51 GMT expires: - '-1' pragma: @@ -1073,7 +2417,7 @@ interactions: content-length: - '0' date: - - Wed, 11 Jan 2023 03:30:14 GMT + - Thu, 12 Jan 2023 05:55:51 GMT expires: - '-1' pragma: @@ -1118,7 +2462,7 @@ interactions: content-length: - '0' date: - - Wed, 11 Jan 2023 03:30:15 GMT + - Thu, 12 Jan 2023 05:55:53 GMT expires: - '-1' pragma: @@ -1163,7 +2507,7 @@ interactions: content-type: - application/json date: - - Wed, 11 Jan 2023 03:30:16 GMT + - Thu, 12 Jan 2023 05:55:53 GMT expires: - '-1' pragma: @@ -1206,17 +2550,17 @@ interactions: string: '' headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/8980aac6-52d2-47bb-9d25-bb591de6c4c5?api-version=2016-03-30 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/9fce0c72-c2ff-4a29-966a-70b27c1b4b64?api-version=2016-03-30 cache-control: - no-cache content-length: - '0' date: - - Wed, 11 Jan 2023 03:30:17 GMT + - Thu, 12 Jan 2023 05:55:54 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operationresults/8980aac6-52d2-47bb-9d25-bb591de6c4c5?api-version=2016-03-30 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operationresults/9fce0c72-c2ff-4a29-966a-70b27c1b4b64?api-version=2016-03-30 pragma: - no-cache server: From ad395616b960f854c9218780dc80264163e68abc Mon Sep 17 00:00:00 2001 From: Thalia Wang Date: Wed, 11 Jan 2023 22:21:17 -0800 Subject: [PATCH 07/10] Add default value to all optional arguments --- src/aks-preview/azext_aks_preview/_params.py | 28 +- src/aks-preview/azext_aks_preview/custom.py | 56 +- .../test_aks_maintenancewindow.yaml | 1514 +---------------- 3 files changed, 101 insertions(+), 1497 deletions(-) diff --git a/src/aks-preview/azext_aks_preview/_params.py b/src/aks-preview/azext_aks_preview/_params.py index ea3b61f03cd..7bdc7d3348b 100644 --- a/src/aks-preview/azext_aks_preview/_params.py +++ b/src/aks-preview/azext_aks_preview/_params.py @@ -592,25 +592,25 @@ def load_arguments(self, _): with self.argument_context(scope) as c: c.argument('config_name', options_list=[ '--name', '-n'], help='The config name.') - c.argument('config_file', help='The config json file.', required=False) - c.argument('weekday', help='weekday on which maintenance can happen. e.g. Monday', required=False) - c.argument('start_hour', type=int, help='maintenance start hour of 1 hour window on the weekday. e.g. 1 means 1:00am - 2:00am', required=False) - c.argument('schedule_type', arg_type=get_enum_type(schedule_types), required=False, + c.argument('config_file', help='The config json file.') + c.argument('weekday', help='weekday on which maintenance can happen. e.g. Monday') + c.argument('start_hour', type=int, help='maintenance start hour of 1 hour window on the weekday. e.g. 1 means 1:00am - 2:00am') + c.argument('schedule_type', arg_type=get_enum_type(schedule_types), help='Schedule type for non-default maintenance configuration.') - c.argument('interval_days', type=int, help='The number of days between each set of occurrences for Daily schedule.', required=False) - c.argument('interval_weeks', type=int, help='The number of weeks between each set of occurrences for Weekly schedule.', required=False) - c.argument('interval_months', type=int, help='The number of months between each set of occurrences for AbsoluteMonthly or RelativeMonthly schedule.', required=False) - c.argument('day_of_week', help='Specifies on which day of the week the maintenance occurs for Weekly or RelativeMonthly schedule.', required=False) - c.argument('day_of_month', help='Specifies on which date of the month the maintenance occurs for AbsoluteMonthly schedule.', required=False) - c.argument('week_index', arg_type=get_enum_type(week_indexes), required=False, + c.argument('interval_days', type=int, help='The number of days between each set of occurrences for Daily schedule.') + c.argument('interval_weeks', type=int, help='The number of weeks between each set of occurrences for Weekly schedule.') + c.argument('interval_months', type=int, help='The number of months between each set of occurrences for AbsoluteMonthly or RelativeMonthly schedule.') + c.argument('day_of_week', help='Specifies on which day of the week the maintenance occurs for Weekly or RelativeMonthly schedule.') + c.argument('day_of_month', help='Specifies on which date of the month the maintenance occurs for AbsoluteMonthly schedule.') + c.argument('week_index', arg_type=get_enum_type(week_indexes), help='Specifies on which instance of the weekday specified in --day-of-week the maintenance occurs for RelativeMonthly schedule.') - c.argument('duration_hours', options_list=['--duration'], type=int, required=False, + c.argument('duration_hours', options_list=['--duration'], type=int, help='The length of maintenance window. The value ranges from 4 to 24 hours.') - c.argument('utc_offset', validator=validate_utc_offset, required=False, + c.argument('utc_offset', validator=validate_utc_offset, help='The UTC offset in format +/-HH:mm. e.g. -08:00 or +05:30.') - c.argument('start_date', validator=validate_start_date, required=False, + c.argument('start_date', validator=validate_start_date, help='The date the maintenance window activates. e.g. 2023-01-01.') - c.argument('start_time', validator=validate_start_time, required=False, + c.argument('start_time', validator=validate_start_time, help='The start time of the maintenance window. e.g. 09:30.') for scope in ['aks maintenanceconfiguration show', 'aks maintenanceconfiguration delete']: diff --git a/src/aks-preview/azext_aks_preview/custom.py b/src/aks-preview/azext_aks_preview/custom.py index 6bf513ec9b4..ae1f80a5cf8 100644 --- a/src/aks-preview/azext_aks_preview/custom.py +++ b/src/aks-preview/azext_aks_preview/custom.py @@ -501,20 +501,20 @@ def aks_maintenanceconfiguration_add( resource_group_name, cluster_name, config_name, - config_file, - weekday, - start_hour, - schedule_type, - interval_days, - interval_weeks, - interval_months, - day_of_week, - day_of_month, - week_index, - duration_hours, - utc_offset, - start_date, - start_time + config_file=None, + weekday=None, + start_hour=None, + schedule_type=None, + interval_days=None, + interval_weeks=None, + interval_months=None, + day_of_week=None, + day_of_month=None, + week_index=None, + duration_hours=None, + utc_offset=None, + start_date=None, + start_time=None ): configs = client.list_by_managed_cluster(resource_group_name, cluster_name) for config in configs: @@ -532,20 +532,20 @@ def aks_maintenanceconfiguration_update( resource_group_name, cluster_name, config_name, - config_file, - weekday, - start_hour, - schedule_type, - interval_days, - interval_weeks, - interval_months, - day_of_week, - day_of_month, - week_index, - duration_hours, - utc_offset, - start_date, - start_time + config_file=None, + weekday=None, + start_hour=None, + schedule_type=None, + interval_days=None, + interval_weeks=None, + interval_months=None, + day_of_week=None, + day_of_month=None, + week_index=None, + duration_hours=None, + utc_offset=None, + start_date=None, + start_time=None ): configs = client.list_by_managed_cluster(resource_group_name, cluster_name) found = False diff --git a/src/aks-preview/azext_aks_preview/tests/latest/recordings/test_aks_maintenancewindow.yaml b/src/aks-preview/azext_aks_preview/tests/latest/recordings/test_aks_maintenancewindow.yaml index 25ae9e07f23..6338dcf84d3 100644 --- a/src/aks-preview/azext_aks_preview/tests/latest/recordings/test_aks_maintenancewindow.yaml +++ b/src/aks-preview/azext_aks_preview/tests/latest/recordings/test_aks_maintenancewindow.yaml @@ -19,7 +19,7 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001?api-version=2021-04-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001","name":"clitest000001","type":"Microsoft.Resources/resourceGroups","location":"westus2","tags":{"product":"azurecli","cause":"automation","date":"2023-01-12T05:38:04Z"},"properties":{"provisioningState":"Succeeded"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001","name":"clitest000001","type":"Microsoft.Resources/resourceGroups","location":"westus2","tags":{"product":"azurecli","cause":"automation","date":"2023-01-12T06:17:11Z"},"properties":{"provisioningState":"Succeeded"}}' headers: cache-control: - no-cache @@ -28,7 +28,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 12 Jan 2023 05:38:05 GMT + - Thu, 12 Jan 2023 06:17:13 GMT expires: - '-1' pragma: @@ -44,7 +44,7 @@ interactions: message: OK - request: body: '{"location": "westus2", "identity": {"type": "SystemAssigned"}, "properties": - {"kubernetesVersion": "", "dnsPrefix": "cliakstest-clitestlteu5piy7-8ecadf", + {"kubernetesVersion": "", "dnsPrefix": "cliakstest-clitestp22fsbi3t-8ecadf", "agentPoolProfiles": [{"count": 3, "vmSize": "Standard_DS2_v2", "osDiskSizeGB": 0, "workloadRuntime": "OCIContainer", "osType": "Linux", "enableAutoScaling": false, "type": "VirtualMachineScaleSets", "mode": "System", "orchestratorVersion": @@ -85,9 +85,9 @@ interactions: : \"Microsoft.ContainerService/ManagedClusters\",\n \"properties\": {\n \ \ \"provisioningState\": \"Creating\",\n \"powerState\": {\n \"code\"\ : \"Running\"\n },\n \"kubernetesVersion\": \"1.23.12\",\n \"currentKubernetesVersion\"\ - : \"1.23.12\",\n \"dnsPrefix\": \"cliakstest-clitestlteu5piy7-8ecadf\",\n\ - \ \"fqdn\": \"cliakstest-clitestlteu5piy7-8ecadf-e45cd01c.hcp.westus2.azmk8s.io\"\ - ,\n \"azurePortalFQDN\": \"cliakstest-clitestlteu5piy7-8ecadf-e45cd01c.portal.hcp.westus2.azmk8s.io\"\ + : \"1.23.12\",\n \"dnsPrefix\": \"cliakstest-clitestp22fsbi3t-8ecadf\",\n\ + \ \"fqdn\": \"cliakstest-clitestp22fsbi3t-8ecadf-5930f1f3.hcp.westus2.azmk8s.io\"\ + ,\n \"azurePortalFQDN\": \"cliakstest-clitestp22fsbi3t-8ecadf-5930f1f3.portal.hcp.westus2.azmk8s.io\"\ ,\n \"agentPoolProfiles\": [\n {\n \"name\": \"nodepool1\",\n \ \ \"count\": 3,\n \"vmSize\": \"Standard_DS2_v2\",\n \"osDiskSizeGB\"\ : 128,\n \"osDiskType\": \"Managed\",\n \"kubeletDiskType\": \"OS\"\ @@ -126,7 +126,7 @@ interactions: : {\n \"name\": \"Basic\",\n \"tier\": \"Free\"\n }\n }" headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/925be499-3335-46a6-9987-e36f226af67a?api-version=2016-03-30 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/44d23e59-8aed-451b-8612-1515ba270148?api-version=2016-03-30 cache-control: - no-cache content-length: @@ -134,7 +134,7 @@ interactions: content-type: - application/json date: - - Thu, 12 Jan 2023 05:38:11 GMT + - Thu, 12 Jan 2023 06:17:19 GMT expires: - '-1' pragma: @@ -167,20 +167,20 @@ interactions: - AZURECLI/2.44.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/21.0.0b Python/3.10.2 (Linux-5.10.104-linuxkit-x86_64-with) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/925be499-3335-46a6-9987-e36f226af67a?api-version=2016-03-30 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/44d23e59-8aed-451b-8612-1515ba270148?api-version=2016-03-30 response: body: - string: "{\n \"name\": \"99e45b92-3533-a646-9987-e36f226af67a\",\n \"status\"\ - : \"InProgress\",\n \"startTime\": \"2023-01-12T05:38:11.6004171Z\"\n }" + string: "{\n \"name\": \"593ed244-ed8a-1b45-8612-1515ba270148\",\n \"status\"\ + : \"InProgress\",\n \"startTime\": \"2023-01-12T06:17:19.799025Z\"\n }" headers: cache-control: - no-cache content-length: - - '126' + - '125' content-type: - application/json date: - - Thu, 12 Jan 2023 05:38:41 GMT + - Thu, 12 Jan 2023 06:17:49 GMT expires: - '-1' pragma: @@ -215,20 +215,20 @@ interactions: - AZURECLI/2.44.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/21.0.0b Python/3.10.2 (Linux-5.10.104-linuxkit-x86_64-with) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/925be499-3335-46a6-9987-e36f226af67a?api-version=2016-03-30 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/44d23e59-8aed-451b-8612-1515ba270148?api-version=2016-03-30 response: body: - string: "{\n \"name\": \"99e45b92-3533-a646-9987-e36f226af67a\",\n \"status\"\ - : \"InProgress\",\n \"startTime\": \"2023-01-12T05:38:11.6004171Z\"\n }" + string: "{\n \"name\": \"593ed244-ed8a-1b45-8612-1515ba270148\",\n \"status\"\ + : \"InProgress\",\n \"startTime\": \"2023-01-12T06:17:19.799025Z\"\n }" headers: cache-control: - no-cache content-length: - - '126' + - '125' content-type: - application/json date: - - Thu, 12 Jan 2023 05:39:11 GMT + - Thu, 12 Jan 2023 06:18:20 GMT expires: - '-1' pragma: @@ -263,20 +263,20 @@ interactions: - AZURECLI/2.44.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/21.0.0b Python/3.10.2 (Linux-5.10.104-linuxkit-x86_64-with) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/925be499-3335-46a6-9987-e36f226af67a?api-version=2016-03-30 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/44d23e59-8aed-451b-8612-1515ba270148?api-version=2016-03-30 response: body: - string: "{\n \"name\": \"99e45b92-3533-a646-9987-e36f226af67a\",\n \"status\"\ - : \"InProgress\",\n \"startTime\": \"2023-01-12T05:38:11.6004171Z\"\n }" + string: "{\n \"name\": \"593ed244-ed8a-1b45-8612-1515ba270148\",\n \"status\"\ + : \"InProgress\",\n \"startTime\": \"2023-01-12T06:17:19.799025Z\"\n }" headers: cache-control: - no-cache content-length: - - '126' + - '125' content-type: - application/json date: - - Thu, 12 Jan 2023 05:39:41 GMT + - Thu, 12 Jan 2023 06:18:50 GMT expires: - '-1' pragma: @@ -311,20 +311,20 @@ interactions: - AZURECLI/2.44.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/21.0.0b Python/3.10.2 (Linux-5.10.104-linuxkit-x86_64-with) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/925be499-3335-46a6-9987-e36f226af67a?api-version=2016-03-30 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/44d23e59-8aed-451b-8612-1515ba270148?api-version=2016-03-30 response: body: - string: "{\n \"name\": \"99e45b92-3533-a646-9987-e36f226af67a\",\n \"status\"\ - : \"InProgress\",\n \"startTime\": \"2023-01-12T05:38:11.6004171Z\"\n }" + string: "{\n \"name\": \"593ed244-ed8a-1b45-8612-1515ba270148\",\n \"status\"\ + : \"InProgress\",\n \"startTime\": \"2023-01-12T06:17:19.799025Z\"\n }" headers: cache-control: - no-cache content-length: - - '126' + - '125' content-type: - application/json date: - - Thu, 12 Jan 2023 05:40:11 GMT + - Thu, 12 Jan 2023 06:19:19 GMT expires: - '-1' pragma: @@ -359,20 +359,20 @@ interactions: - AZURECLI/2.44.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/21.0.0b Python/3.10.2 (Linux-5.10.104-linuxkit-x86_64-with) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/925be499-3335-46a6-9987-e36f226af67a?api-version=2016-03-30 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/44d23e59-8aed-451b-8612-1515ba270148?api-version=2016-03-30 response: body: - string: "{\n \"name\": \"99e45b92-3533-a646-9987-e36f226af67a\",\n \"status\"\ - : \"InProgress\",\n \"startTime\": \"2023-01-12T05:38:11.6004171Z\"\n }" + string: "{\n \"name\": \"593ed244-ed8a-1b45-8612-1515ba270148\",\n \"status\"\ + : \"InProgress\",\n \"startTime\": \"2023-01-12T06:17:19.799025Z\"\n }" headers: cache-control: - no-cache content-length: - - '126' + - '125' content-type: - application/json date: - - Thu, 12 Jan 2023 05:40:41 GMT + - Thu, 12 Jan 2023 06:19:50 GMT expires: - '-1' pragma: @@ -407,1413 +407,21 @@ interactions: - AZURECLI/2.44.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/21.0.0b Python/3.10.2 (Linux-5.10.104-linuxkit-x86_64-with) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/925be499-3335-46a6-9987-e36f226af67a?api-version=2016-03-30 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/44d23e59-8aed-451b-8612-1515ba270148?api-version=2016-03-30 response: body: - string: "{\n \"name\": \"99e45b92-3533-a646-9987-e36f226af67a\",\n \"status\"\ - : \"InProgress\",\n \"startTime\": \"2023-01-12T05:38:11.6004171Z\"\n }" + string: "{\n \"name\": \"593ed244-ed8a-1b45-8612-1515ba270148\",\n \"status\"\ + : \"Succeeded\",\n \"startTime\": \"2023-01-12T06:17:19.799025Z\",\n \"\ + endTime\": \"2023-01-12T06:20:05.472144Z\"\n }" headers: cache-control: - no-cache content-length: - - '126' + - '168' content-type: - application/json date: - - Thu, 12 Jan 2023 05:41:12 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - nginx - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - aks create - Connection: - - keep-alive - ParameterSetName: - - --resource-group --name --ssh-key-value - User-Agent: - - AZURECLI/2.44.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/21.0.0b - Python/3.10.2 (Linux-5.10.104-linuxkit-x86_64-with) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/925be499-3335-46a6-9987-e36f226af67a?api-version=2016-03-30 - response: - body: - string: "{\n \"name\": \"99e45b92-3533-a646-9987-e36f226af67a\",\n \"status\"\ - : \"InProgress\",\n \"startTime\": \"2023-01-12T05:38:11.6004171Z\"\n }" - headers: - cache-control: - - no-cache - content-length: - - '126' - content-type: - - application/json - date: - - Thu, 12 Jan 2023 05:41:42 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - nginx - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - aks create - Connection: - - keep-alive - ParameterSetName: - - --resource-group --name --ssh-key-value - User-Agent: - - AZURECLI/2.44.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/21.0.0b - Python/3.10.2 (Linux-5.10.104-linuxkit-x86_64-with) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/925be499-3335-46a6-9987-e36f226af67a?api-version=2016-03-30 - response: - body: - string: "{\n \"name\": \"99e45b92-3533-a646-9987-e36f226af67a\",\n \"status\"\ - : \"InProgress\",\n \"startTime\": \"2023-01-12T05:38:11.6004171Z\"\n }" - headers: - cache-control: - - no-cache - content-length: - - '126' - content-type: - - application/json - date: - - Thu, 12 Jan 2023 05:42:12 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - nginx - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - aks create - Connection: - - keep-alive - ParameterSetName: - - --resource-group --name --ssh-key-value - User-Agent: - - AZURECLI/2.44.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/21.0.0b - Python/3.10.2 (Linux-5.10.104-linuxkit-x86_64-with) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/925be499-3335-46a6-9987-e36f226af67a?api-version=2016-03-30 - response: - body: - string: "{\n \"name\": \"99e45b92-3533-a646-9987-e36f226af67a\",\n \"status\"\ - : \"InProgress\",\n \"startTime\": \"2023-01-12T05:38:11.6004171Z\"\n }" - headers: - cache-control: - - no-cache - content-length: - - '126' - content-type: - - application/json - date: - - Thu, 12 Jan 2023 05:42:42 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - nginx - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - aks create - Connection: - - keep-alive - ParameterSetName: - - --resource-group --name --ssh-key-value - User-Agent: - - AZURECLI/2.44.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/21.0.0b - Python/3.10.2 (Linux-5.10.104-linuxkit-x86_64-with) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/925be499-3335-46a6-9987-e36f226af67a?api-version=2016-03-30 - response: - body: - string: "{\n \"name\": \"99e45b92-3533-a646-9987-e36f226af67a\",\n \"status\"\ - : \"InProgress\",\n \"startTime\": \"2023-01-12T05:38:11.6004171Z\"\n }" - headers: - cache-control: - - no-cache - content-length: - - '126' - content-type: - - application/json - date: - - Thu, 12 Jan 2023 05:43:12 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - nginx - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - aks create - Connection: - - keep-alive - ParameterSetName: - - --resource-group --name --ssh-key-value - User-Agent: - - AZURECLI/2.44.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/21.0.0b - Python/3.10.2 (Linux-5.10.104-linuxkit-x86_64-with) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/925be499-3335-46a6-9987-e36f226af67a?api-version=2016-03-30 - response: - body: - string: "{\n \"name\": \"99e45b92-3533-a646-9987-e36f226af67a\",\n \"status\"\ - : \"InProgress\",\n \"startTime\": \"2023-01-12T05:38:11.6004171Z\"\n }" - headers: - cache-control: - - no-cache - content-length: - - '126' - content-type: - - application/json - date: - - Thu, 12 Jan 2023 05:43:42 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - nginx - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - aks create - Connection: - - keep-alive - ParameterSetName: - - --resource-group --name --ssh-key-value - User-Agent: - - AZURECLI/2.44.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/21.0.0b - Python/3.10.2 (Linux-5.10.104-linuxkit-x86_64-with) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/925be499-3335-46a6-9987-e36f226af67a?api-version=2016-03-30 - response: - body: - string: "{\n \"name\": \"99e45b92-3533-a646-9987-e36f226af67a\",\n \"status\"\ - : \"InProgress\",\n \"startTime\": \"2023-01-12T05:38:11.6004171Z\"\n }" - headers: - cache-control: - - no-cache - content-length: - - '126' - content-type: - - application/json - date: - - Thu, 12 Jan 2023 05:44:13 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - nginx - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - aks create - Connection: - - keep-alive - ParameterSetName: - - --resource-group --name --ssh-key-value - User-Agent: - - AZURECLI/2.44.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/21.0.0b - Python/3.10.2 (Linux-5.10.104-linuxkit-x86_64-with) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/925be499-3335-46a6-9987-e36f226af67a?api-version=2016-03-30 - response: - body: - string: "{\n \"name\": \"99e45b92-3533-a646-9987-e36f226af67a\",\n \"status\"\ - : \"InProgress\",\n \"startTime\": \"2023-01-12T05:38:11.6004171Z\"\n }" - headers: - cache-control: - - no-cache - content-length: - - '126' - content-type: - - application/json - date: - - Thu, 12 Jan 2023 05:44:43 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - nginx - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - aks create - Connection: - - keep-alive - ParameterSetName: - - --resource-group --name --ssh-key-value - User-Agent: - - AZURECLI/2.44.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/21.0.0b - Python/3.10.2 (Linux-5.10.104-linuxkit-x86_64-with) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/925be499-3335-46a6-9987-e36f226af67a?api-version=2016-03-30 - response: - body: - string: "{\n \"name\": \"99e45b92-3533-a646-9987-e36f226af67a\",\n \"status\"\ - : \"InProgress\",\n \"startTime\": \"2023-01-12T05:38:11.6004171Z\"\n }" - headers: - cache-control: - - no-cache - content-length: - - '126' - content-type: - - application/json - date: - - Thu, 12 Jan 2023 05:45:13 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - nginx - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - aks create - Connection: - - keep-alive - ParameterSetName: - - --resource-group --name --ssh-key-value - User-Agent: - - AZURECLI/2.44.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/21.0.0b - Python/3.10.2 (Linux-5.10.104-linuxkit-x86_64-with) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/925be499-3335-46a6-9987-e36f226af67a?api-version=2016-03-30 - response: - body: - string: "{\n \"name\": \"99e45b92-3533-a646-9987-e36f226af67a\",\n \"status\"\ - : \"InProgress\",\n \"startTime\": \"2023-01-12T05:38:11.6004171Z\"\n }" - headers: - cache-control: - - no-cache - content-length: - - '126' - content-type: - - application/json - date: - - Thu, 12 Jan 2023 05:45:43 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - nginx - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - aks create - Connection: - - keep-alive - ParameterSetName: - - --resource-group --name --ssh-key-value - User-Agent: - - AZURECLI/2.44.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/21.0.0b - Python/3.10.2 (Linux-5.10.104-linuxkit-x86_64-with) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/925be499-3335-46a6-9987-e36f226af67a?api-version=2016-03-30 - response: - body: - string: "{\n \"name\": \"99e45b92-3533-a646-9987-e36f226af67a\",\n \"status\"\ - : \"InProgress\",\n \"startTime\": \"2023-01-12T05:38:11.6004171Z\"\n }" - headers: - cache-control: - - no-cache - content-length: - - '126' - content-type: - - application/json - date: - - Thu, 12 Jan 2023 05:46:13 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - nginx - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - aks create - Connection: - - keep-alive - ParameterSetName: - - --resource-group --name --ssh-key-value - User-Agent: - - AZURECLI/2.44.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/21.0.0b - Python/3.10.2 (Linux-5.10.104-linuxkit-x86_64-with) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/925be499-3335-46a6-9987-e36f226af67a?api-version=2016-03-30 - response: - body: - string: "{\n \"name\": \"99e45b92-3533-a646-9987-e36f226af67a\",\n \"status\"\ - : \"InProgress\",\n \"startTime\": \"2023-01-12T05:38:11.6004171Z\"\n }" - headers: - cache-control: - - no-cache - content-length: - - '126' - content-type: - - application/json - date: - - Thu, 12 Jan 2023 05:46:43 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - nginx - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - aks create - Connection: - - keep-alive - ParameterSetName: - - --resource-group --name --ssh-key-value - User-Agent: - - AZURECLI/2.44.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/21.0.0b - Python/3.10.2 (Linux-5.10.104-linuxkit-x86_64-with) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/925be499-3335-46a6-9987-e36f226af67a?api-version=2016-03-30 - response: - body: - string: "{\n \"name\": \"99e45b92-3533-a646-9987-e36f226af67a\",\n \"status\"\ - : \"InProgress\",\n \"startTime\": \"2023-01-12T05:38:11.6004171Z\"\n }" - headers: - cache-control: - - no-cache - content-length: - - '126' - content-type: - - application/json - date: - - Thu, 12 Jan 2023 05:47:13 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - nginx - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - aks create - Connection: - - keep-alive - ParameterSetName: - - --resource-group --name --ssh-key-value - User-Agent: - - AZURECLI/2.44.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/21.0.0b - Python/3.10.2 (Linux-5.10.104-linuxkit-x86_64-with) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/925be499-3335-46a6-9987-e36f226af67a?api-version=2016-03-30 - response: - body: - string: "{\n \"name\": \"99e45b92-3533-a646-9987-e36f226af67a\",\n \"status\"\ - : \"InProgress\",\n \"startTime\": \"2023-01-12T05:38:11.6004171Z\"\n }" - headers: - cache-control: - - no-cache - content-length: - - '126' - content-type: - - application/json - date: - - Thu, 12 Jan 2023 05:47:43 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - nginx - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - aks create - Connection: - - keep-alive - ParameterSetName: - - --resource-group --name --ssh-key-value - User-Agent: - - AZURECLI/2.44.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/21.0.0b - Python/3.10.2 (Linux-5.10.104-linuxkit-x86_64-with) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/925be499-3335-46a6-9987-e36f226af67a?api-version=2016-03-30 - response: - body: - string: "{\n \"name\": \"99e45b92-3533-a646-9987-e36f226af67a\",\n \"status\"\ - : \"InProgress\",\n \"startTime\": \"2023-01-12T05:38:11.6004171Z\"\n }" - headers: - cache-control: - - no-cache - content-length: - - '126' - content-type: - - application/json - date: - - Thu, 12 Jan 2023 05:48:13 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - nginx - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - aks create - Connection: - - keep-alive - ParameterSetName: - - --resource-group --name --ssh-key-value - User-Agent: - - AZURECLI/2.44.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/21.0.0b - Python/3.10.2 (Linux-5.10.104-linuxkit-x86_64-with) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/925be499-3335-46a6-9987-e36f226af67a?api-version=2016-03-30 - response: - body: - string: "{\n \"name\": \"99e45b92-3533-a646-9987-e36f226af67a\",\n \"status\"\ - : \"InProgress\",\n \"startTime\": \"2023-01-12T05:38:11.6004171Z\"\n }" - headers: - cache-control: - - no-cache - content-length: - - '126' - content-type: - - application/json - date: - - Thu, 12 Jan 2023 05:48:43 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - nginx - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - aks create - Connection: - - keep-alive - ParameterSetName: - - --resource-group --name --ssh-key-value - User-Agent: - - AZURECLI/2.44.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/21.0.0b - Python/3.10.2 (Linux-5.10.104-linuxkit-x86_64-with) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/925be499-3335-46a6-9987-e36f226af67a?api-version=2016-03-30 - response: - body: - string: "{\n \"name\": \"99e45b92-3533-a646-9987-e36f226af67a\",\n \"status\"\ - : \"InProgress\",\n \"startTime\": \"2023-01-12T05:38:11.6004171Z\"\n }" - headers: - cache-control: - - no-cache - content-length: - - '126' - content-type: - - application/json - date: - - Thu, 12 Jan 2023 05:49:13 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - nginx - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - aks create - Connection: - - keep-alive - ParameterSetName: - - --resource-group --name --ssh-key-value - User-Agent: - - AZURECLI/2.44.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/21.0.0b - Python/3.10.2 (Linux-5.10.104-linuxkit-x86_64-with) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/925be499-3335-46a6-9987-e36f226af67a?api-version=2016-03-30 - response: - body: - string: "{\n \"name\": \"99e45b92-3533-a646-9987-e36f226af67a\",\n \"status\"\ - : \"InProgress\",\n \"startTime\": \"2023-01-12T05:38:11.6004171Z\"\n }" - headers: - cache-control: - - no-cache - content-length: - - '126' - content-type: - - application/json - date: - - Thu, 12 Jan 2023 05:49:44 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - nginx - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - aks create - Connection: - - keep-alive - ParameterSetName: - - --resource-group --name --ssh-key-value - User-Agent: - - AZURECLI/2.44.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/21.0.0b - Python/3.10.2 (Linux-5.10.104-linuxkit-x86_64-with) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/925be499-3335-46a6-9987-e36f226af67a?api-version=2016-03-30 - response: - body: - string: "{\n \"name\": \"99e45b92-3533-a646-9987-e36f226af67a\",\n \"status\"\ - : \"InProgress\",\n \"startTime\": \"2023-01-12T05:38:11.6004171Z\"\n }" - headers: - cache-control: - - no-cache - content-length: - - '126' - content-type: - - application/json - date: - - Thu, 12 Jan 2023 05:50:14 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - nginx - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - aks create - Connection: - - keep-alive - ParameterSetName: - - --resource-group --name --ssh-key-value - User-Agent: - - AZURECLI/2.44.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/21.0.0b - Python/3.10.2 (Linux-5.10.104-linuxkit-x86_64-with) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/925be499-3335-46a6-9987-e36f226af67a?api-version=2016-03-30 - response: - body: - string: "{\n \"name\": \"99e45b92-3533-a646-9987-e36f226af67a\",\n \"status\"\ - : \"InProgress\",\n \"startTime\": \"2023-01-12T05:38:11.6004171Z\"\n }" - headers: - cache-control: - - no-cache - content-length: - - '126' - content-type: - - application/json - date: - - Thu, 12 Jan 2023 05:50:44 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - nginx - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - aks create - Connection: - - keep-alive - ParameterSetName: - - --resource-group --name --ssh-key-value - User-Agent: - - AZURECLI/2.44.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/21.0.0b - Python/3.10.2 (Linux-5.10.104-linuxkit-x86_64-with) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/925be499-3335-46a6-9987-e36f226af67a?api-version=2016-03-30 - response: - body: - string: "{\n \"name\": \"99e45b92-3533-a646-9987-e36f226af67a\",\n \"status\"\ - : \"InProgress\",\n \"startTime\": \"2023-01-12T05:38:11.6004171Z\"\n }" - headers: - cache-control: - - no-cache - content-length: - - '126' - content-type: - - application/json - date: - - Thu, 12 Jan 2023 05:51:14 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - nginx - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - aks create - Connection: - - keep-alive - ParameterSetName: - - --resource-group --name --ssh-key-value - User-Agent: - - AZURECLI/2.44.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/21.0.0b - Python/3.10.2 (Linux-5.10.104-linuxkit-x86_64-with) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/925be499-3335-46a6-9987-e36f226af67a?api-version=2016-03-30 - response: - body: - string: "{\n \"name\": \"99e45b92-3533-a646-9987-e36f226af67a\",\n \"status\"\ - : \"InProgress\",\n \"startTime\": \"2023-01-12T05:38:11.6004171Z\"\n }" - headers: - cache-control: - - no-cache - content-length: - - '126' - content-type: - - application/json - date: - - Thu, 12 Jan 2023 05:51:44 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - nginx - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - aks create - Connection: - - keep-alive - ParameterSetName: - - --resource-group --name --ssh-key-value - User-Agent: - - AZURECLI/2.44.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/21.0.0b - Python/3.10.2 (Linux-5.10.104-linuxkit-x86_64-with) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/925be499-3335-46a6-9987-e36f226af67a?api-version=2016-03-30 - response: - body: - string: "{\n \"name\": \"99e45b92-3533-a646-9987-e36f226af67a\",\n \"status\"\ - : \"InProgress\",\n \"startTime\": \"2023-01-12T05:38:11.6004171Z\"\n }" - headers: - cache-control: - - no-cache - content-length: - - '126' - content-type: - - application/json - date: - - Thu, 12 Jan 2023 05:52:15 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - nginx - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - aks create - Connection: - - keep-alive - ParameterSetName: - - --resource-group --name --ssh-key-value - User-Agent: - - AZURECLI/2.44.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/21.0.0b - Python/3.10.2 (Linux-5.10.104-linuxkit-x86_64-with) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/925be499-3335-46a6-9987-e36f226af67a?api-version=2016-03-30 - response: - body: - string: "{\n \"name\": \"99e45b92-3533-a646-9987-e36f226af67a\",\n \"status\"\ - : \"InProgress\",\n \"startTime\": \"2023-01-12T05:38:11.6004171Z\"\n }" - headers: - cache-control: - - no-cache - content-length: - - '126' - content-type: - - application/json - date: - - Thu, 12 Jan 2023 05:52:45 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - nginx - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - aks create - Connection: - - keep-alive - ParameterSetName: - - --resource-group --name --ssh-key-value - User-Agent: - - AZURECLI/2.44.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/21.0.0b - Python/3.10.2 (Linux-5.10.104-linuxkit-x86_64-with) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/925be499-3335-46a6-9987-e36f226af67a?api-version=2016-03-30 - response: - body: - string: "{\n \"name\": \"99e45b92-3533-a646-9987-e36f226af67a\",\n \"status\"\ - : \"InProgress\",\n \"startTime\": \"2023-01-12T05:38:11.6004171Z\"\n }" - headers: - cache-control: - - no-cache - content-length: - - '126' - content-type: - - application/json - date: - - Thu, 12 Jan 2023 05:53:15 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - nginx - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - aks create - Connection: - - keep-alive - ParameterSetName: - - --resource-group --name --ssh-key-value - User-Agent: - - AZURECLI/2.44.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/21.0.0b - Python/3.10.2 (Linux-5.10.104-linuxkit-x86_64-with) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/925be499-3335-46a6-9987-e36f226af67a?api-version=2016-03-30 - response: - body: - string: "{\n \"name\": \"99e45b92-3533-a646-9987-e36f226af67a\",\n \"status\"\ - : \"InProgress\",\n \"startTime\": \"2023-01-12T05:38:11.6004171Z\"\n }" - headers: - cache-control: - - no-cache - content-length: - - '126' - content-type: - - application/json - date: - - Thu, 12 Jan 2023 05:53:45 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - nginx - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - aks create - Connection: - - keep-alive - ParameterSetName: - - --resource-group --name --ssh-key-value - User-Agent: - - AZURECLI/2.44.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/21.0.0b - Python/3.10.2 (Linux-5.10.104-linuxkit-x86_64-with) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/925be499-3335-46a6-9987-e36f226af67a?api-version=2016-03-30 - response: - body: - string: "{\n \"name\": \"99e45b92-3533-a646-9987-e36f226af67a\",\n \"status\"\ - : \"InProgress\",\n \"startTime\": \"2023-01-12T05:38:11.6004171Z\"\n }" - headers: - cache-control: - - no-cache - content-length: - - '126' - content-type: - - application/json - date: - - Thu, 12 Jan 2023 05:54:15 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - nginx - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - aks create - Connection: - - keep-alive - ParameterSetName: - - --resource-group --name --ssh-key-value - User-Agent: - - AZURECLI/2.44.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/21.0.0b - Python/3.10.2 (Linux-5.10.104-linuxkit-x86_64-with) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/925be499-3335-46a6-9987-e36f226af67a?api-version=2016-03-30 - response: - body: - string: "{\n \"name\": \"99e45b92-3533-a646-9987-e36f226af67a\",\n \"status\"\ - : \"InProgress\",\n \"startTime\": \"2023-01-12T05:38:11.6004171Z\"\n }" - headers: - cache-control: - - no-cache - content-length: - - '126' - content-type: - - application/json - date: - - Thu, 12 Jan 2023 05:54:46 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - nginx - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - aks create - Connection: - - keep-alive - ParameterSetName: - - --resource-group --name --ssh-key-value - User-Agent: - - AZURECLI/2.44.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/21.0.0b - Python/3.10.2 (Linux-5.10.104-linuxkit-x86_64-with) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/925be499-3335-46a6-9987-e36f226af67a?api-version=2016-03-30 - response: - body: - string: "{\n \"name\": \"99e45b92-3533-a646-9987-e36f226af67a\",\n \"status\"\ - : \"InProgress\",\n \"startTime\": \"2023-01-12T05:38:11.6004171Z\"\n }" - headers: - cache-control: - - no-cache - content-length: - - '126' - content-type: - - application/json - date: - - Thu, 12 Jan 2023 05:55:16 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - nginx - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - aks create - Connection: - - keep-alive - ParameterSetName: - - --resource-group --name --ssh-key-value - User-Agent: - - AZURECLI/2.44.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/21.0.0b - Python/3.10.2 (Linux-5.10.104-linuxkit-x86_64-with) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/925be499-3335-46a6-9987-e36f226af67a?api-version=2016-03-30 - response: - body: - string: "{\n \"name\": \"99e45b92-3533-a646-9987-e36f226af67a\",\n \"status\"\ - : \"Succeeded\",\n \"startTime\": \"2023-01-12T05:38:11.6004171Z\",\n \"\ - endTime\": \"2023-01-12T05:55:20.4223788Z\"\n }" - headers: - cache-control: - - no-cache - content-length: - - '170' - content-type: - - application/json - date: - - Thu, 12 Jan 2023 05:55:46 GMT + - Thu, 12 Jan 2023 06:20:20 GMT expires: - '-1' pragma: @@ -1856,9 +464,9 @@ interactions: : \"Microsoft.ContainerService/ManagedClusters\",\n \"properties\": {\n \ \ \"provisioningState\": \"Succeeded\",\n \"powerState\": {\n \"code\"\ : \"Running\"\n },\n \"kubernetesVersion\": \"1.23.12\",\n \"currentKubernetesVersion\"\ - : \"1.23.12\",\n \"dnsPrefix\": \"cliakstest-clitestlteu5piy7-8ecadf\",\n\ - \ \"fqdn\": \"cliakstest-clitestlteu5piy7-8ecadf-e45cd01c.hcp.westus2.azmk8s.io\"\ - ,\n \"azurePortalFQDN\": \"cliakstest-clitestlteu5piy7-8ecadf-e45cd01c.portal.hcp.westus2.azmk8s.io\"\ + : \"1.23.12\",\n \"dnsPrefix\": \"cliakstest-clitestp22fsbi3t-8ecadf\",\n\ + \ \"fqdn\": \"cliakstest-clitestp22fsbi3t-8ecadf-5930f1f3.hcp.westus2.azmk8s.io\"\ + ,\n \"azurePortalFQDN\": \"cliakstest-clitestp22fsbi3t-8ecadf-5930f1f3.portal.hcp.westus2.azmk8s.io\"\ ,\n \"agentPoolProfiles\": [\n {\n \"name\": \"nodepool1\",\n \ \ \"count\": 3,\n \"vmSize\": \"Standard_DS2_v2\",\n \"osDiskSizeGB\"\ : 128,\n \"osDiskType\": \"Managed\",\n \"kubeletDiskType\": \"OS\"\ @@ -1882,7 +490,7 @@ interactions: : {\n \"networkPlugin\": \"kubenet\",\n \"loadBalancerSku\": \"Standard\"\ ,\n \"loadBalancerProfile\": {\n \"managedOutboundIPs\": {\n \"\ count\": 1\n },\n \"effectiveOutboundIPs\": [\n {\n \"\ - id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_clitest000001_cliakstest000002_westus2/providers/Microsoft.Network/publicIPAddresses/765aabe4-878a-4de8-929c-afd6a1f728e7\"\ + id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_clitest000001_cliakstest000002_westus2/providers/Microsoft.Network/publicIPAddresses/87b26312-ecf6-4125-9afa-09c43b57d3bc\"\ \n }\n ],\n \"backendPoolType\": \"nodeIPConfiguration\"\n \ \ },\n \"podCidr\": \"10.244.0.0/16\",\n \"serviceCidr\": \"10.0.0.0/16\"\ ,\n \"dnsServiceIP\": \"10.0.0.10\",\n \"dockerBridgeCidr\": \"172.17.0.1/16\"\ @@ -1908,7 +516,7 @@ interactions: content-type: - application/json date: - - Thu, 12 Jan 2023 05:55:46 GMT + - Thu, 12 Jan 2023 06:20:21 GMT expires: - '-1' pragma: @@ -1956,7 +564,7 @@ interactions: content-type: - application/json date: - - Thu, 12 Jan 2023 05:55:47 GMT + - Thu, 12 Jan 2023 06:20:22 GMT expires: - '-1' pragma: @@ -2015,7 +623,7 @@ interactions: content-type: - application/json date: - - Thu, 12 Jan 2023 05:55:48 GMT + - Thu, 12 Jan 2023 06:20:23 GMT expires: - '-1' pragma: @@ -2071,7 +679,7 @@ interactions: content-type: - application/json date: - - Thu, 12 Jan 2023 05:55:48 GMT + - Thu, 12 Jan 2023 06:20:23 GMT expires: - '-1' pragma: @@ -2131,7 +739,7 @@ interactions: content-type: - application/json date: - - Thu, 12 Jan 2023 05:55:48 GMT + - Thu, 12 Jan 2023 06:20:23 GMT expires: - '-1' pragma: @@ -2147,7 +755,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-writes: - - '1199' + - '1198' status: code: 200 message: OK @@ -2192,7 +800,7 @@ interactions: content-type: - application/json date: - - Thu, 12 Jan 2023 05:55:49 GMT + - Thu, 12 Jan 2023 06:20:24 GMT expires: - '-1' pragma: @@ -2251,7 +859,7 @@ interactions: content-type: - application/json date: - - Thu, 12 Jan 2023 05:55:49 GMT + - Thu, 12 Jan 2023 06:20:25 GMT expires: - '-1' pragma: @@ -2313,7 +921,7 @@ interactions: content-type: - application/json date: - - Thu, 12 Jan 2023 05:55:50 GMT + - Thu, 12 Jan 2023 06:20:25 GMT expires: - '-1' pragma: @@ -2370,7 +978,7 @@ interactions: content-type: - application/json date: - - Thu, 12 Jan 2023 05:55:51 GMT + - Thu, 12 Jan 2023 06:20:26 GMT expires: - '-1' pragma: @@ -2417,7 +1025,7 @@ interactions: content-length: - '0' date: - - Thu, 12 Jan 2023 05:55:51 GMT + - Thu, 12 Jan 2023 06:20:27 GMT expires: - '-1' pragma: @@ -2462,7 +1070,7 @@ interactions: content-length: - '0' date: - - Thu, 12 Jan 2023 05:55:53 GMT + - Thu, 12 Jan 2023 06:20:29 GMT expires: - '-1' pragma: @@ -2507,7 +1115,7 @@ interactions: content-type: - application/json date: - - Thu, 12 Jan 2023 05:55:53 GMT + - Thu, 12 Jan 2023 06:20:29 GMT expires: - '-1' pragma: @@ -2516,10 +1124,6 @@ interactions: - nginx strict-transport-security: - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding x-content-type-options: - nosniff status: @@ -2550,17 +1154,17 @@ interactions: string: '' headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/9fce0c72-c2ff-4a29-966a-70b27c1b4b64?api-version=2016-03-30 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/b032b03e-cbd3-4f72-918d-25cb389e957e?api-version=2016-03-30 cache-control: - no-cache content-length: - '0' date: - - Thu, 12 Jan 2023 05:55:54 GMT + - Thu, 12 Jan 2023 06:20:30 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operationresults/9fce0c72-c2ff-4a29-966a-70b27c1b4b64?api-version=2016-03-30 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operationresults/b032b03e-cbd3-4f72-918d-25cb389e957e?api-version=2016-03-30 pragma: - no-cache server: From a31193e3e786c76c4c81a74d2f319e66bec6c1ea Mon Sep 17 00:00:00 2001 From: Thalia Wang Date: Thu, 12 Jan 2023 21:21:33 -0800 Subject: [PATCH 08/10] Fx help msg --- src/aks-preview/azext_aks_preview/_params.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/aks-preview/azext_aks_preview/_params.py b/src/aks-preview/azext_aks_preview/_params.py index 7bdc7d3348b..33f8b584faf 100644 --- a/src/aks-preview/azext_aks_preview/_params.py +++ b/src/aks-preview/azext_aks_preview/_params.py @@ -593,17 +593,17 @@ def load_arguments(self, _): c.argument('config_name', options_list=[ '--name', '-n'], help='The config name.') c.argument('config_file', help='The config json file.') - c.argument('weekday', help='weekday on which maintenance can happen. e.g. Monday') - c.argument('start_hour', type=int, help='maintenance start hour of 1 hour window on the weekday. e.g. 1 means 1:00am - 2:00am') + c.argument('weekday', help='Weekday on which maintenance can happen. e.g. Monday') + c.argument('start_hour', type=int, help='Maintenance start hour of 1 hour window on the weekday. e.g. 1 means 1:00am - 2:00am') c.argument('schedule_type', arg_type=get_enum_type(schedule_types), help='Schedule type for non-default maintenance configuration.') c.argument('interval_days', type=int, help='The number of days between each set of occurrences for Daily schedule.') c.argument('interval_weeks', type=int, help='The number of weeks between each set of occurrences for Weekly schedule.') c.argument('interval_months', type=int, help='The number of months between each set of occurrences for AbsoluteMonthly or RelativeMonthly schedule.') - c.argument('day_of_week', help='Specifies on which day of the week the maintenance occurs for Weekly or RelativeMonthly schedule.') - c.argument('day_of_month', help='Specifies on which date of the month the maintenance occurs for AbsoluteMonthly schedule.') + c.argument('day_of_week', help='Specify on which day of the week the maintenance occurs for Weekly or RelativeMonthly schedule.') + c.argument('day_of_month', help='Specify on which date of the month the maintenance occurs for AbsoluteMonthly schedule.') c.argument('week_index', arg_type=get_enum_type(week_indexes), - help='Specifies on which instance of the weekday specified in --day-of-week the maintenance occurs for RelativeMonthly schedule.') + help='Specify on which instance of the weekday specified in --day-of-week the maintenance occurs for RelativeMonthly schedule.') c.argument('duration_hours', options_list=['--duration'], type=int, help='The length of maintenance window. The value ranges from 4 to 24 hours.') c.argument('utc_offset', validator=validate_utc_offset, From 48c3b70e8b9052e40dcf885c0dc99e1afce50870 Mon Sep 17 00:00:00 2001 From: Thalia Wang Date: Thu, 12 Jan 2023 21:48:18 -0800 Subject: [PATCH 09/10] Rerun live test --- .../test_aks_maintenancewindow.yaml | 208 +++++++++++------- 1 file changed, 130 insertions(+), 78 deletions(-) diff --git a/src/aks-preview/azext_aks_preview/tests/latest/recordings/test_aks_maintenancewindow.yaml b/src/aks-preview/azext_aks_preview/tests/latest/recordings/test_aks_maintenancewindow.yaml index 6338dcf84d3..416d3440a04 100644 --- a/src/aks-preview/azext_aks_preview/tests/latest/recordings/test_aks_maintenancewindow.yaml +++ b/src/aks-preview/azext_aks_preview/tests/latest/recordings/test_aks_maintenancewindow.yaml @@ -19,7 +19,7 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001?api-version=2021-04-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001","name":"clitest000001","type":"Microsoft.Resources/resourceGroups","location":"westus2","tags":{"product":"azurecli","cause":"automation","date":"2023-01-12T06:17:11Z"},"properties":{"provisioningState":"Succeeded"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001","name":"clitest000001","type":"Microsoft.Resources/resourceGroups","location":"westus2","tags":{"product":"azurecli","cause":"automation","date":"2023-01-13T05:39:09Z"},"properties":{"provisioningState":"Succeeded"}}' headers: cache-control: - no-cache @@ -28,7 +28,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 12 Jan 2023 06:17:13 GMT + - Fri, 13 Jan 2023 05:39:11 GMT expires: - '-1' pragma: @@ -44,7 +44,7 @@ interactions: message: OK - request: body: '{"location": "westus2", "identity": {"type": "SystemAssigned"}, "properties": - {"kubernetesVersion": "", "dnsPrefix": "cliakstest-clitestp22fsbi3t-8ecadf", + {"kubernetesVersion": "", "dnsPrefix": "cliakstest-clitestroj3ihpef-8ecadf", "agentPoolProfiles": [{"count": 3, "vmSize": "Standard_DS2_v2", "osDiskSizeGB": 0, "workloadRuntime": "OCIContainer", "osType": "Linux", "enableAutoScaling": false, "type": "VirtualMachineScaleSets", "mode": "System", "orchestratorVersion": @@ -84,18 +84,18 @@ interactions: ,\n \"location\": \"westus2\",\n \"name\": \"cliakstest000002\",\n \"type\"\ : \"Microsoft.ContainerService/ManagedClusters\",\n \"properties\": {\n \ \ \"provisioningState\": \"Creating\",\n \"powerState\": {\n \"code\"\ - : \"Running\"\n },\n \"kubernetesVersion\": \"1.23.12\",\n \"currentKubernetesVersion\"\ - : \"1.23.12\",\n \"dnsPrefix\": \"cliakstest-clitestp22fsbi3t-8ecadf\",\n\ - \ \"fqdn\": \"cliakstest-clitestp22fsbi3t-8ecadf-5930f1f3.hcp.westus2.azmk8s.io\"\ - ,\n \"azurePortalFQDN\": \"cliakstest-clitestp22fsbi3t-8ecadf-5930f1f3.portal.hcp.westus2.azmk8s.io\"\ + : \"Running\"\n },\n \"kubernetesVersion\": \"1.24.6\",\n \"currentKubernetesVersion\"\ + : \"1.24.6\",\n \"dnsPrefix\": \"cliakstest-clitestroj3ihpef-8ecadf\",\n\ + \ \"fqdn\": \"cliakstest-clitestroj3ihpef-8ecadf-a59e3500.hcp.westus2.azmk8s.io\"\ + ,\n \"azurePortalFQDN\": \"cliakstest-clitestroj3ihpef-8ecadf-a59e3500.portal.hcp.westus2.azmk8s.io\"\ ,\n \"agentPoolProfiles\": [\n {\n \"name\": \"nodepool1\",\n \ \ \"count\": 3,\n \"vmSize\": \"Standard_DS2_v2\",\n \"osDiskSizeGB\"\ : 128,\n \"osDiskType\": \"Managed\",\n \"kubeletDiskType\": \"OS\"\ ,\n \"workloadRuntime\": \"OCIContainer\",\n \"maxPods\": 110,\n \ \ \"type\": \"VirtualMachineScaleSets\",\n \"enableAutoScaling\": false,\n\ \ \"provisioningState\": \"Creating\",\n \"powerState\": {\n \ - \ \"code\": \"Running\"\n },\n \"orchestratorVersion\": \"1.23.12\"\ - ,\n \"currentOrchestratorVersion\": \"1.23.12\",\n \"enableNodePublicIP\"\ + \ \"code\": \"Running\"\n },\n \"orchestratorVersion\": \"1.24.6\"\ + ,\n \"currentOrchestratorVersion\": \"1.24.6\",\n \"enableNodePublicIP\"\ : false,\n \"enableCustomCATrust\": false,\n \"mode\": \"System\"\ ,\n \"enableEncryptionAtHost\": false,\n \"enableUltraSSD\": false,\n\ \ \"osType\": \"Linux\",\n \"osSKU\": \"Ubuntu\",\n \"nodeImageVersion\"\ @@ -126,15 +126,15 @@ interactions: : {\n \"name\": \"Basic\",\n \"tier\": \"Free\"\n }\n }" headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/44d23e59-8aed-451b-8612-1515ba270148?api-version=2016-03-30 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/2726e294-a23a-4699-bbd5-93dbe77c56d6?api-version=2016-03-30 cache-control: - no-cache content-length: - - '3809' + - '3805' content-type: - application/json date: - - Thu, 12 Jan 2023 06:17:19 GMT + - Fri, 13 Jan 2023 05:39:17 GMT expires: - '-1' pragma: @@ -167,20 +167,20 @@ interactions: - AZURECLI/2.44.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/21.0.0b Python/3.10.2 (Linux-5.10.104-linuxkit-x86_64-with) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/44d23e59-8aed-451b-8612-1515ba270148?api-version=2016-03-30 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/2726e294-a23a-4699-bbd5-93dbe77c56d6?api-version=2016-03-30 response: body: - string: "{\n \"name\": \"593ed244-ed8a-1b45-8612-1515ba270148\",\n \"status\"\ - : \"InProgress\",\n \"startTime\": \"2023-01-12T06:17:19.799025Z\"\n }" + string: "{\n \"name\": \"94e22627-3aa2-9946-bbd5-93dbe77c56d6\",\n \"status\"\ + : \"InProgress\",\n \"startTime\": \"2023-01-13T05:39:17.9099724Z\"\n }" headers: cache-control: - no-cache content-length: - - '125' + - '126' content-type: - application/json date: - - Thu, 12 Jan 2023 06:17:49 GMT + - Fri, 13 Jan 2023 05:39:47 GMT expires: - '-1' pragma: @@ -215,20 +215,20 @@ interactions: - AZURECLI/2.44.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/21.0.0b Python/3.10.2 (Linux-5.10.104-linuxkit-x86_64-with) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/44d23e59-8aed-451b-8612-1515ba270148?api-version=2016-03-30 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/2726e294-a23a-4699-bbd5-93dbe77c56d6?api-version=2016-03-30 response: body: - string: "{\n \"name\": \"593ed244-ed8a-1b45-8612-1515ba270148\",\n \"status\"\ - : \"InProgress\",\n \"startTime\": \"2023-01-12T06:17:19.799025Z\"\n }" + string: "{\n \"name\": \"94e22627-3aa2-9946-bbd5-93dbe77c56d6\",\n \"status\"\ + : \"InProgress\",\n \"startTime\": \"2023-01-13T05:39:17.9099724Z\"\n }" headers: cache-control: - no-cache content-length: - - '125' + - '126' content-type: - application/json date: - - Thu, 12 Jan 2023 06:18:20 GMT + - Fri, 13 Jan 2023 05:40:18 GMT expires: - '-1' pragma: @@ -263,20 +263,20 @@ interactions: - AZURECLI/2.44.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/21.0.0b Python/3.10.2 (Linux-5.10.104-linuxkit-x86_64-with) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/44d23e59-8aed-451b-8612-1515ba270148?api-version=2016-03-30 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/2726e294-a23a-4699-bbd5-93dbe77c56d6?api-version=2016-03-30 response: body: - string: "{\n \"name\": \"593ed244-ed8a-1b45-8612-1515ba270148\",\n \"status\"\ - : \"InProgress\",\n \"startTime\": \"2023-01-12T06:17:19.799025Z\"\n }" + string: "{\n \"name\": \"94e22627-3aa2-9946-bbd5-93dbe77c56d6\",\n \"status\"\ + : \"InProgress\",\n \"startTime\": \"2023-01-13T05:39:17.9099724Z\"\n }" headers: cache-control: - no-cache content-length: - - '125' + - '126' content-type: - application/json date: - - Thu, 12 Jan 2023 06:18:50 GMT + - Fri, 13 Jan 2023 05:40:48 GMT expires: - '-1' pragma: @@ -311,20 +311,20 @@ interactions: - AZURECLI/2.44.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/21.0.0b Python/3.10.2 (Linux-5.10.104-linuxkit-x86_64-with) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/44d23e59-8aed-451b-8612-1515ba270148?api-version=2016-03-30 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/2726e294-a23a-4699-bbd5-93dbe77c56d6?api-version=2016-03-30 response: body: - string: "{\n \"name\": \"593ed244-ed8a-1b45-8612-1515ba270148\",\n \"status\"\ - : \"InProgress\",\n \"startTime\": \"2023-01-12T06:17:19.799025Z\"\n }" + string: "{\n \"name\": \"94e22627-3aa2-9946-bbd5-93dbe77c56d6\",\n \"status\"\ + : \"InProgress\",\n \"startTime\": \"2023-01-13T05:39:17.9099724Z\"\n }" headers: cache-control: - no-cache content-length: - - '125' + - '126' content-type: - application/json date: - - Thu, 12 Jan 2023 06:19:19 GMT + - Fri, 13 Jan 2023 05:41:18 GMT expires: - '-1' pragma: @@ -359,20 +359,20 @@ interactions: - AZURECLI/2.44.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/21.0.0b Python/3.10.2 (Linux-5.10.104-linuxkit-x86_64-with) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/44d23e59-8aed-451b-8612-1515ba270148?api-version=2016-03-30 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/2726e294-a23a-4699-bbd5-93dbe77c56d6?api-version=2016-03-30 response: body: - string: "{\n \"name\": \"593ed244-ed8a-1b45-8612-1515ba270148\",\n \"status\"\ - : \"InProgress\",\n \"startTime\": \"2023-01-12T06:17:19.799025Z\"\n }" + string: "{\n \"name\": \"94e22627-3aa2-9946-bbd5-93dbe77c56d6\",\n \"status\"\ + : \"InProgress\",\n \"startTime\": \"2023-01-13T05:39:17.9099724Z\"\n }" headers: cache-control: - no-cache content-length: - - '125' + - '126' content-type: - application/json date: - - Thu, 12 Jan 2023 06:19:50 GMT + - Fri, 13 Jan 2023 05:41:48 GMT expires: - '-1' pragma: @@ -407,21 +407,69 @@ interactions: - AZURECLI/2.44.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/21.0.0b Python/3.10.2 (Linux-5.10.104-linuxkit-x86_64-with) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/44d23e59-8aed-451b-8612-1515ba270148?api-version=2016-03-30 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/2726e294-a23a-4699-bbd5-93dbe77c56d6?api-version=2016-03-30 response: body: - string: "{\n \"name\": \"593ed244-ed8a-1b45-8612-1515ba270148\",\n \"status\"\ - : \"Succeeded\",\n \"startTime\": \"2023-01-12T06:17:19.799025Z\",\n \"\ - endTime\": \"2023-01-12T06:20:05.472144Z\"\n }" + string: "{\n \"name\": \"94e22627-3aa2-9946-bbd5-93dbe77c56d6\",\n \"status\"\ + : \"InProgress\",\n \"startTime\": \"2023-01-13T05:39:17.9099724Z\"\n }" headers: cache-control: - no-cache content-length: - - '168' + - '126' content-type: - application/json date: - - Thu, 12 Jan 2023 06:20:20 GMT + - Fri, 13 Jan 2023 05:42:19 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --ssh-key-value + User-Agent: + - AZURECLI/2.44.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/21.0.0b + Python/3.10.2 (Linux-5.10.104-linuxkit-x86_64-with) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/2726e294-a23a-4699-bbd5-93dbe77c56d6?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"94e22627-3aa2-9946-bbd5-93dbe77c56d6\",\n \"status\"\ + : \"Succeeded\",\n \"startTime\": \"2023-01-13T05:39:17.9099724Z\",\n \"\ + endTime\": \"2023-01-13T05:42:26.0317551Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '170' + content-type: + - application/json + date: + - Fri, 13 Jan 2023 05:42:49 GMT expires: - '-1' pragma: @@ -463,18 +511,18 @@ interactions: ,\n \"location\": \"westus2\",\n \"name\": \"cliakstest000002\",\n \"type\"\ : \"Microsoft.ContainerService/ManagedClusters\",\n \"properties\": {\n \ \ \"provisioningState\": \"Succeeded\",\n \"powerState\": {\n \"code\"\ - : \"Running\"\n },\n \"kubernetesVersion\": \"1.23.12\",\n \"currentKubernetesVersion\"\ - : \"1.23.12\",\n \"dnsPrefix\": \"cliakstest-clitestp22fsbi3t-8ecadf\",\n\ - \ \"fqdn\": \"cliakstest-clitestp22fsbi3t-8ecadf-5930f1f3.hcp.westus2.azmk8s.io\"\ - ,\n \"azurePortalFQDN\": \"cliakstest-clitestp22fsbi3t-8ecadf-5930f1f3.portal.hcp.westus2.azmk8s.io\"\ + : \"Running\"\n },\n \"kubernetesVersion\": \"1.24.6\",\n \"currentKubernetesVersion\"\ + : \"1.24.6\",\n \"dnsPrefix\": \"cliakstest-clitestroj3ihpef-8ecadf\",\n\ + \ \"fqdn\": \"cliakstest-clitestroj3ihpef-8ecadf-a59e3500.hcp.westus2.azmk8s.io\"\ + ,\n \"azurePortalFQDN\": \"cliakstest-clitestroj3ihpef-8ecadf-a59e3500.portal.hcp.westus2.azmk8s.io\"\ ,\n \"agentPoolProfiles\": [\n {\n \"name\": \"nodepool1\",\n \ \ \"count\": 3,\n \"vmSize\": \"Standard_DS2_v2\",\n \"osDiskSizeGB\"\ : 128,\n \"osDiskType\": \"Managed\",\n \"kubeletDiskType\": \"OS\"\ ,\n \"workloadRuntime\": \"OCIContainer\",\n \"maxPods\": 110,\n \ \ \"type\": \"VirtualMachineScaleSets\",\n \"enableAutoScaling\": false,\n\ \ \"provisioningState\": \"Succeeded\",\n \"powerState\": {\n \ - \ \"code\": \"Running\"\n },\n \"orchestratorVersion\": \"1.23.12\"\ - ,\n \"currentOrchestratorVersion\": \"1.23.12\",\n \"enableNodePublicIP\"\ + \ \"code\": \"Running\"\n },\n \"orchestratorVersion\": \"1.24.6\"\ + ,\n \"currentOrchestratorVersion\": \"1.24.6\",\n \"enableNodePublicIP\"\ : false,\n \"enableCustomCATrust\": false,\n \"mode\": \"System\"\ ,\n \"enableEncryptionAtHost\": false,\n \"enableUltraSSD\": false,\n\ \ \"osType\": \"Linux\",\n \"osSKU\": \"Ubuntu\",\n \"nodeImageVersion\"\ @@ -490,7 +538,7 @@ interactions: : {\n \"networkPlugin\": \"kubenet\",\n \"loadBalancerSku\": \"Standard\"\ ,\n \"loadBalancerProfile\": {\n \"managedOutboundIPs\": {\n \"\ count\": 1\n },\n \"effectiveOutboundIPs\": [\n {\n \"\ - id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_clitest000001_cliakstest000002_westus2/providers/Microsoft.Network/publicIPAddresses/87b26312-ecf6-4125-9afa-09c43b57d3bc\"\ + id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_clitest000001_cliakstest000002_westus2/providers/Microsoft.Network/publicIPAddresses/d115ad8b-389c-46ab-af72-d45066963f12\"\ \n }\n ],\n \"backendPoolType\": \"nodeIPConfiguration\"\n \ \ },\n \"podCidr\": \"10.244.0.0/16\",\n \"serviceCidr\": \"10.0.0.0/16\"\ ,\n \"dnsServiceIP\": \"10.0.0.10\",\n \"dockerBridgeCidr\": \"172.17.0.1/16\"\ @@ -512,11 +560,11 @@ interactions: cache-control: - no-cache content-length: - - '4462' + - '4458' content-type: - application/json date: - - Thu, 12 Jan 2023 06:20:21 GMT + - Fri, 13 Jan 2023 05:42:49 GMT expires: - '-1' pragma: @@ -564,7 +612,7 @@ interactions: content-type: - application/json date: - - Thu, 12 Jan 2023 06:20:22 GMT + - Fri, 13 Jan 2023 05:42:50 GMT expires: - '-1' pragma: @@ -585,7 +633,7 @@ interactions: - request: body: '{"properties": {"maintenanceWindow": {"schedule": {"weekly": {"intervalWeeks": 3, "dayOfWeek": "Friday"}}, "durationHours": 8, "utcOffset": "+05:30", "startDate": - "2023-01-22", "startTime": "00:00"}}}' + "2023-01-23", "startTime": "00:00"}}}' headers: Accept: - application/json @@ -614,7 +662,7 @@ interactions: \ \"maintenanceWindow\": {\n \"schedule\": {\n \"weekly\": {\n \ \ \"intervalWeeks\": 3,\n \"dayOfWeek\": \"Friday\"\n }\n },\n\ \ \"durationHours\": 8,\n \"utcOffset\": \"+05:30\",\n \"startDate\"\ - : \"2023-01-22\",\n \"startTime\": \"00:00\"\n }\n }\n }" + : \"2023-01-23\",\n \"startTime\": \"00:00\"\n }\n }\n }" headers: cache-control: - no-cache @@ -623,7 +671,7 @@ interactions: content-type: - application/json date: - - Thu, 12 Jan 2023 06:20:23 GMT + - Fri, 13 Jan 2023 05:42:50 GMT expires: - '-1' pragma: @@ -669,7 +717,7 @@ interactions: \ \"maintenanceWindow\": {\n \"schedule\": {\n \"weekly\":\ \ {\n \"intervalWeeks\": 3,\n \"dayOfWeek\": \"Friday\"\n \ \ }\n },\n \"durationHours\": 8,\n \"utcOffset\": \"+05:30\"\ - ,\n \"startDate\": \"2023-01-22\",\n \"startTime\": \"00:00\"\n\ + ,\n \"startDate\": \"2023-01-23\",\n \"startTime\": \"00:00\"\n\ \ }\n }\n }\n ]\n }" headers: cache-control: @@ -679,7 +727,7 @@ interactions: content-type: - application/json date: - - Thu, 12 Jan 2023 06:20:23 GMT + - Fri, 13 Jan 2023 05:42:51 GMT expires: - '-1' pragma: @@ -700,7 +748,7 @@ interactions: - request: body: '{"properties": {"maintenanceWindow": {"schedule": {"relativeMonthly": {"intervalMonths": 1, "weekIndex": "Last", "dayOfWeek": "Tuesday"}}, "durationHours": 12, "utcOffset": - "-08:00", "startDate": "2023-01-22", "startTime": "09:00"}}}' + "-08:00", "startDate": "2023-01-23", "startTime": "09:00"}}}' headers: Accept: - application/json @@ -729,7 +777,7 @@ interactions: \ \"maintenanceWindow\": {\n \"schedule\": {\n \"relativeMonthly\"\ : {\n \"intervalMonths\": 1,\n \"dayOfWeek\": \"Tuesday\",\n \ \ \"weekIndex\": \"Last\"\n }\n },\n \"durationHours\": 12,\n\ - \ \"utcOffset\": \"-08:00\",\n \"startDate\": \"2023-01-22\",\n \"\ + \ \"utcOffset\": \"-08:00\",\n \"startDate\": \"2023-01-23\",\n \"\ startTime\": \"09:00\"\n }\n }\n }" headers: cache-control: @@ -739,7 +787,7 @@ interactions: content-type: - application/json date: - - Thu, 12 Jan 2023 06:20:23 GMT + - Fri, 13 Jan 2023 05:42:51 GMT expires: - '-1' pragma: @@ -755,7 +803,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-writes: - - '1198' + - '1199' status: code: 200 message: OK @@ -784,13 +832,13 @@ interactions: \ \"maintenanceWindow\": {\n \"schedule\": {\n \"weekly\":\ \ {\n \"intervalWeeks\": 3,\n \"dayOfWeek\": \"Friday\"\n \ \ }\n },\n \"durationHours\": 8,\n \"utcOffset\": \"+05:30\"\ - ,\n \"startDate\": \"2023-01-22\",\n \"startTime\": \"00:00\"\n\ + ,\n \"startDate\": \"2023-01-23\",\n \"startTime\": \"00:00\"\n\ \ }\n }\n },\n {\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002/maintenanceConfigurations/aksManagedNodeOSUpgradeSchedule\"\ ,\n \"name\": \"aksManagedNodeOSUpgradeSchedule\",\n \"properties\"\ : {\n \"maintenanceWindow\": {\n \"schedule\": {\n \"relativeMonthly\"\ : {\n \"intervalMonths\": 1,\n \"dayOfWeek\": \"Tuesday\",\n\ \ \"weekIndex\": \"Last\"\n }\n },\n \"durationHours\"\ - : 12,\n \"utcOffset\": \"-08:00\",\n \"startDate\": \"2023-01-22\"\ + : 12,\n \"utcOffset\": \"-08:00\",\n \"startDate\": \"2023-01-23\"\ ,\n \"startTime\": \"09:00\"\n }\n }\n }\n ]\n }" headers: cache-control: @@ -800,7 +848,7 @@ interactions: content-type: - application/json date: - - Thu, 12 Jan 2023 06:20:24 GMT + - Fri, 13 Jan 2023 05:42:53 GMT expires: - '-1' pragma: @@ -843,13 +891,13 @@ interactions: \ \"maintenanceWindow\": {\n \"schedule\": {\n \"weekly\":\ \ {\n \"intervalWeeks\": 3,\n \"dayOfWeek\": \"Friday\"\n \ \ }\n },\n \"durationHours\": 8,\n \"utcOffset\": \"+05:30\"\ - ,\n \"startDate\": \"2023-01-22\",\n \"startTime\": \"00:00\"\n\ + ,\n \"startDate\": \"2023-01-23\",\n \"startTime\": \"00:00\"\n\ \ }\n }\n },\n {\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002/maintenanceConfigurations/aksManagedNodeOSUpgradeSchedule\"\ ,\n \"name\": \"aksManagedNodeOSUpgradeSchedule\",\n \"properties\"\ : {\n \"maintenanceWindow\": {\n \"schedule\": {\n \"relativeMonthly\"\ : {\n \"intervalMonths\": 1,\n \"dayOfWeek\": \"Tuesday\",\n\ \ \"weekIndex\": \"Last\"\n }\n },\n \"durationHours\"\ - : 12,\n \"utcOffset\": \"-08:00\",\n \"startDate\": \"2023-01-22\"\ + : 12,\n \"utcOffset\": \"-08:00\",\n \"startDate\": \"2023-01-23\"\ ,\n \"startTime\": \"09:00\"\n }\n }\n }\n ]\n }" headers: cache-control: @@ -859,7 +907,7 @@ interactions: content-type: - application/json date: - - Thu, 12 Jan 2023 06:20:25 GMT + - Fri, 13 Jan 2023 05:42:53 GMT expires: - '-1' pragma: @@ -909,7 +957,7 @@ interactions: \ \"maintenanceWindow\": {\n \"schedule\": {\n \"absoluteMonthly\"\ : {\n \"intervalMonths\": 3,\n \"dayOfMonth\": 1\n }\n },\n\ \ \"durationHours\": 4,\n \"utcOffset\": \"-08:00\",\n \"startDate\"\ - : \"2023-01-11\",\n \"startTime\": \"09:00\",\n \"notAllowedDates\"\ + : \"2023-01-12\",\n \"startTime\": \"09:00\",\n \"notAllowedDates\"\ : [\n {\n \"start\": \"2022-12-23\",\n \"end\": \"2023-01-05\"\ \n },\n {\n \"start\": \"2023-11-23\",\n \"end\": \"2023-11-26\"\ \n }\n ]\n }\n }\n }" @@ -921,7 +969,7 @@ interactions: content-type: - application/json date: - - Thu, 12 Jan 2023 06:20:25 GMT + - Fri, 13 Jan 2023 05:42:54 GMT expires: - '-1' pragma: @@ -966,7 +1014,7 @@ interactions: \ \"maintenanceWindow\": {\n \"schedule\": {\n \"absoluteMonthly\"\ : {\n \"intervalMonths\": 3,\n \"dayOfMonth\": 1\n }\n },\n\ \ \"durationHours\": 4,\n \"utcOffset\": \"-08:00\",\n \"startDate\"\ - : \"2023-01-11\",\n \"startTime\": \"09:00\",\n \"notAllowedDates\"\ + : \"2023-01-12\",\n \"startTime\": \"09:00\",\n \"notAllowedDates\"\ : [\n {\n \"start\": \"2022-12-23\",\n \"end\": \"2023-01-05\"\ \n },\n {\n \"start\": \"2023-11-23\",\n \"end\": \"2023-11-26\"\ \n }\n ]\n }\n }\n }" @@ -978,7 +1026,7 @@ interactions: content-type: - application/json date: - - Thu, 12 Jan 2023 06:20:26 GMT + - Fri, 13 Jan 2023 05:42:55 GMT expires: - '-1' pragma: @@ -1025,7 +1073,7 @@ interactions: content-length: - '0' date: - - Thu, 12 Jan 2023 06:20:27 GMT + - Fri, 13 Jan 2023 05:42:55 GMT expires: - '-1' pragma: @@ -1070,7 +1118,7 @@ interactions: content-length: - '0' date: - - Thu, 12 Jan 2023 06:20:29 GMT + - Fri, 13 Jan 2023 05:42:56 GMT expires: - '-1' pragma: @@ -1115,7 +1163,7 @@ interactions: content-type: - application/json date: - - Thu, 12 Jan 2023 06:20:29 GMT + - Fri, 13 Jan 2023 05:42:57 GMT expires: - '-1' pragma: @@ -1124,6 +1172,10 @@ interactions: - nginx strict-transport-security: - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding x-content-type-options: - nosniff status: @@ -1154,17 +1206,17 @@ interactions: string: '' headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/b032b03e-cbd3-4f72-918d-25cb389e957e?api-version=2016-03-30 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/dfb1774d-64a6-47f8-9e55-8d5f39bdf7b4?api-version=2016-03-30 cache-control: - no-cache content-length: - '0' date: - - Thu, 12 Jan 2023 06:20:30 GMT + - Fri, 13 Jan 2023 05:42:58 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operationresults/b032b03e-cbd3-4f72-918d-25cb389e957e?api-version=2016-03-30 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operationresults/dfb1774d-64a6-47f8-9e55-8d5f39bdf7b4?api-version=2016-03-30 pragma: - no-cache server: From 114283f040bc17171e27057bc0522c624e65fbf3 Mon Sep 17 00:00:00 2001 From: Thalia Wang Date: Fri, 13 Jan 2023 09:22:06 -0800 Subject: [PATCH 10/10] Use fixed future date --- .../test_aks_maintenancewindow.yaml | 182 +++++++++++------- .../tests/latest/test_aks_commands.py | 2 +- 2 files changed, 116 insertions(+), 68 deletions(-) diff --git a/src/aks-preview/azext_aks_preview/tests/latest/recordings/test_aks_maintenancewindow.yaml b/src/aks-preview/azext_aks_preview/tests/latest/recordings/test_aks_maintenancewindow.yaml index 416d3440a04..9e668358820 100644 --- a/src/aks-preview/azext_aks_preview/tests/latest/recordings/test_aks_maintenancewindow.yaml +++ b/src/aks-preview/azext_aks_preview/tests/latest/recordings/test_aks_maintenancewindow.yaml @@ -19,7 +19,7 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001?api-version=2021-04-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001","name":"clitest000001","type":"Microsoft.Resources/resourceGroups","location":"westus2","tags":{"product":"azurecli","cause":"automation","date":"2023-01-13T05:39:09Z"},"properties":{"provisioningState":"Succeeded"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001","name":"clitest000001","type":"Microsoft.Resources/resourceGroups","location":"westus2","tags":{"product":"azurecli","cause":"automation","date":"2023-01-13T17:02:55Z"},"properties":{"provisioningState":"Succeeded"}}' headers: cache-control: - no-cache @@ -28,7 +28,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 13 Jan 2023 05:39:11 GMT + - Fri, 13 Jan 2023 17:02:56 GMT expires: - '-1' pragma: @@ -44,7 +44,7 @@ interactions: message: OK - request: body: '{"location": "westus2", "identity": {"type": "SystemAssigned"}, "properties": - {"kubernetesVersion": "", "dnsPrefix": "cliakstest-clitestroj3ihpef-8ecadf", + {"kubernetesVersion": "", "dnsPrefix": "cliakstest-clitest62wqiidpf-8ecadf", "agentPoolProfiles": [{"count": 3, "vmSize": "Standard_DS2_v2", "osDiskSizeGB": 0, "workloadRuntime": "OCIContainer", "osType": "Linux", "enableAutoScaling": false, "type": "VirtualMachineScaleSets", "mode": "System", "orchestratorVersion": @@ -85,9 +85,9 @@ interactions: : \"Microsoft.ContainerService/ManagedClusters\",\n \"properties\": {\n \ \ \"provisioningState\": \"Creating\",\n \"powerState\": {\n \"code\"\ : \"Running\"\n },\n \"kubernetesVersion\": \"1.24.6\",\n \"currentKubernetesVersion\"\ - : \"1.24.6\",\n \"dnsPrefix\": \"cliakstest-clitestroj3ihpef-8ecadf\",\n\ - \ \"fqdn\": \"cliakstest-clitestroj3ihpef-8ecadf-a59e3500.hcp.westus2.azmk8s.io\"\ - ,\n \"azurePortalFQDN\": \"cliakstest-clitestroj3ihpef-8ecadf-a59e3500.portal.hcp.westus2.azmk8s.io\"\ + : \"1.24.6\",\n \"dnsPrefix\": \"cliakstest-clitest62wqiidpf-8ecadf\",\n\ + \ \"fqdn\": \"cliakstest-clitest62wqiidpf-8ecadf-39f58cee.hcp.westus2.azmk8s.io\"\ + ,\n \"azurePortalFQDN\": \"cliakstest-clitest62wqiidpf-8ecadf-39f58cee.portal.hcp.westus2.azmk8s.io\"\ ,\n \"agentPoolProfiles\": [\n {\n \"name\": \"nodepool1\",\n \ \ \"count\": 3,\n \"vmSize\": \"Standard_DS2_v2\",\n \"osDiskSizeGB\"\ : 128,\n \"osDiskType\": \"Managed\",\n \"kubeletDiskType\": \"OS\"\ @@ -126,7 +126,7 @@ interactions: : {\n \"name\": \"Basic\",\n \"tier\": \"Free\"\n }\n }" headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/2726e294-a23a-4699-bbd5-93dbe77c56d6?api-version=2016-03-30 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/bc861dd3-efcb-4fe3-8073-c8262b4cce4e?api-version=2016-03-30 cache-control: - no-cache content-length: @@ -134,7 +134,7 @@ interactions: content-type: - application/json date: - - Fri, 13 Jan 2023 05:39:17 GMT + - Fri, 13 Jan 2023 17:03:01 GMT expires: - '-1' pragma: @@ -167,11 +167,11 @@ interactions: - AZURECLI/2.44.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/21.0.0b Python/3.10.2 (Linux-5.10.104-linuxkit-x86_64-with) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/2726e294-a23a-4699-bbd5-93dbe77c56d6?api-version=2016-03-30 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/bc861dd3-efcb-4fe3-8073-c8262b4cce4e?api-version=2016-03-30 response: body: - string: "{\n \"name\": \"94e22627-3aa2-9946-bbd5-93dbe77c56d6\",\n \"status\"\ - : \"InProgress\",\n \"startTime\": \"2023-01-13T05:39:17.9099724Z\"\n }" + string: "{\n \"name\": \"d31d86bc-cbef-e34f-8073-c8262b4cce4e\",\n \"status\"\ + : \"InProgress\",\n \"startTime\": \"2023-01-13T17:03:01.4936713Z\"\n }" headers: cache-control: - no-cache @@ -180,7 +180,7 @@ interactions: content-type: - application/json date: - - Fri, 13 Jan 2023 05:39:47 GMT + - Fri, 13 Jan 2023 17:03:31 GMT expires: - '-1' pragma: @@ -215,11 +215,11 @@ interactions: - AZURECLI/2.44.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/21.0.0b Python/3.10.2 (Linux-5.10.104-linuxkit-x86_64-with) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/2726e294-a23a-4699-bbd5-93dbe77c56d6?api-version=2016-03-30 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/bc861dd3-efcb-4fe3-8073-c8262b4cce4e?api-version=2016-03-30 response: body: - string: "{\n \"name\": \"94e22627-3aa2-9946-bbd5-93dbe77c56d6\",\n \"status\"\ - : \"InProgress\",\n \"startTime\": \"2023-01-13T05:39:17.9099724Z\"\n }" + string: "{\n \"name\": \"d31d86bc-cbef-e34f-8073-c8262b4cce4e\",\n \"status\"\ + : \"InProgress\",\n \"startTime\": \"2023-01-13T17:03:01.4936713Z\"\n }" headers: cache-control: - no-cache @@ -228,7 +228,7 @@ interactions: content-type: - application/json date: - - Fri, 13 Jan 2023 05:40:18 GMT + - Fri, 13 Jan 2023 17:04:01 GMT expires: - '-1' pragma: @@ -263,11 +263,11 @@ interactions: - AZURECLI/2.44.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/21.0.0b Python/3.10.2 (Linux-5.10.104-linuxkit-x86_64-with) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/2726e294-a23a-4699-bbd5-93dbe77c56d6?api-version=2016-03-30 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/bc861dd3-efcb-4fe3-8073-c8262b4cce4e?api-version=2016-03-30 response: body: - string: "{\n \"name\": \"94e22627-3aa2-9946-bbd5-93dbe77c56d6\",\n \"status\"\ - : \"InProgress\",\n \"startTime\": \"2023-01-13T05:39:17.9099724Z\"\n }" + string: "{\n \"name\": \"d31d86bc-cbef-e34f-8073-c8262b4cce4e\",\n \"status\"\ + : \"InProgress\",\n \"startTime\": \"2023-01-13T17:03:01.4936713Z\"\n }" headers: cache-control: - no-cache @@ -276,7 +276,7 @@ interactions: content-type: - application/json date: - - Fri, 13 Jan 2023 05:40:48 GMT + - Fri, 13 Jan 2023 17:04:32 GMT expires: - '-1' pragma: @@ -311,11 +311,11 @@ interactions: - AZURECLI/2.44.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/21.0.0b Python/3.10.2 (Linux-5.10.104-linuxkit-x86_64-with) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/2726e294-a23a-4699-bbd5-93dbe77c56d6?api-version=2016-03-30 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/bc861dd3-efcb-4fe3-8073-c8262b4cce4e?api-version=2016-03-30 response: body: - string: "{\n \"name\": \"94e22627-3aa2-9946-bbd5-93dbe77c56d6\",\n \"status\"\ - : \"InProgress\",\n \"startTime\": \"2023-01-13T05:39:17.9099724Z\"\n }" + string: "{\n \"name\": \"d31d86bc-cbef-e34f-8073-c8262b4cce4e\",\n \"status\"\ + : \"InProgress\",\n \"startTime\": \"2023-01-13T17:03:01.4936713Z\"\n }" headers: cache-control: - no-cache @@ -324,7 +324,7 @@ interactions: content-type: - application/json date: - - Fri, 13 Jan 2023 05:41:18 GMT + - Fri, 13 Jan 2023 17:05:01 GMT expires: - '-1' pragma: @@ -359,11 +359,11 @@ interactions: - AZURECLI/2.44.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/21.0.0b Python/3.10.2 (Linux-5.10.104-linuxkit-x86_64-with) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/2726e294-a23a-4699-bbd5-93dbe77c56d6?api-version=2016-03-30 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/bc861dd3-efcb-4fe3-8073-c8262b4cce4e?api-version=2016-03-30 response: body: - string: "{\n \"name\": \"94e22627-3aa2-9946-bbd5-93dbe77c56d6\",\n \"status\"\ - : \"InProgress\",\n \"startTime\": \"2023-01-13T05:39:17.9099724Z\"\n }" + string: "{\n \"name\": \"d31d86bc-cbef-e34f-8073-c8262b4cce4e\",\n \"status\"\ + : \"InProgress\",\n \"startTime\": \"2023-01-13T17:03:01.4936713Z\"\n }" headers: cache-control: - no-cache @@ -372,7 +372,7 @@ interactions: content-type: - application/json date: - - Fri, 13 Jan 2023 05:41:48 GMT + - Fri, 13 Jan 2023 17:05:32 GMT expires: - '-1' pragma: @@ -407,11 +407,11 @@ interactions: - AZURECLI/2.44.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/21.0.0b Python/3.10.2 (Linux-5.10.104-linuxkit-x86_64-with) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/2726e294-a23a-4699-bbd5-93dbe77c56d6?api-version=2016-03-30 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/bc861dd3-efcb-4fe3-8073-c8262b4cce4e?api-version=2016-03-30 response: body: - string: "{\n \"name\": \"94e22627-3aa2-9946-bbd5-93dbe77c56d6\",\n \"status\"\ - : \"InProgress\",\n \"startTime\": \"2023-01-13T05:39:17.9099724Z\"\n }" + string: "{\n \"name\": \"d31d86bc-cbef-e34f-8073-c8262b4cce4e\",\n \"status\"\ + : \"InProgress\",\n \"startTime\": \"2023-01-13T17:03:01.4936713Z\"\n }" headers: cache-control: - no-cache @@ -420,7 +420,7 @@ interactions: content-type: - application/json date: - - Fri, 13 Jan 2023 05:42:19 GMT + - Fri, 13 Jan 2023 17:06:02 GMT expires: - '-1' pragma: @@ -455,12 +455,60 @@ interactions: - AZURECLI/2.44.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/21.0.0b Python/3.10.2 (Linux-5.10.104-linuxkit-x86_64-with) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/2726e294-a23a-4699-bbd5-93dbe77c56d6?api-version=2016-03-30 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/bc861dd3-efcb-4fe3-8073-c8262b4cce4e?api-version=2016-03-30 response: body: - string: "{\n \"name\": \"94e22627-3aa2-9946-bbd5-93dbe77c56d6\",\n \"status\"\ - : \"Succeeded\",\n \"startTime\": \"2023-01-13T05:39:17.9099724Z\",\n \"\ - endTime\": \"2023-01-13T05:42:26.0317551Z\"\n }" + string: "{\n \"name\": \"d31d86bc-cbef-e34f-8073-c8262b4cce4e\",\n \"status\"\ + : \"InProgress\",\n \"startTime\": \"2023-01-13T17:03:01.4936713Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Fri, 13 Jan 2023 17:06:32 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --ssh-key-value + User-Agent: + - AZURECLI/2.44.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/21.0.0b + Python/3.10.2 (Linux-5.10.104-linuxkit-x86_64-with) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/bc861dd3-efcb-4fe3-8073-c8262b4cce4e?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"d31d86bc-cbef-e34f-8073-c8262b4cce4e\",\n \"status\"\ + : \"Succeeded\",\n \"startTime\": \"2023-01-13T17:03:01.4936713Z\",\n \"\ + endTime\": \"2023-01-13T17:06:38.5118813Z\"\n }" headers: cache-control: - no-cache @@ -469,7 +517,7 @@ interactions: content-type: - application/json date: - - Fri, 13 Jan 2023 05:42:49 GMT + - Fri, 13 Jan 2023 17:07:02 GMT expires: - '-1' pragma: @@ -512,9 +560,9 @@ interactions: : \"Microsoft.ContainerService/ManagedClusters\",\n \"properties\": {\n \ \ \"provisioningState\": \"Succeeded\",\n \"powerState\": {\n \"code\"\ : \"Running\"\n },\n \"kubernetesVersion\": \"1.24.6\",\n \"currentKubernetesVersion\"\ - : \"1.24.6\",\n \"dnsPrefix\": \"cliakstest-clitestroj3ihpef-8ecadf\",\n\ - \ \"fqdn\": \"cliakstest-clitestroj3ihpef-8ecadf-a59e3500.hcp.westus2.azmk8s.io\"\ - ,\n \"azurePortalFQDN\": \"cliakstest-clitestroj3ihpef-8ecadf-a59e3500.portal.hcp.westus2.azmk8s.io\"\ + : \"1.24.6\",\n \"dnsPrefix\": \"cliakstest-clitest62wqiidpf-8ecadf\",\n\ + \ \"fqdn\": \"cliakstest-clitest62wqiidpf-8ecadf-39f58cee.hcp.westus2.azmk8s.io\"\ + ,\n \"azurePortalFQDN\": \"cliakstest-clitest62wqiidpf-8ecadf-39f58cee.portal.hcp.westus2.azmk8s.io\"\ ,\n \"agentPoolProfiles\": [\n {\n \"name\": \"nodepool1\",\n \ \ \"count\": 3,\n \"vmSize\": \"Standard_DS2_v2\",\n \"osDiskSizeGB\"\ : 128,\n \"osDiskType\": \"Managed\",\n \"kubeletDiskType\": \"OS\"\ @@ -538,7 +586,7 @@ interactions: : {\n \"networkPlugin\": \"kubenet\",\n \"loadBalancerSku\": \"Standard\"\ ,\n \"loadBalancerProfile\": {\n \"managedOutboundIPs\": {\n \"\ count\": 1\n },\n \"effectiveOutboundIPs\": [\n {\n \"\ - id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_clitest000001_cliakstest000002_westus2/providers/Microsoft.Network/publicIPAddresses/d115ad8b-389c-46ab-af72-d45066963f12\"\ + id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_clitest000001_cliakstest000002_westus2/providers/Microsoft.Network/publicIPAddresses/775f44ce-4667-4095-b2e1-9f50a1f6292b\"\ \n }\n ],\n \"backendPoolType\": \"nodeIPConfiguration\"\n \ \ },\n \"podCidr\": \"10.244.0.0/16\",\n \"serviceCidr\": \"10.0.0.0/16\"\ ,\n \"dnsServiceIP\": \"10.0.0.10\",\n \"dockerBridgeCidr\": \"172.17.0.1/16\"\ @@ -564,7 +612,7 @@ interactions: content-type: - application/json date: - - Fri, 13 Jan 2023 05:42:49 GMT + - Fri, 13 Jan 2023 17:07:02 GMT expires: - '-1' pragma: @@ -612,7 +660,7 @@ interactions: content-type: - application/json date: - - Fri, 13 Jan 2023 05:42:50 GMT + - Fri, 13 Jan 2023 17:07:04 GMT expires: - '-1' pragma: @@ -633,7 +681,7 @@ interactions: - request: body: '{"properties": {"maintenanceWindow": {"schedule": {"weekly": {"intervalWeeks": 3, "dayOfWeek": "Friday"}}, "durationHours": 8, "utcOffset": "+05:30", "startDate": - "2023-01-23", "startTime": "00:00"}}}' + "2123-01-01", "startTime": "00:00"}}}' headers: Accept: - application/json @@ -662,7 +710,7 @@ interactions: \ \"maintenanceWindow\": {\n \"schedule\": {\n \"weekly\": {\n \ \ \"intervalWeeks\": 3,\n \"dayOfWeek\": \"Friday\"\n }\n },\n\ \ \"durationHours\": 8,\n \"utcOffset\": \"+05:30\",\n \"startDate\"\ - : \"2023-01-23\",\n \"startTime\": \"00:00\"\n }\n }\n }" + : \"2123-01-01\",\n \"startTime\": \"00:00\"\n }\n }\n }" headers: cache-control: - no-cache @@ -671,7 +719,7 @@ interactions: content-type: - application/json date: - - Fri, 13 Jan 2023 05:42:50 GMT + - Fri, 13 Jan 2023 17:07:04 GMT expires: - '-1' pragma: @@ -717,7 +765,7 @@ interactions: \ \"maintenanceWindow\": {\n \"schedule\": {\n \"weekly\":\ \ {\n \"intervalWeeks\": 3,\n \"dayOfWeek\": \"Friday\"\n \ \ }\n },\n \"durationHours\": 8,\n \"utcOffset\": \"+05:30\"\ - ,\n \"startDate\": \"2023-01-23\",\n \"startTime\": \"00:00\"\n\ + ,\n \"startDate\": \"2123-01-01\",\n \"startTime\": \"00:00\"\n\ \ }\n }\n }\n ]\n }" headers: cache-control: @@ -727,7 +775,7 @@ interactions: content-type: - application/json date: - - Fri, 13 Jan 2023 05:42:51 GMT + - Fri, 13 Jan 2023 17:07:05 GMT expires: - '-1' pragma: @@ -748,7 +796,7 @@ interactions: - request: body: '{"properties": {"maintenanceWindow": {"schedule": {"relativeMonthly": {"intervalMonths": 1, "weekIndex": "Last", "dayOfWeek": "Tuesday"}}, "durationHours": 12, "utcOffset": - "-08:00", "startDate": "2023-01-23", "startTime": "09:00"}}}' + "-08:00", "startDate": "2123-01-01", "startTime": "09:00"}}}' headers: Accept: - application/json @@ -777,7 +825,7 @@ interactions: \ \"maintenanceWindow\": {\n \"schedule\": {\n \"relativeMonthly\"\ : {\n \"intervalMonths\": 1,\n \"dayOfWeek\": \"Tuesday\",\n \ \ \"weekIndex\": \"Last\"\n }\n },\n \"durationHours\": 12,\n\ - \ \"utcOffset\": \"-08:00\",\n \"startDate\": \"2023-01-23\",\n \"\ + \ \"utcOffset\": \"-08:00\",\n \"startDate\": \"2123-01-01\",\n \"\ startTime\": \"09:00\"\n }\n }\n }" headers: cache-control: @@ -787,7 +835,7 @@ interactions: content-type: - application/json date: - - Fri, 13 Jan 2023 05:42:51 GMT + - Fri, 13 Jan 2023 17:07:06 GMT expires: - '-1' pragma: @@ -832,13 +880,13 @@ interactions: \ \"maintenanceWindow\": {\n \"schedule\": {\n \"weekly\":\ \ {\n \"intervalWeeks\": 3,\n \"dayOfWeek\": \"Friday\"\n \ \ }\n },\n \"durationHours\": 8,\n \"utcOffset\": \"+05:30\"\ - ,\n \"startDate\": \"2023-01-23\",\n \"startTime\": \"00:00\"\n\ + ,\n \"startDate\": \"2123-01-01\",\n \"startTime\": \"00:00\"\n\ \ }\n }\n },\n {\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002/maintenanceConfigurations/aksManagedNodeOSUpgradeSchedule\"\ ,\n \"name\": \"aksManagedNodeOSUpgradeSchedule\",\n \"properties\"\ : {\n \"maintenanceWindow\": {\n \"schedule\": {\n \"relativeMonthly\"\ : {\n \"intervalMonths\": 1,\n \"dayOfWeek\": \"Tuesday\",\n\ \ \"weekIndex\": \"Last\"\n }\n },\n \"durationHours\"\ - : 12,\n \"utcOffset\": \"-08:00\",\n \"startDate\": \"2023-01-23\"\ + : 12,\n \"utcOffset\": \"-08:00\",\n \"startDate\": \"2123-01-01\"\ ,\n \"startTime\": \"09:00\"\n }\n }\n }\n ]\n }" headers: cache-control: @@ -848,7 +896,7 @@ interactions: content-type: - application/json date: - - Fri, 13 Jan 2023 05:42:53 GMT + - Fri, 13 Jan 2023 17:07:06 GMT expires: - '-1' pragma: @@ -891,13 +939,13 @@ interactions: \ \"maintenanceWindow\": {\n \"schedule\": {\n \"weekly\":\ \ {\n \"intervalWeeks\": 3,\n \"dayOfWeek\": \"Friday\"\n \ \ }\n },\n \"durationHours\": 8,\n \"utcOffset\": \"+05:30\"\ - ,\n \"startDate\": \"2023-01-23\",\n \"startTime\": \"00:00\"\n\ + ,\n \"startDate\": \"2123-01-01\",\n \"startTime\": \"00:00\"\n\ \ }\n }\n },\n {\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002/maintenanceConfigurations/aksManagedNodeOSUpgradeSchedule\"\ ,\n \"name\": \"aksManagedNodeOSUpgradeSchedule\",\n \"properties\"\ : {\n \"maintenanceWindow\": {\n \"schedule\": {\n \"relativeMonthly\"\ : {\n \"intervalMonths\": 1,\n \"dayOfWeek\": \"Tuesday\",\n\ \ \"weekIndex\": \"Last\"\n }\n },\n \"durationHours\"\ - : 12,\n \"utcOffset\": \"-08:00\",\n \"startDate\": \"2023-01-23\"\ + : 12,\n \"utcOffset\": \"-08:00\",\n \"startDate\": \"2123-01-01\"\ ,\n \"startTime\": \"09:00\"\n }\n }\n }\n ]\n }" headers: cache-control: @@ -907,7 +955,7 @@ interactions: content-type: - application/json date: - - Fri, 13 Jan 2023 05:42:53 GMT + - Fri, 13 Jan 2023 17:07:07 GMT expires: - '-1' pragma: @@ -957,7 +1005,7 @@ interactions: \ \"maintenanceWindow\": {\n \"schedule\": {\n \"absoluteMonthly\"\ : {\n \"intervalMonths\": 3,\n \"dayOfMonth\": 1\n }\n },\n\ \ \"durationHours\": 4,\n \"utcOffset\": \"-08:00\",\n \"startDate\"\ - : \"2023-01-12\",\n \"startTime\": \"09:00\",\n \"notAllowedDates\"\ + : \"2023-01-13\",\n \"startTime\": \"09:00\",\n \"notAllowedDates\"\ : [\n {\n \"start\": \"2022-12-23\",\n \"end\": \"2023-01-05\"\ \n },\n {\n \"start\": \"2023-11-23\",\n \"end\": \"2023-11-26\"\ \n }\n ]\n }\n }\n }" @@ -969,7 +1017,7 @@ interactions: content-type: - application/json date: - - Fri, 13 Jan 2023 05:42:54 GMT + - Fri, 13 Jan 2023 17:07:07 GMT expires: - '-1' pragma: @@ -1014,7 +1062,7 @@ interactions: \ \"maintenanceWindow\": {\n \"schedule\": {\n \"absoluteMonthly\"\ : {\n \"intervalMonths\": 3,\n \"dayOfMonth\": 1\n }\n },\n\ \ \"durationHours\": 4,\n \"utcOffset\": \"-08:00\",\n \"startDate\"\ - : \"2023-01-12\",\n \"startTime\": \"09:00\",\n \"notAllowedDates\"\ + : \"2023-01-13\",\n \"startTime\": \"09:00\",\n \"notAllowedDates\"\ : [\n {\n \"start\": \"2022-12-23\",\n \"end\": \"2023-01-05\"\ \n },\n {\n \"start\": \"2023-11-23\",\n \"end\": \"2023-11-26\"\ \n }\n ]\n }\n }\n }" @@ -1026,7 +1074,7 @@ interactions: content-type: - application/json date: - - Fri, 13 Jan 2023 05:42:55 GMT + - Fri, 13 Jan 2023 17:07:08 GMT expires: - '-1' pragma: @@ -1073,7 +1121,7 @@ interactions: content-length: - '0' date: - - Fri, 13 Jan 2023 05:42:55 GMT + - Fri, 13 Jan 2023 17:07:08 GMT expires: - '-1' pragma: @@ -1118,7 +1166,7 @@ interactions: content-length: - '0' date: - - Fri, 13 Jan 2023 05:42:56 GMT + - Fri, 13 Jan 2023 17:07:10 GMT expires: - '-1' pragma: @@ -1163,7 +1211,7 @@ interactions: content-type: - application/json date: - - Fri, 13 Jan 2023 05:42:57 GMT + - Fri, 13 Jan 2023 17:07:11 GMT expires: - '-1' pragma: @@ -1206,17 +1254,17 @@ interactions: string: '' headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/dfb1774d-64a6-47f8-9e55-8d5f39bdf7b4?api-version=2016-03-30 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/af192e4d-469c-45c5-b2d7-0fb765deec7e?api-version=2016-03-30 cache-control: - no-cache content-length: - '0' date: - - Fri, 13 Jan 2023 05:42:58 GMT + - Fri, 13 Jan 2023 17:07:12 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operationresults/dfb1774d-64a6-47f8-9e55-8d5f39bdf7b4?api-version=2016-03-30 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operationresults/af192e4d-469c-45c5-b2d7-0fb765deec7e?api-version=2016-03-30 pragma: - no-cache server: diff --git a/src/aks-preview/azext_aks_preview/tests/latest/test_aks_commands.py b/src/aks-preview/azext_aks_preview/tests/latest/test_aks_commands.py index ba642a4bc75..263c7322e81 100644 --- a/src/aks-preview/azext_aks_preview/tests/latest/test_aks_commands.py +++ b/src/aks-preview/azext_aks_preview/tests/latest/test_aks_commands.py @@ -3705,7 +3705,7 @@ def test_aks_maintenancewindow(self, resource_group, resource_group_location): 'auto_upgrade_config_name': 'aksManagedAutoUpgradeSchedule', 'node_os_upgrade_config_name': 'aksManagedNodeOSUpgradeSchedule', 'ssh_key_value': self.generate_ssh_keys(), - 'future_date': (datetime.datetime.now() + datetime.timedelta(days=10)).strftime("%Y-%m-%d") + 'future_date': "2123-01-01" }) create_cmd = 'aks create --resource-group={resource_group} --name={name} --ssh-key-value={ssh_key_value}'