Viewing File: /usr/lib/python2.7/site-packages/cloudinit/config/cc_rh_subscription.pyo
ó
oBú]c @ s† d Z d d l m Z d d l m Z e j e ƒ Z d d g Z d „ Z d e
f d „ ƒ YZ d e f d
„ ƒ YZ
e d „ Z d S(
s"
RedHat Subscription
-------------------
**Summary:** register red hat enterprise linux based system
Register a RedHat system either by username and password *or* activation and
org. Following a sucessful registration, you can auto-attach subscriptions, set
the service level, add subscriptions based on pool id, enable/disable yum
repositories based on repo id, and alter the rhsm_baseurl and server-hostname
in ``/etc/rhsm/rhs.conf``. For more details, see the ``Register RedHat
Subscription`` example config.
**Internal name:** ``cc_rh_subscription``
**Module frequency:** per instance
**Supported distros:** rhel, fedora
**Config keys**::
rh_subscription:
username: <username>
password: <password>
activation-key: <activation key>
org: <org number>
auto-attach: <true/false>
service-level: <service level>
add-pool: <list of pool ids>
enable-repo: <list of yum repo ids>
disable-repo: <list of yum repo ids>
rhsm-baseurl: <url>
server-hostname: <hostname>
iÿÿÿÿ( t log( t utilt fedorat rhelc C sñ t | d | ƒ} | j ƒ s2 | j d | ƒ d S| j ƒ sàyi| j ƒ \ } } | t k rn t | ƒ ‚ n | j ƒ } | s t d ƒ ‚ n | j rÕ | j
d k rÕ | j ƒ s t d ƒ ‚ q| j j d ƒ n7 | j r| j
ƒ sù t d ƒ ‚ q| j j d ƒ n | j d k rxt | j t ƒ sBd } t | ƒ ‚ n | j | j ƒ }
|
sxt d j | j ƒ ƒ ‚ qxn | j ƒ }
|
s™t d
ƒ ‚ n | j d ƒ Wqít k
rÜ} | j t | ƒ ƒ | j d ƒ qíXn
| j d
ƒ d S( NR s %s: module not configured.s- Registration failed or did not run completelys Setting of service-level faileds( Completed auto-attach with service levels Setting auto-attach faileds Completed auto-attachs"