def create(self, params):
        """To create an environment with name MyEnv and release id=1 run:
                fuel env create --name MyEnv --rel 1

            By default, it creates environment setting neutron with VLAN
            network segmentation as network provider
            To specify other modes add optional arguments:
                fuel env create --name MyEnv --rel 1 --net-segment-type vlan
        """

        if params.nst == 'gre':
            self.serializer.print_to_output(
                {},
                "WARNING: GRE network segmentation type is deprecated "
                "since 7.0 release."
            )

        env = Environment.create(
            params.name,
            params.release,
            params.nst,
        )

        data = env.get_fresh_data()

        self.serializer.print_to_output(
            data,
            u"Environment '{name}' with id={id} was created!"
            .format(**data)
        )
    def create(self, params):
        """To create an environment with name MyEnv and release id=1 run:
                fuel env create --name MyEnv --rel 1

            By default, it creates environment with ha_compact mode and
            neutron with VLAN network segmentation as network provider
            (WARNING: nova-network is deprecated since 6.1 release).
            To specify other modes add optional arguments:
                fuel env create --name MyEnv --rel 1 \\
                --mode ha --network-mode neutron
        """
        if params.net == "nova":
            self.serializer.print_to_output(
                {},
                "Warning: nova-network is deprecated since 6.1 release."
            )

        env = Environment.create(
            params.name,
            params.release,
            params.net,
            params.nst
        )

        if params.mode:
            data = env.set({'mode': params.mode})
        else:
            data = env.get_fresh_data()

        self.serializer.print_to_output(
            data,
            u"Environment '{name}' with id={id}, mode={mode}"
            u" and network-mode={net_provider} was created!"
            .format(**data)
        )
Beispiel #3
0
    def create(self, params):
        """To create an environment with name MyEnv and release id=1 run:
                fuel env create --name MyEnv --rel 1

            By default, it creates environment setting neutron with VLAN
            network segmentation as network provider
            To specify other modes add optional arguments:
                fuel env create --name MyEnv --rel 1 --net-segment-type vlan
        """

        if params.nst == 'gre':
            six.print_(
                "WARNING: GRE network segmentation type is deprecated "
                "since 7.0 release.",
                file=sys.stderr)

        env = Environment.create(
            params.name,
            params.release,
            params.nst,
        )

        data = env.get_fresh_data()

        self.serializer.print_to_output(
            data,
            u"Environment '{name}' with id={id} was created!".format(**data))
Beispiel #4
0
    def create(self, params):
        """To create an environment with name MyEnv and release id=1 run:
                fuel env create --name MyEnv --rel 1

           By default it creates environment in multinode mode, and nova
           network mode, to specify other modes add optional arguments:
                fuel env create --name MyEnv --rel 1 \\
                --mode ha --network-mode neutron
        """
        env = Environment.create(
            params.name,
            params.release,
            params.net,
            net_segment_type=params.nst
        )

        if params.mode:
            data = env.set({'mode': params.mode})
        else:
            data = env.get_fresh_data()

        self.serializer.print_to_output(
            data,
            u"Environment '{name}' with id={id}, mode={mode}"
            u" and network-mode={net_provider} was created!"
            .format(**data)
        )