コード例 #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)
コード例 #2
0
ファイル: tecent.py プロジェクト: bellamusic/cloudsdk
 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)
コード例 #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)
コード例 #4
0
ファイル: tecent.py プロジェクト: bellamusic/cloudsdk
 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)