Пример #1
0
def main():
    util.kill_ssl_warnings(logging, urllib3)
    args = parse_args()
    verify_services_are_valid(args.SERVICES)
    if args.LIST_SERVICES:
        print_service_name_translation()
        sys.exit(0)
        return

    if not args.SERVICES:
        print("No services specified")
        sys.exit(0)
        return

    env = util.get_environment(args.BIGIQ_ADDR,
                               username=args.BIGIQ_USERNAME,
                               pwd=args.BIGIQ_PWD)

    util.poll_for_services_available(env["address"],
                                     auth=env["auth"],
                                     timeout=360)
    util.complete()

    util.print_partial("Retrieving DCD identifier...")
    dcd_self_link = get_dcd_device_reference(env, args.DCD_IP_ADDRESS)
    util.complete()

    util.print_partial("Activating services: " +
                       string.join(args.SERVICES, ", ") + "...")
    activate_services(env, args.DCD_IP_ADDRESS, dcd_self_link, args.SERVICES)
    util.complete()
Пример #2
0
def main():
    # load vars from parser
    args = parse_args()
    # Determine local or remote
    environment = get_environment(args.BIGIQ_ADDR,
                                  username=args.DCD_USERNAME,
                                  pwd=args.DCD_PWD)
    # Test authentication?
    util.poll_for_services_available(environment['address'],
                                     auth=environment['auth'])
    util.complete()

    # Wait for DCD available and assume basic auth is enabled
    util.poll_for_system_setup(args.DCD_IP_ADDRESS,
                               auth=requests.auth.HTTPBasicAuth(
                                   args.DCD_USERNAME, args.DCD_PWD),
                               timeout=args.TIMEOUT_SEC)
    util.complete()

    # Verify that device is not added already
    util.print_partial("Checking that device is not already registered...")
    check_that_device_not_already_registered(environment, args.DCD_IP_ADDRESS)
    util.complete()

    # post to add node
    util.print_partial("Adding node...")
    node_uuid = add_node(environment, args.DCD_IP_ADDRESS,
                         args.DCD_TRANSPORT_ADDRESS, args.DCD_USERNAME,
                         args.DCD_PWD)
    util.complete()

    # poll add until success or failure
    util.print_partial("Waiting for result...")
    poll_for_result(environment, node_uuid)
    util.complete()
Пример #3
0
def poll_for_services_available():
    return util.poll_for_services_available(BIGIQ_ADDR,
                                            AUTH,
                                            timeout=TIMEOUT_SEC)
def main():
    util.kill_ssl_warnings(logging, urllib3)
    util.poll_for_services_available("localhost", None, timeout=1200)