示例#1
0
文件: Runner.py 项目: remyd1/client
    def _setPersistentDiskOptional(self):
        if not self.persistentDiskUUID:
            return

        self.pdiskEndpointHostname = VolumeManager.getFQNHostname(self.pdiskEndpoint)

        # Ensure that the pdiskEndpoint does not have a trailing slash.
        opts = self.__dict__.copy()
        opts['pdiskEndpoint'] = self.pdiskEndpoint.rstrip('/')

        self.persistent_disk = (self.persistentDiskUUID and Runner.PERSISTENT_DISK % opts) or ''

        self._checkPersistentDiskAvailable()
示例#2
0
 def _configureNfsServer(self):
     printStep('Configuring NFS sharing...')
     if self._nfsShareAlreadyExists():
         self.system.configureExistingNfsShare(self.persistentDiskExistingNfs,
                                               self.persistentDiskNfsMountPoint)
     elif self.profile == 'node':
         self.system.configureExistingNfsShare('%s:%s' % (
         VolumeManager.getFQNHostname(self.persistentDiskIp), self.persistentDiskNfsMountPoint),
                                               self.persistentDiskNfsMountPoint)
     else:
         self.system.configureNewNfsServer(self.persistentDiskNfsMountPoint,
                                           self.networkAddr,
                                           self.networkMask)
示例#3
0
文件: Runner.py 项目: remyd1/client
 def _createDiskUrlIfDiskId(self, image):
     if Image.isDiskId(image):
         self.pdiskEndpointHostname = VolumeManager.getFQNHostname(self.pdiskEndpoint)
         return "pdisk:%s/%s" % (self.pdiskEndpoint.rstrip('/'), image)
     else:
         return image
 def _checkUuid(self):
     for uuid in self.uuids:
         if not VolumeManager.isValidUuid(uuid):
             printError('Invalid UUID %s' % uuid)
示例#5
0
 def _isDbOnPdiskHost(self):
     return self.persistentDiskDbHost in ['localhost', '127.0.0.1',
                                          self.persistentDiskIp,
                                          VolumeManager.getFQNHostname(self.persistentDiskIp)]