Bug #342

Missing add_attribute funcionality in oneimage (CLI)

Added by Daniel Molina almost 11 years ago. Updated almost 10 years ago.

Status:ClosedStart date:09/07/2010
Priority:NormalDue date:
Assignee:Javi Fontan% Done:

0%

Category:CLI
Target version:Release 2.0
Resolution:fixed Pull request:
Affected Versions:

Description

There is a command for updating the value of an attribute and removing the attribute, but there is no command for adding a new one.

  • addattr (Add a new image attribute)
    oneimage addattr <image_id> <attribute_name> <attribute_value>
when "addattr" 
    check_parameters("addattr", 3)
    image_id=get_image_id(ARGV[0])

    image=OpenNebula::Image.new_with_id(image_id, get_one_client)

    result=image.update(ARGV[1],ARGV[2])
    if is_successful?(result)
        puts "Modified image" if ops[:verbose]
    end

Associated revisions

Revision c9e9b6b3
Added by Javi Fontan almost 11 years ago

bug #342: added addattr alias to update in oneimage

Revision ce4f15a8
Added by Juan Jose Montiel Cano about 4 years ago

consistent with labels (#342)

History

#1 Updated by Ruben S. Montero almost 11 years ago

  • Assignee changed from Daniel Molina to Javi Fontan

#2 Updated by Javi Fontan almost 11 years ago

  • Status changed from New to 3
  • Resolution set to fixed

#3 Updated by Ruben S. Montero almost 10 years ago

  • Status changed from 3 to Closed

Also available in: Atom PDF