ContainX / openstack4j

A Fluent OpenStack SDK / Client Library for Java
http://openstack4j.com
Other
290 stars 366 forks source link

blockStorage().schedulerStatsPools().poolsDetail() - InvalidFormatException #1301

Open pk044 opened 4 years ago

pk044 commented 4 years ago

CLI output:

[root@openstack ~(keystone_admin)]# cinder get-pools --detail
+-----------------------------+----------------------------------------------------------------+
| Property                    | Value                                                          |
+-----------------------------+----------------------------------------------------------------+
| QoS_support                 | False                                                          |
| allocated_capacity_gb       | 20                                                             |
| backend_state               | up                                                             |
| driver_version              | 3.0.0                                                          |
| filter_function             | None                                                           |
| free_capacity_gb            | 3.88                                                           |
| goodness_function           | None                                                           |
| location_info               | LVMVolumeDriver:openstack.s.local:cinder-volumes:thin:0 |
| max_over_subscription_ratio | 20.0                                                           |
| multiattach                 | True                                                           |
| name                        | openstack.s.local@lvm#lvm                               |
| pool_name                   | lvm                                                            |
| provisioned_capacity_gb     | 20.0                                                           |
| reserved_percentage         | 0                                                              |
| storage_protocol            | iSCSI                                                          |
| thick_provisioning_support  | False                                                          |
| thin_provisioning_support   | True                                                           |
| timestamp                   | 2020-03-06T09:33:44.665837                                     |
| total_capacity_gb           | 20.98                                                          |
| total_volumes               | 2                                                              |
| vendor_name                 | Open Source                                                    |
| volume_backend_name         | lvm                                                            |
+-----------------------------+----------------------------------------------------------------+
+-----------------------------+----------------------------------+
| Property                    | Value                            |
+-----------------------------+----------------------------------+
| QoS_support                 | False                            |
| allocated_capacity_gb       | 10                               |
| driver_version              | 1.4.0                            |
| filter_function             | None                             |
| free_capacity_gb            | 91.1171875                       |
| goodness_function           | None                             |
| max_over_subscription_ratio | 20.0                             |
| name                        | openstack.s.local@nfs#nfs |
| provisioned_capacity_gb     | 23.4                             |
| reserved_percentage         | 0                                |
| sparse_copy_volume          | True                             |
| storage_protocol            | nfs                              |
| thick_provisioning_support  | False                            |
| thin_provisioning_support   | True                             |
| timestamp                   | 2020-03-06T09:34:58.612620       |
| total_capacity_gb           | 107.165039062                    |
| vendor_name                 | Open Source                      |
| volume_backend_name         | nfs                              |
+-----------------------------+----------------------------------+
+-----------------------------+-----------------------------------------------------------------------------+
| Property                    | Value                                                                       |
+-----------------------------+-----------------------------------------------------------------------------+
| allocated_capacity_gb       | 17                                                                          |
| driver_version              | 1.2.0                                                                       |
| filter_function             | None                                                                        |
| free_capacity_gb            | 59.96                                                                       |
| goodness_function           | None                                                                        |
| location_info               | ceph:/etc/ceph/ceph.conf:cc3a4e9f-d2ca-4fec-805d-2c40605723b3:admin:volumes |
| max_over_subscription_ratio | 20.0                                                                        |
| multiattach                 | False                                                                       |
| name                        | openstack.s.local@rbd#rbd                                            |
| provisioned_capacity_gb     | 38.0                                                                        |
| replication_enabled         | False                                                                       |
| reserved_percentage         | 0                                                                           |
| storage_protocol            | ceph                                                                        |
| thin_provisioning_support   | True                                                                        |
| timestamp                   | 2020-03-06T09:34:19.702739                                                  |
| total_capacity_gb           | 65.61                                                                       |
| vendor_name                 | Open Source                                                                 |
| volume_backend_name         | rbd                                                                         |
+-----------------------------+-----------------------------------------------------------------------------+

and when I use the openstack4j API, I get:

com.fasterxml.jackson.databind.exc.InvalidFormatException: Can not construct instance of java.lang.Long from String value '20.0': not a valid Long value
 at [Source: org.apache.http.conn.EofSensorInputStream@479133c9; line: 1, column: 604] (through reference chain: org.openstack4j.openstack.storage.block.domain.VolumeBackendPools["pools"]->java.util.ArrayList[0]->org.openstack4j.openstack.storage.block.domain.CinderBackendStoragePool["capabilities"]->org.openstack4j.openstack.storage.block.domain.CinderCapabilities["max_over_subscription_ratio"])