def populate(self, settings, clickNext=False):
        environment = Storage.get_current(TD_Cluster.NAME)
        environment.name = settings["name"]
        environment.version = settings["version"]

        rl = ResultList("Populate create new Environment dialog")

        rl.push(self.name.set_value(settings["name"]))
        rl.push(WaitBot().wait_loading())
        rl.push(self.version.set_value(settings["version"]))
        rl.push(self.name.click())

        if "rh" in settings and len(settings["rh"]) > 0 and \
                self.instruction.is_visible():

            rh = settings["rh"]
            self.wait_loading()
            rl.push(self.select_download_mode(rh["mode"]))
            rl.push(self.username.set_value(rh["username"]))
            rl.push(self.password.set_value(rh["password"]))

            if rh["mode"] == 'rhn':
                rl.push(self.serverHostname.set_value(rh["host"]))
                rl.push(self.activationKey.set_value(rh["activation_key"]))

        if clickNext:
            self.wait_loading()
            rl.push(self.clickNext())
            WaitBot().wait_loading()

        return rl
    def populate(self, name, version, submit=False):
        environment = Storage.get_current(TD_Cluster.NAME)
        environment.name = name
        environment.version = version

        rl = ResultList("Populate create new Environment dialog") \
            .push(self.name.set_value(name)) \
            .push(self.version.set_value(version))
        if submit:
            rl.push(self.create())
        return rl