Skip to content

Commit

Permalink
Generated from 939a104585837edf4e1816041943598139aaa0cf
Browse files Browse the repository at this point in the history
  • Loading branch information
SDK Automation committed Oct 6, 2020
1 parent 79bb773 commit 32c2476
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1774,7 +1774,7 @@ def force_recovery_service_fabric_platform_update_domain_walk(

def convert_to_single_placement_group(
self, resource_group_name, vm_scale_set_name, active_placement_group_id=None, custom_headers=None, raw=False, **operation_config):
"""Converts SinglePlacementGroup property to false for a existing virtual
"""Converts SinglePlacementGroup property to true for a existing virtual
machine scale set.
:param resource_group_name: The name of the resource group.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1774,7 +1774,7 @@ def force_recovery_service_fabric_platform_update_domain_walk(

def convert_to_single_placement_group(
self, resource_group_name, vm_scale_set_name, active_placement_group_id=None, custom_headers=None, raw=False, **operation_config):
"""Converts SinglePlacementGroup property to false for a existing virtual
"""Converts SinglePlacementGroup property to true for a existing virtual
machine scale set.
:param resource_group_name: The name of the resource group.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1774,7 +1774,7 @@ def force_recovery_service_fabric_platform_update_domain_walk(

def convert_to_single_placement_group(
self, resource_group_name, vm_scale_set_name, active_placement_group_id=None, custom_headers=None, raw=False, **operation_config):
"""Converts SinglePlacementGroup property to false for a existing virtual
"""Converts SinglePlacementGroup property to true for a existing virtual
machine scale set.
:param resource_group_name: The name of the resource group.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,7 @@ def get_long_running_output(response):


def _delete_initial(
self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config):
self, resource_group_name, vm_name, force_deletion=None, custom_headers=None, raw=False, **operation_config):
# Construct URL
url = self.delete.metadata['url']
path_format_arguments = {
Expand All @@ -439,6 +439,8 @@ def _delete_initial(

# Construct parameters
query_parameters = {}
if force_deletion is not None:
query_parameters['forceDeletion'] = self._serialize.query("force_deletion", force_deletion, 'bool')
query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str')

# Construct headers
Expand All @@ -464,13 +466,16 @@ def _delete_initial(
return client_raw_response

def delete(
self, resource_group_name, vm_name, custom_headers=None, raw=False, polling=True, **operation_config):
self, resource_group_name, vm_name, force_deletion=None, custom_headers=None, raw=False, polling=True, **operation_config):
"""The operation to delete a virtual machine.
:param resource_group_name: The name of the resource group.
:type resource_group_name: str
:param vm_name: The name of the virtual machine.
:type vm_name: str
:param force_deletion: Optional parameter to force delete virtual
machines.
:type force_deletion: bool
:param dict custom_headers: headers that will be added to the request
:param bool raw: The poller return type is ClientRawResponse, the
direct response alongside the deserialized response
Expand All @@ -485,6 +490,7 @@ def delete(
raw_result = self._delete_initial(
resource_group_name=resource_group_name,
vm_name=vm_name,
force_deletion=force_deletion,
custom_headers=custom_headers,
raw=True,
**operation_config
Expand Down
2 changes: 1 addition & 1 deletion sdk/compute/azure-mgmt-compute/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
pass

# Version extraction inspired from 'requests'
with open(os.path.join(package_folder_path, 'version.py')
with open(os.path.join(package_folder_path, 'version.py')
if os.path.exists(os.path.join(package_folder_path, 'version.py'))
else os.path.join(package_folder_path, '_version.py'), 'r') as fd:
version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]',
Expand Down

0 comments on commit 32c2476

Please sign in to comment.