Name should be a required option when creating a baymodel

Bug #1453725 reported by Haiwei Xu on 2015-05-11
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-magnumclient
Undecided
Unassigned

Bug Description

Currently when creating a baymodel, name is not a required option. If name is not set, it will be 'None'

Adrian Otto (aotto) wrote :
Download full text (3.4 KiB)

Why must baymodels have names? Consider this as an example use case where a name is not needed:

stack@ao-magnum-metal:~$ magnum baymodel-create --image-id fedora-21-atomic-3 \
> --keypair-id testkey \
> --external-network-id $NIC_ID \
> --dns-nameserver 8.8.8.8 \
> --flavor-id m1.small \
> --docker-volume-size 5 \
> --coe kubernetes
+---------------------+--------------------------------------+
| Property | Value |
+---------------------+--------------------------------------+
| fixed_network | None |
| apiserver_port | None |
| uuid | c4c7f2a2-1588-4b0b-9e63-398e70360e43 |
| external_network_id | 032e1a94-19da-4325-a370-d3163b4939c3 |
| created_at | 2015-05-12T05:43:11.806645+00:00 |
| updated_at | None |
| cluster_distro | fedora-atomic |
| name | None |
| ssh_authorized_key | None |
| image_id | fedora-21-atomic-3 |
| coe | kubernetes |
| keypair_id | testkey |
| master_flavor_id | None |
| flavor_id | m1.small |
| dns_nameserver | 8.8.8.8 |
| docker_volume_size | 5 |
+---------------------+--------------------------------------+
stack@ao-magnum-metal:~$ magnum bay-create --name k8s_bay_from_no_name_baymodel --baymodel c4c7f2a2-1588-4b0b-9e63-398e70360e43 --node-count 2
+----------------+--------------------------------------+
| Property | Value |
+----------------+--------------------------------------+
| status | None |
| uuid | 2030b6c8-8045-4483-a089-9b583c36f6f1 |
| created_at | 2015-05-12T05:43:57+00:00 |
| updated_at | None |
| api_address | None |
| baymodel_id | c4c7f2a2-1588-4b0b-9e63-398e70360e43 |
| node_count | 2 |
| node_addresses | [] |
| discovery_url | None |
| name | k8s_bay_from_no_name_baymodel |
+----------------+--------------------------------------+
stack@ao-magnum-metal:~$ magnum bay-show 2030b6c8-8045-4483-a089-9b583c36f6f1
+----------------+--------------------------------------+
| Property | Value |
+----------------+--------------------------------------+
| status | CREATE_COMPLETE |
| uuid | 2030b6c8-8045-4483-a089-9b583c36f6f1 |
| created_at | 2015-05-12T05:43:57+00:00 |
| updated_at | 2015-05-12T05:44:45+00:00 |
| api_address | 172.24.4.122 |
| baymodel_id | c4c7f2a2-1588-4b0b-9e63-398e70360e43 |
...

Read more...

Haiwei Xu (xu-haiwei) wrote :

Adrian Otto

If don't give a name, baymodel will get the name 'None' automatically. That is worse than a blank name I think. So if we don't make the name a required option , what about make the name column blank if don't give a name?

Change abandoned by xu-haiwei (<email address hidden>) on branch: master
Review: https://review.openstack.org/181839

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers