Skip to content

Commit 5d4668d

Browse files
Copilotaudrastump
andcommitted
Fix fleet operations template paths to use correct API version
Co-authored-by: audrastump <71152145+audrastump@users.noreply.github.com>
1 parent 5efeb2f commit 5d4668d

File tree

1 file changed

+18
-17
lines changed

1 file changed

+18
-17
lines changed

src/fleet/azext_fleet/commands.py

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -19,46 +19,47 @@
1919
def load_command_table(self, _):
2020

2121
fleets_sdk = CliCommandType(
22-
operations_tmpl="azext_fleet.vendored_sdks.operations._fleets_operations#FleetsOperations.{}",
22+
operations_tmpl="azext_fleet.vendored_sdks.v2025_04_01_preview.operations._fleets_operations#FleetsOperations.{}",
2323
operation_group="fleets",
2424
client_factory=cf_fleets
2525
)
2626

2727
fleet_members_sdk = CliCommandType(
28-
operations_tmpl="azext_fleet.vendored_sdks.operations._fleet_members_operations#FleetMembersOperations.{}",
28+
operations_tmpl="azext_fleet.vendored_sdks.v2025_04_01_preview.operations._fleet_members_operations#FleetMembersOperations.{}",
2929
operation_group="fleet_members",
3030
client_factory=cf_fleet_members
3131
)
3232

3333
update_runs_sdk = CliCommandType(
34-
operations_tmpl="azext_fleet.vendored_sdks.operations._update_runs_operations#UpdateRunsOperations.{}",
34+
operations_tmpl="azext_fleet.vendored_sdks.v2025_04_01_preview.operations._update_runs_operations#UpdateRunsOperations.{}",
3535
operation_group="update_runs",
3636
client_factory=cf_update_runs
3737
)
3838

3939
fleet_update_strategy_sdk = CliCommandType(
40-
operations_tmpl="azext_fleet.vendored_sdks.operations._fleet_update_strategies_operations#FleetUpdateStrategiesOperations.{}",
40+
operations_tmpl="azext_fleet.vendored_sdks.v2025_04_01_preview.operations._fleet_update_strategies_operations#FleetUpdateStrategiesOperations.{}",
4141
operation_group="fleet_update_strategies",
4242
client_factory=cf_fleet_update_strategies
4343
)
4444

4545
auto_upgrade_profiles_sdk = CliCommandType(
46-
operations_tmpl="azext_fleet.vendored_sdks.operations._auto_upgrade_profiles_operations#AutoUpgradeProfilesOperations.{}",
46+
operations_tmpl="azext_fleet.vendored_sdks.v2025_04_01_preview.operations._auto_upgrade_profiles_operations#AutoUpgradeProfilesOperations.{}",
4747
operation_group="auto_upgrade_profiles",
4848
client_factory=cf_auto_upgrade_profiles
4949
)
5050

5151
auto_upgrade_profile_operations_sdk = CliCommandType(
52-
operations_tmpl="azext_fleet.vendored_sdks.operations._auto_upgrade_profile_operations_operations#AutoUpgradeProfileOperationsOperations.{}",
52+
operations_tmpl="azext_fleet.vendored_sdks.v2025_04_01_preview.operations._auto_upgrade_profile_operations_operations#AutoUpgradeProfileOperationsOperations.{}",
5353
operation_group="auto_upgrade_profile_operations",
5454
client_factory=cf_auto_upgrade_profile_operations
5555
)
5656

57-
gates_sdk = CliCommandType(
58-
operations_tmpl="azext_fleet.vendored_sdks.operations._gates_operations#GatesOperations.{}",
59-
operation_group="gates",
60-
client_factory=cf_gates
61-
)
57+
# Note: Gates operations not available in v2025_04_01_preview API version
58+
# gates_sdk = CliCommandType(
59+
# operations_tmpl="azext_fleet.vendored_sdks.v2025_04_01_preview.operations._gates_operations#GatesOperations.{}",
60+
# operation_group="gates",
61+
# client_factory=cf_gates
62+
# )
6263

6364
# fleets command group
6465
with self.command_group("fleet", fleets_sdk, client_factory=cf_fleets) as g:
@@ -112,9 +113,9 @@ def load_command_table(self, _):
112113
with self.command_group("fleet autoupgradeprofile", auto_upgrade_profile_operations_sdk, client_factory=cf_auto_upgrade_profile_operations) as g:
113114
g.custom_command("generate-update-run", "generate_update_run", supports_no_wait=True)
114115

115-
# fleet gates command group
116-
with self.command_group("fleet gate", gates_sdk, client_factory=cf_gates) as g:
117-
g.custom_command("list", "list_gates_by_fleet")
118-
g.custom_show_command("show", "show_gate")
119-
g.custom_command("update", "update_gate")
120-
g.custom_command("approve", "approve_gate")
116+
# fleet gates command group - commented out until GatesOperations is available
117+
# with self.command_group("fleet gate", gates_sdk, client_factory=cf_gates) as g:
118+
# g.custom_command("list", "list_gates_by_fleet")
119+
# g.custom_show_command("show", "show_gate")
120+
# g.custom_command("update", "update_gate")
121+
# g.custom_command("approve", "approve_gate")

0 commit comments

Comments
 (0)