[openstack-dev] Discussion about response value in project-specific-flavor API

unicell unicell at gmail.com
Sat Aug 25 03:53:03 UTC 2012


Hi Folks,

In the review comments of my project-specific-flavor blueprint patch,
https://review.openstack.org/#/c/11270/
Kevin raised a question about response value for public flavor access list.
And I'd like to posted here for discussion.

Sorry for the following long description area, just to illustrate the
background here.
Please scroll down and you'll see the question at the end of this email.

Quick Background
--
Project specific flavor is meant to give a flavor management choice that,
some flavor (non-public) types are only accessible for some projects,
instead of globally visible. And this flavor access list is manageable
through this API and corresponding nova client bindings.

Quick Demo
--
# Adding a new private flavor, and it is not accessible by default
stack at precise64:~$ nova flavor-create --is_public false m1.special 801 512
0 1
stack at precise64:~$ nova flavor-list
+----+-----------+-----------+------+-----------+------+-------+-------------+-----------+
| ID | Name      | Memory_MB | Disk | Ephemeral | Swap | VCPUs |
RXTX_Factor | Is_Public |
+----+-----------+-----------+------+-----------+------+-------+-------------+-----------+
| 1  | m1.tiny   | 512       | 0    | 0         |      | 1     | 1.0
  | True      |
| 2  | m1.small  | 2048      | 20   | 0         |      | 1     | 1.0
  | True      |
| 3  | m1.medium | 4096      | 40   | 0         |      | 2     | 1.0
  | True      |
| 4  | m1.large  | 8192      | 80   | 0         |      | 4     | 1.0
  | True      |
| 5  | m1.xlarge | 16384     | 160  | 0         |      | 8     | 1.0
  | True      |
+----+-----------+-----------+------+-----------+------+-------+-------------+-----------+

# Adding the current project to flavor 801's access list
stack at precise64:~$ nova flavor-access-add 801
55ea56479a6a48d699acb7afe22f00f7
+-----------+----------------------------------+
| Flavor_ID | Tenant_ID                        |
+-----------+----------------------------------+
| 801       | 55ea56479a6a48d699acb7afe22f00f7 |
+-----------+----------------------------------+

# Then this flavor (801) is accessible from this project.
stack at precise64:~$ nova flavor-list
+-----+------------+-----------+------+-----------+------+-------+-------------+-----------+
| ID  | Name       | Memory_MB | Disk | Ephemeral | Swap | VCPUs |
RXTX_Factor | Is_Public |
+-----+------------+-----------+------+-----------+------+-------+-------------+-----------+
| 1   | m1.tiny    | 512       | 0    | 0         |      | 1     | 1.0
    | True      |
| 2   | m1.small   | 2048      | 20   | 0         |      | 1     | 1.0
    | True      |
| 3   | m1.medium  | 4096      | 40   | 0         |      | 2     | 1.0
    | True      |
| 4   | m1.large   | 8192      | 80   | 0         |      | 4     | 1.0
    | True      |
| 5   | m1.xlarge  | 16384     | 160  | 0         |      | 8     | 1.0
    | True      |
| 801 | m1.special | 512       | 0    | 0         |      | 1     | 1.0
    | False     |
+-----+------------+-----------+------+-----------+------+-------+-------------+-----------+

# Retrieve flavor 801 access information
stack at precise64:~$ nova flavor-access-list --flavor 801
+-----------+----------------------------------+
| Flavor_ID | Tenant_ID                        |
+-----------+----------------------------------+
| 801       | 55ea56479a6a48d699acb7afe22f00f7 |
+-----------+----------------------------------+

# Retrieve public flavor access information
stack at precise64:~$ nova flavor-access-list --flavor 1
+-----------+-------------+
| Flavor_ID | Tenant_ID   |
+-----------+-------------+
| 1         | ALL TENANTS |
+-----------+-------------+

Question
--
For the default public flavor types, is this "ALL TENANTS" an acceptable
solution?  It was intended to provide a human readable message for public
flaovrs. And, to differentiate from a non-public flavor with no project
access configured.

Any better way to approach? Or, just leave it as it is?

Best Regards,
--
Qiu Yu
http://www.unicell.info
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20120825/d9a8c64c/attachment.html>


More information about the OpenStack-dev mailing list