Ejemplo n.º 1
0
    def driver(self):
        driver_name = self._get_driver_name()
        driver = None

        if driver_name == 'docker':
            driver = dockr.Dockr(self)
        elif driver_name == 'ec2':
            driver = ec2.Ec2(self)
        elif driver_name == 'gce':
            driver = gce.Gce(self)
        elif driver_name == 'lxc':
            driver = lxc.Lxc(self)
        elif driver_name == 'lxd':
            driver = lxd.Lxd(self)
        elif driver_name == 'openstack':
            driver = openstack.Openstack(self)
        elif driver_name == 'static':
            driver = static.Static(self)
        elif driver_name == 'vagrant':
            driver = vagrant.Vagrant(self)
        else:
            util.exit_with_invalid_section('driver', driver_name)

        driver.name = driver_name

        return driver
Ejemplo n.º 2
0
def molecule_drivers():
    return [
        dockr.Dockr(None).name,
        ec2.Ec2(None).name,
        lxc.Lxc(None).name,
        lxd.Lxd(None).name,
        openstack.Openstack(None).name,
        static.Static(None).name,
        vagrant.Vagrant(None).name,
    ]
Ejemplo n.º 3
0
def static_instance(molecule_driver_section_data, config_instance):
    config_instance.merge_dicts(config_instance.config,
                                molecule_driver_section_data)

    return static.Static(config_instance)