[ARVADOS] updated: 1.3.0-611-gc681e0b86
Git user
git at public.curoverse.com
Mon Apr 1 14:42:13 UTC 2019
Summary of changes:
lib/cloud/azure/azure.go | 17 ++++++++++-------
1 file changed, 10 insertions(+), 7 deletions(-)
via c681e0b86e639969be4d6f43520379e37b985f1c (commit)
from aa260bb2e901f76faaa5efde88e64e9d353d6f65 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
commit c681e0b86e639969be4d6f43520379e37b985f1c
Author: Tom Clegg <tclegg at veritasgenetics.com>
Date: Sun Mar 31 15:25:11 2019 -0400
Add another nil check to Azure driver.
refs #15007
Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tclegg at veritasgenetics.com>
diff --git a/lib/cloud/azure/azure.go b/lib/cloud/azure/azure.go
index d37183fbd..ac7ff14cc 100644
--- a/lib/cloud/azure/azure.go
+++ b/lib/cloud/azure/azure.go
@@ -649,14 +649,17 @@ func (ai *azureInstance) Destroy() error {
}
func (ai *azureInstance) Address() string {
- if ai.nic.IPConfigurations != nil &&
- len(*ai.nic.IPConfigurations) > 0 &&
- (*ai.nic.IPConfigurations)[0].InterfaceIPConfigurationPropertiesFormat != nil &&
- (*ai.nic.IPConfigurations)[0].InterfaceIPConfigurationPropertiesFormat.PrivateIPAddress != nil {
-
- return *(*ai.nic.IPConfigurations)[0].PrivateIPAddress
+ if iprops := ai.nic.InterfacePropertiesFormat; iprops == nil {
+ return ""
+ } else if ipconfs := iprops.IPConfigurations; ipconfs == nil || len(*ipconfs) == 0 {
+ return ""
+ } else if ipconfprops := (*ipconfs)[0].InterfaceIPConfigurationPropertiesFormat; ipconfprops == nil {
+ return ""
+ } else if addr := ipconfprops.PrivateIPAddress; addr == nil {
+ return ""
+ } else {
+ return *addr
}
- return ""
}
func (ai *azureInstance) RemoteUser() string {
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list