def get_creator_id(db):
    co = Factory.get('Constants')(db)
    entity_name = EntityName(db)
    entity_name.find_by_name(cereconf.INITIAL_ACCOUNTNAME,
                             co.account_namespace)
    id = entity_name.entity_id
    return id
Exemple #2
0
    def find_by_name(self, name):
        """Associate the object with the Host whose name is name.  If
        name isn't an existing Host identifier, NotFoundError is
        raised.

        """
        EntityName.find_by_name(self, name, self.const.host_namespace)
Exemple #3
0
    def find_by_name(self, name):
        """Associate the object with the Host whose name is name.  If
        name isn't an existing Host identifier, NotFoundError is
        raised.

        """
        EntityName.find_by_name(self, name, self.const.host_namespace)
Exemple #4
0
    def __init__(self, *rest, **kw):
        self.__super.__init__(*rest, **kw)

        # VirtAccounts are owner by the system, rather than people/groups. We
        # need these ids later. Easier to fetch them right now and forget
        # about it.
        initial_group = Utils.Factory.get("Group")(self._db)
        initial_group.find_by_name(cereconf.INITIAL_GROUPNAME)
        self.initial_group = initial_group.entity_id

        initial_account = EntityName(self._db)
        initial_account.find_by_name(cereconf.INITIAL_ACCOUNTNAME, self.const.account_namespace)
        self.initial_account = initial_account.entity_id
        self.legal_chars = set(string.letters + string.digits + " .@")
Exemple #5
0
    def __init__(self, *rest, **kw):
        self.__super.__init__(*rest, **kw)

        # VirtAccounts are owner by the system, rather than people/groups. We
        # need these ids later. Easier to fetch them right now and forget
        # about it.
        initial_group = Utils.Factory.get("Group")(self._db)
        initial_group.find_by_name(cereconf.INITIAL_GROUPNAME)
        self.initial_group = initial_group.entity_id

        initial_account = EntityName(self._db)
        initial_account.find_by_name(cereconf.INITIAL_ACCOUNTNAME,
                                     self.const.account_namespace)
        self.initial_account = initial_account.entity_id
        self.legal_chars = set(string.letters + string.digits + " .@")
Exemple #6
0
 def find_by_name(self, name, domain=None):
     """Connect object to group having ``name`` in ``domain``."""
     if domain is None:
         domain = self.const.group_namespace
     EntityName.find_by_name(self, name, domain)
Exemple #7
0
 def find_by_name(self, name, domain=None):
     """Connect object to group having ``name`` in ``domain``."""
     if domain is None:
         domain = self.const.group_namespace
     EntityName.find_by_name(self, name, domain)
Exemple #8
0
 def find_by_name(self, name):
     EntityName.find_by_name(self, name, self.const.dns_owner_namespace)
Exemple #9
0
 def find_by_name(self, name):
     EntityName.find_by_name(self, name, self.const.dns_owner_namespace)