Red Hat SATELLITE 5.3.0 RELEASE NOTES Información técnica Pagina 75

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 199
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 74
SATELLITE_URL = "http://sat-vm.cloud.lab.eng.bos.redhat.com/rpc/api"
INFRA_LOGIN = "tenant"
INFRA_PASSWD = "24^gold"
KSTREE = 'ks-rhel-x86_64-server-5-u5'
VIRT = "none"
def main():
if len(sys.argv) < 2:
print "Usage: ",sys.argv[0]," kickstart"
sys.exit(-2);
# retreieve the passed parameter
fileName = sys.argv[1]
filePtr = open(fileName, 'r')
ksName = os.path.basename(fileName).split('.')[0]
if len(ksName) < 6:
today = datetime.date.today()
ksName = ksName + '_' + today.strftime("%m%d")
#open channel
client = xmlrpclib.Server(SATELLITE_URL, verbose=0)
#log into infrastructure org
key = client.auth.login(INFRA_LOGIN, INFRA_PASSWD)
client.kickstart.importFile(key, ksName, VIRT, KSTREE, filePtr.read())
#log out from infrastructure channel
client.auth.logout(key)
if __name__ == "__main__":
sys.exit(main())
iv) assocKeyKS_tenant.py – associates an existing activation key with an existing
kickstart for the tenant organization
#!/usr/bin/python
"""
This script will attempt to associate the passed activation key to the kickstart
related to the label that was passed. the org is determined by the login global variable below
"""
import xmlrpclib
import sys
SATELLITE_URL = "http://sat-vm.cloud.lab.eng.bos.redhat.com/rpc/api"
75 www.redhat.com
Vista de pagina 74
1 2 ... 70 71 72 73 74 75 76 77 78 79 80 ... 198 199

Comentarios a estos manuales

Sin comentarios