|
30 | 30 |
|
31 | 31 | create create a new application |
32 | 32 | scale scale containers by type (web=2, worker=1) |
| 33 | + info view information about the current app |
33 | 34 | open open a URL to the app in a browser |
34 | 35 | logs view aggregated log info for the app |
35 | 36 | run run a command in an ephemeral app container |
@@ -473,6 +474,25 @@ def apps_list(self, args): |
473 | 474 | else: |
474 | 475 | raise ResponseError(response) |
475 | 476 |
|
| 477 | + def apps_info(self, args): |
| 478 | + """ |
| 479 | + Print info about the current application |
| 480 | +
|
| 481 | + Usage: deis apps:info [--app=<app>] |
| 482 | + """ |
| 483 | + app = args.get('--app') |
| 484 | + if not app: |
| 485 | + app = self._session.app |
| 486 | + response = self._dispatch('get', "/api/apps/{}".format(app)) |
| 487 | + if response.status_code == requests.codes.ok: # @UndefinedVariable |
| 488 | + print("=== {} Application".format(app)) |
| 489 | + print(json.dumps(response.json(), indent=2)) |
| 490 | + print() |
| 491 | + self.containers_list(args) |
| 492 | + print() |
| 493 | + else: |
| 494 | + raise ResponseError(response) |
| 495 | + |
476 | 496 | def apps_open(self, args): |
477 | 497 | """ |
478 | 498 | Open a URL to the application in a browser |
@@ -1634,6 +1654,7 @@ def parse_args(cmd): |
1634 | 1654 | 'create': 'apps:create', |
1635 | 1655 | 'destroy': 'apps:destroy', |
1636 | 1656 | 'ps': 'containers:list', |
| 1657 | + 'info': 'apps:info', |
1637 | 1658 | 'scale': 'containers:scale', |
1638 | 1659 | 'converge': 'formations:converge', |
1639 | 1660 | 'calculate': 'apps:calculate', |
|
0 commit comments