cobbler_api_hook_for_vm_creation
Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| cobbler_api_hook_for_vm_creation [2011/07/28 19:49] – created jt | cobbler_api_hook_for_vm_creation [Unknown date] (current) – removed - external edit (Unknown date) 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | <code python> | ||
| - | #!/bin/env python | ||
| - | import sys | ||
| - | import re | ||
| - | import xmlrpclib | ||
| - | import cobbler.api as capi | ||
| - | automagick = xmlrpclib.Server(" | ||
| - | |||
| - | #Get required information from user for vm creation: | ||
| - | if len(sys.argv) < 3: | ||
| - | print (" | ||
| - | sys.exit(1) | ||
| - | |||
| - | def check_hostname (hostname): | ||
| - | if len(automagick.find_system({" | ||
| - | return hostname | ||
| - | else: | ||
| - | print " | ||
| - | sys.exit(1) | ||
| - | |||
| - | vm_hostname = check_hostname(sys.argv[1]) | ||
| - | print vm_hostname | ||
| - | ~ | ||
| - | ~ | ||
| - | </ | ||
cobbler_api_hook_for_vm_creation.1311882575.txt.gz · Last modified: 2020/08/10 02:28 (external edit)
