remove password as a required field

This commit is contained in:
Burt Bielicki 2016-05-04 09:33:58 -07:00
Родитель 87d24729d2
Коммит 103399984d
6 изменённых файлов: 11 добавлений и 16 удалений

Просмотреть файл

@ -11,8 +11,9 @@
},
"adminPassword": {
"type": "securestring",
"defaultValue": ""
"metadata": {
"description": "Password for the Virtual Machine."
"description": "Password for the Virtual Machine. Required if SSH (Linux only) is not specified."
}
},
"adminUsername": {

Просмотреть файл

@ -50,7 +50,8 @@ class DeploymentVM(Model):
:param virtual_network_type: Whether to use an existing VNet or create a
new one.
:type virtual_network_type: str
:param admin_password: Password for the Virtual Machine.
:param admin_password: Password for the Virtual Machine. Required if SSH
(Linux only) is not specified.
:type admin_password: str
:param os_sku: The OS SKU to install.
:type os_sku: str
@ -111,7 +112,6 @@ class DeploymentVM(Model):
'uri': {'required': True, 'constant': True},
'_artifacts_location': {'constant': True},
'name': {'required': True},
'admin_password': {'required': True},
'admin_username': {'required': True},
'mode': {'required': True, 'constant': True},
}
@ -161,7 +161,7 @@ class DeploymentVM(Model):
mode = "Incremental"
def __init__(self, name, admin_password, admin_username, content_version=None, storage_container_name=None, virtual_network_name=None, subnet_ip_address_prefix=None, private_ip_address_allocation=None, dns_name_for_public_ip=None, storage_account_type=None, os_disk_uri=None, virtual_network_type=None, os_sku=None, subnet_name=None, os_type=None, os_version=None, os_disk_name=None, ssh_key_path=None, os_offer=None, public_ip_address_allocation=None, authentication_type=None, storage_account_name=None, storage_redundancy_type=None, size=None, public_ip_address_type=None, virtual_network_ip_address_prefix=None, availability_set_id=None, ssh_key_value=None, location=None, os_publisher=None, availability_set_type=None, public_ip_address_name=None, dns_name_type=None):
def __init__(self, name, admin_username, content_version=None, storage_container_name=None, virtual_network_name=None, subnet_ip_address_prefix=None, private_ip_address_allocation=None, dns_name_for_public_ip=None, storage_account_type=None, os_disk_uri=None, virtual_network_type=None, admin_password=None, os_sku=None, subnet_name=None, os_type=None, os_version=None, os_disk_name=None, ssh_key_path=None, os_offer=None, public_ip_address_allocation=None, authentication_type=None, storage_account_name=None, storage_redundancy_type=None, size=None, public_ip_address_type=None, virtual_network_ip_address_prefix=None, availability_set_id=None, ssh_key_value=None, location=None, os_publisher=None, availability_set_type=None, public_ip_address_name=None, dns_name_type=None):
self.content_version = content_version
self.storage_container_name = storage_container_name
self.virtual_network_name = virtual_network_name

Просмотреть файл

@ -32,7 +32,7 @@ class VMOperations(object):
self.config = config
def create_or_update(
self, resource_group_name, deployment_name, name, admin_password, admin_username, content_version=None, storage_container_name=None, virtual_network_name=None, subnet_ip_address_prefix=None, private_ip_address_allocation=None, dns_name_for_public_ip=None, storage_account_type=None, os_disk_uri=None, virtual_network_type=None, os_sku=None, subnet_name=None, os_type=None, os_version=None, os_disk_name=None, ssh_key_path=None, os_offer=None, public_ip_address_allocation=None, authentication_type=None, storage_account_name=None, storage_redundancy_type=None, size=None, public_ip_address_type=None, virtual_network_ip_address_prefix=None, availability_set_id=None, ssh_key_value=None, location=None, os_publisher=None, 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, name, admin_username, content_version=None, storage_container_name=None, virtual_network_name=None, subnet_ip_address_prefix=None, private_ip_address_allocation=None, dns_name_for_public_ip=None, storage_account_type=None, os_disk_uri=None, virtual_network_type=None, admin_password=None, os_sku=None, subnet_name=None, os_type=None, os_version=None, os_disk_name=None, ssh_key_path=None, os_offer=None, public_ip_address_allocation=None, authentication_type=None, storage_account_name=None, storage_redundancy_type=None, size=None, public_ip_address_type=None, virtual_network_ip_address_prefix=None, availability_set_id=None, ssh_key_value=None, location=None, os_publisher=None, availability_set_type=None, public_ip_address_name=None, dns_name_type=None, custom_headers={}, raw=False, **operation_config):
"""
Create or update a virtual machine.
@ -43,8 +43,6 @@ class VMOperations(object):
:type deployment_name: str
:param name: The VM resource name.
:type name: str
:param admin_password: Password for the Virtual Machine.
:type admin_password: str
:param admin_username: Username for the Virtual Machine.
:type admin_username: str
:param content_version: If included it must match the ContentVersion
@ -71,6 +69,9 @@ class VMOperations(object):
:param virtual_network_type: Whether to use an existing VNet or
create a new one.
: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_sku: The OS SKU to install.
:type os_sku: str
:param subnet_name: The subnet name.

Просмотреть файл

@ -90,7 +90,6 @@
"osProfile": {
"computerName": "[variables('vmName')]",
"adminUsername": "[parameters('adminUsername')]",
"adminPassword": "[parameters('adminPassword')]",
"linuxConfiguration": {
"disablePasswordAuthentication": true,
"ssh": {

Просмотреть файл

@ -88,7 +88,6 @@
"osProfile": {
"computerName": "[variables('vmName')]",
"adminUsername": "[parameters('adminUsername')]",
"adminPassword": "[parameters('adminPassword')]",
"linuxConfiguration": {
"disablePasswordAuthentication": true,
"ssh": {

Просмотреть файл

@ -327,7 +327,6 @@
}
},
"required": [
"adminPassword",
"adminUsername",
"virtualMachineName"
]
@ -435,14 +434,10 @@
"properties": {
"value": {
"type": "string",
"description": "Password for the Virtual Machine.",
"description": "Password for the Virtual Machine. Required if SSH (Linux only) is not specified.",
"x-ms-client-name": "adminPassword"
}
},
"required": [
"value"
]
}
},
"DeploymentParameter_osSKU": {
"properties": {