Satellite API Example for SCAP Scan Does Not Work From Red Hat Satellite 5.6 Users Guide
Issue
- Running the following script results in an error:
#!/usr/bin/python
client = xm lrpclib.Server('https://satellite.example.com/rpc/api')
key = client.auth.login('username', 'password')
client.system .scap.scheduleXccdfScan(key, 1000010001,'/usr/local/share/scap/usgcb-rhel5desktop-xccdf.xm l','--profile united_states_governm ent_configuration_baseline')
- Error
Traceback (most recent call last):
File "./scapscan.py", line 2, in <module>
client = xmlrpclib.Server('https://satellite.example.com/rpc/api')
NameError: name 'xmlrpclib' is not defined
Environment
- Red Hat Enterprise Linux 6
- Red Hat Satellite 5.6
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.