diff --git a/azure-cli.pyproj b/azure-cli.pyproj
index 591dcdfd937..02ecc5c02ac 100644
--- a/azure-cli.pyproj
+++ b/azure-cli.pyproj
@@ -108,27 +108,47 @@
Code
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -266,15 +286,19 @@
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -290,6 +314,50 @@
PYTHONPATH
X86
+
+ {153669af-0334-46c7-a6f1-029c48dc84d1}
+ {2af0f10d-7135-4994-9156-5d01c9c11b7e}
+ 2.7
+ env27AppInsights (Python 2.7)
+ Scripts\python.exe
+ Scripts\pythonw.exe
+ Lib\
+ PYTHONPATH
+ X86
+
+
+ {83c20e12-84e3-4c10-a1ba-466d2b57483d}
+ {2af0f10d-7135-4994-9156-5d01c9c11b7e}
+ 2.7
+ env27b (Python 2.7)
+ Scripts\python.exe
+ Scripts\pythonw.exe
+ Lib\
+ PYTHONPATH
+ X86
+
+
+ {12627503-1b89-4332-94a5-8ddd298e66ac}
+ {2af0f10d-7135-4994-9156-5d01c9c11b7e}
+ 3.5
+ env35AppInsights (Python 3.5)
+ Scripts\python.exe
+ Scripts\pythonw.exe
+ Lib\
+ PYTHONPATH
+ X86
+
+
+ {4ae3497d-f45c-4ec2-9e26-57476ef276a0}
+ {2af0f10d-7135-4994-9156-5d01c9c11b7e}
+ 3.5
+ env35d (Python 3.5)
+ Scripts\python.exe
+ Scripts\pythonw.exe
+ Lib\
+ PYTHONPATH
+ X86
+
@@ -300,20 +368,59 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/azure/cli/commands/__init__.py b/src/azure/cli/commands/__init__.py
index 99af12c819f..f51f20f0d56 100644
--- a/src/azure/cli/commands/__init__.py
+++ b/src/azure/cli/commands/__init__.py
@@ -26,6 +26,7 @@
'metavar': 'DEPLOYMENTNAME',
'help': 'Name of the resource deployment',
'default': 'azurecli' + str(time.time()) + str(random.randint(0, 10000000)),
+ 'required': False
},
'location': {
'name': '--location -l',
diff --git a/src/command_modules/azure-cli-storage/azure/cli/command_modules/storage/tests/recordings/test_storage_account_create_and_delete.yaml b/src/command_modules/azure-cli-storage/azure/cli/command_modules/storage/tests/recordings/test_storage_account_create_and_delete.yaml
index 7b8a026add7..87ebe16e62e 100644
--- a/src/command_modules/azure-cli-storage/azure/cli/command_modules/storage/tests/recordings/test_storage_account_create_and_delete.yaml
+++ b/src/command_modules/azure-cli-storage/azure/cli/command_modules/storage/tests/recordings/test_storage_account_create_and_delete.yaml
@@ -16,7 +16,7 @@ interactions:
body: {string: ''}
headers:
Cache-Control: [no-cache]
- Date: ['Fri, 06 May 2016 16:02:34 GMT']
+ Date: ['Tue, 26 Apr 2016 15:35:44 GMT']
Expires: ['-1']
Pragma: [no-cache]
Strict-Transport-Security: [max-age=31536000; includeSubDomains]
@@ -45,7 +45,7 @@ interactions:
Cache-Control: [no-cache]
Content-Encoding: [gzip]
Content-Type: [application/json]
- Date: ['Fri, 06 May 2016 16:02:35 GMT']
+ Date: ['Tue, 26 Apr 2016 15:35:44 GMT']
Expires: ['-1']
Pragma: [no-cache]
Server: [Microsoft-Azure-Storage-Resource-Provider/1.0, Microsoft-HTTPAPI/2.0]
@@ -76,7 +76,7 @@ interactions:
Cache-Control: [no-cache]
Content-Encoding: [gzip]
Content-Type: [application/json]
- Date: ['Fri, 06 May 2016 16:14:04 GMT']
+ Date: ['Tue, 26 Apr 2016 15:36:12 GMT']
Expires: ['-1']
Pragma: [no-cache]
Server: [Microsoft-Azure-Storage-Resource-Provider/1.0, Microsoft-HTTPAPI/2.0]
@@ -107,7 +107,7 @@ interactions:
Cache-Control: [no-cache]
Content-Encoding: [gzip]
Content-Type: [application/json]
- Date: ['Fri, 06 May 2016 16:14:06 GMT']
+ Date: ['Tue, 26 Apr 2016 15:36:12 GMT']
Expires: ['-1']
Pragma: [no-cache]
Server: [Microsoft-Azure-Storage-Resource-Provider/1.0, Microsoft-HTTPAPI/2.0]
@@ -132,7 +132,7 @@ interactions:
headers:
Cache-Control: [no-cache]
Content-Length: ['0']
- Date: ['Fri, 06 May 2016 16:14:06 GMT']
+ Date: ['Tue, 26 Apr 2016 15:36:16 GMT']
Expires: ['-1']
Pragma: [no-cache]
Server: [Microsoft-Azure-Storage-Resource-Provider/1.0, Microsoft-HTTPAPI/2.0]
@@ -162,7 +162,7 @@ interactions:
Cache-Control: [no-cache]
Content-Encoding: [gzip]
Content-Type: [application/json]
- Date: ['Fri, 06 May 2016 16:14:08 GMT']
+ Date: ['Tue, 26 Apr 2016 15:36:16 GMT']
Expires: ['-1']
Pragma: [no-cache]
Server: [Microsoft-Azure-Storage-Resource-Provider/1.0, Microsoft-HTTPAPI/2.0]
@@ -186,10 +186,10 @@ interactions:
body: {string: ''}
headers:
Cache-Control: [no-cache]
- Date: ['Fri, 06 May 2016 16:14:08 GMT']
+ Date: ['Tue, 26 Apr 2016 15:36:17 GMT']
Expires: ['-1']
Pragma: [no-cache]
Strict-Transport-Security: [max-age=31536000; includeSubDomains]
- x-ms-ratelimit-remaining-subscription-writes: ['1199']
+ x-ms-ratelimit-remaining-subscription-writes: ['1198']
status: {code: 204, message: No Content}
version: 1
diff --git a/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/generated.py b/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/generated.py
index dce31f5c729..29332660abe 100644
--- a/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/generated.py
+++ b/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/generated.py
@@ -11,11 +11,17 @@
from azure.cli.commands._auto_command import build_operation, CommandDefinition
from azure.cli.commands._command_creation import get_mgmt_service_client
from azure.cli.commands import CommandTable, LongRunningOperation, patch_aliases
-from azure.cli.command_modules.vm.mgmt.lib import (VMCreationClient as VMClient,
- VMCreationClientConfiguration
- as VMClientConfig)
-from azure.cli.command_modules.vm.mgmt.lib.operations import VMOperations
from azure.cli._locale import L
+from azure.cli.command_modules.vm.mgmt_avail_set.lib import (AvailSetCreationClient
+ as AvailSetClient,
+ AvailSetCreationClientConfiguration
+ as AvailSetClientConfig)
+from azure.cli.command_modules.vm.mgmt_avail_set.lib.operations import AvailSetOperations
+from azure.cli.command_modules.vm.mgmt_vm_create.lib import (VMCreationClient as VMClient,
+ VMCreationClientConfiguration
+ as VMClientConfig)
+from azure.cli.command_modules.vm.mgmt_vm_create.lib.operations import VMOperations
+from azure.cli._help_files import helps
from ._params import (PARAMETER_ALIASES, VM_CREATE_EXTRA_PARAMETERS, VM_CREATE_PARAMETER_ALIASES,
VM_PATCH_EXTRA_PARAMETERS)
@@ -36,7 +42,7 @@
],
command_table, patch_aliases(PARAMETER_ALIASES, {
'availability_set_name': {'name': '--name -n'}
- }))
+ }))
build_operation(
'vm machine-extension-image', 'virtual_machine_extension_images', _compute_client_factory,
@@ -64,7 +70,7 @@
],
command_table, patch_aliases(PARAMETER_ALIASES, {
'vm_extension_name': {'name': '--name -n'}
- }))
+ }))
build_operation(
'vm image', 'virtual_machine_images', _compute_client_factory,
@@ -104,7 +110,7 @@
],
command_table, patch_aliases(PARAMETER_ALIASES, {
'vm_name': {'name': '--name -n'}
- }))
+ }))
build_operation(
'vm', None, ConvenienceVmCommands,
@@ -167,4 +173,27 @@
],
command_table, patch_aliases(PARAMETER_ALIASES, {
'image_location': {'name': '--location -l'}
- }))
+ }))
+
+avail_set_param_aliases = {
+ 'name': {
+ 'name': '--name -n'
+ }
+ }
+
+helps['vm availability-set create'] = """
+ type: command
+ long-summary: For more info, see https://blogs.technet.microsoft.com/yungchou/2013/05/14/window-azure-fault-domain-and-upgrade-domain-explained-explained-reprised/
+"""
+
+build_operation("vm availability-set",
+ 'avail_set',
+ lambda **_: get_mgmt_service_client(AvailSetClient, AvailSetClientConfig),
+ [
+ CommandDefinition(AvailSetOperations.create_or_update,
+ LongRunningOperation(L('Creating availability set'), L('Availability set created')),
+ 'create')
+ ],
+ command_table,
+ avail_set_param_aliases)
+
diff --git a/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt/__init__.py b/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt_avail_set/__init__.py
similarity index 100%
rename from src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt/__init__.py
rename to src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt_avail_set/__init__.py
diff --git a/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt_avail_set/azuredeploy.json b/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt_avail_set/azuredeploy.json
new file mode 100644
index 00000000000..5e98ddcd723
--- /dev/null
+++ b/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt_avail_set/azuredeploy.json
@@ -0,0 +1,54 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "name": {
+ "type": "string",
+ "minLength": 1,
+ "metadata": {
+ "description": "Name of the availability set."
+ }
+ },
+ "location": {
+ "type": "string",
+ "defaultValue": "[resourceGroup().location]",
+ "metadata": {
+ "description": "Location to deploy the availability set."
+ }
+ },
+ "platformUpdateDomainCount": {
+ "type": "string",
+ "defaultValue": 1,
+ "metadata": {
+ "description": "Number of Update Domains."
+ }
+ },
+ "platformFaultDomainCount": {
+ "type": "string",
+ "defaultValue": 1,
+ "metadata": {
+ "description": "Number of Fault Domains."
+ }
+ }
+ },
+ "variables": {
+ },
+ "resources": [
+ {
+ "name": "[parameters('name')]",
+ "type": "Microsoft.Compute/availabilitySets",
+ "location": "[parameters('location')]",
+ "apiVersion": "2015-06-15",
+ "dependsOn": [ ],
+ "tags": {
+ "displayName": "AvailabilitySet"
+ },
+ "properties": {
+ "platformUpdateDomainCount": "[parameters('platformUpdateDomainCount')]",
+ "platformFaultDomainCount": "[parameters('platformFaultDomainCount')]"
+ }
+ }
+ ],
+ "outputs": {
+ }
+}
diff --git a/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt_avail_set/lib/__init__.py b/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt_avail_set/lib/__init__.py
new file mode 100644
index 00000000000..f6a77d0d872
--- /dev/null
+++ b/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt_avail_set/lib/__init__.py
@@ -0,0 +1,18 @@
+#pylint: skip-file
+# coding=utf-8
+# --------------------------------------------------------------------------
+# Code generated by Microsoft (R) AutoRest Code Generator 0.16.0.0
+# Changes may cause incorrect behavior and will be lost if the code is
+# regenerated.
+# --------------------------------------------------------------------------
+
+from .avail_set_creation_client import AvailSetCreationClient, AvailSetCreationClientConfiguration
+from .version import VERSION
+
+__all__ = [
+ 'AvailSetCreationClient',
+ 'AvailSetCreationClientConfiguration'
+]
+
+__version__ = VERSION
+
diff --git a/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt_avail_set/lib/avail_set_creation_client.py b/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt_avail_set/lib/avail_set_creation_client.py
new file mode 100644
index 00000000000..803984f5352
--- /dev/null
+++ b/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt_avail_set/lib/avail_set_creation_client.py
@@ -0,0 +1,94 @@
+#pylint: skip-file
+# coding=utf-8
+# --------------------------------------------------------------------------
+# Code generated by Microsoft (R) AutoRest Code Generator 0.16.0.0
+# Changes may cause incorrect behavior and will be lost if the code is
+# regenerated.
+# --------------------------------------------------------------------------
+
+from msrest.service_client import ServiceClient
+from msrest import Serializer, Deserializer
+from msrestazure import AzureConfiguration
+from .version import VERSION
+from .operations.avail_set_operations import AvailSetOperations
+from . import models
+
+
+class AvailSetCreationClientConfiguration(AzureConfiguration):
+ """Configuration for AvailSetCreationClient
+ Note that all parameters used to create this instance are saved as instance
+ attributes.
+
+ :param credentials: Gets Azure subscription credentials.
+ :type credentials: :mod:`A msrestazure Credentials
+ object`
+ :param subscription_id: Gets subscription credentials which uniquely
+ identify Microsoft Azure subscription. The subscription ID forms part of
+ the URI for every service call.
+ :type subscription_id: str
+ :param api_version: Client Api Version.
+ :type api_version: str
+ :param accept_language: Gets or sets the preferred language for the
+ response.
+ :type accept_language: str
+ :param long_running_operation_retry_timeout: Gets or sets the retry
+ timeout in seconds for Long Running Operations. Default value is 30.
+ :type long_running_operation_retry_timeout: int
+ :param generate_client_request_id: When set to true a unique
+ x-ms-client-request-id value is generated and included in each request.
+ Default is true.
+ :type generate_client_request_id: bool
+ :param str base_url: Service URL
+ :param str filepath: Existing config
+ """
+
+ def __init__(
+ self, credentials, subscription_id, api_version='2015-11-01', accept_language='en-US', long_running_operation_retry_timeout=30, generate_client_request_id=True, base_url=None, filepath=None):
+
+ if credentials is None:
+ raise ValueError("Parameter 'credentials' must not be None.")
+ if subscription_id is None:
+ raise ValueError("Parameter 'subscription_id' must not be None.")
+ if not isinstance(subscription_id, str):
+ raise TypeError("Parameter 'subscription_id' must be str.")
+ if api_version is not None and not isinstance(api_version, str):
+ raise TypeError("Optional parameter 'api_version' must be str.")
+ if accept_language is not None and not isinstance(accept_language, str):
+ raise TypeError("Optional parameter 'accept_language' must be str.")
+ if not base_url:
+ base_url = 'https://management.azure.com'
+
+ super(AvailSetCreationClientConfiguration, self).__init__(base_url, filepath)
+
+ self.add_user_agent('availsetcreationclient/{}'.format(VERSION))
+ self.add_user_agent('Azure-SDK-For-Python')
+
+ self.credentials = credentials
+ self.subscription_id = subscription_id
+ self.api_version = api_version
+ self.accept_language = accept_language
+ self.long_running_operation_retry_timeout = long_running_operation_retry_timeout
+ self.generate_client_request_id = generate_client_request_id
+
+
+class AvailSetCreationClient(object):
+ """AvailSetCreationClient
+
+ :param config: Configuration for client.
+ :type config: AvailSetCreationClientConfiguration
+
+ :ivar avail_set: AvailSet operations
+ :vartype avail_set: .operations.AvailSetOperations
+ """
+
+ def __init__(self, config):
+
+ self._client = ServiceClient(config.credentials, config)
+
+ client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
+ self._serialize = Serializer()
+ self._deserialize = Deserializer(client_models)
+
+ self.config = config
+ self.avail_set = AvailSetOperations(
+ self._client, self.config, self._serialize, self._deserialize)
diff --git a/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt/lib/credentials.py b/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt_avail_set/lib/credentials.py
similarity index 100%
rename from src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt/lib/credentials.py
rename to src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt_avail_set/lib/credentials.py
diff --git a/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt/lib/exceptions.py b/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt_avail_set/lib/exceptions.py
similarity index 100%
rename from src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt/lib/exceptions.py
rename to src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt_avail_set/lib/exceptions.py
diff --git a/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt_avail_set/lib/models/__init__.py b/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt_avail_set/lib/models/__init__.py
new file mode 100644
index 00000000000..4b5f6524033
--- /dev/null
+++ b/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt_avail_set/lib/models/__init__.py
@@ -0,0 +1,33 @@
+#pylint: skip-file
+# coding=utf-8
+# --------------------------------------------------------------------------
+# Code generated by Microsoft (R) AutoRest Code Generator 0.16.0.0
+# Changes may cause incorrect behavior and will be lost if the code is
+# regenerated.
+# --------------------------------------------------------------------------
+
+from .deployment_avail_set import DeploymentAvailSet
+from .template_link import TemplateLink
+from .parameters_link import ParametersLink
+from .provider_resource_type import ProviderResourceType
+from .provider import Provider
+from .basic_dependency import BasicDependency
+from .dependency import Dependency
+from .deployment_properties_extended import DeploymentPropertiesExtended
+from .deployment_extended import DeploymentExtended
+from .avail_set_creation_client_enums import (
+ DeploymentMode,
+)
+
+__all__ = [
+ 'DeploymentAvailSet',
+ 'TemplateLink',
+ 'ParametersLink',
+ 'ProviderResourceType',
+ 'Provider',
+ 'BasicDependency',
+ 'Dependency',
+ 'DeploymentPropertiesExtended',
+ 'DeploymentExtended',
+ 'DeploymentMode',
+]
diff --git a/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt/lib/models/vm_creation_client_enums.py b/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt_avail_set/lib/models/avail_set_creation_client_enums.py
similarity index 100%
rename from src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt/lib/models/vm_creation_client_enums.py
rename to src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt_avail_set/lib/models/avail_set_creation_client_enums.py
diff --git a/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt/lib/models/basic_dependency.py b/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt_avail_set/lib/models/basic_dependency.py
similarity index 100%
rename from src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt/lib/models/basic_dependency.py
rename to src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt_avail_set/lib/models/basic_dependency.py
diff --git a/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt/lib/models/dependency.py b/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt_avail_set/lib/models/dependency.py
similarity index 100%
rename from src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt/lib/models/dependency.py
rename to src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt_avail_set/lib/models/dependency.py
diff --git a/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt_avail_set/lib/models/deployment_avail_set.py b/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt_avail_set/lib/models/deployment_avail_set.py
new file mode 100644
index 00000000000..9819f35d897
--- /dev/null
+++ b/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt_avail_set/lib/models/deployment_avail_set.py
@@ -0,0 +1,66 @@
+#pylint: skip-file
+# coding=utf-8
+# --------------------------------------------------------------------------
+# Code generated by Microsoft (R) AutoRest Code Generator 0.16.0.0
+# Changes may cause incorrect behavior and will be lost if the code is
+# regenerated.
+# --------------------------------------------------------------------------
+
+from msrest.serialization import Model
+
+
+class DeploymentAvailSet(Model):
+ """
+ Deployment operation parameters.
+
+ Variables are only populated by the server, and will be ignored when
+ sending a request.
+
+ :ivar uri: URI referencing the template. Default value:
+ "https://azuresdkci.blob.core.windows.net/templatehost/CreateAvailSet/azuredeploy.json"
+ .
+ :vartype uri: str
+ :param content_version: If included it must match the ContentVersion in
+ the template.
+ :type content_version: str
+ :param location: Location to deploy the availability set.
+ :type location: str
+ :param name: Name of the availability set.
+ :type name: str
+ :param platform_fault_domain_count: Number of Fault Domains. Default
+ value: "1" .
+ :type platform_fault_domain_count: str
+ :param platform_update_domain_count: Number of Update Domains. Default
+ value: "1" .
+ :type platform_update_domain_count: str
+ :ivar mode: Gets or sets the deployment mode. Default value:
+ "Incremental" .
+ :vartype mode: str
+ """
+
+ _validation = {
+ 'uri': {'required': True, 'constant': True},
+ 'name': {'required': True},
+ 'mode': {'required': True, 'constant': True},
+ }
+
+ _attribute_map = {
+ 'uri': {'key': 'properties.templateLink.uri', 'type': 'str'},
+ 'content_version': {'key': 'properties.templateLink.contentVersion', 'type': 'str'},
+ 'location': {'key': 'properties.parameters.location.value', 'type': 'str'},
+ 'name': {'key': 'properties.parameters.name.value', 'type': 'str'},
+ 'platform_fault_domain_count': {'key': 'properties.parameters.platformFaultDomainCount.value', 'type': 'str'},
+ 'platform_update_domain_count': {'key': 'properties.parameters.platformUpdateDomainCount.value', 'type': 'str'},
+ 'mode': {'key': 'properties.mode', 'type': 'str'},
+ }
+
+ uri = "https://azuresdkci.blob.core.windows.net/templatehost/CreateAvailSet/azuredeploy.json"
+
+ mode = "Incremental"
+
+ def __init__(self, name, content_version=None, location=None, platform_fault_domain_count="1", platform_update_domain_count="1"):
+ self.content_version = content_version
+ self.location = location
+ self.name = name
+ self.platform_fault_domain_count = platform_fault_domain_count
+ self.platform_update_domain_count = platform_update_domain_count
diff --git a/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt/lib/models/deployment_extended.py b/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt_avail_set/lib/models/deployment_extended.py
similarity index 100%
rename from src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt/lib/models/deployment_extended.py
rename to src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt_avail_set/lib/models/deployment_extended.py
diff --git a/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt/lib/models/deployment_properties_extended.py b/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt_avail_set/lib/models/deployment_properties_extended.py
similarity index 100%
rename from src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt/lib/models/deployment_properties_extended.py
rename to src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt_avail_set/lib/models/deployment_properties_extended.py
diff --git a/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt_avail_set/lib/models/deployment_vm.py b/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt_avail_set/lib/models/deployment_vm.py
new file mode 100644
index 00000000000..4db699e097b
--- /dev/null
+++ b/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt_avail_set/lib/models/deployment_vm.py
@@ -0,0 +1,70 @@
+#pylint: skip-file
+#pylint: skip-file
+#pylint: skip-file
+#pylint: skip-file
+# coding=utf-8
+# --------------------------------------------------------------------------
+# Code generated by Microsoft (R) AutoRest Code Generator 0.16.0.0
+# Changes may cause incorrect behavior and will be lost if the code is
+# regenerated.
+# --------------------------------------------------------------------------
+
+from msrest.serialization import Model
+
+
+class DeploymentVM(Model):
+ """
+ Deployment operation parameters.
+
+ Variables are only populated by the server, and will be ignored when
+ sending a request.
+
+ :ivar uri: URI referencing the template. Default value:
+ "https://azuresdkci.blob.core.windows.net/templatehost/CreateVM/azuredeploy.json"
+ .
+ :vartype uri: str
+ :param content_version: If included it must match the ContentVersion in
+ the template.
+ :type content_version: str
+ :param availability_set_name: Name of the availability set.
+ :type availability_set_name: str
+ :param location: Location to deploy the availability set. Default value:
+ "[resourceGroup().location]" .
+ :type location: str
+ :param platform_fault_domain_count: Number of Fault Domains. Default
+ value: "1" .
+ :type platform_fault_domain_count: str
+ :param platform_update_domain_count: Number of Update Domains. Default
+ value: "1" .
+ :type platform_update_domain_count: str
+ :ivar mode: Gets or sets the deployment mode. Default value:
+ "Incremental" .
+ :vartype mode: str
+ """
+
+ _validation = {
+ 'uri': {'required': True, 'constant': True},
+ 'availability_set_name': {'required': True},
+ 'mode': {'required': True, 'constant': True},
+ }
+
+ _attribute_map = {
+ 'uri': {'key': 'properties.templateLink.uri', 'type': 'str'},
+ 'content_version': {'key': 'properties.templateLink.contentVersion', 'type': 'str'},
+ 'availability_set_name': {'key': 'properties.parameters.availabilitySetName.value', 'type': 'str'},
+ 'location': {'key': 'properties.parameters.location.value', 'type': 'str'},
+ 'platform_fault_domain_count': {'key': 'properties.parameters.platformFaultDomainCount.value', 'type': 'str'},
+ 'platform_update_domain_count': {'key': 'properties.parameters.platformUpdateDomainCount.value', 'type': 'str'},
+ 'mode': {'key': 'properties.mode', 'type': 'str'},
+ }
+
+ uri = "https://azuresdkci.blob.core.windows.net/templatehost/CreateVM/azuredeploy.json"
+
+ mode = "Incremental"
+
+ def __init__(self, availability_set_name, content_version=None, location="[resourceGroup().location]", platform_fault_domain_count="1", platform_update_domain_count="1"):
+ self.content_version = content_version
+ self.availability_set_name = availability_set_name
+ self.location = location
+ self.platform_fault_domain_count = platform_fault_domain_count
+ self.platform_update_domain_count = platform_update_domain_count
diff --git a/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt/lib/models/parameters_link.py b/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt_avail_set/lib/models/parameters_link.py
similarity index 100%
rename from src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt/lib/models/parameters_link.py
rename to src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt_avail_set/lib/models/parameters_link.py
diff --git a/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt/lib/models/provider.py b/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt_avail_set/lib/models/provider.py
similarity index 100%
rename from src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt/lib/models/provider.py
rename to src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt_avail_set/lib/models/provider.py
diff --git a/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt/lib/models/provider_resource_type.py b/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt_avail_set/lib/models/provider_resource_type.py
similarity index 100%
rename from src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt/lib/models/provider_resource_type.py
rename to src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt_avail_set/lib/models/provider_resource_type.py
diff --git a/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt_avail_set/lib/models/template_link.py b/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt_avail_set/lib/models/template_link.py
new file mode 100644
index 00000000000..cedae723666
--- /dev/null
+++ b/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt_avail_set/lib/models/template_link.py
@@ -0,0 +1,40 @@
+#pylint: skip-file
+# coding=utf-8
+# --------------------------------------------------------------------------
+# Code generated by Microsoft (R) AutoRest Code Generator 0.16.0.0
+# Changes may cause incorrect behavior and will be lost if the code is
+# regenerated.
+# --------------------------------------------------------------------------
+
+from msrest.serialization import Model
+
+
+class TemplateLink(Model):
+ """
+ Entity representing the reference to the template.
+
+ Variables are only populated by the server, and will be ignored when
+ sending a request.
+
+ :ivar uri: URI referencing the template. Default value:
+ "https://azuresdkci.blob.core.windows.net/templatehost/CreateAvailSet/azuredeploy.json"
+ .
+ :vartype uri: str
+ :param content_version: If included it must match the ContentVersion in
+ the template.
+ :type content_version: str
+ """
+
+ _validation = {
+ 'uri': {'required': True, 'constant': True},
+ }
+
+ _attribute_map = {
+ 'uri': {'key': 'uri', 'type': 'str'},
+ 'content_version': {'key': 'contentVersion', 'type': 'str'},
+ }
+
+ uri = "https://azuresdkci.blob.core.windows.net/templatehost/CreateAvailSet/azuredeploy.json"
+
+ def __init__(self, content_version=None):
+ self.content_version = content_version
diff --git a/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt_avail_set/lib/operations/__init__.py b/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt_avail_set/lib/operations/__init__.py
new file mode 100644
index 00000000000..58fc8762cc4
--- /dev/null
+++ b/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt_avail_set/lib/operations/__init__.py
@@ -0,0 +1,13 @@
+#pylint: skip-file
+# coding=utf-8
+# --------------------------------------------------------------------------
+# Code generated by Microsoft (R) AutoRest Code Generator 0.16.0.0
+# Changes may cause incorrect behavior and will be lost if the code is
+# regenerated.
+# --------------------------------------------------------------------------
+
+from .avail_set_operations import AvailSetOperations
+
+__all__ = [
+ 'AvailSetOperations',
+]
diff --git a/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt_avail_set/lib/operations/avail_set_operations.py b/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt_avail_set/lib/operations/avail_set_operations.py
new file mode 100644
index 00000000000..b95512c4db7
--- /dev/null
+++ b/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt_avail_set/lib/operations/avail_set_operations.py
@@ -0,0 +1,136 @@
+#pylint: skip-file
+# coding=utf-8
+# --------------------------------------------------------------------------
+# Code generated by Microsoft (R) AutoRest Code Generator 0.16.0.0
+# Changes may cause incorrect behavior and will be lost if the code is
+# regenerated.
+# --------------------------------------------------------------------------
+
+from msrest.pipeline import ClientRawResponse
+from msrestazure.azure_exceptions import CloudError
+from msrestazure.azure_operation import AzureOperationPoller
+import uuid
+
+from .. import models
+
+
+class AvailSetOperations(object):
+ """AvailSetOperations operations.
+
+ :param client: Client for service requests.
+ :param config: Configuration of service client.
+ :param serializer: An object model serializer.
+ :param deserializer: An objec model deserializer.
+ """
+
+ def __init__(self, client, config, serializer, deserializer):
+
+ self._client = client
+ self._serialize = serializer
+ self._deserialize = deserializer
+
+ self.config = config
+
+ def create_or_update(
+ self, resource_group_name, deployment_name, name, content_version=None, location=None, platform_fault_domain_count="1", platform_update_domain_count="1", custom_headers={}, raw=False, **operation_config):
+ """
+ Create or update a virtual machine.
+
+ :param resource_group_name: The name of the resource group. The name
+ is case insensitive.
+ :type resource_group_name: str
+ :param deployment_name: The name of the deployment.
+ :type deployment_name: str
+ :param name: Name of the availability set.
+ :type name: str
+ :param content_version: If included it must match the ContentVersion
+ in the template.
+ :type content_version: str
+ :param location: Location to deploy the availability set.
+ :type location: str
+ :param platform_fault_domain_count: Number of Fault Domains.
+ :type platform_fault_domain_count: str
+ :param platform_update_domain_count: Number of Update Domains.
+ :type platform_update_domain_count: str
+ :param dict custom_headers: headers that will be added to the request
+ :param bool raw: returns the direct response alongside the
+ deserialized response
+ :rtype:
+ :class:`AzureOperationPoller`
+ instance that returns :class:`DeploymentExtended
+ `
+ :rtype: :class:`ClientRawResponse`
+ if raw=true
+ """
+ parameters = models.DeploymentAvailSet(content_version=content_version, location=location, name=name, platform_fault_domain_count=platform_fault_domain_count, platform_update_domain_count=platform_update_domain_count)
+
+ # Construct URL
+ url = '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deployments/{deploymentName}'
+ path_format_arguments = {
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=64, min_length=1, pattern='^[-\w\._]+$'),
+ 'deploymentName': self._serialize.url("deployment_name", deployment_name, 'str', max_length=64, min_length=1, pattern='^[-\w\._]+$'),
+ 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str')
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {}
+ query_parameters['api-version'] = self._serialize.query("self.config.api_version", self.config.api_version, 'str')
+
+ # Construct headers
+ header_parameters = {}
+ header_parameters['Content-Type'] = 'application/json; charset=utf-8'
+ if self.config.generate_client_request_id:
+ header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
+ if custom_headers:
+ header_parameters.update(custom_headers)
+ if self.config.accept_language is not None:
+ header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
+
+ # Construct body
+ body_content = self._serialize.body(parameters, 'DeploymentAvailSet')
+
+ # Construct and send request
+ def long_running_send():
+
+ request = self._client.put(url, query_parameters)
+ return self._client.send(
+ request, header_parameters, body_content, **operation_config)
+
+ def get_long_running_status(status_link, headers={}):
+
+ request = self._client.get(status_link)
+ request.headers.update(headers)
+ return self._client.send(
+ request, header_parameters, **operation_config)
+
+ def get_long_running_output(response):
+
+ if response.status_code not in [200, 201]:
+ exp = CloudError(response)
+ exp.request_id = response.headers.get('x-ms-request-id')
+ raise exp
+
+ deserialized = None
+
+ if response.status_code == 200:
+ deserialized = self._deserialize('DeploymentExtended', response)
+ if response.status_code == 201:
+ deserialized = self._deserialize('DeploymentExtended', response)
+
+ if raw:
+ client_raw_response = ClientRawResponse(deserialized, response)
+ return client_raw_response
+
+ return deserialized
+
+ if raw:
+ response = long_running_send()
+ return get_long_running_output(response)
+
+ long_running_operation_timeout = operation_config.get(
+ 'long_running_operation_timeout',
+ self.config.long_running_operation_timeout)
+ return AzureOperationPoller(
+ long_running_send, get_long_running_output,
+ get_long_running_status, long_running_operation_timeout)
diff --git a/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt_avail_set/lib/operations/vm_operations.py b/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt_avail_set/lib/operations/vm_operations.py
new file mode 100644
index 00000000000..7a700ad877d
--- /dev/null
+++ b/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt_avail_set/lib/operations/vm_operations.py
@@ -0,0 +1,139 @@
+#pylint: skip-file
+#pylint: skip-file
+#pylint: skip-file
+#pylint: skip-file
+# coding=utf-8
+# --------------------------------------------------------------------------
+# Code generated by Microsoft (R) AutoRest Code Generator 0.16.0.0
+# Changes may cause incorrect behavior and will be lost if the code is
+# regenerated.
+# --------------------------------------------------------------------------
+
+from msrest.pipeline import ClientRawResponse
+from msrestazure.azure_exceptions import CloudError
+from msrestazure.azure_operation import AzureOperationPoller
+import uuid
+
+from .. import models
+
+
+class VMOperations(object):
+ """VMOperations operations.
+
+ :param client: Client for service requests.
+ :param config: Configuration of service client.
+ :param serializer: An object model serializer.
+ :param deserializer: An objec model deserializer.
+ """
+
+ def __init__(self, client, config, serializer, deserializer):
+
+ self._client = client
+ self._serialize = serializer
+ self._deserialize = deserializer
+
+ self.config = config
+
+ def create_or_update(
+ self, resource_group_name, deployment_name, availability_set_name, content_version=None, location="[resourceGroup().location]", platform_fault_domain_count="1", platform_update_domain_count="1", custom_headers={}, raw=False, **operation_config):
+ """
+ Create or update a virtual machine.
+
+ :param resource_group_name: The name of the resource group. The name
+ is case insensitive.
+ :type resource_group_name: str
+ :param deployment_name: The name of the deployment.
+ :type deployment_name: str
+ :param availability_set_name: Name of the availability set.
+ :type availability_set_name: str
+ :param content_version: If included it must match the ContentVersion
+ in the template.
+ :type content_version: str
+ :param location: Location to deploy the availability set.
+ :type location: str
+ :param platform_fault_domain_count: Number of Fault Domains.
+ :type platform_fault_domain_count: str
+ :param platform_update_domain_count: Number of Update Domains.
+ :type platform_update_domain_count: str
+ :param dict custom_headers: headers that will be added to the request
+ :param bool raw: returns the direct response alongside the
+ deserialized response
+ :rtype:
+ :class:`AzureOperationPoller`
+ instance that returns :class:`DeploymentExtended
+ `
+ :rtype: :class:`ClientRawResponse`
+ if raw=true
+ """
+ parameters = models.DeploymentVM(content_version=content_version, availability_set_name=availability_set_name, location=location, platform_fault_domain_count=platform_fault_domain_count, platform_update_domain_count=platform_update_domain_count)
+
+ # Construct URL
+ url = '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deployments/{deploymentName}'
+ path_format_arguments = {
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=64, min_length=1, pattern='^[-\w\._]+$'),
+ 'deploymentName': self._serialize.url("deployment_name", deployment_name, 'str', max_length=64, min_length=1, pattern='^[-\w\._]+$'),
+ 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str')
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {}
+ query_parameters['api-version'] = self._serialize.query("self.config.api_version", self.config.api_version, 'str')
+
+ # Construct headers
+ header_parameters = {}
+ header_parameters['Content-Type'] = 'application/json; charset=utf-8'
+ if self.config.generate_client_request_id:
+ header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
+ if custom_headers:
+ header_parameters.update(custom_headers)
+ if self.config.accept_language is not None:
+ header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
+
+ # Construct body
+ body_content = self._serialize.body(parameters, 'DeploymentVM')
+
+ # Construct and send request
+ def long_running_send():
+
+ request = self._client.put(url, query_parameters)
+ return self._client.send(
+ request, header_parameters, body_content, **operation_config)
+
+ def get_long_running_status(status_link, headers={}):
+
+ request = self._client.get(status_link)
+ request.headers.update(headers)
+ return self._client.send(
+ request, header_parameters, **operation_config)
+
+ def get_long_running_output(response):
+
+ if response.status_code not in [200, 201]:
+ exp = CloudError(response)
+ exp.request_id = response.headers.get('x-ms-request-id')
+ raise exp
+
+ deserialized = None
+
+ if response.status_code == 200:
+ deserialized = self._deserialize('DeploymentExtended', response)
+ if response.status_code == 201:
+ deserialized = self._deserialize('DeploymentExtended', response)
+
+ if raw:
+ client_raw_response = ClientRawResponse(deserialized, response)
+ return client_raw_response
+
+ return deserialized
+
+ if raw:
+ response = long_running_send()
+ return get_long_running_output(response)
+
+ long_running_operation_timeout = operation_config.get(
+ 'long_running_operation_timeout',
+ self.config.long_running_operation_timeout)
+ return AzureOperationPoller(
+ long_running_send, get_long_running_output,
+ get_long_running_status, long_running_operation_timeout)
diff --git a/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt/lib/version.py b/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt_avail_set/lib/version.py
similarity index 100%
rename from src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt/lib/version.py
rename to src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt_avail_set/lib/version.py
diff --git a/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt_avail_set/swagger_create_avail_set.json b/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt_avail_set/swagger_create_avail_set.json
new file mode 100644
index 00000000000..6130e766516
--- /dev/null
+++ b/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt_avail_set/swagger_create_avail_set.json
@@ -0,0 +1,444 @@
+{
+ "swagger": "2.0",
+ "info": {
+ "title": "AvailSetCreationClient",
+ "version": "2015-11-01"
+ },
+ "host": "management.azure.com",
+ "schemes": [
+ "https"
+ ],
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "security": [
+ {
+ "azure_auth": [
+ "user_impersonation"
+ ]
+ }
+ ],
+ "securityDefinitions": {
+ "azure_auth": {
+ "type": "oauth2",
+ "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize",
+ "flow": "implicit",
+ "description": "Azure Active Directory OAuth2 Flow",
+ "scopes": {
+ "user_impersonation": "impersonate your user account"
+ }
+ }
+ },
+ "paths": {
+ "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deployments/{deploymentName}": {
+ "put": {
+ "tags": [
+ "AvailSet"
+ ],
+ "operationId": "AvailSet_CreateOrUpdate",
+ "description": "Create or update a virtual machine.",
+ "parameters": [
+ {
+ "name": "resourceGroupName",
+ "in": "path",
+ "required": true,
+ "type": "string",
+ "description": "The name of the resource group. The name is case insensitive.",
+ "pattern": "^[-\\w\\._]+$",
+ "minLength": 1,
+ "maxLength": 64
+ },
+ {
+ "name": "deploymentName",
+ "in": "path",
+ "required": true,
+ "type": "string",
+ "description": "The name of the deployment.",
+ "pattern": "^[-\\w\\._]+$",
+ "minLength": 1,
+ "maxLength": 64
+ },
+ {
+ "name": "parameters",
+ "x-ms-client-flatten": true,
+ "in": "body",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/Deployment_AvailSet"
+ },
+ "description": "Additional parameters supplied to the operation."
+ },
+ {
+ "$ref": "#/parameters/ApiVersionParameter"
+ },
+ {
+ "$ref": "#/parameters/SubscriptionIdParameter"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "",
+ "schema": {
+ "$ref": "#/definitions/DeploymentExtended"
+ }
+ },
+ "201": {
+ "description": "",
+ "schema": {
+ "$ref": "#/definitions/DeploymentExtended"
+ }
+ }
+ },
+ "x-ms-long-running-operation": true
+ }
+ }
+ },
+ "definitions": {
+ "Deployment_AvailSet": {
+ "properties": {
+ "properties": {
+ "$ref": "#/definitions/DeploymentProperties_AvailSet",
+ "description": "Gets or sets the deployment properties.",
+ "x-ms-client-flatten": true
+ }
+ },
+ "description": "Deployment operation parameters."
+ },
+ "DeploymentProperties_AvailSet": {
+ "properties": {
+ "templateLink": {
+ "$ref": "#/definitions/TemplateLink",
+ "description": "Gets or sets the URI referencing the template. Use only one of Template or TemplateLink.",
+ "x-ms-client-flatten": true
+ },
+ "parameters": {
+ "$ref": "#/definitions/AvailSetParameters",
+ "type": "object",
+ "description": "Deployment parameters. Use only one of Parameters or ParametersLink.",
+ "x-ms-client-flatten": true
+ },
+ "mode": {
+ "type": "string",
+ "description": "Gets or sets the deployment mode.",
+ "enum": [
+ "Incremental"
+ ],
+ "x-ms-enum": {
+ "name": "DeploymentMode",
+ "modelAsString": false
+ }
+ }
+ },
+ "required": [
+ "templateLink",
+ "parameters",
+ "mode"
+ ],
+ "description": "Deployment properties."
+ },
+ "TemplateLink": {
+ "properties": {
+ "uri": {
+ "type": "string",
+ "description": "URI referencing the template.",
+ "enum": [
+ "https://azuresdkci.blob.core.windows.net/templatehost/CreateAvailSet/azuredeploy.json"
+ ]
+ },
+ "contentVersion": {
+ "type": "string",
+ "description": "If included it must match the ContentVersion in the template."
+ }
+ },
+ "required": [
+ "uri"
+ ],
+ "description": "Entity representing the reference to the template."
+ },
+ "AvailSetParameters": {
+
+ "properties": {
+ "location": {
+ "type": "object",
+ "$ref": "#/definitions/DeploymentParameter_location",
+ "x-ms-client-flatten": true
+ },
+ "name": {
+ "type": "object",
+ "$ref": "#/definitions/DeploymentParameter_name",
+ "x-ms-client-flatten": true
+ },
+ "platformFaultDomainCount": {
+ "type": "object",
+ "$ref": "#/definitions/DeploymentParameter_platformFaultDomainCount",
+ "x-ms-client-flatten": true
+ },
+ "platformUpdateDomainCount": {
+ "type": "object",
+ "$ref": "#/definitions/DeploymentParameter_platformUpdateDomainCount",
+ "x-ms-client-flatten": true
+ }
+ },
+ "required": [
+ "name"
+ ]
+
+ },
+ "DeploymentParameter_location": {
+ "properties": {
+ "value": {
+ "type": "string",
+ "description": "Location to deploy the availability set.",
+ "x-ms-client-name": "location"
+ }
+ }
+ },
+ "DeploymentParameter_name": {
+ "properties": {
+ "value": {
+ "type": "string",
+ "description": "Name of the availability set.",
+ "x-ms-client-name": "name"
+ }
+ },
+ "required": [
+ "value"
+ ]
+
+ },
+ "DeploymentParameter_platformFaultDomainCount": {
+ "properties": {
+ "value": {
+ "type": "string",
+ "description": "Number of Fault Domains.",
+ "x-ms-client-name": "platformFaultDomainCount",
+ "default": "1"
+ }
+ }
+ },
+ "DeploymentParameter_platformUpdateDomainCount": {
+ "properties": {
+ "value": {
+ "type": "string",
+ "description": "Number of Update Domains.",
+ "x-ms-client-name": "platformUpdateDomainCount",
+ "default": "1"
+ }
+ }
+ },
+ "ParametersLink": {
+ "properties": {
+ "uri": {
+ "type": "string",
+ "description": "URI referencing the template."
+ },
+ "contentVersion": {
+ "type": "string",
+ "description": "If included it must match the ContentVersion in the template."
+ }
+ },
+ "required": [
+ "uri"
+ ],
+ "description": "Entity representing the reference to the deployment paramaters."
+ },
+ "ProviderResourceType": {
+ "properties": {
+ "resourceType": {
+ "type": "string",
+ "description": "Gets or sets the resource type."
+ },
+ "locations": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "description": "Gets or sets the collection of locations where this resource type can be created in."
+ },
+ "apiVersions": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "description": "Gets or sets the api version."
+ },
+ "properties": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ },
+ "description": "Gets or sets the properties."
+ }
+ },
+ "description": "Resource type managed by the resource provider."
+ },
+ "Provider": {
+ "properties": {
+ "id": {
+ "type": "string",
+ "description": "Gets or sets the provider id."
+ },
+ "namespace": {
+ "type": "string",
+ "description": "Gets or sets the namespace of the provider."
+ },
+ "registrationState": {
+ "type": "string",
+ "description": "Gets or sets the registration state of the provider."
+ },
+ "resourceTypes": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/ProviderResourceType"
+ },
+ "description": "Gets or sets the collection of provider resource types."
+ }
+ },
+ "description": "Resource provider information."
+ },
+ "BasicDependency": {
+ "properties": {
+ "id": {
+ "type": "string",
+ "description": "Gets or sets the ID of the dependency."
+ },
+ "resourceType": {
+ "type": "string",
+ "description": "Gets or sets the dependency resource type."
+ },
+ "resourceName": {
+ "type": "string",
+ "description": "Gets or sets the dependency resource name."
+ }
+ },
+ "description": "Deployment dependency information."
+ },
+ "Dependency": {
+ "properties": {
+ "dependsOn": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/BasicDependency"
+ },
+ "description": "Gets the list of dependencies."
+ },
+ "id": {
+ "type": "string",
+ "description": "Gets or sets the ID of the dependency."
+ },
+ "resourceType": {
+ "type": "string",
+ "description": "Gets or sets the dependency resource type."
+ },
+ "resourceName": {
+ "type": "string",
+ "description": "Gets or sets the dependency resource name."
+ }
+ },
+ "description": "Deployment dependency information."
+ },
+ "DeploymentPropertiesExtended": {
+ "properties": {
+ "provisioningState": {
+ "type": "string",
+ "description": "Gets or sets the state of the provisioning."
+ },
+ "correlationId": {
+ "type": "string",
+ "description": "Gets or sets the correlation ID of the deployment."
+ },
+ "timestamp": {
+ "type": "string",
+ "format": "date-time",
+ "description": "Gets or sets the timestamp of the template deployment."
+ },
+ "outputs": {
+ "type": "object",
+ "description": "Gets or sets key/value pairs that represent deploymentoutput."
+ },
+ "providers": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/Provider"
+ },
+ "description": "Gets the list of resource providers needed for the deployment."
+ },
+ "dependencies": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/Dependency"
+ },
+ "description": "Gets the list of deployment dependencies."
+ },
+ "template": {
+ "type": "object",
+ "description": "Gets or sets the template content. Use only one of Template or TemplateLink."
+ },
+ "TemplateLink": {
+ "$ref": "#/definitions/TemplateLink",
+ "description": "Gets or sets the URI referencing the template. Use only one of Template or TemplateLink."
+ },
+ "parameters": {
+ "type": "object",
+ "description": "Deployment parameters. Use only one of Parameters or ParametersLink."
+ },
+ "parametersLink": {
+ "$ref": "#/definitions/ParametersLink",
+ "description": "Gets or sets the URI referencing the parameters. Use only one of Parameters or ParametersLink."
+ },
+ "mode": {
+ "type": "string",
+ "description": "Gets or sets the deployment mode.",
+ "enum": [
+ "Incremental",
+ "Complete"
+ ],
+ "x-ms-enum": {
+ "name": "DeploymentMode",
+ "modelAsString": false
+ }
+ }
+ },
+ "description": "Deployment properties with additional details."
+ },
+ "DeploymentExtended": {
+ "properties": {
+ "id": {
+ "type": "string",
+ "description": "Gets or sets the ID of the deployment."
+ },
+ "name": {
+ "type": "string",
+ "description": "Gets or sets the name of the deployment."
+ },
+ "properties": {
+ "$ref": "#/definitions/DeploymentPropertiesExtended",
+ "description": "Gets or sets deployment properties."
+ }
+ },
+ "required": [
+ "name"
+ ],
+ "description": "Deployment information."
+ }
+ },
+ "parameters": {
+ "SubscriptionIdParameter": {
+ "name": "subscriptionId",
+ "in": "path",
+ "required": true,
+ "type": "string",
+ "description": "Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call."
+ },
+ "ApiVersionParameter": {
+ "name": "api-version",
+ "in": "query",
+ "required": true,
+ "type": "string",
+ "description": "Client Api Version."
+ }
+ }
+}
diff --git a/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt_vm_create/__init__.py b/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt_vm_create/__init__.py
new file mode 100644
index 00000000000..680e627fad4
--- /dev/null
+++ b/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt_vm_create/__init__.py
@@ -0,0 +1,3 @@
+#pylint: skip-file
+import pkg_resources
+pkg_resources.declare_namespace(__name__)
diff --git a/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt/azuredeploy.json b/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt_vm_create/azuredeploy.json
similarity index 100%
rename from src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt/azuredeploy.json
rename to src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt_vm_create/azuredeploy.json
diff --git a/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt/lib/__init__.py b/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt_vm_create/lib/__init__.py
similarity index 100%
rename from src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt/lib/__init__.py
rename to src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt_vm_create/lib/__init__.py
diff --git a/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt_vm_create/lib/credentials.py b/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt_vm_create/lib/credentials.py
new file mode 100644
index 00000000000..efae788dc8f
--- /dev/null
+++ b/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt_vm_create/lib/credentials.py
@@ -0,0 +1,17 @@
+#pylint: skip-file
+# coding=utf-8
+# --------------------------------------------------------------------------
+# Code generated by Microsoft (R) AutoRest Code Generator 0.16.0.0
+# Changes may cause incorrect behavior and will be lost if the code is
+# regenerated.
+# --------------------------------------------------------------------------
+
+from msrest.authentication import (
+ BasicAuthentication,
+ BasicTokenAuthentication,
+ OAuthTokenAuthentication)
+
+from msrestazure.azure_active_directory import (
+ InteractiveCredentials,
+ ServicePrincipalCredentials,
+ UserPassCredentials)
diff --git a/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt_vm_create/lib/exceptions.py b/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt_vm_create/lib/exceptions.py
new file mode 100644
index 00000000000..bb6640eab50
--- /dev/null
+++ b/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt_vm_create/lib/exceptions.py
@@ -0,0 +1,20 @@
+#pylint: skip-file
+# coding=utf-8
+# --------------------------------------------------------------------------
+# Code generated by Microsoft (R) AutoRest Code Generator 0.16.0.0
+# Changes may cause incorrect behavior and will be lost if the code is
+# regenerated.
+# --------------------------------------------------------------------------
+
+from msrest.exceptions import (
+ ClientException,
+ SerializationError,
+ DeserializationError,
+ TokenExpiredError,
+ ClientRequestError,
+ AuthenticationError,
+ HttpOperationError,
+ ValidationError,
+)
+
+from msrestazure.azure_exceptions import CloudError
diff --git a/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt/lib/models/__init__.py b/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt_vm_create/lib/models/__init__.py
similarity index 88%
rename from src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt/lib/models/__init__.py
rename to src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt_vm_create/lib/models/__init__.py
index 9d621aa8d2b..1b9de5ff881 100644
--- a/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt/lib/models/__init__.py
+++ b/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt_vm_create/lib/models/__init__.py
@@ -8,7 +8,6 @@
from .deployment_vm import DeploymentVM
from .template_link import TemplateLink
-from .deployment_parameter_artifacts_location import DeploymentParameterArtifactsLocation
from .parameters_link import ParametersLink
from .provider_resource_type import ProviderResourceType
from .provider import Provider
@@ -23,7 +22,6 @@
__all__ = [
'DeploymentVM',
'TemplateLink',
- 'DeploymentParameterArtifactsLocation',
'ParametersLink',
'ProviderResourceType',
'Provider',
diff --git a/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt_vm_create/lib/models/basic_dependency.py b/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt_vm_create/lib/models/basic_dependency.py
new file mode 100644
index 00000000000..9b60408113b
--- /dev/null
+++ b/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt_vm_create/lib/models/basic_dependency.py
@@ -0,0 +1,33 @@
+#pylint: skip-file
+# coding=utf-8
+# --------------------------------------------------------------------------
+# Code generated by Microsoft (R) AutoRest Code Generator 0.16.0.0
+# Changes may cause incorrect behavior and will be lost if the code is
+# regenerated.
+# --------------------------------------------------------------------------
+
+from msrest.serialization import Model
+
+
+class BasicDependency(Model):
+ """
+ Deployment dependency information.
+
+ :param id: Gets or sets the ID of the dependency.
+ :type id: str
+ :param resource_type: Gets or sets the dependency resource type.
+ :type resource_type: str
+ :param resource_name: Gets or sets the dependency resource name.
+ :type resource_name: str
+ """
+
+ _attribute_map = {
+ 'id': {'key': 'id', 'type': 'str'},
+ 'resource_type': {'key': 'resourceType', 'type': 'str'},
+ 'resource_name': {'key': 'resourceName', 'type': 'str'},
+ }
+
+ def __init__(self, id=None, resource_type=None, resource_name=None):
+ self.id = id
+ self.resource_type = resource_type
+ self.resource_name = resource_name
diff --git a/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt_vm_create/lib/models/dependency.py b/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt_vm_create/lib/models/dependency.py
new file mode 100644
index 00000000000..89ea2293fb1
--- /dev/null
+++ b/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt_vm_create/lib/models/dependency.py
@@ -0,0 +1,38 @@
+#pylint: skip-file
+# coding=utf-8
+# --------------------------------------------------------------------------
+# Code generated by Microsoft (R) AutoRest Code Generator 0.16.0.0
+# Changes may cause incorrect behavior and will be lost if the code is
+# regenerated.
+# --------------------------------------------------------------------------
+
+from msrest.serialization import Model
+
+
+class Dependency(Model):
+ """
+ Deployment dependency information.
+
+ :param depends_on: Gets the list of dependencies.
+ :type depends_on: list of :class:`BasicDependency
+ `
+ :param id: Gets or sets the ID of the dependency.
+ :type id: str
+ :param resource_type: Gets or sets the dependency resource type.
+ :type resource_type: str
+ :param resource_name: Gets or sets the dependency resource name.
+ :type resource_name: str
+ """
+
+ _attribute_map = {
+ 'depends_on': {'key': 'dependsOn', 'type': '[BasicDependency]'},
+ 'id': {'key': 'id', 'type': 'str'},
+ 'resource_type': {'key': 'resourceType', 'type': 'str'},
+ 'resource_name': {'key': 'resourceName', 'type': 'str'},
+ }
+
+ def __init__(self, depends_on=None, id=None, resource_type=None, resource_name=None):
+ self.depends_on = depends_on
+ self.id = id
+ self.resource_type = resource_type
+ self.resource_name = resource_name
diff --git a/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt_vm_create/lib/models/deployment_extended.py b/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt_vm_create/lib/models/deployment_extended.py
new file mode 100644
index 00000000000..e28d1939e44
--- /dev/null
+++ b/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt_vm_create/lib/models/deployment_extended.py
@@ -0,0 +1,38 @@
+#pylint: skip-file
+# coding=utf-8
+# --------------------------------------------------------------------------
+# Code generated by Microsoft (R) AutoRest Code Generator 0.16.0.0
+# Changes may cause incorrect behavior and will be lost if the code is
+# regenerated.
+# --------------------------------------------------------------------------
+
+from msrest.serialization import Model
+
+
+class DeploymentExtended(Model):
+ """
+ Deployment information.
+
+ :param id: Gets or sets the ID of the deployment.
+ :type id: str
+ :param name: Gets or sets the name of the deployment.
+ :type name: str
+ :param properties: Gets or sets deployment properties.
+ :type properties: :class:`DeploymentPropertiesExtended
+ `
+ """
+
+ _validation = {
+ 'name': {'required': True},
+ }
+
+ _attribute_map = {
+ 'id': {'key': 'id', 'type': 'str'},
+ 'name': {'key': 'name', 'type': 'str'},
+ 'properties': {'key': 'properties', 'type': 'DeploymentPropertiesExtended'},
+ }
+
+ def __init__(self, name, id=None, properties=None):
+ self.id = id
+ self.name = name
+ self.properties = properties
diff --git a/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt/lib/models/deployment_parameter_artifacts_location.py b/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt_vm_create/lib/models/deployment_parameter_artifacts_location.py
similarity index 96%
rename from src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt/lib/models/deployment_parameter_artifacts_location.py
rename to src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt_vm_create/lib/models/deployment_parameter_artifacts_location.py
index e25525da4c5..f008793aa31 100644
--- a/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt/lib/models/deployment_parameter_artifacts_location.py
+++ b/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt_vm_create/lib/models/deployment_parameter_artifacts_location.py
@@ -1,4 +1,6 @@
#pylint: skip-file
+#pylint: skip-file
+#pylint: skip-file
# coding=utf-8
# --------------------------------------------------------------------------
# Code generated by Microsoft (R) AutoRest Code Generator 0.16.0.0
diff --git a/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt/lib/models/deployment_parameter_virtual_network_ip_address_prefix.py b/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt_vm_create/lib/models/deployment_parameter_virtual_network_ip_address_prefix.py
similarity index 100%
rename from src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt/lib/models/deployment_parameter_virtual_network_ip_address_prefix.py
rename to src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt_vm_create/lib/models/deployment_parameter_virtual_network_ip_address_prefix.py
diff --git a/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt_vm_create/lib/models/deployment_properties_extended.py b/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt_vm_create/lib/models/deployment_properties_extended.py
new file mode 100644
index 00000000000..e075e1db1be
--- /dev/null
+++ b/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt_vm_create/lib/models/deployment_properties_extended.py
@@ -0,0 +1,75 @@
+#pylint: skip-file
+# coding=utf-8
+# --------------------------------------------------------------------------
+# Code generated by Microsoft (R) AutoRest Code Generator 0.16.0.0
+# Changes may cause incorrect behavior and will be lost if the code is
+# regenerated.
+# --------------------------------------------------------------------------
+
+from msrest.serialization import Model
+
+
+class DeploymentPropertiesExtended(Model):
+ """
+ Deployment properties with additional details.
+
+ :param provisioning_state: Gets or sets the state of the provisioning.
+ :type provisioning_state: str
+ :param correlation_id: Gets or sets the correlation ID of the deployment.
+ :type correlation_id: str
+ :param timestamp: Gets or sets the timestamp of the template deployment.
+ :type timestamp: datetime
+ :param outputs: Gets or sets key/value pairs that represent
+ deploymentoutput.
+ :type outputs: object
+ :param providers: Gets the list of resource providers needed for the
+ deployment.
+ :type providers: list of :class:`Provider `
+ :param dependencies: Gets the list of deployment dependencies.
+ :type dependencies: list of :class:`Dependency
+ `
+ :param template: Gets or sets the template content. Use only one of
+ Template or TemplateLink.
+ :type template: object
+ :param template_link: Gets or sets the URI referencing the template. Use
+ only one of Template or TemplateLink.
+ :type template_link: :class:`TemplateLink
+ `
+ :param parameters: Deployment parameters. Use only one of Parameters or
+ ParametersLink.
+ :type parameters: object
+ :param parameters_link: Gets or sets the URI referencing the parameters.
+ Use only one of Parameters or ParametersLink.
+ :type parameters_link: :class:`ParametersLink
+ `
+ :param mode: Gets or sets the deployment mode. Possible values include:
+ 'Incremental', 'Complete'
+ :type mode: str
+ """
+
+ _attribute_map = {
+ 'provisioning_state': {'key': 'provisioningState', 'type': 'str'},
+ 'correlation_id': {'key': 'correlationId', 'type': 'str'},
+ 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'},
+ 'outputs': {'key': 'outputs', 'type': 'object'},
+ 'providers': {'key': 'providers', 'type': '[Provider]'},
+ 'dependencies': {'key': 'dependencies', 'type': '[Dependency]'},
+ 'template': {'key': 'template', 'type': 'object'},
+ 'template_link': {'key': 'TemplateLink', 'type': 'TemplateLink'},
+ 'parameters': {'key': 'parameters', 'type': 'object'},
+ 'parameters_link': {'key': 'parametersLink', 'type': 'ParametersLink'},
+ 'mode': {'key': 'mode', 'type': 'DeploymentMode'},
+ }
+
+ def __init__(self, provisioning_state=None, correlation_id=None, timestamp=None, outputs=None, providers=None, dependencies=None, template=None, template_link=None, parameters=None, parameters_link=None, mode=None):
+ self.provisioning_state = provisioning_state
+ self.correlation_id = correlation_id
+ self.timestamp = timestamp
+ self.outputs = outputs
+ self.providers = providers
+ self.dependencies = dependencies
+ self.template = template
+ self.template_link = template_link
+ self.parameters = parameters
+ self.parameters_link = parameters_link
+ self.mode = mode
diff --git a/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt/lib/models/deployment_vm.py b/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt_vm_create/lib/models/deployment_vm.py
similarity index 88%
rename from src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt/lib/models/deployment_vm.py
rename to src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt_vm_create/lib/models/deployment_vm.py
index 943eba7801d..1934e0a8de3 100644
--- a/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt/lib/models/deployment_vm.py
+++ b/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt_vm_create/lib/models/deployment_vm.py
@@ -6,7 +6,6 @@
# regenerated.
# --------------------------------------------------------------------------
-from .deployment_parameter_artifacts_location import DeploymentParameterArtifactsLocation
from msrest.serialization import Model
@@ -24,102 +23,102 @@ class DeploymentVM(Model):
:param content_version: If included it must match the ContentVersion in
the template.
:type content_version: str
- :param storage_container_name: Name of storage container for the VM OS
- disk. Default value: "vhds" .
- :type storage_container_name: str
- :param virtual_network_name: Name of virtual network to add VM to.
- :type virtual_network_name: str
- :param subnet_ip_address_prefix: The subnet address prefix in CIDR
- format. Default value: "10.0.0.0/24" .
- :type subnet_ip_address_prefix: str
- :param private_ip_address_allocation: Private IP address allocation
- method. Possible values include: 'Dynamic', 'Static'. Default value:
- "Dynamic" .
- :type private_ip_address_allocation: str
+ :ivar _artifacts_location: Container URI of of the template. Default
+ value: "https://azuresdkci.blob.core.windows.net/templatehost/CreateVM" .
+ :vartype _artifacts_location: str
+ :param admin_password: Password for the Virtual Machine. Required if SSH
+ (Linux only) is not specified.
+ :type admin_password: str
+ :param admin_username: Username for the Virtual Machine.
+ :type admin_username: str
+ :param authentication_type: Password or SSH Public Key authentication.
+ Possible values include: 'password', 'sshkey'. Default value: "password"
+ .
+ :type authentication_type: str
+ :param availability_set_id: Existing availability set for the VM.
+ :type availability_set_id: str
+ :param availability_set_type: Flag to add the VM to an existing
+ availability set. Possible values include: 'none', 'existing'. Default
+ value: "none" .
+ :type availability_set_type: str
:param dns_name_for_public_ip: Globally unique DNS Name for the Public IP
used to access the Virtual Machine. Requires a new public IP to be
created by setting Public IP Address Type to New.
:type dns_name_for_public_ip: str
- :param storage_account_type: Whether to use an existing storage account
- or create a new one. Possible values include: 'new', 'existing'. Default
- value: "new" .
- :type storage_account_type: str
+ :param dns_name_type: Associate VMs with a public IP address to a DNS
+ name. Possible values include: 'none', 'new'. Default value: "none" .
+ :type dns_name_type: str
+ :param location: Location for VM resources.
+ :type location: str
+ :param name: The VM name.
+ :type name: str
+ :param os_disk_name: Name of new VM OS disk. Default value: "osdiskimage"
+ .
+ :type os_disk_name: str
:param os_disk_uri: URI for a custom VHD image.
:type os_disk_uri: str
- :ivar _artifacts_location:
- :vartype _artifacts_location:
- :class:`DeploymentParameterArtifactsLocation `
- :param name: The VM resource name.
- :type name: str
- :param virtual_network_type: Whether to use an existing VNet or create a
- new one. Possible values include: 'new', 'existing'. Default value:
- "new" .
- :type virtual_network_type: str
- :param admin_password: Password for the Virtual Machine. Required if SSH
- (Linux only) is not specified.
- :type admin_password: str
+ :param os_offer: The OS Offer to install. Default value: "WindowsServer" .
+ :type os_offer: str
+ :param os_publisher: The OS publisher of the OS image. Default value:
+ "MicrosoftWindowsServer" .
+ :type os_publisher: str
:param os_sku: The OS SKU to install. Default value: "2012-R2-Datacenter"
.
:type os_sku: str
- :param subnet_name: The subnet name.
- :type subnet_name: str
:param os_type: Common OS choices. Choose 'Custom' to specify an image
with the osPublisher, osOffer, osSKU, and osVersion parameters. Possible
values include: 'Win2012R2Datacenter', 'Win2012Datacenter',
'Win2008R2SP1', 'Custom'. Default value: "Win2012R2Datacenter" .
:type os_type: str
- :param admin_username: Username for the Virtual Machine.
- :type admin_username: str
:param os_version: The OS version to install. Default value: "latest" .
:type os_version: str
- :param os_disk_name: Name of new VM OS disk. Default value: "osdiskimage"
- .
- :type os_disk_name: str
- :param ssh_dest_key_path: VM file path for SSH key.
- :type ssh_dest_key_path: str
- :param os_offer: The OS Offer to install. Default value: "WindowsServer" .
- :type os_offer: str
+ :param private_ip_address_allocation: Private IP address allocation
+ method. Possible values include: 'Dynamic', 'Static'. Default value:
+ "Dynamic" .
+ :type private_ip_address_allocation: str
:param public_ip_address_allocation: Public IP address allocation method.
Possible values include: 'Dynamic', 'Static'. Default value: "Dynamic" .
:type public_ip_address_allocation: str
- :param authentication_type: Password or SSH Public Key authentication.
- Possible values include: 'password', 'sshkey'. Default value: "password"
- .
- :type authentication_type: str
+ :param public_ip_address_name: Name of public IP address to use.
+ :type public_ip_address_name: str
+ :param public_ip_address_type: Use a public IP Address for the VM Nic.
+ Possible values include: 'none', 'new', 'existing'. Default value:
+ "none" .
+ :type public_ip_address_type: str
+ :param size: The VM Size that should be created. See
+ https://azure.microsoft.com/en-us/pricing/details/virtual-machines/ for
+ size info. Default value: "Standard_A2" .
+ :type size: str
+ :param ssh_dest_key_path: Destination file path on VM for SSH key.
+ :type ssh_dest_key_path: str
+ :param ssh_key_value: SSH key file data.
+ :type ssh_key_value: str
:param storage_account_name: Name of storage account for the VM OS disk.
:type storage_account_name: str
+ :param storage_account_type: Whether to use an existing storage account
+ or create a new one. Possible values include: 'new', 'existing'. Default
+ value: "new" .
+ :type storage_account_type: str
+ :param storage_container_name: Name of storage container for the VM OS
+ disk. Default value: "vhds" .
+ :type storage_container_name: str
:param storage_redundancy_type: The VM storage type (Standard_LRS,
Standard_GRS, Standard_RAGRS). Default value: "Standard_LRS" .
:type storage_redundancy_type: str
- :param size: The VM Size that should be created. See
- https://azure.microsoft.com/en-us/pricing/details/virtual-machines/ for
- size info. Default value: "Standard_A2" .
- :type size: str
- :param public_ip_address_type: Use a public IP Address for the VM Nic.
- Possible values include: 'none', 'new', 'existing'. Default value:
- "none" .
- :type public_ip_address_type: str
+ :param subnet_ip_address_prefix: The subnet address prefix in CIDR
+ format. Default value: "10.0.0.0/24" .
+ :type subnet_ip_address_prefix: str
+ :param subnet_name: The subnet name.
+ :type subnet_name: str
:param virtual_network_ip_address_prefix: The virtual network IP address
prefix in CIDR format. Default value: "10.0.0.0/16" .
:type virtual_network_ip_address_prefix: str
- :param availability_set_id: Existing availability set for the VM.
- :type availability_set_id: str
- :param ssh_key_value: SSH key file data.
- :type ssh_key_value: str
- :param location: Location for VM resources.
- :type location: str
- :param os_publisher: The OS publisher of the OS image. Default value:
- "MicrosoftWindowsServer" .
- :type os_publisher: str
- :param availability_set_type: Flag to add the VM to an existing
- availability set. Possible values include: 'none', 'existing'. Default
- value: "none" .
- :type availability_set_type: str
- :param public_ip_address_name: Name of public IP address to use.
- :type public_ip_address_name: str
- :param dns_name_type: Associate VMs with a public IP address to a DNS
- name. Possible values include: 'none', 'new'. Default value: "none" .
- :type dns_name_type: str
+ :param virtual_network_name: Name of virtual network to add VM to.
+ :type virtual_network_name: str
+ :param virtual_network_type: Whether to use an existing VNet or create a
+ new one. Possible values include: 'new', 'existing'. Default value:
+ "new" .
+ :type virtual_network_type: str
:ivar mode: Gets or sets the deployment mode. Default value:
"Incremental" .
:vartype mode: str
@@ -127,88 +126,88 @@ class DeploymentVM(Model):
_validation = {
'uri': {'required': True, 'constant': True},
- '_artifacts_location': {'constant': True},
- 'name': {'required': True},
+ '_artifacts_location': {'required': True, 'constant': True},
'admin_username': {'required': True},
+ 'name': {'required': True},
'mode': {'required': True, 'constant': True},
}
_attribute_map = {
'uri': {'key': 'properties.templateLink.uri', 'type': 'str'},
'content_version': {'key': 'properties.templateLink.contentVersion', 'type': 'str'},
- 'storage_container_name': {'key': 'properties.parameters.storageContainerName.value', 'type': 'str'},
- 'virtual_network_name': {'key': 'properties.parameters.virtualNetworkName.value', 'type': 'str'},
- 'subnet_ip_address_prefix': {'key': 'properties.parameters.subnetIpAddressPrefix.value', 'type': 'str'},
- 'private_ip_address_allocation': {'key': 'properties.parameters.privateIpAddressAllocation.value', 'type': 'str'},
+ '_artifacts_location': {'key': 'properties.parameters._artifactsLocation.value', 'type': 'str'},
+ 'admin_password': {'key': 'properties.parameters.adminPassword.value', 'type': 'str'},
+ 'admin_username': {'key': 'properties.parameters.adminUsername.value', 'type': 'str'},
+ 'authentication_type': {'key': 'properties.parameters.authenticationType.value', 'type': 'str'},
+ 'availability_set_id': {'key': 'properties.parameters.availabilitySetId.value', 'type': 'str'},
+ 'availability_set_type': {'key': 'properties.parameters.availabilitySetType.value', 'type': 'str'},
'dns_name_for_public_ip': {'key': 'properties.parameters.dnsNameForPublicIP.value', 'type': 'str'},
- 'storage_account_type': {'key': 'properties.parameters.storageAccountType.value', 'type': 'str'},
- 'os_disk_uri': {'key': 'properties.parameters.osDiskUri.value', 'type': 'str'},
- '_artifacts_location': {'key': 'properties.parameters._artifactsLocation', 'type': 'DeploymentParameterArtifactsLocation'},
+ 'dns_name_type': {'key': 'properties.parameters.dnsNameType.value', 'type': 'str'},
+ 'location': {'key': 'properties.parameters.location.value', 'type': 'str'},
'name': {'key': 'properties.parameters.name.value', 'type': 'str'},
- 'virtual_network_type': {'key': 'properties.parameters.virtualNetworkType.value', 'type': 'str'},
- 'admin_password': {'key': 'properties.parameters.adminPassword.value', 'type': 'str'},
+ 'os_disk_name': {'key': 'properties.parameters.osDiskName.value', 'type': 'str'},
+ 'os_disk_uri': {'key': 'properties.parameters.osDiskUri.value', 'type': 'str'},
+ 'os_offer': {'key': 'properties.parameters.osOffer.value', 'type': 'str'},
+ 'os_publisher': {'key': 'properties.parameters.osPublisher.value', 'type': 'str'},
'os_sku': {'key': 'properties.parameters.osSKU.value', 'type': 'str'},
- 'subnet_name': {'key': 'properties.parameters.subnetName.value', 'type': 'str'},
'os_type': {'key': 'properties.parameters.osType.value', 'type': 'str'},
- 'admin_username': {'key': 'properties.parameters.adminUsername.value', 'type': 'str'},
'os_version': {'key': 'properties.parameters.osVersion.value', 'type': 'str'},
- 'os_disk_name': {'key': 'properties.parameters.osDiskName.value', 'type': 'str'},
- 'ssh_dest_key_path': {'key': 'properties.parameters.sshDestKeyPath.value', 'type': 'str'},
- 'os_offer': {'key': 'properties.parameters.osOffer.value', 'type': 'str'},
+ 'private_ip_address_allocation': {'key': 'properties.parameters.privateIpAddressAllocation.value', 'type': 'str'},
'public_ip_address_allocation': {'key': 'properties.parameters.publicIpAddressAllocation.value', 'type': 'str'},
- 'authentication_type': {'key': 'properties.parameters.authenticationType.value', 'type': 'str'},
+ 'public_ip_address_name': {'key': 'properties.parameters.publicIpAddressName.value', 'type': 'str'},
+ 'public_ip_address_type': {'key': 'properties.parameters.publicIpAddressType.value', 'type': 'str'},
+ 'size': {'key': 'properties.parameters.size.value', 'type': 'str'},
+ 'ssh_dest_key_path': {'key': 'properties.parameters.sshDestKeyPath.value', 'type': 'str'},
+ 'ssh_key_value': {'key': 'properties.parameters.sshKeyValue.value', 'type': 'str'},
'storage_account_name': {'key': 'properties.parameters.storageAccountName.value', 'type': 'str'},
+ 'storage_account_type': {'key': 'properties.parameters.storageAccountType.value', 'type': 'str'},
+ 'storage_container_name': {'key': 'properties.parameters.storageContainerName.value', 'type': 'str'},
'storage_redundancy_type': {'key': 'properties.parameters.storageRedundancyType.value', 'type': 'str'},
- 'size': {'key': 'properties.parameters.size.value', 'type': 'str'},
- 'public_ip_address_type': {'key': 'properties.parameters.publicIpAddressType.value', 'type': 'str'},
+ 'subnet_ip_address_prefix': {'key': 'properties.parameters.subnetIpAddressPrefix.value', 'type': 'str'},
+ 'subnet_name': {'key': 'properties.parameters.subnetName.value', 'type': 'str'},
'virtual_network_ip_address_prefix': {'key': 'properties.parameters.virtualNetworkIpAddressPrefix.value', 'type': 'str'},
- 'availability_set_id': {'key': 'properties.parameters.availabilitySetId.value', 'type': 'str'},
- 'ssh_key_value': {'key': 'properties.parameters.sshKeyValue.value', 'type': 'str'},
- 'location': {'key': 'properties.parameters.location.value', 'type': 'str'},
- 'os_publisher': {'key': 'properties.parameters.osPublisher.value', 'type': 'str'},
- 'availability_set_type': {'key': 'properties.parameters.availabilitySetType.value', 'type': 'str'},
- 'public_ip_address_name': {'key': 'properties.parameters.publicIpAddressName.value', 'type': 'str'},
- 'dns_name_type': {'key': 'properties.parameters.dnsNameType.value', 'type': 'str'},
+ 'virtual_network_name': {'key': 'properties.parameters.virtualNetworkName.value', 'type': 'str'},
+ 'virtual_network_type': {'key': 'properties.parameters.virtualNetworkType.value', 'type': 'str'},
'mode': {'key': 'properties.mode', 'type': 'str'},
}
uri = "https://azuresdkci.blob.core.windows.net/templatehost/CreateVM/azuredeploy.json"
- _artifacts_location = DeploymentParameterArtifactsLocation()
+ _artifacts_location = "https://azuresdkci.blob.core.windows.net/templatehost/CreateVM"
mode = "Incremental"
- def __init__(self, name, admin_username, content_version=None, storage_container_name="vhds", virtual_network_name=None, subnet_ip_address_prefix="10.0.0.0/24", private_ip_address_allocation="Dynamic", dns_name_for_public_ip=None, storage_account_type="new", os_disk_uri=None, virtual_network_type="new", admin_password=None, os_sku="2012-R2-Datacenter", subnet_name=None, os_type="Win2012R2Datacenter", os_version="latest", os_disk_name="osdiskimage", ssh_dest_key_path=None, os_offer="WindowsServer", public_ip_address_allocation="Dynamic", authentication_type="password", storage_account_name=None, storage_redundancy_type="Standard_LRS", size="Standard_A2", public_ip_address_type="none", virtual_network_ip_address_prefix="10.0.0.0/16", availability_set_id=None, ssh_key_value=None, location=None, os_publisher="MicrosoftWindowsServer", availability_set_type="none", public_ip_address_name=None, dns_name_type="none"):
+ def __init__(self, admin_username, name, content_version=None, admin_password=None, authentication_type="password", availability_set_id=None, availability_set_type="none", dns_name_for_public_ip=None, dns_name_type="none", location=None, os_disk_name="osdiskimage", os_disk_uri=None, os_offer="WindowsServer", os_publisher="MicrosoftWindowsServer", os_sku="2012-R2-Datacenter", os_type="Win2012R2Datacenter", os_version="latest", private_ip_address_allocation="Dynamic", public_ip_address_allocation="Dynamic", public_ip_address_name=None, public_ip_address_type="none", size="Standard_A2", ssh_dest_key_path=None, ssh_key_value=None, storage_account_name=None, storage_account_type="new", storage_container_name="vhds", storage_redundancy_type="Standard_LRS", subnet_ip_address_prefix="10.0.0.0/24", subnet_name=None, virtual_network_ip_address_prefix="10.0.0.0/16", virtual_network_name=None, virtual_network_type="new"):
self.content_version = content_version
- self.storage_container_name = storage_container_name
- self.virtual_network_name = virtual_network_name
- self.subnet_ip_address_prefix = subnet_ip_address_prefix
- self.private_ip_address_allocation = private_ip_address_allocation
+ self.admin_password = admin_password
+ self.admin_username = admin_username
+ self.authentication_type = authentication_type
+ self.availability_set_id = availability_set_id
+ self.availability_set_type = availability_set_type
self.dns_name_for_public_ip = dns_name_for_public_ip
- self.storage_account_type = storage_account_type
- self.os_disk_uri = os_disk_uri
+ self.dns_name_type = dns_name_type
+ self.location = location
self.name = name
- self.virtual_network_type = virtual_network_type
- self.admin_password = admin_password
+ self.os_disk_name = os_disk_name
+ self.os_disk_uri = os_disk_uri
+ self.os_offer = os_offer
+ self.os_publisher = os_publisher
self.os_sku = os_sku
- self.subnet_name = subnet_name
self.os_type = os_type
- self.admin_username = admin_username
self.os_version = os_version
- self.os_disk_name = os_disk_name
- self.ssh_dest_key_path = ssh_dest_key_path
- self.os_offer = os_offer
+ self.private_ip_address_allocation = private_ip_address_allocation
self.public_ip_address_allocation = public_ip_address_allocation
- self.authentication_type = authentication_type
+ self.public_ip_address_name = public_ip_address_name
+ self.public_ip_address_type = public_ip_address_type
+ self.size = size
+ self.ssh_dest_key_path = ssh_dest_key_path
+ self.ssh_key_value = ssh_key_value
self.storage_account_name = storage_account_name
+ self.storage_account_type = storage_account_type
+ self.storage_container_name = storage_container_name
self.storage_redundancy_type = storage_redundancy_type
- self.size = size
- self.public_ip_address_type = public_ip_address_type
+ self.subnet_ip_address_prefix = subnet_ip_address_prefix
+ self.subnet_name = subnet_name
self.virtual_network_ip_address_prefix = virtual_network_ip_address_prefix
- self.availability_set_id = availability_set_id
- self.ssh_key_value = ssh_key_value
- self.location = location
- self.os_publisher = os_publisher
- self.availability_set_type = availability_set_type
- self.public_ip_address_name = public_ip_address_name
- self.dns_name_type = dns_name_type
+ self.virtual_network_name = virtual_network_name
+ self.virtual_network_type = virtual_network_type
diff --git a/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt_vm_create/lib/models/parameters_link.py b/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt_vm_create/lib/models/parameters_link.py
new file mode 100644
index 00000000000..d22dd5214f9
--- /dev/null
+++ b/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt_vm_create/lib/models/parameters_link.py
@@ -0,0 +1,34 @@
+#pylint: skip-file
+# coding=utf-8
+# --------------------------------------------------------------------------
+# Code generated by Microsoft (R) AutoRest Code Generator 0.16.0.0
+# Changes may cause incorrect behavior and will be lost if the code is
+# regenerated.
+# --------------------------------------------------------------------------
+
+from msrest.serialization import Model
+
+
+class ParametersLink(Model):
+ """
+ Entity representing the reference to the deployment paramaters.
+
+ :param uri: URI referencing the template.
+ :type uri: str
+ :param content_version: If included it must match the ContentVersion in
+ the template.
+ :type content_version: str
+ """
+
+ _validation = {
+ 'uri': {'required': True},
+ }
+
+ _attribute_map = {
+ 'uri': {'key': 'uri', 'type': 'str'},
+ 'content_version': {'key': 'contentVersion', 'type': 'str'},
+ }
+
+ def __init__(self, uri, content_version=None):
+ self.uri = uri
+ self.content_version = content_version
diff --git a/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt_vm_create/lib/models/provider.py b/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt_vm_create/lib/models/provider.py
new file mode 100644
index 00000000000..114afc30484
--- /dev/null
+++ b/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt_vm_create/lib/models/provider.py
@@ -0,0 +1,40 @@
+#pylint: skip-file
+# coding=utf-8
+# --------------------------------------------------------------------------
+# Code generated by Microsoft (R) AutoRest Code Generator 0.16.0.0
+# Changes may cause incorrect behavior and will be lost if the code is
+# regenerated.
+# --------------------------------------------------------------------------
+
+from msrest.serialization import Model
+
+
+class Provider(Model):
+ """
+ Resource provider information.
+
+ :param id: Gets or sets the provider id.
+ :type id: str
+ :param namespace: Gets or sets the namespace of the provider.
+ :type namespace: str
+ :param registration_state: Gets or sets the registration state of the
+ provider.
+ :type registration_state: str
+ :param resource_types: Gets or sets the collection of provider resource
+ types.
+ :type resource_types: list of :class:`ProviderResourceType
+ `
+ """
+
+ _attribute_map = {
+ 'id': {'key': 'id', 'type': 'str'},
+ 'namespace': {'key': 'namespace', 'type': 'str'},
+ 'registration_state': {'key': 'registrationState', 'type': 'str'},
+ 'resource_types': {'key': 'resourceTypes', 'type': '[ProviderResourceType]'},
+ }
+
+ def __init__(self, id=None, namespace=None, registration_state=None, resource_types=None):
+ self.id = id
+ self.namespace = namespace
+ self.registration_state = registration_state
+ self.resource_types = resource_types
diff --git a/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt_vm_create/lib/models/provider_resource_type.py b/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt_vm_create/lib/models/provider_resource_type.py
new file mode 100644
index 00000000000..1d0ea364193
--- /dev/null
+++ b/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt_vm_create/lib/models/provider_resource_type.py
@@ -0,0 +1,38 @@
+#pylint: skip-file
+# coding=utf-8
+# --------------------------------------------------------------------------
+# Code generated by Microsoft (R) AutoRest Code Generator 0.16.0.0
+# Changes may cause incorrect behavior and will be lost if the code is
+# regenerated.
+# --------------------------------------------------------------------------
+
+from msrest.serialization import Model
+
+
+class ProviderResourceType(Model):
+ """
+ Resource type managed by the resource provider.
+
+ :param resource_type: Gets or sets the resource type.
+ :type resource_type: str
+ :param locations: Gets or sets the collection of locations where this
+ resource type can be created in.
+ :type locations: list of str
+ :param api_versions: Gets or sets the api version.
+ :type api_versions: list of str
+ :param properties: Gets or sets the properties.
+ :type properties: dict
+ """
+
+ _attribute_map = {
+ 'resource_type': {'key': 'resourceType', 'type': 'str'},
+ 'locations': {'key': 'locations', 'type': '[str]'},
+ 'api_versions': {'key': 'apiVersions', 'type': '[str]'},
+ 'properties': {'key': 'properties', 'type': '{str}'},
+ }
+
+ def __init__(self, resource_type=None, locations=None, api_versions=None, properties=None):
+ self.resource_type = resource_type
+ self.locations = locations
+ self.api_versions = api_versions
+ self.properties = properties
diff --git a/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt/lib/models/template_link.py b/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt_vm_create/lib/models/template_link.py
similarity index 100%
rename from src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt/lib/models/template_link.py
rename to src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt_vm_create/lib/models/template_link.py
diff --git a/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt_vm_create/lib/models/vm_creation_client_enums.py b/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt_vm_create/lib/models/vm_creation_client_enums.py
new file mode 100644
index 00000000000..a60a1394cfd
--- /dev/null
+++ b/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt_vm_create/lib/models/vm_creation_client_enums.py
@@ -0,0 +1,15 @@
+#pylint: skip-file
+# coding=utf-8
+# --------------------------------------------------------------------------
+# Code generated by Microsoft (R) AutoRest Code Generator 0.16.0.0
+# Changes may cause incorrect behavior and will be lost if the code is
+# regenerated.
+# --------------------------------------------------------------------------
+
+from enum import Enum
+
+
+class DeploymentMode(Enum):
+
+ incremental = "Incremental"
+ complete = "Complete"
diff --git a/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt/lib/operations/__init__.py b/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt_vm_create/lib/operations/__init__.py
similarity index 100%
rename from src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt/lib/operations/__init__.py
rename to src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt_vm_create/lib/operations/__init__.py
diff --git a/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt/lib/operations/vm_operations.py b/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt_vm_create/lib/operations/vm_operations.py
similarity index 81%
rename from src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt/lib/operations/vm_operations.py
rename to src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt_vm_create/lib/operations/vm_operations.py
index a58991ad96d..d1a798b3802 100644
--- a/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt/lib/operations/vm_operations.py
+++ b/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt_vm_create/lib/operations/vm_operations.py
@@ -31,7 +31,7 @@ def __init__(self, client, config, serializer, deserializer):
self.config = config
def create_or_update(
- self, resource_group_name, deployment_name, name, admin_username, content_version=None, storage_container_name="vhds", virtual_network_name=None, subnet_ip_address_prefix="10.0.0.0/24", private_ip_address_allocation="Dynamic", dns_name_for_public_ip=None, storage_account_type="new", os_disk_uri=None, virtual_network_type="new", admin_password=None, os_sku="2012-R2-Datacenter", subnet_name=None, os_type="Win2012R2Datacenter", os_version="latest", os_disk_name="osdiskimage", ssh_dest_key_path=None, os_offer="WindowsServer", public_ip_address_allocation="Dynamic", authentication_type="password", storage_account_name=None, storage_redundancy_type="Standard_LRS", size="Standard_A2", public_ip_address_type="none", virtual_network_ip_address_prefix="10.0.0.0/16", availability_set_id=None, ssh_key_value=None, location=None, os_publisher="MicrosoftWindowsServer", availability_set_type="none", public_ip_address_name=None, dns_name_type="none", custom_headers={}, raw=False, **operation_config):
+ self, resource_group_name, deployment_name, admin_username, name, content_version=None, admin_password=None, authentication_type="password", availability_set_id=None, availability_set_type="none", dns_name_for_public_ip=None, dns_name_type="none", location=None, os_disk_name="osdiskimage", os_disk_uri=None, os_offer="WindowsServer", os_publisher="MicrosoftWindowsServer", os_sku="2012-R2-Datacenter", os_type="Win2012R2Datacenter", os_version="latest", private_ip_address_allocation="Dynamic", public_ip_address_allocation="Dynamic", public_ip_address_name=None, public_ip_address_type="none", size="Standard_A2", ssh_dest_key_path=None, ssh_key_value=None, storage_account_name=None, storage_account_type="new", storage_container_name="vhds", storage_redundancy_type="Standard_LRS", subnet_ip_address_prefix="10.0.0.0/24", subnet_name=None, virtual_network_ip_address_prefix="10.0.0.0/16", virtual_network_name=None, virtual_network_type="new", custom_headers={}, raw=False, **operation_config):
"""
Create or update a virtual machine.
@@ -40,44 +40,43 @@ def create_or_update(
:type resource_group_name: str
:param deployment_name: The name of the deployment.
:type deployment_name: str
- :param name: The VM resource name.
- :type name: str
:param admin_username: Username for the Virtual Machine.
:type admin_username: str
+ :param name: The VM name.
+ :type name: str
:param content_version: If included it must match the ContentVersion
in the template.
:type content_version: str
- :param storage_container_name: Name of storage container for the VM
- OS disk.
- :type storage_container_name: str
- :param virtual_network_name: Name of virtual network to add VM to.
- :type virtual_network_name: str
- :param subnet_ip_address_prefix: The subnet address prefix in CIDR
- format.
- :type subnet_ip_address_prefix: str
- :param private_ip_address_allocation: Private IP address allocation
- method. Possible values include: 'Dynamic', 'Static'
- :type private_ip_address_allocation: str
+ :param admin_password: Password for the Virtual Machine. Required if
+ SSH (Linux only) is not specified.
+ :type admin_password: str
+ :param authentication_type: Password or SSH Public Key
+ authentication. Possible values include: 'password', 'sshkey'
+ :type authentication_type: str
+ :param availability_set_id: Existing availability set for the VM.
+ :type availability_set_id: str
+ :param availability_set_type: Flag to add the VM to an existing
+ availability set. Possible values include: 'none', 'existing'
+ :type availability_set_type: str
:param dns_name_for_public_ip: Globally unique DNS Name for the
Public IP used to access the Virtual Machine. Requires a new public
IP to be created by setting Public IP Address Type to New.
:type dns_name_for_public_ip: str
- :param storage_account_type: Whether to use an existing storage
- account or create a new one. Possible values include: 'new',
- 'existing'
- :type storage_account_type: str
+ :param dns_name_type: Associate VMs with a public IP address to a DNS
+ name. Possible values include: 'none', 'new'
+ :type dns_name_type: str
+ :param location: Location for VM resources.
+ :type location: str
+ :param os_disk_name: Name of new VM OS disk.
+ :type os_disk_name: str
:param os_disk_uri: URI for a custom VHD image.
:type os_disk_uri: str
- :param virtual_network_type: Whether to use an existing VNet or
- create a new one. Possible values include: 'new', 'existing'
- :type virtual_network_type: str
- :param admin_password: Password for the Virtual Machine. Required if
- SSH (Linux only) is not specified.
- :type admin_password: str
+ :param os_offer: The OS Offer to install.
+ :type os_offer: str
+ :param os_publisher: The OS publisher of the OS image.
+ :type os_publisher: str
:param os_sku: The OS SKU to install.
:type os_sku: str
- :param subnet_name: The subnet name.
- :type subnet_name: str
:param os_type: Common OS choices. Choose 'Custom' to specify an
image with the osPublisher, osOffer, osSKU, and osVersion
parameters. Possible values include: 'Win2012R2Datacenter',
@@ -85,50 +84,51 @@ def create_or_update(
:type os_type: str
:param os_version: The OS version to install.
:type os_version: str
- :param os_disk_name: Name of new VM OS disk.
- :type os_disk_name: str
- :param ssh_dest_key_path: VM file path for SSH key.
- :type ssh_dest_key_path: str
- :param os_offer: The OS Offer to install.
- :type os_offer: str
+ :param private_ip_address_allocation: Private IP address allocation
+ method. Possible values include: 'Dynamic', 'Static'
+ :type private_ip_address_allocation: str
:param public_ip_address_allocation: Public IP address allocation
method. Possible values include: 'Dynamic', 'Static'
:type public_ip_address_allocation: str
- :param authentication_type: Password or SSH Public Key
- authentication. Possible values include: 'password', 'sshkey'
- :type authentication_type: str
+ :param public_ip_address_name: Name of public IP address to use.
+ :type public_ip_address_name: str
+ :param public_ip_address_type: Use a public IP Address for the VM
+ Nic. Possible values include: 'none', 'new', 'existing'
+ :type public_ip_address_type: str
+ :param size: The VM Size that should be created. See
+ https://azure.microsoft.com/en-us/pricing/details/virtual-machines/
+ for size info.
+ :type size: str
+ :param ssh_dest_key_path: Destination file path on VM for SSH key.
+ :type ssh_dest_key_path: str
+ :param ssh_key_value: SSH key file data.
+ :type ssh_key_value: str
:param storage_account_name: Name of storage account for the VM OS
disk.
:type storage_account_name: str
+ :param storage_account_type: Whether to use an existing storage
+ account or create a new one. Possible values include: 'new',
+ 'existing'
+ :type storage_account_type: str
+ :param storage_container_name: Name of storage container for the VM
+ OS disk.
+ :type storage_container_name: str
:param storage_redundancy_type: The VM storage type (Standard_LRS,
Standard_GRS, Standard_RAGRS).
:type storage_redundancy_type: str
- :param size: The VM Size that should be created. See
- https://azure.microsoft.com/en-us/pricing/details/virtual-machines/
- for size info.
- :type size: str
- :param public_ip_address_type: Use a public IP Address for the VM
- Nic. Possible values include: 'none', 'new', 'existing'
- :type public_ip_address_type: str
+ :param subnet_ip_address_prefix: The subnet address prefix in CIDR
+ format.
+ :type subnet_ip_address_prefix: str
+ :param subnet_name: The subnet name.
+ :type subnet_name: str
:param virtual_network_ip_address_prefix: The virtual network IP
address prefix in CIDR format.
:type virtual_network_ip_address_prefix: str
- :param availability_set_id: Existing availability set for the VM.
- :type availability_set_id: str
- :param ssh_key_value: SSH key file data.
- :type ssh_key_value: str
- :param location: Location for VM resources.
- :type location: str
- :param os_publisher: The OS publisher of the OS image.
- :type os_publisher: str
- :param availability_set_type: Flag to add the VM to an existing
- availability set. Possible values include: 'none', 'existing'
- :type availability_set_type: str
- :param public_ip_address_name: Name of public IP address to use.
- :type public_ip_address_name: str
- :param dns_name_type: Associate VMs with a public IP address to a DNS
- name. Possible values include: 'none', 'new'
- :type dns_name_type: str
+ :param virtual_network_name: Name of virtual network to add VM to.
+ :type virtual_network_name: str
+ :param virtual_network_type: Whether to use an existing VNet or
+ create a new one. Possible values include: 'new', 'existing'
+ :type virtual_network_type: str
:param dict custom_headers: headers that will be added to the request
:param bool raw: returns the direct response alongside the
deserialized response
@@ -139,7 +139,7 @@ def create_or_update(
:rtype: :class:`ClientRawResponse`
if raw=true
"""
- parameters = models.DeploymentVM(content_version=content_version, storage_container_name=storage_container_name, virtual_network_name=virtual_network_name, subnet_ip_address_prefix=subnet_ip_address_prefix, private_ip_address_allocation=private_ip_address_allocation, dns_name_for_public_ip=dns_name_for_public_ip, storage_account_type=storage_account_type, os_disk_uri=os_disk_uri, name=name, virtual_network_type=virtual_network_type, admin_password=admin_password, os_sku=os_sku, subnet_name=subnet_name, os_type=os_type, admin_username=admin_username, os_version=os_version, os_disk_name=os_disk_name, ssh_dest_key_path=ssh_dest_key_path, os_offer=os_offer, public_ip_address_allocation=public_ip_address_allocation, authentication_type=authentication_type, storage_account_name=storage_account_name, storage_redundancy_type=storage_redundancy_type, size=size, public_ip_address_type=public_ip_address_type, virtual_network_ip_address_prefix=virtual_network_ip_address_prefix, availability_set_id=availability_set_id, ssh_key_value=ssh_key_value, location=location, os_publisher=os_publisher, availability_set_type=availability_set_type, public_ip_address_name=public_ip_address_name, dns_name_type=dns_name_type)
+ parameters = models.DeploymentVM(content_version=content_version, admin_password=admin_password, admin_username=admin_username, authentication_type=authentication_type, availability_set_id=availability_set_id, availability_set_type=availability_set_type, dns_name_for_public_ip=dns_name_for_public_ip, dns_name_type=dns_name_type, location=location, name=name, os_disk_name=os_disk_name, os_disk_uri=os_disk_uri, os_offer=os_offer, os_publisher=os_publisher, os_sku=os_sku, os_type=os_type, os_version=os_version, private_ip_address_allocation=private_ip_address_allocation, public_ip_address_allocation=public_ip_address_allocation, public_ip_address_name=public_ip_address_name, public_ip_address_type=public_ip_address_type, size=size, ssh_dest_key_path=ssh_dest_key_path, ssh_key_value=ssh_key_value, storage_account_name=storage_account_name, storage_account_type=storage_account_type, storage_container_name=storage_container_name, storage_redundancy_type=storage_redundancy_type, subnet_ip_address_prefix=subnet_ip_address_prefix, subnet_name=subnet_name, virtual_network_ip_address_prefix=virtual_network_ip_address_prefix, virtual_network_name=virtual_network_name, virtual_network_type=virtual_network_type)
# Construct URL
url = '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deployments/{deploymentName}'
diff --git a/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt_vm_create/lib/version.py b/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt_vm_create/lib/version.py
new file mode 100644
index 00000000000..b393d644a7a
--- /dev/null
+++ b/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt_vm_create/lib/version.py
@@ -0,0 +1,10 @@
+#pylint: skip-file
+# coding=utf-8
+# --------------------------------------------------------------------------
+# Code generated by Microsoft (R) AutoRest Code Generator 0.16.0.0
+# Changes may cause incorrect behavior and will be lost if the code is
+# regenerated.
+# --------------------------------------------------------------------------
+
+VERSION = "2015-11-01"
+
diff --git a/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt/lib/vm_creation_client.py b/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt_vm_create/lib/vm_creation_client.py
similarity index 100%
rename from src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt/lib/vm_creation_client.py
rename to src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt_vm_create/lib/vm_creation_client.py
diff --git a/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt/nested_templates/ExistingStorageAccount.json b/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt_vm_create/nested_templates/ExistingStorageAccount.json
similarity index 100%
rename from src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt/nested_templates/ExistingStorageAccount.json
rename to src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt_vm_create/nested_templates/ExistingStorageAccount.json
diff --git a/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt/nested_templates/ExistingVNet.json b/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt_vm_create/nested_templates/ExistingVNet.json
similarity index 100%
rename from src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt/nested_templates/ExistingVNet.json
rename to src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt_vm_create/nested_templates/ExistingVNet.json
diff --git a/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt/nested_templates/NewStorageAccount.json b/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt_vm_create/nested_templates/NewStorageAccount.json
similarity index 100%
rename from src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt/nested_templates/NewStorageAccount.json
rename to src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt_vm_create/nested_templates/NewStorageAccount.json
diff --git a/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt/nested_templates/NewVNet.json b/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt_vm_create/nested_templates/NewVNet.json
similarity index 100%
rename from src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt/nested_templates/NewVNet.json
rename to src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt_vm_create/nested_templates/NewVNet.json
diff --git a/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt/nested_templates/nic_ip_existing_dns_none.json b/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt_vm_create/nested_templates/nic_ip_existing_dns_none.json
similarity index 100%
rename from src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt/nested_templates/nic_ip_existing_dns_none.json
rename to src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt_vm_create/nested_templates/nic_ip_existing_dns_none.json
diff --git a/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt/nested_templates/nic_ip_new_dns_new.json b/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt_vm_create/nested_templates/nic_ip_new_dns_new.json
similarity index 100%
rename from src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt/nested_templates/nic_ip_new_dns_new.json
rename to src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt_vm_create/nested_templates/nic_ip_new_dns_new.json
diff --git a/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt/nested_templates/nic_ip_new_dns_none.json b/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt_vm_create/nested_templates/nic_ip_new_dns_none.json
similarity index 100%
rename from src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt/nested_templates/nic_ip_new_dns_none.json
rename to src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt_vm_create/nested_templates/nic_ip_new_dns_none.json
diff --git a/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt/nested_templates/nic_ip_none_dns_none.json b/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt_vm_create/nested_templates/nic_ip_none_dns_none.json
similarity index 100%
rename from src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt/nested_templates/nic_ip_none_dns_none.json
rename to src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt_vm_create/nested_templates/nic_ip_none_dns_none.json
diff --git a/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt/nested_templates/vm_existing_password.json b/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt_vm_create/nested_templates/vm_existing_password.json
similarity index 100%
rename from src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt/nested_templates/vm_existing_password.json
rename to src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt_vm_create/nested_templates/vm_existing_password.json
diff --git a/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt/nested_templates/vm_existing_sshkey.json b/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt_vm_create/nested_templates/vm_existing_sshkey.json
similarity index 100%
rename from src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt/nested_templates/vm_existing_sshkey.json
rename to src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt_vm_create/nested_templates/vm_existing_sshkey.json
diff --git a/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt/nested_templates/vm_none_password.json b/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt_vm_create/nested_templates/vm_none_password.json
similarity index 100%
rename from src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt/nested_templates/vm_none_password.json
rename to src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt_vm_create/nested_templates/vm_none_password.json
diff --git a/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt/nested_templates/vm_none_sshkey.json b/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt_vm_create/nested_templates/vm_none_sshkey.json
similarity index 100%
rename from src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt/nested_templates/vm_none_sshkey.json
rename to src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt_vm_create/nested_templates/vm_none_sshkey.json
diff --git a/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt/swagger_create_vm.json b/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt_vm_create/swagger_create_vm.json
similarity index 93%
rename from src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt/swagger_create_vm.json
rename to src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt_vm_create/swagger_create_vm.json
index f155a984475..504cf473743 100644
--- a/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt/swagger_create_vm.json
+++ b/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/mgmt_vm_create/swagger_create_vm.json
@@ -161,78 +161,84 @@
"VMParameters": {
"properties": {
- "storageContainerName": {
+ "_artifactsLocation": {
"type": "object",
- "$ref": "#/definitions/DeploymentParameter_storageContainerName",
+ "$ref": "#/definitions/DeploymentParameter__artifactsLocation",
"x-ms-client-flatten": true
},
- "virtualNetworkName": {
+ "adminPassword": {
"type": "object",
- "$ref": "#/definitions/DeploymentParameter_virtualNetworkName",
+ "$ref": "#/definitions/DeploymentParameter_adminPassword",
"x-ms-client-flatten": true
},
- "subnetIpAddressPrefix": {
+ "adminUsername": {
"type": "object",
- "$ref": "#/definitions/DeploymentParameter_subnetIpAddressPrefix",
+ "$ref": "#/definitions/DeploymentParameter_adminUsername",
"x-ms-client-flatten": true
},
- "privateIpAddressAllocation": {
+ "authenticationType": {
"type": "object",
- "$ref": "#/definitions/DeploymentParameter_privateIpAddressAllocation",
+ "$ref": "#/definitions/DeploymentParameter_authenticationType",
"x-ms-client-flatten": true
},
- "dnsNameForPublicIP": {
+ "availabilitySetId": {
"type": "object",
- "$ref": "#/definitions/DeploymentParameter_dnsNameForPublicIP",
+ "$ref": "#/definitions/DeploymentParameter_availabilitySetId",
"x-ms-client-flatten": true
},
- "storageAccountType": {
+ "availabilitySetType": {
"type": "object",
- "$ref": "#/definitions/DeploymentParameter_storageAccountType",
+ "$ref": "#/definitions/DeploymentParameter_availabilitySetType",
"x-ms-client-flatten": true
},
- "osDiskUri": {
+ "dnsNameForPublicIP": {
"type": "object",
- "$ref": "#/definitions/DeploymentParameter_osDiskUri",
+ "$ref": "#/definitions/DeploymentParameter_dnsNameForPublicIP",
"x-ms-client-flatten": true
},
- "_artifactsLocation": {
+ "dnsNameType": {
"type": "object",
- "$ref": "#/definitions/DeploymentParameter__artifactsLocation"
+ "$ref": "#/definitions/DeploymentParameter_dnsNameType",
+ "x-ms-client-flatten": true
+ },
+ "location": {
+ "type": "object",
+ "$ref": "#/definitions/DeploymentParameter_location",
+ "x-ms-client-flatten": true
},
"name": {
"type": "object",
"$ref": "#/definitions/DeploymentParameter_name",
"x-ms-client-flatten": true
},
- "virtualNetworkType": {
+ "osDiskName": {
"type": "object",
- "$ref": "#/definitions/DeploymentParameter_virtualNetworkType",
+ "$ref": "#/definitions/DeploymentParameter_osDiskName",
"x-ms-client-flatten": true
},
- "adminPassword": {
+ "osDiskUri": {
"type": "object",
- "$ref": "#/definitions/DeploymentParameter_adminPassword",
+ "$ref": "#/definitions/DeploymentParameter_osDiskUri",
"x-ms-client-flatten": true
},
- "osSKU": {
+ "osOffer": {
"type": "object",
- "$ref": "#/definitions/DeploymentParameter_osSKU",
+ "$ref": "#/definitions/DeploymentParameter_osOffer",
"x-ms-client-flatten": true
},
- "subnetName": {
+ "osPublisher": {
"type": "object",
- "$ref": "#/definitions/DeploymentParameter_subnetName",
+ "$ref": "#/definitions/DeploymentParameter_osPublisher",
"x-ms-client-flatten": true
},
- "osType": {
+ "osSKU": {
"type": "object",
- "$ref": "#/definitions/DeploymentParameter_osType",
+ "$ref": "#/definitions/DeploymentParameter_osSKU",
"x-ms-client-flatten": true
},
- "adminUsername": {
+ "osType": {
"type": "object",
- "$ref": "#/definitions/DeploymentParameter_adminUsername",
+ "$ref": "#/definitions/DeploymentParameter_osType",
"x-ms-client-flatten": true
},
"osVersion": {
@@ -240,191 +246,204 @@
"$ref": "#/definitions/DeploymentParameter_osVersion",
"x-ms-client-flatten": true
},
- "osDiskName": {
- "type": "object",
- "$ref": "#/definitions/DeploymentParameter_osDiskName",
- "x-ms-client-flatten": true
- },
- "sshDestKeyPath": {
+ "privateIpAddressAllocation": {
"type": "object",
- "$ref": "#/definitions/DeploymentParameter_sshDestKeyPath",
+ "$ref": "#/definitions/DeploymentParameter_privateIpAddressAllocation",
"x-ms-client-flatten": true
},
- "osOffer": {
+ "publicIpAddressAllocation": {
"type": "object",
- "$ref": "#/definitions/DeploymentParameter_osOffer",
+ "$ref": "#/definitions/DeploymentParameter_publicIpAddressAllocation",
"x-ms-client-flatten": true
},
- "publicIpAddressAllocation": {
+ "publicIpAddressName": {
"type": "object",
- "$ref": "#/definitions/DeploymentParameter_publicIpAddressAllocation",
+ "$ref": "#/definitions/DeploymentParameter_publicIpAddressName",
"x-ms-client-flatten": true
},
- "authenticationType": {
+ "publicIpAddressType": {
"type": "object",
- "$ref": "#/definitions/DeploymentParameter_authenticationType",
+ "$ref": "#/definitions/DeploymentParameter_publicIpAddressType",
"x-ms-client-flatten": true
},
- "storageAccountName": {
+ "size": {
"type": "object",
- "$ref": "#/definitions/DeploymentParameter_storageAccountName",
+ "$ref": "#/definitions/DeploymentParameter_size",
"x-ms-client-flatten": true
},
- "storageRedundancyType": {
+ "sshDestKeyPath": {
"type": "object",
- "$ref": "#/definitions/DeploymentParameter_storageRedundancyType",
+ "$ref": "#/definitions/DeploymentParameter_sshDestKeyPath",
"x-ms-client-flatten": true
},
- "size": {
+ "sshKeyValue": {
"type": "object",
- "$ref": "#/definitions/DeploymentParameter_size",
+ "$ref": "#/definitions/DeploymentParameter_sshKeyValue",
"x-ms-client-flatten": true
},
- "publicIpAddressType": {
+ "storageAccountName": {
"type": "object",
- "$ref": "#/definitions/DeploymentParameter_publicIpAddressType",
+ "$ref": "#/definitions/DeploymentParameter_storageAccountName",
"x-ms-client-flatten": true
},
- "virtualNetworkIpAddressPrefix": {
+ "storageAccountType": {
"type": "object",
- "$ref": "#/definitions/DeploymentParameter_virtualNetworkIpAddressPrefix",
+ "$ref": "#/definitions/DeploymentParameter_storageAccountType",
"x-ms-client-flatten": true
},
- "availabilitySetId": {
+ "storageContainerName": {
"type": "object",
- "$ref": "#/definitions/DeploymentParameter_availabilitySetId",
+ "$ref": "#/definitions/DeploymentParameter_storageContainerName",
"x-ms-client-flatten": true
},
- "sshKeyValue": {
+ "storageRedundancyType": {
"type": "object",
- "$ref": "#/definitions/DeploymentParameter_sshKeyValue",
+ "$ref": "#/definitions/DeploymentParameter_storageRedundancyType",
"x-ms-client-flatten": true
},
- "location": {
+ "subnetIpAddressPrefix": {
"type": "object",
- "$ref": "#/definitions/DeploymentParameter_location",
+ "$ref": "#/definitions/DeploymentParameter_subnetIpAddressPrefix",
"x-ms-client-flatten": true
},
- "osPublisher": {
+ "subnetName": {
"type": "object",
- "$ref": "#/definitions/DeploymentParameter_osPublisher",
+ "$ref": "#/definitions/DeploymentParameter_subnetName",
"x-ms-client-flatten": true
},
- "availabilitySetType": {
+ "virtualNetworkIpAddressPrefix": {
"type": "object",
- "$ref": "#/definitions/DeploymentParameter_availabilitySetType",
+ "$ref": "#/definitions/DeploymentParameter_virtualNetworkIpAddressPrefix",
"x-ms-client-flatten": true
},
- "publicIpAddressName": {
+ "virtualNetworkName": {
"type": "object",
- "$ref": "#/definitions/DeploymentParameter_publicIpAddressName",
+ "$ref": "#/definitions/DeploymentParameter_virtualNetworkName",
"x-ms-client-flatten": true
},
- "dnsNameType": {
+ "virtualNetworkType": {
"type": "object",
- "$ref": "#/definitions/DeploymentParameter_dnsNameType",
+ "$ref": "#/definitions/DeploymentParameter_virtualNetworkType",
"x-ms-client-flatten": true
}
},
"required": [
"adminUsername",
- "virtualMachineName"
+ "name"
]
+
},
- "DeploymentParameter_storageContainerName": {
+ "DeploymentParameter__artifactsLocation": {
"properties": {
"value": {
"type": "string",
- "description": "Name of storage container for the VM OS disk.",
- "default": "vhds",
- "x-ms-client-name": "storageContainerName"
+ "description": "Container URI of of the template.",
+ "x-ms-client-name": "_artifactsLocation",
+ "enum": [
+ "https://azuresdkci.blob.core.windows.net/templatehost/CreateVM"
+ ]
}
- }
+ },
+ "required": [
+ "value"
+ ]
},
- "DeploymentParameter_virtualNetworkName": {
+ "DeploymentParameter_adminPassword": {
"properties": {
"value": {
"type": "string",
- "description": "Name of virtual network to add VM to.",
- "x-ms-client-name": "virtualNetworkName"
+ "description": "Password for the Virtual Machine. Required if SSH (Linux only) is not specified.",
+ "x-ms-client-name": "adminPassword"
}
}
},
- "DeploymentParameter_subnetIpAddressPrefix": {
+ "DeploymentParameter_adminUsername": {
"properties": {
"value": {
"type": "string",
- "description": "The subnet address prefix in CIDR format.",
- "default": "10.0.0.0/24",
- "x-ms-client-name": "subnetIpAddressPrefix"
+ "description": "Username for the Virtual Machine.",
+ "x-ms-client-name": "adminUsername"
}
- }
+ },
+ "required": [
+ "value"
+ ]
+
},
- "DeploymentParameter_privateIpAddressAllocation": {
+ "DeploymentParameter_authenticationType": {
"properties": {
"value": {
"type": "string",
- "description": "Private IP address allocation method.",
+ "description": "Password or SSH Public Key authentication.",
+ "x-ms-client-name": "authenticationType",
"enum": [
- "Dynamic",
- "Static"
+ "password",
+ "sshkey"
],
- "default": "Dynamic",
- "x-ms-client-name": "privateIpAddressAllocation"
+ "default": "password"
}
}
},
- "DeploymentParameter_dnsNameForPublicIP": {
+ "DeploymentParameter_availabilitySetId": {
"properties": {
"value": {
"type": "string",
- "description": "Globally unique DNS Name for the Public IP used to access the Virtual Machine. Requires a new public IP to be created by setting Public IP Address Type to New.",
- "x-ms-client-name": "dnsNameForPublicIP"
+ "description": "Existing availability set for the VM.",
+ "x-ms-client-name": "availabilitySetId"
}
}
},
- "DeploymentParameter_storageAccountType": {
+ "DeploymentParameter_availabilitySetType": {
"properties": {
"value": {
"type": "string",
- "description": "Whether to use an existing storage account or create a new one.",
+ "description": "Flag to add the VM to an existing availability set.",
+ "x-ms-client-name": "availabilitySetType",
"enum": [
- "new",
+ "none",
"existing"
],
- "default": "new",
- "x-ms-client-name": "storageAccountType"
+ "default": "none"
}
}
},
- "DeploymentParameter_osDiskUri": {
+ "DeploymentParameter_dnsNameForPublicIP": {
"properties": {
"value": {
"type": "string",
- "description": "URI for a custom VHD image.",
- "x-ms-client-name": "osDiskUri"
+ "description": "Globally unique DNS Name for the Public IP used to access the Virtual Machine. Requires a new public IP to be created by setting Public IP Address Type to New.",
+ "x-ms-client-name": "dnsNameForPublicIP"
}
}
},
- "DeploymentParameter__artifactsLocation": {
+ "DeploymentParameter_dnsNameType": {
"properties": {
"value": {
"type": "string",
- "description": "Container URI of of the template.",
+ "description": "Associate VMs with a public IP address to a DNS name.",
+ "x-ms-client-name": "dnsNameType",
"enum": [
- "https://azuresdkci.blob.core.windows.net/templatehost/CreateVM"
- ]
+ "none",
+ "new"
+ ],
+ "default": "none"
}
- },
- "required": [
- "value"
- ]
+ }
+ },
+ "DeploymentParameter_location": {
+ "properties": {
+ "value": {
+ "type": "string",
+ "description": "Location for VM resources.",
+ "x-ms-client-name": "location"
+ }
+ }
},
"DeploymentParameter_name": {
"properties": {
"value": {
"type": "string",
- "description": "The VM resource name.",
+ "description": "The VM name.",
"x-ms-client-name": "name"
}
},
@@ -433,45 +452,52 @@
]
},
- "DeploymentParameter_virtualNetworkType": {
+ "DeploymentParameter_osDiskName": {
"properties": {
"value": {
"type": "string",
- "description": "Whether to use an existing VNet or create a new one.",
- "enum": [
- "new",
- "existing"
- ],
- "default": "new",
- "x-ms-client-name": "virtualNetworkType"
+ "description": "Name of new VM OS disk.",
+ "x-ms-client-name": "osDiskName",
+ "default": "osdiskimage"
}
}
},
- "DeploymentParameter_adminPassword": {
+ "DeploymentParameter_osDiskUri": {
"properties": {
"value": {
"type": "string",
- "description": "Password for the Virtual Machine. Required if SSH (Linux only) is not specified.",
- "x-ms-client-name": "adminPassword"
+ "description": "URI for a custom VHD image.",
+ "x-ms-client-name": "osDiskUri"
}
}
},
- "DeploymentParameter_osSKU": {
+ "DeploymentParameter_osOffer": {
"properties": {
"value": {
"type": "string",
- "description": "The OS SKU to install.",
- "default": "2012-R2-Datacenter",
- "x-ms-client-name": "osSKU"
+ "description": "The OS Offer to install.",
+ "x-ms-client-name": "osOffer",
+ "default": "WindowsServer"
}
}
},
- "DeploymentParameter_subnetName": {
+ "DeploymentParameter_osPublisher": {
"properties": {
"value": {
"type": "string",
- "description": "The subnet name.",
- "x-ms-client-name": "subnetName"
+ "description": "The OS publisher of the OS image.",
+ "x-ms-client-name": "osPublisher",
+ "default": "MicrosoftWindowsServer"
+ }
+ }
+ },
+ "DeploymentParameter_osSKU": {
+ "properties": {
+ "value": {
+ "type": "string",
+ "description": "The OS SKU to install.",
+ "x-ms-client-name": "osSKU",
+ "default": "2012-R2-Datacenter"
}
}
},
@@ -480,222 +506,199 @@
"value": {
"type": "string",
"description": "Common OS choices. Choose 'Custom' to specify an image with the osPublisher, osOffer, osSKU, and osVersion parameters.",
+ "x-ms-client-name": "osType",
"enum": [
"Win2012R2Datacenter",
"Win2012Datacenter",
"Win2008R2SP1",
"Custom"
],
- "default": "Win2012R2Datacenter",
- "x-ms-client-name": "osType"
+ "default": "Win2012R2Datacenter"
}
}
},
- "DeploymentParameter_adminUsername": {
- "properties": {
- "value": {
- "type": "string",
- "description": "Username for the Virtual Machine.",
- "x-ms-client-name": "adminUsername"
- }
- },
- "required": [
- "value"
- ]
-
- },
"DeploymentParameter_osVersion": {
"properties": {
"value": {
"type": "string",
"description": "The OS version to install.",
- "default": "latest",
- "x-ms-client-name": "osVersion"
+ "x-ms-client-name": "osVersion",
+ "default": "latest"
}
}
},
- "DeploymentParameter_osDiskName": {
+ "DeploymentParameter_privateIpAddressAllocation": {
"properties": {
"value": {
"type": "string",
- "description": "Name of new VM OS disk.",
- "default": "osdiskimage",
- "x-ms-client-name": "osDiskName"
+ "description": "Private IP address allocation method.",
+ "x-ms-client-name": "privateIpAddressAllocation",
+ "enum": [
+ "Dynamic",
+ "Static"
+ ],
+ "default": "Dynamic"
}
}
},
- "DeploymentParameter_sshDestKeyPath": {
+ "DeploymentParameter_publicIpAddressAllocation": {
"properties": {
"value": {
"type": "string",
- "description": "VM file path for SSH key.",
- "x-ms-client-name": "sshDestKeyPath"
+ "description": "Public IP address allocation method.",
+ "x-ms-client-name": "publicIpAddressAllocation",
+ "enum": [
+ "Dynamic",
+ "Static"
+ ],
+ "default": "Dynamic"
}
}
},
- "DeploymentParameter_osOffer": {
+ "DeploymentParameter_publicIpAddressName": {
"properties": {
"value": {
"type": "string",
- "description": "The OS Offer to install.",
- "default": "WindowsServer",
- "x-ms-client-name": "osOffer"
+ "description": "Name of public IP address to use.",
+ "x-ms-client-name": "publicIpAddressName"
}
}
},
- "DeploymentParameter_publicIpAddressAllocation": {
+ "DeploymentParameter_publicIpAddressType": {
"properties": {
"value": {
"type": "string",
- "description": "Public IP address allocation method.",
+ "description": "Use a public IP Address for the VM Nic.",
+ "x-ms-client-name": "publicIpAddressType",
"enum": [
- "Dynamic",
- "Static"
+ "none",
+ "new",
+ "existing"
],
- "default": "Dynamic",
- "x-ms-client-name": "publicIpAddressAllocation"
+ "default": "none"
}
}
},
- "DeploymentParameter_authenticationType": {
+ "DeploymentParameter_size": {
"properties": {
"value": {
"type": "string",
- "description": "Password or SSH Public Key authentication.",
- "enum": [
- "password",
- "sshkey"
- ],
- "default": "password",
- "x-ms-client-name": "authenticationType"
+ "description": "The VM Size that should be created. See https://azure.microsoft.com/en-us/pricing/details/virtual-machines/ for size info.",
+ "x-ms-client-name": "size",
+ "default": "Standard_A2"
}
}
},
- "DeploymentParameter_storageAccountName": {
+ "DeploymentParameter_sshDestKeyPath": {
"properties": {
"value": {
"type": "string",
- "description": "Name of storage account for the VM OS disk.",
- "x-ms-client-name": "storageAccountName"
+ "description": "Destination file path on VM for SSH key.",
+ "x-ms-client-name": "sshDestKeyPath"
}
}
},
- "DeploymentParameter_storageRedundancyType": {
+ "DeploymentParameter_sshKeyValue": {
"properties": {
"value": {
"type": "string",
- "description": "The VM storage type (Standard_LRS, Standard_GRS, Standard_RAGRS).",
- "default": "Standard_LRS",
- "x-ms-client-name": "storageRedundancyType"
+ "description": "SSH key file data.",
+ "x-ms-client-name": "sshKeyValue"
}
}
},
- "DeploymentParameter_size": {
+ "DeploymentParameter_storageAccountName": {
"properties": {
"value": {
"type": "string",
- "description": "The VM Size that should be created. See https://azure.microsoft.com/en-us/pricing/details/virtual-machines/ for size info.",
- "default": "Standard_A2",
- "x-ms-client-name": "size"
+ "description": "Name of storage account for the VM OS disk.",
+ "x-ms-client-name": "storageAccountName"
}
}
},
- "DeploymentParameter_publicIpAddressType": {
+ "DeploymentParameter_storageAccountType": {
"properties": {
"value": {
"type": "string",
- "description": "Use a public IP Address for the VM Nic.",
+ "description": "Whether to use an existing storage account or create a new one.",
+ "x-ms-client-name": "storageAccountType",
"enum": [
- "none",
"new",
"existing"
],
- "default": "none",
- "x-ms-client-name": "publicIpAddressType"
- }
- }
- },
- "DeploymentParameter_virtualNetworkIpAddressPrefix": {
- "properties": {
- "value": {
- "type": "string",
- "description": "The virtual network IP address prefix in CIDR format.",
- "default": "10.0.0.0/16",
- "x-ms-client-name": "virtualNetworkIpAddressPrefix"
+ "default": "new"
}
}
},
- "DeploymentParameter_availabilitySetId": {
+ "DeploymentParameter_storageContainerName": {
"properties": {
"value": {
"type": "string",
- "description": "Existing availability set for the VM.",
- "x-ms-client-name": "availabilitySetId"
+ "description": "Name of storage container for the VM OS disk.",
+ "x-ms-client-name": "storageContainerName",
+ "default": "vhds"
}
}
},
- "DeploymentParameter_sshKeyValue": {
+ "DeploymentParameter_storageRedundancyType": {
"properties": {
"value": {
"type": "string",
- "description": "SSH key file data.",
- "x-ms-client-name": "sshKeyValue"
+ "description": "The VM storage type (Standard_LRS, Standard_GRS, Standard_RAGRS).",
+ "x-ms-client-name": "storageRedundancyType",
+ "default": "Standard_LRS"
}
}
},
- "DeploymentParameter_location": {
+ "DeploymentParameter_subnetIpAddressPrefix": {
"properties": {
"value": {
"type": "string",
- "description": "Location for VM resources.",
- "x-ms-client-name": "location"
+ "description": "The subnet address prefix in CIDR format.",
+ "x-ms-client-name": "subnetIpAddressPrefix",
+ "default": "10.0.0.0/24"
}
}
},
- "DeploymentParameter_osPublisher": {
+ "DeploymentParameter_subnetName": {
"properties": {
"value": {
"type": "string",
- "description": "The OS publisher of the OS image.",
- "default": "MicrosoftWindowsServer",
- "x-ms-client-name": "osPublisher"
+ "description": "The subnet name.",
+ "x-ms-client-name": "subnetName"
}
}
},
- "DeploymentParameter_availabilitySetType": {
+ "DeploymentParameter_virtualNetworkIpAddressPrefix": {
"properties": {
"value": {
"type": "string",
- "description": "Flag to add the VM to an existing availability set.",
- "enum": [
- "none",
- "existing"
- ],
- "default": "none",
- "x-ms-client-name": "availabilitySetType"
+ "description": "The virtual network IP address prefix in CIDR format.",
+ "x-ms-client-name": "virtualNetworkIpAddressPrefix",
+ "default": "10.0.0.0/16"
}
}
},
- "DeploymentParameter_publicIpAddressName": {
+ "DeploymentParameter_virtualNetworkName": {
"properties": {
"value": {
"type": "string",
- "description": "Name of public IP address to use.",
- "x-ms-client-name": "publicIpAddressName"
+ "description": "Name of virtual network to add VM to.",
+ "x-ms-client-name": "virtualNetworkName"
}
}
},
- "DeploymentParameter_dnsNameType": {
+ "DeploymentParameter_virtualNetworkType": {
"properties": {
"value": {
"type": "string",
- "description": "Associate VMs with a public IP address to a DNS name.",
+ "description": "Whether to use an existing VNet or create a new one.",
+ "x-ms-client-name": "virtualNetworkType",
"enum": [
- "none",
- "new"
+ "new",
+ "existing"
],
- "default": "none",
- "x-ms-client-name": "dnsNameType"
+ "default": "new"
}
}
},
diff --git a/src/command_modules/azure-cli-vm/setup.py b/src/command_modules/azure-cli-vm/setup.py
index 7ada1c4941b..0aa88365a01 100644
--- a/src/command_modules/azure-cli-vm/setup.py
+++ b/src/command_modules/azure-cli-vm/setup.py
@@ -60,10 +60,14 @@
],
packages=[
'azure.cli.command_modules.vm',
- 'azure.cli.command_modules.vm.mgmt',
- 'azure.cli.command_modules.vm.mgmt.lib',
- 'azure.cli.command_modules.vm.mgmt.lib.models',
- 'azure.cli.command_modules.vm.mgmt.lib.operations',
+ 'azure.cli.command_modules.vm.mgmt_vm_create',
+ 'azure.cli.command_modules.vm.mgmt_vm_create.lib',
+ 'azure.cli.command_modules.vm.mgmt_vm_create.lib.models',
+ 'azure.cli.command_modules.vm.mgmt_vm_create.lib.operations',
+ 'azure.cli.command_modules.vm.mgmt_avail_set',
+ 'azure.cli.command_modules.vm.mgmt_avail_set.lib',
+ 'azure.cli.command_modules.vm.mgmt_avail_set.lib.models',
+ 'azure.cli.command_modules.vm.mgmt_avail_set.lib.operations',
],
install_requires=DEPENDENCIES,
)