def project_create_event(self, proj_info):

        LOG.debug("Processing create %(proj)s event.", {'proj': proj_info})
        proj_id = proj_info.get('resource_info')
        try:
            proj = self.keystone_event._service.projects.get(proj_id)
        except Exception:
            LOG.error(_LE("Failed to find project %s."), proj_id)
            return

        # In the project name, dci_id may be included. Check if this is the
        # case and extact the dci_id from the name, and provide dci_id when
        # creating the project.
        proj_name, dci_id = self._get_dci_id_and_proj_name(proj.name)
        # The default partition name is 'os' (i.e. openstack) which reflects
        # it is created by openstack.
        part_name = self.cfg.dcnm.default_partition_name
        if len(':'.join((proj_name, part_name))) > 32:
            LOG.error(_LE('Invalid project name length: %s. The length of '
                          'org:part name is greater than 32'),
                      len(':'.join((proj_name, part_name))))
            return
        try:
            self.dcnm_client.create_project(proj_name, part_name, dci_id,
                                            proj.description)
        except dexc.DfaClientRequestFailed:
            # Failed to send create project in DCNM.
            # Save the info and mark it as failure and retry it later.
            self.update_project_info_cache(proj_id, name=proj_name,
                                           dci_id=dci_id,
                                           result=constants.CREATE_FAIL)
            LOG.error(_LE("Failed to create project %s on DCNM."), proj_name)
        else:
            self.update_project_info_cache(proj_id, name=proj_name,
                                           dci_id=dci_id)
            LOG.debug('project %(name)s %(dci)s %(desc)s', (
                {'name': proj_name, 'dci': dci_id, 'desc': proj.description}))
Create project.
dataset/ETHPy150Open openstack/networking-cisco/networking_cisco/apps/saf/server/dfa_server.py/DfaServer.project_create_event