예제 #1
0
 def __init__(self):
     self.username = L4info.get_id()
     self.password = L4info.get_pw()
     self.url = 'https://' + L4info.get_l4ip()
     self.headers = {
         'Content-Type': 'application/json',
         'Accept-Charset': 'UTF-8'
     }
예제 #2
0
파일: mailing.py 프로젝트: ssyslearn/f5api
def db_connect():
    db_ip = L4info.get_db_ip()
    db_id = L4info.get_db_id()
    db_pw = L4info.get_db_pw()
    conn = MySQLdb.connect(host=db_ip, user=db_id, passwd=db_pw, db='TEST')
    cur = conn.cursor()

    try:
        yield (conn, cur)
    finally:
        cur.close()
        conn.close()
예제 #3
0
파일: Pool.py 프로젝트: ssyslearn/f5api
 def __init__(self, l4ip):
     self.username = L4info.get_id()
     self.password = L4info.get_pw()
     self.url = 'https://' + l4ip
     self.payload = {'expandSubcollections': 'true'}
     self.headers = {
         'Content-Type': 'application/json',
         'Accept-Charset': 'UTF-8'
     }
     self.db_id = L4info.get_db_id()
     self.db_pw = L4info.get_db_pw()
     self.db_ip = L4info.get_db_ip()
예제 #4
0
    def __init__(self, l4ip):
        self.username = L4info.get_id()
        self.password = L4info.get_pw()
        self.url = 'https://' + l4ip
        self.payload = {'expandSubcollections': 'true'}
        self.headers = {
            'Content-Type': 'application/json',
            'Accept-Charset': 'UTF-8'
        }
        self.db_id = L4info.get_db_id()
        self.db_pw = L4info.get_db_pw()
        self.db_ip = L4info.get_db_ip()

        # InsecureRequestWarning: Unverified HTTPS request is being made 문제 해결
        requests.packages.urllib3.disable_warnings(InsecureRequestWarning)