コード例 #1
0
    def __init__(self):
        self.identity = require(IDENTITY)
        self.cp_provider = require(CP_PROVIDER)

        self.update()

        self.product_dir = inj.require(inj.PROD_DIR)
        self.entitlement_dir = inj.require(inj.ENT_DIR)
        self.certlib = CertLib(uep=self.cp_provider.get_consumer_auth_cp())

        self.cs = require(CERT_SORTER)
コード例 #2
0
 def __init__(self, lock=ActionLock(), uep=None):
     self.lock = lock
     self.uep = uep
     self.certlib = CertLib(self.lock, uep=self.uep)
     self.repolib = RepoLib(self.lock, uep=self.uep)
     self.factlib = FactLib(self.lock, uep=self.uep)
     self.profilelib = PackageProfileLib(self.lock, uep=self.uep)
     self.installedprodlib = InstalledProductsLib(self.lock, uep=self.uep)
     #healinglib requires a fact set in order to get socket count
     facts = Facts()
     self.healinglib = HealingLib(self.lock,
                                  uep=self.uep,
                                  facts_dict=facts.to_dict())
コード例 #3
0
 def __init__(self,
              lock=ActionLock(),
              uep=None,
              product_dir=None,
              facts=None):
     self.lock = lock
     self.uep = uep
     self.certlib = CertLib(self.lock, uep=self.uep)
     self.repolib = RepoLib(self.lock, uep=self.uep)
     self.factlib = FactLib(self.lock, uep=self.uep, facts=facts)
     self.profilelib = PackageProfileLib(self.lock, uep=self.uep)
     self.installedprodlib = InstalledProductsLib(self.lock, uep=self.uep)
     #healinglib requires a fact set in order to get socket count
     self.healinglib = HealingLib(self.lock, self.uep, product_dir)
     self.idcertlib = IdentityCertLib(self.lock, uep=self.uep)
コード例 #4
0
    def __init__(self):
        self.create_uep(cert_file=ConsumerIdentity.certpath(),
                        key_file=ConsumerIdentity.keypath())

        self.create_content_connection()
        # we don't know the user/pass yet, so no point in
        # creating an admin uep till we need it
        self.admin_uep = None

        self.product_dir = ProductDirectory()
        self.entitlement_dir = EntitlementDirectory()
        self.certlib = CertLib(uep=self.uep)

        self.product_monitor = file_monitor.Monitor(self.product_dir.path)
        self.entitlement_monitor = file_monitor.Monitor(
            self.entitlement_dir.path)
        self.identity_monitor = file_monitor.Monitor(ConsumerIdentity.PATH)
コード例 #5
0
    def __init__(self):
        self.create_uep(cert_file=ConsumerIdentity.certpath(),
                        key_file=ConsumerIdentity.keypath())

        self.create_content_connection()
        # we don't know the user/pass yet, so no point in
        # creating an admin uep till we need it
        self.admin_uep = None

        self.product_dir = ProductDirectory()
        self.entitlement_dir = EntitlementDirectory()
        self.certlib = CertLib(uep=self.uep)

        self.product_monitor = file_monitor.Monitor(self.product_dir.path)
        self.entitlement_monitor = file_monitor.Monitor(
            self.entitlement_dir.path)
        self.identity_monitor = file_monitor.Monitor(ConsumerIdentity.PATH)

        # connect handlers to refresh the cached data when we notice a change.
        # do this before any other handlers might connect
        self.product_monitor.connect(
            "changed", lambda monitor: self.product_dir.refresh())
        self.entitlement_monitor.connect(
            "changed", lambda monitor: self.entitlement_dir.refresh())
コード例 #6
0
    def create_uep(self):
        # Re-initialize our connection:
        self.cp_provider.set_connection_info()

        # Holds a reference to the old uep:
        self.certlib = CertLib(uep=self.cp_provider.get_consumer_auth_cp())
コード例 #7
0
 def create_uep(self, cert_file=None, key_file=None):
     # Re-initialize our connection:
     self.uep = self._create_uep(cert_file=cert_file, key_file=key_file)
     # Holds a reference to the old uep:
     self.certlib = CertLib(uep=self.uep)