Skip to content

Commit

Permalink
Merge pull request #25 from rundeck-plugins/enh/RUN-734_incl-private-…
Browse files Browse the repository at this point in the history
…ips_220316

RUN-734: Add private IP info to Azure Node
  • Loading branch information
qualman authored Mar 31, 2022
2 parents e5c47a2 + 56a08e8 commit bc5d9eb
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ osDisk:name.selector = azure_osDisk_name
osDisk:createOption.selector = azure_osDisk_createOption
osDisk:diskSizeGB.selector = azure_osDisk_diskSizeGB
netInterface:privateIp.selector = azure_netInterface_privateIp
plan:name.selector = azure_plan_name
plan:product.selector = azure_plan_product
plan:publisher.selector = azure_plan_publisher
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,8 @@ class AzureNode {
azureAttributes."osDisk:createOption" = vm.storageProfile()?.osDisk()?.createOption()?.toString()
azureAttributes."osDisk:diskSizeGB" = vm.storageProfile()?.osDisk()?.diskSizeGB()?.toString()

azureAttributes."netInterface:privateIp" = vm.getPrimaryNetworkInterface()?.primaryPrivateIP()

if(vm.instanceView().vmAgent()!=null) {
vm.instanceView().vmAgent().statuses()?.each { status->
azureAttributes."provisioningState:code" = status.code()
Expand Down Expand Up @@ -157,6 +159,8 @@ class AzureNode {
case "azure_osDisk_createOption": return getAzureAttributes()!=null ? getAzureAttributes().get("osDisk:createOption"):null
case "azure_osDisk_diskSizeGB": return getAzureAttributes()!=null ? getAzureAttributes().get("osDisk:diskSizeGB"):null

case "azure_netInterface_privateIp": return getAzureAttributes()!=null ? getAzureAttributes().get("netInterface:privateIp"):null

case "azure_provisioningState_code": return getAzureAttributes()!=null ? getAzureAttributes().get("provisioningState:code"):null
case "azure_provisioningState_displayStatus": return getAzureAttributes()!=null ? getAzureAttributes().get("provisioningState:displayStatus"):null
case "azure_provisioningState_message": return getAzureAttributes()!=null ? getAzureAttributes().get("provisioningState:message"):null
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ class AzureNodeMapper {
"osDisk\\:name.selector=azure_osDisk_name\n" +
"osDisk\\:createOption.selector=azure_osDisk_createOption\n" +
"osDisk\\:diskSizeGB.selector=azure_osDisk_diskSizeGB\n" +
"netInterface\\:privateIp.selector=azure_netInterface_privateIp\n" +
"provisioningState\\:code.selector=azure_provisioningState_code\n" +
"provisioningState\\:displayStatus.selector=azure_provisioningState_displayStatus\n" +
"provisioningState\\:message.selector=azure_provisioningState_message\n" +
Expand Down

0 comments on commit bc5d9eb

Please sign in to comment.