Exemple #1
0
def add_domain_test():
    TaskName = "OCDN_PURGE"
    TaskList = ["OCDN_PURGE", "OCDN_PROXY", "OCDN_ADD_DNS"]
    Parameters = []
    for _ in range(0, 10):
        Parameters.append(
            {
                "ip": "192.168.1.1",
                "port": "80",
                "domain": "www.firefoxbug.com",
                "token": "821e57c57e8455e3e809e23df7bb6ce9",
            }
        )
        Parameters.append(
            {
                "ip": "192.168.1.2",
                "port": "80",
                "domain": "www.firefoxbug.com",
                "token": "821e57c57e8455e3e809e23df7bb6ce9",
            }
        )

    test = OcdnJSON()
    job2do = test.create_job_json(TaskName, TaskList, Parameters)
    pp.pprint(job2do)

    producer = ProducerTest()
    producer.produce_job_loop(TaskName, job2do)
Exemple #2
0
def add_domain_test():
	TaskName = 'OCDN_PURGE'
	TaskList = ['OCDN_RELOAD_NODE','OCDN_PROXY','OCDN_ADD_DNS']
	Parameters = []
	Parameters.append({'ip':'192.168.1.1','port':'80','domain':'www.firefoxbug.com','token':'821e57c57e8455e3e809e23df7bb6ce9'})
	Parameters.append({'ip':'192.168.1.2','port':'80','domain':'www.firefoxbug.com','token':'821e57c57e8455e3e809e23df7bb6ce9'})
	
	test = OcdnJSON()
	job2do = test.create_job_json(TaskName, TaskList, Parameters)
	pp.pprint(job2do)

	producer = ProducerTest()
	producer.produce_job_loop(TaskName, job2do)
Exemple #3
0
def purge_test():
    JobName = "OCDN_PURGE"
    TaskList = ["OCDN_PURGE"]
    Parameters = []
    Parameters.append(
        {"ip": "192.168.1.1", "port": "80", "domain": "www.firefoxbug.com", "token": "821e57c57e8455e3e809e23df7bb6ce9"}
    )
    Parameters.append(
        {"ip": "192.168.1.2", "port": "80", "domain": "www.firefoxbug.com", "token": "821e57c57e8455e3e809e23df7bb6ce9"}
    )

    test = OcdnJSON()
    job2do = test.create_job_json(JobName, TaskList, Parameters)
    pp.pprint(job2do)

    producer = ProducerTest()
    producer.produce_job_loop("OCDN_PURGE", job2do)
Exemple #4
0
def add_domain_test():
    TaskName = 'OCDN_PURGE'
    TaskList = ['OCDN_RELOAD_NODE', 'OCDN_PROXY', 'OCDN_ADD_DNS']
    Parameters = []
    Parameters.append({
        'ip': '192.168.1.1',
        'port': '80',
        'domain': 'www.firefoxbug.com',
        'token': '821e57c57e8455e3e809e23df7bb6ce9'
    })
    Parameters.append({
        'ip': '192.168.1.2',
        'port': '80',
        'domain': 'www.firefoxbug.com',
        'token': '821e57c57e8455e3e809e23df7bb6ce9'
    })

    test = OcdnJSON()
    job2do = test.create_job_json(TaskName, TaskList, Parameters)
    pp.pprint(job2do)

    producer = ProducerTest()
    producer.produce_job_loop(TaskName, job2do)
Exemple #5
0
def purge_test():
    JobName = 'OCDN_PURGE'
    TaskList = ['OCDN_PURGE']
    Parameters = []
    Parameters.append({
        'ip': '192.168.1.1',
        'port': '80',
        'domain': 'www.firefoxbug.com',
        'token': '821e57c57e8455e3e809e23df7bb6ce9'
    })
    Parameters.append({
        'ip': '192.168.1.2',
        'port': '80',
        'domain': 'www.firefoxbug.com',
        'token': '821e57c57e8455e3e809e23df7bb6ce9'
    })

    test = OcdnJSON()
    job2do = test.create_job_json(JobName, TaskList, Parameters)
    pp.pprint(job2do)

    producer = ProducerTest()
    producer.produce_job_loop('OCDN_PURGE', job2do)