Ubuntu 24.04
Sponsored Link

OpenStack Caracal : CloudKitty का उपयोग कैसे करें2024/05/23

 

OpenStack रेटिंग सेवा (CloudKitty) का उपयोग इस प्रकार करें।

यह उदाहरण निम्न प्रकार से पर्यावरण पर आधारित है।

------------+--------------------------+--------------------------+------------
            |                          |                          |
        eth0|10.0.0.30             eth0|10.0.0.50             eth0|10.0.0.51
+-----------+-----------+  +-----------+-----------+  +-----------+-----------+
|   [ dlp.srv.world ]   |  | [ network.srv.world ] |  |  [ node01.srv.world ] |
|     (Control Node)    |  |     (Network Node)    |  |     (Compute Node)    |
|                       |  |                       |  |                       |
|  MariaDB    RabbitMQ  |  |  Neutron L2/L3 Agent  |  |        Libvirt        |
|  Memcached  Nginx     |  |   Neutron Metadata    |  |      Nova Compute     |
|  Keystone   httpd     |  |     Open vSwitch      |  |    Neutron L2 Agent   |
|  Glance     Nova API  |  |     iSCSI Target      |  |      Open vSwitch     |
|  Neutron Server       |  |     Cinder Volume     |  |   Ceilometer Compute  |
|  Neutron Metadata     |  |     httpd  Gnocchi    |  |                       |
|  Cinder API           |  |   Ceilometer Central  |  |                       |
|                       |  |     CloudKitty API    |  |                       |
+-----------------------+  +-----------------------+  +-----------------------+

[1] प्रत्येक प्रोजेक्ट के लिए [cloudkitty] उपयोगकर्ता को [rating] भूमिका में जोड़ें जिसे आप रेटिंग देना चाहते हैं।
root@dlp ~(keystone)#
openstack project list

+----------------------------------+-----------+
| ID                               | Name      |
+----------------------------------+-----------+
| 18ede7365bdc430093e8fd4a90f77369 | hiroshima |
| 9c5145f76fd84324bdd2b1b61658a282 | admin     |
| ab9749e59bdb48e4807a18abb83c9f99 | service   |
+----------------------------------+-----------+

root@dlp ~(keystone)#
openstack role add --user cloudkitty --project hiroshima rating

[2] [Hashmap] मॉड्यूल सक्षम करें।
root@dlp ~(keystone)#
openstack rating module list

+-----------+---------+----------+
| Module    | Enabled | Priority |
+-----------+---------+----------+
| hashmap   | False   |        1 |
| noop      | True    |        1 |
| pyscripts | False   |        1 |
+-----------+---------+----------+

root@dlp ~(keystone)#
openstack rating module enable hashmap

+---------+---------+----------+
| Module  | Enabled | Priority |
+---------+---------+----------+
| hashmap | True    |        1 |
+---------+---------+----------+

root@dlp ~(keystone)#
openstack rating module list

+-----------+---------+----------+
| Module    | Enabled | Priority |
+-----------+---------+----------+
| hashmap   | True    |        1 |
| noop      | True    |        1 |
| pyscripts | False   |        1 |
+-----------+---------+----------+
[3] दर को इंस्टेंस अपटाइम पर सेट करें।
जब प्रोजेक्ट में उपयोगकर्ता [1] पर सेट होते हैं तो आपके द्वारा सेट किए गए [flavor_id] के साथ इंस्टेंस बनाते हैं और शुरू करते हैं, लक्ष्य परियोजना पर आपके द्वारा [cloudkitty.conf] में निर्धारित [अवधि] के प्रत्येक अंतराल पर आपके द्वारा निर्धारित दर पर शुल्क लिया जाता है।
# सेवा मिलान नियम जोड़ें

root@dlp ~(keystone)#
openstack rating hashmap service create instance

+----------+--------------------------------------+
| Name     | Service ID                           |
+----------+--------------------------------------+
| instance | bcf7fd50-df0c-448f-b156-d9df88bc01a0 |
+----------+--------------------------------------+

# फ़ील्ड मिलान नियम जोड़ें

root@dlp ~(keystone)#
openstack rating hashmap field create bcf7fd50-df0c-448f-b156-d9df88bc01a0 flavor_id

+-----------+--------------------------------+---------------------------------+
| Name      | Field ID                       | Service ID                      |
+-----------+--------------------------------+---------------------------------+
| flavor_id | 01d3df54-63d2-45e7-bd82-       | bcf7fd50-df0c-448f-b156-        |
|           | 7ca034f1e712                   | d9df88bc01a0                    |
+-----------+--------------------------------+---------------------------------+

root@dlp ~(keystone)#
openstack flavor list

+----+-----------+------+------+-----------+-------+-----------+
| ID | Name      |  RAM | Disk | Ephemeral | VCPUs | Is Public |
+----+-----------+------+------+-----------+-------+-----------+
| 1  | m1.tiny   | 2048 |   10 |         0 |     1 | True      |
| 2  | m1.small  | 4096 |   10 |         0 |     2 | True      |
| 3  | m1.medium | 8192 |   10 |         0 |     4 | True      |
| 4  | m2.medium | 8192 |   10 |        10 |     4 | True      |
+----+-----------+------+------+-----------+-------+-----------+

# मैपिंग नियम जोड़ें
# [flavor_id] = [2] वाले उदाहरणों के लिए [0.5] की लागत निर्धारित करें
root@dlp ~(keystone)# openstack rating hashmap mapping create 0.5 \
--field-id 01d3df54-63d2-45e7-bd82-7ca034f1e712 \
--value 2 -t flat 
+------------+-------+----------+------+----------+------------+----------+------------+
| Mapping ID | Value | Cost     | Type | Field ID | Service ID | Group ID | Project ID |
+------------+-------+----------+------+----------+------------+----------+------------+
| 38f07b51-  | 2     | 0.500000 | flat | 01d3df54 | None       | None     | None       |
| 9a38-4af5- |       | 00000000 |      | -63d2-   |            |          |            |
| 880c-      |       | 00000000 |      | 45e7-    |            |          |            |
| 65c43b5bf3 |       | 000000   |      | bd82-    |            |          |            |
| d9         |       |          |      | 7ca034f1 |            |          |            |
|            |       |          |      | e712     |            |          |            |
+------------+-------+----------+------+----------+------------+----------+------------+
[4] उस उपयोगकर्ता के साथ सेटिंग्स सत्यापित करें जो उस प्रोजेक्ट में है जिसे आपने इंस्टेंस बनाने या शुरू करने के लिए [1] पर सेट किया है।
ubuntu@dlp ~(keystone)$
openstack server list

+--------------+-------------+---------+--------------+------------+----------+
| ID           | Name        | Status  | Networks     | Image      | Flavor   |
+--------------+-------------+---------+--------------+------------+----------+
| 7fbc24c1-    | Ubuntu-2404 | SHUTOFF | private=10.0 | Ubuntu2404 | m1.small |
| c0d1-43d6-   |             |         | .0.208, 192. |            |          |
| 87aa-        |             |         | 168.100.130  |            |          |
| 68df83597b57 |             |         |              |            |          |
+--------------+-------------+---------+--------------+------------+----------+

ubuntu@dlp ~(keystone)$
openstack server start Ubuntu-2404
# एक निश्चित अवधि के बाद, लागत वसूल की जाती है

ubuntu@dlp ~(keystone)$
openstack rating summary get

+-----------------+---------------+------+-----------------+-----------------+
| Tenant ID       | Resource Type | Rate | Begin Time      | End Time        |
+-----------------+---------------+------+-----------------+-----------------+
| 18ede7365bdc430 | ALL           | 0.5  | 2024-05-        | 2024-06-        |
| 093e8fd4a90f773 |               |      | 01T00:00:00     | 01T00:00:00     |
| 69              |               |      |                 |                 |
+-----------------+---------------+------+-----------------+-----------------+

# यदि इंस्टेंस चलता रहता है, तो प्रत्येक [अवधि] में लागत ली जाती है

ubuntu@dlp ~(keystone)$
openstack rating summary get

+-----------------+---------------+------+-----------------+-----------------+
| Tenant ID       | Resource Type | Rate | Begin Time      | End Time        |
+-----------------+---------------+------+-----------------+-----------------+
| 18ede7365bdc430 | ALL           | 1.0  | 2024-05-        | 2024-06-        |
| 093e8fd4a90f773 |               |      | 01T00:00:00     | 01T00:00:00     |
| 69              |               |      |                 |                 |
+-----------------+---------------+------+-----------------+-----------------+

# डेटा फ़्रेम प्रदर्शित करें

ubuntu@dlp ~(keystone)$
openstack rating dataframes get

+------------------+------------------+------------------+---------------------+
| Begin            | End              | Project ID       | Resources           |
+------------------+------------------+------------------+---------------------+
| 2024-05-         | 2024-05-         | 18ede7365bdc4300 | [{'rating': '0.0',  |
| 23T01:10:00      | 23T01:20:00      | 93e8fd4a90f77369 | 'service':          |
|                  |                  |                  | 'instance', 'desc': |
|                  |                  |                  | {'flavor_name':     |
|                  |                  |                  | 'm1.small',         |
|                  |                  |                  | 'flavor_id': '2',   |
|                  |                  |                  | 'vcpus': '', 'id':  |
|                  |                  |                  | '7fbc24c1-c0d1-     |
|                  |                  |                  | 43d6-87aa-          |
|                  |                  |                  | 68df83597b57',      |
|                  |                  |                  | 'project_id': '18ed |
|                  |                  |                  | e7365bdc430093e8fd4 |
|                  |                  |                  | a90f77369',         |
|                  |                  |                  | 'user_id': 'b9371d0 |
|                  |                  |                  | 15e0d43dca74f291614 |
|                  |                  |                  | 48ffd2',            |
|                  |                  |                  | 'week_of_the_year': |
|                  |                  |                  | '20',               |
|                  |                  |                  | 'day_of_the_year':  |
|                  |                  |                  | '144', 'month':     |
|                  |                  |                  | '5', 'year':        |
|                  |                  |                  | '2024',             |
|                  |                  |                  | 'tenant_id': '18ede |
|                  |                  |                  | 7365bdc430093e8fd4a |
|                  |                  |                  | 90f77369'},         |
|                  |                  |                  | 'volume': '1',      |
|                  |                  |                  | 'rate_value':       |
|                  |                  |                  | '0.0000'}]          |
| 2024-05-         | 2024-05-         | 18ede7365bdc4300 | [{'rating': '0.0',  |
| 23T01:30:00      | 23T01:40:00      | 93e8fd4a90f77369 | 'service':          |
|                  |                  |                  | 'volume.size',      |
|                  |                  |                  | 'desc':             |
|                  |                  |                  | {'volume_type':     |
|                  |                  |                  | '__DEFAULT__',      |
|                  |                  |                  | 'id': 'f3515141-    |
|                  |                  |                  | 8e83-441d-b7e2-     |
|                  |                  |                  | 0136d8e1c0a7',      |
|                  |                  |                  | 'project_id': '18ed |
|                  |                  |                  | e7365bdc430093e8fd4 |
|                  |                  |                  | a90f77369',         |
|                  |                  |                  | 'user_id': 'b9371d0 |
|                  |                  |                  | 15e0d43dca74f291614 |
|                  |                  |                  | 48ffd2',            |
|                  |                  |                  | 'week_of_the_year': |
|                  |                  |                  | '20',               |
|                  |                  |                  | 'day_of_the_year':  |
|                  |                  |                  | '144', 'month':     |
|                  |                  |                  | '5', 'year':        |
|                  |                  |                  | '2024',             |
|                  |                  |                  | 'tenant_id': '18ede |
|                  |                  |                  | 7365bdc430093e8fd4a |
|                  |                  |                  | 90f77369'},         |
|                  |                  |                  | 'volume': '1E+1',   |
|                  |                  |                  | 'rate_value':       |
|                  |                  |                  | '0.0000'}]          |
| 2024-05-         | 2024-05-         | 18ede7365bdc4300 | [{'rating': '0.5',  |
| 23T01:50:00      | 23T02:00:00      | 93e8fd4a90f77369 | 'service':          |
|                  |                  |                  | 'instance', 'desc': |
|                  |                  |                  | {'flavor_name':     |
|                  |                  |                  | 'm1.small',         |
|                  |                  |                  | 'flavor_id': '2',   |
|                  |                  |                  | 'vcpus': '', 'id':  |
|                  |                  |                  | '7fbc24c1-c0d1-     |
|                  |                  |                  | 43d6-87aa-          |
|                  |                  |                  | 68df83597b57',      |
|                  |                  |                  | 'project_id': '18ed |
|                  |                  |                  | e7365bdc430093e8fd4 |
|                  |                  |                  | a90f77369',         |
|                  |                  |                  | 'user_id': 'b9371d0 |
|                  |                  |                  | 15e0d43dca74f291614 |
|                  |                  |                  | 48ffd2',            |
|                  |                  |                  | 'week_of_the_year': |
|                  |                  |                  | '20',               |
|                  |                  |                  | 'day_of_the_year':  |
|                  |                  |                  | '144', 'month':     |
|                  |                  |                  | '5', 'year':        |
|                  |                  |                  | '2024',             |
|                  |                  |                  | 'tenant_id': '18ede |
|                  |                  |                  | 7365bdc430093e8fd4a |
|                  |                  |                  | 90f77369'},         |
|                  |                  |                  | 'volume': '1',      |
|                  |                  |                  | 'rate_value':       |
|                  |                  |                  | '0.5000'}]          |
| 2024-05-         | 2024-05-         | 18ede7365bdc4300 | [{'rating': '0.5',  |
| 23T02:00:00      | 23T02:10:00      | 93e8fd4a90f77369 | 'service':          |
|                  |                  |                  | 'instance', 'desc': |
|                  |                  |                  | {'flavor_name':     |
|                  |                  |                  | 'm1.small',         |
|                  |                  |                  | 'flavor_id': '2',   |
|                  |                  |                  | 'vcpus': '', 'id':  |
|                  |                  |                  | '7fbc24c1-c0d1-     |
|                  |                  |                  | 43d6-87aa-          |
|                  |                  |                  | 68df83597b57',      |
|                  |                  |                  | 'project_id': '18ed |
|                  |                  |                  | e7365bdc430093e8fd4 |
|                  |                  |                  | a90f77369',         |
|                  |                  |                  | 'user_id': 'b9371d0 |
|                  |                  |                  | 15e0d43dca74f291614 |
|                  |                  |                  | 48ffd2',            |
|                  |                  |                  | 'week_of_the_year': |
|                  |                  |                  | '20',               |
|                  |                  |                  | 'day_of_the_year':  |
|                  |                  |                  | '144', 'month':     |
|                  |                  |                  | '5', 'year':        |
|                  |                  |                  | '2024',             |
|                  |                  |                  | 'tenant_id': '18ede |
|                  |                  |                  | 7365bdc430093e8fd4a |
|                  |                  |                  | 90f77369'},         |
|                  |                  |                  | 'volume': '1',      |
|                  |                  |                  | 'rate_value':       |
|                  |                  |                  | '0.5000'}]          |
+------------------+------------------+------------------+---------------------+
[5] दर को वॉल्यूम आकार पर सेट करें।
जब प्रोजेक्ट में उपयोगकर्ता [1] पर सेट होते हैं तो cinder वॉल्यूम बनाते हैं, लक्ष्य परियोजना से आपके द्वारा प्रति गीगाबाइट निर्धारित दर पर शुल्क लिया जाता है।
# सेवा मिलान नियम जोड़ें

root@dlp ~(keystone)#
openstack rating hashmap service create volume.size

+-------------+--------------------------------------+
| Name        | Service ID                           |
+-------------+--------------------------------------+
| volume.size | f5ef8afc-80d9-4ca4-9d9b-935359f4dab7 |
+-------------+--------------------------------------+

# मैपिंग नियम जोड़ें
# प्रति गीगाबाइट [1.5] की लागत निर्धारित करें
root@dlp ~(keystone)# openstack rating hashmap mapping create 1.5 \
-s f5ef8afc-80d9-4ca4-9d9b-935359f4dab7 \
-t flat 
+------------+-------+----------+------+----------+------------+----------+------------+
| Mapping ID | Value | Cost     | Type | Field ID | Service ID | Group ID | Project ID |
+------------+-------+----------+------+----------+------------+----------+------------+
| dff6593b-  | None  | 1.500000 | flat | None     | f5ef8afc-  | None     | None       |
| bdc9-42ec- |       | 00000000 |      |          | 80d9-4ca4- |          |            |
| a4f0-      |       | 00000000 |      |          | 9d9b-      |          |            |
| 864201dad2 |       | 000000   |      |          | 935359f4da |          |            |
| c8         |       |          |      |          | b7         |          |            |
+------------+-------+----------+------+----------+------------+----------+------------+

# 30 जीबी से अधिक वॉल्यूम पर 10% की छूट निर्धारित करें
root@dlp ~(keystone)# openstack rating hashmap threshold create 30 0.90 \
-s f5ef8afc-80d9-4ca4-9d9b-935359f4dab7 \
-t rate 
+--------------+----------+----------+------+----------+------------+----------+------------+
| Threshold ID | Level    | Cost     | Type | Field ID | Service ID | Group ID | Project ID |
+--------------+----------+----------+------+----------+------------+----------+------------+
| 7beb63cf-    | 30.00000 | 0.900000 | rate | None     | f5ef8afc-  | None     | None       |
| 9f66-4abe-   | 000      | 00000000 |      |          | 80d9-4ca4- |          |            |
| 9b01-        |          | 00222044 |      |          | 9d9b-      |          |            |
| 81cf81f04d17 |          | 604925   |      |          | 935359f4da |          |            |
|              |          |          |      |          | b7         |          |            |
+--------------+----------+----------+------+----------+------------+----------+------------+
[6] उस उपयोगकर्ता के साथ सेटिंग्स सत्यापित करें जो उस प्रोजेक्ट में है जिसे आपने वॉल्यूम बनाने के लिए [1] पर सेट किया है।
ubuntu@dlp ~(keystone)$
openstack rating summary get

+-----------------+---------------+------+-----------------+-----------------+
| Tenant ID       | Resource Type | Rate | Begin Time      | End Time        |
+-----------------+---------------+------+-----------------+-----------------+
| 18ede7365bdc430 | ALL           | 1.5  | 2024-05-        | 2024-06-        |
| 093e8fd4a90f773 |               |      | 01T00:00:00     | 01T00:00:00     |
| 69              |               |      |                 |                 |
+-----------------+---------------+------+-----------------+-----------------+

ubuntu@dlp ~(keystone)$ openstack volume create --size 10 disk01 

ubuntu@dlp ~(keystone)$
openstack volume list

+------------------------------------+--------+-----------+------+-------------+
| ID                                 | Name   | Status    | Size | Attached to |
+------------------------------------+--------+-----------+------+-------------+
| be53c7f4-7574-45cd-8020-           | disk01 | available |   10 |             |
| 1d09fcd47945                       |        |           |      |             |
+------------------------------------+--------+-----------+------+-------------+

# एक निश्चित अवधि के बाद, लागत वसूल की जाती है

ubuntu@dlp ~(keystone)$
openstack rating summary get

+-----------------+---------------+------+-----------------+-----------------+
| Tenant ID       | Resource Type | Rate | Begin Time      | End Time        |
+-----------------+---------------+------+-----------------+-----------------+
| 18ede7365bdc430 | ALL           | 16.5 | 2024-05-        | 2024-06-        |
| 093e8fd4a90f773 |               |      | 01T00:00:00     | 01T00:00:00     |
| 69              |               |      |                 |                 |
+-----------------+---------------+------+-----------------+-----------------+

ubuntu@dlp ~(keystone)$
openstack rating dataframes get

+------------------+------------------+------------------+---------------------+
| Begin            | End              | Project ID       | Resources           |
+------------------+------------------+------------------+---------------------+
| 2024-05-         | 2024-05-         | 18ede7365bdc4300 | [{'rating': '0.0',  |
| 23T01:10:00      | 23T01:20:00      | 93e8fd4a90f77369 | 'service':          |
|                  |                  |                  | 'instance', 'desc': |
|                  |                  |                  | {'flavor_name':     |
|                  |                  |                  | 'm1.small',         |
|                  |                  |                  | 'flavor_id': '2',   |
|                  |                  |                  | 'vcpus': '', 'id':  |
|                  |                  |                  | '7fbc24c1-c0d1-     |
|                  |                  |                  | 43d6-87aa-          |
|                  |                  |                  | 68df83597b57',      |
|                  |                  |                  | 'project_id': '18ed |
|                  |                  |                  | e7365bdc430093e8fd4 |
|                  |                  |                  | a90f77369',         |
|                  |                  |                  | 'user_id': 'b9371d0 |
|                  |                  |                  | 15e0d43dca74f291614 |
|                  |                  |                  | 48ffd2',            |
|                  |                  |                  | 'week_of_the_year': |
|                  |                  |                  | '20',               |
|                  |                  |                  | 'day_of_the_year':  |
|                  |                  |                  | '144', 'month':     |
|                  |                  |                  | '5', 'year':        |
|                  |                  |                  | '2024',             |
|                  |                  |                  | 'tenant_id': '18ede |
|                  |                  |                  | 7365bdc430093e8fd4a |
|                  |                  |                  | 90f77369'},         |
|                  |                  |                  | 'volume': '1',      |
|                  |                  |                  | 'rate_value':       |
|                  |                  |                  | '0.0000'}]          |
| 2024-05-         | 2024-05-         | 18ede7365bdc4300 | [{'rating': '0.0',  |
| 23T01:30:00      | 23T01:40:00      | 93e8fd4a90f77369 | 'service':          |
|                  |                  |                  | 'volume.size',      |
|                  |                  |                  | 'desc':             |
|                  |                  |                  | {'volume_type':     |
|                  |                  |                  | '__DEFAULT__',      |
|                  |                  |                  | 'id': 'f3515141-    |
|                  |                  |                  | 8e83-441d-b7e2-     |
|                  |                  |                  | 0136d8e1c0a7',      |
|                  |                  |                  | 'project_id': '18ed |
|                  |                  |                  | e7365bdc430093e8fd4 |
|                  |                  |                  | a90f77369',         |
|                  |                  |                  | 'user_id': 'b9371d0 |
|                  |                  |                  | 15e0d43dca74f291614 |
|                  |                  |                  | 48ffd2',            |
|                  |                  |                  | 'week_of_the_year': |
|                  |                  |                  | '20',               |
|                  |                  |                  | 'day_of_the_year':  |
|                  |                  |                  | '144', 'month':     |
|                  |                  |                  | '5', 'year':        |
|                  |                  |                  | '2024',             |
|                  |                  |                  | 'tenant_id': '18ede |
|                  |                  |                  | 7365bdc430093e8fd4a |
|                  |                  |                  | 90f77369'},         |
|                  |                  |                  | 'volume': '1E+1',   |
|                  |                  |                  | 'rate_value':       |
|                  |                  |                  | '0.0000'}]          |
| 2024-05-         | 2024-05-         | 18ede7365bdc4300 | [{'rating': '0.5',  |
| 23T01:50:00      | 23T02:00:00      | 93e8fd4a90f77369 | 'service':          |
|                  |                  |                  | 'instance', 'desc': |
|                  |                  |                  | {'flavor_name':     |
|                  |                  |                  | 'm1.small',         |
|                  |                  |                  | 'flavor_id': '2',   |
|                  |                  |                  | 'vcpus': '', 'id':  |
|                  |                  |                  | '7fbc24c1-c0d1-     |
|                  |                  |                  | 43d6-87aa-          |
|                  |                  |                  | 68df83597b57',      |
|                  |                  |                  | 'project_id': '18ed |
|                  |                  |                  | e7365bdc430093e8fd4 |
|                  |                  |                  | a90f77369',         |
|                  |                  |                  | 'user_id': 'b9371d0 |
|                  |                  |                  | 15e0d43dca74f291614 |
|                  |                  |                  | 48ffd2',            |
|                  |                  |                  | 'week_of_the_year': |
|                  |                  |                  | '20',               |
|                  |                  |                  | 'day_of_the_year':  |
|                  |                  |                  | '144', 'month':     |
|                  |                  |                  | '5', 'year':        |
|                  |                  |                  | '2024',             |
|                  |                  |                  | 'tenant_id': '18ede |
|                  |                  |                  | 7365bdc430093e8fd4a |
|                  |                  |                  | 90f77369'},         |
|                  |                  |                  | 'volume': '1',      |
|                  |                  |                  | 'rate_value':       |
|                  |                  |                  | '0.5000'}]          |
| 2024-05-         | 2024-05-         | 18ede7365bdc4300 | [{'rating': '0.5',  |
| 23T02:00:00      | 23T02:10:00      | 93e8fd4a90f77369 | 'service':          |
|                  |                  |                  | 'instance', 'desc': |
|                  |                  |                  | {'flavor_name':     |
|                  |                  |                  | 'm1.small',         |
|                  |                  |                  | 'flavor_id': '2',   |
|                  |                  |                  | 'vcpus': '', 'id':  |
|                  |                  |                  | '7fbc24c1-c0d1-     |
|                  |                  |                  | 43d6-87aa-          |
|                  |                  |                  | 68df83597b57',      |
|                  |                  |                  | 'project_id': '18ed |
|                  |                  |                  | e7365bdc430093e8fd4 |
|                  |                  |                  | a90f77369',         |
|                  |                  |                  | 'user_id': 'b9371d0 |
|                  |                  |                  | 15e0d43dca74f291614 |
|                  |                  |                  | 48ffd2',            |
|                  |                  |                  | 'week_of_the_year': |
|                  |                  |                  | '20',               |
|                  |                  |                  | 'day_of_the_year':  |
|                  |                  |                  | '144', 'month':     |
|                  |                  |                  | '5', 'year':        |
|                  |                  |                  | '2024',             |
|                  |                  |                  | 'tenant_id': '18ede |
|                  |                  |                  | 7365bdc430093e8fd4a |
|                  |                  |                  | 90f77369'},         |
|                  |                  |                  | 'volume': '1',      |
|                  |                  |                  | 'rate_value':       |
|                  |                  |                  | '0.5000'}]          |
| 2024-05-         | 2024-05-         | 18ede7365bdc4300 | [{'rating': '0.5',  |
| 23T02:10:00      | 23T02:20:00      | 93e8fd4a90f77369 | 'service':          |
|                  |                  |                  | 'instance', 'desc': |
|                  |                  |                  | {'flavor_name':     |
|                  |                  |                  | 'm1.small',         |
|                  |                  |                  | 'flavor_id': '2',   |
|                  |                  |                  | 'vcpus': '', 'id':  |
|                  |                  |                  | '7fbc24c1-c0d1-     |
|                  |                  |                  | 43d6-87aa-          |
|                  |                  |                  | 68df83597b57',      |
|                  |                  |                  | 'project_id': '18ed |
|                  |                  |                  | e7365bdc430093e8fd4 |
|                  |                  |                  | a90f77369',         |
|                  |                  |                  | 'user_id': 'b9371d0 |
|                  |                  |                  | 15e0d43dca74f291614 |
|                  |                  |                  | 48ffd2',            |
|                  |                  |                  | 'week_of_the_year': |
|                  |                  |                  | '20',               |
|                  |                  |                  | 'day_of_the_year':  |
|                  |                  |                  | '144', 'month':     |
|                  |                  |                  | '5', 'year':        |
|                  |                  |                  | '2024',             |
|                  |                  |                  | 'tenant_id': '18ede |
|                  |                  |                  | 7365bdc430093e8fd4a |
|                  |                  |                  | 90f77369'},         |
|                  |                  |                  | 'volume': '1',      |
|                  |                  |                  | 'rate_value':       |
|                  |                  |                  | '0.5000'}]          |
| 2024-05-         | 2024-05-         | 18ede7365bdc4300 | [{'rating': '15.0', |
| 23T03:20:00      | 23T03:30:00      | 93e8fd4a90f77369 | 'service':          |
|                  |                  |                  | 'volume.size',      |
|                  |                  |                  | 'desc':             |
|                  |                  |                  | {'volume_type':     |
|                  |                  |                  | '__DEFAULT__',      |
|                  |                  |                  | 'id': 'be53c7f4-    |
|                  |                  |                  | 7574-45cd-8020-     |
|                  |                  |                  | 1d09fcd47945',      |
|                  |                  |                  | 'project_id': '18ed |
|                  |                  |                  | e7365bdc430093e8fd4 |
|                  |                  |                  | a90f77369',         |
|                  |                  |                  | 'user_id': 'b9371d0 |
|                  |                  |                  | 15e0d43dca74f291614 |
|                  |                  |                  | 48ffd2',            |
|                  |                  |                  | 'week_of_the_year': |
|                  |                  |                  | '20',               |
|                  |                  |                  | 'day_of_the_year':  |
|                  |                  |                  | '144', 'month':     |
|                  |                  |                  | '5', 'year':        |
|                  |                  |                  | '2024',             |
|                  |                  |                  | 'tenant_id': '18ede |
|                  |                  |                  | 7365bdc430093e8fd4a |
|                  |                  |                  | 90f77369'},         |
|                  |                  |                  | 'volume': '1E+1',   |
|                  |                  |                  | 'rate_value':       |
|                  |                  |                  | '1.5000'}]          |
+------------------+------------------+------------------+---------------------+

ubuntu@dlp ~(keystone)$
openstack volume create --size 30 disk02

ubuntu@dlp ~(keystone)$
openstack volume list

+------------------------------------+--------+-----------+------+-------------+
| ID                                 | Name   | Status    | Size | Attached to |
+------------------------------------+--------+-----------+------+-------------+
| c5a797ab-e638-4cb8-94bf-           | disk02 | available |   30 |             |
| 2fb185878626                       |        |           |      |             |
| be53c7f4-7574-45cd-8020-           | disk01 | available |   10 |             |
| 1d09fcd47945                       |        |           |      |             |
+------------------------------------+--------+-----------+------+-------------+

# एक निश्चित अवधि के बाद, लागत वसूल की जाती है
# 1.5 x 30 x 0.9 = 40.5

ubuntu@dlp ~(keystone)$
openstack rating summary get

+-----------------+---------------+------+-----------------+-----------------+
| Tenant ID       | Resource Type | Rate | Begin Time      | End Time        |
+-----------------+---------------+------+-----------------+-----------------+
| 18ede7365bdc430 | ALL           | 57.0 | 2024-05-        | 2024-06-        |
| 093e8fd4a90f773 |               |      | 01T00:00:00     | 01T00:00:00     |
| 69              |               |      |                 |                 |
+-----------------+---------------+------+-----------------+-----------------+

ubuntu@dlp ~(keystone)$
openstack rating dataframes get

+------------------+------------------+------------------+---------------------+
| Begin            | End              | Project ID       | Resources           |
+------------------+------------------+------------------+---------------------+
| 2024-05-         | 2024-05-         | 18ede7365bdc4300 | [{'rating': '0.0',  |
| 23T01:10:00      | 23T01:20:00      | 93e8fd4a90f77369 | 'service':          |
|                  |                  |                  | 'instance', 'desc': |
|                  |                  |                  | {'flavor_name':     |
|                  |                  |                  | 'm1.small',         |
|                  |                  |                  | 'flavor_id': '2',   |
|                  |                  |                  | 'vcpus': '', 'id':  |
|                  |                  |                  | '7fbc24c1-c0d1-     |
|                  |                  |                  | 43d6-87aa-          |
|                  |                  |                  | 68df83597b57',      |
|                  |                  |                  | 'project_id': '18ed |
|                  |                  |                  | e7365bdc430093e8fd4 |
|                  |                  |                  | a90f77369',         |
|                  |                  |                  | 'user_id': 'b9371d0 |
|                  |                  |                  | 15e0d43dca74f291614 |
|                  |                  |                  | 48ffd2',            |
|                  |                  |                  | 'week_of_the_year': |
|                  |                  |                  | '20',               |
|                  |                  |                  | 'day_of_the_year':  |
|                  |                  |                  | '144', 'month':     |
|                  |                  |                  | '5', 'year':        |
|                  |                  |                  | '2024',             |
|                  |                  |                  | 'tenant_id': '18ede |
|                  |                  |                  | 7365bdc430093e8fd4a |
|                  |                  |                  | 90f77369'},         |
|                  |                  |                  | 'volume': '1',      |
|                  |                  |                  | 'rate_value':       |
|                  |                  |                  | '0.0000'}]          |
| 2024-05-         | 2024-05-         | 18ede7365bdc4300 | [{'rating': '0.0',  |
| 23T01:30:00      | 23T01:40:00      | 93e8fd4a90f77369 | 'service':          |
|                  |                  |                  | 'volume.size',      |
|                  |                  |                  | 'desc':             |
|                  |                  |                  | {'volume_type':     |
|                  |                  |                  | '__DEFAULT__',      |
|                  |                  |                  | 'id': 'f3515141-    |
|                  |                  |                  | 8e83-441d-b7e2-     |
|                  |                  |                  | 0136d8e1c0a7',      |
|                  |                  |                  | 'project_id': '18ed |
|                  |                  |                  | e7365bdc430093e8fd4 |
|                  |                  |                  | a90f77369',         |
|                  |                  |                  | 'user_id': 'b9371d0 |
|                  |                  |                  | 15e0d43dca74f291614 |
|                  |                  |                  | 48ffd2',            |
|                  |                  |                  | 'week_of_the_year': |
|                  |                  |                  | '20',               |
|                  |                  |                  | 'day_of_the_year':  |
|                  |                  |                  | '144', 'month':     |
|                  |                  |                  | '5', 'year':        |
|                  |                  |                  | '2024',             |
|                  |                  |                  | 'tenant_id': '18ede |
|                  |                  |                  | 7365bdc430093e8fd4a |
|                  |                  |                  | 90f77369'},         |
|                  |                  |                  | 'volume': '1E+1',   |
|                  |                  |                  | 'rate_value':       |
|                  |                  |                  | '0.0000'}]          |
| 2024-05-         | 2024-05-         | 18ede7365bdc4300 | [{'rating': '0.5',  |
| 23T01:50:00      | 23T02:00:00      | 93e8fd4a90f77369 | 'service':          |
|                  |                  |                  | 'instance', 'desc': |
|                  |                  |                  | {'flavor_name':     |
|                  |                  |                  | 'm1.small',         |
|                  |                  |                  | 'flavor_id': '2',   |
|                  |                  |                  | 'vcpus': '', 'id':  |
|                  |                  |                  | '7fbc24c1-c0d1-     |
|                  |                  |                  | 43d6-87aa-          |
|                  |                  |                  | 68df83597b57',      |
|                  |                  |                  | 'project_id': '18ed |
|                  |                  |                  | e7365bdc430093e8fd4 |
|                  |                  |                  | a90f77369',         |
|                  |                  |                  | 'user_id': 'b9371d0 |
|                  |                  |                  | 15e0d43dca74f291614 |
|                  |                  |                  | 48ffd2',            |
|                  |                  |                  | 'week_of_the_year': |
|                  |                  |                  | '20',               |
|                  |                  |                  | 'day_of_the_year':  |
|                  |                  |                  | '144', 'month':     |
|                  |                  |                  | '5', 'year':        |
|                  |                  |                  | '2024',             |
|                  |                  |                  | 'tenant_id': '18ede |
|                  |                  |                  | 7365bdc430093e8fd4a |
|                  |                  |                  | 90f77369'},         |
|                  |                  |                  | 'volume': '1',      |
|                  |                  |                  | 'rate_value':       |
|                  |                  |                  | '0.5000'}]          |
| 2024-05-         | 2024-05-         | 18ede7365bdc4300 | [{'rating': '0.5',  |
| 23T02:00:00      | 23T02:10:00      | 93e8fd4a90f77369 | 'service':          |
|                  |                  |                  | 'instance', 'desc': |
|                  |                  |                  | {'flavor_name':     |
|                  |                  |                  | 'm1.small',         |
|                  |                  |                  | 'flavor_id': '2',   |
|                  |                  |                  | 'vcpus': '', 'id':  |
|                  |                  |                  | '7fbc24c1-c0d1-     |
|                  |                  |                  | 43d6-87aa-          |
|                  |                  |                  | 68df83597b57',      |
|                  |                  |                  | 'project_id': '18ed |
|                  |                  |                  | e7365bdc430093e8fd4 |
|                  |                  |                  | a90f77369',         |
|                  |                  |                  | 'user_id': 'b9371d0 |
|                  |                  |                  | 15e0d43dca74f291614 |
|                  |                  |                  | 48ffd2',            |
|                  |                  |                  | 'week_of_the_year': |
|                  |                  |                  | '20',               |
|                  |                  |                  | 'day_of_the_year':  |
|                  |                  |                  | '144', 'month':     |
|                  |                  |                  | '5', 'year':        |
|                  |                  |                  | '2024',             |
|                  |                  |                  | 'tenant_id': '18ede |
|                  |                  |                  | 7365bdc430093e8fd4a |
|                  |                  |                  | 90f77369'},         |
|                  |                  |                  | 'volume': '1',      |
|                  |                  |                  | 'rate_value':       |
|                  |                  |                  | '0.5000'}]          |
| 2024-05-         | 2024-05-         | 18ede7365bdc4300 | [{'rating': '0.5',  |
| 23T02:10:00      | 23T02:20:00      | 93e8fd4a90f77369 | 'service':          |
|                  |                  |                  | 'instance', 'desc': |
|                  |                  |                  | {'flavor_name':     |
|                  |                  |                  | 'm1.small',         |
|                  |                  |                  | 'flavor_id': '2',   |
|                  |                  |                  | 'vcpus': '', 'id':  |
|                  |                  |                  | '7fbc24c1-c0d1-     |
|                  |                  |                  | 43d6-87aa-          |
|                  |                  |                  | 68df83597b57',      |
|                  |                  |                  | 'project_id': '18ed |
|                  |                  |                  | e7365bdc430093e8fd4 |
|                  |                  |                  | a90f77369',         |
|                  |                  |                  | 'user_id': 'b9371d0 |
|                  |                  |                  | 15e0d43dca74f291614 |
|                  |                  |                  | 48ffd2',            |
|                  |                  |                  | 'week_of_the_year': |
|                  |                  |                  | '20',               |
|                  |                  |                  | 'day_of_the_year':  |
|                  |                  |                  | '144', 'month':     |
|                  |                  |                  | '5', 'year':        |
|                  |                  |                  | '2024',             |
|                  |                  |                  | 'tenant_id': '18ede |
|                  |                  |                  | 7365bdc430093e8fd4a |
|                  |                  |                  | 90f77369'},         |
|                  |                  |                  | 'volume': '1',      |
|                  |                  |                  | 'rate_value':       |
|                  |                  |                  | '0.5000'}]          |
| 2024-05-         | 2024-05-         | 18ede7365bdc4300 | [{'rating': '15.0', |
| 23T03:20:00      | 23T03:30:00      | 93e8fd4a90f77369 | 'service':          |
|                  |                  |                  | 'volume.size',      |
|                  |                  |                  | 'desc':             |
|                  |                  |                  | {'volume_type':     |
|                  |                  |                  | '__DEFAULT__',      |
|                  |                  |                  | 'id': 'be53c7f4-    |
|                  |                  |                  | 7574-45cd-8020-     |
|                  |                  |                  | 1d09fcd47945',      |
|                  |                  |                  | 'project_id': '18ed |
|                  |                  |                  | e7365bdc430093e8fd4 |
|                  |                  |                  | a90f77369',         |
|                  |                  |                  | 'user_id': 'b9371d0 |
|                  |                  |                  | 15e0d43dca74f291614 |
|                  |                  |                  | 48ffd2',            |
|                  |                  |                  | 'week_of_the_year': |
|                  |                  |                  | '20',               |
|                  |                  |                  | 'day_of_the_year':  |
|                  |                  |                  | '144', 'month':     |
|                  |                  |                  | '5', 'year':        |
|                  |                  |                  | '2024',             |
|                  |                  |                  | 'tenant_id': '18ede |
|                  |                  |                  | 7365bdc430093e8fd4a |
|                  |                  |                  | 90f77369'},         |
|                  |                  |                  | 'volume': '1E+1',   |
|                  |                  |                  | 'rate_value':       |
|                  |                  |                  | '1.5000'}]          |
| 2024-05-         | 2024-05-         | 18ede7365bdc4300 | [{'rating': '40.5', |
| 23T03:20:00      | 23T03:30:00      | 93e8fd4a90f77369 | 'service':          |
|                  |                  |                  | 'volume.size',      |
|                  |                  |                  | 'desc':             |
|                  |                  |                  | {'volume_type':     |
|                  |                  |                  | '__DEFAULT__',      |
|                  |                  |                  | 'id': 'c5a797ab-    |
|                  |                  |                  | e638-4cb8-94bf-     |
|                  |                  |                  | 2fb185878626',      |
|                  |                  |                  | 'project_id': '18ed |
|                  |                  |                  | e7365bdc430093e8fd4 |
|                  |                  |                  | a90f77369',         |
|                  |                  |                  | 'user_id': 'b9371d0 |
|                  |                  |                  | 15e0d43dca74f291614 |
|                  |                  |                  | 48ffd2',            |
|                  |                  |                  | 'week_of_the_year': |
|                  |                  |                  | '20',               |
|                  |                  |                  | 'day_of_the_year':  |
|                  |                  |                  | '144', 'month':     |
|                  |                  |                  | '5', 'year':        |
|                  |                  |                  | '2024',             |
|                  |                  |                  | 'tenant_id': '18ede |
|                  |                  |                  | 7365bdc430093e8fd4a |
|                  |                  |                  | 90f77369'},         |
|                  |                  |                  | 'volume': '3E+1',   |
|                  |                  |                  | 'rate_value':       |
|                  |                  |                  | '1.3500'}]          |
+------------------+------------------+------------------+---------------------+
मिलान सामग्री