'Creates igroup for an initiator and returns the igroup name.'

def _create_igroup_for_initiator(self, initiator_name, wwpns):

    igrp_name = ('openstack-' + self._generate_random_string(12))
    LOG.info('Creating    initiator    group    %(grp)s    with    initiator    %(iname)s', {'grp': igrp_name, 'iname': initiator_name})
    if (self._storage_protocol == 'iSCSI'):
        self.APIExecutor.create_initiator_group(igrp_name)
        self.APIExecutor.add_initiator_to_igroup(igrp_name, initiator_name)
    elif (self._storage_protocol == 'FC'):
        self.APIExecutor.create_initiator_group_fc(igrp_name)
        for wwpn in wwpns:
            self.APIExecutor.add_initiator_to_igroup_fc(igrp_name, wwpn)
    return igrp_name
