Skip to content
Merged
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
3 changes: 3 additions & 0 deletions src/dnc/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

Release History
===============
0.1.1
++++++
* Remove list commands

0.1.1
++++++
Expand Down
4 changes: 0 additions & 4 deletions src/dnc/azext_dnc/generated/_client_factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,6 @@ def cf_controller(cli_ctx, *_):
return cf_dnc_cl(cli_ctx).controller


def cf_delegated_network(cli_ctx, *_):
return cf_dnc_cl(cli_ctx).delegated_network


def cf_orchestrator_instance_service(cli_ctx, *_):
return cf_dnc_cl(cli_ctx).orchestrator_instance_service

Expand Down
44 changes: 0 additions & 44 deletions src/dnc/azext_dnc/generated/_help.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,42 +57,11 @@
az dnc controller wait --resource-group "TestRG" --resource-name "testcontroller" --deleted
"""

helps['dnc delegated-network'] = """
type: group
short-summary: Manage delegated network with dnc
"""

helps['dnc delegated-network list'] = """
type: command
short-summary: "Get all the delegatedController resources in a resource group. And Get all the delegatedController \
resources in a subscription."
examples:
- name: Get DelegatedNetwork resources by resource group
text: |-
az dnc delegated-network list --resource-group "testRG"
- name: Get DelegatedController resources by subscription
text: |-
az dnc delegated-network list
"""

helps['dnc orchestrator-instance-service'] = """
type: group
short-summary: Manage orchestrator instance service with dnc
"""

helps['dnc orchestrator-instance-service list'] = """
type: command
short-summary: "Get all the OrchestratorInstances resources in a resource group. And Get all the \
orchestratorInstance resources in a subscription."
examples:
- name: Get OrchestratorInstance resources by resource group
text: |-
az dnc orchestrator-instance-service list --resource-group "testRG"
- name: Get orchestratorInstance resources by subscription
text: |-
az dnc orchestrator-instance-service list
"""

helps['dnc orchestrator-instance-service show'] = """
type: command
short-summary: "Gets details about the orchestrator instance."
Expand Down Expand Up @@ -147,19 +116,6 @@
short-summary: Manage delegated subnet service with dnc
"""

helps['dnc delegated-subnet-service list'] = """
type: command
short-summary: "Get all the DelegatedSubnets resources in a resource group. And Get all the DelegatedSubnets \
resources in a subscription."
examples:
- name: Get DelegatedSubnets resources by resource group
text: |-
az dnc delegated-subnet-service list --resource-group "testRG"
- name: Get DelegatedSubnets resources by subscription
text: |-
az dnc delegated-subnet-service list
"""

helps['dnc delegated-subnet-service show'] = """
type: command
short-summary: "Gets details about the specified dnc DelegatedSubnet Link."
Expand Down
9 changes: 0 additions & 9 deletions src/dnc/azext_dnc/generated/_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,6 @@ def load_arguments(self, _):
c.argument('resource_name', type=str, help='The name of the resource. It must be a minimum of 3 characters, '
'and a maximum of 63.', id_part='name')

with self.argument_context('dnc delegated-network list') as c:
c.argument('resource_group_name', resource_group_name_type)

with self.argument_context('dnc orchestrator-instance-service list') as c:
c.argument('resource_group_name', resource_group_name_type)

with self.argument_context('dnc orchestrator-instance-service show') as c:
c.argument('resource_group_name', resource_group_name_type)
c.argument('resource_name', type=str, help='The name of the resource. It must be a minimum of 3 characters, '
Expand Down Expand Up @@ -87,9 +81,6 @@ def load_arguments(self, _):
c.argument('resource_name', type=str, help='The name of the resource. It must be a minimum of 3 characters, '
'and a maximum of 63.', id_part='name')

with self.argument_context('dnc delegated-subnet-service list') as c:
c.argument('resource_group_name', resource_group_name_type)

with self.argument_context('dnc delegated-subnet-service show') as c:
c.argument('resource_group_name', resource_group_name_type)
c.argument('resource_name', type=str, help='The name of the resource. It must be a minimum of 3 characters, '
Expand Down
10 changes: 0 additions & 10 deletions src/dnc/azext_dnc/generated/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,22 +25,13 @@ def load_command_table(self, _):
g.custom_command('delete', 'dnc_controller_delete', supports_no_wait=True, confirmation=True)
g.custom_wait_command('wait', 'dnc_controller_show')

from azext_dnc.generated._client_factory import cf_delegated_network
dnc_delegated_network = CliCommandType(
operations_tmpl='azext_dnc.vendored_sdks.dnc.operations._delegated_network_operations#DelegatedNetworkOperation'
's.{}',
client_factory=cf_delegated_network)
with self.command_group('dnc delegated-network', dnc_delegated_network, client_factory=cf_delegated_network) as g:
g.custom_command('list', 'dnc_delegated_network_list')

from azext_dnc.generated._client_factory import cf_orchestrator_instance_service
dnc_orchestrator_instance_service = CliCommandType(
operations_tmpl='azext_dnc.vendored_sdks.dnc.operations._orchestrator_instance_service_operations#OrchestratorI'
'nstanceServiceOperations.{}',
client_factory=cf_orchestrator_instance_service)
with self.command_group('dnc orchestrator-instance-service', dnc_orchestrator_instance_service,
client_factory=cf_orchestrator_instance_service) as g:
g.custom_command('list', 'dnc_orchestrator_instance_service_list')
g.custom_show_command('show', 'dnc_orchestrator_instance_service_show')
g.custom_command('create', 'dnc_orchestrator_instance_service_create', supports_no_wait=True)
g.custom_command('delete', 'dnc_orchestrator_instance_service_delete', supports_no_wait=True,
Expand All @@ -54,7 +45,6 @@ def load_command_table(self, _):
client_factory=cf_delegated_subnet_service)
with self.command_group('dnc delegated-subnet-service', dnc_delegated_subnet_service,
client_factory=cf_delegated_subnet_service) as g:
g.custom_command('list', 'dnc_delegated_subnet_service_list')
g.custom_show_command('show', 'dnc_delegated_subnet_service_show')
g.custom_command('create', 'dnc_delegated_subnet_service_create', supports_no_wait=True)
g.custom_command('delete', 'dnc_delegated_subnet_service_delete', supports_no_wait=True, confirmation=True)
Expand Down
21 changes: 0 additions & 21 deletions src/dnc/azext_dnc/generated/custom.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,20 +45,6 @@ def dnc_controller_delete(client,
resource_name=resource_name)


def dnc_delegated_network_list(client,
resource_group_name=None):
if resource_group_name:
return client.list_by_resource_group(resource_group_name=resource_group_name)
return client.list_by_subscription()


def dnc_orchestrator_instance_service_list(client,
resource_group_name=None):
if resource_group_name:
return client.list_by_resource_group(resource_group_name=resource_group_name)
return client.list_by_subscription()


def dnc_orchestrator_instance_service_show(client,
resource_group_name,
resource_name):
Expand Down Expand Up @@ -112,13 +98,6 @@ def dnc_orchestrator_instance_service_delete(client,
force_delete=force_delete)


def dnc_delegated_subnet_service_list(client,
resource_group_name=None):
if resource_group_name:
return client.list_by_resource_group(resource_group_name=resource_group_name)
return client.list_by_subscription()


def dnc_delegated_subnet_service_show(client,
resource_group_name,
resource_name):
Expand Down
90 changes: 15 additions & 75 deletions src/dnc/azext_dnc/tests/latest/example_steps.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

# EXAMPLE: /Controller/put/Create controller
@try_manual
def step_controller_create(test, rg, rg_2, checks=None):
def step_controller_create(test, rg, checks=None):
if checks is None:
checks = []
test.cmd('az dnc controller create '
Expand All @@ -26,7 +26,7 @@ def step_controller_create(test, rg, rg_2, checks=None):

# EXAMPLE: /Controller/get/Get details of a controller
@try_manual
def step_controller_show(test, rg, rg_2, checks=None):
def step_controller_show(test, rg, checks=None):
if checks is None:
checks = []
test.cmd('az dnc controller show '
Expand All @@ -37,7 +37,7 @@ def step_controller_show(test, rg, rg_2, checks=None):

# EXAMPLE: /DelegatedSubnetService/put/put delegated subnet
@try_manual
def step_delegated_subnet_service_create(test, rg, rg_2, checks=None):
def step_delegated_subnet_service_create(test, rg, checks=None):
if checks is None:
checks = []
test.cmd('az dnc delegated-subnet-service create '
Expand All @@ -51,30 +51,31 @@ def step_delegated_subnet_service_create(test, rg, rg_2, checks=None):
checks=checks)


# EXAMPLE: /DelegatedSubnetService/get/Get DelegatedSubnets resources by subscription
# EXAMPLE: /DelegatedSubnetService/get/Get details of a delegated subnet
@try_manual
def step_delegated_subnet_service_list(test, rg, rg_2, checks=None):
def step_delegated_subnet_service_show(test, rg, checks=None):
if checks is None:
checks = []
test.cmd('az dnc delegated-subnet-service list '
'-g ""',
test.cmd('az dnc delegated-subnet-service show '
'--resource-group "{rg}" '
'--resource-name "delegated1"',
checks=checks)


# EXAMPLE: /DelegatedSubnetService/get/Get details of a delegated subnet
# EXAMPLE: /DelegatedSubnetService/delete/delete delegated subnet
@try_manual
def step_delegated_subnet_service_show(test, rg, rg_2, checks=None):
def step_delegated_subnet_service_delete(test, rg, checks=None):
if checks is None:
checks = []
test.cmd('az dnc delegated-subnet-service show '
test.cmd('az dnc delegated-subnet-service delete -y '
'--resource-group "{rg}" '
'--resource-name "delegated1"',
checks=checks)


# EXAMPLE: /OrchestratorInstanceService/put/Create orchestrator instance
@try_manual
def step_orchestrator_instance_service_create(test, rg, rg_2, checks=None):
def step_orchestrator_instance_service_create(test, rg, checks=None):
if checks is None:
checks = []
test.cmd('az dnc orchestrator-instance-service create '
Expand All @@ -95,7 +96,7 @@ def step_orchestrator_instance_service_create(test, rg, rg_2, checks=None):

# EXAMPLE: /OrchestratorInstanceService/get/Get details of a orchestratorInstance
@try_manual
def step_orchestrator_instance_service_show(test, rg, rg_2, checks=None):
def step_orchestrator_instance_service_show(test, rg, checks=None):
if checks is None:
checks = []
test.cmd('az dnc orchestrator-instance-service show '
Expand All @@ -104,29 +105,9 @@ def step_orchestrator_instance_service_show(test, rg, rg_2, checks=None):
checks=checks)


# EXAMPLE: /OrchestratorInstanceService/get/Get OrchestratorInstance resources by resource group
@try_manual
def step_orchestrator_instance_service_list(test, rg, rg_2, checks=None):
if checks is None:
checks = []
test.cmd('az dnc orchestrator-instance-service list '
'--resource-group "{rg_2}"',
checks=checks)


# EXAMPLE: /OrchestratorInstanceService/get/Get orchestratorInstance resources by subscription
@try_manual
def step_orchestrator_instance_service_list2(test, rg, rg_2, checks=None):
if checks is None:
checks = []
test.cmd('az dnc orchestrator-instance-service list '
'-g ""',
checks=checks)


# EXAMPLE: /OrchestratorInstanceService/delete/Delete Orchestrator Instance
@try_manual
def step_orchestrator_instance_service_delete(test, rg, rg_2, checks=None):
def step_orchestrator_instance_service_delete(test, rg, checks=None):
if checks is None:
checks = []
test.cmd('az dnc orchestrator-instance-service delete -y '
Expand All @@ -137,52 +118,11 @@ def step_orchestrator_instance_service_delete(test, rg, rg_2, checks=None):

# EXAMPLE: /Controller/delete/Delete controller
@try_manual
def step_controller_delete(test, rg, rg_2, checks=None):
def step_controller_delete(test, rg, checks=None):
if checks is None:
checks = []
test.cmd('az dnc controller delete -y '
'--resource-group "{rg}" '
'--resource-name "{myController}"',
checks=checks)


# EXAMPLE: /DelegatedNetwork/get/Get DelegatedController resources by subscription
@try_manual
def step_delegated_network_list(test, rg, rg_2, checks=None):
if checks is None:
checks = []
test.cmd('az dnc delegated-network list '
'-g ""',
checks=checks)


# EXAMPLE: /DelegatedNetwork/get/Get DelegatedNetwork resources by resource group
@try_manual
def step_delegated_network_list2(test, rg, rg_2, checks=None):
if checks is None:
checks = []
test.cmd('az dnc delegated-network list '
'--resource-group "{rg_2}"',
checks=checks)


# EXAMPLE: /DelegatedSubnetService/get/Get DelegatedSubnets resources by resource group
@try_manual
def step_delegated_subnet_service_list2(test, rg, rg_2, checks=None):
if checks is None:
checks = []
test.cmd('az dnc delegated-subnet-service list '
'--resource-group "{rg_2}"',
checks=checks)


# EXAMPLE: /DelegatedSubnetService/delete/delete delegated subnet
@try_manual
def step_delegated_subnet_service_delete(test, rg, rg_2, checks=None):
if checks is None:
checks = []
test.cmd('az dnc delegated-subnet-service delete -y '
'--resource-group "{rg}" '
'--resource-name "delegated1"',
checks=checks)

Loading