def setup(self): banner("setup", c="-") self.config = Config() self.user = self.config["cloudmesh.profile.user"] self.config = self.config["cloudmesh.cloud.docker"] self.name_generator = Name(schema=f"{self.user}-vm", counter=1) self.name = str(self.name_generator) self.name_generator.incr() self.new_name = str(self.name_generator) self.p = Provider(name="docker")
class TestName: os = "ubuntu" version = "18.04" def next_name(self): self.name_generator.incr() self.new_name = str(self.name_generator) return self.new_name def setup(self): banner("setup", c="-") self.config = Config() self.user = self.config["cloudmesh.profile.user"] self.config = self.config["cloudmesh.cloud.docker"] self.name_generator = Name(experiment="exp", group="grp", user=self.user, kind="vm", counter=1) self.name = str(self.name_generator) self.name_generator.incr() self.new_name = str(self.name_generator) self.p = Provider(name="docker") def test_01_config(self): HEADING() pprint(self.config) def test_02_version(self): HEADING() version = self.p.version() pprint(version) assert "18.09.2" == version["docker"]["version"] assert 6247962 <= int(version["docker"]["build"]) assert "18.09.2" == version.docker.version assert 6247962 <= int(version.docker.build) ''' def test_03_terminal(self): HEADING() t1 = Shell.terminal() t2 = Shell.terminal(command="pwd") ''' def test_03_images(self): HEADING images = self.p.images() pprint(images) """
def setup(self): banner("setup", c="-") self.config = Config() self.user = self.config["cloudmesh.profile.user"] self.config = self.config["cloudmesh.cloud.docker"] self.name_generator = Name(experiment="exp", group="grp", user=self.user, kind="vm", counter=1) self.name = str(self.name_generator) self.name_generator.incr() self.new_name = str(self.name_generator) self.p = Provider(name="docker")