コード例 #1
0
 def is_thick(self):
     if self._is_thick is None:
         provision = utils.get_extra_spec(self._volume, 'provisioning:type')
         support = utils.get_extra_spec(self._volume,
                                        'thick_provisioning_support')
         self._is_thick = (provision == 'thick' and support == '<is> True')
     return self._is_thick
コード例 #2
0
 def is_compressed(self):
     if self._is_compressed is None:
         provision = utils.get_extra_spec(self._volume, 'provisioning:type')
         compression = utils.get_extra_spec(self._volume,
                                            'compression_support')
         if provision == 'compressed' and compression == '<is> True':
             self._is_compressed = True
     return self._is_compressed
コード例 #3
0
    def tiering_policy(self):
        tiering_policy_map = {'StartHighThenAuto':
                              enums.TieringPolicyEnum.AUTOTIER_HIGH,
                              'Auto':
                              enums.TieringPolicyEnum.AUTOTIER,
                              'HighestAvailable':
                              enums.TieringPolicyEnum.HIGHEST,
                              'LowestAvailable':
                              enums.TieringPolicyEnum.LOWEST}
        if not self._tiering_policy:
            tiering_value = utils.get_extra_spec(self._volume,
                                                 'storagetype:tiering')
            support = utils.get_extra_spec(self._volume,
                                           'fast_support') == '<is> True'

            if tiering_value and support:
                self._tiering_policy = tiering_policy_map.get(tiering_value)
            # if no value, unity sets StartHighThenAuto as default
        return self._tiering_policy
コード例 #4
0
 def is_replication_enabled(self):
     if self._is_replication_enabled is None:
         value = utils.get_extra_spec(self._volume, 'replication_enabled')
         self._is_replication_enabled = value == '<is> True'
     return self._is_replication_enabled