Satellite API Example for SCAP Scan Does Not Work From Red Hat Satellite 5.6 Users Guide

Solution Unverified - Updated -

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 of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.