Ejemplo n.º 1
0
    def initialize(self):
        if self.config["remote_image_fqin"] == "":
            raise error.TestNAError("Unable to prepare env for test:"
                                    "run_remote_tag/remote_image_fqin have to "
                                    "be filled by functional repo address.")
        comp = DockerImage.split_to_component(self.config["remote_image_fqin"])
        (self.config["docker_repo_name"],
         self.config["docker_repo_tag"],
         self.config["docker_registry_host"],
         self.config["docker_registry_user"]) = comp

        super(run_remote_tag, self).initialize()

        dc = DockerContainers(self.parent_subtest)
        rand_name = dc.get_unique_name()
        self.sub_stuff["rand_name"] = rand_name
        self.sub_stuff["subargs"].insert(0, "--name=%s " % rand_name)