(self, flags=None)
| 163 | count = 0 |
| 164 | |
| 165 | def __init__(self, flags=None): |
| 166 | super(Master, self).__init__() |
| 167 | |
| 168 | if Master.count > 0: |
| 169 | raise CLIException("Creating more than one master" |
| 170 | " is currently not possible") |
| 171 | |
| 172 | if flags is None: |
| 173 | flags = {} |
| 174 | |
| 175 | if "ip" not in flags: |
| 176 | flags["ip"] = TEST_MASTER_IP |
| 177 | if "port" not in flags: |
| 178 | flags["port"] = TEST_MASTER_PORT |
| 179 | if "work_dir" not in flags: |
| 180 | flags["work_dir"] = tempfile.mkdtemp() |
| 181 | |
| 182 | self.flags = flags |
| 183 | self.name = "master" |
| 184 | self.addr = "{ip}:{port}".format(ip=flags["ip"], port=flags["port"]) |
| 185 | self.executable = os.path.join( |
| 186 | CLITestCase.MESOS_BUILD_DIR, |
| 187 | "bin", |
| 188 | "mesos-{name}.sh".format(name=self.name)) |
| 189 | self.shell = True |
| 190 | |
| 191 | def __del__(self): |
| 192 | super(Master, self).__del__() |
nothing calls this directly
no test coverage detected