123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264 |
- <?php
- //# DO NOT MODIFY
- define('PROVISION_UNKNOWN', -2);
- define('PROVISION_IN_PROGRESS', -1);
- define('PROVISION_FAIL', 0);
- define('PROVISION_SUCCESS', 1);
- define('REACHABILITY_NEVER_REACHABLE', 0);
- define('REACHABILITY_NOW_UNREACHABLE', 1);
- define('REACHABILITY_REACHABLE', 2);
- //# END DO NOT MODIFY
- // Globals
- define('LOGFILE', '/var/log/swreg.log');
- define('LOG_LEVEL', 7);
- define('TFTPBOOT', '/tftpboot');
- define('PORT_TMPL_DIR', TFTPBOOT . '/port-templates');
- define('VLAN_TMPL_DIR', TFTPBOOT . '/vlan-templates');
- define('DEVICE_TMPL_DIR', TFTPBOOT . '/device-templates');
- define('DEVICE_CONFIG_DIR', TFTPBOOT . '/device-configs');
- define('DEVICE_TMP_DIR', TFTPBOOT . '/device-tmp');
- define('PORT_PROFILE_DIR', TFTPBOOT . '/port-profiles');
- define('EEM_TMPL_DIR', TFTPBOOT . '/eem-templates');
- define('FPING_PROGRAM', '/usr/local/sbin/fping');
- define('USE_PNP', true);
- define('EXPORT_PRIME', true);
- define('EXPORT_DEADMAN', true);
- define('TOOL_NAME', 'CiscoLive Switch Registration Tool');
- define('PRIME_CRED_PROFILE', 'CLUS-creds');
- define('PRIME_URL', 'https://63.231.220.90');
- define('APIC_HOST', 'apic-em.marcuscom.com');
- define('DNS_SERVER', '216.206.190.98');
- define('DNS_ZONE', 'noc.ciscolive.com');
- define('REST_RETRY_INTERVAL', 3);
- define('REST_RETRIES', 1);
- define('REST_TIMEOUT', 300);
- define('DEBUG', 0);
- // IPv6 Config
- // Whether or not to do IPv6 mapping from IPv4 management address.
- define('MAP_V6', false);
- // The IPv6 Prefix to use for management.
- define('IPV6_PREFIX', '::');
- define('IPV6_PREFIXLEN', '64');
- define('IPV6_GW', '::');
- // Addressing scheme
- // Choose one of IDF, NEXT_FREE, or NONE
- // IDF : The IDF switch is assumed to be .1 and each switch associated with
- // it will match on the first three octets.
- // NEXT_FREE : Pick the next free address for a given MDF
- // DNS : Do a DNS lookup on the given name and use that IP
- // NONE : IP address assignment will be done manually
- define('ADDRESS_SCHEME', 'IDF');
- // Regexps for Plug'n'Play (PnP) support
- // They only matter if the global, USE_PNP
- // is set to TRUE.
- // OPTIONAL
- $PNP_PATTERNS = array(
- '15\.2.+E' => true,
- );
- // The MDFs are L3 domains.
- // MANDATORY!
- $MDFS = array(
- 'HILTON',
- 'HYATT',
- 'NODE',
- 'SDCC',
- );
- // List all PIDs or PID patterns here.
- // MANDATORY!
- $ZTP_PIDS = array(
- 'WS-C3560CG-8PC-S',
- 'WS-C3750X',
- );
- // Fill in each of these arrays based on the ZTP PIDs listed above.
- // MANDATORY!
- $IMG_VERS = array(
- 'WS-C3560CG-8PC-S' => '15.0(2)SE7',
- 'WS-C3750X' => '15.0(2)SE7',
- );
- $IMG_FILES = array(
- 'WS-C3560CG-8PC-S' => 'c3560c405ex-universalk9-mz.150-2.SE7.bin',
- 'WS-C3750X' => 'c3750e-universalk9-mz.150-2.SE7.bin',
- );
- $START_PORTS = array(
- 'WS-C3560CG-8PC-S' => '0/1',
- 'WS-C3750X' => '1/0/1',
- );
- $PORT_TYPES = array(
- 'WS-C3560CG-8PC-S' => 'GigabitEthernet',
- 'WS-C3750X' => 'GigabitEthernet',
- );
- // End PID arrays
- // Fill out PIDs mapping to number of ports.
- // MANDATORY!
- $PID_PORTS = array(
- 'WS-C3560CG-8PC-S' => '8',
- 'WS-C3750X-24' => '24',
- 'WS-C3750X-48' => '48',
- );
- // Port patterns
- // The patterns that start a port name
- // MANDATORY!
- $PORT_PATTERNS = array(
- 'WS-C3560CG-8PC-S' => '0/',
- 'WS-C3750X-24' => '1/0/',
- 'WS-C3750X-48' => '1/0/',
- );
- // Map the PID ports to a ZTP PID
- // This is only needed if you don't use fully-qualified
- // PIDs in the ZTP PIDs.
- // OPTIONAL OBSOLETE!!!
- /*$PID_MAP = array(
- 'WS-C3750X-24' => 'WS-C3750X',
- 'WS-C3750X-48' => 'WS-C3750X',
- );*/
- // List any aliases here.
- // This goes from what the device may report
- // to a fully-qualified PID.
- $PID_ALIASES = array(
- 'WS-C3850-24U' => 'WS-C3850-24U-L',
- );
- // List any SDM profile preference here.
- // The profile will be configured at ZTP time.
- // If the PID is not here, no profile will be set.
- $SDM_PROFILES = array(
- );
- // Fill in VLAN mappings
- // VLAN macro will be the name with spaces turned to '_' and
- // all letters uppercase followed by _VLAN.
- // E.g., for NOC Device Mgmt, the macro will be
- // %%NOC_DEVICE_MGMT_VLAN%%
- // MANDATORY!
- $VLANS = array(
- 'NOC Device Mgmt' => '100',
- 'NOC Wired' => '110',
- 'Wireless AP' => '210',
- 'Voice TP' => '300',
- 'Video Surveillance' => '310',
- 'Speaker' => '350',
- 'CiscoTV' => '360',
- 'CiscoTV DMP' => '370',
- 'Session Capture' => '380',
- 'Cisco Store' => '390',
- 'Registration' => '400',
- 'Session Signage' => '420',
- 'Labs CCIE' => '500',
- 'Labs Testing Center' => '510',
- 'Labs Session Labs' => '520',
- 'DevNet' => '600',
- 'NOC Public' => '751',
- 'Registration Public' => '752',
- 'SDCC Public' => '753',
- 'Labs Public' => '754',
- 'CiscoTV Public' => '755',
- 'Cisco Campus Public' => '761',
- 'Wired NAT' => '2000',
- 'NODE Public' => '757',
- 'WoS Booths' => '550',
- 'WISP Labs' => '530',
- 'HILTON Public' => '758',
- 'HYATT Public' => '759',
- );
- // VLAN Overrides
- // Fill in any per-MDF VLAN override
- // OPTIONAL
- /*
- $VLAN_OVERRIDES = array(
- 'SDCC' => array(
- 'CiscoTV Public' => '756',
- ),
- 'NODE' => array(
- 'CiscoTV Public' => '762',
- ),
- );
- */
- // Custom Macros
- // Put any general custom macros and
- // their replacements here. They will
- // be converted to %%MACRO_NAME%% and replaced
- // in your configs.
- // OPTIONAL
- $CUSTOM_MACROS = array(
- 'MAX_MACS' => '10',
- );
- // MDF Overrides
- // Put macros here that will be replaced
- // based on the MDF location
- // OPTIONAL
- $MDF_OVERRIDES = array(
- 'NODE' => array(
- 'MAX_MACS' => '100',
- ),
- );
- // PID Macros
- // Put macros here mapped to specific PIDs
- // PID aliases are considered
- // OPTIONAL
- $PID_MACROS = array(
- 'WS-C3560CG-8PC-S' => array(
- 'MAX_MACS' => '5',
- ),
- );
- // Hooks
- // Define scripts to call for various events.
- // VERIFY (hooks called when a device is verified)
- // SUCCESS: Called when a device is successfully verified
- // ARGS: <HOOK_NAME> <REMOTE_IP> <CONFIG_FILE> <SERIAL_NO> <IMAGE_MD5> <IMAGE_NAME>
- // FAIL : Called when a device fails to verify
- // ARGS: <HOOK_NAME> config|image <REMOTE_IP> <CONFIG_FILE> <SERIAL_NO> <IMAGE_MD5> <GOOD_MD5> <IMAGE_NAME>
- // REQUEST (hooks called when a device boostrap request is made)
- // NEW : Called when a new device request is received
- // ARGS: <HOOK_NAME> <REMOTE_IP> <HOSTNAME> <SERIAL_NO> <PID> <VERSION> <NUM_PORTS> <IMAGE_NAME>
- // UNKNOWN: Called when a request from an unmapped device is seen
- // ARGS: <HOOK_NAME> <REMOTE_IP> <SERIAL_NO> <PID>
- // ERROR: Called when a new request cannot be serviced due to an error
- // ARGS: <HOOK_NAME> <REMOTE_IP> <SERIAL_NO> <PID> <MSG>
- // PINGER (hooks called when a device becomes reachable or unreachable)
- // REACHABLE : Called when a device transitions to a reachable state
- // ARGS: <HOOK_NAME> <SERIAL_NO> <DEVICE_IP>
- // UNREACHABLE: Called when a device transitions to an unreachable state
- // ARGS: <HOOK_NAME> <SERIAL_NO> <DEVICE_IP>
- // OPTIONAL
- $HOOKS = array(
- 'VERIFY' => array(
- 'SUCCESS' => '',
- 'FAIL' => '',
- ),
- 'REQUEST' => array(
- 'NEW' => '',
- 'UNKNOWN' => '',
- 'ERROR' => '',
- ),
- 'PINGER' => array(
- 'REACHABLE' => '',
- 'UNREACHABLE' => '',
- ),
- );
|