GithubHelp home page GithubHelp logo

liquidweb / liquidweb-cli Goto Github PK

View Code? Open in Web Editor NEW
11.0 11.0 6.0 774 KB

Official command line interface for the LiquidWeb API

License: Apache License 2.0

Makefile 0.07% Go 99.52% Shell 0.42%
command-line golang infrastructure liquidweb

liquidweb-cli's People

Contributors

dependabot[bot] avatar dwburke avatar jakdept avatar jvandellen avatar sgsullivan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

liquidweb-cli's Issues

"lw cloud network public list" doesn't filter out private

ssullivan@data2 ~ $ lw cloud network public list --uniq-id 2T79JD
IP Assignments for 2T79JD:
        IP: 50.28.34.90
                Id: 1210289
                Gateway: 50.28.32.1
                Broadcast: 50.28.35.255
                Netmask: 255.255.252.0
                Network: 255.255.252.0
        IP: 10.30.200.62
                Id: 1210650
                Gateway: 10.30.200.1
                Broadcast: 10.30.207.255
                Netmask: 255.255.248.0
                Network: 255.255.248.0
        IP: 50.28.34.72
                Id: 1210855
                Gateway: 50.28.32.1
                Broadcast: 50.28.35.255
                Netmask: 255.255.252.0
                Network: 255.255.252.0
ssullivan@data2 ~ $ 

`auth add-context` doesnt work if config file doesnt yet exist

auth add-context doesnt work if config file doesnt yet exist. Instead you have to either create the file as empty, or run auth init to generate your config interactively.

A fatal error has occurred:
Config File ".liquidweb-cli" Not Found in "[/home/dburke]"

we should fix this situation

Implement "network loadbalancer" commands

We need network loadbalancer commands implemented for the Cloud LoadBalancer.

Here's the api documentation for the loadbalancer methods:

https://cart.liquidweb.com/storm/api/docs/bleed/Network/LoadBalancer.html#method_addNode

Looks like at a minimum we would probably want these commands:

network loadbalancer create 
network loadbalancer delete
network loadbalancer update
network loadbalancer details
network loadbalancer list
network loadbalancer addnode
network loadbalancer removenode
network loadbalancer addservice
network loadbalancer removeservice

we might also want to put the data in methods like bleed/Network/LoadBalancer/strategies in the details/list commands.

add capability to orchestrate user-defined "plans"

A user defined plan is defined as a saved set of commands (and their accompanying flags) to run in a specific order.

For example, this would empower users to do things like execute a plan automatically, to:

1.) Create 2 webserver nodes from a custom image named "web server"
2.) Create a loadbalancer pointing it at the 2 new nodes
3.) Create a database server from custom image "database server"
4.) Attach the 3 new servers to a private network

which for example, this could be orchestrated by running:

lw plan apply /path/to/plan.yaml

`auth init` should show default answers to questions

We should make it more clear what the default choices are for questions like shown below when interacting in auth init

examples:

API URL (hit enter for default):  >
Insecure SSL Validation (yes/no) (hit enter for default):  >
API timeout (hit enter for default):  > 30
Make current context? (yes/no) > yes
Add another context? (yes/no):  > no

More detailed 'plan' documentation in README

more examples, more detail... detail all fields, and note required ones... touch more on the template variables... they can be used ANYWHERE in the yaml, including the "if/else" logic to add or remove fields

create a `auth update-context` command

create a auth update-context command. This way users can modify specific settings in their context, such as timeout for example, without having to manually edit the config file or deleting and then recreating the context with remove-context and then add-context

fill out http error code handling

i.e. 401 is unauthorized... atm it just says there was an error...

polly:~/repos/liquidweb-cli(master)$ ./_exe/liquidweb-cli cloud server status
A fatal error has occurred:

Bad HTTP response code [401] from [https://api.liquidweb.com/bleed/storm/server/list]

Use filepath.Base(os.Args[0]) to get cleaner output

thinking maybe would be more useful if you changed the output of the create Check status with 'cloud server status --uniq_id 2HUSP1' to Check status with 'liquidweb-cli cloud server status --uniq_id 2HUSP1' so you can just copy paste assuming the cli is in your path. or like remove the '' from the output to get a cleaner oneliner you can just copy

ssullivan 1:03 PM
or make it print filepath.Base(os.Args[0]) perhaps in place (edited)

ssullivan 1:04 PM
package main
import (
"fmt"
"os"
"path/filepath"
)
func main() {
fmt.Println(filepath.Base(os.Args[0]))
}

add ability to save default flag values on a global basis

Add ability to save default flag values on a global basis. For example, one should be able to save a default value for zone or template , and any command that requires those flags, should use the global default if one wasn't passed.

add a global --use-context flag

Add a global --use-context flag. This would enable running commands as "one offs" in specific contexts, without changing your current context. For example:

lw cloud server status --use-context=context1

can't handle trailing comma on destroy uniq_id list

dweb-cli(master)$ ./_exe/liquidweb-cli cloud server  destroy --uniq_id 0NAP0T,J95ZYX,0HS1TM,L4WYMH,6UZ9CT,
destroyed: 0NAP0T
destroyed: J95ZYX
destroyed: 0HS1TM
destroyed: L4WYMH
destroyed: 6UZ9CT
A fatal error has occurred:

LW::Exception::Input::Multiple: The following input errors occurred:
The required field 'uniq_id' was missing a value.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.