예제 #1
0
def patch_deploy(host):
    if not host.is_latest_or_not():
        o_p.dcs_patch(host)
        o_p.server_patch(host)
        time.sleep(300)
        cf.wait_until_ping(host.hostname)
        host = oda_lib.Oda_ha(host.hostname, host.username, host.password)
    if not host.is_deployed_or_not():
        o_d.oda_deploy(host)
예제 #2
0
def provision_patch(host):
    if not host.is_deployed_or_not():
        o_d.oda_deploy(host)
    cf.extend_space_u01(host)
    create_db(host)
    if not host.is_latest_or_not():
        o_p.dcs_patch(host)
        o_p.server_patch(host)
        time.sleep(300)
        cf.wait_until_ping(host.hostname)
        host2 = oda_lib.Oda_ha(host.hostname, host.username, host.password)
        o_p.dbhome_patch(host2)
예제 #3
0
def main(hostname, username, password, version):
    logfile_name = 'check_oda_patch_%s.log' % hostname
    fp, out, err, log = cf.logfile_name_gen_open(logfile_name)
    host = oda_lib.Oda_ha(hostname, username, password)
    dcs_patch(host, version)
    server_patch(host, version)
    time.sleep(600)
    cf.wait_until_ping(host.hostname)
    host2 = oda_lib.Oda_ha(hostname, username, password)
    dbhome_patch(host2, version)
    error = cf.logfile_close_check_error(fp, out, err, log)
    return error
예제 #4
0
def patch_deploy(host):
    need_to_12_vesion = ['12.1.2.8', '12.1.2.8.1', '12.1.2.9', '12.1.2.10', '12.1.2.11']
    s_v = host.system_version()
    s_v = cf.trim_version(s_v)
    if s_v in need_to_12_vesion:
        o_p.dcs_patch(host, "12.1.2.12.0")
        o_p.simple_update_server(host, "12.1.2.12.0")
        time.sleep(300)
        cf.wait_until_ping(host.hostname)
        host = oda_lib.Oda_ha(host.hostname, host.username, host.password)
    if not host.is_latest_or_not():
        o_p.dcs_patch(host)
        if not o_p.update_server(host, version = oda_lib.Oda_ha.Current_version):
            print "update server failed"
            sys.exit(0)
        time.sleep(300)
        cf.wait_until_ping(host.hostname)
        host = oda_lib.Oda_ha(host.hostname, host.username, host.password)
    if not host.is_deployed_or_not():
        o_d.oda_deploy(host)
예제 #5
0
def provision_patch(host):
    if not host.is_deployed_or_not():
        o_d.oda_deploy(host)
    cf.extend_space_u01(host)
    create_db(host)
    need_to_12_vesion = ['12.1.2.8','12.1.2.8.1','12.1.2.9','12.1.2.10','12.1.2.11']
    s_v = host.system_version()
    s_v = cf.trim_version(s_v)
    if s_v in need_to_12_vesion:
        o_p.dcs_patch(host, "12.1.2.12.0")
        o_p.simple_update_server(host,"12.1.2.12.0")
        time.sleep(300)
        cf.wait_until_ping(host.hostname)
        host = oda_lib.Oda_ha(host.hostname, host.username, host.password)
        o_p.simple_update_dbhome(host, "12.1.2.12.0")

    if not host.is_latest_or_not():
        o_p.dcs_patch(host)
        o_p.server_patch(host)
        time.sleep(300)
        cf.wait_until_ping(host.hostname)
        host2 = oda_lib.Oda_ha(host.hostname, host.username, host.password)
        o_p.dbhome_patch(host2)