Repository: softlayer/softlayer-python
Pull request #1904 (2023-04-11 15:56:26)

Need a command for slcli object-storage delete <storageId>
[#issue1903](https://github.com/softlayer/softlayer-python/issues/1903)


Patch:
diff --git a/CHANGELOG.md b/CHANGELOG.md
index abee1bea..784a3f3b 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,10 +1,5 @@
 # Change Log
 
-## [6.1.6] - 2023-03-27
-
-From now on changes will be published only on GitHub https://github.com/softlayer/softlayer-python/releases
-
-
 ## [6.1.3] - 2022-11-30
 
 #### What's Changed
diff --git a/SoftLayer/CLI/account/hook_delete.py b/SoftLayer/CLI/account/hook_delete.py
deleted file mode 100644
index c4eda42b..00000000
--- a/SoftLayer/CLI/account/hook_delete.py
+++ /dev/null
@@ -1,24 +0,0 @@
-"""Delete a provisioning script"""
-# :license: MIT, see LICENSE for more details.
-
-import click
-import SoftLayer
-
-from SoftLayer.CLI.command import SLCommand as SLCommand
-from SoftLayer.CLI import environment
-from SoftLayer.managers.account import AccountManager as AccountManager
-
-
-@click.command(cls=SLCommand)
-@click.argument('identifier')
-@environment.pass_env
-def cli(env, identifier):
-    """Delete a provisioning script"""
-
-    manager = AccountManager(env.client)
-
-    try:
-        manager.delete_provisioning(identifier)
-        click.secho("%s deleted successfully" % identifier, fg='green')
-    except SoftLayer.SoftLayerAPIError as ex:
-        click.secho("Failed to delete %s\n%s" % (identifier, ex), fg='red')
diff --git a/SoftLayer/CLI/account/orders.py b/SoftLayer/CLI/account/orders.py
index f4cc1fa8..7dc291d7 100644
--- a/SoftLayer/CLI/account/orders.py
+++ b/SoftLayer/CLI/account/orders.py
@@ -10,34 +10,16 @@
 from SoftLayer import utils
 
 
-def upgrade_table(upgrades):
-    """Formats a table for upgrade orders"""
-    table = formatting.Table(['Id', 'Maintance window', 'Status', 'Created Date',
-                              'Case'], title="Upgrade orders")
-    table.align['Subject'] = 'l'
-    table.align['Impacted Resources'] = 'l'
-    for upgrade in upgrades:
-        table.add_row([upgrade.get('id'),
-                       upgrade.get('maintenanceStartTimeUtc'),
-                       upgrade.get('statusId'),
-                       upgrade.get('createDate'),
-                       upgrade.get('ticketId') or '--'])
-    return table
-
-
 @click.command(cls=SLCommand)
 @click.option('--limit', '-l',
               help='How many results to get in one api call',
-              default=100,
+              default=50,
               show_default=True)
-@click.option('--upgrades', is_flag=True, default=False,
-              help="Show upgrades orders.")
 @environment.pass_env
-def cli(env, limit, upgrades):
+def cli(env, limit):
     """Lists account orders. Use `slcli order lookup <ID>` to find more details about a specific order."""
     manager = AccountManager(env.client)
     orders = manager.get_account_all_billing_orders(limit)
-    upgrade = manager.get_account_upgrade_orders(limit)
 
     order_table = formatting.Table(['Id', 'State', 'User', 'Date', 'Amount', 'Item'],
                                    title="orders")
@@ -52,5 +34,3 @@ def cli(env, limit, upgrades):
         order_table.add_row([order['id'], order['status'], order['userRecord']['username'], create_date,
                              order['orderTotalAmount'], utils.trim_to(' '.join(map(str, items)), 50)])
     env.fout(order_table)
-    if upgrades:
-        env.fout(upgrade_table(upgrade))
diff --git a/SoftLayer/CLI/cdn/create.py b/SoftLayer/CLI/cdn/create.py
deleted file mode 100644
index c23d91e5..00000000
--- a/SoftLayer/CLI/cdn/create.py
+++ /dev/null
@@ -1,56 +0,0 @@
-"""Create a CDN domain mapping."""
-# :license: MIT, see LICENSE for more details.
-
-import click
-
-import SoftLayer
-from SoftLayer.CLI import environment
-from SoftLayer.CLI import exceptions
-from SoftLayer.CLI import formatting
-
-
-@click.command(cls=SoftLayer.CLI.command.SLCommand, )
-@click.option('--hostname', required=True, help="To route requests to your website, enter the hostname for your"
-              "website, for example, www.example.com or app.example.com.")
-@click.option('--origin', required=True, help="Your server IP address or hostname.")
-@click.option('--origin-type', default="server", type=click.Choice(['server', 'storage']), show_default=True,
-              help="The origin type. Note: If OriginType is storage then OriginHost is take as Endpoint")
-@click.option('--http', help="Http port")
-@click.option('--https', help="Https port")
-@click.option('--bucket-name', help="Bucket name")
-@click.option('--cname', help="Enter a globally unique subdomain. The full URL becomes the CNAME we use to configure"
-              " your DNS. If no value is entered, we will generate a CNAME for you.")
-@click.option('--header', help="The edge server uses the host header in the HTTP header to communicate with the"
-              " Origin host. It defaults to Hostname.")
-@click.option('--path', help="Give a path relative to the domain provided, which can be used to reach this Origin."
-              " For example, 'articles/video' => 'www.example.com/articles/video")
-@click.option('--ssl', default="dvSan", type=click.Choice(['dvSan', 'wilcard']), help="A DV SAN Certificate allows"
-              " HTTPS traffic over your personal domain, but it requires a domain validation to prove ownership."
-              " A wildcard certificate allows HTTPS traffic only when using the CNAME given.")
-@environment.pass_env
-def cli(env, hostname, origin, origin_type, http, https, bucket_name, cname, header, path, ssl):
-    """Create a CDN domain mapping."""
-    if not http and not https:
-        raise exceptions.CLIAbort('Is needed http or https options')
-
-    manager = SoftLayer.CDNManager(env.client)
-    cdn = manager.create_cdn(hostname, origin, origin_type, http, https, bucket_name, cname, header, path, ssl)
-
-    table = formatting.Table(['Name', 'Value'])
-    table.add_row(['CDN Unique ID', cdn.get('uniqueId')])
-    if bucket_name:
-        table.add_row(['Bucket Name', cdn.get('bucketName')])
-    table.add_row(['Hostname', cdn.get('domain')])
-    table.add_row(['Header', cdn.get('header')])
-    table.add_row(['IBM CNAME', cdn.get('cname')])
-    table.add_row(['Akamai CNAME', cdn.get('akamaiCname')])
-    table.add_row(['Origin Host', cdn.get('originHost')])
-    table.add_row(['Origin Type', cdn.get('originType')])
-    table.add_row(['Protocol', cdn.get('protocol')])
-    table.add_row(['Http Port', cdn.get('httpPort')])
-    table.add_row(['Https Port', cdn.get('httpsPort')])
-    table.add_row(['Certificate Type', cdn.get('certificateType')])
-    table.add_row(['Provider', cdn.get('vendorName')])
-    table.add_row(['Path', cdn.get('path')])
-
-    env.fout(table)
diff --git a/SoftLayer/CLI/cdn/delete.py b/SoftLayer/CLI/cdn/delete.py
deleted file mode 100644
index b089e9ef..00000000
--- a/SoftLayer/CLI/cdn/delete.py
+++ /dev/null
@@ -1,21 +0,0 @@
-"""Delete a CDN domain mapping."""
-# :license: MIT, see LICENSE for more details.
-
-import click
-
-import SoftLayer
-from SoftLayer.CLI import environment
-
-
-@click.command(cls=SoftLayer.CLI.command.SLCommand, )
-@click.argument('unique_id')
-@environment.pass_env
-def cli(env, unique_id):
-    """Delete a CDN domain mapping."""
-
-    manager = SoftLayer.CDNManager(env.client)
-
-    cdn = manager.delete_cdn(unique_id)
-
-    if cdn:
-        env.fout("Cdn with uniqueId: {} was deleted.".format(unique_id))
diff --git a/SoftLayer/CLI/event_log/get.py b/SoftLayer/CLI/event_log/get.py
index 9f5ddc6a..2ef96888 100644
--- a/SoftLayer/CLI/event_log/get.py
+++ b/SoftLayer/CLI/event_log/get.py
@@ -5,7 +5,6 @@
 
 import SoftLayer
 from SoftLayer.CLI import environment
-from SoftLayer.CLI import exceptions
 from SoftLayer import utils
 
 
@@ -57,11 +56,8 @@ def cli(env, date_min, date_max, obj_event, obj_id, obj_type, utc_offset, metada
         if user == "CUSTOMER":
             username = user_data.get(log['userId'])
             if username is None:
-                try:
-                    username = user_mgr.get_user(log['userId'], "mask[username]")['username']
-                    user_data[log['userId']] = username
-                except exceptions.SoftLayerAPIError:
-                    username = log['userId']
+                username = user_mgr.get_user(log['userId'], "mask[username]")['username']
+                user_data[log['userId']] = username
             user = username
 
         if metadata:
diff --git a/SoftLayer/CLI/firewall/detail.py b/SoftLayer/CLI/firewall/detail.py
index c07695d2..aa0b4fa6 100644
--- a/SoftLayer/CLI/firewall/detail.py
+++ b/SoftLayer/CLI/firewall/detail.py
@@ -12,10 +12,10 @@
 
 @click.command(cls=SoftLayer.CLI.command.SLCommand, )
 @click.argument('identifier')
-@click.option('--password', is_flag=True,
+@click.option('--credentials', type=click.BOOL,
               help="Display FortiGate username and FortiGate password to multi vlans.")
 @environment.pass_env
-def cli(env, identifier, password):
+def cli(env, identifier, credentials):
     """Detail firewall.
 
     EXAMPLES:
@@ -63,7 +63,7 @@ def cli(env, identifier, password):
             table.add_row(['private vlan', utils.lookup(_firewall, 'networkGateway', 'privateVlan', 'vlanNumber')])
             table.add_row(['type', _firewall.get('firewallType')])
 
-            if password:
+            if credentials:
                 table.add_row(['fortiGate username', utils.lookup(_firewall, 'managementCredentials', 'username')])
                 table.add_row(['fortiGate password', utils.lookup(_firewall, 'managementCredentials', 'password')])
 
diff --git a/SoftLayer/CLI/hardware/create_credential.py b/SoftLayer/CLI/hardware/create_credential.py
index 6d43501b..40bf14f6 100644
--- a/SoftLayer/CLI/hardware/create_credential.py
+++ b/SoftLayer/CLI/hardware/create_credential.py
@@ -14,37 +14,44 @@
 @click.option('--username', '-U', required=True, help="The username part of the username/password pair")
 @click.option('--password', '-P', required=True, help="The password part of the username/password pair.")
 @click.option('--notes', '-n', help="A note string stored for this username/password pair.")
-@click.option('--software', required=True, help="The name of this specific piece of software.")
+@click.option('--system', required=True, help="The name of this specific piece of software.")
 @environment.pass_env
-def cli(env, identifier, username, password, notes, software):
+def cli(env, identifier, username, password, notes, system):
     """Create a password for a software component."""
 
     mgr = SoftLayer.HardwareManager(env.client)
 
-    software_components = mgr.get_software_components(identifier)
-    software_id = ''
+    software = mgr.get_software_components(identifier)
+    sw_id = ''
     try:
-        for software_component in software_components:
-            if software_component['softwareLicense']['softwareDescription']['name'].lower() == software.lower():
-                software_id = software_component['id']
+        for sw_instance in software:
+            if (sw_instance['softwareLicense']['softwareDescription']['name']).lower() == system:
+                sw_id = sw_instance['id']
     except KeyError as ex:
-        raise exceptions.CLIAbort('Software not found') from ex
+        raise exceptions.CLIAbort('System id not found') from ex
 
     template = {
         "notes": notes,
         "password": password,
-        "softwareId": software_id,
-        "username": username
-    }
+        "softwareId": sw_id,
+        "username": username,
+        "software": {
+            "hardwareId": identifier,
+            "softwareLicense": {
+                "softwareDescription": {
+                    "name": system
+                }
+            }
+        }}
 
     result = mgr.create_credential(template)
 
-    table = formatting.KeyValueTable(['Name', 'Value'])
-    table.align['Name'] = 'r'
-    table.align['Value'] = 'l'
-    table.add_row(['Software Credential Id', result['id']])
+    table = formatting.KeyValueTable(['name', 'value'])
+    table.align['name'] = 'r'
+    table.align['value'] = 'l'
+    table.add_row(['Software Id', result['id']])
     table.add_row(['Created', result['createDate']])
     table.add_row(['Username', result['username']])
     table.add_row(['Password', result['password']])
-    table.add_row(['Notes', result.get('notes') or formatting.blank()])
+    table.add_row(['Notes', result['notes']])
     env.fout(table)
diff --git a/SoftLayer/CLI/object_storage/cancel.py b/SoftLayer/CLI/object_storage/cancel.py
new file mode 100644
index 00000000..cf9c0ba7
--- /dev/null
+++ b/SoftLayer/CLI/object_storage/cancel.py
@@ -0,0 +1,39 @@
+"""Cancel an existing object-storage account."""
+# :license: MIT, see LICENSE for more details.
+
+import click
+
+import SoftLayer
+from SoftLayer.CLI import environment
+from SoftLayer.CLI import exceptions
+from SoftLayer.CLI import formatting
+
+
+@click.command(cls=SoftLayer.CLI.command.SLCommand, )
+@click.argument('storage-id')
+@click.option('--reason', help="An optional reason for cancellation")
+@click.option('--immediate',
+              is_flag=True,
+              help="Cancels the object storage immediately instead "
+                   "of on the billing anniversary")
+@environment.pass_env
+def cli(env, storage_id, reason, immediate):
+    """Cancel an existing object storage."""
+
+    block_storage_manager = SoftLayer.BlockStorageManager(env.client)
+
+    if not (env.skip_confirmations or formatting.no_going_back(storage_id)):
+        raise exceptions.CLIAbort('Aborted')
+
+    cancelled = block_storage_manager.cancel_block_volume(storage_id,
+                                                          reason, immediate)
+
+    if cancelled:
+        if immediate:
+            click.echo('Object storage with id %s has been marked'
+                       ' for immediate cancellation' % storage_id)
+        else:
+            click.echo('Object storage with id %s has been marked'
+                       ' for cancellation' % storage_id)
+    else:
+        click.echo('Unable to cancel object storage %s' % storage_id)
diff --git a/SoftLayer/CLI/routes.py b/SoftLayer/CLI/routes.py
index 63f8e7b7..5f76e307 100644
--- a/SoftLayer/CLI/routes.py
+++ b/SoftLayer/CLI/routes.py
@@ -26,7 +26,6 @@
     ('account:bandwidth-pools', 'SoftLayer.CLI.account.bandwidth_pools:cli'),
     ('account:hooks', 'SoftLayer.CLI.account.hooks:cli'),
     ('account:hook-create', 'SoftLayer.CLI.account.hook_create:cli'),
-    ('account:hook-delete', 'SoftLayer.CLI.account.hook_delete:cli'),
 
     ('virtual', 'SoftLayer.CLI.virt'),
     ('virtual:bandwidth', 'SoftLayer.CLI.virt.bandwidth:cli'),
@@ -81,8 +80,6 @@
     ('cdn:origin-list', 'SoftLayer.CLI.cdn.origin_list:cli'),
     ('cdn:origin-remove', 'SoftLayer.CLI.cdn.origin_remove:cli'),
     ('cdn:purge', 'SoftLayer.CLI.cdn.purge:cli'),
-    ('cdn:delete', 'SoftLayer.CLI.cdn.delete:cli'),
-    ('cdn:create', 'SoftLayer.CLI.cdn.create:cli'),
 
     ('config', 'SoftLayer.CLI.config'),
     ('config:setup', 'SoftLayer.CLI.config.setup:cli'),
@@ -263,6 +260,7 @@
     ('object-storage:accounts', 'SoftLayer.CLI.object_storage.list_accounts:cli'),
     ('object-storage:endpoints', 'SoftLayer.CLI.object_storage.list_endpoints:cli'),
     ('object-storage:credential', 'SoftLayer.CLI.object_storage.credential:cli'),
+    ('object-storage:cancel', 'SoftLayer.CLI.object_storage.cancel:cli'),
 
     ('order', 'SoftLayer.CLI.order'),
     ('order:category-list', 'SoftLayer.CLI.order.category_list:cli'),
diff --git a/SoftLayer/consts.py b/SoftLayer/consts.py
index fa640e04..fb235f96 100644
--- a/SoftLayer/consts.py
+++ b/SoftLayer/consts.py
@@ -5,7 +5,7 @@
 
     :license: MIT, see LICENSE for more details.
 """
-VERSION = 'v6.1.6'
+VERSION = 'v6.1.5'
 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_Account.py b/SoftLayer/fixtures/SoftLayer_Account.py
index 866af09f..d8f7fc72 100644
--- a/SoftLayer/fixtures/SoftLayer_Account.py
+++ b/SoftLayer/fixtures/SoftLayer_Account.py
@@ -1480,24 +1480,3 @@
         "name": "GettestProv12345",
         "uri": "http://test.com"
     }]
-
-getUpgradeRequests = [{
-    "createDate": "2023-03-01T19:39:51-06:00",
-    "id": 3237486,
-    "maintenanceStartTimeUtc": "2023-03-01T19:39:51-06:00",
-    "modifyDate": "2023-03-01T19:39:53-06:00",
-    "orderId": 103127604,
-    "statusId": 3,
-    "ticketId": 152510472,
-    "userId": 167758
-},
-    {
-        "createDate": "2023-02-27T19:41:26-06:00",
-        "id": 3229998,
-        "maintenanceStartTimeUtc": "2023-02-27T19:41:26-06:00",
-        "modifyDate": "2023-02-27T19:41:29-06:00",
-        "orderId": 103029352,
-        "statusId": 3,
-        "ticketId": 152452042,
-        "userId": 167758
-    }]
diff --git a/SoftLayer/fixtures/SoftLayer_Network_CdnMarketplace_Configuration_Mapping.py b/SoftLayer/fixtures/SoftLayer_Network_CdnMarketplace_Configuration_Mapping.py
index 46b3e675..e080c40e 100644
--- a/SoftLayer/fixtures/SoftLayer_Network_CdnMarketplace_Configuration_Mapping.py
+++ b/SoftLayer/fixtures/SoftLayer_Network_CdnMarketplace_Configuration_Mapping.py
@@ -50,52 +50,3 @@
         "cacheKeyQueryRule": "include: test"
     }
 ]
-
-deleteDomainMapping = [
-    {
-        "akamaiCname": "wildcard.appdomain.mdc.edgekey.net",
-        "certificateType": "NO_CERT",
-        "cname": "cdnakayq9fye4t88239.cdn.appdomain.cloud",
-        "createDate": "2023-03-29T07:33:42-06:00",
-        "domain": "www.test.com",
-        "header": "www.header.com",
-        "httpPort": 80,
-        "httpsPort": None,
-        "modifyDate": "2023-03-29T07:33:46-06:00",
-        "originHost": "67.228.227.82",
-        "originType": "HOST_SERVER",
-        "path": "/path/*",
-        "performanceConfiguration": "General web delivery",
-        "protocol": "HTTP",
-        "respectHeaders": False,
-        "serveStale": True,
-        "status": "DELETING",
-        "uniqueId": "303727924488685",
-        "vendorName": "akamai"
-    }
-]
-createDomainMapping = [
-    {
-        "bucketName": "test-bucket-name",
-        "akamaiCname": "wildcard.appdomain.mdc.edgekey.net",
-        "cacheKeyQueryRule": "include-all",
-        "certificateType": "WILDCARD_CERT",
-        "cname": "test.cdn.appdomain.cloud",
-        "createDate": "2020-09-29T15:19:01-06:00",
-        "domain": "test.com",
-        "header": "header.test.com",
-        "httpPort": 80,
-        "httpsPort": None,
-        "modifyDate": "2021-06-24T09:02:22-06:00",
-        "originHost": "10.32.12.125",
-        "originType": "HOST_SERVER",
-        "path": "/*",
-        "performanceConfiguration": "General web delivery",
-        "protocol": "HTTP",
-        "respectHeaders": True,
-        "serveStale": True,
-        "status": "CNAME_CONFIGURATION",
-        "uniqueId": "354034879028850",
-        "vendorName": "akamai"
-    }
-]
diff --git a/SoftLayer/fixtures/SoftLayer_Provisioning_Hook.py b/SoftLayer/fixtures/SoftLayer_Provisioning_Hook.py
index 86c5756d..452a1585 100644
--- a/SoftLayer/fixtures/SoftLayer_Provisioning_Hook.py
+++ b/SoftLayer/fixtures/SoftLayer_Provisioning_Hook.py
@@ -5,4 +5,3 @@
                 'uri': 'http://slclitest.com',
                 'hookType': {}
 }
-deleteObject = True
diff --git a/SoftLayer/managers/account.py b/SoftLayer/managers/account.py
index a07312f9..c2386a83 100644
--- a/SoftLayer/managers/account.py
+++ b/SoftLayer/managers/account.py
@@ -407,16 +407,3 @@ def create_provisioning(self, name, uri):
             'uri': uri
         }
         return self.client.call('SoftLayer_Provisioning_Hook', 'createObject', template)
-
-    def delete_provisioning(self, identifier):
-        """Delete a provisioning script
-
-        param: identifier provisioning script identifier
-
-        Returns: boolean
-        """
-        return self.client.call("SoftLayer_Provisioning_Hook", "deleteObject", id=identifier)
-
-    def get_account_upgrade_orders(self, limit=100):
-        """Gets upgrade order list"""
-        return self.client.call('SoftLayer_Account', 'getUpgradeRequests', limit=limit)
diff --git a/SoftLayer/managers/cdn.py b/SoftLayer/managers/cdn.py
index 0b9aa0a7..1c6597b4 100644
--- a/SoftLayer/managers/cdn.py
+++ b/SoftLayer/managers/cdn.py
@@ -269,71 +269,3 @@ def get_cache_key_query_rule(cache_type, cache):
         cache_result = '%s: %s' % (cache_type, cache['description'])
 
         return cache_result
-
-    def delete_cdn(self, unique_id):
-        """Delete CDN domain mapping for a particular customer.
-
-        :param str unique_id: The unique ID associated with the CDN.
-        :returns: The cdn that is being deleted.
-        """
-
-        return self.cdn_configuration.deleteDomainMapping(unique_id)
-
-    def create_cdn(self, hostname=None, origin=None, origin_type=None, http=None, https=None, bucket_name=None,
-                   cname=None, header=None, path=None, ssl=None):
-        """Create CDN domain mapping for a particular customer.
-
-        :param str hostname: The unique ID associated with the CDN.
-        :param str origin: ip address or hostname if origin_type=server, API endpoint for
-                           your S3 object storage if origin_type=storage
-        :param str origin_type: it can be 'server' or 'storage' types.
-        :param int http: http port
-        :param int https: https port
-        :param str bucket_name: name of the available resource
-        :param str cname: globally unique subdomain
-        :param str header: the edge server uses the host header to communicate with the origin.
-                            It defaults to hostname. (optional)
-        :param str path: relative path to the domain provided, e.g. "/articles/video"
-        :param str ssl: ssl certificate
-        :returns: The cdn that is being created.
-        """
-        types = {'server': 'HOST_SERVER', 'storage': 'OBJECT_STORAGE'}
-        ssl_certificate = {'wilcard': 'WILDCARD_CERT', 'dvSan': 'SHARED_SAN_CERT'}
-
-        new_origin = {
-            'domain': hostname,
-            'origin': origin,
-            'originType': types.get(origin_type),
-            'vendorName': 'akamai',
-        }
-
-        protocol = ''
-        if http:
-            protocol = 'HTTP'
-            new_origin['httpPort'] = http
-        if https:
-            protocol = 'HTTPS'
-            new_origin['httpsPort'] = https
-            new_origin['certificateType'] = ssl_certificate.get(ssl)
-        if http and https:
-            protocol = 'HTTP_AND_HTTPS'
-
-        new_origin['protocol'] = protocol
-
-        if types.get(origin_type) == 'OBJECT_STORAGE':
-            new_origin['bucketName'] = bucket_name
-            new_origin['header'] = header
-
-        if cname:
-            new_origin['cname'] = cname + '.cdn.appdomain.cloud'
-
-        if header:
-            new_origin['header'] = header
-
-        if path:
-            new_origin['path'] = '/' + path
-
-        origin = self.cdn_configuration.createDomainMapping(new_origin)
-
-        # The method createOriginPath() returns an array but there is only 1 object
-        return origin[0]
diff --git a/docs/cli/account.rst b/docs/cli/account.rst
index 248525cb..c2ac4900 100644
--- a/docs/cli/account.rst
+++ b/docs/cli/account.rst
@@ -59,7 +59,3 @@ Account Commands
 .. click:: SoftLayer.CLI.account.hook_create:cli
     :prog: account hook-create
     :show-nested:
-
-.. click:: SoftLayer.CLI.account.hook_delete:cli
-    :prog: account hook-delete
-    :show-nested:
diff --git a/docs/cli/cdn.rst b/docs/cli/cdn.rst
index de9e7c6f..3b749995 100644
--- a/docs/cli/cdn.rst
+++ b/docs/cli/cdn.rst
@@ -31,11 +31,3 @@ Interacting with CDN
 .. click:: SoftLayer.CLI.cdn.edit:cli
    :prog: cdn edit
    :show-nested:
-
-.. click:: SoftLayer.CLI.cdn.delete:cli
-   :prog: cdn delete
-   :show-nested:
-
-.. click:: SoftLayer.CLI.cdn.create:cli
-   :prog: cdn create
-   :show-nested:
\ No newline at end of file
diff --git a/docs/cli/object_storage.rst b/docs/cli/object_storage.rst
index 43bf03bb..0b1978c5 100644
--- a/docs/cli/object_storage.rst
+++ b/docs/cli/object_storage.rst
@@ -28,3 +28,7 @@ Object Storage Commands
 .. click:: SoftLayer.CLI.object_storage.credential.create:cli
     :prog: object-storage credential create
     :show-nested:
+
+.. click:: SoftLayer.CLI.object_storage.cancel:cli
+    :prog: object-storage cancel
+    :show-nested:
diff --git a/setup.py b/setup.py
index c151f723..075750c1 100644
--- a/setup.py
+++ b/setup.py
@@ -16,7 +16,7 @@
 
 setup(
     name='SoftLayer',
-    version='6.1.6',
+    version='6.1.5',
     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.3'
+        'rich == 13.3.2'
     ],
     keywords=['softlayer', 'cloud', 'slcli'],
     classifiers=[
diff --git a/tools/requirements.txt b/tools/requirements.txt
index 50dd0d5f..0446899b 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.3
+rich == 13.3.2
 # only used for soap transport
 # softlayer-zeep >= 5.0.0


Test patch:
diff --git a/tests/CLI/modules/account_tests.py b/tests/CLI/modules/account_tests.py
index a158713f..60a572b7 100644
--- a/tests/CLI/modules/account_tests.py
+++ b/tests/CLI/modules/account_tests.py
@@ -169,13 +169,3 @@ def test_created_provisioning_hook(self):
         result = self.run_command(['account', 'hook-create', '--name', 'testslcli', '--uri', 'http://slclitest.com'])
         self.assert_no_fail(result)
         self.assert_called_with('SoftLayer_Provisioning_Hook', 'createObject')
-
-    def test_delete_provisioning_hook(self):
-        result = self.run_command(['account', 'hook-delete', '123456'])
-        self.assert_no_fail(result)
-        self.assert_called_with('SoftLayer_Provisioning_Hook', 'deleteObject')
-
-    def test_order_upgrade(self):
-        result = self.run_command(['account', 'orders', '--upgrades'])
-        self.assert_no_fail(result)
-        self.assert_called_with('SoftLayer_Account', 'getUpgradeRequests')
diff --git a/tests/CLI/modules/cdn_tests.py b/tests/CLI/modules/cdn_tests.py
index 2e368261..a7dfa340 100644
--- a/tests/CLI/modules/cdn_tests.py
+++ b/tests/CLI/modules/cdn_tests.py
@@ -123,40 +123,3 @@ def test_edit_cache_by_uniqueId(self):
         self.assert_no_fail(result)
         header_result = json.loads(result.output)
         self.assertEqual('include: test', header_result['Cache key optimization'])
-
-    def test_delete_cdn(self):
-        result = self.run_command(['cdn', 'delete', '123456'])
-        self.assert_no_fail(result)
-        self.assertIn("Cdn with uniqueId: 123456 was deleted.", result.output)
-
-    def test_create_cdn(self):
-        result = self.run_command(['cdn', 'create', '--hostname', 'www.example.com',
-                                  '--origin', '123.123.123.123', '--http', '80'])
-        self.assert_no_fail(result)
-        self.assertIn("CDN Unique ID", result.output)
-        self.assertIn("354034879028850", result.output)
-        self.assertIn("Hostname", result.output)
-        self.assertIn("test.com", result.output)
-        self.assertIn("header", result.output)
-        self.assertIn("header.test.com", result.output)
-        self.assertIn("Http Port", result.output)
-        self.assertIn("80", result.output)
-        self.assertIn("Path", result.output)
-        self.assertIn("/*", result.output)
-
-    def test_create_cdn_without_hostname(self):
-        result = self.run_command(['cdn', 'create'])
-        self.assertEqual(2, result.exit_code)
-        print(result.output)
-        self.assertIn("Error: Missing option '--hostname'.", result.output)
-
-    def test_create_cdn_without_origin(self):
-        result = self.run_command(['cdn', 'create', '--hostname', 'www.example.com'])
-        self.assertEqual(2, result.exit_code)
-        print(result.output)
-        self.assertIn("Error: Missing option '--origin'.", result.output)
-
-    def test_create_cdn_without_http_or_https(self):
-        result = self.run_command(['cdn', 'create', '--hostname', 'www.example.com', '--origin', '123.123.123.123'])
-        self.assertEqual(2, result.exit_code)
-        self.assertIn("Is needed http or https options", result.exception.message)
diff --git a/tests/CLI/modules/firewall_tests.py b/tests/CLI/modules/firewall_tests.py
index 79d23969..3ccc2c59 100644
--- a/tests/CLI/modules/firewall_tests.py
+++ b/tests/CLI/modules/firewall_tests.py
@@ -73,7 +73,7 @@ def test_detail_vlan_firewall(self):
                                      'src_mask': '0.0.0.0'}]})
 
     def test_detail_multi_vlan_firewall(self):
-        result = self.run_command(['firewall', 'detail', 'multiVlan:1234', '--password'])
+        result = self.run_command(['firewall', 'detail', 'multiVlan:1234', '--credentials', 'true'])
         self.assert_no_fail(result)
         json_result = json.loads(result.output)
         self.assertEqual(json_result['rules'][0]['action'], 'permit')
diff --git a/tests/CLI/modules/object_storage_tests.py b/tests/CLI/modules/object_storage_tests.py
index 38612a1c..f292550d 100644
--- a/tests/CLI/modules/object_storage_tests.py
+++ b/tests/CLI/modules/object_storage_tests.py
@@ -120,3 +120,13 @@ def test_list_credential_by_username(self, resolve_id_mock):
         resolve_id_mock.return_value = 100
         result = self.run_command(['object-storage', 'credential', 'list', 'test'])
         self.assert_no_fail(result)
+
+    def test_object_storage_cancel(self):
+        result = self.run_command([
+            '--really', 'object-storage', 'cancel', '1234'])
+
+        self.assert_no_fail(result)
+        self.assertEqual('Object storage with id 1234 has been marked'
+                         ' for cancellation\n', result.output)
+        self.assert_called_with('SoftLayer_Billing_Item', 'cancelItem',
+                                args=(False, True, None))
diff --git a/tests/CLI/modules/server_tests.py b/tests/CLI/modules/server_tests.py
index 1f17e0c2..d0a0d8ba 100644
--- a/tests/CLI/modules/server_tests.py
+++ b/tests/CLI/modules/server_tests.py
@@ -1055,7 +1055,7 @@ def test_notification_delete(self):
     def test_create_credential(self):
         result = self.run_command(['hw', 'create-credential', '123456',
                                    '--username', 'testslcli', '--password', 'test-123456',
-                                   '--notes', 'test slcli', '--software', 'system'])
+                                   '--notes', 'test slcli', '--system', 'system'])
         self.assert_no_fail(result)
 
     def test_list_hw_search_noargs(self):
diff --git a/tests/managers/account_tests.py b/tests/managers/account_tests.py
index 80ed7bc3..3fa796b2 100644
--- a/tests/managers/account_tests.py
+++ b/tests/managers/account_tests.py
@@ -184,11 +184,3 @@ def test_get_provisioning_scripts(self):
     def test_create_provisioning_scripts(self):
         self.manager.create_provisioning('testslcli', 'http://slclitest.com')
         self.assert_called_with('SoftLayer_Provisioning_Hook', 'createObject')
-
-    def test_delete_provisioning_scripts(self):
-        self.manager.delete_provisioning(123456)
-        self.assert_called_with("SoftLayer_Provisioning_Hook", "deleteObject")
-
-    def test_get_upgrades_orders(self):
-        self.manager.get_account_upgrade_orders()
-        self.assert_called_with("SoftLayer_Account", "getUpgradeRequests")
diff --git a/tests/managers/cdn_tests.py b/tests/managers/cdn_tests.py
index 6a220e28..b0e641c6 100644
--- a/tests/managers/cdn_tests.py
+++ b/tests/managers/cdn_tests.py
@@ -150,26 +150,3 @@ def test_cdn_instance_by_hostname(self):
         self.assert_called_with(
             'SoftLayer_Network_CdnMarketplace_Configuration_Mapping',
             'listDomainMappings',)
-
-    def test_delete_cdn(self):
-        uniqueId = "123465"
-        self.cdn_client.delete_cdn(uniqueId)
-
-        args = (uniqueId,)
-
-        self.assert_called_with('SoftLayer_Network_CdnMarketplace_Configuration_Mapping',
-                                'deleteDomainMapping',
-                                args=args)
-
-    def test_create_cdn(self):
-        hostname = "test.com"
-        origin = "123.123.123.123"
-        origin_type = "server"
-        http = 80
-        newCdn = ({"domain": hostname, "origin": origin, "originType": "HOST_SERVER",
-                  "vendorName": "akamai", "httpPort": http, "protocol": "HTTP"},)
-        self.cdn_client.create_cdn(hostname, origin, origin_type, http)
-
-        self.assert_called_with('SoftLayer_Network_CdnMarketplace_Configuration_Mapping',
-                                'createDomainMapping',
-                                args=newCdn)