class CLConstants(CereConst.CLConstants): # ChangeLog constants hostpolicy_atom_create = CereConst._ChangeTypeCode( 'hostpolicy_atom', 'create', 'create atom %(subject)s') hostpolicy_atom_mod = CereConst._ChangeTypeCode('hostpolicy_atom', 'modify', 'modify atom %(subject)s') hostpolicy_atom_delete = CereConst._ChangeTypeCode( 'hostpolicy_atom', 'delete', 'delete atom %(subject)s') hostpolicy_role_create = CereConst._ChangeTypeCode( 'hostpolicy_role', 'create', 'create role %(subject)s') hostpolicy_role_mod = CereConst._ChangeTypeCode('hostpolicy_role', 'modify', 'modify role %(subject)s') hostpolicy_role_delete = CereConst._ChangeTypeCode( 'hostpolicy_role', 'delete', 'delete role %(subject)s') hostpolicy_relationship_add = CereConst._ChangeTypeCode( 'hostpolicy_relationship', 'add', 'add relationship %(subject)s -> %(dest)s') # TODO: type is not given here hostpolicy_relationship_remove = CereConst._ChangeTypeCode( 'hostpolicy_relationship', 'remove', 'remove relationship %(subject)s -> %(dest)s') # TODO: type is not given here hostpolicy_policy_add = CereConst._ChangeTypeCode( 'hostpolicy', 'add', 'add policy %(dest)s to host %(subject)s') hostpolicy_policy_remove = CereConst._ChangeTypeCode( 'hostpolicy', 'remove', 'remove policy %(dest)s from host %(subject)s')
class CLConstants(Constants.CLConstants): # AD functionality ad_attr_add = Constants._ChangeTypeCode( 'ad_attr', 'add', 'added AD-attribute for %(subject)s', ('spread=%(string:spread)s, attr=%(string:attr)s, ' 'value=%(string:value)s', )) ad_attr_del = Constants._ChangeTypeCode( 'ad_attr', 'remove', 'removed AD-attribute for %(subject)s', ('spread=%(string:spread)s, attr=%(string:attr)s', ))
class CLConstants(Constants.CLConstants): ou_disk_add = Constants._ChangeTypeCode( 'ou_disk_mapping', 'add', 'Default disk for aff %(aff)s set to %(disk)s', ) ou_disk_remove = Constants._ChangeTypeCode( 'ou_disk_mapping', 'remove', 'Default disk for aff %(aff)s removed', )
class EntityExpireConstants(Constants.CLConstants): """Constants specific for C{EntityExpire}.""" entity_expire_add = Constants._ChangeTypeCode( "entity_expire", "add", "added expire date for %(subject)s", ("new_expire_date=%(new_expire_date)s", )) entity_expire_del = Constants._ChangeTypeCode( "entity_expire", "remove", "deleted expire date for %(subject)s", ("old_expire_date=%(old_expire_date)s", )) entity_expire_mod = Constants._ChangeTypeCode( "entity_expire", "modify", "modified expire date for %(subject)s", ("old_expire_date=%(old_expire_date)s", "new_expire_date=%(new_expire_date)s"))
class CLConstants(cereconst.CLConstants): consent_approve = cereconst._ChangeTypeCode( 'consent', 'approve', '%(subject)s gives consent', ("type=%(string:consent_string)s", "expiry=%(timestamp:expiry)s", "description=%(string:description)s")) consent_decline = cereconst._ChangeTypeCode( 'consent', 'decline', '%(subject)s declines consent', ("type=%(string:consent_string)s", "expiry=%(timestamp:expiry)s", "description=%(string:description)s")) consent_remove = cereconst._ChangeTypeCode( 'consent', 'delete', '%(subject)s deletes consent', ("type=%(string:consent_string)s", ))
class CLConstants(Constants.CLConstants): """ChangeLogConstants""" printer_quota_exempt_add = Constants._ChangeTypeCode( 'printer_quota_exempt', 'add', 'add printer quota exempt %(subject)s') printer_quota_exempt_rem = Constants._ChangeTypeCode( 'printer_quota_exempt', 'remove', 'del printer quota exempt %(subject)s') printer_quota_exempt_upd = Constants._ChangeTypeCode( 'printer_quota_exempt', 'update', 'upd printer quota exempt %(subject)s')
def make_inital_users(db): print("Creating initial entities.") from Cerebrum import Constants from Cerebrum import Group from Cerebrum import Account from Cerebrum import Entity co = Constants.Constants() eg = Entity.Entity(db) eg.populate(co.entity_group) eg.write_db() ea = Entity.Entity(db) ea.populate(co.entity_account) ea.write_db() def false(*args): return False # TODO: These should have a permanent quarantine and be non-visible # Use Account.Account to avoid getting the wrong Account Mixins # fiddling with the bootstrap account. Every instance may use this # account as they see fit, but have to append functionality # manually afterwards. makedb an account that can be created with # a fully populated cereconf, but an empty database(which may # break a lot of Mixins). a = Account.Account(db) a.illegal_name = false a.populate( name=cereconf.INITIAL_ACCOUNTNAME, owner_type=co.entity_group, owner_id=eg.entity_id, np_type=int(co.account_program), creator_id=ea.entity_id, expire_date=None, description=None, parent=ea, ) # Get rid of errors because of missing prerequisites for password # mechanisms not needed for initial setup. # # TBD: implement cereconf.INITIAL_PASSWORD_MECHANISM? method = co.auth_type_md5_crypt a.affect_auth_types(method) enc = a.encrypt_password(method, cereconf.INITIAL_ACCOUNTNAME_PASSWORD) a.populate_authentication_type(method, enc) a.write_db() g = Group.Group(db) g.illegal_name = false g.populate(creator_id=a.entity_id, visibility=co.group_visibility_all, name=cereconf.INITIAL_GROUPNAME, group_type=co.group_type_internal, parent=eg) g.write_db() g.add_member(a.entity_id) db.commit()
class HpcConstants(Constants.Constants): CpuArch = _CpuArchCode OperatingSystem = _OperatingSystemCode InterConnect = _InterConnectCode AllocationAuthority = _AllocationAuthorityCode AllocationStatus = _AllocationStatusCode AllocationCreditPriority = _AllocationCreditPriorityCode Science = _ScienceCode entity_project = Constants._EntityTypeCode( 'project', 'see table project_info and friends') entity_allocation = Constants._EntityTypeCode( 'allocation', 'see table allocation_info and friends') entity_allocationperiod = Constants._EntityTypeCode( 'allocationperiod', 'see table allocation_period_info and friends') machine_mod = _ChangeTypeCode('e_machine', 'mod', 'modified %(subject)s') machine_demote = _ChangeTypeCode('e_machine', 'demote', 'demote %(subject)s') machine_promote = _ChangeTypeCode('e_machine', 'promote', 'promote %(subject)s') project_create = _ChangeTypeCode('e_project', 'create', 'created %(subject)s') project_mod = _ChangeTypeCode('e_project', 'mod', 'modified %(subject)s') project_destroy = _ChangeTypeCode('e_project', 'destroy', 'destroyed %(subject)s') allocation_create = _ChangeTypeCode('e_allocation', 'create', 'created %(subject)s') allocation_mod = _ChangeTypeCode('e_allocation', 'mod', 'modified %(subject)s') allocation_destroy = _ChangeTypeCode('e_allocation', 'destroy', 'destroyed %(subject)s') allocation_period_create = _ChangeTypeCode('e_alloc_period', 'create', 'created %(subject)s') allocation_period_mod = _ChangeTypeCode('e_alloc_period', 'mod', 'modified %(subject)s') allocation_period_destroy = _ChangeTypeCode('e_alloc_period', 'destroy', 'destroyed %(subject)s')
class Constants(cereconst.Constants): # Entity type entity_feide_service = cereconst._EntityTypeCode('feide_service', 'Feide service') # Change log feide_service_add = cereconst._ChangeTypeCode( 'feide_service', 'add', 'added feide service %(subject)s', ("feide_id=%(int:feide_id)s", "name=%(string:name)s")) feide_service_mod = cereconst._ChangeTypeCode( 'feide_service', 'mod', 'modified feide service %(subject)s', ("feide_id=%(int:feide_id)s", "name=%(string:name)s")) feide_service_del = cereconst._ChangeTypeCode( 'feide_service', 'del', 'deleted feide service %(subject)s', ("feide_id=%(int:feide_id)s", "name=%(string:name)s")) feide_service_authn_level_add = cereconst._ChangeTypeCode( 'feide_service_authn_level', 'add', 'added authn level for %(subject)s, service=%(dest)s', ("level=%(int:level)s")) feide_service_authn_level_mod = cereconst._ChangeTypeCode( 'feide_service_authn_level', 'mod', 'modified authn level for %(subject)s, service=%(dest)s', ("level=%(int:level)s")) feide_service_authn_level_del = cereconst._ChangeTypeCode( 'feide_service_authn_level', 'del', 'deleted authn level for %(subject)s, service=%(dest)s', ("level=%(int:level)s"))
class Constants(CereConst.Constants): entity_hostpolicy_atom = CereConst._EntityTypeCode( 'hostpolicy_atom', 'hostpolicy_atom - see table "cerebrum.hostpolicy_component" and friends.' ) entity_hostpolicy_role = CereConst._EntityTypeCode( 'hostpolicy_role', 'hostpolicy_role - see table "cerebrum.hostpolicy_component" and friends.' ) hostpolicy_component_namespace = CereConst._ValueDomainCode( 'hostpol_comp_ns', 'Domain for hostpolicy-components') hostpolicy_mutually_exclusive = _PolicyRelationshipCode( "hostpol_mutex", "Source policy and target policy are mutually exclusive") hostpolicy_contains = _PolicyRelationshipCode( "hostpol_contains", "Source policy contains target policy")
class ConstantsMixin(Constants.Constants): u""" Additional CIM constants. """ target_system_cim = TargetSystemConstants._TargetSystemCode( 'CIM', 'CIM as a destination system') spread_cim_person = Constants._SpreadCode( 'CIM_person', Constants.Constants.entity_person, 'Person exported to CIM')
class Constants(cereconst.Constants): ConsentType = _ConsentTypeCode EntityConsent = _EntityConsentCode consent_opt_in = _ConsentTypeCode('opt-in', 'Consent actively given') consent_opt_out = _ConsentTypeCode('opt-out', 'Consent assumed unless declined') # Change log codes consent_approve = cereconst._ChangeTypeCode( 'consent', 'approve', '%(subject)s gives consent', ("type=%(string:consent_string)s", "expiry=%(timestamp:expiry)s", "description=%(string:description)s")) consent_decline = cereconst._ChangeTypeCode( 'consent', 'decline', '%(subject)s declines consent', ("type=%(string:consent_string)s", "expiry=%(timestamp:expiry)s", "description=%(string:description)s")) consent_remove = cereconst._ChangeTypeCode( 'consent', 'delete', '%(subject)s deletes consent', ("type=%(string:consent_string)s", ))
class CLConstants(Constants.CLConstants): ephorte_role_add = Constants._ChangeTypeCode( 'ephorte_role', 'add', 'add ephorte role @ %(dest)s', ('type=%(rolle_type:rolle_type)s',)) ephorte_role_upd = Constants._ChangeTypeCode( 'ephorte_role', 'modify', 'update ephorte role @ %(dest)s') ephorte_role_rem = Constants._ChangeTypeCode( 'ephorte_role', 'remove', 'remove ephorte role @ %(dest)s', ('type=%(rolle_type:rolle_type)s',)) ephorte_perm_add = Constants._ChangeTypeCode( 'ephorte_perm', 'add', 'add ephorte perm @ %(dest)s', ('type=%(perm_type:perm_type)s',)) ephorte_perm_rem = Constants._ChangeTypeCode( 'ephorte_perm', 'remove', 'remove ephorte perm @ %(dest)s', ('type=%(perm_type:perm_type)s',))
class Constants(Constants.Constants): entity_hostpolicy_atom = Constants._EntityTypeCode( 'hostpolicy_atom', 'hostpolicy_atom - see table "cerebrum.hostpolicy_component" and friends.') entity_hostpolicy_role = Constants._EntityTypeCode( 'hostpolicy_role', 'hostpolicy_role - see table "cerebrum.hostpolicy_component" and friends.') hostpolicy_component_namespace = Constants._ValueDomainCode('hostpol_comp_ns', 'Domain for hostpolicy-components') hostpolicy_mutually_exclusive = _PolicyRelationshipCode( "hostpol_mutex", "Source policy and target policy are mutually exclusive") hostpolicy_contains = _PolicyRelationshipCode( "hostpol_contains", "Source policy contains target policy") # ChangeLog constants hostpolicy_atom_create = _ChangeTypeCode( 'hostpolicy', 'atom_create', 'create atom %(subject)s') hostpolicy_atom_mod = _ChangeTypeCode( 'hostpolicy', 'atom_mod', 'modify atom %(subject)s') hostpolicy_atom_delete = _ChangeTypeCode( 'hostpolicy', 'atom_delete', 'delete atom %(subject)s') hostpolicy_role_create = _ChangeTypeCode( 'hostpolicy', 'role_create', 'create role %(subject)s') hostpolicy_role_mod = _ChangeTypeCode( 'hostpolicy', 'role_mod', 'modify role %(subject)s') hostpolicy_role_delete = _ChangeTypeCode( 'hostpolicy', 'role_delete', 'delete role %(subject)s') hostpolicy_relationship_add = _ChangeTypeCode( 'hostpolicy', 'relationship_add', 'add relationship %(subject)s -> %(dest)s') # TODO: type is not given here hostpolicy_relationship_remove = _ChangeTypeCode( 'hostpolicy', 'relationship_remove', 'remove relationship %(subject)s -> %(dest)s') # TODO: type is not given here hostpolicy_policy_add = _ChangeTypeCode( 'hostpolicy', 'policy_add', 'add policy %(dest)s to host %(subject)s') hostpolicy_policy_remove = _ChangeTypeCode( 'hostpolicy', 'policy_remove', 'remove policy %(dest)s from host %(subject)s')
class CLConstants(CereConst.CLConstants): # Change log feide_service_add = CereConst._ChangeTypeCode( 'feide_service', 'add', 'added feide service %(subject)s', ("feide_id=%(int:feide_id)s", "name=%(string:name)s")) feide_service_mod = CereConst._ChangeTypeCode( 'feide_service', 'modify', 'modified feide service %(subject)s', ("feide_id=%(int:feide_id)s", "name=%(string:name)s")) feide_service_del = CereConst._ChangeTypeCode( 'feide_service', 'remove', 'deleted feide service %(subject)s', ("feide_id=%(int:feide_id)s", "name=%(string:name)s")) feide_service_authn_level_add = CereConst._ChangeTypeCode( 'feide_service_authn_level', 'add', 'added authn level for %(subject)s, service=%(dest)s', "level=%(int:level)s") feide_service_authn_level_mod = CereConst._ChangeTypeCode( 'feide_service_authn_level', 'modify', 'modified authn level for %(subject)s, service=%(dest)s', "level=%(int:level)s") feide_service_authn_level_del = CereConst._ChangeTypeCode( 'feide_service_authn_level', 'remove', 'deleted authn level for %(subject)s, service=%(dest)s', "level=%(int:level)s")
class CLConstants(Constants.CLConstants): # ChangeTypes used by the email module # TODO: Put these in it's own file? Put that file and this file into # Cerebrum/modules/email/? # email domain email_dom_add = Constants._ChangeTypeCode( 'email_domain', 'add', 'add email domain %(subject)s', 'name=%(string:new_domain_name)') email_dom_rem = Constants._ChangeTypeCode( 'email_domain', 'remove', 'remove email domain %(subject)s', 'name=%(string:del_domain') # either domain name or domain description has been changed email_dom_mod = Constants._ChangeTypeCode( 'email_domain', 'modify', 'modify email domain %(subject)s', ('name=%(string:new_domain_name)', 'desc=%(string:new_domain_desc')) email_dom_addcat = Constants._ChangeTypeCode( 'email_domain_category', 'add', 'add category in email domain' ' %(subject)s', 'cat=%(int:cat)') email_dom_remcat = Constants._ChangeTypeCode( 'email_domain_category', 'remove', 'remove category in email domain' ' %(subject)s', 'cat=%(int:cat)') # email target email_target_add = Constants._ChangeTypeCode( 'email_target', 'add', 'add email target %(subject)s', ) email_target_rem = Constants._ChangeTypeCode( 'email_target', 'remove', 'remove email target %(subject)s') email_target_mod = Constants._ChangeTypeCode( 'email_target', 'modify', 'modify email target %(subject)s', ( 'type=id:%(int:target_type)s', 'server=id:%(int:server_id)s', )) # email address email_address_add = Constants._ChangeTypeCode( 'email_address', 'add', 'add email address %(subject)s', ('lp=%(string:lp)s', 'domain=%(int:dom_id)s')) email_address_rem = Constants._ChangeTypeCode( 'email_address', 'remove', 'remove email address %(subject)s', ('lp=%(string:lp)s', 'domain=%(int:dom_id)s')) email_address_mod = Constants._ChangeTypeCode( 'email_address', 'mod', 'modify email address %(subject)s', ('lp=%(string:lp)s', 'domain=%(int:dom_id)s')) # email entity domain affiliation email_entity_dom_add = Constants._ChangeTypeCode( 'email_entity_domain', 'add', 'add domain aff for %(subject)s', 'affiliation=%(int:aff)') email_entity_dom_rem = Constants._ChangeTypeCode( 'email_entity_domain', 'remove', 'remove domain aff for %(subject)s') email_entity_dom_mod = Constants._ChangeTypeCode( 'email_entity_domain', 'modify', 'modify domain aff for %(subject)s', 'affiliation=%(int:aff)') # email quota (subject here is an email_target) email_quota_add = Constants._ChangeTypeCode( 'email_quota', 'add', 'add quota for %(subject)s', ('soft=%(int:soft)', 'hard=%(int:hard)')) email_quota_rem = Constants._ChangeTypeCode( 'email_quota', 'remove', 'remove quota for %(subject)s') email_quota_mod = Constants._ChangeTypeCode( 'email_quota', 'modify', 'modify quota for %(subject)s', ('soft=%(int:soft)', 'hard=%(int:hard)')) # email target filter email_tfilter_add = Constants._ChangeTypeCode( 'email_tfilter', 'add', 'add tfilter for %(subject)s', 'filter=%(int:filter)') email_tfilter_rem = Constants._ChangeTypeCode( 'email_tfilter', 'remove', 'remove tfilter for %(subject)s', 'filter=%(int:filter)') # email spam_filter email_sfilter_add = Constants._ChangeTypeCode( 'email_sfilter', 'add', 'add sfilter for %(subject)s', ('level=%(int:level)', 'action=%(int:action)')) email_sfilter_mod = Constants._ChangeTypeCode( 'email_sfilter', 'modify', 'modify sfilter for %(subject)s', ('level=%(int:level)', 'action=%(int:action)')) # email virus scan email_scan_add = Constants._ChangeTypeCode( 'email_scan', 'add', 'add scan for %(subject)s', ('found=%(int:found)', 'removed=%(int:removed)', 'enable=%(int:enable)')) email_scan_mod = Constants._ChangeTypeCode('email_scan', 'modify', 'modify scan for %(subject)s') # email forward (subject here is an email_target) email_forward_add = Constants._ChangeTypeCode( 'email_forward', 'add', 'add forward for %(subject)s', ('forward=%(string:forward)s', 'enable=%(bool:enable)s')) email_forward_rem = Constants._ChangeTypeCode( 'email_forward', 'remove', 'remove forward for %(subject)s', ('forward=%(string:forward)s', )) email_forward_enable = Constants._ChangeTypeCode( 'email_forward', 'enable', 'enable forward for %(subject)s', ('forward=%(string:forward)s', 'cat=%(int:cat)s')) email_forward_disable = Constants._ChangeTypeCode( 'email_forward', 'disable', 'disable forward for %(subject)s', ('forward=%(string:forward)s', 'cat=%(int:cat)s')) # Local delivery of email forwards email_local_delivery = Constants._ChangeTypeCode( 'email_forward_local_delivery', 'set', 'modify local delivery for subject %(subject)s', ('enabled=%(string:enabled)s', )) # email primary address target (subject here is an email_target) email_primary_address_add = Constants._ChangeTypeCode( 'email_primary_address', 'add', 'add primary address for %(subject)s', 'primary=%(int:addr_id)') email_primary_address_rem = Constants._ChangeTypeCode( 'email_primary_address', 'remove', 'remove primary address for %(subject)s', 'primary=%(int:addr_id)') email_primary_address_mod = Constants._ChangeTypeCode( 'email_primary_address', 'modify', 'modify primary address for %(subject)s', 'primary=%(int:addr_id)') # email server (subject here is an e-mail server) email_server_add = Constants._ChangeTypeCode( 'email_server', 'add', 'add email server %(subject)s', 'type=%(int:server_type)') email_server_rem = Constants._ChangeTypeCode( 'email_server', 'remove', 'remove email server %(subject)s', 'type=%(int:server_type)') email_server_mod = Constants._ChangeTypeCode( 'email_server', 'modify', 'modify email server %(subject)s', 'type=%(int:server_type)')
class Constants(cereconst.Constants): """ Common DNS module constants. """ # TODO: move these to Cerebrum/modules/bofhd/utils.py? auth_dns_superuser = _AuthRoleOpCode('dns_superuser', 'Perform any DNS command') auth_dns_lita = _AuthRoleOpCode('dns_lita', 'Perform LITA-level DNS commands') # # DNS Entities # entity_dns_cname = cereconst._EntityTypeCode( 'cname', 'cname - see table "cerebrum.cname_info" and friends.') entity_dns_host = cereconst._EntityTypeCode( # name-clash with existing entity_type 'dns_host', 'dns_host - see table "cerebrum.dns_host_info" and friends.') entity_dns_a_record = cereconst._EntityTypeCode( 'a_record', 'a_record - see table "cerebrum.a_record_info" and friends.') entity_dns_aaaa_record = cereconst._EntityTypeCode( 'aaaa_record', 'aaaa_record - see table "cerebrum.aaaa_record_info" and friends.') entity_dns_owner = cereconst._EntityTypeCode( 'dns_owner', 'dns_owner - see table "cerebrum.dns_owner" and friends.') entity_dns_ip_number = cereconst._EntityTypeCode( 'dns_ip_number', 'dns_ip_number - see table "cerebrum.dns_ip_number" and friends.') entity_dns_ipv6_number = cereconst._EntityTypeCode( 'dns_ipv6_number', 'dns_ipv6_number - see table "cerebrum.dns_ipv6_number" and friends.') entity_dns_subnet = cereconst._EntityTypeCode( 'dns_subnet', 'dns_subnet - see table "cerebrum.dns_subnet" and friends.') entity_dns_ipv6_subnet = cereconst._EntityTypeCode( 'dns_ipv6_subnet', 'dns_ipv6_subnet - see table "cerebrum.dns_ipv6_subnet" and friends.') # # Namespace for DNS names # dns_owner_namespace = cereconst._ValueDomainCode('dns_owner_ns', 'Domain for dns_owners') # # NIS host group? # spread_uio_machine_netgroup = cereconst._SpreadCode( 'NIS_mng@uio', cereconst.Constants.entity_group, 'Machine netgroup in NIS domain "uio"') field_type_txt = _FieldTypeCode('TXT', 'TXT Record') # # Traits # trait_dns_contact = _EntityTraitCode( 'dns_contact', entity_dns_owner, """Contact information (e-mail address) for the host.""") trait_dns_comment = _EntityTraitCode( 'dns_comment', entity_dns_owner, """A freeform comment about the host.""") # # Default DNS zone # other_zone = _DnsZoneCode("other", None) FieldTypeCode = _FieldTypeCode DnsZone = _DnsZoneCode
class Constants(CereConst.Constants): # Entity type entity_feide_service = CereConst._EntityTypeCode('feide_service', 'Feide service')
class CLConstants(Constants.CLConstants): ea_policy = Constants._ChangeTypeCode('exchange_ea_policy', 'set', 'Address book policy changed')
class CLConstants(cereconst.CLConstants): """ChangeLog constants for Exchange.""" # TODO: Clean up these codes! Some are unused, some are a bit wrongly named # exchange-relatert-jazz # # changelog variables used by the EventHandler to register # when events are handled by the recieving system # # Account mailbox created/deleted acc_mbox_create = cereconst._ChangeTypeCode('exchange_acc_mbox', 'create', 'account mailbox added') acc_mbox_delete = cereconst._ChangeTypeCode('exchange_acc_mbox', 'delete', 'account mailbox deleted') # Account mailbox created/deleted shared_mbox_create = cereconst._ChangeTypeCode('exchange_shared_mbox', 'create', 'shared mailbox added') shared_mbox_delete = cereconst._ChangeTypeCode('exchange_shared_mbox', 'delete', 'shared mailbox deleted') # Account add/remove an address acc_addr_add = cereconst._ChangeTypeCode('exchange_acc_addr', 'add', 'account address added') acc_addr_rem = cereconst._ChangeTypeCode('exchange_acc_addr', 'remove', 'account address removed') # Account change primary address acc_primaddr = cereconst._ChangeTypeCode('exchange_acc_primaddr', 'set', 'account primary changed') # Setting of local delivery acc_local_delivery = cereconst._ChangeTypeCode( 'exchange_local_delivery', 'set', 'local delivery setting changed', ('enabled = %(string:enabled)s', )) # Electronic reservation registered pers_reservation = cereconst._ChangeTypeCode( 'exchange_per_e_reserv', 'set', 'address book visibility changed', ('visible = %(string:visible)s', )) # register when a distribution group has been created or removed # should probably log and show more data about groups dl_group_create = cereconst._ChangeTypeCode( 'dlgroup', 'create', 'group create distribution %(subject)s') dl_group_modify = cereconst._ChangeTypeCode( 'dlgroup', 'modify', 'group modify distribution %(subject)s') dl_group_remove = cereconst._ChangeTypeCode( 'dlgroup', 'delete', 'group remove distribution %(subject)s') dl_group_add = cereconst._ChangeTypeCode( 'dlgroup_member', 'add', 'added %(dest)s to %(subject)s', ('AlreadyPerformed=%(string:AlreadyPerformed)s', )) dl_group_rem = cereconst._ChangeTypeCode( 'dlgroup_member', 'remove', 'removed %(dest)s from %(subject)s') dl_group_primary = cereconst._ChangeTypeCode( 'dlgroup_primary', 'set', 'group set primary for %(subject)s') dl_group_addaddr = cereconst._ChangeTypeCode( 'dlgroup_addr', 'add', 'group add address for %(subject)s') dl_group_remaddr = cereconst._ChangeTypeCode( 'dlgroup_addr', 'remove', 'group remove address for %(subject)s') dl_roomlist_create = cereconst._ChangeTypeCode( 'dlgroup_room', 'create', 'group create roomlist %(subject)s') dl_group_hidden = cereconst._ChangeTypeCode( 'dlgroup_hidden', 'modify', 'group mod hidden for %(subject)s', 'hidden:%(string:hidden)') dl_group_manby = cereconst._ChangeTypeCode( 'dlgroup_manager', 'set', 'group mod managed by for %(subject)s', 'manby:%(str:manby)') dl_group_room = cereconst._ChangeTypeCode( 'dlgroup_room', 'modify', 'group mod room stat for %(subject)s', 'roomlist:%(str:roomlist)') # deferred events exchange_group_add = cereconst._ChangeTypeCode( 'exchange_group_member', 'add', 'deferred addition of group member') exchange_group_rem = cereconst._ChangeTypeCode( 'exchange_group_member', 'remove', 'deferred removal of group member')
class CLConstants(cereconst.CLConstants): a_record_add = cereconst._ChangeTypeCode( 'host_a_rec', 'add', 'add a-record %(subject)s -> %(dest)s') a_record_del = cereconst._ChangeTypeCode( 'host_a_rec', 'remove', 'del a-record %(subject)s -> %(dest)s') a_record_update = cereconst._ChangeTypeCode( 'host_a_rec', 'modify', 'update a-record %(subject)s -> %(dest)s') aaaa_record_add = cereconst._ChangeTypeCode( 'host_aaaa_rec', 'add', 'add aaaa-record %(subject)s -> %(dest)s') aaaa_record_del = cereconst._ChangeTypeCode( 'host_aaaa_rec', 'remove', 'del aaaa-record %(subject)s -> %(dest)s') aaaa_record_update = cereconst._ChangeTypeCode( 'host_aaaa_rec', 'modify', 'update aaaa-record %(subject)s -> %(dest)s') cname_add = cereconst._ChangeTypeCode('host_cname', 'add', 'add cname %(subject)s -> %(dest)s') cname_del = cereconst._ChangeTypeCode('host_cname', 'remove', 'del cname %(subject)s -> %(dest)s') cname_update = cereconst._ChangeTypeCode( 'host_cname', 'modify', 'update cname %(subject)s -> %(dest)s') dns_owner_add = cereconst._ChangeTypeCode('host_dns_owner', 'add', 'add dns-owner %(subject)s') dns_owner_update = cereconst._ChangeTypeCode( 'host_dns_owner', 'modify', 'update dns-owner %(subject)s') dns_owner_del = cereconst._ChangeTypeCode('host_dns_owner', 'remove', 'del dns-owner %(subject)s') general_dns_record_add = cereconst._ChangeTypeCode( 'host_gen_dns_rec', 'add', 'add record for %(subject)s', ('%(int:field_type)s=%(string:data)s', )) general_dns_record_del = cereconst._ChangeTypeCode( 'host_gen_dns_rec', 'remove', 'del record for %(subject)s', ('type=%(int:field_type)s', )) general_dns_record_update = cereconst._ChangeTypeCode( 'host_gen_dns_rec', 'modify', 'update record for %(subject)s', ('%(int:field_type)s=%(string:data)s', )) host_info_add = cereconst._ChangeTypeCode('host_info', 'add', 'add %(subject)s', ('hinfo=%(string:hinfo)s', )) host_info_update = cereconst._ChangeTypeCode('host_info', 'modify', 'update %(subject)s', ('hinfo=%(string:hinfo)s', )) host_info_del = cereconst._ChangeTypeCode('host_info', 'remove', 'del %(subject)s') ip_number_add = cereconst._ChangeTypeCode('host_ip_number', 'add', 'add %(subject)s', ('a_ip=%(string:a_ip)s', )) ip_number_update = cereconst._ChangeTypeCode('host_ip_number', 'modify', 'update %(subject)s', ('a_ip=%(string:a_ip)s', )) ip_number_del = cereconst._ChangeTypeCode('host_ip_number', 'remove', 'del %(subject)s') ipv6_number_add = cereconst._ChangeTypeCode( 'host_ipv6_number', 'add', 'add %(subject)s', ('aaaaaaa_ip=%(string:aaaa_ip)s', )) ipv6_number_update = cereconst._ChangeTypeCode( 'host_ipv6_number', 'modify', 'update %(subject)s', ('aaaaaaa_ip=%(string:aaaa_ip)s', )) ipv6_number_del = cereconst._ChangeTypeCode('host_ipv6_number', 'remove', 'del %(subject)s') mac_adr_set = cereconst._ChangeTypeCode('host_mac_adr', 'set', 'set %(subject)s', ('mac_adr=%(string:mac_adr)s', )) rev_override_add = cereconst._ChangeTypeCode( 'host_rev_ovr', 'add', 'add rev-override %(subject)s -> %(dest)s') rev_override_del = cereconst._ChangeTypeCode( 'host_rev_ovr', 'remove', 'del rev-override for %(subject)s') rev_override_update = cereconst._ChangeTypeCode( 'host_rev_ovr', 'modify', 'update rev-override %(subject)s -> %(dest)s') subnet_create = cereconst._ChangeTypeCode('subnet', 'create', 'create subnet %(subject)s') subnet_mod = cereconst._ChangeTypeCode('subnet', 'modify', 'modify subnet %(subject)s') subnet_delete = cereconst._ChangeTypeCode('subnet', 'delete', 'delete subnet %(subject)s') subnet6_create = cereconst._ChangeTypeCode( 'subnet6', 'create', 'create IPv6 subnet %(subject)s') subnet6_mod = cereconst._ChangeTypeCode('subnet6', 'modify', 'modify IPv6 subnet %(subject)s') subnet6_delete = cereconst._ChangeTypeCode( 'subnet6', 'delete', 'delete IPv6 subnet %(subject)s') srv_record_add = cereconst._ChangeTypeCode( 'host_srv_rec', 'add', 'add srv-record %(subject)s -> %(dest)s') srv_record_del = cereconst._ChangeTypeCode( 'host_srv_rec', 'remove', 'del srv-record %(subject)s -> %(dest)s')
class Constants(Constants.Constants): # # External Identifiers # externalid_sys_x_id = _EntityExternalIdCode( 'SYS_X_ID', Constants.Constants.entity_person, 'Internal sys_x identifier') externalid_paga_ansattnr = _EntityExternalIdCode( 'PAGA_ANSATTNR', Constants.Constants.entity_person, 'Internal PAGA identifier') externalid_hifm_ansattnr = _EntityExternalIdCode( 'HIFM_ANSATTNR', Constants.Constants.entity_person, 'Internal HIFM identifier') externalid_sito_ansattnr = _EntityExternalIdCode( 'SITO_ANSATTNR', Constants.Constants.entity_person, 'Internal SITO identifier') externalid_sito_ou = _EntityExternalIdCode('SITO_OU', Constants.Constants.entity_ou, 'internal sito ou identifier') # # Authoritative systems # system_hifm = _AuthoritativeSystemCode('HIFM', 'Høgskolen i Alta') system_hitos = _AuthoritativeSystemCode('HITOS', 'Høgskolen i Tromsø') system_x = _AuthoritativeSystemCode('SYS_X', 'Manuelt personal system') system_tlf = _AuthoritativeSystemCode('TLF', 'Telefoni system') system_sysacc = _AuthoritativeSystemCode('SYSACC', 'System Accounts') system_paga = _AuthoritativeSystemCode('PAGA', 'PAGA') system_sito = _AuthoritativeSystemCode('SITO', 'SITO') system_flyt = _AuthoritativeSystemCode('FLYT', 'FLYT') system_fs_derived = _AuthoritativeSystemCode('FS-auto', 'Utledet av FS data') system_kr_reg = _AuthoritativeSystemCode( 'KR_REG', 'Kontakt- og reservasjonsregisteret') system_intern_ice = _AuthoritativeSystemCode( 'INTERN_ICE', 'Internal (uit) source for ICE number') # # Account codes # account_test = _AccountCode('T', 'Testkonto') account_felles_drift = _AccountCode('FD', 'Felles Drift') account_felles_intern = _AccountCode('FI', 'Felles Intern') account_kurs = _AccountCode('K', 'Kurs') account_forening = _AccountCode('F', 'Forening') account_maskin = _AccountCode('M', 'Maskin') account_prosess = _AccountCode('P', 'Prosess') account_uit_guest = _AccountCode('gjestebruker_uit', 'Manuell gjestekonto') # # Contact codes # contact_workphone2 = _ContactInfoCode('PHONE_WORK_2', 'Secondary Work Phone') contact_room = _ContactInfoCode('ROOM@UIT', 'Location and room number') contact_building = _ContactInfoCode('BYGG@UIT', 'Building name') contact_sito_mobile = _ContactInfoCode('PHONE_SITO', 'sito employee phone') contact_uit_mobile = _ContactInfoCode('PHONE_UIT', 'uit employee phone') contact_ice_phone = _ContactInfoCode('ICE_PHONE', 'Phone number for alerts (varsler)') # # Address codes # address_location = _AddressCode('Lokasjon', 'Campus') # # OU Structure perspective # perspective_sito = _OUPerspectiveCode('SITO', 'SITO') # # Affiliations # # Employee affiliations affiliation_ansatt_sito = _PersonAffiliationCode( 'SITO', 'Ansatt ved studentsamskipnaden i tromso') affiliation_ansatt = _PersonAffiliationCode('ANSATT', 'Ansatt ved UiT (i følge LT)') affiliation_flyt_ansatt_hih = _PersonAffiliationCode( 'ANSATT_HIH', 'Ansatt ved HiH') affiliation_flyt_student_hih = _PersonAffiliationCode( 'STUDENT_HIH', 'Student ved HiH') # Affiliation status affiliation_status_flyt_hih_ansatt_faculty = _PersonAffStatusCode( affiliation_ansatt, 'Ansatt HiH', 'Vitenskapelig') affiliation_status_flyt_hih_ansatt_tekadm = _PersonAffStatusCode( affiliation_ansatt, 'ansatt HiH', 'Teknisk/administrativt') affiliation_status_flyt_hin_ansatt_faculty = _PersonAffStatusCode( affiliation_ansatt, 'Ansatt HiN', 'Vitenskapelig') affiliation_status_flyt_hin_ansatt_tekadm = _PersonAffStatusCode( affiliation_ansatt, 'ansatt HiN', 'Teknisk/administrativt') affiliation_status_timelonnet_fast = _PersonAffStatusCode( affiliation_ansatt, 'Timelonnet fast', 'Fast ansatt på timelønn') affiliation_status_timelonnet_midlertidig = _PersonAffStatusCode( affiliation_ansatt, 'Timelonnet midl', 'Midlertidig ansatt på timelønn') affiliation_status_ansatt_perm = _PersonAffStatusCode( affiliation_ansatt, 'permisjon', 'Ansatt, for tiden i permisjon') affiliation_status_flyt_ansatt_hifm = _PersonAffStatusCode( affiliation_ansatt, 'ansatt HIFm', 'Ansatte fra Høyskolen i Alta') affiliation_status_ansatt_sito = _PersonAffStatusCode( affiliation_ansatt_sito, 'sito', 'Ansatt') affiliation_status_ansatt_sys_x = _PersonAffStatusCode( affiliation_ansatt, 'sys_x-ansatt', 'Manuelt gitt tilgang til AD (bør nyanseres)') # Student affiliations affiliation_student = _PersonAffiliationCode( 'STUDENT', 'Student ved UiT (i følge FS)') affiliation_status_flyt_hih_student_aktiv = _PersonAffStatusCode( affiliation_student, 'student HiH', 'Aktiv student') affiliation_status_flyt_student_hifm = _PersonAffStatusCode( affiliation_student, 'student HIFm', 'Student fra Høyskolen i Alta') affiliation_status_flyt_hin_student_aktiv = _PersonAffStatusCode( affiliation_student, 'student HiN', 'Aktiv student') affiliation_status_student_soker = _PersonAffStatusCode( affiliation_student, 'soker', 'Registrert med søknad i FS') affiliation_status_student_sys_x = _PersonAffStatusCode( affiliation_student, 'sys_x-student', 'Student Manuelt gitt tilgang til AD') affiliation_status_student_tilbud = _PersonAffStatusCode( affiliation_student, 'tilbud', 'Har fått tilbud om opptak') affiliation_status_student_opptak = _PersonAffStatusCode( affiliation_student, 'opptak', 'Har studierett ved studieprogram') affiliation_status_student_ny = Constants._PersonAffStatusCode( affiliation_student, 'ny', 'Registrert med ny, gyldig studierett i FS') affiliation_status_student_perm = _PersonAffStatusCode( affiliation_student, 'permisjon', 'Har gyldig permisjonstatus i FS') affiliation_status_student_alumni = _PersonAffStatusCode( affiliation_student, 'alumni', 'Har fullført studieprogram i FS') affiliation_status_student_drgrad = _PersonAffStatusCode( affiliation_student, 'drgrad', 'Registrert student på doktorgrad') affiliation_status_student_emnestud = _PersonAffStatusCode( affiliation_student, 'emnestud', 'Registrert som aktiv emnestudent i FS') # Tilknyttet affiliation affiliation_tilknyttet = _PersonAffiliationCode( 'TILKNYTTET', 'Tilknyttet UiT uten å være student eller ansatt') affiliation_tilknyttet_fagperson = _PersonAffStatusCode( affiliation_tilknyttet, 'fagperson', 'Registrert som fagperson i FS') affiliation_tilknyttet_emeritus = _PersonAffStatusCode( affiliation_tilknyttet, 'emeritus', 'Registrert i LT med gjestetypekode EMERITUS') affiliation_tilknyttet_ekst_stip = _PersonAffStatusCode( affiliation_tilknyttet, 'ekst_stip', 'Personer registrert i LT med gjestetypekode=EF-STIP') # Manual affiliation affiliation_manuell = _PersonAffiliationCode( 'MANUELL', 'Tilknyttet enheter/instutusjoner som UiT har avtale med') affiliation_manuell_alumni = _PersonAffStatusCode( affiliation_manuell, 'alumni', 'Uteksaminerte studenter') affiliation_manuell_sito = _PersonAffStatusCode( affiliation_manuell, 'sito', 'Manuelt registrert Sito ansatt') affiliation_manuell_gjest_u_konto = _PersonAffStatusCode( affiliation_manuell, 'gjest_u_konto', 'gjest uten konto') affiliation_manuell_unn = _PersonAffStatusCode( affiliation_manuell, 'UNN', 'Universitets sykheuset i Nord Norge') affiliation_manuell_gjest = _PersonAffStatusCode(affiliation_manuell, 'gjest', 'Gjest') affiliation_manuell_utdanning_no = _PersonAffStatusCode( affiliation_manuell, 'utdanning_no', 'Utdanning.no') affiliation_manuell_akademisk_kvarter = _PersonAffStatusCode( affiliation_manuell, 'akademisk_kvart', 'Akademisk Kvarter') affiliation_manuell_norges_universitetet = _PersonAffStatusCode( affiliation_manuell, 'norges_universi', 'Norgesuniversitetet') affiliation_manuell_kirkutdnor = _PersonAffStatusCode( affiliation_manuell, 'kirkutdnor', 'Kirkelig Utdanningssenter Nord-Norge') affiliation_manuell_gjesteforsker = _PersonAffStatusCode( affiliation_manuell, 'gjesteforsker', 'Gjesteforsker (under utfasing)') affiliation_manuell_konsulent = _PersonAffStatusCode( affiliation_manuell, 'konsulent', 'Konsulent (under utfasing)') affiliation_status_gjest_u_account = _PersonAffStatusCode( affiliation_manuell, 'gjest_u_konto', 'Gjest uten konto') # Non-personal affiliation affiliation_upersonlig = _PersonAffiliationCode( 'UPERSONLIG', 'Fellesbrukere, samt andre brukere uten eier') affiliation_upersonlig_felles = _PersonAffStatusCode( affiliation_upersonlig, 'felles', 'Felleskonti') affiliation_upersonlig_kurs = _PersonAffStatusCode(affiliation_upersonlig, 'kurs', 'Kurskonti') affiliation_upersonlig_pvare = _PersonAffStatusCode( affiliation_upersonlig, 'pvare', 'Programvarekonti') affiliation_upersonlig_term_maskin = _PersonAffStatusCode( affiliation_upersonlig, 'term_maskin', 'Terminalstuemaskin') affiliation_upersonlig_bib_felles = _PersonAffStatusCode( affiliation_upersonlig, 'bib_felles', 'Bibliotek felles') # # Shells # # Override of the default shell paths. # NOTE: this file should be before PosixUser in cereconf.CLASS_CONSTANTS # TODO: Shell path mapping should be configuration, not db-constants. # posix_shell_bash = _PosixShellCode('bash', '/bin/bash') posix_shell_csh = _PosixShellCode('csh', '/bin/csh') posix_shell_false = _PosixShellCode('false', '/bin/false') posix_shell_nologin = _PosixShellCode('nologin', '/local/etc/nologin') posix_shell_sh = _PosixShellCode('sh', '/bin/sh') posix_shell_zsh = _PosixShellCode('zsh', '/local/bin/zsh') # # Spreads # spread_uit_fronter = _SpreadCode('fronter@uit', Constants.Constants.entity_group, 'fronter user') spread_uit_fronter_account = _SpreadCode( 'fronter_acc@uit', Constants.Constants.entity_account, 'fronter account') spread_uit_evu = _SpreadCode('evu@uit', Constants.Constants.entity_account, 'evu person') spread_uit_cristin = _SpreadCode('cristin@uit', Constants.Constants.entity_account, 'Accounts with CRISTIN spread') # spread for ldap guests spread_uit_ldap_guest = _SpreadCode( 'guest@ldap', Constants.Constants.entity_account, 'LDAP/RADIUS spread for wireless accounts') # spread for ldap system accounts spread_uit_ldap_system = _SpreadCode( 'system@ldap', Constants.Constants.entity_account, 'account included in system tree on ldap') # spread for ldap people accounts spread_uit_ldap_people = _SpreadCode( 'people@ldap', Constants.Constants.entity_account, 'account included in people tree on ldap') # spread for securimaster export spread_uit_securimaster = _SpreadCode( 'securimaster', Constants.Constants.entity_account, 'account to be exported to securimaster') # spread for portal export spread_uit_portal = _SpreadCode('portal export', Constants.Constants.entity_account, 'account to be exported to the portal') # spread for paga export - account uit should be exported to paga spread_uit_paga = _SpreadCode('paga export', Constants.Constants.entity_account, 'account to have its uid exported to paga') # spread for fs export - account should have email and uid exported to FS spread_uit_fs = _SpreadCode( 'fs export', Constants.Constants.entity_account, 'account to have its uid and email exported to fs') spread_uit_ad_account = _SpreadCode( 'AD_account', Constants.Constants.entity_account, 'account included in Active Directory') spread_uit_ad_group = _SpreadCode('AD_group', Constants.Constants.entity_group, 'group included in Active Directory') spread_uit_ad_lit_admingroup = _SpreadCode( 'AD_group_litadmn', Constants.Constants.entity_group, 'AD admingroup for local IT') # Spreads for Exchange spread_uit_exchange = _SpreadCode('exchange_mailbox', Constants.Constants.entity_account, 'Accounts with exchange mailbox') # sito spread spread_sito = _SpreadCode('SITO', Constants.Constants.entity_account, 'Accounts generated for sito users') spread_fronter_dotcom = _SpreadCode( '*****@*****.**', Constants.Constants.entity_group, 'Group representing a course that should be exported to the ' 'ClassFronter instance on fronter.com. Should only be given to ' 'groups that have been automatically generated from FS.') spread_ephorte_person = _SpreadCode('ePhorte_person', Constants.Constants.entity_person, 'Person included in ePhorte export') # # Email # email_server_type_exchange_imap = _EmailServerTypeCode( 'exchange_imap', "Server is an Exchange server") # # Quarantines # quarantine_ou_notvalid = _QuarantineCode( 'ou_notvalid', 'OU not valid from external source') quarantine_auto_emailonly = _QuarantineCode( 'auto_kunepost', 'Ikke ordin<E6>r student, tilgang til bare e-post') quarantine_auto_inaktiv = _QuarantineCode('auto_inaktiv', 'Ikke aktiv student, utestengt') quarantine_tilbud = _QuarantineCode( 'Tilbud', "Pre-generert konto til studenter som har fått studietilbud," "men som ikke har aktivert kontoen.") quarantine_sys_x_approved = _QuarantineCode( 'sys-x_approved', 'Konto fra system-x som ikke er godkjent') quarantine_generell = _QuarantineCode('generell', 'Generell splatt') quarantine_system = _QuarantineCode( 'system', 'Systembrukar som ikke skal logge inn') quarantine_permisjon = _QuarantineCode('permisjon', 'Brukeren har permisjon') quarantine_svakt_passord = _QuarantineCode('svakt_passord', 'For dårlig passord') quarantine_autopassord = _QuarantineCode( 'autopassord', 'Passord ikke skiftet trass pålegg') quarantine_sut_disk_usage = _QuarantineCode('sut_disk', "Bruker for mye disk på sut") # # Auth codes # auth_type_md5_crypt_hex = _AuthenticationCode( 'MD5-crypt2', "MD5-derived 32 bit password non unix style, no salt") auth_type_md5_b64 = _AuthenticationCode( 'MD5-crypt_base64', "MD5-derived 32 bit password base 64 encoded") # # Traits # trait_sito_registrar_notified = _EntityTraitCode( 'sito_req_mailed', Constants.Constants.entity_account, "Trait set on account when sito processing is done") trait_sito_user_notified = _EntityTraitCode( 'sito_user_mailed', Constants.Constants.entity_account, "Trait set on account after account created mail is sent to user") trait_sysx_registrar_notified = _EntityTraitCode( 'sysx_reg_mailed', Constants.Constants.entity_account, "Trait set on account when systemx processing is done") trait_sysx_user_notified = _EntityTraitCode( 'sysx_user_mailed', Constants.Constants.entity_account, "Trait set on account after account created mail is sent to user") trait_primary_aff = _EntityTraitCode( "primary_aff", Constants.Constants.entity_person, "A person's chosen primary affiliation," " for use at the web presentations") trait_sysx_registrar_notified = _EntityTraitCode( 'sysx_reg_mailed', Constants.Constants.entity_account, "Trait set on account when systemx processing is done") trait_sysx_user_notified = _EntityTraitCode( 'sysx_user_mailed', Constants.Constants.entity_account, "Trait set on account after account created mail is sent to user") trait_nsd_unit_code = _EntityTraitCode( 'nsd_unit_code', Constants.Constants.entity_ou, 'NSD unit code (Avdelingskode) to use for this OU')
class EmailConstants(Constants.Constants): # TODO: Clean up these constants! And do it in a way that lets # us import system specific constants EmailTarget = _EmailTargetCode EmailDomainCategory = _EmailDomainCategoryCode EmailServerType = _EmailServerTypeCode EmailSpamLevel = _EmailSpamLevelCode EmailSpamAction = _EmailSpamActionCode EmailTargetFilter = _EmailTargetFilterCode EmailVirusFound = _EmailVirusFoundCode EmailVirusRemoved = _EmailVirusRemovedCode entity_email_domain = Constants._EntityTypeCode( 'email_domain', 'Email domain - see table "cerebrum.email_domain" and friends.') entity_email_address = Constants._EntityTypeCode( 'email_address', 'Email address - see table "cerebrum.email_address" and friends.') entity_email_target = Constants._EntityTypeCode( 'email_target', 'Email target - see table "cerebrum.email_target" and friends.') email_domain_category_noexport = _EmailDomainCategoryCode( 'noexport', 'Addresses in these domains can be defined, but are not' ' exported to the mail system. This is useful for' ' pre-defining addresses prior to taking over a new' ' maildomain.') email_domain_category_cnaddr = _EmailDomainCategoryCode( 'cnaddr', "Primary user addresses in these domains will be based on the" " owner's full common name, and not just e.g. the username.") email_domain_category_uidaddr = _EmailDomainCategoryCode( 'uidaddr', 'Primary user addresses in these domains will be in the format' 'username@domain.') email_domain_category_include_all_uids = _EmailDomainCategoryCode( 'all_uids', 'All account email targets should get a valid address in this domain,' ' on the form <accountname@domain>.') email_target_account = _EmailTargetCode( 'account', "Target is the local delivery defined for the PosixUser whose" " account_id == email_target.using_uid.") # exchange-related-jazz email_target_dl_group = _EmailTargetCode( 'group', "Target is the Exchange - local delivery defined for" " the DistributionGroup with" " group_id == email_target.using_uid.") email_target_deleted = _EmailTargetCode( 'deleted', "Target type for addresses that are no longer working, but" " for which it is useful to include a short custom text in" " the error message returned to the sender. The text" " is taken from email_target.alias_value") email_target_forward = _EmailTargetCode( 'forward', "Target is a pure forwarding mechanism; local deliveries will" " only occur as indirect deliveries to the addresses forwarded" " to. Both email_target.target_entity_id, email_target.using_uid and" " email_target.alias_value should be NULL, as they are ignored." " The email address(es) to forward to is taken from table" " email_forward.") email_target_file = _EmailTargetCode( 'file', "Target is a file. The absolute path of the file is gathered" " from email_target.alias_value. Iff email_target.using_uid" " is set, deliveries to this target will be run as that" " PosixUser.") email_target_pipe = _EmailTargetCode( 'pipe', "Target is a shell pipe. The command (and args) to pipe mail" " into is gathered from email_target.alias_value. Iff" " email_target.using_uid is set, deliveries to this target" " will be run as that PosixUser.") email_target_RT = _EmailTargetCode( 'RT', "Target is a RT queue. The command (and args) to pipe mail" " into is gathered from email_target.alias_value. Iff" " email_target.using_uid is set, deliveries to this target" " will be run as that PosixUser.") email_target_Sympa = _EmailTargetCode( 'Sympa', "Target is a Sympa mailing list. The command (and args) to" " pipe mail into is gathered from email_target.alias_value." " Iff email_target.using_uid is set, deliveries to this target" " will be run as that PosixUser.") email_target_multi = _EmailTargetCode( 'multi', "Target is the set of `account`-type targets corresponding to" " the Accounts that are first-level members of the Group that" " has group_id == email_target.target_entity_id.") email_server_type_nfsmbox = _EmailServerTypeCode( 'nfsmbox', "Server delivers mail as mbox-style mailboxes over NFS.") email_server_type_cyrus = _EmailServerTypeCode( 'cyrus_IMAP', "Server is a Cyrus IMAP server, which keeps mailboxes in a " "Cyrus-specific format.") email_server_type_sympa = _EmailServerTypeCode( 'sympa', "Server is a Sympa mailing list server.") email_server_type_exchange = _EmailServerTypeCode('exchange', "Exchange server.") email_target_filter_greylist = _EmailTargetFilterCode( 'greylist', "Delay messages from unknown servers") email_target_filter_uioonly = _EmailTargetFilterCode( 'uioonly', "Only accept the use of an UiO address as sender address" " on the UiO network, or when using authenticated SMTP") email_target_filter_internalonly = _EmailTargetFilterCode( 'internalonly', "Only route internal mail. External mail is rejected")
class Constants(Constants.Constants): # # Bofhd Auth # auth_set_password_important = _AuthRoleOpCode( 'set_password_imp', 'Set password for important/critical accounts') # # Authoritative systems/source systems # system_lt = Constants._AuthoritativeSystemCode('LT', 'LT') system_ureg = Constants._AuthoritativeSystemCode( 'Ureg', 'Migrerte data, utdatert') system_fs_derived = Constants._AuthoritativeSystemCode( 'FS-auto', 'Utledet av FS data') system_folk_uio_no = Constants._AuthoritativeSystemCode( 'folk.uio.no', 'http://folk.uio.no/') # # OU perspectives # perspective_lt = Constants._OUPerspectiveCode('LT', 'LT') account_test = Constants._AccountCode('testbruker', 'Testkonto') account_kurs = Constants._AccountCode('kursbruker', 'Kurskonto') account_uio_guest = Constants._AccountCode('gjestebruker_uio', 'Manuell gjestekonto') # # Affiliation ANSATT # affiliation_ansatt = Constants._PersonAffiliationCode( 'ANSATT', 'Registrert som aktiv ansatt ved UiO') affiliation_status_ansatt_vit = Constants._PersonAffStatusCode( affiliation_ansatt, 'vitenskapelig', 'Vitenskapelig ansatt') affiliation_status_ansatt_bil = Constants._PersonAffStatusCode( affiliation_ansatt, 'bilag', 'Bilagslønnet') affiliation_status_ansatt_tekadm = Constants._PersonAffStatusCode( affiliation_ansatt, 'tekadm', 'Teknisk/administrativt ansatt') affiliation_status_ansatt_perm = Constants._PersonAffStatusCode( affiliation_ansatt, 'permisjon', 'Ansatt, for tiden i permisjon') # # Affiliation STUDENT # affiliation_student = Constants._PersonAffiliationCode( 'STUDENT', 'Student ved UiO, registrert i FS') affiliation_status_student_soker = Constants._PersonAffStatusCode( affiliation_student, 'soker', 'Registrert med søknad i FS') affiliation_status_student_tilbud = Constants._PersonAffStatusCode( affiliation_student, 'tilbud', 'Registrert tilbud om opptak i FS') affiliation_status_student_opptak = Constants._PersonAffStatusCode( affiliation_student, 'opptak', 'Registrert med gyldig studierett i FS ') affiliation_status_student_ny = Constants._PersonAffStatusCode( affiliation_student, 'ny', 'Registrert med ny, gyldig studierett i FS') affiliation_status_student_aktiv = Constants._PersonAffStatusCode( affiliation_student, 'aktiv', 'Registrert som aktiv student i FS') affiliation_status_student_emnestud = Constants._PersonAffStatusCode( affiliation_student, 'emnestud', 'Registrert som aktiv emnestudent i FS') affiliation_status_student_drgrad = Constants._PersonAffStatusCode( affiliation_student, 'drgrad', 'Registrert som aktiv doktorgradsstudent i FS') affiliation_status_student_privatist = Constants._PersonAffStatusCode( affiliation_student, 'privatist', 'Registrert som privatist i FS') affiliation_status_student_evu = Constants._PersonAffStatusCode( affiliation_student, 'evu', 'Registrert som EVU-student i FS') affiliation_status_student_perm = Constants._PersonAffStatusCode( affiliation_student, 'permisjon', 'Registrert med gyldig permisjon i FS') affiliation_status_student_alumni = Constants._PersonAffStatusCode( affiliation_student, 'alumni', 'Har fullført studieprogram i FS') # # Affiliation TILKNYTTET # affiliation_tilknyttet = Constants._PersonAffiliationCode( 'TILKNYTTET', 'Tilknyttet UiO uten å være student eller ansatt') affiliation_tilknyttet_fagperson = Constants._PersonAffStatusCode( affiliation_tilknyttet, 'fagperson', 'Registrert som fagperson i FS') affiliation_tilknyttet_emeritus = Constants._PersonAffStatusCode( affiliation_tilknyttet, 'emeritus', 'Registrert med rolle EMERITUS i SAPUiO') affiliation_tilknyttet_bilag = Constants._PersonAffStatusCode( affiliation_tilknyttet, 'bilag', 'Registrert med rolle BILAGSLØN i SAPUiO') affiliation_tilknyttet_ekst_forsker = Constants._PersonAffStatusCode( affiliation_tilknyttet, 'ekst_forsker', 'Registrert med rolle EF-FORSKER eller SENIORFORS i SAPUiO') affiliation_tilknyttet_gjesteforsker = Constants._PersonAffStatusCode( affiliation_tilknyttet, 'gjesteforsker', 'Registrert med rolle GJ-FORSKER i SAPUiO') affiliation_tilknyttet_assosiert_person = Constants._PersonAffStatusCode( affiliation_tilknyttet, 'assosiert_person', 'Registrert med rolle ASSOSIERT i SAPUiO') affiliation_tilknyttet_frida_reg = Constants._PersonAffStatusCode( affiliation_tilknyttet, 'frida_reg', 'Registrert med rolle REGANSV og REG-ANSV i SAPUiO') affiliation_tilknyttet_ekst_stip = Constants._PersonAffStatusCode( affiliation_tilknyttet, 'ekst_stip', 'Registrert med rolle EF-STIP i SAPUiO') affiliation_tilknyttet_sivilarbeider = Constants._PersonAffStatusCode( affiliation_tilknyttet, 'sivilarbeider', 'Personer registrert i LT med gjestetypekode=SIVILARB') affiliation_tilknyttet_diverse = Constants._PersonAffStatusCode( affiliation_tilknyttet, 'diverse', 'Personer registrert i LT med gjestetypekode=IKKE ANGITT') affiliation_tilknyttet_pcvakt = Constants._PersonAffStatusCode( affiliation_tilknyttet, 'pcvakt', 'Personer registrert i LT med gjestetypekode=PCVAKT') affiliation_tilknyttet_unirand = Constants._PersonAffStatusCode( affiliation_tilknyttet, 'unirand', 'Personer registrert i LT med gjestetypekode=UNIRAND') affiliation_tilknyttet_grlaerer = Constants._PersonAffStatusCode( affiliation_tilknyttet, 'grlaerer', 'Personer registrert i LT med gjestetypekode=GRUPPELÆRER') affiliation_tilknyttet_ekst_partner = Constants._PersonAffStatusCode( affiliation_tilknyttet, 'ekst_partner', 'Personer registrert i LT med gjestetypekode=EKST. PART') affiliation_tilknyttet_studpol = Constants._PersonAffStatusCode( affiliation_tilknyttet, 'studpol', 'Personer registrert i LT' ' med gjestetypekode=ST-POL FRI eller ST-POL UTV') affiliation_tilknyttet_studorg = Constants._PersonAffStatusCode( affiliation_tilknyttet, 'studorg', 'Personer registrert i LT' ' med gjestetypekode=ST-ORG FRI eller ST-ORG UTV') affiliation_tilknyttet_innkjoper = Constants._PersonAffStatusCode( affiliation_tilknyttet, 'innkjoper', 'Registrert med rolle INNKJØPER i SAPUiO') affiliation_tilknyttet_isf = Constants._PersonAffStatusCode( affiliation_tilknyttet, 'isf', 'Person tilknyttet Institutt for samfunnsforskning') affiliation_tilknyttet_ekstern = Constants._PersonAffStatusCode( affiliation_tilknyttet, 'ekstern', 'Person tilknyttet enhet med avtale om utvidede IT-tilganger (FEIDE)') affiliation_tilknyttet_komitemedlem = Constants._PersonAffStatusCode( affiliation_tilknyttet, 'komitemedlem', 'Registrert med rolle KOMITEMEDLEM i SAPUiO ') # # Affiliation MANUELL # affiliation_manuell = Constants._PersonAffiliationCode( 'MANUELL', 'Tilknyttet enheter/institusjoner som USIT har avtale med') affiliation_manuell_alumni = Constants._PersonAffStatusCode( affiliation_manuell, 'alumni', 'Uteksaminerte studenter') affiliation_manuell_ekstern = Constants._PersonAffStatusCode( affiliation_manuell, 'ekstern', 'Person tilknyttet enhet med avtale om begrensede IT-tilganger') # # Shell settings for PosixUser # # We override the default settings for shells, thus this file # should be before PosixUser in cereconf.CLASS_CONSTANTS posix_shell_bash = _PosixShellCode('bash', '/local/gnu/bin/bash') posix_shell_csh = _PosixShellCode('csh', '/bin/csh') posix_shell_false = _PosixShellCode('false', '/bin/false') posix_shell_ksh = _PosixShellCode('ksh', '/bin/ksh') posix_shell_ma104 = _PosixShellCode('ma104', '/local/bin/ma104') posix_shell_nologin = _PosixShellCode('nologin', '/local/etc/nologin') posix_shell_nologin_autostud = _PosixShellCode( 'nologin.autostud', '/local/etc/shells/nologin.autostud') posix_shell_nologin_brk = _PosixShellCode('nologin.brk', '/local/etc/shells/nologin.brk') posix_shell_nologin_chpwd = _PosixShellCode( 'nologin.chpwd', '/local/etc/shells/nologin.chpwd') posix_shell_nologin_ftpuser = _PosixShellCode( 'nologin.ftpuser', '/local/etc/shells/nologin.ftpuser') posix_shell_nologin_nystudent = _PosixShellCode( 'nologin.nystuden', '/local/etc/shells/nologin.nystudent') posix_shell_nologin_permisjon = _PosixShellCode( 'nologin.permisjo', '/local/etc/shells/nologin.permisjon') posix_shell_nologin_pwd = _PosixShellCode('nologin.pwd', '/local/etc/shells/nologin.pwd') posix_shell_nologin_sh = _PosixShellCode('nologin.sh', '/local/etc/shells/nologin.sh') posix_shell_nologin_sluttet = _PosixShellCode( 'nologin.sluttet', '/local/etc/shells/nologin.sluttet') posix_shell_nologin_stengt = _PosixShellCode( 'nologin.stengt', '/local/etc/shells/nologin.stengt') posix_shell_nologin_teppe = _PosixShellCode( 'nologin.teppe', '/local/etc/shells/nologin.teppe') posix_shell_puberos = _PosixShellCode('puberos', '/local/bin/puberos') posix_shell_pwsh = _PosixShellCode('pwsh', '/etc/pw/sh') posix_shell_sftp_server = _PosixShellCode( 'sftp-server', '/local/openssh/libexec/sftp-server') posix_shell_sh = _PosixShellCode('sh', '/bin/sh') posix_shell_sync = _PosixShellCode('sync', '/bin/sync') posix_shell_tcsh = _PosixShellCode('tcsh', '/local/bin/tcsh') posix_shell_true = _PosixShellCode('true', '/bin/true') posix_shell_zsh = _PosixShellCode('zsh', '/local/bin/zsh') # # Spreads # spread_uio_nis_user = Constants._SpreadCode( 'NIS_user@uio', Constants.Constants.entity_account, 'User in NIS domain "uio"') spread_uio_nis_fg = Constants._SpreadCode( 'NIS_fg@uio', Constants.Constants.entity_group, 'File group in NIS domain "uio"') spread_uio_nis_ng = Constants._SpreadCode('NIS_ng@uio', Constants.Constants.entity_group, 'Net group in NIS domain "uio"') spread_ifi_nis_user = Constants._SpreadCode( 'NIS_user@ifi', Constants.Constants.entity_account, 'User in NIS domain "ifi"') spread_ifi_nis_fg = Constants._SpreadCode( 'NIS_fg@ifi', Constants.Constants.entity_group, 'File group in NIS domain "ifi"') spread_ifi_nis_ng = Constants._SpreadCode('NIS_ng@ifi', Constants.Constants.entity_group, 'Net group in NIS domain "ifi"') spread_hpc_nis_user = Constants._SpreadCode( 'NIS_user@hpc', Constants.Constants.entity_account, 'User in NIS domain, exported to HPC') spread_hpc_nis_fg = Constants._SpreadCode( 'NIS_fg@hpc', Constants.Constants.entity_group, 'File group in NIS domain "uio" exported to HPC') spread_isf_ldap_person = Constants._SpreadCode( 'LDAP_isf_person', Constants.Constants.entity_person, 'Person included in ISF-s LDAP directory') spread_uio_ldap_ou = Constants._SpreadCode( 'LDAP_OU', Constants.Constants.entity_ou, 'OU included in LDAP directory') spread_uio_ldap_account = Constants._SpreadCode( 'LDAP_account', Constants.Constants.entity_account, 'Account included the LDAP directory') spread_uio_org_ou = Constants._SpreadCode( 'ORG_OU', Constants.Constants.entity_ou, 'OU defined as part of UiOs org.structure proper') spread_uio_ad_account = Constants._SpreadCode( 'AD_account', Constants.Constants.entity_account, 'Account included in Active Directory at UiO') spread_uio_ad_group = Constants._SpreadCode( 'AD_group', Constants.Constants.entity_group, 'Group included in Active Directory at UiO') spread_uio_ad_xpand = Constants._SpreadCode( 'Xpand_group', Constants.Constants.entity_group, "Group included in Xpand's AD-OU") # Spreads for Exchange spread_exchange_account = Constants._SpreadCode( 'exchange_acc@uio', Constants.Constants.entity_account, 'An account with an Exchange-mailbox at UiO') spread_exchange_group = Constants._SpreadCode( 'exch_group@uio', Constants.Constants.entity_group, 'A mail enabled security group for Exchange') spread_exchange_shared_mbox = Constants._SpreadCode( 'exch_shared_mbox', Constants.Constants.entity_group, 'Group exposed as a shared mailbox in Exchange') spread_uio_ldap_guest = Constants._SpreadCode( 'guest@ldap', Constants.Constants.entity_account, 'LDAP/RADIUS spread for wireless accounts') # exchange-related-jazz # this code should be removed from the cerebrum-db as soon as # migration to Exchange is completed. Removal will serve two # purposes; firstly as a code clean-up, secondly as a check that # the migration was completed properly and no mailboxes are # registered as IMAP-accounts. spread_uio_imap = Constants._SpreadCode('IMAP@uio', Constants.Constants.entity_account, 'E-mail user at UiO') spread_fronter_kladdebok = Constants._SpreadCode( 'CF@uio_kladdebok', Constants.Constants.entity_group, 'Group representing a course that should be exported to the ' 'ClassFronter instance on kladdebok.uio.no. Should only be given to ' 'groups that have been automatically generated from FS.') spread_fronter_blyant = Constants._SpreadCode( 'CF@uio_blyant', Constants.Constants.entity_group, 'Group representing a course that should be exported to the ' 'ClassFronter instance on blyant.uio.no. Should only be given to ' 'groups that have been automatically generated from FS.' '') spread_fronter_petra = Constants._SpreadCode( 'CF@uio_petra', Constants.Constants.entity_group, 'Group representing a course that should be exported to the ' 'ClassFronter instance on petra.uio.no. Should only be given to ' 'groups that have been automatically generated from FS.') spread_fronter_dotcom = Constants._SpreadCode( '*****@*****.**', Constants.Constants.entity_group, 'Group representing a course that should be exported to the ' 'ClassFronter instance on fronter.com. Should only be given to ' 'groups that have been automatically generated from FS.') # LDAP: Brukere, grupper # TODO: Kunne begrense tillatte spreads for spesielt priviligerte # brukere. # # Quarantines # quarantine_generell = Constants._QuarantineCode('generell', 'Generell splatt') quarantine_teppe = Constants._QuarantineCode( 'teppe', 'Kalt inn på teppet til drift') quarantine_system = Constants._QuarantineCode( 'system', 'Systembrukar som ikke skal logge inn') quarantine_permisjon = Constants._QuarantineCode('permisjon', 'Brukeren har permisjon') quarantine_svakt_passord = Constants._QuarantineCode( 'svakt_passord', 'For dårlig passord') quarantine_autopassord = Constants._QuarantineCode( 'autopassord', 'Passord ikke skiftet trass pålegg') quarantine_auto_emailonly = Constants._QuarantineCode( 'auto_kunepost', 'Ikke ordinær student, tilgang til bare e-post') quarantine_auto_inaktiv = Constants._QuarantineCode( 'auto_inaktiv', 'Ikke aktiv student, utestengt') quarantine_autoekstern = Constants._QuarantineCode( 'autoekstern', 'Ekstern konto gått ut på dato') quarantine_autointsomm = Constants._QuarantineCode( 'autointsomm', 'Sommerskolen er ferdig for i år') quarantine_nologin = Constants._QuarantineCode( 'nologin', 'Gammel ureg karantene nologin') quarantine_nologin_brk = Constants._QuarantineCode( 'nologin_brk', 'Gammel ureg karantene nologin_brk') quarantine_nologin_ftpuser = Constants._QuarantineCode( 'nologin_ftpuser', 'Gammel ureg karantene nologin_ftpuser') quarantine_nologin_nystudent = Constants._QuarantineCode( 'nologin_nystuden', 'Gammel ureg karantene nologin_nystudent') quarantine_nologin_sh = Constants._QuarantineCode( 'nologin_sh', 'Gammel ureg karantene nologin_sh') quarantine_nologin_stengt = Constants._QuarantineCode( 'nologin_stengt', 'Gammel ureg karantene nologin_stengt') quarantine_ou_notvalid = Constants._QuarantineCode( 'ou_notvalid', 'OU not valid from external source') quarantine_ou_remove = Constants._QuarantineCode( 'ou_remove', 'OU is clean and may be removed') quarantine_guest_release = Constants._QuarantineCode( 'guest_release', 'Guest user is released but not available.') quarantine_oppringt = Constants._QuarantineCode( 'oppringt', 'Brukeren er sperret for oppringt-tjenesten.') quarantine_vpn = Constants._QuarantineCode( 'vpn', 'Brukeren er sperret for VPN-tjenesten.') quarantine_equant = Constants._QuarantineCode( 'equant', 'Brukeren er sperret for Equant tjenesten.') quarantine_radius = Constants._QuarantineCode( 'radius', 'Bruker er sperret for RADIUS-innlogging.') quarantine_cert = Constants._QuarantineCode('cert', 'Bruker er sperret av CERT.') quarantine_auto_tmp_student = Constants._QuarantineCode( 'auto_tmp_student', 'Account is no longer active') # # Email domains # email_domain_category_uio_globals = \ EmailConstants._EmailDomainCategoryCode( 'UIO_GLOBALS', "All local_parts defined in domain 'UIO_GLOBALS' are treated" " as overrides for all domains posessing this category.") # # Email spam settings # email_spam_level_none = EmailConstants._EmailSpamLevelCode( 'no_filter', 9999, "No email will be filtered as spam") email_spam_level_standard = EmailConstants._EmailSpamLevelCode( 'standard_spam', 7, "Only filter email that obviously is spam") email_spam_level_heightened = EmailConstants._EmailSpamLevelCode( 'most_spam', 5, "Filter most emails that look like spam") email_spam_level_aggressive = EmailConstants._EmailSpamLevelCode( 'aggressive_spam', 3, "Filter everything that resembles spam") email_spam_action_none = EmailConstants._EmailSpamActionCode( 'noaction', "Deliver spam just like legitimate email") email_spam_action_folder = EmailConstants._EmailSpamActionCode( 'spamfolder', "Deliver spam to a separate IMAP folder") email_spam_action_delete = EmailConstants._EmailSpamActionCode( 'dropspam', "Reject messages classified as spam") # # Email traits # trait_email_server_weight = _EntityTraitCode( 'em_server_weight', Constants.Constants.entity_host, "The relative weight of this server when assigning new users to " "an e-mail server.") trait_email_pause = _EntityTraitCode( 'email_pause', EmailConstants.EmailConstants.entity_email_target, 'Pauses delivery of email') # Owner trait for GuestUsers module. trait_uio_guest_owner = _EntityTraitCode( 'guest_owner_uio', Constants.Constants.entity_account, "When a guest account is requested a group must be set as " "owner for the account for the given time.") trait_account_generation = _EntityTraitCode( 'ac_generation', Constants.Constants.entity_account, "When a users homedir is archived, this value is increased.") trait_student_disk = _EntityTraitCode( 'student_disk', Constants.Constants.entity_disk, "When set, the disk in question is designated as" " hosting students' home areas") # Trait for tagging a person's primary affiliation, to be used by the web # presentations. trait_primary_aff = _EntityTraitCode( "primary_aff", Constants.Constants.entity_person, "A person's chosen primary affiliation," " for use at the web presentations") # Trait for tagging -adm,-drift,-null accounts trait_sysadm_account = _EntityTraitCode( "sysadm_account", Constants.Constants.entity_account, "An account used for system administration," " e.g. foo-adm, foo-drift and foo-null users") # Trait for passphrase stats trait_has_passphrase = _EntityTraitCode('has_passphrase', Constants.Constants.entity_account, "Account uses passphrase") # Trait to tag students with temporary access to IT-services trait_tmp_student = _EntityTraitCode( 'tmp_student', Constants.Constants.entity_account, 'Account is granted temporary access') # # Address types # address_other_street = Constants._AddressCode('OTHER_STREET', 'Other street address') address_other_post = Constants._AddressCode('OTHER_POST', 'Other post address') # # Consents # # Office 365 consent_office365 = Consent.Constants.EntityConsent( 'office365', entity_type=Constants.Constants.entity_person, consent_type=Consent.Constants.consent_opt_in, description="Export to office365?") # Gsuite consent_gsuite = Consent.Constants.EntityConsent( 'gsuite', entity_type=Constants.Constants.entity_person, consent_type=Consent.Constants.consent_opt_in, description="Export to Google for Education") # cristin consent_cristin = Consent.Constants.EntityConsent( 'cristin', entity_type=Constants.Constants.entity_person, consent_type=Consent.Constants.consent_opt_in, description="Export to Cristin") # # DNS Zones # uio_zone = DnsConstants._DnsZoneCode("uio", ".uio.no.") ifi_zone = DnsConstants._DnsZoneCode("ifi_uio", ".ifi.uio.no.")
class Constants(Constants.Constants): """``DnsConstants.Constants(Constants.Constants)`` defines constants used by the dns module""" entity_dns_cname = Constants._EntityTypeCode( 'cname', 'cname - see table "cerebrum.cname_info" and friends.') entity_dns_host = Constants._EntityTypeCode( # name-clash with existing entity_type 'dns_host', 'dns_host - see table "cerebrum.dns_host_info" and friends.') entity_dns_a_record = Constants._EntityTypeCode( 'a_record', 'a_record - see table "cerebrum.a_record_info" and friends.') entity_dns_aaaa_record = Constants._EntityTypeCode( 'aaaa_record', 'aaaa_record - see table "cerebrum.aaaa_record_info" and friends.') entity_dns_owner = Constants._EntityTypeCode( 'dns_owner', 'dns_owner - see table "cerebrum.dns_owner" and friends.') entity_dns_ip_number = Constants._EntityTypeCode( 'dns_ip_number', 'dns_ip_number - see table "cerebrum.dns_ip_number" and friends.') entity_dns_ipv6_number = Constants._EntityTypeCode( 'dns_ipv6_number', 'dns_ipv6_number - see table "cerebrum.dns_ipv6_number" and friends.') entity_dns_subnet = Constants._EntityTypeCode( 'dns_subnet', 'dns_subnet - see table "cerebrum.dns_subnet" and friends.') entity_dns_ipv6_subnet = Constants._EntityTypeCode( 'dns_ipv6_subnet', 'dns_ipv6_subnet - see table "cerebrum.dns_ipv6_subnet" and friends.') dns_owner_namespace = Constants._ValueDomainCode('dns_owner_ns', 'Domain for dns_owners') spread_uio_machine_netgroup = Constants._SpreadCode( 'NIS_mng@uio', Constants.Constants.entity_group, 'Machine netgroup in NIS domain "uio"') field_type_txt = _FieldTypeCode('TXT', 'TXT Record') trait_dns_contact = _EntityTraitCode( 'dns_contact', entity_dns_owner, """Contact information (e-mail address) for the host.""") trait_dns_comment = _EntityTraitCode( 'dns_comment', entity_dns_owner, """A freeform comment about the host.""") # TODO: The uio constants should be in a uio specific constants module uio_zone = _DnsZoneCode("uio", ".uio.no.") trofast_zone = _DnsZoneCode("trofast_uio", ".trofast.uio.no.") other_zone = _DnsZoneCode("other", None) # ChangeLog constants a_record_add = _ChangeTypeCode('host', 'a_rec_add', 'add a-record %(subject)s -> %(dest)s') a_record_del = _ChangeTypeCode('host', 'a_rec_del', 'del a-record %(subject)s -> %(dest)s') a_record_update = _ChangeTypeCode( 'host', 'a_rec_upd', 'update a-record %(subject)s -> %(dest)s') aaaa_record_add = _ChangeTypeCode( 'host', 'aaaa_rec_add', 'add aaaa-record %(subject)s -> %(dest)s') aaaa_record_del = _ChangeTypeCode( 'host', 'aaaa_rec_del', 'del aaaa-record %(subject)s -> %(dest)s') aaaa_record_update = _ChangeTypeCode( 'host', 'aaaa_rec_upd', 'update aaaa-record %(subject)s -> %(dest)s') cname_add = _ChangeTypeCode('host', 'cname_add', 'add cname %(subject)s -> %(dest)s') cname_del = _ChangeTypeCode('host', 'cname_del', 'del cname %(subject)s -> %(dest)s') cname_update = _ChangeTypeCode('host', 'cname_upd', 'update cname %(subject)s -> %(dest)s') dns_owner_add = _ChangeTypeCode('host', 'dns_owner_add', 'add dns-owner %(subject)s') dns_owner_update = _ChangeTypeCode('host', 'dns_owner_upd', 'update dns-owner %(subject)s') dns_owner_del = _ChangeTypeCode('host', 'dns_owner_del', 'del dns-owner %(subject)s') general_dns_record_add = _ChangeTypeCode( 'host', 'gen_dns_rec_add', 'add record for %(subject)s', ('%(int:field_type)s=%(string:data)s', )) general_dns_record_del = _ChangeTypeCode('host', 'gen_dns_rec_del', 'del record for %(subject)s', ('type=%(int:field_type)s', )) general_dns_record_update = _ChangeTypeCode( 'host', 'gen_dns_rec_upd', 'update record for %(subject)s', ('%(int:field_type)s=%(string:data)s', )) host_info_add = _ChangeTypeCode('host', 'host_info_add', 'add %(subject)s', ('hinfo=%(string:hinfo)s', )) host_info_update = _ChangeTypeCode('host', 'host_info_upd', 'update %(subject)s', ('hinfo=%(string:hinfo)s', )) host_info_del = _ChangeTypeCode('host', 'host_info_del', 'del %(subject)s') ip_number_add = _ChangeTypeCode('host', 'ip_number_add', 'add %(subject)s', ('a_ip=%(string:a_ip)s', )) ip_number_update = _ChangeTypeCode('host', 'ip_number_upd', 'update %(subject)s', ('a_ip=%(string:a_ip)s', )) ip_number_del = _ChangeTypeCode('host', 'ip_number_del', 'del %(subject)s') ipv6_number_add = _ChangeTypeCode('host', 'ipv6_number_add', 'add %(subject)s', ('aaaaaaa_ip=%(string:aaaa_ip)s', )) ipv6_number_update = _ChangeTypeCode('host', 'ipv6_number_upd', 'update %(subject)s', ('aaaaaaa_ip=%(string:aaaa_ip)s', )) ipv6_number_del = _ChangeTypeCode('host', 'ipv6_number_del', 'del %(subject)s') mac_adr_set = _ChangeTypeCode('host', 'mac_adr_set', 'set %(subject)s', ('mac_adr=%(string:mac_adr)s', )) rev_override_add = _ChangeTypeCode( 'host', 'rev_ovr_add', 'add rev-override %(subject)s -> %(dest)s') rev_override_del = _ChangeTypeCode('host', 'rev_ovr_del', 'del rev-override for %(subject)s') rev_override_update = _ChangeTypeCode( 'host', 'rev_ovr_upd', 'update rev-override %(subject)s -> %(dest)s') subnet_create = _ChangeTypeCode('subnet', 'subnet_create', 'create subnet %(subject)s') subnet_mod = _ChangeTypeCode('subnet', 'subnet_mod', 'modify subnet %(subject)s') subnet_delete = _ChangeTypeCode('subnet', 'subnet_delete', 'delete subnet %(subject)s') subnet6_create = _ChangeTypeCode('subnet', 'subnet6_create', 'create IPv6 subnet %(subject)s') subnet6_mod = _ChangeTypeCode('subnet', 'subnet6_mod', 'modify IPv6 subnet %(subject)s') subnet6_delete = _ChangeTypeCode('subnet', 'subnet6_delete', 'delete IPv6 subnet %(subject)s') srv_record_add = _ChangeTypeCode('host', 'srv_rec_add', 'add srv-record %(subject)s -> %(dest)s') srv_record_del = _ChangeTypeCode('host', 'srv_rec_del', 'del srv-record %(subject)s -> %(dest)s') FieldTypeCode = _FieldTypeCode DnsZone = _DnsZoneCode