Ask Your Question
0

How can I use names that start with "-" with the CLI?

asked 2015-02-25 19:22:07 -0500

melwitt gravatar image

Example: trying to create a security group named "-securitygroup" the following error is raised:

nova secgroup-create -securitygroup "a description"

usage: nova secgroup-create <name> <description>
error: too few arguments
edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

answered 2015-02-25 19:27:21 -0500

melwitt gravatar image

updated 2015-05-15 16:52:14 -0500

This is an issue with the shell interpreting -securitygroup as an option rather than a name.

The solution here is to use "--" to signify the end of command options to the shell and have "-securitygroup" interpreted as a positional argument.

nova secgroup-create -- -securitygroup "a description"

Other examples:

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2015-02-25 19:21:42 -0500

Seen: 86 times

Last updated: May 15 '15