Skip to content
This repository has been archived by the owner on Aug 9, 2024. It is now read-only.

Commit

Permalink
Send image raw_url to fedimg instead of the build_name
Browse files Browse the repository at this point in the history
  • Loading branch information
sayanchowdhury committed Jul 11, 2016
1 parent 62714e9 commit 4f9e932
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 12 deletions.
2 changes: 0 additions & 2 deletions fedimg/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@
import argparse
import ConfigParser

from fedimg.consumers import KojiConsumer


# Read in config file
config = ConfigParser.RawConfigParser()
Expand Down
20 changes: 10 additions & 10 deletions fedimg/services/ec2.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ def upload(self, compose_meta):
ami = self.util_amis[0] # Select the starting AMI to begin
self.destination = 'EC2 ({region})'.format(region=ami['region'])

fedimg.messenger.message('image.upload', self.build_name,
fedimg.messenger.message('image.upload', self.raw_url,
self.destination, 'started',
compose=compose_meta)

Expand Down Expand Up @@ -302,7 +302,7 @@ def upload(self, compose_meta):
if chan.recv_ready():
data = chan.recv(1024 * 32)

fedimg.messenger.message('image.upload', self.build_name,
fedimg.messenger.message('image.upload', self.raw_url,
self.destination, 'failed',
extra={'data': data},
compose=compose_meta)
Expand Down Expand Up @@ -426,7 +426,7 @@ def upload(self, compose_meta):
# TODO: Can probably move this into the above try/except,
# to avoid just dumping all the messages at once.
for image in self.images:
fedimg.messenger.message('image.upload', self.build_name,
fedimg.messenger.message('image.upload', self.raw_url,
self.destination, 'completed',
extra={'id': image.id,
'virt_type': self.virt_type,
Expand All @@ -452,7 +452,7 @@ def upload(self, compose_meta):
size = [s for s in sizes if s.id == test_size_id][0]

# Alert the fedmsg bus that an image test is starting
fedimg.messenger.message('image.test', self.build_name,
fedimg.messenger.message('image.test', self.raw_url,
self.destination, 'started',
extra={'id': self.images[0].id,
'virt_type': self.virt_type,
Expand All @@ -473,7 +473,7 @@ def upload(self, compose_meta):
ex_security_groups=['ssh'],
)
except Exception as e:
fedimg.messenger.message('image.test', self.build_name,
fedimg.messenger.message('image.test', self.raw_url,
self.destination, 'failed',
extra={'id': self.images[0].id,
'virt_type': self.virt_type,
Expand Down Expand Up @@ -515,7 +515,7 @@ def upload(self, compose_meta):
if chan.recv_ready():
data = chan.recv(1024 * 32)

fedimg.messenger.message('image.test', self.build_name,
fedimg.messenger.message('image.test', self.raw_url,
self.destination, 'failed',
extra={'id': self.images[0].id,
'virt_type': self.virt_type,
Expand All @@ -529,7 +529,7 @@ def upload(self, compose_meta):
client.close()

log.info('AMI test completed')
fedimg.messenger.message('image.test', self.build_name,
fedimg.messenger.message('image.test', self.raw_url,
self.destination, 'completed',
extra={'id': self.images[0].id,
'virt_type': self.virt_type,
Expand Down Expand Up @@ -595,7 +595,7 @@ def upload(self, compose_meta):
region=ami['region'])

fedimg.messenger.message('image.upload',
self.build_name,
self.raw_url,
alt_dest, 'started',
compose=compose_meta)

Expand Down Expand Up @@ -658,7 +658,7 @@ def upload(self, compose_meta):
'Image copy to {0} failed'.format(
ami['region']))
fedimg.messenger.message('image.upload',
self.build_name,
self.raw_url,
alt_dest, 'failed',
compose=compose_meta)
break
Expand Down Expand Up @@ -701,7 +701,7 @@ def upload(self, compose_meta):
self.vol_type))

fedimg.messenger.message('image.upload',
self.build_name,
self.raw_url,
alt_dest, 'completed',
extra={'id': image.id,
'virt_type': self.virt_type,
Expand Down

0 comments on commit 4f9e932

Please sign in to comment.