1414@register_command (
1515 "workload-orchestration target install" ,
1616)
17- class Install (AAZCommand ):
17+ class InstallSolution (AAZCommand ):
1818 """Post request to deploy
19- :example:
20- az workload-orchestration target install -g rg1 -n target1 --solution-name solution1 --solution-version 1.0
2119 """
2220
2321 _aaz_info = {
24- "version" : "2025-01 -01-preview " ,
22+ "version" : "2025-06 -01" ,
2523 "resources" : [
26- ["mgmt-plane" , "/subscriptions/{}/resourcegroups/{}/providers/microsoft.edge /targets/{}/installsolution" , "2025-01 -01-preview " ],
24+ ["mgmt-plane" , "/subscriptions/{}/resourcegroups/{}/providers/MicrosoftEdge /targets/{}/installsolution" , "2025-06 -01" ],
2725 ]
2826 }
2927
3028 AZ_SUPPORT_NO_WAIT = True
3129
3230 def _handler (self , command_args ):
3331 super ()._handler (command_args )
34- return self .build_lro_poller (self ._execute_operations , self . _output )
32+ return self .build_lro_poller (self ._execute_operations , None )
3533
3634 _args_schema = None
3735
@@ -62,16 +60,10 @@ def _build_arguments_schema(cls, *args, **kwargs):
6260 # define Arg Group "Body"
6361
6462 _args_schema = cls ._args_schema
65- _args_schema .solution = AAZStrArg (
66- options = ["--solution-name " ],
63+ _args_schema .solution_version_id = AAZStrArg (
64+ options = ["--solution-version-id " ],
6765 arg_group = "Body" ,
68- help = "Solution Name" ,
69- required = True ,
70- )
71- _args_schema .solution_version = AAZStrArg (
72- options = ["--solution-version" ],
73- arg_group = "Body" ,
74- help = "Solution Version Name" ,
66+ help = "Solution Version ARM Id" ,
7567 required = True ,
7668 )
7769 return cls ._args_schema
@@ -89,10 +81,6 @@ def pre_operations(self):
8981 def post_operations (self ):
9082 pass
9183
92- def _output (self , * args , ** kwargs ):
93- result = self .deserialize_output (self .ctx .vars .instance , client_flatten = True )
94- return result
95-
9684 class TargetsInstallSolution (AAZHttpOperation ):
9785 CLIENT_TYPE = "MgmtClient"
9886
@@ -103,7 +91,7 @@ def __call__(self, *args, **kwargs):
10391 return self .client .build_lro_polling (
10492 self .ctx .args .no_wait ,
10593 session ,
106- self . on_200 ,
94+ None ,
10795 self .on_error ,
10896 lro_options = {"final-state-via" : "location" },
10997 path_format_arguments = self .url_parameters ,
@@ -114,7 +102,7 @@ def __call__(self, *args, **kwargs):
114102 @property
115103 def url (self ):
116104 return self .client .format_url (
117- "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge /targets/{targetName}/installSolution" ,
105+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MicrosoftEdge /targets/{targetName}/installSolution" ,
118106 ** self .url_parameters
119107 )
120108
@@ -148,7 +136,7 @@ def url_parameters(self):
148136 def query_parameters (self ):
149137 parameters = {
150138 ** self .serialize_query_param (
151- "api-version" , "2025-01 -01-preview " ,
139+ "api-version" , "2025-06 -01" ,
152140 required = True ,
153141 ),
154142 }
@@ -170,81 +158,13 @@ def content(self):
170158 typ = AAZObjectType ,
171159 typ_kwargs = {"flags" : {"required" : True , "client_flatten" : True }}
172160 )
173- _builder .set_prop ("solution" , AAZStrType , ".solution" , typ_kwargs = {"flags" : {"required" : True }})
174- _builder .set_prop ("solutionVersion" , AAZStrType , ".solution_version" , typ_kwargs = {"flags" : {"required" : True }})
161+ _builder .set_prop ("solutionVersionId" , AAZStrType , ".solution_version_id" , typ_kwargs = {"flags" : {"required" : True }})
175162
176163 return self .serialize_content (_content_value )
177164
178- def on_200 (self , session ):
179- data = self .deserialize_http_content (session )
180- self .ctx .set_var (
181- "instance" ,
182- data ,
183- schema_builder = self ._build_schema_on_200
184- )
185-
186- _schema_on_200 = None
187-
188- @classmethod
189- def _build_schema_on_200 (cls ):
190- if cls ._schema_on_200 is not None :
191- return cls ._schema_on_200
192-
193- cls ._schema_on_200 = AAZObjectType ()
194-
195- _schema_on_200 = cls ._schema_on_200
196- _schema_on_200 .id = AAZStrType (flags = {"read_only" : True })
197- _schema_on_200 .name = AAZStrType (flags = {"read_only" : True })
198- _schema_on_200 .resource_id = AAZStrType (serialized_name = "resourceId" , flags = {"read_only" : True })
199- _schema_on_200 .status = AAZStrType (flags = {"read_only" : True })
200- _schema_on_200 .start_time = AAZStrType (serialized_name = "startTime" , flags = {"read_only" : True })
201- _schema_on_200 .end_time = AAZStrType (serialized_name = "endTime" , flags = {"read_only" : True })
202- _schema_on_200 .properties = AAZObjectType ()
203-
204- properties = _schema_on_200 .properties
205- properties .status = AAZStrType (flags = {"read_only" : True })
206-
207- return cls ._schema_on_200
208-
209- class _InstallHelper :
210- """Helper class for Publish"""
211-
212- _schema_solution_dependency_read = None
213-
214- @classmethod
215- def _build_schema_solution_dependency_read (cls , _schema ):
216- if cls ._schema_solution_dependency_read is not None :
217- _schema .dependencies = cls ._schema_solution_dependency_read .dependencies
218- _schema .solution_template_version_id = cls ._schema_solution_dependency_read .solution_template_version_id
219- _schema .solution_version_id = cls ._schema_solution_dependency_read .solution_version_id
220- _schema .target_id = cls ._schema_solution_dependency_read .target_id
221- return
222-
223- cls ._schema_solution_dependency_read = _schema_solution_dependency_read = AAZObjectType ()
224-
225- solution_dependency_read = _schema_solution_dependency_read
226- solution_dependency_read .dependencies = AAZListType ()
227- solution_dependency_read .solution_template_version_id = AAZStrType (
228- serialized_name = "solutionTemplateVersionId" ,
229- flags = {"required" : True },
230- )
231- solution_dependency_read .solution_version_id = AAZStrType (
232- serialized_name = "solutionVersionId" ,
233- flags = {"required" : True },
234- )
235- solution_dependency_read .target_id = AAZStrType (
236- serialized_name = "targetId" ,
237- flags = {"required" : True },
238- )
239-
240- dependencies = _schema_solution_dependency_read .dependencies
241- dependencies .Element = AAZObjectType ()
242- cls ._build_schema_solution_dependency_read (dependencies .Element )
243165
244- _schema .dependencies = cls ._schema_solution_dependency_read .dependencies
245- _schema .solution_template_version_id = cls ._schema_solution_dependency_read .solution_template_version_id
246- _schema .solution_version_id = cls ._schema_solution_dependency_read .solution_version_id
247- _schema .target_id = cls ._schema_solution_dependency_read .target_id
166+ class _InstallSolutionHelper :
167+ """Helper class for InstallSolution"""
248168
249169
250- __all__ = ["Install " ]
170+ __all__ = ["InstallSolution " ]
0 commit comments