Skip to content

Commit

Permalink
fixed handling of import output
Browse files Browse the repository at this point in the history
  • Loading branch information
purehyperbole committed Mar 29, 2017
1 parent 83441e0 commit 18e5546
Show file tree
Hide file tree
Showing 10 changed files with 20 additions and 20 deletions.
4 changes: 2 additions & 2 deletions c_ebs_volume.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ func (n *EBSVolume) Handle(subject string, c component, lines []Message) []Messa
lines = n.getSingleDetail(c, "Deleted EBS volume ")
case "ebs_volumes.find":
for _, cx := range c.getFoundComponents() {
lines = append(lines, n.getSingleDetail(cx, "Found EBS volumes")...)
lines = append(lines, n.getSingleDetail(cx, "Found EBS volume")...)
}
}
return lines
Expand All @@ -37,7 +37,7 @@ func (n *EBSVolume) getSingleDetail(c component, prefix string) (lines []Message
if status == "errored" {
level = "ERROR"
}
if status != "errored" && status != "completed" {
if status != "errored" && status != "completed" && status != "" {
return lines
}
lines = append(lines, Message{Body: " " + name, Level: level})
Expand Down
4 changes: 2 additions & 2 deletions c_elb.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ func (n *ELB) Handle(subject string, c component, lines []Message) []Message {
lines = n.getSingleDetail(c, "Deleted ELB")
case "elbs.find":
for _, cx := range c.getFoundComponents() {
lines = append(lines, n.getSingleDetail(cx, "Found ELBs")...)
lines = append(lines, n.getSingleDetail(cx, "Found ELB")...)
}
}
return lines
Expand All @@ -39,7 +39,7 @@ func (n *ELB) getSingleDetail(c component, prefix string) (lines []Message) {
if status == "errored" {
level = "ERROR"
}
if status != "errored" && status != "completed" {
if status != "errored" && status != "completed" && status != "" {
return lines
}
lines = append(lines, Message{Body: " " + name, Level: level})
Expand Down
4 changes: 2 additions & 2 deletions c_firewall.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ func (n *Firewall) Handle(subject string, c component, lines []Message) []Messag
lines = n.getSingleDetail(c, "Deleted Firewall")
case "firewalls.find":
for _, cx := range c.getFoundComponents() {
lines = append(lines, n.getSingleDetail(cx, "Found Firewalls")...)
lines = append(lines, n.getSingleDetail(cx, "Found Firewall")...)
}
}
return lines
Expand All @@ -39,7 +39,7 @@ func (n *Firewall) getSingleDetail(c component, prefix string) (lines []Message)
if status == "errored" {
level = "ERROR"
}
if status != "errored" && status != "completed" {
if status != "errored" && status != "completed" && status != "" {
return lines
}
lines = append(lines, Message{Body: " " + name, Level: level})
Expand Down
4 changes: 2 additions & 2 deletions c_instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ func (n *Instance) Handle(subject string, c component, lines []Message) []Messag
lines = n.getSingleDetail(c, "Deleted Instance")
case "instances.find":
for _, cx := range c.getFoundComponents() {
lines = append(lines, n.getSingleDetail(cx, "Found Instances")...)
lines = append(lines, n.getSingleDetail(cx, "Found Instance")...)
}
}
return lines
Expand All @@ -40,7 +40,7 @@ func (n *Instance) getSingleDetail(c component, prefix string) (lines []Message)
if status == "errored" {
level = "ERROR"
}
if status != "errored" && status != "completed" {
if status != "errored" && status != "completed" && status != "" {
return lines
}
lines = append(lines, Message{Body: " " + name, Level: level})
Expand Down
4 changes: 2 additions & 2 deletions c_nat.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ func (n *Nat) Handle(subject string, c component, lines []Message) []Message {
lines = n.getSingleDetail(c, "Deleted Nat")
case "nats.find":
for _, cx := range c.getFoundComponents() {
lines = append(lines, n.getSingleDetail(cx, "Found Nats")...)
lines = append(lines, n.getSingleDetail(cx, "Found Nat")...)
}
}
return lines
Expand All @@ -39,7 +39,7 @@ func (n *Nat) getSingleDetail(c component, prefix string) (lines []Message) {
if status == "errored" {
level = "ERROR"
}
if status != "errored" && status != "completed" {
if status != "errored" && status != "completed" && status != "" {
return lines
}
lines = append(lines, Message{Body: " " + name, Level: level})
Expand Down
4 changes: 2 additions & 2 deletions c_network.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ func (n *Network) Handle(subject string, c component, lines []Message) []Message
lines = n.getSingleDetail(c, "Deleted Network")
case "networks.find":
for _, cx := range c.getFoundComponents() {
lines = append(lines, n.getSingleDetail(cx, "Found Networks")...)
lines = append(lines, n.getSingleDetail(cx, "Found Network")...)
}
}
return lines
Expand All @@ -38,7 +38,7 @@ func (n *Network) getSingleDetail(c component, prefix string) (lines []Message)
if status == "errored" {
level = "ERROR"
}
if status != "errored" && status != "completed" {
if status != "errored" && status != "completed" && status != "" {
return lines
}
lines = append(lines, Message{Body: " " + name, Level: level})
Expand Down
4 changes: 2 additions & 2 deletions c_rds_cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ func (n *RDSCluster) Handle(subject string, c component, lines []Message) []Mess
lines = n.getSingleDetail(c, "Deleted RDS Cluster")
case "rds_clusters.find":
for _, cx := range c.getFoundComponents() {
lines = append(lines, n.getSingleDetail(cx, "Found RDS Clusters")...)
lines = append(lines, n.getSingleDetail(cx, "Found RDS Cluster")...)
}
}
return lines
Expand All @@ -41,7 +41,7 @@ func (n *RDSCluster) getSingleDetail(c component, prefix string) (lines []Messag
if status == "errored" {
level = "ERROR"
}
if status != "errored" && status != "completed" {
if status != "errored" && status != "completed" && status != "" {
return lines
}
lines = append(lines, Message{Body: " " + name, Level: level})
Expand Down
4 changes: 2 additions & 2 deletions c_rds_instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ func (n *RDSInstance) Handle(subject string, c component, lines []Message) []Mes
lines = n.getSingleDetail(c, "Deleted RDS Instance")
case "rds_instances.find":
for _, cx := range c.getFoundComponents() {
lines = append(lines, n.getSingleDetail(cx, "Found RDS Instances")...)
lines = append(lines, n.getSingleDetail(cx, "Found RDS Instance")...)
}
}
return lines
Expand All @@ -42,7 +42,7 @@ func (n *RDSInstance) getSingleDetail(c component, prefix string) (lines []Messa
if status == "errored" {
level = "ERROR"
}
if status != "errored" && status != "completed" {
if status != "errored" && status != "completed" && status != "" {
return lines
}
lines = append(lines, Message{Body: " " + name, Level: level})
Expand Down
4 changes: 2 additions & 2 deletions c_s3.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ func (n *S3Bucket) Handle(subject string, c component, lines []Message) []Messag
lines = n.getSingleDetail(c, "Deleted S3 Bucket")
case "s3s.find":
for _, cx := range c.getFoundComponents() {
lines = append(lines, n.getSingleDetail(cx, "Found S3 Buckets")...)
lines = append(lines, n.getSingleDetail(cx, "Found S3 Bucket")...)
}
}
return lines
Expand All @@ -43,7 +43,7 @@ func (n *S3Bucket) getSingleDetail(c component, prefix string) (lines []Message)
if status == "errored" {
level = "ERROR"
}
if status != "errored" && status != "completed" {
if status != "errored" && status != "completed" && status != "" {
return lines
}
lines = append(lines, Message{Body: " " + name, Level: level})
Expand Down
4 changes: 2 additions & 2 deletions c_vpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ func (n *Vpc) Handle(subject string, c component, lines []Message) []Message {
lines = n.getSingleDetail(c, "Deleted VPC")
case "vpcs.find":
for _, cx := range c.getFoundComponents() {
lines = append(lines, n.getSingleDetail(cx, "Found VPCs")...)
lines = append(lines, n.getSingleDetail(cx, "Found VPC")...)
}
}
return lines
Expand All @@ -40,7 +40,7 @@ func (n *Vpc) getSingleDetail(c component, prefix string) (lines []Message) {
if status == "errored" {
level = "ERROR"
}
if status != "errored" && status != "completed" {
if status != "errored" && status != "completed" && status != "" {
return lines
}
lines = append(lines, Message{Body: " " + id, Level: level})
Expand Down

0 comments on commit 18e5546

Please sign in to comment.