dell_storagecenter_driver/dell_storagecenter_api.py
def _find_storage_profile(self, storage_profile):
        """Looks for a Storage Profile on the array.

        Storage Profiles determine tiering settings. If not specified a volume
        will use the Default storage profile.

        :param storage_profile: The Storage Profile name to find with any
                                spaces stripped.
        :returns: The Storage Profile object or None.
        """
        if not storage_profile:
            return None

        # Since we are stripping out spaces for convenience we are not
        # able to just filter on name. Need to get all Storage Profiles
        # and look through for the one we want. Never many profiles, so
        # this doesn't cause as much overhead as it might seem.
        storage_profile = storage_profile.replace(' ', '').lower()
        pf = self._get_payload_filter()
        pf.append('scSerialNumber', self.ssn, 'Equals')
        r = self.client.post(
            'StorageCenter/ScStorageProfile/GetList', pf.payload)
        if self._check_result(r):
            profiles = self._get_json(r)
            for profile in profiles:
                # Look for the stripped, case insensitive match
                name = profile.get('name', '').replace(' ', '').lower()
                if name == storage_profile:
                    return profile

        # It's possible the standard Flocker profiles are requested but
        # matching named profiles are not defined on the SC. In this case
        # we match up the Flocker default profiles with the SC default
        # profiles.
        if storage_profile == 'gold':
            return self._find_storage_profile('highpriority')
        elif storage_profile == 'silver':
            return self._find_storage_profile('mediumpriority')
        elif storage_profile == 'bronze':
            return self._find_storage_profile('lowpriority')

        return None
Looks for a Storage Profile on the array.

        Storage Profiles determine tiering settings. If not specified a volume
        will use the Default storage profile.

        :param storage_profile: The Storage Profile name to find with any
                                spaces stripped.
        :returns: The Storage Profile object or None.
        
Looks for a Storage Profile on the array.
Storage Profiles determine tiering settings. If not specified a volume
will use the Default storage profile.
Looks for a Storage Profile on the array . Storage Profiles determine tiering settings . If not specified a volume will use the Default storage profile .
def _find_storage_profile(self, storage_profile):
        if not storage_profile:
            return None
        storage_profile = storage_profile.replace(' ', '').lower()
        pf = self._get_payload_filter()
        pf.append('scSerialNumber', self.ssn, 'Equals')
        r = self.client.post(
            'StorageCenter/ScStorageProfile/GetList', pf.payload)
        if self._check_result(r):
            profiles = self._get_json(r)
            for profile in profiles:
                name = profile.get('name', '').replace(' ', '').lower()
                if name == storage_profile:
                    return profile
        if storage_profile == 'gold':
            return self._find_storage_profile('highpriority')
        elif storage_profile == 'silver':
            return self._find_storage_profile('mediumpriority')
        elif storage_profile == 'bronze':
            return self._find_storage_profile('lowpriority')
        return None
def _find_storage_profile ( self , storage_profile ) : if not storage_profile : return None storage_profile = storage_profile . replace ( ' ' , '' ) . lower ( ) pf = self . _get_payload_filter ( ) pf . append ( 'scSerialNumber' , self . ssn , 'Equals' ) r = self . client . post ( 'StorageCenter/ScStorageProfile/GetList' , pf . payload ) if self . _check_result ( r ) : profiles = self . _get_json ( r ) for profile in profiles : name = profile . get ( 'name' , '' ) . replace ( ' ' , '' ) . lower ( ) if name == storage_profile : return profile if storage_profile == 'gold' : return self . _find_storage_profile ( 'highpriority' ) elif storage_profile == 'silver' : return self . _find_storage_profile ( 'mediumpriority' ) elif storage_profile == 'bronze' : return self . _find_storage_profile ( 'lowpriority' ) return None
Looks for a Storage Profile on the array.
Looks for a Storage Profile on the array .
"""Looks for a Storage Profile on the array.

        Storage Profiles determine tiering settings. If not specified a volume
        will use the Default storage profile.

        :param storage_profile: The Storage Profile name to find with any
                                spaces stripped.
        :returns: The Storage Profile object or None.
        """ # Since we are stripping out spaces for convenience we are not # able to just filter on name. Need to get all Storage Profiles # and look through for the one we want. Never many profiles, so # this doesn't cause as much overhead as it might seem. # Look for the stripped, case insensitive match # It's possible the standard Flocker profiles are requested but # matching named profiles are not defined on the SC. In this case # we match up the Flocker default profiles with the SC default # profiles.
The Storage Profile object or None.
The Storage Profile object or None .
self
storage_profile
The Storage Profile name to find with any
spaces stripped.
The Storage Profile name to find with any spaces stripped .