def __init__(self): cfg = myConfigParser.get_cfg(filename=PAPI_CRED_FILE) self.username = cfg.username self.password = cfg.password self.url = cfg.endpoint
def get_token(cls, cfg_section=None, cfg_file=VLSM_CRED_FILE): if cfg_section is None: xlog.deprecated("retained for backwards compatibility; should remove") cfg_section = "old" cfg = myConfigParser.get_cfg(filename=cfg_file, section=cfg_section) return cfg.token