Merge pull request #27 from mspnp/roshar/dmz-update
fixed bug in static IP computation logic
This commit is contained in:
Коммит
73f9d651d5
|
@ -16,7 +16,7 @@
|
|||
},
|
||||
"variables": {
|
||||
"ipAddressArray": "[split(parameters('source').startingIPAddress, '.')]",
|
||||
"updatedIPAddressInDecimal": "[add(add(add(mul(int(variables('ipAddressArray')[0]), 16777216), mul(int(variables('ipAddressArray')[1]), 65536)), add(mul(int(variables('ipAddressArray')[2]), 256), mul(int(variables('ipAddressArray')[3]), 1))), parameters('context').vmIndex)]",
|
||||
"updatedIPAddressInDecimal": "[add(add(add(mul(int(variables('ipAddressArray')[0]), 16777216), mul(int(variables('ipAddressArray')[1]), 65536)), add(mul(int(variables('ipAddressArray')[2]), 256), mul(int(variables('ipAddressArray')[3]), 1))), parameters('context').vmCount)]",
|
||||
"newIPAddress_part1": "[div(variables('updatedIPAddressInDecimal'), 16777216)]",
|
||||
"newIPAddress_part2": "[div(mod(variables('updatedIPAddressInDecimal'), 16777216), 65536)]",
|
||||
"newIPAddress_part3": "[div(mod(variables('updatedIPAddressInDecimal'), 65536), 256)]",
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
"variables": {
|
||||
"templateUniqueString": "[uniqueString(concat(string(parameters('deploymentContext')), string(parameters('source')), string(parameters('context')), string(parameters('state')), parameters('iteration')))]",
|
||||
"ipAddressArray": "[split(parameters('source').startingIPAddress, '.')]",
|
||||
"updatedIPAddressInDecimal": "[add(add(add(mul(int(variables('ipAddressArray')[0]), 16777216), mul(int(variables('ipAddressArray')[1]), 65536)), add(mul(int(variables('ipAddressArray')[2]), 256), mul(int(variables('ipAddressArray')[3]), 1))), parameters('context').vmIndex)]",
|
||||
"updatedIPAddressInDecimal": "[add(add(add(mul(int(variables('ipAddressArray')[0]), 16777216), mul(int(variables('ipAddressArray')[1]), 65536)), add(mul(int(variables('ipAddressArray')[2]), 256), mul(int(variables('ipAddressArray')[3]), 1))), parameters('context').vmCount)]",
|
||||
"newIPAddress_part1": "[div(variables('updatedIPAddressInDecimal'), 16777216)]",
|
||||
"newIPAddress_part2": "[div(mod(variables('updatedIPAddressInDecimal'), 16777216), 65536)]",
|
||||
"newIPAddress_part3": "[div(mod(variables('updatedIPAddressInDecimal'), 65536), 256)]",
|
||||
|
|
|
@ -67,7 +67,8 @@
|
|||
"vnetName": "[parameters('context').vnetName]",
|
||||
"vnetResourceGroup": "[parameters('context').vnetResourceGroup]",
|
||||
"vmName": "[variables('vmName')]",
|
||||
"vmIndex": "[add(parameters('iteration'), parameters('context').vmNamePostFixStartIndex)]"
|
||||
"vmIndex": "[add(parameters('iteration'), parameters('context').vmNamePostFixStartIndex)]",
|
||||
"vmCount": "[add(parameters('iteration'), parameters('context').deployedVMCount)]"
|
||||
}
|
||||
},
|
||||
"mapperTemplateUri": { "value": "[uri(deployment().properties.templateLink.uri, 'virtualMachines-nics-settings.json')]" }
|
||||
|
|
Загрузка…
Ссылка в новой задаче