Skip to content
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

Separate get environment and list environment function #195

Closed
wants to merge 6 commits into from

Conversation

shivam-Purohit
Copy link
Contributor

closes #194

This will also ensure better unit testing and future end 2 end testing the application.

Following is the result we get in litmusctl list chaos-environments

Enter the Project ID: 8adf62d5-64f8-4c66-ab53-63729db9dd9a

CHAOS ENVIRONMENT ID	CHAOS ENVIRONMENT NAME		CREATED AT			CREATED BY

last			last				56074-07-04 03:23:44 +0530 IST	admin

shivamnewenv		shivamnewenv			55962-10-01 15:05:45 +0530 IST	admin

newenvironmenttest	newenvironmenttest		55912-12-01 10:55:23 +0530 IST	admin

shivamenv		shivamenv			55908-04-03 16:42:51 +0530 IST	admin

Press Enter to show more environments (or type 'q' to quit): q

Following is the output for get litmusctl chaos-environment

Enter the Project ID: 8adf62d5-64f8-4c66-ab53-63729db9dd9a

Enter the Environment ID: last

CHAOS ENVIRONMENT DETAILS

CHAOS ENVIRONMENT ID	 last

CHAOS ENVIRONMENT NAME	 last

CHAOS ENVIRONMENT Type	 NON_PROD

CREATED AT		 56074-07-04 03:23:44 +0530 IST

CREATED BY		 admin

UPDATED AT		 56074-07-04 03:23:44 +0530 IST

UPDATED BY		 admin

CHAOS INFRA IDs	 

TAGS			 newtag, testtag

I added all the all the fields we could query in the get command.

Signed-off-by: Shivam Purohit <[email protected]>
Signed-off-by: Shivam Purohit <[email protected]>
Signed-off-by: Shivam Purohit <[email protected]>
@shivam-Purohit
Copy link
Contributor Author

with the latest push for delete environment
i will also refactor that according to new query.

Signed-off-by: Shivam Purohit <[email protected]>
@Nageshbansal
Copy link
Collaborator

@shivam-Purohit, as previously discussed, we've decided to merge the 'get' and 'list' commands, merging them into a single 'get' command to display information. Therefore, I'm closing this PR as resolved with reference to #206

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Separate API query for get and list environment
2 participants