當前位置: 首頁>>代碼示例>>Python>>正文


Python GID.dump方法代碼示例

本文整理匯總了Python中sfa.trust.gid.GID.dump方法的典型用法代碼示例。如果您正苦於以下問題:Python GID.dump方法的具體用法?Python GID.dump怎麽用?Python GID.dump使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在sfa.trust.gid.GID的用法示例。


在下文中一共展示了GID.dump方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: display

# 需要導入模塊: from sfa.trust.gid import GID [as 別名]
# 或者: from sfa.trust.gid.GID import dump [as 別名]
 def display(self, gidfile):
     """Print contents of a GID file"""
     gid_path = os.path.abspath(gidfile)
     if not gid_path or not os.path.isfile(gid_path):
         print "No such gid file: %s" % gidfile
         sys.exit(1)
     gid = GID(filename=gid_path)
     gid.dump(dump_parents=True)
開發者ID:kongseokhwan,項目名稱:sfa,代碼行數:10,代碼來源:sfaadmin.py

示例2: display

# 需要導入模塊: from sfa.trust.gid import GID [as 別名]
# 或者: from sfa.trust.gid.GID import dump [as 別名]
def display(options):
    """
    Display the sepcified GID
    """
    gidfile = os.path.abspath(options.display)
    if not gidfile or not os.path.isfile(gidfile):
        print "No such gid: %s" % gidfile
        sys.exit(1)
    gid = GID(filename=gidfile)
    gid.dump(dump_parents=True)
開發者ID:planetlab,項目名稱:sfa,代碼行數:12,代碼來源:sfa-ca.py

示例3: get_trusted_certs

# 需要導入模塊: from sfa.trust.gid import GID [as 別名]
# 或者: from sfa.trust.gid.GID import dump [as 別名]
 def get_trusted_certs(self, opts, args):
     """
     return uhe trusted certs at this interface 
     """ 
     trusted_certs = self.registry.get_trusted_certs()
     for trusted_cert in trusted_certs:
         gid = GID(string=trusted_cert)
         gid.dump()
         cert = Certificate(string=trusted_cert)
         self.logger.debug('Sfi.get_trusted_certs -> %r'%cert.get_subject())
     return 
開發者ID:planetlab,項目名稱:sfa,代碼行數:13,代碼來源:sfi.py

示例4: handle_input_kind

# 需要導入模塊: from sfa.trust.gid import GID [as 別名]
# 或者: from sfa.trust.gid.GID import dump [as 別名]
def handle_input_kind (filename, options, kind):
    

# dump methods current do 'print' so let's go this road for now
    if kind=="certificate":
        cert=Certificate (filename=filename)
        print '--------------------',filename,'IS A',kind
        cert.dump(show_extensions=options.show_extensions)
    elif kind=="credential":
        cred = Credential(filename = filename)
        print '--------------------',filename,'IS A',kind
        cred.dump(dump_parents = options.dump_parents, show_xml=options.show_xml)
        if options.extract_gids:
            print '--------------------',filename,'embedded GIDS'
            extract_gids(cred, extract_parents = options.dump_parents)
    elif kind=="gid":
        gid = GID(filename = filename)
        print '--------------------',filename,'IS A',kind
        gid.dump(dump_parents = options.dump_parents)
    else:
        print "%s: unknown filekind '%s'"% (filename,kind)
開發者ID:tubav,項目名稱:sfa,代碼行數:23,代碼來源:sfadump.py


注:本文中的sfa.trust.gid.GID.dump方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。