Provide size as mandatory parameter while creating instance(troveclient)

Bug #1300068 reported by Harshada Mangesh Kakad
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack DBaaS (Trove)
New
Undecided
Harshada Mangesh Kakad

Bug Description

usage: trove create <name> <flavor_id>
                    [--size <size>]
                    [--databases <databases> [<databases> ...]]
                    [--users <users> [<users> ...]] [--backup <backup>]
                    [--availability_zone <availability_zone>]
                    [--datastore <datastore>]
                    [--datastore_version <datastore_version>]
                    [--nic <net-id=net-uuid,v4-fixed-ip=ip-addr,port-id=port-uuid>]
                    [--configuration <configuration>]

Creates a new instance.

Positional arguments:
  <name> Name of the instance.
  <flavor_id> Flavor of the instance.

Optional arguments:
  --size <size> Size of the instance disk in GB.
  --databases <databases> [<databases> ...]
                        Optional list of databases.
  --users <users> [<users> ...]
                        Optional list of users in the form user:password.
  --backup <backup> A backup UUID.
  --availability_zone <availability_zone>
                        The Zone hint to give to nova.
  --datastore <datastore>
                        A datastore name or UUID.
  --datastore_version <datastore_version>
                        A datastore version name or UUID.
  --nic <net-id=net-uuid,v4-fixed-ip=ip-addr,port-id=port-uuid>
                        Create a NIC on the instance. Specify option multiple
                        times to create multiple NICs. net-id: attach NIC to
                        network with this UUID (required, if no port-id
                        specified), v4-fixed-ip: IPv4 fixed address for NIC
                        (optional), port-id: attach NIC to port with this UUID
                        (required, if no net-id specified).
  --configuration <configuration>
                        UUID of the configuration group to attach to the
                        instance.

As size here is optional parameter, if i try creating database instance with specifying the size it gives me an error as

$trove create test 8
ERROR: Validation error: instance 'volume' is a required property

Even in dashboard size is mandatory parameter
So even using troveclient, size should be a mandatory parameter.

The new usage could be :

usage: trove create <name> <size> <flavor_id>
                    [--databases <databases> [<databases> ...]]
                    [--users <users> [<users> ...]] [--backup <backup>]
                    [--availability_zone <availability_zone>]
                    [--datastore <datastore>]
                    [--datastore_version <datastore_version>]
                    [--nic <net-id=net-uuid,v4-fixed-ip=ip-addr,port-id=port-uuid>]
                    [--configuration <configuration>]

Creates a new instance.

Positional arguments:
  <name> Name of the instance.
  <size> Size of the instance disk in GB.
  <flavor_id> Flavor of the instance.

Optional arguments:
  --databases <databases> [<databases> ...]
                        Optional list of databases.
  --users <users> [<users> ...]
                        Optional list of users in the form user:password.
  --backup <backup> A backup UUID.
  --availability_zone <availability_zone>
                        The Zone hint to give to nova.
  --datastore <datastore>
                        A datastore name or UUID.
  --datastore_version <datastore_version>
                        A datastore version name or UUID.
  --nic <net-id=net-uuid,v4-fixed-ip=ip-addr,port-id=port-uuid>
                        Create a NIC on the instance. Specify option multiple
                        times to create multiple NICs. net-id: attach NIC to
                        network with this UUID (required, if no port-id
                        specified), v4-fixed-ip: IPv4 fixed address for NIC
                        (optional), port-id: attach NIC to port with this UUID
                        (required, if no net-id specified).
  --configuration <configuration>
                        UUID of the configuration group to attach to the
                        instance.

And if no size id specified the error should be:

$ trove create test 8
usage: trove create <name> <size> <flavor_id>
                    [--databases <databases> [<databases> ...]]
                    [--users <users> [<users> ...]] [--backup <backup>]
                    [--availability_zone <availability_zone>]
                    [--datastore <datastore>]
                    [--datastore_version <datastore_version>]
                    [--nic <net-id=net-uuid,v4-fixed-ip=ip-addr,port-id=port-uuid>]
                    [--configuration <configuration>]
error: too few arguments
Try 'trove help create' for more information.

Changed in trove:
assignee: nobody → Harshada Mangesh Kakad (harshada-kakad)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.