mirror of
https://github.com/kemko/nomad.git
synced 2026-01-05 18:05:42 +03:00
fingerprint/env_aws: Rename ec2-instance link to aws.ec2, drop ami link
This commit is contained in:
@@ -72,9 +72,7 @@ func (f *EnvAWSFingerprint) Fingerprint(cfg *config.Config, node *structs.Node)
|
||||
}
|
||||
|
||||
// populate links
|
||||
for _, k := range []string{"instance-id", "ami-id"} {
|
||||
node.Links[k] = node.Attributes["platform.aws."+k]
|
||||
}
|
||||
node.Links["aws.ec2"] = node.Attributes["platform.aws.placement.availability-zone"] + "." + node.Attributes["platform.aws.instance-id"]
|
||||
|
||||
return true, nil
|
||||
}
|
||||
|
||||
@@ -80,7 +80,7 @@ func TestEnvAWSFingerprint_aws(t *testing.T) {
|
||||
}
|
||||
|
||||
// confirm we have at least instance-id and ami-id
|
||||
for _, k := range []string{"instance-id", "ami-id"} {
|
||||
for _, k := range []string{"aws.ec2"} {
|
||||
assertNodeLinksContains(t, node, k)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user