Comments (6)
The best way to implement this would be through the use of a command line option e.g. --format=json
. What I'm not sure about is whether this should be implemented as a trait or as an entirely separate class. I may even look at how the Symfony Table component is made and try and replicate with a JSON output component.
from acquia_cli.
No specific example for the data structure... i'd say fit the data in a key/value format
from acquia_cli.
Interesting idea. I'd probably want to have some kind of formatter class for outputs here so they could be overridden globally. Do you have an example of the data structure that would be of benefit here?
from acquia_cli.
I found this thread searching for the same option. In my case, I'm trying to retrieve a list of databases via acquiacli database:list prod:sitename
to script the creation of sites.php for a multisite installation. Having the ability to return json/csv results in this case would be helpful.
from acquia_cli.
I've just pushed some code into a new branch #129 to test out how this could work. If you could test this out to make sure it matches what you're expecting (domain:info
, domain:list
, and account
) then I can change some more commands over.
from acquia_cli.
so far, so good
~/Sites/devops/acquia/typhonius/acquia_cli : outputformats $ ./bin/acquiacli domain:list prod:mysitename dev --format=json
PHP Notice: Trying to get property 'id' of non-object in /Users/lnunes/Sites/devops/acquia/typhonius/acquia_cli/src/Cli/CloudApi.php on line 73
Notice: Trying to get property 'id' of non-object in /Users/lnunes/Sites/devops/acquia/typhonius/acquia_cli/src/Cli/CloudApi.php on line 73
{"0":{"hostname":"mysitenamedev.prod.acquia-sites.com","flags":{"default":true,"active":false,"uptime":false,"wildcard":false},"ip_addresses":null,"cnames":null,"environment":{"id":"999999999999999999","name":"dev"},"links":{"self":{"href":"https:\/\/cloud.acquia.com\/api\/environments\/999999999999999999\/domains\/mysitenamedev.prod.acquia-sites.com"},"status":{"href":"https:\/\/cloud.acquia.com\/api\/environments\/999999999999999999\/domains\/mysitenamedev.prod.acquia-sites.com\/status"}}},"1":{"hostname":"mysitename-dev.domain.io","flags":{"default":false,"active":true,"uptime":false,"wildcard":false},"ip_addresses":null,"cnames":null,"environment":{"id":"999999999999999999","name":"dev"},"links":{"self":{"href":"https:\/\/cloud.acquia.com\/api\/environments\/999999999999999999\/domains\/mysitename-dev.domain.io"},"status":{"href":"https:\/\/cloud.acquia.com\/api\/environments\/999999999999999999\/domains\/mysitename-dev.domain.io\/status"}}}}
from acquia_cli.
Related Issues (20)
- Too many arguments, expected arguments "command" "environmentId" error when using "code-switch" HOT 1
- "Limit" & "Sort" Options does not work for backups list HOT 1
- Call to undefined method AcquiaCloudApi\Connector\Client::addOption() HOT 1
- Option to disable backups when moving DBs
- setup:config creates an unwritable ~/.acquiacli directory. HOT 2
- downloading database backups with the acquia_cli doesn't work with the latest version of curl HOT 1
- Update to use ^3 of consolidation/robo
- PHP Fatal error: Uncaught TypeError: Argument 1 passed to Symfony\Component\Console\Helper\ProgressBar::advance() must be of the type integer, null given HOT 11
- Wrong example of deploy:prepare HOT 2
- BLT compatibility HOT 2
- Support Windows usage HOT 1
- Allow users to override the lock HOT 1
- The API token is expired during the code:switch task HOT 8
- Do not perform DB backup during the "code:switch" task until explicitly requested HOT 2
- WaitForNotification timeout (300s exceeded) HOT 2
- PHP Warning: sem_remove() HOT 6
- CI acquia task number output? HOT 4
- 300 Second task timeout limit reached HOT 1
- A way to retrieve a branch of the current environment? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from acquia_cli.