Repository: softlayer/softlayer-python
Pull request #1932 (2023-05-05 18:05:42)

Remove `bytes-used` from block volume-list 
Issue link: #1931 
```
softlayer-python/ (issue1931) $ slcli block volume-list
┌───────────┬─────────────┬────────────┬─────────────┬─────────────┬───────┬─────────────┬───────┬─────────────┬──────────────┬─────────────┐
│    id     │  username   │ datacenter │ storage_ty… │ capacity_gb │ IOPs  │   ip_addr   │ lunId │ active_tra… │ rep_partner… │    notes    │
├───────────┼─────────────┼────────────┼─────────────┼─────────────┼───────┼─────────────┼───────┼─────────────┼──────────────┼─────────────┤
...
```


Patch:
diff --git a/SoftLayer/CLI/block/list.py b/SoftLayer/CLI/block/list.py
index 0a24c0cf..274ed57b 100644
--- a/SoftLayer/CLI/block/list.py
+++ b/SoftLayer/CLI/block/list.py
@@ -21,7 +21,6 @@
         else '-',
         mask="storageType.keyName"),
     column_helper.Column('capacity_gb', ('capacityGb',), mask="capacityGb"),
-    column_helper.Column('bytes_used', ('bytesUsed',), mask="bytesUsed"),
     column_helper.Column('IOPs', ('provisionedIops',), mask="provisionedIops"),
     column_helper.Column('ip_addr', ('serviceResourceBackendIpAddress',),
                          mask="serviceResourceBackendIpAddress"),
@@ -42,7 +41,6 @@
     'datacenter',
     'storage_type',
     'capacity_gb',
-    'bytes_used',
     'IOPs',
     'ip_addr',
     'lunId',
diff --git a/SoftLayer/CLI/order/quote_delete.py b/SoftLayer/CLI/order/quote_delete.py
deleted file mode 100644
index 2b00ad3a..00000000
--- a/SoftLayer/CLI/order/quote_delete.py
+++ /dev/null
@@ -1,20 +0,0 @@
-"""Delete the quote of an order"""
-# :license: MIT, see LICENSE for more details.
-import click
-
-from SoftLayer.CLI.command import SLCommand as SLCommand
-from SoftLayer.CLI import environment
-from SoftLayer.managers import ordering
-
-
-@click.command(cls=SLCommand)
-@click.argument('identifier')
-@environment.pass_env
-def cli(env, identifier):
-    """Delete the quote of an order"""
-
-    manager = ordering.OrderingManager(env.client)
-    result = manager.delete_quote(identifier)
-
-    if result:
-        env.fout(f"Quote id: {identifier} was deleted.")
diff --git a/SoftLayer/CLI/routes.py b/SoftLayer/CLI/routes.py
index 8527c5ce..9550b927 100644
--- a/SoftLayer/CLI/routes.py
+++ b/SoftLayer/CLI/routes.py
@@ -275,7 +275,6 @@
     ('order:place-quote', 'SoftLayer.CLI.order.place_quote:cli'),
     ('order:quote-list', 'SoftLayer.CLI.order.quote_list:cli'),
     ('order:quote-detail', 'SoftLayer.CLI.order.quote_detail:cli'),
-    ('order:quote-delete', 'SoftLayer.CLI.order.quote_delete:cli'),
     ('order:quote-save', 'SoftLayer.CLI.order.quote_save:cli'),
     ('order:quote', 'SoftLayer.CLI.order.quote:cli'),
     ('order:lookup', 'SoftLayer.CLI.order.lookup:cli'),
diff --git a/SoftLayer/consts.py b/SoftLayer/consts.py
index 4ed36b83..fa640e04 100644
--- a/SoftLayer/consts.py
+++ b/SoftLayer/consts.py
@@ -5,7 +5,7 @@
 
     :license: MIT, see LICENSE for more details.
 """
-VERSION = 'v6.1.7'
+VERSION = 'v6.1.6'
 API_PUBLIC_ENDPOINT = 'https://api.softlayer.com/xmlrpc/v3.1/'
 API_PRIVATE_ENDPOINT = 'https://api.service.softlayer.com/xmlrpc/v3.1/'
 API_PUBLIC_ENDPOINT_REST = 'https://api.softlayer.com/rest/v3.1/'
diff --git a/SoftLayer/fixtures/SoftLayer_Billing_Order_Quote.py b/SoftLayer/fixtures/SoftLayer_Billing_Order_Quote.py
index ee17078d..9e7340e6 100644
--- a/SoftLayer/fixtures/SoftLayer_Billing_Order_Quote.py
+++ b/SoftLayer/fixtures/SoftLayer_Billing_Order_Quote.py
@@ -104,4 +104,3 @@
 }
 
 saveQuote = getObject
-deleteQuote = getObject
diff --git a/SoftLayer/managers/ordering.py b/SoftLayer/managers/ordering.py
index 778d7bab..cb5bd428 100644
--- a/SoftLayer/managers/ordering.py
+++ b/SoftLayer/managers/ordering.py
@@ -737,11 +737,3 @@ def get_regions(self, package_id, location=None):
         if location:
             _filter = {"regions": {"location": {"location": {"name": {"operation": location}}}}}
         return self.client.call('SoftLayer_Product_Package', 'getRegions', id=package_id, filter=_filter)
-
-    def delete_quote(self, quote_id):
-        """Delete the quote of an order.
-
-        :param quote_id: ID number of target quote
-        """
-
-        return self.client['SoftLayer_Billing_Order_Quote'].deleteQuote(id=quote_id)
diff --git a/docs/cli/ordering.rst b/docs/cli/ordering.rst
index 93d578cf..740438a6 100644
--- a/docs/cli/ordering.rst
+++ b/docs/cli/ordering.rst
@@ -139,10 +139,6 @@ Quotes
     :prog: order place-quote
     :show-nested:
 
-.. click:: SoftLayer.CLI.order.quote_delete:cli
-    :prog: order quote-delete
-    :show-nested:
-
 Lookup
 ======
 .. click:: SoftLayer.CLI.order.lookup:cli
diff --git a/setup.py b/setup.py
index 1e22a487..8b37e059 100644
--- a/setup.py
+++ b/setup.py
@@ -16,7 +16,7 @@
 
 setup(
     name='SoftLayer',
-    version='6.1.7',
+    version='6.1.6',
     description=DESCRIPTION,
     long_description=LONG_DESCRIPTION,
     long_description_content_type='text/x-rst',
@@ -40,7 +40,7 @@
         'prompt_toolkit >= 2',
         'pygments >= 2.0.0',
         'urllib3 >= 1.24',
-        'rich == 13.3.5'
+        'rich == 13.3.4'
     ],
     keywords=['softlayer', 'cloud', 'slcli'],
     classifiers=[
diff --git a/tools/requirements.txt b/tools/requirements.txt
index 3a34d187..bf456aab 100644
--- a/tools/requirements.txt
+++ b/tools/requirements.txt
@@ -4,6 +4,6 @@ requests >= 2.20.0
 prompt_toolkit >= 2
 pygments >= 2.0.0
 urllib3 >= 1.24
-rich == 13.3.5
+rich == 13.3.4
 # only used for soap transport
 # softlayer-zeep >= 5.0.0


Test patch:
diff --git a/tests/CLI/modules/block_tests.py b/tests/CLI/modules/block_tests.py
index 27a20c92..8f3627c8 100644
--- a/tests/CLI/modules/block_tests.py
+++ b/tests/CLI/modules/block_tests.py
@@ -122,7 +122,6 @@ def test_volume_list(self):
         self.assert_no_fail(result)
         self.assertEqual([
             {
-                'bytes_used': None,
                 'capacity_gb': 20,
                 'datacenter': 'dal05',
                 'id': 100,
diff --git a/tests/CLI/modules/order_tests.py b/tests/CLI/modules/order_tests.py
index c175e1b8..88c5d869 100644
--- a/tests/CLI/modules/order_tests.py
+++ b/tests/CLI/modules/order_tests.py
@@ -442,11 +442,6 @@ def test_order_lookup(self):
         self.assertIn('Ordered By', result.output)
         self.assertIn('Initial Invoice', result.output)
 
-    def test_quote_delete(self):
-        result = self.run_command(['order', 'quote-delete', '12345'])
-        self.assert_no_fail(result)
-        self.assert_called_with('SoftLayer_Billing_Order_Quote', 'deleteQuote', identifier='12345')
-
 
 def _get_all_packages():
     package_type = {'keyName': 'BARE_METAL_CPU'}
diff --git a/tests/CLI/modules/vs/vs_create_tests.py b/tests/CLI/modules/vs/vs_create_tests.py
index e2e43904..e70446a4 100644
--- a/tests/CLI/modules/vs/vs_create_tests.py
+++ b/tests/CLI/modules/vs/vs_create_tests.py
@@ -69,28 +69,28 @@ def test_create_vlan_subnet(self, confirm_mock):
         self.assertIn('"guid": "1a2b3c-1701"', result.output)
         self.assert_called_with('SoftLayer_Product_Order', 'placeOrder')
         args = ({
-                    'startCpus': 2,
-                    'maxMemory': 1024,
-                    'hostname': 'host',
-                    'domain': 'example.com',
-                    'localDiskFlag': True,
-                    'hourlyBillingFlag': True,
-                    'supplementalCreateObjectOptions': {'bootMode': None},
-                    'operatingSystemReferenceCode': 'UBUNTU_LATEST',
-                    'datacenter': {'name': 'dal05'},
-                    'primaryBackendNetworkComponent': {
-                        'networkVlan': {
-                            'id': 577940,
-                            'primarySubnet': {'id': 478700}
-                        }
-                    },
-                    'primaryNetworkComponent': {
-                        'networkVlan': {
-                            'id': 1639255,
-                            'primarySubnet': {'id': 297614}
-                        }
-                    }
-                },)
+            'startCpus': 2,
+            'maxMemory': 1024,
+            'hostname': 'host',
+            'domain': 'example.com',
+            'localDiskFlag': True,
+            'hourlyBillingFlag': True,
+            'supplementalCreateObjectOptions': {'bootMode': None},
+            'operatingSystemReferenceCode': 'UBUNTU_LATEST',
+            'datacenter': {'name': 'dal05'},
+            'primaryBackendNetworkComponent': {
+                'networkVlan': {
+                    'id': 577940,
+                    'primarySubnet': {'id': 478700}
+                }
+            },
+            'primaryNetworkComponent': {
+                'networkVlan': {
+                    'id': 1639255,
+                    'primarySubnet': {'id': 297614}
+                }
+            }
+        },)
 
         self.assert_called_with('SoftLayer_Virtual_Guest', 'generateOrderTemplate', args=args)
 
@@ -114,26 +114,26 @@ def test_create_by_router(self, confirm_mock):
         self.assert_no_fail(result)
         self.assert_called_with('SoftLayer_Product_Order', 'placeOrder')
         args = ({
-                    'startCpus': 2,
-                    'maxMemory': 1024,
-                    'hostname': 'host',
-                    'domain': 'example.com',
-                    'localDiskFlag': True,
-                    'hourlyBillingFlag': True,
-                    'supplementalCreateObjectOptions': {'bootMode': None},
-                    'operatingSystemReferenceCode': 'UBUNTU_LATEST',
-                    'datacenter': {'name': 'dal05'},
-                    'primaryBackendNetworkComponent': {
+            'startCpus': 2,
+            'maxMemory': 1024,
+            'hostname': 'host',
+            'domain': 'example.com',
+            'localDiskFlag': True,
+            'hourlyBillingFlag': True,
+            'supplementalCreateObjectOptions': {'bootMode': None},
+            'operatingSystemReferenceCode': 'UBUNTU_LATEST',
+            'datacenter': {'name': 'dal05'},
+            'primaryBackendNetworkComponent': {
                         'router': {
                             'id': 577940
                         }
-                    },
-                    'primaryNetworkComponent': {
-                        'router': {
-                            'id': 1639255
-                        }
-                    }
-                },)
+            },
+            'primaryNetworkComponent': {
+                'router': {
+                    'id': 1639255
+                }
+            }
+        },)
 
         self.assert_called_with('SoftLayer_Virtual_Guest', 'generateOrderTemplate', args=args)
 
@@ -216,17 +216,17 @@ def test_create_with_integer_image_guid(self, confirm_mock):
         self.assert_no_fail(result)
         self.assertIn('"guid": "1a2b3c-1701"', result.output)
         args = ({
-                    'startCpus': 2,
-                    'maxMemory': 1024,
-                    'hostname': 'host',
-                    'domain': 'example.com',
-                    'localDiskFlag': True,
-                    'hourlyBillingFlag': True,
-                    'supplementalCreateObjectOptions': {'bootMode': None},
-                    'blockDeviceTemplateGroup': {'globalIdentifier': 'aaaa1111bbbb2222'},
-                    'datacenter': {'name': 'dal05'},
-                    'networkComponents': [{'maxSpeed': 100}]
-                },)
+            'startCpus': 2,
+            'maxMemory': 1024,
+            'hostname': 'host',
+            'domain': 'example.com',
+            'localDiskFlag': True,
+            'hourlyBillingFlag': True,
+            'supplementalCreateObjectOptions': {'bootMode': None},
+            'blockDeviceTemplateGroup': {'globalIdentifier': 'aaaa1111bbbb2222'},
+            'datacenter': {'name': 'dal05'},
+            'networkComponents': [{'maxSpeed': 100}]
+        },)
 
         self.assert_called_with('SoftLayer_Virtual_Guest', 'generateOrderTemplate', args=args)
         self.assert_called_with('SoftLayer_Product_Order', 'placeOrder')
@@ -345,18 +345,18 @@ def test_create_with_host_id(self, confirm_mock):
 
         self.assert_called_with('SoftLayer_Product_Order', 'placeOrder')
         template_args = ({
-                             'startCpus': 2,
-                             'maxMemory': 1024,
-                             'hostname': 'host',
-                             'domain': 'example.com',
-                             'localDiskFlag': True,
-                             'hourlyBillingFlag': True,
-                             'supplementalCreateObjectOptions': {'bootMode': None},
-                             'dedicatedHost': {'id': 123},
-                             'operatingSystemReferenceCode': 'UBUNTU_LATEST',
-                             'datacenter': {'name': 'dal05'},
-                             'networkComponents': [{'maxSpeed': 100}]
-                         },)
+            'startCpus': 2,
+            'maxMemory': 1024,
+            'hostname': 'host',
+            'domain': 'example.com',
+            'localDiskFlag': True,
+            'hourlyBillingFlag': True,
+            'supplementalCreateObjectOptions': {'bootMode': None},
+            'dedicatedHost': {'id': 123},
+            'operatingSystemReferenceCode': 'UBUNTU_LATEST',
+            'datacenter': {'name': 'dal05'},
+            'networkComponents': [{'maxSpeed': 100}]
+        },)
 
         self.assert_called_with('SoftLayer_Virtual_Guest', 'generateOrderTemplate', args=template_args)
 
@@ -633,21 +633,22 @@ def test_create_with_ipv6(self, confirm_mock):
         self.assertEqual(result.exit_code, 0)
         self.assert_called_with('SoftLayer_Product_Order', 'verifyOrder')
         args = ({
-                    'startCpus': None,
-                    'maxMemory': None,
-                    'hostname': 'TEST',
-                    'domain': 'TESTING',
-                    'localDiskFlag': None,
-                    'hourlyBillingFlag': True,
-                    'supplementalCreateObjectOptions': {
-                        'bootMode': None,
-                        'flavorKeyName': 'B1_2X8X25'
-                    },
-                    'operatingSystemReferenceCode': 'UBUNTU_LATEST',
-                    'datacenter': {
-                        'name': 'TEST00'
-                    }
-                },)
+            'startCpus': None,
+            'maxMemory': None,
+            'hostname': 'TEST',
+            'domain': 'TESTING',
+            'localDiskFlag': None,
+            'hourlyBillingFlag': True,
+            'supplementalCreateObjectOptions': {
+                'bootMode': None,
+                'flavorKeyName': 'B1_2X8X25'
+            },
+            'operatingSystemReferenceCode': 'UBUNTU_LATEST',
+            'datacenter': {
+                'name': 'TEST00'
+            }
+        },
+        )
         self.assert_called_with('SoftLayer_Virtual_Guest', 'generateOrderTemplate', args=args)
         self.assertEqual([], self.calls('SoftLayer_Virtual_Guest', 'setTags'))
 
diff --git a/tests/managers/ordering_tests.py b/tests/managers/ordering_tests.py
index e38b137f..063dbcdd 100644
--- a/tests/managers/ordering_tests.py
+++ b/tests/managers/ordering_tests.py
@@ -901,7 +901,3 @@ def test_get_items(self):
     def test_get_regions(self):
         self.ordering.get_regions(123)
         self.assert_called_with('SoftLayer_Product_Package', 'getRegions')
-
-    def test_delete_quote(self):
-        self.ordering.delete_quote(123)
-        self.assert_called_with('SoftLayer_Billing_Order_Quote', 'deleteQuote')