'This function creates the Export group with given name.
:param name: Name of the export group
:param project_name: Name of the project path
:param tenant: Container tenant name
:param varray: Name of the virtual array
:param exportgrouptype: Type of the export group. Ex:Host etc
:returns: status of creation'

def exportgroup_create(self, name, project_name, tenant, varray, exportgrouptype, export_destination=None):

    try:
        status = self.exportgroup_show(name, project_name, tenant)
    except common.CoprHdError as e:
        if (e.err_code == common.CoprHdError.NOT_FOUND_ERR):
            if (tenant is None):
                tenant = ''
            fullproj = ((tenant + '/') + project_name)
            projObject = project.Project(self.ipaddr, self.port)
            projuri = projObject.project_query(fullproj)
            varrayObject = virtualarray.VirtualArray(self.ipaddr, self.port)
            nhuri = varrayObject.varray_query(varray)
            parms = {'name': name, 'project': projuri, 'varray': nhuri, 'type': exportgrouptype}
            if (exportgrouptype and export_destination):
                host_obj = host.Host(self.ipaddr, self.port)
                host_uri = host_obj.query_by_name(export_destination)
                parms['hosts'] = [host_uri]
            body = oslo_serialization.jsonutils.dumps(parms)
            (s, h) = common.service_json_request(self.ipaddr, self.port, 'POST', self.URI_EXPORT_GROUP, body)
            o = common.json_decode(s)
            return o
        else:
            raise
    if status:
        raise common.CoprHdError(common.CoprHdError.ENTRY_ALREADY_EXISTS_ERR, (_('Export    group    with    name    %s    already    exists') % name))
