def create_group(self, name, description, domain=None):
        with _utils.shade_exceptions(
            "Error creating group {group}".format(group=name)
        ):
            domain_id = None
            if domain:
                dom = self.get_domain(domain)
                if not dom:
                    raise OpenStackCloudException(
                        "Creating group {group} failed: Invalid domain "
                        "{domain}".format(group=name, domain=domain)
                    )
                domain_id = dom['id']

            group = self.manager.submitTask(_tasks.GroupCreate(
                name=name, description=description, domain=domain_id)
            )
        self.list_groups.invalidate(self)
        return _utils.normalize_groups([group])[0]
Create a group.
dataset/ETHPy150Open openstack-infra/shade/shade/operatorcloud.py/OperatorCloud.create_group