Skip to content
This repository has been archived by the owner on Jul 24, 2021. It is now read-only.

Add CLI for hardware vendors and products #38

Merged
merged 2 commits into from
Jan 16, 2020
Merged

Conversation

perigrin
Copy link
Contributor

This PR adds basic CRUD support for Hardware Products and Vendors and closes #36.

This is a first draft and gets the basic inputs in place for improvements later.

You can operate on hardware products as a group.

$ bin/kosh hardware products help

Usage: kosh hardware products COMMAND [arg...]

Work with hardware products

Commands:
  get, ls      Get a list of all hardware products
  create       Create a hardware product

Run 'kosh hardware products COMMAND --help' for more information on a command.

Including creating a new product

$ bin/kosh hardware products create help

Usage: kosh hardware products create --sku --name --alias --rack-unit-size --validation-plan-id --rack-unit-size --purpose --bios-firmware --cpu-type [OPTIONS]

Create a hardware product
                             
Options:                     
      --name                 Name of the hardware product
      --alias                Alias for the hardware product
      --vendor               Vendor of the hardware product
      --sku                  SKU for the hardware product
      --rack-unit-size       RU size of the hardware product (default 2)
      --validation-plan-id   ID of the plan to validate the product against
      --purpose              Purpose of the product
      --bios-firmware        BIOS firmware version for the product
      --cpu-type             CPU type for the product

Or on individual products by SKU. Support for alternative selectors (UUID,
name, etc) will come later as we discover what the best methods of work are.

$ bin/kosh hardware product help

Usage: kosh hardware product SKU COMMAND [arg...]

Work with a hardware product

Arguments:
  SKU          The SKU of the hardware product. (default "help")

Commands:
  get          Show a hardware vendor's details
  delete, rm   Remove a hardware product

Run 'kosh hardware product COMMAND --help' for more information on a command.

Additionally you can work with hardware vendors as a group.

$ bin/kosh hardware vendors help

Usage: kosh hardware vendors COMMAND [arg...]

Work with hardware vendors

Commands:
  get, ls      Get a list of all hardware vendors
  create       Create a hardware vendor

Run 'kosh hardware vendors COMMAND --help' for more information on a command.

Or individually.

$ bin/kosh hardware vendor help

Usage: kosh hardware vendor NAME COMMAND [arg...]

Work a specific hardware vendor

Arguments:
  NAME         The name of the hardware vendor. (default "help")

Commands:
  get          Show a hardware vendor's details
  delete, rm   Remove a hardware vendor

Run 'kosh hardware vendor COMMAND --help' for more information on a command.

Copy link
Contributor

@karenetheridge karenetheridge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not following everything you're doing in go but the high level additions look good.

@perigrin perigrin merged commit a5b3c5b into master Jan 16, 2020
@perigrin perigrin deleted the 36-add-hardware-cli branch January 16, 2020 23:53
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for Hardware Products
2 participants