Esempio n. 1
0
 def postInstall(self):
     if self.cisTrue("db_user_create"):
         utils.putMessage("Creating callback management user ...")
         if not utils.execDB("Granting access rights", "mysql",
                             "GRANT SELECT ON " + self.cget("db_name") + ".subscription " +
                             "TO '" + self.cget("callback_db_login") + "'@'" + CONFIG.get("db", "user_host") + "' " +
                             "IDENTIFIED BY '" + self.cget("callback_db_password") + "';"):
             return
Esempio n. 2
0
 def postConfigure(self):
     catalina_home = ""
     if self.installp:
         tomcat_repo = self.cget("repo")
         tomcat_dir = self.cget("directory")
         tomcat_name = self.cget("name")
         catalina_home = tomcat_dir + tomcat_name + "/"
         self.cset("catalina_home", catalina_home)
         utils.putMessage("The Catalina Home directory will be: " + catalina_home)
     else:
         catalina_home = self.cget("catalina_home")
         self.cset("name", catalina_home.rstrip("/").rpartition("/")[2])
Esempio n. 3
0
    def postConfigure(self):
        url = self.setSecuredURL()
        CONFIG.set("epcis_policies", "xacml_url", url + "xi")

        # set policies directories (for ETa)
        policies_dir = CONFIG.get("epcis_policies", "dir")
        admin_dir = (policies_dir + "/admin/").replace("//", "/")
        capture_dir = (policies_dir + "/capture/").replace("//", "/")
        query_dir = (policies_dir + "/query/").replace("//", "/")
        CONFIG.set("epcis_policies", "admin_dir", admin_dir)
        CONFIG.set("epcis_policies", "capture_dir", capture_dir)
        CONFIG.set("epcis_policies", "query_dir",query_dir)

        #
        if (self.cisTrue("deploy_policies")):
            utils.putMessage("Initializing policies in " + policies_dir)
            utils.sh_mkdir_p(policies_dir)
            if utils.sh_exec("tar -C " + policies_dir + " --strip-components=1 -xaf resources/epcis_policies.tar"):
                utils.putDoneOK()
            else:
                utils.putDoneFail()