Example #1
0
def make_data(name):
    uuid = get_system_uuid()
    
    data = dict(action='submit', name=name,
                arch=get_arch(),
                # FIXME machine key must go
                machine=name, uuid=uuid)
    return data
Example #2
0
def main():
    uuid = get_system_uuid()
    machine = make_identity_request(uuid)

    r = make_install_request(uuid)
    if r.ok:
        print "Machine %s set to install." % uuid
    else:
        raise RuntimeError, "Unable to set %s to install." % uuid
Example #3
0
def main():
    uuid = get_system_uuid()
    machine = make_identity_request(uuid)
    
    r = make_install_request(uuid)
    if r.ok:
        print "Machine %s set to install." % uuid
    else:
        raise RuntimeError, "Unable to set %s to install." % uuid
Example #4
0
def main():
    uuid = get_system_uuid()
    machine = make_identity_request(uuid)
    textkeys = ['name', 'recipe', 'ostype', 'release', 'arch']
    update = dict().fromkeys(textkeys)
    if opts.autoinstall is not None:
        print "Set autoinstall to", opts.autoinstall
        update['autoinstall'] = opts.autoinstall
    for key in textkeys:
        value = getattr(opts, key)
        if value:
            print "Set %s to %s" % (key, value)
            update[key] = value
    r = make_update_request(uuid, **update)
Example #5
0
def main():
    uuid = get_system_uuid()
    machine = make_identity_request(uuid)
    textkeys = ['name', 'recipe', 'ostype', 'release', 'arch']
    update = dict().fromkeys(textkeys)
    if opts.autoinstall is not None:
        print "Set autoinstall to", opts.autoinstall
        update['autoinstall'] = opts.autoinstall
    for key in textkeys:
        value = getattr(opts, key)
        if value:
            print "Set %s to %s" % (key, value)
            update[key] = value
    r = make_update_request(uuid, **update)
Example #6
0
def get_machine_name():
    uuid = get_system_uuid()
    data = make_identity_request(uuid)
    return data['name']
Example #7
0
def main():
    print "System UUID:", get_system_uuid()
    sumbit_machine(name)
    print "Machine %s submitted to paella." % name
def get_machine_name():
    uuid = get_system_uuid()
    data = make_identity_request(uuid)
    return data['name']