Red Hat SATELLITE 5.3.0 RELEASE NOTES Technical Information Seite 74

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 199
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 73
SATELLITE_URL = "http://sat-vm.cloud.lab.eng.bos.redhat.com/rpc/api"
TENANT_LOGIN = "tenant"
TENANT_PASSWD = "24^gold"
TENANT_ENTITLE = [ 'monitoring_entitled', 'provisioning_entitled' ]
TENANT_PARENT = 'rhel-x86_64-server-5'
TENANT_CHILDREN = ['rhn-tools-rhel-x86_64-server-5', 'ourapps' ]
TENANT_PACKAGES = [ 'ntp', 'javaApp' ]
"""
Create Key for Java Application
"""
#open channel
client = xmlrpclib.Server(SATELLITE_URL, verbose=0)
#log into tenant org
key = client.auth.login(TENANT_LOGIN, TENANT_PASSWD)
#create key
tenant_ak = client.activationkey.create(key, 'tenantrheljava', 'Key for RHEL Node with
javaApp', TENANT_PARENT, TENANT_ENTITLE, False)
#Add child channels
client.activationkey.addChildChannels(key, tenant_ak, TENANT_CHILDREN)
#Add packages
client.activationkey.addPackageNames(key, tenant_ak, TENANT_PACKAGES)
#log out from infrastructure channel
client.auth.logout(key)
#print out the defined key
print "JavaApp activation key: ", tenant_ak
iii) importKS_tenant.py – import kickstart into RHN satellite
#!/usr/bin/python
"""
This script will create a kickstart from the content of the file passed.
The ks name will be derived from the filename - if basename is less than 6 chars, date is
appended
The org, kstree and VIRT type are determined by the global variable below
"""
import xmlrpclib
import os.path
import sys
import time
import datetime
www.redhat.com 74
Seitenansicht 73
1 2 ... 69 70 71 72 73 74 75 76 77 78 79 ... 198 199

Kommentare zu diesen Handbüchern

Keine Kommentare