dell_storagecenter_driver/dell_storagecenter_api.py
def _init_volume(self, scvolume):
        """Initializes the volume.

        Maps the volume to a random server and immediately unmaps
        it. This initializes the volume.

        Don't wig out if this fails.
        :param scvolume: Dell Volume object.
        """
        pf = self._get_payload_filter()
        pf.append('scSerialNumber', scvolume.get('scSerialNumber'), 'Equals')
        r = self.client.post('StorageCenter/ScServer/GetList', pf.payload)
        if r.status_code == 200:
            scservers = self._get_json(r)
            # Sort through the servers looking for one with connectivity.
            for scserver in scservers:
                # TODO(tom_swanson): Add check for server type.
                # This needs to be either a physical or virtual server.
                # Outside of tests this should not matter as we only
                # "init" a volume to allow snapshotting of an empty volume.
                if scserver.get('status', '').lower() != 'down':
                    # Map to actually create the volume
                    self.map_volume(scvolume,
                                    scserver)
                    # We have changed the volume so grab a new copy of it.
                    scvolume = self.find_volume(scvolume.get('name'))
                    self.unmap_volume(scvolume,
                                      scserver)
                    return
        # We didn't map/unmap the volume.  So no initialization done.
        # Warn the user before we leave.  Note that this is almost certainly
        # a tempest test failure we are trying to catch here.  A snapshot
        # has likely been attempted before the volume has been instantiated
        # on the Storage Center.  In the real world no one will snapshot
        # a volume without first putting some data in that volume.
        LOG.warning('Volume initialization failure. (%s)',
                    self._get_id(scvolume))
Initializes the volume.

        Maps the volume to a random server and immediately unmaps
        it. This initializes the volume.

        Don't wig out if this fails.
        :param scvolume: Dell Volume object.
        
Initializes the volume.
Maps the volume to a random server and immediately unmaps
it. This initializes the volume.

Don't wig out if this fails.
Initializes the volume . Maps the volume to a random server and immediately unmaps it . This initializes the volume . Don ' t wig out if this fails .
def _init_volume(self, scvolume):
        pf = self._get_payload_filter()
        pf.append('scSerialNumber', scvolume.get('scSerialNumber'), 'Equals')
        r = self.client.post('StorageCenter/ScServer/GetList', pf.payload)
        if r.status_code == 200:
            scservers = self._get_json(r)
            for scserver in scservers:
                if scserver.get('status', '').lower() != 'down':
                    self.map_volume(scvolume,
                                    scserver)
                    scvolume = self.find_volume(scvolume.get('name'))
                    self.unmap_volume(scvolume,
                                      scserver)
                    return
        LOG.warning('Volume initialization failure. (%s)',
                    self._get_id(scvolume))
def _init_volume ( self , scvolume ) : pf = self . _get_payload_filter ( ) pf . append ( 'scSerialNumber' , scvolume . get ( 'scSerialNumber' ) , 'Equals' ) r = self . client . post ( 'StorageCenter/ScServer/GetList' , pf . payload ) if r . status_code == 200 : scservers = self . _get_json ( r ) for scserver in scservers : if scserver . get ( 'status' , '' ) . lower ( ) != 'down' : self . map_volume ( scvolume , scserver ) scvolume = self . find_volume ( scvolume . get ( 'name' ) ) self . unmap_volume ( scvolume , scserver ) return LOG . warning ( 'Volume initialization failure. (%s)' , self . _get_id ( scvolume ) )
Initializes the volume.
Initializes the volume .
"""Initializes the volume.

        Maps the volume to a random server and immediately unmaps
        it. This initializes the volume.

        Don't wig out if this fails.
        :param scvolume: Dell Volume object.
        """ # Sort through the servers looking for one with connectivity. # TODO(tom_swanson): Add check for server type. # This needs to be either a physical or virtual server. # Outside of tests this should not matter as we only # "init" a volume to allow snapshotting of an empty volume. # Map to actually create the volume # We have changed the volume so grab a new copy of it. # We didn't map/unmap the volume.  So no initialization done. # Warn the user before we leave.  Note that this is almost certainly # a tempest test failure we are trying to catch here.  A snapshot # has likely been attempted before the volume has been instantiated # on the Storage Center.  In the real world no one will snapshot # a volume without first putting some data in that volume.
self
scvolume
Dell Volume object.
Dell Volume object .