# -*- coding: utf-8 -*-
# flake8: noqa

import sys
from qiniu import QiniuMacAuth
from qiniu import AccountClient

access_key = sys.argv[1]
secret_key = sys.argv[2]

acc_client = AccountClient(QiniuMacAuth(access_key, secret_key))
apps, info = acc_client.list_apps()

for app in apps:
    if app.get('runMode') == 'Private':
        uri = app.get('uri')
        qcos = acc_client.get_qcos_client(uri)
        if qcos != None:
            stacks, info = qcos.list_stacks()
            print("list_stacks of '%s':" % uri)
            print(stacks)
            print(info)
            assert len(stacks) is not None
# -*- coding: utf-8 -*-
# flake8: noqa

import sys
from qiniu import QiniuMacAuth
from qiniu import AccountClient

access_key = sys.argv[1]
secret_key = sys.argv[2]

acc_client = AccountClient(QiniuMacAuth(access_key, secret_key))
apps, info = acc_client.list_apps()

for app in apps:
    if app.get('runMode') == 'Private':
        uri = app.get('uri')
        qcos = acc_client.get_qcos_client(uri)
        if qcos != None:
            stacks, info = qcos.list_stacks()
            print("list_stacks of '%s':"%uri)
            print(stacks)
            print(info)
            assert len(stacks) is not None
Exemple #3
0
# -*- coding: utf-8 -*-
# flake8: noqa

import sys
from qiniu import QiniuMacAuth
from qiniu import AccountClient

access_key = sys.argv[1]
secret_key = sys.argv[2]

acc_client = AccountClient(QiniuMacAuth(access_key, secret_key))

ret, info = acc_client.list_apps()

print(ret)
print(info)

assert len(ret) is not None