Project

General

Profile

Feature #20538

Commands for creating, updating and deleting compute profiles and attributes

Added by Tomáš Strachota over 5 years ago. Updated over 3 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
Compute resources
Target version:
-
Difficulty:
Triaged:
No
Bugzilla link:
Team Backlog:
Fixed in Releases:
Found in Releases:
In Kanboard:
Red Hat JIRA:

Description

Commands for managing compute profiles:

Compute profile commands should be quite simple:

hammer compute-profile create --name 1-Small
hammer compute-profile update --name 1-Small --new-name 1-Smaller
hammer compute-profile delete --name 1-Smaller

Commands for managing attributes:

set-attributes
  • replaces the whole set of attributes for a compute resource
hammer compute-profile set-attributes --compute-resorce tstracho-laptop --compute-profile 1-Small \
--attributes flavor=m1.small,cpus=2,memory=4GB \
--interface type=network,bridge=br0 \
--interface type=network,bridge=br1 \
--volume size=40GB
update-attributes
  • partially updates enumerated attributes, keeps the previous values for the rest
  • attributes for specific volume or interface can be updated when users specify its index (position in the list)
  • without an index the command adds a new interface/volume
hammer compute-profile update-attributes --compute-resorce tstracho-laptop --compute-profile 1-Small \
--attributes cpus=2,memory=4GB \
--interface type=network,bridge=br1,index=1 \
--volume size=40GB,index=2
erase-attributes
  • completely removes all compute attributes from a compute profile
  • we can consider other names for this command, eg. "remove-attributes" or "delete-attributes"
hammer compute-profile erase-attributes --compute-resorce tstracho-laptop --compute-profile 1-Small

Managing interfaces and volumes:

  • add-interface adds a new interface at the end of the interface list
  • remove-interface requires interface's index (position in the interface list)
  • update-interface changes attributes for an existing interface definition
  • commands for volumes (add-volume, remove-volume, update-volume) work similarly
hammer compute-profile add-interface --compute-resorce tstracho-laptop --compute-profile 1-Small --attributes type=network,bridge=br1
hammer compute-profile remove-interface --compute-resorce tstracho-laptop --compute-profile 1-Small --interface-index=1
hammer compute-profile update-interface --compute-resorce tstracho-laptop --compute-profile 1-Small --interface-index=1 --attributes type=network,bridge=br1

Related issues

Related to Hammer CLI - Feature #6344: Commands for read operations around compute profiles and attributesClosed
Related to Foreman - Bug #22037: Compute attributes create and update API miss validationsNew2017-12-20
Related to Hammer CLI - Bug #27652: Creating a host, doesn't create the host properly Closed

Associated revisions

Revision 16a30c6e (diff)
Added by Shira Maximov almost 5 years ago

Refs #20538 - add not found error type (#274)

History

#1 Updated by Tomáš Strachota over 5 years ago

  • Related to Feature #6344: Commands for read operations around compute profiles and attributes added

#2 Updated by Shira Maximov over 5 years ago

  • Assignee set to Shira Maximov
  • Status changed from New to Assigned

#3 Updated by Tomáš Strachota over 5 years ago

  • Related to Bug #22037: Compute attributes create and update API miss validations added

#4 Updated by Ondřej Pražák over 4 years ago

  • Bugzilla link set to 1561796

#5 Updated by Shira Maximov over 3 years ago

  • Fixed in Releases hammer-cli-foreman-0.17.0 added

#6 Updated by Shira Maximov over 3 years ago

  • Pull request https://github.com/theforeman/hammer-cli-foreman/pull/398 added

#7 Updated by Martin Bacovsky over 3 years ago

  • Related to Bug #27652: Creating a host, doesn't create the host properly added

#8 Updated by Martin Bacovsky over 3 years ago

  • Status changed from Assigned to Resolved

Also available in: Atom PDF