Bug 811658 - activationkey_create
Summary: activationkey_create
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Spacewalk
Classification: Community
Component: Server
Version: 1.8
Hardware: All
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Aron Parsons
QA Contact: Red Hat Satellite QA List
URL:
Whiteboard:
Depends On:
Blocks: space18
TreeView+ depends on / blocked
 
Reported: 2012-04-11 16:08 UTC by Daniel Forsberg
Modified: 2012-11-01 16:22 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-04-12 15:11:07 UTC
Embargoed:


Attachments (Terms of Use)

Description Daniel Forsberg 2012-04-11 16:08:06 UTC
Description of problem:
activationkey_create function does not take its options 

$ spacecmd help activationkey_create
activationkey_create: Create an activation key
usage: activationkey_create [options]

options:
  -n NAME
  -d DESCRIPTION
  -b BASE_CHANNEL
  -u set key as universal default
  -e [provisioning_entitled,enterprise_entitled,monitoring_entitled,
      virtualization_host,virtualization_host_platform]

$ spacecmd activationkey_create -n test
usage: spacecmd [options] [command]

spacecmd: error: no such option: -n


Version-Release number of selected component (if applicable):
spacecmd-1.2.2-1.el5

How reproducible:
spacecmd activationkey_create -n test

Steps to Reproduce:
1. spacecmd activationkey_create -n testkey
2.
3.
  
Actual results:
usage: spacecmd [options] [command]

spacecmd: error: no such option: -n


Expected results:

INFO: Created activation key 1-testkey

Additional info:

tested on RHEL-5.7 X86_64

have tried with more options with same result...

Comment 1 Miroslav Suchý 2012-04-12 08:09:56 UTC
Aron, can you check if this is fixed in some recent spacecmd and we need "just" to rebase it epel5 or if it present even in recent spacecmd?

Comment 2 Daniel Forsberg 2012-04-12 08:30:53 UTC
Hi,

Notised that no - or -- input works at all...

Comment 3 Daniel Forsberg 2012-04-12 10:10:28 UTC
Tested with spacecmd-1.8.3-1.el5.noarch.rpm 
from here: http://spacewalk.redhat.com/yum/nightly/RHEL/5/x86_64/

Same result...

Comment 4 Miroslav Suchý 2012-04-12 10:20:10 UTC
In such case forwarding to upstream.

Comment 5 Daniel Forsberg 2012-04-12 10:55:40 UTC
can it be some kind of python dependancy problem?

Comment 6 Aron Parsons 2012-04-12 15:11:07 UTC
Please see the "RUNNING SINGLE COMMANDS" section of the man page.  We use the 'optparse' module once for the main spacecmd options and then again for each sub-command.  When running a single command, you need to tell it to stop parsing arguments before the sub-command.

[root@spacewalk spacewalk]# rpm -q spacecmd
spacecmd-1.7.7-1.el6.noarch

[root@spacewalk ~]# spacecmd activationkey_create -n asdf
Usage: spacecmd [options] [command]

spacecmd: error: no such option: -n

[root@spacewalk ~]# spacecmd -- activationkey_create -n asdf
INFO: Connected to https://localhost/rpc/api as admin
INFO: Created activation key 1-asdf


Note You need to log in before you can comment on or make changes to this bug.