From 50180378e3b1d8c7aabcdaa7887a1853a342c8b8 Mon Sep 17 00:00:00 2001 From: simcap Date: Mon, 15 Jan 2018 16:27:56 +0100 Subject: [PATCH] Route53 records listing now contains aliases #181 --- CHANGELOG.md | 1 + aws/conv/model.go | 1 + cloud/properties/gen_properties.go | 1 + cloud/rdf/gen_rdf.go | 3 +++ console/defaults.go | 3 ++- gen/aws/properties_definitions.go | 1 + 6 files changed, 9 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 410107e70..7010b91b8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,7 @@ ### AWS Services +- Listing of Route53 records now contains a new column for aliases [#181](https://github.com/wallix/awless/issues/181) - Create an image from an existing instance. See `awless create image -h` * `awless create image instance=@my-instance-name name=redis-image description='redis prod image'` * `awless create image instance=i-0ee436a45561c04df name=redis-image reboot=true` diff --git a/aws/conv/model.go b/aws/conv/model.go index 80920870d..c268dbf7c 100644 --- a/aws/conv/model.go +++ b/aws/conv/model.go @@ -436,6 +436,7 @@ var awsResourcesDef = map[string]map[string]*propertyTransform{ properties.HealthCheck: {name: "HealthCheckId", transform: extractValueFn}, properties.Region: {name: "Region", transform: extractValueFn}, properties.Records: {name: "ResourceRecords", transform: extractStringSliceValues("Value")}, + properties.Alias: {name: "AliasTarget", transform: extractFieldFn("DNSName")}, properties.Set: {name: "SetIdentifier", transform: extractValueFn}, properties.TTL: {name: "TTL", transform: extractValueFn}, properties.TrafficPolicyInstance: {name: "TrafficPolicyInstanceId", transform: extractValueFn}, diff --git a/cloud/properties/gen_properties.go b/cloud/properties/gen_properties.go index 5c32bf3d4..d96db6de4 100644 --- a/cloud/properties/gen_properties.go +++ b/cloud/properties/gen_properties.go @@ -30,6 +30,7 @@ const ( AgentVersion = "AgentVersion" AlarmActions = "AlarmActions" AlarmNames = "AlarmNames" + Alias = "Alias" Aliases = "Aliases" ApproximateMessageCount = "ApproximateMessageCount" Architecture = "Architecture" diff --git a/cloud/rdf/gen_rdf.go b/cloud/rdf/gen_rdf.go index b6ed6701f..f635b2688 100644 --- a/cloud/rdf/gen_rdf.go +++ b/cloud/rdf/gen_rdf.go @@ -32,6 +32,7 @@ const ( AgentVersion = "cloud:agentVersion" AlarmActions = "cloud:alarmActions" AlarmNames = "cloud:alarmNames" + Alias = "cloud:alias" Aliases = "cloud:aliases" ApproximateMessageCount = "cloud:approximateMessageCount" Architecture = "cloud:architecture" @@ -242,6 +243,7 @@ var Labels = map[string]string{ properties.AgentVersion: AgentVersion, properties.AlarmActions: AlarmActions, properties.AlarmNames: AlarmNames, + properties.Alias: Alias, properties.Aliases: Aliases, properties.ApproximateMessageCount: ApproximateMessageCount, properties.Architecture: Architecture, @@ -452,6 +454,7 @@ var Properties = RDFProperties{ AgentVersion: {ID: AgentVersion, RdfType: "rdf:Property", RdfsLabel: "AgentVersion", RdfsDefinedBy: "rdfs:Literal", RdfsDataType: "xsd:string"}, AlarmActions: {ID: AlarmActions, RdfType: "rdf:Property", RdfsLabel: "AlarmActions", RdfsDefinedBy: "rdfs:list", RdfsDataType: "xsd:string"}, AlarmNames: {ID: AlarmNames, RdfType: "rdf:Property", RdfsLabel: "AlarmNames", RdfsDefinedBy: "rdfs:list", RdfsDataType: "xsd:string"}, + Alias: {ID: Alias, RdfType: "rdf:Property", RdfsLabel: "Alias", RdfsDefinedBy: "rdfs:Literal", RdfsDataType: "xsd:string"}, Aliases: {ID: Aliases, RdfType: "rdf:Property", RdfsLabel: "Aliases", RdfsDefinedBy: "rdfs:list", RdfsDataType: "xsd:string"}, ApproximateMessageCount: {ID: ApproximateMessageCount, RdfType: "rdf:Property", RdfsLabel: "ApproximateMessageCount", RdfsDefinedBy: "rdfs:Literal", RdfsDataType: "xsd:int"}, Architecture: {ID: Architecture, RdfType: "rdf:Property", RdfsLabel: "Architecture", RdfsDefinedBy: "rdfs:Literal", RdfsDataType: "xsd:string"}, diff --git a/console/defaults.go b/console/defaults.go index 1656cd866..34add0f17 100644 --- a/console/defaults.go +++ b/console/defaults.go @@ -65,7 +65,7 @@ var ColumnsInListing = map[string][]string{ cloud.Topic: {properties.ID}, cloud.Queue: {properties.ID, properties.ApproximateMessageCount, properties.Created, properties.Modified, properties.Delay}, cloud.Zone: {properties.ID, properties.Name, properties.Comment, properties.Private, properties.RecordCount, properties.CallerReference}, - cloud.Record: {properties.ID, properties.Type, properties.Name, properties.Records, properties.TTL}, + cloud.Record: {properties.ID, properties.Type, properties.Name, properties.Records, properties.Alias, properties.TTL}, cloud.Function: {properties.Name, properties.Size, properties.Memory, properties.Runtime, properties.Version, properties.Modified, properties.Description}, cloud.Metric: {properties.ID, properties.Name, properties.Namespace, properties.Dimensions}, cloud.Alarm: {properties.Name, properties.Namespace, properties.MetricName, properties.Description, properties.State, properties.Updated, properties.Dimensions}, @@ -432,6 +432,7 @@ var DefaultsColumnDefinitions = map[string][]ColumnDefinition{ StringColumnDefinition{Prop: properties.Type}, StringColumnDefinition{Prop: properties.Name}, SliceColumnDefinition{StringColumnDefinition{Prop: properties.Records}}, + StringColumnDefinition{Prop: properties.Alias}, StringColumnDefinition{Prop: properties.TTL}, }, // Lamba diff --git a/gen/aws/properties_definitions.go b/gen/aws/properties_definitions.go index f1acfc9c5..f5b712424 100644 --- a/gen/aws/properties_definitions.go +++ b/gen/aws/properties_definitions.go @@ -27,6 +27,7 @@ var PropertiesDefinitions = []property{ {AwlessLabel: "AgentVersion", RDFLabel: fmt.Sprintf("%s:agentVersion", rdf.CloudNS), RDFType: rdf.RdfProperty, RdfsDefinedBy: rdf.RdfsLiteral, RdfsDataType: rdf.XsdString}, {AwlessLabel: "AlarmActions", RDFLabel: fmt.Sprintf("%s:alarmActions", rdf.CloudNS), RDFType: rdf.RdfProperty, RdfsDefinedBy: rdf.RdfsList, RdfsDataType: rdf.XsdString}, {AwlessLabel: "AlarmNames", RDFLabel: fmt.Sprintf("%s:alarmNames", rdf.CloudNS), RDFType: rdf.RdfProperty, RdfsDefinedBy: rdf.RdfsList, RdfsDataType: rdf.XsdString}, + {AwlessLabel: "Alias", RDFLabel: fmt.Sprintf("%s:alias", rdf.CloudNS), RDFType: rdf.RdfProperty, RdfsDefinedBy: rdf.RdfsLiteral, RdfsDataType: rdf.XsdString}, {AwlessLabel: "Aliases", RDFLabel: fmt.Sprintf("%s:aliases", rdf.CloudNS), RDFType: rdf.RdfProperty, RdfsDefinedBy: rdf.RdfsList, RdfsDataType: rdf.XsdString}, {AwlessLabel: "ApproximateMessageCount", RDFLabel: fmt.Sprintf("%s:approximateMessageCount", rdf.CloudNS), RDFType: rdf.RdfProperty, RdfsDefinedBy: rdf.RdfsLiteral, RdfsDataType: rdf.XsdInt}, {AwlessLabel: "Architecture", RDFLabel: fmt.Sprintf("%s:architecture", rdf.CloudNS), RDFType: rdf.RdfProperty, RdfsDefinedBy: rdf.RdfsLiteral, RdfsDataType: rdf.XsdString},