Exemple #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)
Exemple #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)
def get_machine_name():
    uuid = get_system_uuid()
    data = make_identity_request(uuid)
    return data['name']
def get_machine_name():
    uuid = get_system_uuid()
    data = make_identity_request(uuid)
    return data['name']