X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;ds=sidebyside;f=doctor_tests%2Fimage.py;h=9961b22dc730a54fbb0a710672df40623fd05755;hb=8ad1bb152a304a6b195485010e66e013b7404a34;hp=2e313e1248b1133f5cd3cc1d94cc30f2376ad04f;hpb=079ac9a481fcc1baa53cb5ab2896bbe037585f3b;p=doctor.git diff --git a/doctor_tests/image.py b/doctor_tests/image.py index 2e313e12..9961b22d 100644 --- a/doctor_tests/image.py +++ b/doctor_tests/image.py @@ -28,7 +28,7 @@ OPTS = [ help='the name of image file', required=True), cfg.StrOpt('image_download_url', - default='https://launchpad.net/cirros/trunk/0.3.0/+download/cirros-0.3.0-x86_64-disk.img', + default='https://launchpad.net/cirros/trunk/0.3.0/+download/cirros-0.3.0-x86_64-disk.img', # noqa help='the url where to get the image', required=True), ] @@ -53,10 +53,12 @@ class Image(object): resp = urllib.request.urlopen(self.conf.image_download_url) with open(self.conf.image_filename, "wb") as file: file.write(resp.read()) - self.image = self.glance.images.create(name=self.conf.image_name, - disk_format=self.conf.image_format, - container_format="bare", - visibility="public") + self.image = \ + self.glance.images.create( + name=self.conf.image_name, + disk_format=self.conf.image_format, + container_format="bare", + visibility="public") self.glance.images.upload(self.image['id'], open(self.conf.image_filename, 'rb')) else: