nebius/SWE-rebench-V2-PRs huggingface dataset:
Repository: softlayer/softlayer-python
Pull request #1781 (2022-10-26 20:05:39)

fix the hw credential error
#[issue1776](https://github.com/softlayer/softlayer-python/issues/1776)

![image](https://user-images.githubusercontent.com/22535437/198125973-261b3316-4bc0-4e08-a1cc-9d1e3b0be128.png)



Patch:
diff --git a/SoftLayer/CLI/hardware/credentials.py b/SoftLayer/CLI/hardware/credentials.py
index 6371f639..dc6ddcde 100644
--- a/SoftLayer/CLI/hardware/credentials.py
+++ b/SoftLayer/CLI/hardware/credentials.py
@@ -29,6 +29,6 @@ def cli(env, identifier):
         for credentials in item['passwords']:
             table.add_row([credentials.get('username', 'None'),
                            credentials.get('password', 'None'),
-                           item['softwareLicense']['softwareDescription']['referenceCode'],
+                           item['softwareLicense']['softwareDescription']['name'],
                            item['softwareLicense']['softwareDescription']['version']])
     env.fout(table)
diff --git a/SoftLayer/managers/hardware.py b/SoftLayer/managers/hardware.py
index 92a820ca..02453efe 100644
--- a/SoftLayer/managers/hardware.py
+++ b/SoftLayer/managers/hardware.py
@@ -260,7 +260,7 @@ def get_hardware(self, hardware_id, **kwargs):
                                                         name,
                                                         version,
                                                         referenceCode]],
-                    passwords[username,password]],'''
+                    passwords[id,username,password]],'''
                 'billingItem['
                 'id,nextInvoiceTotalRecurringAmount,'
                 'nextInvoiceChildren[nextInvoiceTotalRecurringAmount],'


Test patch:
diff --git a/tests/CLI/modules/server_tests.py b/tests/CLI/modules/server_tests.py
index d2353f32..2aaca772 100644
--- a/tests/CLI/modules/server_tests.py
+++ b/tests/CLI/modules/server_tests.py
@@ -46,14 +46,16 @@ def test_server_credentials(self):
                     'softwareDescription':
                         {
                             'referenceCode': 'CENTOS_7_64',
-                            'version': '7.8 - 64'}}}]
+                            'version': '7.8 - 64',
+                            'name': 'Centos'
+                        }}}]
         }
         result = self.run_command(['hardware', 'credentials', '12345'])
 
         self.assert_no_fail(result)
         self.assertEqual(json.loads(result.output), [
             {'Password': 'abc123',
-             'Software': 'CENTOS_7_64',
+             'Software': 'Centos',
              'Username': 'root',
              'Version': '7.8 - 64'}
         ])
@@ -93,7 +95,7 @@ def test_server_credentials_exception_password_not_found(self):
                     "passwords": [{}],
                     "softwareLicense": {
                         "softwareDescription": {
-                            "referenceCode": None,
+                            "name": None,
                             "version": None
                         }
                     }
Repository: softlayer/softlayer-python
Pull request #1847 (2023-01-27 22:24:29)

unexpected error when using vlan list with --limit 0 or 999 and a lar…
[#issue1844](https://github.com/softlayer/softlayer-python/issues/1844)

![image](https://user-images.githubusercontent.com/22535437/215217441-1844f9b9-bb70-4e4b-91a6-e78e4d0bdaab.png)



Patch:
diff --git a/SoftLayer/CLI/vlan/list.py b/SoftLayer/CLI/vlan/list.py
index fc5d4ca6..c06b6460 100644
--- a/SoftLayer/CLI/vlan/list.py
+++ b/SoftLayer/CLI/vlan/list.py
@@ -65,7 +65,7 @@ def cli(env, sortby, datacenter, number, name, limit):
             vlan.get('vlanNumber'),
             vlan.get('fullyQualifiedName'),
             vlan.get('name') or formatting.blank(),
-            vlan.get('networkSpace').capitalize(),
+            vlan.get('networkSpace', 'Direct Link').capitalize(),
             utils.lookup(vlan, 'primaryRouter', 'datacenter', 'name'),
             get_pod_with_closed_announcement(vlan, pods),
             get_gateway_firewall(vlan),
diff --git a/SoftLayer/fixtures/SoftLayer_Account.py b/SoftLayer/fixtures/SoftLayer_Account.py
index 305084f8..62ee7f06 100644
--- a/SoftLayer/fixtures/SoftLayer_Account.py
+++ b/SoftLayer/fixtures/SoftLayer_Account.py
@@ -485,7 +485,7 @@
 
 getNetworkVlans = [{
     'id': 1,
-    'networkSpace': 'PRIVATE',
+    'networkSpace': '',
     'hardwareCount': 0,
     'hardware': [],
     'vlanNumber': 12,


Test patch:
diff --git a/tests/CLI/modules/vlan_tests.py b/tests/CLI/modules/vlan_tests.py
index 6c8fbce0..b7660fb4 100644
--- a/tests/CLI/modules/vlan_tests.py
+++ b/tests/CLI/modules/vlan_tests.py
@@ -143,6 +143,12 @@ def test_vlan_list(self):
         self.assert_no_fail(result)
         self.assert_called_with('SoftLayer_Account', 'getNetworkVlans')
 
+    def test_vlan_list_space_empty(self):
+        result = self.run_command(['vlan', 'list'])
+        self.assert_no_fail(result)
+        self.assert_called_with('SoftLayer_Account', 'getNetworkVlans')
+        self.assertEqual(json.loads(result.output)[0]['Network'], '')
+
     def test_create_vlan(self):
         _mock = self.set_mock('SoftLayer_Product_Package', 'getItems')
         _mock.return_value = SoftLayer_Product_Package.getItemsVLAN
Repository: softlayer/softlayer-python
Pull request #1934 (2023-05-08 21:45:32)

Updated command - slcli cdn purge
Issue: #1933 
```
C:\>slcli cdn purge 74312 "/test"
┌─────────────────────┬───────┬─────────┬─────────┐
│        Date         │ Path  │  Saved  │ Status  │
├─────────────────────┼───────┼─────────┼─────────┤
│ 2023-05-08 17:39:06 │ /test │ UNSAVED │ SUCCESS │
└─────────────────────┴───────┴─────────┴─────────┘
```


Patch:
diff --git a/SoftLayer/managers/cdn.py b/SoftLayer/managers/cdn.py
index 61e32d41..703e6f14 100644
--- a/SoftLayer/managers/cdn.py
+++ b/SoftLayer/managers/cdn.py
@@ -140,7 +140,6 @@ def purge_content(self, unique_id, path):
         :param str path: A string of url or path that should be purged.
         :returns: A Container_Network_CdnMarketplace_Configuration_Cache_Purge array object
         """
-        path = f"/{path}"
         return self.cdn_purge.createPurge(unique_id, path)
 
     def get_usage_metrics(self, unique_id, history=30, frequency="aggregate"):


Test patch:
diff --git a/tests/managers/cdn_tests.py b/tests/managers/cdn_tests.py
index 5001331d..6a220e28 100644
--- a/tests/managers/cdn_tests.py
+++ b/tests/managers/cdn_tests.py
@@ -109,7 +109,7 @@ def test_remove_origin(self):
                                 args=args)
 
     def test_purge_content(self):
-        self.cdn_client.purge_content("12345", "example1")
+        self.cdn_client.purge_content("12345", "/example1")
 
         args = ("12345",
                 "/example1")