当前位置: 首页>>代码示例>>Python>>正文


Python Util.get_share_file方法代码示例

本文整理汇总了Python中stratuslab.Util.get_share_file方法的典型用法代码示例。如果您正苦于以下问题:Python Util.get_share_file方法的具体用法?Python Util.get_share_file怎么用?Python Util.get_share_file使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在stratuslab.Util的用法示例。


在下文中一共展示了Util.get_share_file方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: getTemplatePath

# 需要导入模块: from stratuslab import Util [as 别名]
# 或者: from stratuslab.Util import get_share_file [as 别名]
 def getTemplatePath(instance=None):
     if instance and hasattr(instance, "vmTemplateFile"):
         return Util.get_share_file(["vm", "schema.one"], instance.vmTemplateFile)
     else:
         return Util.get_share_file(["vm", "schema.one"])
开发者ID:StratusLab,项目名称:client,代码行数:7,代码来源:Runner.py

示例2: __init__

# 需要导入模块: from stratuslab import Util [as 别名]
# 或者: from stratuslab.Util import get_share_file [as 别名]
    def __init__(self, configHolder=ConfigHolder()):

        self.os = ''
        self.osversion = ''
        self.arch = ''
        self.type = '' # image type: base, grid, ..
        self.version = '' # image version

        self.created = '' # image creation time (in iso8601)
        self.user = self.creator = '' # full name of image creator

        self.email = '' # email address of endorser

        self.compression = '' # image compression: gz, bz2, ..
        self.title = ''
        self.tag = ''
        self.comment = ''
        self.filename = '' # filename of compressed image (old manifest)

        self.deprecated = ''

        self.locations = [] # list of image URIs
        self._locations_xml = '<slterms:location>%(location)s</slterms:location>'

        self.kind = '' # image kind: machine, disk

        self.format = '' # image format: raw, qcow2, ..

        self.bytes = '0' # size of the uncompressed image on disk (in bytes)
        self.md5 = ''
        self.sha1 = ''
        self.sha256 = ''
        self.sha512 = ''

        self.valid = '' # ManifestInfo.created + ManifestInfo.IMAGE_VALIDITY (in iso8601)

        self.identifier = '' # base64 of int(sha1_hex, 16)
        self.serialnumber = ''
        self.hypervisor = '' # kvm, xen, ..

        self.publisher = 'StratusLab'

        self.disksbus = ManifestInfo.DISKS_BUS_DEFAULT
        self.inboundports = ManifestInfo.INBOUND_PORTS_DEFAULT

        self.verboseLevel = 0

        configHolder.assign(self)

        self._template = Util.get_share_file(['template', 'manifest.xml.tpl'])

        self._manifestTemplateElements = \
            (('type', 'type', NS_DCTERMS, None),
             ('created', 'created', NS_DCTERMS, None),
             ('valid', 'valid', NS_DCTERMS, None),
             ('title', 'title', NS_DCTERMS, ''),
             ('tag', 'alternative', NS_DCTERMS, ''),
             ('comment', 'description', NS_DCTERMS, None),
             ('compression', 'compression', NS_DCTERMS, None),
             ('creator', 'creator', NS_DCTERMS, self.creator),
             ('user', 'creator', NS_DCTERMS, self.creator),
             ('format', 'format', NS_DCTERMS, self.format),
             ('publisher', 'publisher', NS_DCTERMS, self.publisher),
             ('os', 'os', NS_SLTERMS, None),
             ('arch', 'os-arch', NS_SLTERMS, None),
             ('osversion', 'os-version', NS_SLTERMS, None),
             ('version', 'version', NS_SLTERMS, None),
             ('kind', 'kind', NS_SLTERMS, self.kind),
             ('disksbus', 'disks-bus', NS_SLTERMS, self.disksbus),
             ('hypervisor', 'hypervisor', NS_SLTERMS, self.hypervisor),
             ('email', 'email', NS_SLREQ, self.email))
开发者ID:StratusLab,项目名称:client,代码行数:73,代码来源:ManifestInfo.py


注:本文中的stratuslab.Util.get_share_file方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。