Ejemplo n.º 1
0
 def get_package_info(cls):
     """
     Retrieve the package information related to the framework-alba-plugin
     This must return a dictionary with keys: 'names', 'edition', 'binaries', 'non_blocking', 'version_commands' and 'mutually_exclusive'
         Names: These are the names of the packages split up per component related to this repository (framework-alba-plugin)
             * Framework
                 * PKG_OVS_BACKEND    --> Code itself for the plugin ... duh
                 * PKG_OVS_EXTENSIONS --> Extensions code is used by the framework-alba-plugin
             * Alba
                 * PKG_ARAKOON        --> Used for arakoon-abm clusters and arakoon-nsm clusters. These also have a dependency to changes in the ALBA binary
                 * PKG_ALBA(_EE)      --> StorageDrivers deploy ALBA proxy services which depend on updates of the ALBA binary
         Edition: Used for different purposes
         Binaries: The names of the packages that come with a binary (also split up per component)
         Non Blocking: Packages which are potentially not yet available on all releases. These should be removed once every release contains these packages by default
         Version Commands: The commandos used to determine which binary version is currently active
         Mutually Exclusive: Packages which are not allowed to be installed depending on the edition. Eg: ALBA_EE cannot be installed on a 'community' edition
     :return: A dictionary containing information about the expected packages to be installed
     :rtype: dict
     """
     edition = Configuration.get_edition()
     if edition == cls.EDITION_COMMUNITY:
         return {
             'names': {
                 cls.COMP_FWK:
                 {cls.PKG_OVS_BACKEND, cls.PKG_OVS_EXTENSIONS},
                 cls.COMP_ALBA: {cls.PKG_ALBA, cls.PKG_ARAKOON}
             },
             'edition': edition,
             'binaries': {
                 cls.COMP_ALBA: {cls.PKG_ALBA, cls.PKG_ARAKOON}
             },
             'non_blocking': {cls.PKG_OVS_EXTENSIONS},
             'version_commands': {
                 cls.PKG_ALBA: cls.VERSION_CMD_ALBA,
                 cls.PKG_ARAKOON: cls.VERSION_CMD_ARAKOON
             },
             'mutually_exclusive': {cls.PKG_ALBA_EE}
         }
     elif edition == cls.EDITION_ENTERPRISE:
         return {
             'names': {
                 cls.COMP_FWK:
                 {cls.PKG_OVS_BACKEND, cls.PKG_OVS_EXTENSIONS},
                 cls.COMP_ALBA: {cls.PKG_ALBA_EE, cls.PKG_ARAKOON}
             },
             'edition': edition,
             'binaries': {
                 cls.COMP_ALBA: {cls.PKG_ALBA_EE, cls.PKG_ARAKOON}
             },
             'non_blocking': {cls.PKG_OVS_EXTENSIONS},
             'version_commands': {
                 cls.PKG_ALBA_EE: cls.VERSION_CMD_ALBA,
                 cls.PKG_ARAKOON: cls.VERSION_CMD_ARAKOON
             },
             'mutually_exclusive': {cls.PKG_ALBA}
         }
     else:
         raise ValueError(
             'Unsupported edition found: "{0}"'.format(edition))
Ejemplo n.º 2
0
 def get_package_info(cls):
     """
     Retrieve the package information related to the framework
     This must return a dictionary with keys: 'names', 'edition', 'binaries', 'non_blocking', 'version_commands' and 'mutually_exclusive'
         Names: These are the names of the packages split up per component related to this repository (framework)
             * Framework
                 * PKG_ARAKOON            --> Used for arakoon-config cluster and arakoon-ovsdb cluster
                 * PKG_OVS                --> Code itself ... duh
                 * PKG_OVS_EXTENSIONS     --> Extensions code is used by the framework repository
             * StorageDriver
                 * PKG_ARAKOON            --> StorageDrivers make use of the arakoon-voldrv cluster
                 * PKG_VOLDRV_BASE(_EE)   --> Code for StorageDriver itself
                 * PKG_VOLDRV_SERVER(_EE) --> Code for StorageDriver itself
         Edition: Used for different purposes
         Binaries: The names of the packages that come with a binary (also split up per component)
         Non Blocking: Packages which are potentially not yet available on all releases. These should be removed once every release contains these packages by default
         Version Commands: The commandos used to determine which binary version is currently active
         Mutually Exclusive: Packages which are not allowed to be installed depending on the edition. Eg: ALBA_EE cannot be installed on a 'community' edition
     :return: A dictionary containing information about the expected packages to be installed
     :rtype: dict
     """
     edition = Configuration.get_edition()
     if edition == cls.EDITION_COMMUNITY:
         return {
             'names': {
                 cls.COMP_FWK:
                 {cls.PKG_ARAKOON, cls.PKG_OVS, cls.PKG_OVS_EXTENSIONS},
                 cls.COMP_SD: {
                     cls.PKG_ARAKOON, cls.PKG_VOLDRV_BASE,
                     cls.PKG_VOLDRV_SERVER
                 }
             },
             'edition': edition,
             'binaries': {
                 cls.COMP_FWK: {cls.PKG_ARAKOON},
                 cls.COMP_SD: {cls.PKG_ARAKOON, cls.PKG_VOLDRV_SERVER}
             },
             'non_blocking': {cls.PKG_OVS_EXTENSIONS},
             'version_commands': {
                 cls.PKG_ARAKOON: cls.VERSION_CMD_ARAKOON,
                 cls.PKG_VOLDRV_BASE: cls.VERSION_CMD_SD,
                 cls.PKG_VOLDRV_SERVER: cls.VERSION_CMD_SD
             },
             'mutually_exclusive':
             {cls.PKG_VOLDRV_BASE_EE, cls.PKG_VOLDRV_SERVER_EE}
         }
     elif edition == cls.EDITION_ENTERPRISE:
         return {
             'names': {
                 cls.COMP_FWK:
                 {cls.PKG_ARAKOON, cls.PKG_OVS, cls.PKG_OVS_EXTENSIONS},
                 cls.COMP_SD: {
                     cls.PKG_ARAKOON, cls.PKG_VOLDRV_BASE_EE,
                     cls.PKG_VOLDRV_SERVER_EE
                 }
             },
             'edition': edition,
             'binaries': {
                 cls.COMP_FWK: {cls.PKG_ARAKOON},
                 cls.COMP_SD: {cls.PKG_ARAKOON, cls.PKG_VOLDRV_SERVER_EE}
             },
             'non_blocking': {cls.PKG_OVS_EXTENSIONS},
             'version_commands': {
                 cls.PKG_ARAKOON: cls.VERSION_CMD_ARAKOON,
                 cls.PKG_VOLDRV_BASE_EE: cls.VERSION_CMD_SD,
                 cls.PKG_VOLDRV_SERVER_EE: cls.VERSION_CMD_SD
             },
             'mutually_exclusive':
             {cls.PKG_VOLDRV_BASE, cls.PKG_VOLDRV_SERVER}
         }
     else:
         raise ValueError(
             'Unsupported edition found: "{0}"'.format(edition))