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


Python Util.printInfo方法代码示例

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


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

示例1: _shutdownNode

# 需要导入模块: from stratuslab import Util [as 别名]
# 或者: from stratuslab.Util import printInfo [as 别名]
 def _shutdownNode(self):
     if self.shutdownVm:
         self._stopMachine()
     else:
         self._printStep('Machine ready for use')
         msg = '\n\tMachine IP: %s\tRemember to stop the machine when finished' % self.vmIp
         Util.printInfo(msg)
开发者ID:StratusLab,项目名称:client,代码行数:9,代码来源:Creator.py

示例2: generateP12

# 需要导入模块: from stratuslab import Util [as 别名]
# 或者: from stratuslab.Util import printInfo [as 别名]
 def generateP12(self):
     self.tmp_dir = tempfile.mkdtemp()
     Util.printDetail('Temporary directory for certificate generation: %s' %
                      self.tmp_dir, self.configHolder.verboseLevel,
                      Util.VERBOSE_LEVEL_DETAILED)
     try:
         self._generateOpensslConfig()
         self._runCommandsP12()
     finally:
         if self.configHolder.noCleanup:
             Util.printInfo('Intermediate files are in %s' % self.tmp_dir)
         else:
             try:
                 shutil.rmtree(self.tmp_dir, ignore_errors=True)
             except:
                 pass
开发者ID:StratusLab,项目名称:client,代码行数:18,代码来源:CertGenerator.py

示例3: _installPackagesOnNode

# 需要导入模块: from stratuslab import Util [as 别名]
# 或者: from stratuslab.Util import printInfo [as 别名]
    def _installPackagesOnNode(self):
        Util.printStep('Setting up Couchbase yum repository on node')
        cmd = 'curl --output %s %s' % (self._repofile, self._repourl)
        self._executeOnNodeExitOnError(cmd)

        Util.printStep('Removing Couchbase python client')
        try:
            cmd = 'pip uninstall -y couchbase'
            rc, output = self.system._nodeShell(cmd.split(' '),
                                      withOutput=True,
				      shell=True)	
            if rc != 0:
                Util.printInfo('Couchbase python client NOT removed')
            else:
                Util.printInfo('Couchbase python client removed')
        except:
            Util.printInfo("Couchbase python client NOT removed")

        Util.printStep('Removing Couchbase C client')
        cmd = 'yum erase -y %s' % ' '.join(self._pkgs)
        self._executeOnNodeExitOnError(cmd)

        Util.printStep('Installing Couchbase C client')
        cmd = 'yum install -y %s' % ' '.join(self._pkgs)
        self._executeOnNodeExitOnError(cmd)

        Util.printStep('Installing Couchbase python client dependencies')
        cmd = 'yum install --nogpgcheck -y %s' % ' '.join(self._deps)
        self._executeOnNodeExitOnError(cmd)

        Util.printStep('Installing Couchbase python client')
        cmd = 'pip install couchbase'
        self._executeOnNodeExitOnError(cmd)
开发者ID:StratusLab,项目名称:client,代码行数:35,代码来源:CouchbaseClient.py

示例4: _installPackagesOnNode

# 需要导入模块: from stratuslab import Util [as 别名]
# 或者: from stratuslab.Util import printInfo [as 别名]
    def _installPackagesOnNode(self):
        Util.printStep("Setting up Couchbase yum repository on node")
        cmd = "curl --output %s %s" % (self._repofile, self._repourl)
        self._executeOnNodeExitOnError(cmd)

        Util.printStep("Removing Couchbase python client")
        try:
            cmd = "pip uninstall -y couchbase"
            rc, output = self.system._nodeShell(cmd.split(" "), withOutput=True, shell=True)
            if rc != 0:
                Util.printInfo("Couchbase python client NOT removed")
            else:
                Util.printInfo("Couchbase python client removed")
        except:
            Util.printInfo("Couchbase python client NOT removed")

        Util.printStep("Removing Couchbase C client")
        cmd = "yum erase -y %s" % " ".join(self._pkgs)
        self._executeOnNodeExitOnError(cmd)

        Util.printStep("Installing Couchbase C client")
        cmd = "yum install -y %s" % " ".join(self._pkgs)
        self._executeOnNodeExitOnError(cmd)

        Util.printStep("Installing Couchbase python client dependencies")
        cmd = "yum install --nogpgcheck -y %s" % " ".join(self._deps)
        self._executeOnNodeExitOnError(cmd)

        Util.printStep("Installing Couchbase python client")
        cmd = "pip install couchbase"
        self._executeOnNodeExitOnError(cmd)
开发者ID:remyd1,项目名称:client,代码行数:33,代码来源:CouchbaseClient.py

示例5: _installPackages

# 需要导入模块: from stratuslab import Util [as 别名]
# 或者: from stratuslab.Util import printInfo [as 别名]
    def _installPackages(self):
        Util.printStep('Setting up Couchbase yum repository')
        cmd = 'curl --output %s %s' % (self._repofile, self._repourl)
        self._executeExitOnError(cmd)

        Util.printStep('Removing Couchbase python client')
        try:
            cmd = 'pip uninstall -y couchbase'
            rc, output = Util.execute(cmd.split(' '),
                                      withOutput=True,
                                      verboseLevel=self.verboseLevel,
                                      verboseThreshold=Util.VERBOSE_LEVEL_DETAILED)
            if rc != 0:
                Util.printInfo('Couchbase python client NOT removed')
            else:
                Util.printInfo('Couchbase python client removed')
        except:
            Util.printInfo("Couchbase python client NOT removed")

        Util.printStep('Removing Couchbase C client')
        cmd = 'yum erase -y %s' % ' '.join(self._pkgs)
        self._executeExitOnError(cmd)

        Util.printStep('Installing Couchbase C client')
        cmd = 'yum install -y %s' % ' '.join(self._pkgs)
        self._executeExitOnError(cmd)

        Util.printStep('Installing Couchbase python client dependencies')
        cmd = 'yum install -y %s' % ' '.join(self._deps)
        self._executeExitOnError(cmd)

        Util.printStep('Upgrading pip for Couchbase python client')
        cmd = 'pip install --upgrade pip'
        self._executeExitOnError(cmd)

        Util.printStep('Installing Couchbase python client')
        cmd = 'pip install couchbase'
        self._executeExitOnError(cmd)
开发者ID:StratusLab,项目名称:client,代码行数:40,代码来源:CouchbaseClient.py

示例6: _installPackages

# 需要导入模块: from stratuslab import Util [as 别名]
# 或者: from stratuslab.Util import printInfo [as 别名]
    def _installPackages(self):
        Util.printStep("Setting up Couchbase yum repository")
        cmd = "curl --output %s %s" % (self._repofile, self._repourl)
        self._executeExitOnError(cmd)

        Util.printStep("Removing Couchbase python client")
        try:
            cmd = "pip uninstall -y couchbase"
            rc, output = Util.execute(
                cmd.split(" "),
                withOutput=True,
                verboseLevel=self.verboseLevel,
                verboseThreshold=Util.VERBOSE_LEVEL_DETAILED,
            )
            if rc != 0:
                Util.printInfo("Couchbase python client NOT removed")
            else:
                Util.printInfo("Couchbase python client removed")
        except:
            Util.printInfo("Couchbase python client NOT removed")

        Util.printStep("Removing Couchbase C client")
        cmd = "yum erase -y %s" % " ".join(self._pkgs)
        self._executeExitOnError(cmd)

        Util.printStep("Installing Couchbase C client")
        cmd = "yum install -y %s" % " ".join(self._pkgs)
        self._executeExitOnError(cmd)

        Util.printStep("Installing Couchbase python client dependencies")
        cmd = "yum install -y %s" % " ".join(self._deps)
        self._executeExitOnError(cmd)

        Util.printStep("Installing Couchbase python client")
        cmd = "pip install couchbase"
        self._executeExitOnError(cmd)
开发者ID:remyd1,项目名称:client,代码行数:38,代码来源:CouchbaseClient.py

示例7: _uploadMarketplaceManifest

# 需要导入模块: from stratuslab import Util [as 别名]
# 或者: from stratuslab.Util import printInfo [as 别名]
 def _uploadMarketplaceManifest(self):
     uploader = MarketplaceUploader(self.configHolder)
     url = uploader.upload(self.manifestFile)
     Util.printInfo('Manifest uploaded: %s' % url)
开发者ID:StratusLab,项目名称:client,代码行数:6,代码来源:Uploader.py

示例8: _updateImageMetadataInPDisk

# 需要导入模块: from stratuslab import Util [as 别名]
# 或者: from stratuslab.Util import printInfo [as 别名]
 def _updateImageMetadataInPDisk(self):
     if self.imageMetadata:
         uuid = self.imageUrl.rsplit('/', 1)[-1]
         self.pdisk.updateVolumeAsUser(self.imageMetadata, uuid)
         Util.printInfo('Image metadata updated: %s' % self.imageMetadata)
开发者ID:StratusLab,项目名称:client,代码行数:7,代码来源:Uploader.py

示例9: _uploadImage

# 需要导入模块: from stratuslab import Util [as 别名]
# 或者: from stratuslab.Util import printInfo [as 别名]
    def _uploadImage(self):
        self.imageUrl = self.pdisk.uploadVolume(self.imageFile)
        Util.printInfo('Image uploaded: %s' % self.imageUrl)

        self._updateImageMetadataInPDisk()
开发者ID:StratusLab,项目名称:client,代码行数:7,代码来源:Uploader.py


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