Exemplo n.º 1
0
def Volumes(show_list, id_num):
    """
    """
    volumes_info = volumes('sys', debug=False)

    if show_list:
        pp(list=volumes_info.list())
    elif type(id_num) is not type(None):
        pp(list=volumes_info.queryById(id_num))
    else:
        printCommandHelp(Volumes)
Exemplo n.º 2
0
def Jobs(show_list, id_num):
    """
    """
    jobs_info = jobs('sys', debug=False)

    if show_list:
        pp(list=jobs_info.list())
    elif type(id_num) is not type(None):
        pp(list=jobs_info.queryById(id_num))
    else:
        printCommandHelp(Jobs)
Exemplo n.º 3
0
def Images(show_list, id_num):
    '''
    '''
    images_info = images('sys', debug=False)

    if show_list:
        pp(list=images.list())
    elif type(id_num) is not type(None):
        pp(list=images_info.queryById(id_num))
    else:
        printCommandHelp(Images)
Exemplo n.º 4
0
def Api_Key(show_list, id_num):
    '''
    '''
    api_info = api_key('sys', debug=False)

    if show_list:
        pp(list=api_info.list())
    elif type(id_num) is not type(None):
        pp(list=api_info.queryById(id_num))
    else:
        printCommandHelp(Api_Key)
Exemplo n.º 5
0
def Users(show_list, id_num):
    '''
    '''
    users_info = users('sys', debug=False)

    if show_list:
        pp(list=users_info.getInfo())
    elif type(id_num) is not type(None):
        pp(list=users_info.queryById(id_num))
    else:
        printCommandHelp(Users)
Exemplo n.º 6
0
def Projects(show_list, id_num):
    '''
    '''
    projects_info = projects('sys', debug=False)

    if show_list:
        pp(list=projects_info.list())
    elif type(id_num) is not type(None):
        pp(list=projects_info.queryById(id_num))
    else:
        printCommandHelp(Projects)
Exemplo n.º 7
0
def Buckets(show_list, id_num):
    '''
    '''
    buckets_info = buckets('sys', debug=False)

    if show_list:
        pp(list=buckets_info.list())
    elif type(id_num) is not type(None):
        pp(list=buckets_info.queryById(id_num))
    else:
        printCommandHelp(Buckets)
Exemplo n.º 8
0
def Snapshots(show_list, id_num):
    """
    """
    snapshots_info = snapshots('sys', debug=False)

    if show_list:
        pp(list=snapshots_info.list())
    elif type(id_num) is not type(None):
        pp(list=snapshots_info.queryById(id_num))
    else:
        printCommandHelp(Snapshots)
Exemplo n.º 9
0
    def _do_api(self):
        if self._debug_:
            pp(csite=self._csite_,
               func=self._func_,
               yaml=self.twcc._yaml_fn_,
               res_type=self.res_type)

            if not isNone(self.url_dic):
                pp(url_dic=self.url_dic)
            if not isNone(self.data_dic):
                pp(data_dic=self.data_dic)

        res = self.twcc.doAPI(
            site_sn=self._csite_,
            key_tag=self._api_key_,
            func=self._func_,
            url_dict=self.url_dic if not isNone(self.url_dic) else None,
            data_dict=self.data_dic if not isNone(self.data_dic) else None,
            http=self.http_verb,
            url_ext_get=self.ext_get,
            res_type=self.res_type)

        if self._debug_:
            pp(res=res)

        return res
Exemplo n.º 10
0
 def delete_keypair(ctx, info):
     if not isNone(info):
         key_info = KeyPairFun.keypair_data_info()
         pp(show_list=key_info.delete(info))
     else:
         print(ctx.get_help())
Exemplo n.º 11
0
 def list(describe):
     acls_info = AclsFun.acls_auth()
     if not isNone(describe):
         table_layout(' Acls Info ', acls_info.queryById(describe))
     else:
         pp(show_list=acls_info.list())