Exemplo n.º 1
0
def get_openstack_ceilometer_pkgs():
    """ Returns the list of ceilometer packages used in a
        openstack node.
    """
    pkg_juno_ubuntu = [
        "ceilometer-api",
        "ceilometer-collector",
        "ceilometer-agent-central",
        "ceilometer-agent-notification",
        "ceilometer-alarm-evaluator",
        "ceilometer-alarm-notifier",
        "ceilometer-plugin-contrail",
        "mongodb-clients",
        "python-pymongo",
    ]
    pkg_kilo_ubuntu = copy.deepcopy(pkg_juno_ubuntu)
    pkg_kilo_ubuntu.remove("ceilometer-plugin-contrail")

    pkg_redhat = ["ceilometer-plugin-contrail"]

    ceilometer_pkgs = {"ubuntu": {"juno": pkg_juno_ubuntu, "kilo": pkg_kilo_ubuntu}, "redhat": {"juno": pkg_redhat}}

    act_os_type = detect_ostype()
    openstack_sku = get_openstack_sku()
    return ceilometer_pkgs.get(act_os_type, {}).get(openstack_sku, [])
Exemplo n.º 2
0
def get_openstack_ceilometer_pkgs():
    """ Returns the list of ceilometer packages used in a
        openstack node.
    """
    pkg_juno_ubuntu = ['ceilometer-api',
        'ceilometer-collector',
        'ceilometer-agent-central',
        'ceilometer-agent-notification',
        'ceilometer-alarm-evaluator',
        'ceilometer-alarm-notifier',
        'ceilometer-plugin-contrail',
        'mongodb-clients',
        'python-pymongo']
    pkg_kilo_ubuntu = copy.deepcopy(pkg_juno_ubuntu)
    pkg_kilo_ubuntu.remove('ceilometer-plugin-contrail')

    pkg_redhat = ['ceilometer-plugin-contrail']

    ceilometer_pkgs = {
        'ubuntu' : {
                    'juno' : pkg_juno_ubuntu,
                    'kilo' : pkg_kilo_ubuntu
                   },
        'redhat' : {'juno' : pkg_redhat},
    }

    act_os_type = detect_ostype()
    openstack_sku = get_openstack_sku()
    return ceilometer_pkgs.get(act_os_type, {}).get(openstack_sku, [])
Exemplo n.º 3
0
def get_compute_pkgs(manage_nova_compute='yes'):
    """Returns a list of packages to be installed in the
       compute node.
    """
    ostype = detect_ostype()

    if get_orchestrator() is 'vcenter':
        pkgs = ['contrail-vmware-vrouter']
    else:
        pkgs = ['contrail-openstack-vrouter']

    if ostype in ['ubuntu']:
        # For Ubuntu, Install contrail-vrouter-generic package if one available for
        # node's kernel version or install contrail-vrouter-dkms
        # If dkms is already installed, continue to upgrade contrail-vrouter-dkms
        contrail_vrouter_pkg = get_vrouter_kmod_pkg()

        if env.host_string in getattr(env, 'dpdk', []):
            contrail_vrouter_pkg = 'contrail-vrouter-dpdk-init'
        # This order of installation matters, because in a node with
        # non recommended kernel installed, contrail-vrouter-dkms pkg
        # needs to get installed first before contrail-openstack-vrouter.
        if get_orchestrator() is 'vcenter':
            pkgs = [contrail_vrouter_pkg, 'contrail-vmware-vrouter']
        else:
            pkgs = [contrail_vrouter_pkg, 'contrail-openstack-vrouter']

    # Append only vrouter and contrail vrouter dependent packages
    # no need to append the contrail-openstack-vrouter, which when
    # installed will bring in nova-compute and its dependents.
    if (manage_nova_compute == 'no' and ostype in ['centos', 'redhat', 'fedora', 'centoslinux']):
        pkgs = ['contrail-vrouter-common',
               'openstack-utils',
              ]
        if get_openstack_sku() in ['juno']:
            pkgs.append('contrail-nova-vif')
    elif (manage_nova_compute== 'no' and ostype in ['ubuntu']):
        pkgs = [contrail_vrouter_pkg,
               'contrail-vrouter-common']
	if get_orchestrator() is 'openstack':
            pkgs.append('contrail-nova-vif')
        else:
            pkgs.append('contrail-vmware-vrouter')
    # Append lbaas dependent packages if haproxy is enabled..
    if getattr(testbed, 'haproxy', False):
        pkgs.append('haproxy')

    # Append lbaas dependent packages if Lbaas is enabled..
    if is_lbaas_enabled():
        pkgs.append('haproxy')
        pkgs.append('iproute')

    if ostype == 'ubuntu':
        # Append nova-docker if hypervisor for this compute host is docker.
        if get_hypervisor(env.host_string) == 'docker':
            pkgs.append('nova-docker')

    return pkgs
Exemplo n.º 4
0
def get_ceilometer_plugin_pkgs():
    """ Returns the list of ceilometer plugin packages used in a
        openstack node.
    """
    pkg_contrail_ceilometer = ["ceilometer-plugin-contrail"]
    ceilometer_plugin_pkgs = {"ubuntu": {"juno": pkg_contrail_ceilometer}, "redhat": {"juno": pkg_contrail_ceilometer}}

    act_os_type = detect_ostype()
    openstack_sku = get_openstack_sku()
    return ceilometer_plugin_pkgs.get(act_os_type, {}).get(openstack_sku, [])
Exemplo n.º 5
0
def get_vcenter_clusters(datacenter):
    clusters = []
    for dvs in datacenter['dv_switches'].keys():
         dvs_info = datacenter['dv_switches'][dvs]
         openstack_sku = get_openstack_sku(use_install_repo=True)
         if openstack_sku in ['mitaka', 'newton']:
             if len(dvs_info['clusters']) > 1:
                 print 'Error: Multiple clusters per datacenter not supported'
                 return None
         for cluster in dvs_info['clusters']:
              clusters.append(cluster)

    return clusters
Exemplo n.º 6
0
def get_vcenter_clusters(datacenter):
    clusters = []
    for dvs in datacenter['dv_switches'].keys():
        dvs_info = datacenter['dv_switches'][dvs]
        openstack_sku = get_openstack_sku(use_install_repo=True)
        if openstack_sku in ['mitaka', 'newton']:
            if len(dvs_info['clusters']) > 1:
                print 'Error: Multiple clusters per datacenter not supported'
                return None
        for cluster in dvs_info['clusters']:
            clusters.append(cluster)

    return clusters
Exemplo n.º 7
0
def get_ceilometer_plugin_pkgs():
    """ Returns the list of ceilometer plugin packages used in a
        openstack node.
    """
    pkg_contrail_ceilometer = ['ceilometer-plugin-contrail']
    ceilometer_plugin_pkgs = {
        'ubuntu' : {'juno' : pkg_contrail_ceilometer},
        'redhat' : {'juno' : pkg_contrail_ceilometer},
    }
        
    act_os_type = detect_ostype()
    openstack_sku = get_openstack_sku()
    return ceilometer_plugin_pkgs.get(act_os_type, {}).get(openstack_sku, [])
Exemplo n.º 8
0
def get_openstack_ceilometer_pkgs():
    """ Returns the list of ceilometer packages used in a
        openstack node.
    """
    pkg_ubuntu = [
        'ceilometer-api', 'ceilometer-collector', 'ceilometer-agent-central',
        'ceilometer-agent-notification', 'ceilometer-plugin-contrail',
        'mongodb-clients', 'python-pymongo'
    ]
    if get_openstack_sku() in ['juno', 'kilo', 'liberty']:
        pkg_ubuntu += [
            'ceilometer-alarm-evaluator', 'ceilometer-alarm-notifier'
        ]

    pkg_redhat = ['ceilometer-plugin-contrail']

    ceilometer_pkgs = {
        'ubuntu': pkg_ubuntu,
        'redhat': pkg_redhat,
    }

    act_os_type = detect_ostype()
    return ceilometer_pkgs.get(act_os_type, [])
Exemplo n.º 9
0
def get_openstack_ceilometer_pkgs():
    """ Returns the list of ceilometer packages used in a
        openstack node.
    """
    pkg_ubuntu = ['ceilometer-api',
        'ceilometer-collector',
        'ceilometer-agent-central',
        'ceilometer-agent-notification',
        'ceilometer-plugin-contrail',
        'mongodb-clients',
        'python-pymongo']
    if get_openstack_sku() in ['juno', 'kilo', 'liberty']:
        pkg_ubuntu += [ 'ceilometer-alarm-evaluator',
                        'ceilometer-alarm-notifier']

    pkg_redhat = ['ceilometer-plugin-contrail']

    ceilometer_pkgs = {
        'ubuntu' : pkg_ubuntu,
        'redhat' : pkg_redhat,
    }

    act_os_type = detect_ostype()
    return ceilometer_pkgs.get(act_os_type, [])