Skip to content

Commit

Permalink
Merge pull request #29 from ernestio/ernest/323
Browse files Browse the repository at this point in the history
[#ERNEST-323] : Do not track non final messages
  • Loading branch information
purehyperbole authored Mar 17, 2017
2 parents 45ceefe + e86b62f commit cf83851
Show file tree
Hide file tree
Showing 11 changed files with 33 additions and 0 deletions.
3 changes: 3 additions & 0 deletions c_ebs_volume.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ func (n *EBSVolume) getSingleDetail(c component, prefix string) (lines []Message
if status == "errored" {
level = "ERROR"
}
if status != "errored" && status != "completed" {
return lines
}
lines = append(lines, Message{Body: " " + name, Level: level})
id, _ := c["volume_aws_id"].(string)
if id != "" {
Expand Down
3 changes: 3 additions & 0 deletions c_elb.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ func (n *ELB) getSingleDetail(c component, prefix string) (lines []Message) {
if status == "errored" {
level = "ERROR"
}
if status != "errored" && status != "completed" {
return lines
}
lines = append(lines, Message{Body: " " + name, Level: level})
lines = append(lines, Message{Body: " Status : " + status, Level: ""})
if c["dns_name"] != nil {
Expand Down
3 changes: 3 additions & 0 deletions c_firewall.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ func (n *Firewall) getSingleDetail(c component, prefix string) (lines []Message)
if status == "errored" {
level = "ERROR"
}
if status != "errored" && status != "completed" {
return lines
}
lines = append(lines, Message{Body: " " + name, Level: level})
lines = append(lines, Message{Body: " Status : " + status, Level: ""})
if status == "errored" {
Expand Down
3 changes: 3 additions & 0 deletions c_instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ func (n *Instance) getSingleDetail(c component, prefix string) (lines []Message)
if status == "errored" {
level = "ERROR"
}
if status != "errored" && status != "completed" {
return lines
}
lines = append(lines, Message{Body: " " + name, Level: level})
lines = append(lines, Message{Body: " IP : " + ip, Level: ""})
publicIP, _ := c["public_ip"].(string)
Expand Down
3 changes: 3 additions & 0 deletions c_nat.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ func (n *Nat) getSingleDetail(c component, prefix string) (lines []Message) {
if status == "errored" {
level = "ERROR"
}
if status != "errored" && status != "completed" {
return lines
}
lines = append(lines, Message{Body: " " + name, Level: level})
lines = append(lines, Message{Body: " Status : " + status, Level: ""})
if status == "errored" {
Expand Down
3 changes: 3 additions & 0 deletions c_network.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ func (n *Network) getSingleDetail(c component, prefix string) (lines []Message)
if status == "errored" {
level = "ERROR"
}
if status != "errored" && status != "completed" {
return lines
}
lines = append(lines, Message{Body: " " + name, Level: level})
lines = append(lines, Message{Body: " IP : " + ip, Level: ""})
id, _ := c["network_aws_id"].(string)
Expand Down
3 changes: 3 additions & 0 deletions c_rds_cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ func (n *RDSCluster) getSingleDetail(c component, prefix string) (lines []Messag
if status == "errored" {
level = "ERROR"
}
if status != "errored" && status != "completed" {
return lines
}
lines = append(lines, Message{Body: " " + name, Level: level})
lines = append(lines, Message{Body: " Engine : " + engine, Level: ""})
lines = append(lines, Message{Body: " Endpoint : " + endpoint, Level: ""})
Expand Down
3 changes: 3 additions & 0 deletions c_rds_instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ func (n *RDSInstance) getSingleDetail(c component, prefix string) (lines []Messa
if status == "errored" {
level = "ERROR"
}
if status != "errored" && status != "completed" {
return lines
}
lines = append(lines, Message{Body: " " + name, Level: level})
lines = append(lines, Message{Body: " Engine : " + engine, Level: ""})
lines = append(lines, Message{Body: " Cluster : " + cluster, Level: ""})
Expand Down
3 changes: 3 additions & 0 deletions c_router.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ func (n *Router) getSingleDetail(c component, prefix string) (lines []Message) {
if status == "errored" {
level = "ERROR"
}
if status != "errored" && status != "completed" {
return lines
}
ip, _ := c["ip"].(string)
lines = append(lines, Message{Body: " " + name, Level: level})
lines = append(lines, Message{Body: " IP : " + ip, Level: ""})
Expand Down
3 changes: 3 additions & 0 deletions c_s3.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ func (n *S3Bucket) getSingleDetail(c component, prefix string) (lines []Message)
if status == "errored" {
level = "ERROR"
}
if status != "errored" && status != "completed" {
return lines
}
lines = append(lines, Message{Body: " " + name, Level: level})
lines = append(lines, Message{Body: " ACL : " + acl, Level: ""})
lines = append(lines, Message{Body: " Status : " + status, Level: ""})
Expand Down
3 changes: 3 additions & 0 deletions c_vpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ func (n *Vpc) getSingleDetail(c component, prefix string) (lines []Message) {
if status == "errored" {
level = "ERROR"
}
if status != "errored" && status != "completed" {
return lines
}
lines = append(lines, Message{Body: " " + id, Level: level})
lines = append(lines, Message{Body: " Subnet : " + subnet, Level: ""})
lines = append(lines, Message{Body: " Status : " + status, Level: ""})
Expand Down

0 comments on commit cf83851

Please sign in to comment.