Ejemplo n.º 1
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)
Ejemplo n.º 2
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)
Ejemplo n.º 3
0
def get_machine_name():
    uuid = get_system_uuid()
    data = make_identity_request(uuid)
    return data['name']
Ejemplo n.º 4
0
def get_machine_name():
    uuid = get_system_uuid()
    data = make_identity_request(uuid)
    return data['name']