The following example demonstrates the user.listUsers call. The example prints the name of each group.
#!/usr/bin/python
import xmlrpclib
SATELLITE_URL = "http://satellite.example.com/rpc/api"
SATELLITE_LOGIN = "username"
SATELLITE_PASSWORD = "password"
client = xmlrpclib.Server(SATELLITE_URL, verbose=0)
key = client.auth.login(SATELLITE_LOGIN, SATELLITE_PASSWORD)
list = client.user.list_users(key)
for user in list:
print user.get('login')
client.auth.logout(key)
#!/usr/bin/python
import xmlrpclib
SATELLITE_URL = "http://satellite.example.com/rpc/api"
SATELLITE_LOGIN = "username"
SATELLITE_PASSWORD = "password"
client = xmlrpclib.Server(SATELLITE_URL, verbose=0)
key = client.auth.login(SATELLITE_LOGIN, SATELLITE_PASSWORD)
list = client.user.list_users(key)
for user in list:
print user.get('login')
client.auth.logout(key)
Copy to ClipboardCopied!Toggle word wrapToggle overflow
The following example shows how to use date-time parameters. This code schedules the installation of package rhnlib-2.5.22.9.el6.noarch to system with id 1000000001.
We help Red Hat users innovate and achieve their goals with our products and services with content they can trust. Explore our recent updates.
Making open source more inclusive
Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.
About Red Hat
We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.