set azure metadata
This commit is contained in:
parent
e01cd49175
commit
5ed3be9a8c
|
@ -90,8 +90,13 @@ func (*Artifact) Id() string {
|
|||
return ""
|
||||
}
|
||||
|
||||
func (*Artifact) State(name string) interface{} {
|
||||
return nil
|
||||
func (a *Artifact) State(name string) interface{} {
|
||||
switch name {
|
||||
case "atlas.artifact.metadata":
|
||||
return a.stateAtlasMetadata()
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
func (a *Artifact) String() string {
|
||||
|
@ -110,3 +115,14 @@ func (a *Artifact) String() string {
|
|||
func (*Artifact) Destroy() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (a *Artifact) stateAtlasMetadata() interface{} {
|
||||
metadata := make(map[string]string)
|
||||
metadata["StorageAccountLocation"] = a.StorageAccountLocation
|
||||
metadata["OSDiskUri"] = a.OSDiskUri
|
||||
metadata["OSDiskUriReadOnlySas"] = a.OSDiskUriReadOnlySas
|
||||
metadata["TemplateUri"] = a.TemplateUri
|
||||
metadata["TemplateUriReadOnlySas"] = a.TemplateUriReadOnlySas
|
||||
|
||||
return metadata
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue