def __init__(self):

        # INIT CONFIG
        self.config = ConfigParser()
        # CONFIG FILE
        self.config.read("config/config.cfg")

        # SET CONFIG VALUES
        self.host = configSectionParser(self.config, "POSTGRES")['host']
        self.user = configSectionParser(self.config, "POSTGRES")['username']
        self.password = configSectionParser(self.config,
                                            "POSTGRES")['password']
        self.dbname = configSectionParser(self.config, "POSTGRES")['db_name']
        self.port = configSectionParser(self.config, "POSTGRES")['port']
    def __init__(self):

        # INIT CONFIG
        self.config = ConfigParser()

        config_path = "/home/uvpn/vpn_access/config/config.cfg"
        self.config.read(config_path)

        # SET CONFIG VALUES
        self.host = configSectionParser(self.config, "POSTGRES")['host']
        self.user = configSectionParser(self.config, "POSTGRES")['username']
        self.password = configSectionParser(self.config,
                                            "POSTGRES")['password']
        self.dbname = configSectionParser(self.config, "POSTGRES")['db_name']
        self.port = configSectionParser(self.config, "POSTGRES")['port']
Example #3
0
    def __init__(self):
        
        # INIT CONFIG
        self.config = ConfigParser()

        # CONFIG FILE
        self.config.read("config/config.cfg")

        self.token = configSectionParser(self.config,"TOKEN")['token']
    def __init__(self):

        # INIT CONFIG
        self.config = ConfigParser()

        # CONFIG FILE
        self.config.read("config/config.cfg")

        self.token = configSectionParser(self.config, "TOKEN")['token']

        self.ssh_client = paramiko.SSHClient()
        self.ssh_client.set_missing_host_key_policy(paramiko.AutoAddPolicy())
        self.ssh_client.load_system_host_keys()
Example #5
0
def main():

    # INIT CONFIG
    config = ConfigParser()
    # CONFIG FILE
    config.read("config/config.cfg")

    server_type = configSectionParser(config,"SERVER")['server_type']

    if server_type != 'production':
        setup = Setup()
        setup.main()

        #THIS IS FOR SAVING THE EXISTING IP
        ask = "Save Existing IP (y/n)?: "
        if input(ask).lower() == 'y':
            script_existing = Script_Saver_For_Existing_IP()
            script_existing.run()

    else:
        print("YOU'RE TRYING TO UPDATE LIVE SERVER!!!")
Example #6
0
    def create_database(self):

        self.dbname = configSectionParser(self.config,"POSTGRES")['db_name']
        self.postgres.connection(True)
        self.postgres.create_database(self.dbname)
        self.postgres.close_connection()
Example #7
0
import html2text

from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support.select import Select
from library.locators import *
from .common import Page
from library.config_parser import configSectionParser

#INIT CONFIG
config = configparser.ConfigParser()
config.read("config/config.cfg")

#CONFIG
receiver_email = configSectionParser(config,"RECEIVER")['email']
receiver_password = configSectionParser(config,"RECEIVER")['password']
sender_email = configSectionParser(config,"SENDER")['email']

class BreadCrumbs(Page):

    def __init__(self, context):

        Page.__init__(self, context.browser)
        
    
    def verify_landing_page(self, details):

        if details.upper() == "PERMISSION":
            loc = PermissionLocators.PERMISSION_BREADCRUMB
            page_name = 'RBAC Permissions'
Example #8
0
# -*- coding: utf-8 -*-
import time
import ConfigParser

from library.config_parser import configSectionParser
from library.mysql_db_connection import *
from controller.data_ticker import *
from controller.data_checker import *

#INIT CONFIG
config = ConfigParser.ConfigParser()
config.read("config/config.cfg")

#USER INFORMATION
cex_user = configSectionParser(config, "CEXAPI DATA")['user']
cex_key = configSectionParser(config, "CEXAPI DATA")['key']
cex_secret = configSectionParser(config, "CEXAPI DATA")['secret']

#DATABASE
host = configSectionParser(config, "DATABASE")['host']
db = configSectionParser(config, "DATABASE")['db']
user = configSectionParser(config, "DATABASE")['user']
password = configSectionParser(config, "DATABASE")['password']

#CURRENCY
currency = configSectionParser(config, "CURRENCY")['currency']

#DATABASE CONNECTION
conn = MyDB(host, db, user, password)
db = conn.connect_mysql()
Example #9
0
import time
from pages import *
from behave import *
from selenium import webdriver

# import config
from configparser import ConfigParser
from library.config_parser import configSectionParser


# INIT CONFIG
config = ConfigParser()
# CONFIG FILE
config.read("config/config.cfg")

protocol = configSectionParser(config, "SERVER")['protocol']
host = configSectionParser(config, "SERVER")['host']
email_address = configSectionParser(config,"RECEIVER")['email']

@given('a user will login to gmail')
def step_impl(context):

    page = EmailPage(context)
    page.login_gmail()
    time.sleep(5)
    pass

@then('user will check the "{subject}" email and login to RH site')
def step_impl(context, subject):
    
    page = EmailPage(context)