mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-05-31 20:14:26 -04:00
AB#2287 support community image IDs (#9)
* support community image IDs Signed-off-by: Fabian Kammel <fk@edgeless.systems>
This commit is contained in:
parent
e0a457b6ff
commit
778952e07c
13 changed files with 175 additions and 41 deletions
|
@ -21,10 +21,14 @@ func (c *Client) GetNodeImage(ctx context.Context, providerID string) (string, e
|
|||
if resp.Properties == nil ||
|
||||
resp.Properties.StorageProfile == nil ||
|
||||
resp.Properties.StorageProfile.ImageReference == nil ||
|
||||
resp.Properties.StorageProfile.ImageReference.ID == nil {
|
||||
resp.Properties.StorageProfile.ImageReference.ID == nil && resp.Properties.StorageProfile.ImageReference.CommunityGalleryImageID == nil {
|
||||
return "", fmt.Errorf("node %q does not have valid image reference", providerID)
|
||||
}
|
||||
return *resp.Properties.StorageProfile.ImageReference.ID, nil
|
||||
if resp.Properties.StorageProfile.ImageReference.ID != nil {
|
||||
return *resp.Properties.StorageProfile.ImageReference.ID, nil
|
||||
} else {
|
||||
return *resp.Properties.StorageProfile.ImageReference.CommunityGalleryImageID, nil
|
||||
}
|
||||
}
|
||||
|
||||
// GetScalingGroupID returns the scaling group ID of the node.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue