Skip to content

Commit 77e266a

Browse files
author
Gabriel Monroy
committed
switch release endpoints to app
1 parent 7ae9c90 commit 77e266a

1 file changed

Lines changed: 11 additions & 11 deletions

File tree

client/deis.py

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1586,14 +1586,14 @@ def releases_info(self, args):
15861586
"""
15871587
Print info about a particular release
15881588
1589-
Usage: deis releases:info <version>
1589+
Usage: deis releases:info <version> [--app=<app>]
15901590
"""
15911591
version = args.get('<version>')
1592-
formation = args.get('--formation')
1593-
if not formation:
1594-
formation = self._session.formation
1592+
app = args.get('--app')
1593+
if not app:
1594+
app = self._session.app
15951595
response = self._dispatch(
1596-
'get', "/api/formations/{formation}/releases/{version}".format(**locals()))
1596+
'get', "/api/apps/{app}/releases/{version}".format(**locals()))
15971597
if response.status_code == requests.codes.ok: # @UndefinedVariable
15981598
print(json.dumps(response.json(), indent=2))
15991599
else:
@@ -1603,14 +1603,14 @@ def releases_list(self, args):
16031603
"""
16041604
List release history for a formation
16051605
1606-
Usage: deis releases:list
1606+
Usage: deis releases:list [--app=<app>]
16071607
"""
1608-
formation = args.get('--formation')
1609-
if not formation:
1610-
formation = self._session.formation
1611-
response = self._dispatch('get', '/api/formations/{formation}/releases'.format(**locals()))
1608+
app = args.get('--app')
1609+
if not app:
1610+
app = self._session.app
1611+
response = self._dispatch('get', '/api/apps/{app}/releases'.format(**locals()))
16121612
if response.status_code == requests.codes.ok: # @UndefinedVariable
1613-
print('=== {0} Releases'.format(formation))
1613+
print('=== {0} Releases'.format(app))
16141614
data = response.json()
16151615
for item in data['results']:
16161616
print('{version} {created}'.format(**item))

0 commit comments

Comments
 (0)