-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixes #711: Adding ide:list-mine command. #712
Conversation
If we were going to model our command names off of Cloud API's patterns, we'd actually name the commands something like:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
./acli.phar ide:list-mine
=======================================================================
IDEs
=======================================================================
drupal7
UUID: 4d287d5c-5e7d-4daa-b7c8-0c64c44618b1
Application: MyD7App
Subscription: MyD7App
IDE URL: https://4d287d5c-5e7d-4daa-b7c8-0c64c44618b1.ide.ahdev.cloud
Web URL: https://4d287d5c-5e7d-4daa-b7c8-0c64c44618b1.web.ahdev.cloud
=======================================================================
d8isnotdead
UUID: c7c2134c-7192-4c50-800e-1c72b592edc7
Application: Main App
Subscription: Main App
IDE URL: https://c7c2134c-7192-4c50-800e-1c72b592edc7.ide.ahdev.cloud
Web URL: https://c7c2134c-7192-4c50-800e-1c72b592edc7.web.ahdev.cloud
=======================================================================
test
UUID: abab4dd0-47d8-4db9-ad39-12ab33f35adf
Application: Main App
Subscription: Main App
IDE URL: https://abab4dd0-47d8-4db9-ad39-12ab33f35adf.ide.ahdev.cloud
Web URL: https://abab4dd0-47d8-4db9-ad39-12ab33f35adf.web.ahdev.cloud
=======================================================================
=======================================================================
Co-authored-by: Dane Powell <git@danepowell.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was already working on a review when you merged 😬 I'll still leave these comments, maybe we can follow up.
*/ | ||
protected function execute(InputInterface $input, OutputInterface $output) { | ||
$acquia_cloud_client = $this->cloudApiClientService->getClient(); | ||
$account_ides = $acquia_cloud_client->request('get', '/account/ides'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Opened an upstream issue to add this endpoint: typhonius/acquia-php-sdk-v2#208
Not a blocker for this PR, but feel free to weigh in there.
$table->setStyle('borderless'); | ||
$table->setHeaders(['IDEs']); | ||
foreach ($account_ides as $ide) { | ||
$app_url_parts = explode('/', $ide->_links->application->href); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks like it should use the same output format as ide:info
. Can we refactor this and ide:info
to use a common method that accepts an array of IDE
resources and pretty-prints a table?
Maybe even use it for ide:list
as well, with a verbose
parameter.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Filed CLI-530 so your feedback is not lost.
Motivation
Fixes #711
Proposed changes
ide:list-mine
command.ide:list
toide:list-app
, leave anide:list
for backwards compatibility.Alternatives considered
Change behavior of
ide:list
to make application argument optional.Testing steps
./bin/acli ckc
ide:list-app
ide:list-mine
Merge requirements