Data-structures utilized by netdb.jar
Functions presented in netdb.jar accept and return hashes, vectors and elementary types like integers, strings, etc. All complex data-structures uses hashes and vectors which allows us easily create tree like structures. Every hash representing big O or little O has key 'object' with value like {"node", "network", "user", ...}. In order to enforce constraints on data put into hash we provide method validate(...) in class stanford.netdb.utils.Utils (netdb_utils.jar) which can be used on a client side to catch most glaring errors. Utils.validate(...) also used in most of netdb calls prior to excuting anything.
Note: fields marked with red asterisk must be present for inserting object, also when object is to be modifed it must have object id present.Conventions: '...' - literal key, %...% - keys are actual values themself, #...# - comment
Some of the Hashtable structures are reused several time, they are shown right below and named as <...>
<PERSON>
(Hash)
'NetID'
(String)
'name'
(String)
'DirID'
(String)
'RegID'
(String)
'phone'
(String)
'email'
(String)
'active?'
(Bool)
<NAMES>
(Hash)
%fqdn%
(Hash)
'name'
(String)
'domain'
(String)
'aliases'
(Hash)
%fqdn%
(Hash)
'name'
(String)
'domain'
(String)
'mxs'
(Hash)
%fqdn%
(Hash)
'name'
(String)
'domain'
(String)
'pref'
(String)
<DHCP_OPTIONS>
(Hash)
%option%
(String)
[top] 2Nodes:
(Hash)
'object'
'nodes'
'nodes'
(Hash)
'1'
<NODE>
'2'
<NODE>
[top] Node:
(Hash)
'object' * 'node'
'id' * (String)
'names' * <NAMES>
'interfaces'
(Hash)
%id%
(Hash)
'roaming?'
(Bool)
'use-dhcp?'
(Bool)
'hw'
(String)
'dhcp-options'
(Hash)
%key% (Hash) - key is used for sorting
'option' (String)
'value' (String)
'ips'
(Hash)
%ipaddress%
(Hash)
'active?'
(Bool)
'PTRpref'
(String)
'names'
<NAMES>
'names'
<NAMES>
'ipc_addresses'
(Hash)
%ipcaddres%
(Hash)
'active?'
(Bool)
'names'
<NAMES>
'admins' * (Hash)
'ateams'
(Hash)
%name%
(Hash)
'phone'
(String)
'email'
(String)
'admins'
(Hash)
%key% combined key for sorting
<PERSON>
'groups' * (Hash)
%name%
'dept' * (String)
'state' * (String)
'location' * (String)
'site' (String)
'code' (String)
'room' * (String)
'state' * (String)
'make' * (String)
'model' * (String)
'addr_space'
(String)
'comment'
(String)
'exp.date'
(Timestamp)
'modified'
(Timestamp)
'created'
(Timestamp)
'mod.by'
<PERSON>
'created.by'
<PERSON>
'mxSlaves'
(Hash) - Pointer to nodes and their names which in turn point to this node name(s) as an mx(es). This is a hint for a client application and thus any changes done in this field won't have any effect on a node update
%node id%
(Hash)
%node name fqdn%
(Hashtable)
%mx name fqdn%
'oses' * (Hashtable)
%os name%
(String) - os version
'types'
(Hashtable)
%type% (Hash)
'extkey' (String)
'type' (String)
'rank' (Integer) 'tags'
(Hash)
%tag%
(String)
'users'
(Hash)
%key% combined key for sorting
<PERSON>
'locked' (Timestamp) - must be placed in newNode when modifying node
[top] Network:
Note: If you add alias(es) or mxs they will be ignored. Network *must* have at least one name. DHCP ip addresses do not have to have a name
(Hash)
'object' *
'network'
'id' *
(String)
'names' *
<NAMES/NO_MX/NO_ALIAS>
'address_spaces'
(Hash)
%AS. prefix%
(Hash) - AddressSpace datastructure passed to splitAS(...) and joinAS(...)
'addr_space_ip' *
(String)
'prefix_length' *
(Integer)
'addr_space_prefix' *
(String)
'low_res' *
(Integer)
'high_res' *
(Integer)
'comment'
(String)
'groups'
(Hash)
%name%
'dhcp_addresses'
(Hash)
%ipaddress%
(Hash)
'active?' * (Boolean)
'ip_address' * (String)
'names'
<NAMES/NO_MX/NO_ALIAS>
'dhcp_options'
(Hash)
%key% (Hash) - key is used for sorting
'option' (String)
'value' (String) 'dhcp_options'
(Hash)
%key% - for sorting (Hash)
'option' (String)
'value' (String)
'locations'
(Hash)
%location name% - for sorting (Hash)
'name' (String)
'site' (String)
'code' (String)
'comment'
(String)
'dhcp_service'
(String)
'created'
(Timestamp)
'created.by'
<PERSON>
'modified'
(Timestamp)
'mod.by'
<PERSON>
'groups' *
(Hash)
%name%
'locked' (Timestamp) - must be placed in newNet when modifying network
[top] Domain:
(Hash)
'object' *
'domain'
'id'
(String)
'domain' *
(String)
'limited?' *
(Boolean)
'useAsName'
(Hash)
%group% 'assign'
(Hash)
%group% 'comment'
(String)
'groups' *
(Hash)
%group% * (must have at least one group)
'created'
(Timestamp)
'created.by'
<PERSON>
'modified'
(Timestamp)
'mod.by'
<PERSON>
'locked' (Timestamp) - must be placed in newDomain when modifying
[top] User:
(Hash)
'object' *
'user'
'id' *
(String)
'name'
(String)
'phone'
(String)
'email'
(String)
'NetID' *
(String)
'DirID'
(String)
'RegID' *
(String)
'active?' *
(Boolean)
'dirActive?'
(Boolean)
'all_objects?' *
(Boolean)
'all_groups?' *
(Boolean)
'default_domain' *
(String)
'default_addr_space'
(String)
'departments'
(Hash)
%dep.label%
(Hash)
'RegID'
(String)
'official?' *
(Boolean)
'consultants'
(Hash)
%NetID+Display_Name+RegID% - for sorting (Hash)
<PERSON>
'primary?' (Boolean) 'default_group' *
(String)
'groups'
(Hash)
%group%
'records'
(Hash)
%record_label%
(String) - display label
'comment'
(String)
'created'
(Timestamp)
'created.by'
<PERSON>
'modified'
(Timestamp)
'mod.by'
<PERSON>
'last_login'
(Timestamp)
[top] Group:
(Hash)
'object' *
'group'
'id'
(String)
'name' *
(String)
'comment'
(String)
'created'
(Timestamp)
'created.by'
<PERSON>
'modified'
(Timestamp)
'mod.by'
<PERSON>
[top] Admin Team:
(Hash)
'object' *
'ateam'
'id'
(String)
'name' *
(String)
'email' *
(String)
'phone' *
(String)
'comment'
(String)
'groups' *
(Hash)
%group% * (must have at least one group)
'departments'
(Hash)
%department%
'members'
(Hash)
%RegID%
<PERSON>
'created'
(Timestamp)
'created.by'
<PERSON>
'modified'
(Timestamp)
'mod.by'
<PERSON>
[top] OS List: Returned by getInfo(...)
(Hash)
%name%
(String) comment
[top] OS: Passed to delete(...), insert(...) and update(...)
(Hash)
'object' *
'os'
'name' *
(String)
'comment'
(String)
[top] Make List: Returned by getInfo(...)
(Hash)
%make%
[top] Make: Passed to delete(...), insert(...) and update(...)
(Hash)
'object' *
'make'
'name' *
(String)
[top] Model List:
(Hash)
%make%+" "+%model%+" : "+%type%
(Hash)
'model'
(String) - model name
'type'
(String)
'make'
(String)
'id'
(String)
[top] Model: Passed to delete(...), insert(...) and update(...)
(Hash)
'object' *
'model'
'model' *
(String) - model name
'type'
(String)
'make' *
(String)
'id'
(String)
[top] Department List:
(Hash)
%name%
(Hash)
'name'
(String)
'id'
(String)
'RegID'
(String)
[top] Department:
(Hash)
'object' * 'department'
'name' * (String)
'id' (String)
'RegID' (String)
'consultants' (Hash)
%NetID+Display_Name+RegID% - for sorting (Hash)
'DirID' (String)
'phone' (String)
'email' (String)
'name' (String)
'active?' (Boolean)
'RegID' * (String)
'NetID' (String)
'primary?' * (Boolean) [top] Location List:
(Hash)
%location%
(Hash)
'location'
(String)
'site'
(String)
'code'
(String)
[top] Location: Passed to delete(...), insert(...) and update(...)
(Hash)
'object' *
'location'
'location' *
(String)
'site'
(String)
'code'
(String)
[top] Addr. Spaces List: Returned by listAddrSpaces() and listMyAddrSpaces()
(Hash)
%net ip addr% String
(Hash)
'net_id'
(String)
'str_ip_address'
(String)
'prefix'
(String)
'ip_addr_space'
(String)
'comment'
(String)
[top] Records List: Returned by listRecords()
(Hash)
%record label% %record display label% [top] DHCP Services List: Returned by listDHCPServices()
(Hash)
%service name% (Hash)
'name' (String)
'id' (String)
'comment' - may be absent (String) [top] DHCP Options List: Returned by getInfo(Constans.DHCP_OPTIONS, ...)
(Hash)
%option name% (Hash)
%application% - one of {'addressspace', 'dhcpservice', 'interface', 'network', 'nodegroup'} [top] Quick Search: Node
(Hash)
%ip%+%name%
(Hash)
- combined key
'name' (String) %name w/o def. domain%, it is matched or closest name.
'handle' (String) FQDN
'node_name' (String) node name w/o def. domain
'NodeID' (Long) - also handle
'ip' (String) IP Addr
'name_type' (String) = {'ip_addr_name', 'intfc_name', 'node_name', 'ipc_addr_name', 'alias_name'}
'node_type' (Hash)
%type% = {'AdvancedNode', 'Router', 'IPCprovider', 'Template'}
'alias_of' (String) - name w/o def. domain. May not be present.
'pref' (Integer) - Pref. for name if name is an MX. May not be present. [top] Quick Search: MX
(Hash)
%mx+handle% - for sorting (Hash)
'name' (String) - name to which MX is applied w/o def. domain
'mx' (String) - MX name w/o def. domain
'pref' (Integer)
'handle' (String) - node's FQDN [top] Quick Search: Network
Note: Hashtable representing quick search result record may not contain both 'net_name' and 'dhcp_name' at the same time.
(Hash)
%net_name+dhcp_name% - for sorting (Hash)
'handle' (String) - net name, FQDN
'dhcp_name' (String) - dhcp name w/o def. domain
'net_name' (String) - net name w/o def. domain
'ip' (String) - ip of either net (x.x.x/x) or dhcp [top] Quick Search: User
(Hash)
%NetID+Display_Name+RegID% - for sorting (Hash)
'name' (String) - display name
'RegID' (String)
'NetID' (String) - handle, as all user require to have NetID [top] Quick Search: Group
(Hash) %Group Label% [top] Quick Search: AdminTeam
(Hash) %ATeam Label% [top] Quick Search: Domain
(Hash) %Domain Name% - FQDN [top] Domains list
(Hash) %Domain Name% - FQDN %Domain ID% - (String) [top] list(NODE_TYPE)
(Hash) %type% (Hash) 'abbrev' (String) 'extkey' (String) 'plural' (String) 'type' (String) 'rank' (Integer) [top] listMyStates() and listStates()
(Hash) %state% (Hash) 'name' * (String) 'denyDNS' * (Boolean) 'denyDHCP' * (Boolean) 'description' (String) 'rank' * (Integer) 'access' (String)