Ejemplo n.º 1
0
 def test_query_image(self):
     cxt = TecentContext(KEY_ID,
                         KEY_SECRET,
                         host='api.qcloud.com',
                         port=443,
                         region='gz')
     image = TecentImageSupport(cxt)
     ret = image.list_images()
     self.assertIsNotNone(ret)
Ejemplo n.º 2
0
 def test_create_image(self):
     id = 'qcvmfa85f0497c33536dc641eaed5c4e3818'
     cxt = TecentContext(KEY_ID, KEY_SECRET,
                         host='api.qcloud.com', port=443, region='gz')
     i_ctx = TecentContext(KEY_ID, KEY_SECRET,
                           host='api.qcloud.com', port=443, region='gz')
     image = TecentImageSupport(cxt)
     instance = TecentInstanceSupport(i_ctx)
     instance.stop(id)
     ret = image.create_image(from_instance=id, name='testgquery1')
     print(ret)
     self.assertIsNotNone(ret)
Ejemplo n.º 3
0
 def test_create_image(self):
     id = 'qcvmfa85f0497c33536dc641eaed5c4e3818'
     cxt = TecentContext(KEY_ID,
                         KEY_SECRET,
                         host='api.qcloud.com',
                         port=443,
                         region='gz')
     i_ctx = TecentContext(KEY_ID,
                           KEY_SECRET,
                           host='api.qcloud.com',
                           port=443,
                           region='gz')
     image = TecentImageSupport(cxt)
     instance = TecentInstanceSupport(i_ctx)
     instance.stop(id)
     ret = image.create_image(from_instance=id, name='testgquery1')
     print(ret)
     self.assertIsNotNone(ret)
Ejemplo n.º 4
0
 def test_query_image(self):
     cxt = TecentContext(KEY_ID, KEY_SECRET,
                         host='api.qcloud.com', port=443, region='gz')
     image = TecentImageSupport(cxt)
     ret = image.list_images()
     self.assertIsNotNone(ret)