def remove(self, app):
self._affectedServers = {}
self.app = app
if not "--env:" in self.app.options:
self.app.options["--env:"] = "ALL"
else:
self.app.options["--env:"] = self.app.options["--env:"].upper()
if "ALL" in self.app.options['--app:']:
raise AppNotFoundException("Cannot create an app called ALL, because it is a reserved word")
t = timeit.default_timer()
ssh = SSH()
for appname in self.app.options['--app:']:
self._removeApp(ssh, appname)
t = timeit.default_timer() - t
if t < self.WarnDeploymentTime:
self.app.logger.info("Removal took: {:.4f} seconds".format(t))
else:
self.app.logger.warning("Removal took: {:.4f} seconds".format(t))
self._deleteInventoryEntries()
评论列表
文章目录