![]() |
Camphor Networks Platform API
|
This is the complete list of members for Util, including all inherited members.
appendToCommand(cls, str cmd, str key, any value, bool quote=False, bool multiLine=False) | Util | |
CAMPHOR_CLUSTER_DATA | Util | static |
CAMPHOR_DATA | Util | static |
CAMPHOR_PROJECT_DATA | Util | static |
camphor_scp(cls, user, ip, src, dst='', retry=0, wait=3, timeout=0, ignore=False, debug=False, key='', direction='to') | Util | |
camphor_skip_test(cls, skip_file='/tmp/.camphor_pytest_skip_until') | Util | |
camphor_ssh(cls, user, ip, cmd, quote="'", retry=0, wait=3, timeout=0, ignore=False, debug=False, use_echo=False, command='sudo bash', key='') | Util | |
cleanDict(cls, dict data) | Util | |
cli(cls, str cmd, str expect=None, str username=environ.get('CAMPHOR_TEST_USERNAME', 'administrator'), str project=environ.get('CAMPHOR_TEST_PROJECT', 'default'), str controller=environ.get('CAMPHOR_TEST_CONTROLLER', None), int port=int(environ.get('CAMPHOR_TEST_CONTROLLER_PORT', 22)), int retry=int(environ.get('CAMPHOR_TEST_RETRY', 0)), int wait=int(environ.get('CAMPHOR_TEST_WAIT', 3)), int timeout=int(environ.get('CAMPHOR_TEST_TIMEOUT', 0)), bool debug=environ.get('CAMPHOR_TEST_DEBUG', '').upper()=='TRUE', bool verbose=environ.get('CAMPHOR_TEST_VERBOSE', '').upper()=='TRUE', bool ignore=environ.get('CAMPHOR_TEST_IGNORE', '').upper()=='TRUE') | Util | |
commit(cls, bool commit=True, bool clear=False, bool synchronize=environ.get('CAMPHOR_TEST_SYNCHRONIZE', False), str username=environ.get('CAMPHOR_TEST_USERNAME', 'administrator'), str project=environ.get('CAMPHOR_TEST_PROJECT', 'default'), str controller=environ.get('CAMPHOR_TEST_CONTROLLER', None), int port=int(environ.get('CAMPHOR_TEST_CONTROLLER_PORT', 22)), int retry=int(environ.get('CAMPHOR_TEST_RETRY', 0)), int wait=int(environ.get('CAMPHOR_TEST_WAIT', 3)), int timeout=int(environ.get('CAMPHOR_TEST_TIMEOUT', 0)), bool debug=environ.get('CAMPHOR_TEST_DEBUG', '').upper()=='TRUE', bool verbose=environ.get('CAMPHOR_TEST_VERBOSE', '').upper()=='TRUE', bool ignore=environ.get('CAMPHOR_TEST_IGNORE', '').upper()=='TRUE') | Util | |
decrypt(cls, data, secret="%s/.ssh/id_rsa" % environ['HOME'], base64=True) | Util | |
delete_file(cls, f) | Util | |
delete_lines(cls, file_name) | Util | |
dict_get(cls, dikt, key, provider="", default="", secret=None, base64=True) | Util | |
drop_cache(cls, value=3) | Util | |
encrypt(cls, data, secret="%s/.ssh/id_rsa" % environ['HOME'], base64=True) | Util | |
flatten_dict(cls, dikt, key) | Util | |
fread(cls, f, base64=False) | Util | |
fwrite(cls, str f, str data, int mode=None, bool append=False) | Util | |
get_file_from_git(cls, project, file_name) | Util | |
getCamphorController(cls, str controller=None, int port=None, str username='administrator', str project='default') | Util | |
getCamphorItems(cls, str type, str name='', bool conf=False, bool detail=False, bool json=False, bool yaml=False, bool debug=False, bool verbose=False, str username='administrator', str project='default', str controller=None, int port=None, int retry=0, int wait=3, int timeout=0, bool ignore=False) | Util | |
getDefaultDevicePassword(cls, str os=environ.get('CAMPHOR_DEVICE_DEFAULT_OS', 'FRR')) | Util | |
grep(cls, file_name, pattern) | Util | |
initialize_logging(cls, filename, filemode="a", level=logging.DEBUG) | Util | |
initializeNbProjectData(cls) | Util | |
is_ipv4_address_in_subnet(cls, address, subnet) | Util | |
is_ipv4_address_valid(cls, address) | Util | |
is_ipv4_prefix_valid(cls, address, strict=True) | Util | |
mac(cls, separator=':') | Util | |
merge_dicts(object cls, dict d1, dict d2) | Util | |
mergeDicts(cls, dest, src) | Util | |
normalized_email(cls, email) | Util | |
ns(cls, str username=environ.get('CAMPHOR_USERNAME', 'administrator'), str project=environ.get('CAMPHOR_PROJECT', 'default')) | Util | |
ping(cls, str from_device_name, str from_device, str to_device, DeviceOS from_device_os=None, bool append_ns=True, int count=3, str jump_host=F"sshpass -p '{environ.get('CAMPHOR_PASSWORD', 'rootroot')}' "+F"ssh -l root {environ.get('CAMPHOR_CONTROLLER')}", str username='admin', str project='default', str password=environ.get('CAMPHOR_PASSWORD', 'rootroot'), int retry=60 *2, int wait=15, int timeout=30, bool ignore=True) | Util | |
printYaml(cls, str data, bool debug=False) | Util | |
readFromFile(object cls, str fl) | Util | |
render_jinja_template(cls, file, base64, destdir='/var/log/camphor') | Util | |
uploadImage(cls, str file, str md5sum='', str camphor_kubernetes_master='localhost', bool ignore=False, int retry=6, int wait=10, str username='admin') | Util | |
yamlFileToDict(cls, any yaml_file) | Util | |
yamlStringToDict(cls, str yaml_str) | Util |