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

[Feature] - Clean up Script list command #39

Closed
ddymko opened this issue Aug 14, 2019 · 0 comments
Closed

[Feature] - Clean up Script list command #39

ddymko opened this issue Aug 14, 2019 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@ddymko
Copy link
Contributor

ddymko commented Aug 14, 2019

The current implementation of script list gets a bit messy when there are larger/longer scripts present

Example:

➜  ~ vultr-cli script list
SCRIPTID	DATE CREATED		DATE MODIFIED		TYPE	NAME	SCRIPT
565344		2019-08-06 22:01:58	2019-08-06 22:16:16	boot	b	#!/bin/sh

cd ~

touch hello.txt
touch againagain.txt
565345	2019-08-06 22:02:20	2019-08-06 22:02:20	pxe	p	#!ipxe
# NOTE: This is an example that boots CoreOS. You'd need to add your SSH key before this would work

set base-url http://stable.release.core-os.net/amd64-usr/current

kernel ${base-url}/coreos_production_pxe.vmlinuz sshkey="ssh-rsa AAAA..." cloud-config-url=http://169.254.169.254/2014-09-12/coreos-init
initrd ${base-url}/coreos_production_pxe_image.cpio.gz
boot

You lose a bit of visibility into the information about the script itself. We should try to clean this up where we move the script contents into its own command.

So script list should be cleaned up to look something like this:

➜  ~ vultr-cli script list
SCRIPTID	DATE CREATED		DATE MODIFIED		TYPE	NAME
565344		2019-08-06 22:01:58	2019-08-06 22:16:16	boot	b	
565345	        2019-08-06 22:02:20	2019-08-06 22:02:20	pxe     p	

We remove the script field from this call.

Now we should introduce a new command vultr-cli script [script_id] or vultr-cli script [script_id] contents/list

Not entirely sure what the best sub-command will be for this. Either way the goal here is to allow users to see the contents of their script

@ddymko ddymko added the enhancement New feature or request label Aug 14, 2019
@ddymko ddymko self-assigned this Aug 14, 2019
@ddymko ddymko closed this as completed Aug 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant