dell_storagecenter_driver/dell_storagecenter_api.py
def create_server(self, name, wwnoriscsiname, isfc=False):
        """Creates a Dell server object on the the Storage Center.

        Adds the first HBA identified by wwnoriscsiname to it.

        :param name: The server's name.
        :param wwnoriscsiname: A list of FC WWNs or iSCSI IQNs associated with
                               this Dell server object.
        :param isfc: Boolean indicating whether this is an FC HBA or not.
        :returns: Dell server object.
        """
        scserver = None
        payload = {}
        payload['Name'] = name or 'Server_%s' % wwnoriscsiname
        payload['StorageCenter'] = self.ssn
        payload['Notes'] = self.notes
        # We pick Red Hat Linux 6.x because it supports multipath and
        # will attach luns to paths as they are found.
        scserveros = self._find_serveros('Red Hat Linux 6.x')
        if scserveros is not None:
            payload['OperatingSystem'] = scserveros

        # Find our folder or make it
        folder = self._find_server_folder(True)

        # At this point it doesn't matter if the folder was created or not.
        # We just attempt to create the server.  Let it be in the root if
        # the folder creation fails.
        if folder is not None:
            payload['ServerFolder'] = self._get_id(folder)

        # create our server
        r = self.client.post('StorageCenter/ScPhysicalServer',
                             payload)
        if self._check_result(r):
            # Server was created
            scserver = self._first_result(r)

            # Add hba to our server
            if scserver is not None:
                if not self._add_hba(scserver,
                                     wwnoriscsiname,
                                     isfc):
                    LOG.error('Error adding HBA to server')
                    # Can't have a server without an HBA
                    self._delete_server(scserver)
                    scserver = None
        # Success or failure is determined by the caller
        return scserver
Creates a Dell server object on the the Storage Center.

        Adds the first HBA identified by wwnoriscsiname to it.

        :param name: The server's name.
        :param wwnoriscsiname: A list of FC WWNs or iSCSI IQNs associated with
                               this Dell server object.
        :param isfc: Boolean indicating whether this is an FC HBA or not.
        :returns: Dell server object.
        
Creates a Dell server object on the the Storage Center.
Adds the first HBA identified by wwnoriscsiname to it.
Creates a Dell server object on the the Storage Center . Adds the first HBA identified by wwnoriscsiname to it .
def create_server(self, name, wwnoriscsiname, isfc=False):
        scserver = None
        payload = {}
        payload['Name'] = name or 'Server_%s' % wwnoriscsiname
        payload['StorageCenter'] = self.ssn
        payload['Notes'] = self.notes
        scserveros = self._find_serveros('Red Hat Linux 6.x')
        if scserveros is not None:
            payload['OperatingSystem'] = scserveros
        folder = self._find_server_folder(True)
        if folder is not None:
            payload['ServerFolder'] = self._get_id(folder)
        r = self.client.post('StorageCenter/ScPhysicalServer',
                             payload)
        if self._check_result(r):
            scserver = self._first_result(r)
            if scserver is not None:
                if not self._add_hba(scserver,
                                     wwnoriscsiname,
                                     isfc):
                    LOG.error('Error adding HBA to server')
                    self._delete_server(scserver)
                    scserver = None
        return scserver
def create_server ( self , name , wwnoriscsiname , isfc = False ) : scserver = None payload = { } payload [ 'Name' ] = name or 'Server_%s' % wwnoriscsiname payload [ 'StorageCenter' ] = self . ssn payload [ 'Notes' ] = self . notes scserveros = self . _find_serveros ( 'Red Hat Linux 6.x' ) if scserveros is not None : payload [ 'OperatingSystem' ] = scserveros folder = self . _find_server_folder ( True ) if folder is not None : payload [ 'ServerFolder' ] = self . _get_id ( folder ) r = self . client . post ( 'StorageCenter/ScPhysicalServer' , payload ) if self . _check_result ( r ) : scserver = self . _first_result ( r ) if scserver is not None : if not self . _add_hba ( scserver , wwnoriscsiname , isfc ) : LOG . error ( 'Error adding HBA to server' ) self . _delete_server ( scserver ) scserver = None return scserver
Creates a Dell server object on the the Storage Center.
Creates a Dell server object on the the Storage Center .
"""Creates a Dell server object on the the Storage Center.

        Adds the first HBA identified by wwnoriscsiname to it.

        :param name: The server's name.
        :param wwnoriscsiname: A list of FC WWNs or iSCSI IQNs associated with
                               this Dell server object.
        :param isfc: Boolean indicating whether this is an FC HBA or not.
        :returns: Dell server object.
        """ # We pick Red Hat Linux 6.x because it supports multipath and # will attach luns to paths as they are found. # Find our folder or make it # At this point it doesn't matter if the folder was created or not. # We just attempt to create the server.  Let it be in the root if # the folder creation fails. # create our server # Server was created # Add hba to our server # Can't have a server without an HBA # Success or failure is determined by the caller
Dell server object.
Dell server object .
self
name
The server's name.
The server ' s name .
wwnoriscsiname
A list of FC WWNs or iSCSI IQNs associated with
this Dell server object.
A list of FC WWNs or iSCSI IQNs associated with this Dell server object .
isfc
Boolean indicating whether this is an FC HBA or not.
Boolean indicating whether this is an FC HBA or not .