You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Tait Hoyem ce71edb91b
Update lockfile
2 years ago
lunanode_macros Remove warning categories 2 years ago
src Add CAA record type 2 years ago
.gitignore Add target to gitignore 2 years ago
Cargo.lock Update lockfile 2 years ago
Cargo.toml Version bump 2 years ago
LICENSE Add license 2 years ago
README.md Update readme 2 years ago

README.md

lunanode

This is an API to work with the LunaNode's OpenStack-compatible [citation needed] API. This crate currently covers only the most basic functionality from the Lunanode API. Currently 43/98 (44%) API calls. If you'd like to contribute additional functionality, please feel free to make an MR.

  • VM [8/21]
    • List
    • Start
    • Stop
    • Reboot
    • Diskswap
    • Rescue
    • Shelve
    • Unshelve
    • Delete
    • Info
    • Reimage
    • Resize
    • VNC
    • IP [1/3]
      • Floaitng IP Add
      • Floating IP Delete
      • IP List
    • IP Add
    • IP Delete
    • Security group Add
    • Security group Delete
  • Image [4/7]
    • Fetch
    • List
    • Details
    • Delete
    • Replicate
    • Rename
    • Retrieve
  • Volume [1/12]
    • Create
    • List
    • Info
    • Attach
    • Detach
    • Extend
    • Rename
    • Delete
    • Snapshot [0/4]
      • Create
      • List
      • Replicate
      • Delete
  • Floating IP [1/3]
    • List
    • Add
    • Delete
  • Network [1/3]
    • List
    • Add
    • Delete
  • Security Group [0/7]
    • List
    • Create
    • Delete
    • Rename
    • Rule List
    • Rule Insert
    • Rule Delete
  • Script [0/5]
    • List
    • Get
    • Create
    • Update
    • Delete
  • SSH Key [1/3]
    • List
    • Add
    • Remove
  • Plan [1/1]
    • List
  • Region [1/1]
    • List
  • Monitor [3/10]
    • Check [2/4]
      • List
      • Types
      • Add
      • Remove
    • Contact [1/4]
      • List
      • Add
      • Remove
    • Alert [0/3]
      • List
      • Add
      • Remove
  • Email [14/14]
    • Usage
    • Domain [5/5]
      • List
      • Add
      • Remove
      • DKIM [2/2]
        • Set
        • Unset
    • User [4/4]
      • List
      • Add
      • Remove
      • Set Password
    • Alias [3/3]
      • List
      • Add
      • Remove
  • DNS [9/10]
    • Zone [3/3]
      • List
      • Add
      • Remove
    • Record [3/3]
      • List
      • Add
      • Remove
    • Dyn [3/4]
      • List
      • Add
      • Update
      • Remove
  • Billing [1/1]
    • Credit

Installation

cargo install lunanode

API Keys

Add the LUNANODE_API_KEY, LUNANODE_KEY_ID and LUNANODE_API_PARTIALKEY (the first 64 chars of LUNANODE_API_KEY) to your environment variables. Without these variables set, the tool will not run. You can also specify the keys manually through command-line arguments.

Usage

See lunanode help screen.

Available subcommands:

  • billing
  • dns
  • dyn
  • floating (for LunaNode's floating IP system)
  • image
  • network
  • record (DNS)
  • ssh-key
  • vm
  • volume
  • zone

Note that right now, only getting data through the list/ endpoints is supported. See section help for more details, i.e.: lunanode image help

TODO (looking for contributors)

  • Simplify code so there is less boilerplate. In particular, writing out every enum variant is pretty annoying when I need the same info out of them either way.
  • Tests!
  • Create more detailed documentation. #[deny(missing_docs)] is on, but some of the decisions in the code aren't explained very well.
  • Cover EVERY API endpoint.
  • Stricter typing. Certain attributes, even though they are recieved as Strings, should really be some kind of enum. Make every non-String type some kind of enum.
  • UUIDs should be UUID types and not string. The only library I could find to do this, Uuid, seems to serialize them without the dashes, which screws up Lunanode... annoyingly.
  • Subnets should be more strictly types. They should always be an IP/subnet combo as two fields (std::net::Ipv4Addr, i32(0..32)).
  • Automatically create IDs from names, or other identifiying info instead of using the RESP API's id system.
    • For example: email user add tait@tait.tech should automatically fetch the domain ID required to make this call normally: email user add DOMAIN_ID tait@tait.tech.
    • Another example: vm shutdown my_webserver would automatically exapnd to find the VM with the name my_webserver and have it shutdown expanding the name into the UUID: vm shutdown ffff-ffff-ffff-ffffffffffffffff.

Support This Project