当前位置: 首页>>代码示例>>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;未经允许,请勿转载。