Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/fleet/azext_fleet/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def register_fleet_resource_type():
register_resource_type(
"latest",
CUSTOM_MGMT_FLEET,
SDKProfile("2025-03-01"),
SDKProfile("2025-04-01-preview"),
)


Expand Down
2 changes: 2 additions & 0 deletions src/fleet/azext_fleet/_client_factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ def cf_fleets(cli_ctx, *_):
def cf_fleet_members(cli_ctx, *_):
return get_container_service_client(cli_ctx).fleet_members

def cf_gates(cli_ctx, *_):
return get_container_service_client(cli_ctx).gates

def cf_update_runs(cli_ctx, *_):
return get_container_service_client(cli_ctx).update_runs
Expand Down
14 changes: 12 additions & 2 deletions src/fleet/azext_fleet/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
cf_update_runs,
cf_fleet_update_strategies,
cf_auto_upgrade_profiles,
cf_auto_upgrade_profile_operations

cf_auto_upgrade_profile_operations,
cf_gates
)


Expand Down Expand Up @@ -54,6 +54,12 @@ def load_command_table(self, _):
client_factory=cf_auto_upgrade_profile_operations
)

gates_sdk = CliCommandType(
operations_tmpl="azext_fleet.vendored_sdks.operations._gates_operations#GatesOperations.{}",
operation_group="gates",
client_factory=cf_gates
)

# fleets command group
with self.command_group("fleet", fleets_sdk, client_factory=cf_fleets) as g:
g.custom_command("create", "create_fleet", supports_no_wait=True)
Expand Down Expand Up @@ -105,3 +111,7 @@ def load_command_table(self, _):
# auto upgrade profiles operation command group
with self.command_group("fleet autoupgradeprofile", auto_upgrade_profile_operations_sdk, client_factory=cf_auto_upgrade_profile_operations) as g:
g.custom_command("generate-update-run", "generate_update_run", supports_no_wait=True)

# fleet gates command group
with self.command_group("fleet gate", gates_sdk, client_factory=cf_gates) as g:
g.custom_command("list", "list_gates_by_fleet")
6 changes: 6 additions & 0 deletions src/fleet/azext_fleet/custom.py
Original file line number Diff line number Diff line change
Expand Up @@ -622,3 +622,9 @@ def generate_update_run(cmd, # pylint: disable=unused-argument
fleet_name,
auto_upgrade_profile_name
)

def list_gates_by_fleet(cmd, # pylint: disable=unused-argument
client,
resource_group_name,
fleet_name):
return client.list_by_fleet(resource_group_name, fleet_name)

Large diffs are not rendered by default.

Loading
Loading