зеркало из https://github.com/microsoft/azure-cli.git
remove password as a required field
This commit is contained in:
Родитель
87d24729d2
Коммит
103399984d
|
@ -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": {
|
||||
|
|
Загрузка…
Ссылка в новой задаче