Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pull] master from Azure:master #3

Merged
merged 13 commits into from
Mar 11, 2021
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/databox/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

Release History
===============
0.1.1
++++++
* GA databox module.

0.1.0
++++++
Expand Down
1 change: 0 additions & 1 deletion src/databox/azext_databox/azext_metadata.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{
"azext.isExperimental": true,
"azext.minCliCoreVersion": "2.3.1"
}
2 changes: 1 addition & 1 deletion src/databox/azext_databox/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def load_command_table(self, _):
databox_jobs = CliCommandType(
operations_tmpl='azext_databox.vendored_sdks.databox.operations._jobs_operations#JobsOperations.{}',
client_factory=cf_jobs)
with self.command_group('databox job', databox_jobs, client_factory=cf_jobs, is_experimental=True) as g:
with self.command_group('databox job', databox_jobs, client_factory=cf_jobs) as g:
g.custom_command('create', 'create_databox_job', validator=validate_create_input_parameters)
g.custom_command('update', 'update_databox_job')
g.custom_command('delete', 'delete_databox_job', confirmation=True)
Expand Down
2 changes: 1 addition & 1 deletion src/databox/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

# TODO: Confirm this is the right version number you want and it matches your
# HISTORY.rst entry.
VERSION = '0.1.0'
VERSION = '0.1.1'

# The full list of classifiers is available at
# https://pypi.python.org/pypi?%3Aaction=list_classifiers
Expand Down
353 changes: 348 additions & 5 deletions src/index.json

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions src/peering/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

Release History
===============
0.2.1
++++++
* GA.

0.2.0
++++++
Expand Down
1 change: 0 additions & 1 deletion src/peering/azext_peering/azext_metadata.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{
"azext.isExperimental": true,
"azext.minCliCoreVersion": "2.3.1"
}
21 changes: 8 additions & 13 deletions src/peering/azext_peering/generated/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,14 @@ def load_command_table(self, _):
operations_tmpl='azext_peering.vendored_sdks.peering.operations._legacy_peering_operations#LegacyPeeringOperati'
'ons.{}',
client_factory=cf_legacy_peering)
with self.command_group('peering legacy', peering_legacy_peering, client_factory=cf_legacy_peering,
is_experimental=True) as g:
with self.command_group('peering legacy', peering_legacy_peering, client_factory=cf_legacy_peering) as g:
g.custom_command('list', 'peering_legacy_list')

from azext_peering.generated._client_factory import cf_peer_asn
peering_peer_asn = CliCommandType(
operations_tmpl='azext_peering.vendored_sdks.peering.operations._peer_asn_operations#PeerAsnOperations.{}',
client_factory=cf_peer_asn)
with self.command_group('peering asn', peering_peer_asn, client_factory=cf_peer_asn, is_experimental=True) as g:
with self.command_group('peering asn', peering_peer_asn, client_factory=cf_peer_asn) as g:
g.custom_command('list', 'peering_asn_list')
g.custom_show_command('show', 'peering_asn_show')
g.custom_command('create', 'peering_asn_create')
Expand All @@ -38,17 +37,15 @@ def load_command_table(self, _):
operations_tmpl='azext_peering.vendored_sdks.peering.operations._peering_location_operations#PeeringLocationOpe'
'rations.{}',
client_factory=cf_peering_location)
with self.command_group('peering location', peering_peering_location, client_factory=cf_peering_location,
is_experimental=True) as g:
with self.command_group('peering location', peering_peering_location, client_factory=cf_peering_location) as g:
g.custom_command('list', 'peering_location_list')

from azext_peering.generated._client_factory import cf_registered_asn
peering_registered_asn = CliCommandType(
operations_tmpl='azext_peering.vendored_sdks.peering.operations._registered_asn_operations#RegisteredAsnOperati'
'ons.{}',
client_factory=cf_registered_asn)
with self.command_group('peering registered-asn', peering_registered_asn, client_factory=cf_registered_asn,
is_experimental=True) as g:
with self.command_group('peering registered-asn', peering_registered_asn, client_factory=cf_registered_asn) as g:
g.custom_command('list', 'peering_registered_asn_list')
g.custom_show_command('show', 'peering_registered_asn_show')
g.custom_command('create', 'peering_registered_asn_create')
Expand All @@ -61,7 +58,7 @@ def load_command_table(self, _):
'perations.{}',
client_factory=cf_registered_prefix)
with self.command_group('peering registered-prefix', peering_registered_prefix,
client_factory=cf_registered_prefix, is_experimental=True) as g:
client_factory=cf_registered_prefix) as g:
g.custom_command('list', 'peering_registered_prefix_list')
g.custom_show_command('show', 'peering_registered_prefix_show')
g.custom_command('create', 'peering_registered_prefix_create')
Expand All @@ -72,7 +69,7 @@ def load_command_table(self, _):
peering_peering = CliCommandType(
operations_tmpl='azext_peering.vendored_sdks.peering.operations._peering_operations#PeeringOperations.{}',
client_factory=cf_peering)
with self.command_group('peering peering', peering_peering, client_factory=cf_peering, is_experimental=True) as g:
with self.command_group('peering peering', peering_peering, client_factory=cf_peering) as g:
g.custom_command('list', 'peering_peering_list')
g.custom_show_command('show', 'peering_peering_show')
g.custom_command('create', 'peering_peering_create')
Expand All @@ -84,8 +81,7 @@ def load_command_table(self, _):
operations_tmpl='azext_peering.vendored_sdks.peering.operations._received_route_operations#ReceivedRouteOperati'
'ons.{}',
client_factory=cf_received_route)
with self.command_group('peering received-route', peering_received_route, client_factory=cf_received_route,
is_experimental=True) as g:
with self.command_group('peering received-route', peering_received_route, client_factory=cf_received_route) as g:
g.custom_command('list', 'peering_received_route_list')

from azext_peering.generated._client_factory import cf_peering_service_country
Expand Down Expand Up @@ -131,8 +127,7 @@ def load_command_table(self, _):
operations_tmpl='azext_peering.vendored_sdks.peering.operations._peering_service_operations#PeeringServiceOpera'
'tions.{}',
client_factory=cf_peering_service)
with self.command_group('peering service', peering_peering_service, client_factory=cf_peering_service,
is_experimental=True) as g:
with self.command_group('peering service', peering_peering_service, client_factory=cf_peering_service) as g:
g.custom_command('list', 'peering_service_list')
g.custom_show_command('show', 'peering_service_show')
g.custom_command('create', 'peering_service_create')
Expand Down
2 changes: 1 addition & 1 deletion src/peering/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

# TODO: Confirm this is the right version number you want and it matches your
# HISTORY.rst entry.
VERSION = '0.2.0'
VERSION = '0.2.1'

# The full list of classifiers is available at
# https://pypi.python.org/pypi?%3Aaction=list_classifiers
Expand Down
3 changes: 3 additions & 0 deletions src/storagesync/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

Release History
===============
0.1.1
++++++
* GA.

0.1.0
++++++
Expand Down
1 change: 0 additions & 1 deletion src/storagesync/azext_storagesync/azext_metadata.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{
"azext.isExperimental": true,
"azext.minCliCoreVersion": "2.3.1"
}
3 changes: 0 additions & 3 deletions src/storagesync/azext_storagesync/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,3 @@ def load_command_table(self, _):
g.custom_show_command('show', 'get_storagesync_registered_server')
g.custom_command('list', 'list_storagesync_registered_server')
g.wait_command('wait')

with self.command_group('storagesync', is_experimental=True) as g:
pass
2 changes: 1 addition & 1 deletion src/storagesync/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

# TODO: Confirm this is the right version number you want and it matches your
# HISTORY.rst entry.
VERSION = '0.1.0'
VERSION = '0.1.1'

# The full list of classifiers is available at
# https://pypi.python.org/pypi?%3Aaction=list_classifiers
Expand Down
30 changes: 14 additions & 16 deletions src/vm-repair/azext_vm_repair/custom.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,29 +169,27 @@ def create(cmd, vm_name, resource_group_name, repair_password=None, repair_usern

# invoke enable-NestedHyperV.ps1 again to attach Disk to Nested
if enable_nested:
logger.info("Running hyperv")
logger.info("Running Script win-enable-nested-hyperv.ps1 to install HyperV")

stdout, stderr = _invoke_run_command("win-enable-nested-hyperv.ps1", repair_vm_name, repair_group_name, 0)
logger.debug("stderr: %s", stderr)
if stderr:
logger.debug(stderr)
raise ScriptReturnsError('Error when running script')
run_hyperv_command = "az vm repair run -g {g} -n {name} --run-id win-enable-nested-hyperv" \
.format(g=repair_group_name, name=repair_vm_name)
ret_enable_nested = _call_az_command(run_hyperv_command)

logger.debug("stdout: %s", stdout)
if str.find(stdout, "SuccessRestartRequired") > -1:
logger.debug("az vm repair run hyperv command returned: %s", ret_enable_nested)

if str.find(ret_enable_nested, "SuccessRestartRequired") > -1:
restart_cmd = 'az vm restart -g {rg} -n {vm}'.format(rg=repair_group_name, vm=repair_vm_name)
logger.info("restarting")
logger.info("Restarting Repair VM")
restart_ret = _call_az_command(restart_cmd)
logger.info(restart_ret)
logger.debug(restart_ret)

# invoking hyperv script again
logger.info("Running HyperV script again")
stdout, stderr = _invoke_run_command("win-enable-nested-hyperv.ps1", repair_vm_name, repair_group_name, 0)
if stderr:
raise ScriptReturnsError('Error when running script')
logger.info("Running win-enable-nested-hyperv.ps1 again to create nested VM")
run_hyperv_command = "az vm repair run -g {g} -n {name} --run-id win-enable-nested-hyperv" \
.format(g=repair_group_name, name=repair_vm_name)
ret_enable_nested_again = _call_az_command(run_hyperv_command)

logger.debug("stderr: %s", stderr)
print(stdout)
logger.debug("stderr: %s", ret_enable_nested_again)

created_resources = _list_resource_ids_in_rg(repair_group_name)
command.set_status_success()
Expand Down
2 changes: 1 addition & 1 deletion src/vm-repair/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from codecs import open
from setuptools import setup, find_packages

VERSION = "0.3.4"
VERSION = "0.3.5"

CLASSIFIERS = [
'Development Status :: 4 - Beta',
Expand Down