Ejemplo n.º 1
0
    def __init__(self):
        self.lib_struct = TemplateStructLib(domain='lib')
        super().__init__(self.lib_struct)
        self.WD_Path = Path(os.path.dirname(__file__))
        self.TEMPLATES_LIB_PATH = f'{self.WD_Path.parent}/templates/lib'

        '"" TEMPLATE VERSIONS ""'
        self.LIB_JAVA_TEMPLATE_VERSION = load_qube_template_version(
            'lib-java', self.AVAILABLE_TEMPLATES_PATH)
        self.LIB_GROOVY_TEMPLATE_VERSION = load_qube_template_version(
            'lib-groovy', self.AVAILABLE_TEMPLATES_PATH)
Ejemplo n.º 2
0
    def __init__(self):
        self.portlet_struct = TemplateStructPortlet(domain='portlet')
        super().__init__(self.portlet_struct)
        self.WD_Path = Path(os.path.dirname(__file__))
        self.TEMPLATES_Portlet_PATH = f'{self.WD_Path.parent}/templates/portlet'

        '"" TEMPLATE VERSIONS ""'
        self.PORTLET_GROOVY_TEMPLATE_VERSION = load_qube_template_version(
            'portlet-groovy', self.AVAILABLE_TEMPLATES_PATH)
        self.PORTLET_GROOVY_OSGI_TEMPLATE_VERSION = load_qube_template_version(
            'portlet-groovy_osgi', self.AVAILABLE_TEMPLATES_PATH)
Ejemplo n.º 3
0
    def __init__(self):
        self.cli_struct = TemplateStructCli(domain='cli')
        super().__init__(self.cli_struct)
        self.WD_Path = Path(os.path.dirname(__file__))
        self.TEMPLATES_CLI_PATH = f'{self.WD_Path.parent}/templates/cli'

        '"" TEMPLATE VERSIONS ""'
        self.CLI_JAVA_TEMPLATE_VERSION = load_qube_template_version('cli-java', self.AVAILABLE_TEMPLATES_PATH)
Ejemplo n.º 4
0
    def __init__(self):
        self.service_struct = TemplateStructService(domain='service')
        super().__init__(self.service_struct)
        self.WD_Path = Path(os.path.dirname(__file__))
        self.TEMPLATES_SERVICE_PATH = f'{self.WD_Path.parent}/templates/service'

        '"" TEMPLATE VERSIONS ""'
        self.SERVICE_JAVA_TEMPLATE_VERSION = load_qube_template_version('service-java', self.AVAILABLE_TEMPLATES_PATH)
Ejemplo n.º 5
0
    def sync_load_template_version(self, handle: str) -> str:
        """
        Load the version of the template available from qube specified by the handler for syncing.

        :param handle: The template handle
        :return: The actual version number of the template in qube
        """
        top_path = f'{os.path.dirname(__file__)}/..'
        available_templates_path = f'{str(top_path)}/create/templates/available_templates.yml'
        return load_qube_template_version(handle, available_templates_path)