Add schema for ServiceFabric 2016-09-01 api version

This commit is contained in:
Vaishnav Kidambi 2016-10-28 16:30:33 -07:00
Родитель d166c069e0
Коммит 1c482fb3c9
6 изменённых файлов: 1422 добавлений и 594 удалений

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

@ -48,13 +48,13 @@
{ "$ref": "http://schema.management.azure.com/schemas/2015-06-01/Microsoft.KeyVault.json#/resourceDefinitions/vaults" },
{ "$ref": "http://schema.management.azure.com/schemas/2015-06-01/Microsoft.KeyVault.json#/resourceDefinitions/secrets" },
{ "$ref": "http://schema.management.azure.com/schemas/2016-05-15/Microsoft.DevTestLab.json#/resourceDefinitions/labs" },
{ "$ref": "http://schema.management.azure.com/schemas/2016-05-15/Microsoft.DevTestLab.json#/resourceDefinitions/labs_artifactsources" },
{ "$ref": "http://schema.management.azure.com/schemas/2016-05-15/Microsoft.DevTestLab.json#/resourceDefinitions/labs_customimages" },
{ "$ref": "http://schema.management.azure.com/schemas/2016-05-15/Microsoft.DevTestLab.json#/resourceDefinitions/labs_formulas" },
{ "$ref": "http://schema.management.azure.com/schemas/2016-05-15/Microsoft.DevTestLab.json#/resourceDefinitions/labs_policysets_policies" },
{ "$ref": "http://schema.management.azure.com/schemas/2016-05-15/Microsoft.DevTestLab.json#/resourceDefinitions/labs_schedules" },
{ "$ref": "http://schema.management.azure.com/schemas/2016-05-15/Microsoft.DevTestLab.json#/resourceDefinitions/labs_virtualmachines" },
{ "$ref": "http://schema.management.azure.com/schemas/2016-05-15/Microsoft.DevTestLab.json#/resourceDefinitions/labs_virtualnetworks" },
{ "$ref": "http://schema.management.azure.com/schemas/2016-05-15/Microsoft.DevTestLab.json#/resourceDefinitions/labs_artifactsources" },
{ "$ref": "http://schema.management.azure.com/schemas/2016-05-15/Microsoft.DevTestLab.json#/resourceDefinitions/labs_customimages" },
{ "$ref": "http://schema.management.azure.com/schemas/2016-05-15/Microsoft.DevTestLab.json#/resourceDefinitions/labs_formulas" },
{ "$ref": "http://schema.management.azure.com/schemas/2016-05-15/Microsoft.DevTestLab.json#/resourceDefinitions/labs_policysets_policies" },
{ "$ref": "http://schema.management.azure.com/schemas/2016-05-15/Microsoft.DevTestLab.json#/resourceDefinitions/labs_schedules" },
{ "$ref": "http://schema.management.azure.com/schemas/2016-05-15/Microsoft.DevTestLab.json#/resourceDefinitions/labs_virtualmachines" },
{ "$ref": "http://schema.management.azure.com/schemas/2016-05-15/Microsoft.DevTestLab.json#/resourceDefinitions/labs_virtualnetworks" },
{ "$ref": "http://schema.management.azure.com/schemas/2015-05-21-preview/Microsoft.DevTestLab.json#/resourceDefinitions/labs" },
{ "$ref": "http://schema.management.azure.com/schemas/2015-05-21-preview/Microsoft.DevTestLab.json#/resourceDefinitions/virtualMachines" },
{ "$ref": "http://schema.management.azure.com/schemas/2014-06-01/Microsoft.Web.json#/resourceDefinitions/sites" },
@ -152,6 +152,7 @@
{ "$ref": "http://schema.management.azure.com/schemas/2016-02-03/Microsoft.Devices.json#/resourceDefinitions/IotHubs" },
{ "$ref": "http://schema.management.azure.com/schemas/2015-01-01/Sendgrid.Email.json#/resourceDefinitions/accounts" },
{ "$ref": "http://schema.management.azure.com/schemas/2016-03-01/Microsoft.ServiceFabric.json#/resourceDefinitions/clusters" },
{ "$ref": "http://schema.management.azure.com/schemas/2016-09-01/Microsoft.ServiceFabric.json#/resourceDefinitions/clusters" },
{ "$ref": "#/definitions/resourceGeneric" }
]
}

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

@ -44,13 +44,13 @@
{ "$ref": "http://schema.management.azure.com/schemas/2015-04-08/Microsoft.DocumentDB.json#/resourceDefinitions/databaseAccounts" },
{ "$ref": "http://schema.management.azure.com/schemas/2015-06-01/Microsoft.KeyVault.json#/resourceDefinitions/secrets" },
{ "$ref": "http://schema.management.azure.com/schemas/2016-05-15/Microsoft.DevTestLab.json#/resourceDefinitions/labs" },
{ "$ref": "http://schema.management.azure.com/schemas/2016-05-15/Microsoft.DevTestLab.json#/resourceDefinitions/labs_artifactsources" },
{ "$ref": "http://schema.management.azure.com/schemas/2016-05-15/Microsoft.DevTestLab.json#/resourceDefinitions/labs_customimages" },
{ "$ref": "http://schema.management.azure.com/schemas/2016-05-15/Microsoft.DevTestLab.json#/resourceDefinitions/labs_formulas" },
{ "$ref": "http://schema.management.azure.com/schemas/2016-05-15/Microsoft.DevTestLab.json#/resourceDefinitions/labs_policysets_policies" },
{ "$ref": "http://schema.management.azure.com/schemas/2016-05-15/Microsoft.DevTestLab.json#/resourceDefinitions/labs_schedules" },
{ "$ref": "http://schema.management.azure.com/schemas/2016-05-15/Microsoft.DevTestLab.json#/resourceDefinitions/labs_virtualmachines" },
{ "$ref": "http://schema.management.azure.com/schemas/2016-05-15/Microsoft.DevTestLab.json#/resourceDefinitions/labs_virtualnetworks" },
{ "$ref": "http://schema.management.azure.com/schemas/2016-05-15/Microsoft.DevTestLab.json#/resourceDefinitions/labs_artifactsources" },
{ "$ref": "http://schema.management.azure.com/schemas/2016-05-15/Microsoft.DevTestLab.json#/resourceDefinitions/labs_customimages" },
{ "$ref": "http://schema.management.azure.com/schemas/2016-05-15/Microsoft.DevTestLab.json#/resourceDefinitions/labs_formulas" },
{ "$ref": "http://schema.management.azure.com/schemas/2016-05-15/Microsoft.DevTestLab.json#/resourceDefinitions/labs_policysets_policies" },
{ "$ref": "http://schema.management.azure.com/schemas/2016-05-15/Microsoft.DevTestLab.json#/resourceDefinitions/labs_schedules" },
{ "$ref": "http://schema.management.azure.com/schemas/2016-05-15/Microsoft.DevTestLab.json#/resourceDefinitions/labs_virtualmachines" },
{ "$ref": "http://schema.management.azure.com/schemas/2016-05-15/Microsoft.DevTestLab.json#/resourceDefinitions/labs_virtualnetworks" },
{ "$ref": "http://schema.management.azure.com/schemas/2015-05-21-preview/Microsoft.DevTestLab.json#/resourceDefinitions/labs" },
{ "$ref": "http://schema.management.azure.com/schemas/2015-05-21-preview/Microsoft.DevTestLab.json#/resourceDefinitions/virtualMachines" },
{ "$ref": "http://schema.management.azure.com/schemas/2014-06-01/Microsoft.Web.json#/resourceDefinitions/certificates" },
@ -149,7 +149,8 @@
{ "$ref": "http://schema.management.azure.com/schemas/2015-10-31/Microsoft.Automation.json#/resourceDefinitions/jobSchedules" },
{ "$ref": "http://schema.management.azure.com/schemas/2015-10-01/Microsoft.Media.json#/resourceDefinitions/mediaServices" },
{ "$ref": "http://schema.management.azure.com/schemas/2016-02-03/Microsoft.Devices.json#/resourceDefinitions/IotHubs" },
{ "$ref": "http://schema.management.azure.com/schemas/2016-03-01/Microsoft.ServiceFabric.json#/resourceDefinitions/clusters" }
{ "$ref": "http://schema.management.azure.com/schemas/2016-03-01/Microsoft.ServiceFabric.json#/resourceDefinitions/clusters" },
{ "$ref": "http://schema.management.azure.com/schemas/2016-09-01/Microsoft.ServiceFabric.json#/resourceDefinitions/clusters" }
]
}
]

Разница между файлами не показана из-за своего большого размера Загрузить разницу

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

@ -0,0 +1,553 @@
{
"id": "http://schema.management.azure.com/schemas/2016-09-01/Microsoft.ServiceFabric.json#",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Microsoft.ServiceFabric",
"description": "Microsoft ServiceFabric Resource Types",
"resourceDefinitions": {
"clusters": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"Microsoft.ServiceFabric/clusters"
]
},
"apiVersion": {
"type": "string",
"enum": [
"2016-09-01"
]
},
"properties": {
"oneOf": [
{
"$ref": "#/definitions/ClusterProperties"
},
{
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
"description": "Gets or sets the cluster properties."
}
},
"required": [
"type",
"apiVersion",
"properties"
],
"description": "Microsoft.ServiceFabric/clusters: ServiceFabric cluster resource."
}
},
"definitions": {
"CertificateDescription": {
"type": "object",
"properties": {
"Thumbprint": {
"type": "string",
"minLength": 1
},
"ThumbprintSecondary": {
"type": "string"
},
"X509StoreName": {
"type": "string",
"enum": [
"AddressBook",
"AuthRoot",
"CertificateAuthority",
"Disallowed",
"My",
"Root",
"TrustedPeople",
"TrustedPublisher"
]
}
},
"required": [
"Thumbprint",
"X509StoreName"
]
},
"AzureActiveDirectory": {
"type": "object",
"properties": {
"TenantId": {
"type": "string",
"minLength": 1
},
"ClusterApplication": {
"type": "string",
"minLength": 1
},
"ClientApplication": {
"type": "string",
"minLength": 1
}
},
"required": [
"TenantId",
"ClusterApplication",
"ClientApplication"
]
},
"NodeTypes": {
"type": "object",
"properties": {
"reverseProxyEndpointPort": {
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/numberOrExpression"
},
"DurabilityLevel": {
"oneOf": [
{
"$ref": "#/definitions/Level"
},
{
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
"description": "This level is used to set the durability of nodes of this type."
},
"VMInstanceCount": {
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/numberOrExpression",
"minimum": 1,
"maximum": 2147483647
},
"Name": {
"type": "string",
"minLength": 1
},
"PlacementProperties": {
"oneOf": [
{
"type": "object",
"additionalProperties": {
"type": "string"
}
},
{
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
]
},
"Capacities": {
"oneOf": [
{
"type": "object",
"additionalProperties": {
"type": "string"
}
},
{
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
]
},
"ClientConnectionEndpointPort": {
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/numberOrExpression"
},
"reverseProxyEndpointPort": {
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/numberOrExpression"
},
"ApplicationPorts": {
"oneOf": [
{
"$ref": "#/definitions/Ports"
},
{
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
]
},
"EphemeralPorts": {
"oneOf": [
{
"$ref": "#/definitions/Ports"
},
{
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
]
},
"IsPrimary": {
"oneOf": [
{
"type": "boolean"
},
{
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
]
}
},
"required": [
"VMInstanceCount",
"Name",
"ClientConnectionEndpointPort",
"reverseProxyEndpointPort",
"IsPrimary"
]
},
"Ports": {
"type": "object",
"properties": {
"StartPort": {
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/numberOrExpression"
},
"EndPort": {
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/numberOrExpression"
}
},
"required": [
"StartPort",
"EndPort"
]
},
"Level": {
"type": "string",
"enum": [
"Bronze",
"Silver",
"Gold",
"Platinum"
]
},
"ClientCertificateThumbprint": {
"type": "object",
"properties": {
"IsAdmin": {
"oneOf": [
{
"type": "boolean"
},
{
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
]
},
"CertificateThumbprint": {
"type": "string",
"minLength": 1
}
},
"required": [
"IsAdmin",
"CertificateThumbprint"
]
},
"ClientCertificateCommonName": {
"type": "object",
"properties": {
"IsAdmin": {
"oneOf": [
{
"type": "boolean"
},
{
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
]
},
"CertificateCommonName": {
"type": "string",
"minLength": 1
},
"CertificateIssuerThumbprint": {
"type": "string",
"minLength": 1
}
},
"required": [
"IsAdmin",
"CertificateCommonName",
"CertificateIssuerThumbprint"
]
},
"SettingsSectionDescription": {
"type": "object",
"properties": {
"Name": {
"type": "string",
"minLength": 1
},
"Parameters": {
"type": "array",
"items": {
"oneOf": [
{
"type": "object",
"properties": {
"Name": {
"type": "string",
"minLength": 1
},
"Value": {
"type": "string"
}
},
"required": [
"Name",
"Value"
]
},
{
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
]
}
}
},
"required": [
"Name",
"Parameters"
]
},
"PaasClusterUpgradePolicy": {
"type": "object",
"properties": {
"UpgradeReplicaSetCheckTimeout": {
"type": "string"
},
"HealthCheckWaitDuration": {
"type": "string"
},
"HealthCheckStableDuration": {
"type": "string"
},
"HealthCheckRetryTimeout": {
"type": "string"
},
"UpgradeTimeout": {
"type": "string"
},
"UpgradeDomainTimeout": {
"type": "string"
},
"HealthPolicy": {
"type": "object",
"properties": {
"MaxPercentUnhealthyNodes": {
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/numberOrExpression"
},
"MaxPercentUnhealthyApplications": {
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/numberOrExpression"
}
},
"required": [
"MaxPercentUnhealthyNodes",
"MaxPercentUnhealthyApplications"
]
},
"DeltaHealthPolicy": {
"type": "object",
"properties": {
"MaxPercentDeltaUnhealthyNodes": {
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/numberOrExpression"
},
"MaxPercentUpgradeDomainDeltaUnhealthyNodes": {
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/numberOrExpression"
},
"MaxPercentDeltaUnhealthyApplications": {
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/numberOrExpression"
}
},
"required": [
"MaxPercentDeltaUnhealthyNodes",
"MaxPercentUpgradeDomainDeltaUnhealthyNodes",
"MaxPercentDeltaUnhealthyApplications"
]
}
},
"required": [
"UpgradeReplicaSetCheckTimeout",
"HealthCheckWaitDuration",
"HealthCheckStableDuration",
"HealthCheckRetryTimeout",
"UpgradeTimeout",
"UpgradeDomainTimeout",
"HealthPolicy"
]
},
"DiagnosticsStorageAccountConfig": {
"type": "object",
"properties": {
"StorageAccountName": {
"type": "string",
"minLength": 1
},
"ProtectedAccountKeyName": {
"type": "string"
},
"BlobEndpoint": {
"type": "string"
},
"QueueEndpoint": {
"type": "string"
},
"TableEndpoint": {
"type": "string"
}
},
"required": [
"StorageAccountName",
"ProtectedAccountKeyName",
"BlobEndpoint",
"QueueEndpoint",
"TableEndpoint"
]
},
"ClusterProperties": {
"type": "object",
"properties": {
"VMImage": {
"type": "string",
"description": "Microsoft.ServiceFabric/clusters: The name of VM image VMSS has been configured with. Generic names such as Windows or Linux can be used."
},
"ClusterCodeVersion": {
"type": "string",
"description": "Microsoft.ServiceFabric/clusters: The ServiceFabric runtime version of the cluster."
},
"UpgradeMode": {
"type": "string",
"enum": [
"Automatic",
"Manual"
],
"description": "Microsoft.ServiceFabric/clusters: The ServiceFabric runtime version of the cluster."
},
"reverseProxyCertificate": {
"oneOf": [
{
"$ref": "#/definitions/CertificateDescription"
},
{
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
"description": "Microsoft.ServiceFabric/clusters: The server certificate used by reverse proxy."
},
"AzureActiveDirectory": {
"oneOf": [
{
"$ref": "#/definitions/AzureActiveDirectory"
},
{
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
"description": "Microsoft.ServiceFabric/clusters: The settings to enable AAD authentication on the cluster."
},
"ReliabilityLevel": {
"oneOf": [
{
"$ref": "#/definitions/Level"
},
{
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
"description": "Microsoft.ServiceFabric/clusters: This level is used to set the number of replicas of the system services. Details: http://azure.microsoft.com/en-us/documentation/articles/service-fabric-cluster-capacity/#the-reliability-characteristics-of-the-cluster"
},
"NodeTypes": {
"oneOf": [
{
"type": "array",
"items": {
"$ref": "#/definitions/NodeTypes"
},
"minItems": 1
},
{
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
"description": "Microsoft.ServiceFabric/clusters: The node types of the cluster. Details: http://azure.microsoft.com/en-us/documentation/articles/service-fabric-cluster-capacity"
},
"ManagementEndpoint": {
"type": "string",
"minLength": 1,
"description": "Microsoft.ServiceFabric/clusters: The http management endpoint of the cluster."
},
"Certificate": {
"oneOf": [
{
"$ref": "#/definitions/CertificateDescription"
},
{
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
"description": "Microsoft.ServiceFabric/clusters: The certificate to use for node to node communication within cluster, the server certificate of the cluster and the default admin client."
},
"ClientCertificateThumbprints": {
"oneOf": [
{
"type": "array",
"items": {
"$ref": "#/definitions/ClientCertificateThumbprint"
}
},
{
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
"description": "Microsoft.ServiceFabric/clusters: List of client certificates to whitelist based on thumbprints."
},
"ClientCertificateCommonNames": {
"oneOf": [
{
"type": "array",
"items": {
"$ref": "#/definitions/ClientCertificateCommonName"
}
},
{
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
"description": "Microsoft.ServiceFabric/clusters: List of client certificates to whitelist based on common names."
},
"FabricSettings": {
"oneOf": [
{
"type": "array",
"items": {
"$ref": "#/definitions/SettingsSectionDescription"
}
},
{
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
"description": "Microsoft.ServiceFabric/clusters: List of custom fabric settings to configure the cluster."
},
"UpgradeDescription": {
"oneOf": [
{
"$ref": "#/definitions/PaasClusterUpgradePolicy"
},
{
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
"description": "Microsoft.ServiceFabric/clusters: The policy to use when upgrading the cluster."
},
"DiagnosticsStorageAccountConfig": {
"oneOf": [
{
"$ref": "#/definitions/DiagnosticsStorageAccountConfig"
},
{
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
"description": "Microsoft.ServiceFabric/clusters: The azure storage account information for uploading cluster logs."
}
},
"required": [
"NodeTypes",
"ManagementEndpoint"
]
}
}
}

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

@ -1,32 +1,186 @@
{
"tests": [
{
"name": "clusters - Empty properties",
"name": "clusters - Missing properties",
"definition": "http://schema.management.azure.com/schemas/2016-03-01/Microsoft.ServiceFabric.json#/resourceDefinitions/clusters",
"json": {
"type": "Microsoft.ServiceFabric/clusters",
"apiVersion": "2016-03-01",
"location": "West Us",
"properties": {}
}
},
{
"name": "clusters - Without type and apiVersion",
},
"expectedErrors": [
{
"message": "Missing required property: type",
"message": "Missing required property: managementEndpoint",
"dataPath": "/"
},
{
"message": "Missing required property: apiVersion",
"message": "Missing required property: nodeTypes",
"dataPath": "/"
}
],
]
},
{
"name": "clusters - Many properties",
"definition": "http://schema.management.azure.com/schemas/2016-03-01/Microsoft.ServiceFabric.json#/resourceDefinitions/clusters",
"json": {
"type": "Microsoft.ServiceFabric/clusters",
"apiVersion": "2016-03-01",
"location": "West Us",
"properties": {}
"properties": {
"certificate": {
"thumbprint": "[parameters('certificateThumbprint')]",
"x509StoreName": "[parameters('certificateStoreValue')]"
},
"clientCertificateCommonNames": [
{
"isAdmin": "false",
"certificateCommonName": "randomCommonName",
"certificateIssuerThumbprint": "randomIssuerThumprintValue"
}
],
"clientCertificateThumbprints": [
{
"isAdmin": "false",
"CertificateThumbprint": "randomThumprintValue"
}
],
"diagnosticsStorageAccountConfig": {
"blobEndpoint": "[reference(concat('Microsoft.Storage/storageAccounts/', variables('supportLogStorageAccountName')), variables('storageApiVersion')).primaryEndpoints.blob]",
"protectedAccountKeyName": "StorageAccountKey1",
"queueEndpoint": "[reference(concat('Microsoft.Storage/storageAccounts/', variables('supportLogStorageAccountName')), variables('storageApiVersion')).primaryEndpoints.queue]",
"storageAccountName": "[variables('supportLogStorageAccountName')]",
"tableEndpoint": "[reference(concat('Microsoft.Storage/storageAccounts/', variables('supportLogStorageAccountName')), variables('storageApiVersion')).primaryEndpoints.table]"
},
"fabricSettings": [
{
"parameters": [
{
"name": "ClusterProtectionLevel",
"value": "[parameters('clusterProtectionLevel')]"
}
],
"name": "Security"
}
],
"managementEndpoint": "[concat('http://',reference(concat(variables('lbIPName'),'-','0')).dnsSettings.fqdn,':',variables('nt0fabricHttpGatewayPort'))]",
"nodeTypes": [
{
"name": "[variables('vmNodeType0Name')]",
"placementProperties": [
{
"color": "blue"
},
{
"size": "large"
}
],
"capacities": [
{
"color": "blue"
},
{
"size": "large"
}
],
"applicationPorts": {
"endPort": "[variables('nt0applicationEndPort')]",
"startPort": "[variables('nt0applicationStartPort')]"
},
"clientConnectionEndpointPort": "[variables('nt0fabricTcpGatewayPort')]",
"durabilityLevel": "Bronze",
"ephemeralPorts": {
"endPort": "[variables('nt0ephemeralEndPort')]",
"startPort": "[variables('nt0ephemeralStartPort')]"
},
"httpGatewayEndpointPort": "[variables('nt0fabricHttpGatewayPort')]",
"isPrimary": true,
"vmInstanceCount": "[parameters('nt0InstanceCount')]"
}
],
"reliabilityLevel": "Silver",
"vmImage": "Windows"
}
}
},
{
"name": "clusters - Minimum properties",
"definition": "http://schema.management.azure.com/schemas/2016-03-01/Microsoft.ServiceFabric.json#/resourceDefinitions/clusters",
"json": {
"type": "Microsoft.ServiceFabric/clusters",
"apiVersion": "2016-03-01",
"location": "West Us",
"properties": {
"diagnosticsStorageAccountConfig": {
"blobEndpoint": "[reference(concat('Microsoft.Storage/storageAccounts/', variables('supportLogStorageAccountName')), variables('storageApiVersion')).primaryEndpoints.blob]",
"protectedAccountKeyName": "StorageAccountKey1",
"queueEndpoint": "[reference(concat('Microsoft.Storage/storageAccounts/', variables('supportLogStorageAccountName')), variables('storageApiVersion')).primaryEndpoints.queue]",
"storageAccountName": "[variables('supportLogStorageAccountName')]",
"tableEndpoint": "[reference(concat('Microsoft.Storage/storageAccounts/', variables('supportLogStorageAccountName')), variables('storageApiVersion')).primaryEndpoints.table]"
},
"managementEndpoint": "[concat('http://',reference(concat(variables('lbIPName'),'-','0')).dnsSettings.fqdn,':',variables('nt0fabricHttpGatewayPort'))]",
"nodeTypes": [
{
"name": "[variables('vmNodeType0Name')]",
"applicationPorts": {
"endPort": "[variables('nt0applicationEndPort')]",
"startPort": "[variables('nt0applicationStartPort')]"
},
"clientConnectionEndpointPort": "[variables('nt0fabricTcpGatewayPort')]",
"durabilityLevel": "Bronze",
"ephemeralPorts": {
"endPort": "[variables('nt0ephemeralEndPort')]",
"startPort": "[variables('nt0ephemeralStartPort')]"
},
"httpGatewayEndpointPort": "[variables('nt0fabricHttpGatewayPort')]",
"isPrimary": true,
"vmInstanceCount": "[parameters('nt0InstanceCount')]"
}
]
}
}
},
{
"name": "clusters - Missing required property in node type",
"definition": "http://schema.management.azure.com/schemas/2016-03-01/Microsoft.ServiceFabric.json#/resourceDefinitions/clusters",
"json": {
"type": "Microsoft.ServiceFabric/clusters",
"apiVersion": "2016-03-01",
"location": "West Us",
"properties": {
"diagnosticsStorageAccountConfig": {
"blobEndpoint": "RandomEndpoint",
"protectedAccountKeyName": "StorageAccountKey1",
"queueEndpoint": "RandomEndpoint",
"storageAccountName": "RandomAccountName",
"tableEndpoint": "RandomEndpoint"
},
"managementEndpoint": "RandomManagementEndpoint",
"nodeTypes": [
{
"applicationPorts": {
"endPort": "10000",
"startPort": "20000"
},
"clientConnectionEndpointPort": "[variables('nt0fabricTcpGatewayPort')]",
"durabilityLevel": "Bronze",
"ephemeralPorts": {
"endPort": "30000",
"startPort": "40000"
},
"httpGatewayEndpointPort": "19080",
"isPrimary": true,
"vmInstanceCount": "5"
}
]
}
},
"expectedErrors": [
{
"message": "Missing required property: name",
"dataPath": "/"
}
]
}
]
}

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

@ -0,0 +1,189 @@
{
"tests": [
{
"name": "clusters - Missing properties",
"definition": "http://schema.management.azure.com/schemas/2016-09-01/Microsoft.ServiceFabric.json#/resourceDefinitions/clusters",
"json": {
"type": "Microsoft.ServiceFabric/clusters",
"apiVersion": "2016-09-01",
"location": "West Us",
"properties": {}
},
"expectedErrors": [
{
"message": "Missing required property: managementEndpoint",
"dataPath": "/"
},
{
"message": "Missing required property: nodeTypes",
"dataPath": "/"
}
]
},
{
"name": "clusters - Many properties",
"definition": "http://schema.management.azure.com/schemas/2016-09-01/Microsoft.ServiceFabric.json#/resourceDefinitions/clusters",
"json": {
"type": "Microsoft.ServiceFabric/clusters",
"apiVersion": "2016-09-01",
"location": "West Us",
"properties": {
"upgradeMode": "Manual",
"clusterCodeVersion": "5.0.0.0",
"certificate": {
"thumbprint": "[parameters('certificateThumbprint')]",
"x509StoreName": "[parameters('certificateStoreValue')]"
},
"clientCertificateCommonNames": [
{
"isAdmin": "false",
"certificateCommonName": "randomCommonName",
"certificateIssuerThumbprint": "randomIssuerThumprintValue"
}
],
"clientCertificateThumbprints": [
{
"isAdmin": "false",
"CertificateThumbprint": "randomThumprintValue"
}
],
"diagnosticsStorageAccountConfig": {
"blobEndpoint": "[reference(concat('Microsoft.Storage/storageAccounts/', variables('supportLogStorageAccountName')), variables('storageApiVersion')).primaryEndpoints.blob]",
"protectedAccountKeyName": "StorageAccountKey1",
"queueEndpoint": "[reference(concat('Microsoft.Storage/storageAccounts/', variables('supportLogStorageAccountName')), variables('storageApiVersion')).primaryEndpoints.queue]",
"storageAccountName": "[variables('supportLogStorageAccountName')]",
"tableEndpoint": "[reference(concat('Microsoft.Storage/storageAccounts/', variables('supportLogStorageAccountName')), variables('storageApiVersion')).primaryEndpoints.table]"
},
"fabricSettings": [
{
"parameters": [
{
"name": "ClusterProtectionLevel",
"value": "[parameters('clusterProtectionLevel')]"
}
],
"name": "Security"
}
],
"managementEndpoint": "[concat('http://',reference(concat(variables('lbIPName'),'-','0')).dnsSettings.fqdn,':',variables('nt0fabricHttpGatewayPort'))]",
"nodeTypes": [
{
"name": "[variables('vmNodeType0Name')]",
"placementProperties": [
{
"color": "blue"
},
{
"size": "large"
}
],
"capacities": [
{
"color": "blue"
},
{
"size": "large"
}
],
"applicationPorts": {
"endPort": "[variables('nt0applicationEndPort')]",
"startPort": "[variables('nt0applicationStartPort')]"
},
"clientConnectionEndpointPort": "[variables('nt0fabricTcpGatewayPort')]",
"durabilityLevel": "Bronze",
"ephemeralPorts": {
"endPort": "[variables('nt0ephemeralEndPort')]",
"startPort": "[variables('nt0ephemeralStartPort')]"
},
"httpGatewayEndpointPort": "[variables('nt0fabricHttpGatewayPort')]",
"isPrimary": true,
"vmInstanceCount": "[parameters('nt0InstanceCount')]",
"reverseProxyEndpointPort": "9000"
}
],
"reliabilityLevel": "Silver",
"vmImage": "Windows"
}
}
},
{
"name": "clusters - Minimum properties",
"definition": "http://schema.management.azure.com/schemas/2016-09-01/Microsoft.ServiceFabric.json#/resourceDefinitions/clusters",
"json": {
"type": "Microsoft.ServiceFabric/clusters",
"apiVersion": "2016-09-01",
"location": "West Us",
"properties": {
"diagnosticsStorageAccountConfig": {
"blobEndpoint": "[reference(concat('Microsoft.Storage/storageAccounts/', variables('supportLogStorageAccountName')), variables('storageApiVersion')).primaryEndpoints.blob]",
"protectedAccountKeyName": "StorageAccountKey1",
"queueEndpoint": "[reference(concat('Microsoft.Storage/storageAccounts/', variables('supportLogStorageAccountName')), variables('storageApiVersion')).primaryEndpoints.queue]",
"storageAccountName": "[variables('supportLogStorageAccountName')]",
"tableEndpoint": "[reference(concat('Microsoft.Storage/storageAccounts/', variables('supportLogStorageAccountName')), variables('storageApiVersion')).primaryEndpoints.table]"
},
"managementEndpoint": "[concat('http://',reference(concat(variables('lbIPName'),'-','0')).dnsSettings.fqdn,':',variables('nt0fabricHttpGatewayPort'))]",
"nodeTypes": [
{
"name": "[variables('vmNodeType0Name')]",
"applicationPorts": {
"endPort": "[variables('nt0applicationEndPort')]",
"startPort": "[variables('nt0applicationStartPort')]"
},
"clientConnectionEndpointPort": "[variables('nt0fabricTcpGatewayPort')]",
"durabilityLevel": "Bronze",
"ephemeralPorts": {
"endPort": "[variables('nt0ephemeralEndPort')]",
"startPort": "[variables('nt0ephemeralStartPort')]"
},
"httpGatewayEndpointPort": "[variables('nt0fabricHttpGatewayPort')]",
"isPrimary": true,
"vmInstanceCount": "[parameters('nt0InstanceCount')]"
}
]
}
}
},
{
"name": "clusters - Missing required property in node type",
"definition": "http://schema.management.azure.com/schemas/2016-09-01/Microsoft.ServiceFabric.json#/resourceDefinitions/clusters",
"json": {
"type": "Microsoft.ServiceFabric/clusters",
"apiVersion": "2016-09-01",
"location": "West Us",
"properties": {
"diagnosticsStorageAccountConfig": {
"blobEndpoint": "RandomEndpoint",
"protectedAccountKeyName": "StorageAccountKey1",
"queueEndpoint": "RandomEndpoint",
"storageAccountName": "RandomAccountName",
"tableEndpoint": "RandomEndpoint"
},
"managementEndpoint": "RandomManagementEndpoint",
"nodeTypes": [
{
"applicationPorts": {
"endPort": "10000",
"startPort": "20000"
},
"clientConnectionEndpointPort": "[variables('nt0fabricTcpGatewayPort')]",
"durabilityLevel": "Bronze",
"ephemeralPorts": {
"endPort": "30000",
"startPort": "40000"
},
"httpGatewayEndpointPort": "19080",
"isPrimary": true,
"vmInstanceCount": "5"
}
]
}
},
"expectedErrors": [
{
"message": "Missing required property: name",
"dataPath": "/"
}
]
}
]
}