本文整理汇总了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)
示例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
示例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)
示例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)
示例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)
示例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)
示例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)
示例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)
示例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()