Skip to content

Commit 35cb635

Browse files
committed
neon tsp
1 parent edef6a6 commit 35cb635

File tree

7 files changed

+332
-206
lines changed

7 files changed

+332
-206
lines changed

src/neon/azext_neon/aaz/latest/neon/postgres/_create.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ def _build_arguments_schema(cls, *args, **kwargs):
5757
),
5858
)
5959
_args_schema.resource_group = AAZResourceGroupNameArg(
60-
help="Name of the resource group",
6160
required=True,
6261
)
6362

src/neon/azext_neon/aaz/latest/neon/postgres/organization/_delete.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ def _build_arguments_schema(cls, *args, **kwargs):
5959
),
6060
)
6161
_args_schema.resource_group = AAZResourceGroupNameArg(
62-
help="Name of the resource group",
6362
required=True,
6463
)
6564
return cls._args_schema

src/neon/azext_neon/aaz/latest/neon/postgres/organization/_list.py

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -47,19 +47,17 @@ def _build_arguments_schema(cls, *args, **kwargs):
4747
# define Arg Group ""
4848

4949
_args_schema = cls._args_schema
50-
_args_schema.resource_group = AAZResourceGroupNameArg(
51-
help="Name of the resource group",
52-
)
50+
_args_schema.resource_group = AAZResourceGroupNameArg()
5351
return cls._args_schema
5452

5553
def _execute_operations(self):
5654
self.pre_operations()
57-
condition_0 = has_value(self.ctx.args.resource_group) and has_value(self.ctx.subscription_id)
58-
condition_1 = has_value(self.ctx.subscription_id) and has_value(self.ctx.args.resource_group) is not True
55+
condition_0 = has_value(self.ctx.subscription_id) and has_value(self.ctx.args.resource_group) is not True
56+
condition_1 = has_value(self.ctx.args.resource_group) and has_value(self.ctx.subscription_id)
5957
if condition_0:
60-
self.OrganizationsListByResourceGroup(ctx=self.ctx)()
61-
if condition_1:
6258
self.OrganizationsListBySubscription(ctx=self.ctx)()
59+
if condition_1:
60+
self.OrganizationsListByResourceGroup(ctx=self.ctx)()
6361
self.post_operations()
6462

6563
@register_callback
@@ -75,7 +73,7 @@ def _output(self, *args, **kwargs):
7573
next_link = self.deserialize_output(self.ctx.vars.instance.next_link)
7674
return result, next_link
7775

78-
class OrganizationsListByResourceGroup(AAZHttpOperation):
76+
class OrganizationsListBySubscription(AAZHttpOperation):
7977
CLIENT_TYPE = "MgmtClient"
8078

8179
def __call__(self, *args, **kwargs):
@@ -89,7 +87,7 @@ def __call__(self, *args, **kwargs):
8987
@property
9088
def url(self):
9189
return self.client.format_url(
92-
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations",
90+
"/subscriptions/{subscriptionId}/providers/Neon.Postgres/organizations",
9391
**self.url_parameters
9492
)
9593

@@ -104,10 +102,6 @@ def error_format(self):
104102
@property
105103
def url_parameters(self):
106104
parameters = {
107-
**self.serialize_url_param(
108-
"resourceGroupName", self.ctx.args.resource_group,
109-
required=True,
110-
),
111105
**self.serialize_url_param(
112106
"subscriptionId", self.ctx.subscription_id,
113107
required=True,
@@ -323,7 +317,7 @@ def _build_schema_on_200(cls):
323317

324318
return cls._schema_on_200
325319

326-
class OrganizationsListBySubscription(AAZHttpOperation):
320+
class OrganizationsListByResourceGroup(AAZHttpOperation):
327321
CLIENT_TYPE = "MgmtClient"
328322

329323
def __call__(self, *args, **kwargs):
@@ -337,7 +331,7 @@ def __call__(self, *args, **kwargs):
337331
@property
338332
def url(self):
339333
return self.client.format_url(
340-
"/subscriptions/{subscriptionId}/providers/Neon.Postgres/organizations",
334+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations",
341335
**self.url_parameters
342336
)
343337

@@ -352,6 +346,10 @@ def error_format(self):
352346
@property
353347
def url_parameters(self):
354348
parameters = {
349+
**self.serialize_url_param(
350+
"resourceGroupName", self.ctx.args.resource_group,
351+
required=True,
352+
),
355353
**self.serialize_url_param(
356354
"subscriptionId", self.ctx.subscription_id,
357355
required=True,

src/neon/azext_neon/aaz/latest/neon/postgres/organization/_show.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ def _build_arguments_schema(cls, *args, **kwargs):
5757
),
5858
)
5959
_args_schema.resource_group = AAZResourceGroupNameArg(
60-
help="Name of the resource group",
6160
required=True,
6261
)
6362
return cls._args_schema

0 commit comments

Comments
 (0)