| 
    Camphor Networks Platform API
    
   | 
 
Classes | |
| class | Util | 
| class | Sh | 
| class | PasswordPromptAction | 
| class | CamphorSingleNodeSetup | 
Functions | |
| def | CAMPHOR_LOG_TRACE (msg, exc_info=False, stacklevel=1, stack_info=False) | 
| def | CAMPHOR_LOG_DEBUG (msg, exc_info=False, stacklevel=1, stack_info=False, suppress_debug=False) | 
| def | CAMPHOR_LOG_INFO (msg, exc_info=False, stacklevel=1, stack_info=False) | 
| def | CAMPHOR_LOG_WARN (msg, exc_info=False, stacklevel=1, stack_info=False) | 
| def | CAMPHOR_LOG_ERROR (msg, exc_info=True, stacklevel=1, stack_info=True) | 
| def | CAMPHOR_LOG_FATAL (msg, exc_info=True, stacklevel=1, stack_info=True) | 
| def | CAMPHOR_LOG_EXCEPTION (msg, exc_info=True, stacklevel=1, stack_info=True) | 
| def | CAMPHOR_LOCAL_DIR (cluster=None) | 
| def | pause () | 
| def | patch_pkg_resources_init () | 
| def | sleep (duration, display_wait=True) | 
| def | camphor (o, json=False, var=False) | 
Variables | |
| SSHPASS_REGEXP = compile("sshpass -p\\s+.*?\\s+") | |
| CAMPHOR_INSTALL_ROOT = environ.get("CAMPHOR_INSTALL_ROOT", F"{environ.get('HOME', '/root')}/Camphor") | |
| string | CAMPHOR_IMAGES_SECRET_KEY_FILE = "/root/.camphor_secrets/.camphorLicense" | 
| TMPDIR = environ.get("TMPDIR", path.join(CAMPHOR_INSTALL_ROOT, "tmp")) | |
| string | CAMPHOR_DEMO_IMAGE_EXPORT = "/root/Camphor/images/export" | 
| string | CAMPHOR_IMAGE_CACHE = "/local/var/lib/Camphor/images/cache/" | 
| CAMPHOR_LOCAL_HOME = environ['HOME'] | |
| string | CAMPHOR_REMOTE_USER = 'root' | 
| string | CAMPHOR_REMOTE_HOME = 'root' else ('/home/%s' % CAMPHOR_REMOTE_USER) | 
| string | CAMPHOR_REMOTE_DIR = '%s/.camphor' % CAMPHOR_REMOTE_HOME | 
| string | CAMPHOR_PREFIX = "camphor-" | 
| string | CAMPHOR_TOP = "/var/lib/camphor" | 
| string | DSI = "-i %s/.ssh/id_rsa -i %s/.ssh/id_rsa.device" % (CAMPHOR_REMOTE_HOME, CAMPHOR_REMOTE_HOME) | 
| string | SCPO = "-oBatchMode=yes -oConnectTimeout=3 -oUserKnownHostsFile=/dev/null -oStrictHostKeyChecking=no -o LogLevel=QUIET" | 
| string | SSHO = "-ax %s" % SCPO | 
| string | WSSHO = "-ax %s" % SSHO | 
| string | SSHO2 = SSHO.replace('BatchMode=yes', 'BatchMode=no') | 
| string | SCPO2 = SCPO.replace('BatchMode=yes', 'BatchMode=no') | 
| string | IPO = "up" | 
| string | EXPOSED_TCP_PORTS = "22 25 80 8080 443 10022 8443 6082 18443 22767-42767 53".split() | 
| string | EXPOSED_UDP_PORTS = "53".split() | 
| string | APT_GET = "yes | sudo DEBIAN_FRONTEND=noninteractive apt-get -qq -y --allow-unauthenticated " + \ | 
| format | |
| datefmt | |
| level | |
| def camphor_api.camphor_util.CAMPHOR_LOG_TRACE | ( | msg, | |
exc_info = False,  | 
        |||
stacklevel = 1,  | 
        |||
stack_info = False  | 
        |||
| ) | 
Definition at line 72 of file camphor_util.py.
| def camphor_api.camphor_util.CAMPHOR_LOG_DEBUG | ( | msg, | |
exc_info = False,  | 
        |||
stacklevel = 1,  | 
        |||
stack_info = False,  | 
        |||
suppress_debug = False  | 
        |||
| ) | 
Definition at line 83 of file camphor_util.py.
Referenced by camphor_api.camphor_manage_device.cli(), Util.cli(), camphor_api.camphor_manage_device.get_all_devices(), CamphorManager.loadYaml(), camphor_api.camphor_manage_device.main(), camphor_api.camphor_manage_device.process_args(), camphor_api.camphor_manage_device.push_conf(), camphor_api.camphor_manage_device.push_router_conf(), Sh.run(), camphor_api.camphor_manage_device.save_conf(), and CamphorSingleNodeSetup.start_setup().
 Here is the caller graph for this function:| def camphor_api.camphor_util.CAMPHOR_LOG_INFO | ( | msg, | |
exc_info = False,  | 
        |||
stacklevel = 1,  | 
        |||
stack_info = False  | 
        |||
| ) | 
Definition at line 97 of file camphor_util.py.
Referenced by PasswordPromptAction.__call__(), Util.camphor_skip_test(), camphor_api.camphor_manage_device.main(), and Sh.run().
 Here is the caller graph for this function:| def camphor_api.camphor_util.CAMPHOR_LOG_WARN | ( | msg, | |
exc_info = False,  | 
        |||
stacklevel = 1,  | 
        |||
stack_info = False  | 
        |||
| ) | 
Definition at line 105 of file camphor_util.py.
Referenced by camphor_api.camphor_manage_device.push_conf(), camphor_api.camphor_manage_device.save_conf(), and Util.uploadImage().
 Here is the caller graph for this function:| def camphor_api.camphor_util.CAMPHOR_LOG_ERROR | ( | msg, | |
exc_info = True,  | 
        |||
stacklevel = 1,  | 
        |||
stack_info = True  | 
        |||
| ) | 
Definition at line 113 of file camphor_util.py.
Referenced by Util.commit(), CamphorManager.loadYaml(), camphor_api.camphor_manage_device.pull_conf(), camphor_api.camphor_manage_device.push_conf(), Util.render_jinja_template(), and Sh.run().
 Here is the caller graph for this function:| def camphor_api.camphor_util.CAMPHOR_LOG_FATAL | ( | msg, | |
exc_info = True,  | 
        |||
stacklevel = 1,  | 
        |||
stack_info = True  | 
        |||
| ) | 
Definition at line 121 of file camphor_util.py.
| def camphor_api.camphor_util.CAMPHOR_LOG_EXCEPTION | ( | msg, | |
exc_info = True,  | 
        |||
stacklevel = 1,  | 
        |||
stack_info = True  | 
        |||
| ) | 
Definition at line 129 of file camphor_util.py.
Referenced by Sh.run().
 Here is the caller graph for this function:| def camphor_api.camphor_util.CAMPHOR_LOCAL_DIR | ( | cluster = None | ) | 
Definition at line 137 of file camphor_util.py.
Referenced by Util.initializeNbProjectData().
 Here is the caller graph for this function:| def camphor_api.camphor_util.pause | ( | ) | 
Definition at line 143 of file camphor_util.py.
References camphor_api.camphor_util.sleep().
 Here is the call graph for this function:| def camphor_api.camphor_util.patch_pkg_resources_init | ( | ) | 
Definition at line 160 of file camphor_util.py.
| def camphor_api.camphor_util.sleep | ( | duration, | |
display_wait = True  | 
        |||
| ) | 
Definition at line 180 of file camphor_util.py.
Referenced by camphor_api.camphor_manage_device.get_all_devices(), camphor_api.camphor_util.pause(), camphor_api.camphor_manage_device.push_router_conf(), and Sh.run().
 Here is the caller graph for this function:| def camphor_api.camphor_util.camphor | ( | o, | |
json = False,  | 
        |||
var = False  | 
        |||
| ) | 
Definition at line 209 of file camphor_util.py.
| SSHPASS_REGEXP = compile("sshpass -p\\s+.*?\\s+") | 
Definition at line 41 of file camphor_util.py.
| CAMPHOR_INSTALL_ROOT = environ.get("CAMPHOR_INSTALL_ROOT", F"{environ.get('HOME', '/root')}/Camphor") | 
Definition at line 42 of file camphor_util.py.
| string CAMPHOR_IMAGES_SECRET_KEY_FILE = "/root/.camphor_secrets/.camphorLicense" | 
Definition at line 43 of file camphor_util.py.
| TMPDIR = environ.get("TMPDIR", path.join(CAMPHOR_INSTALL_ROOT, "tmp")) | 
Definition at line 44 of file camphor_util.py.
| string CAMPHOR_DEMO_IMAGE_EXPORT = "/root/Camphor/images/export" | 
Definition at line 45 of file camphor_util.py.
| string CAMPHOR_IMAGE_CACHE = "/local/var/lib/Camphor/images/cache/" | 
Definition at line 46 of file camphor_util.py.
| CAMPHOR_LOCAL_HOME = environ['HOME'] | 
Definition at line 47 of file camphor_util.py.
| string CAMPHOR_REMOTE_USER = 'root' | 
Definition at line 48 of file camphor_util.py.
| string CAMPHOR_REMOTE_HOME = 'root' else ('/home/%s' % CAMPHOR_REMOTE_USER) | 
Definition at line 49 of file camphor_util.py.
| string CAMPHOR_REMOTE_DIR = '%s/.camphor' % CAMPHOR_REMOTE_HOME | 
Definition at line 50 of file camphor_util.py.
| string CAMPHOR_PREFIX = "camphor-" | 
Definition at line 51 of file camphor_util.py.
| string CAMPHOR_TOP = "/var/lib/camphor" | 
Definition at line 52 of file camphor_util.py.
| string DSI = "-i %s/.ssh/id_rsa -i %s/.ssh/id_rsa.device" % (CAMPHOR_REMOTE_HOME, CAMPHOR_REMOTE_HOME) | 
Definition at line 53 of file camphor_util.py.
| string SCPO = "-oBatchMode=yes -oConnectTimeout=3 -oUserKnownHostsFile=/dev/null -oStrictHostKeyChecking=no -o LogLevel=QUIET" | 
Definition at line 54 of file camphor_util.py.
| string SSHO = "-ax %s" % SCPO | 
Definition at line 55 of file camphor_util.py.
| string WSSHO = "-ax %s" % SSHO | 
Definition at line 56 of file camphor_util.py.
| string SSHO2 = SSHO.replace('BatchMode=yes', 'BatchMode=no') | 
Definition at line 58 of file camphor_util.py.
| string SCPO2 = SCPO.replace('BatchMode=yes', 'BatchMode=no') | 
Definition at line 59 of file camphor_util.py.
| string IPO = "up" | 
Definition at line 61 of file camphor_util.py.
| string EXPOSED_TCP_PORTS = "22 25 80 8080 443 10022 8443 6082 18443 22767-42767 53".split() | 
Definition at line 62 of file camphor_util.py.
| string EXPOSED_UDP_PORTS = "53".split() | 
Definition at line 63 of file camphor_util.py.
| string APT_GET = "yes | sudo DEBIAN_FRONTEND=noninteractive apt-get -qq -y --allow-unauthenticated " + \ | 
Definition at line 64 of file camphor_util.py.
| format | 
Definition at line 67 of file camphor_util.py.
| datefmt | 
Definition at line 68 of file camphor_util.py.
| level | 
Definition at line 68 of file camphor_util.py.