Repository: softlayer/softlayer-python

Issue:
ID > GUID
Switch the default display to use an object's ID rather than its GUID. Also use the ID rather than the GUID during confirmation text entries.

Discussion:
landscape-bot: [![Code Health](https://landscape.io/badge/153445/landscape.svg?style=flat)](https://landscape.io/diff/140430)
Code quality remained the same when pulling **[4a1754c](https://github.com/sudorandom/softlayer-python/commit/4a1754cc1ec2498205c7a24f66e4a883ab705e70) on sudorandom:issue-536** into **[f6722dc](https://github.com/softlayer/softlayer-python/commit/f6722dcb5dc6021cd813280a789fd39e81053da0) on softlayer:master**.

Patch:
diff --git a/SoftLayer/CLI/server/list.py b/SoftLayer/CLI/server/list.py
index dec63ee5..03ba456e 100644
--- a/SoftLayer/CLI/server/list.py
+++ b/SoftLayer/CLI/server/list.py
@@ -41,7 +41,7 @@ def cli(env, sortby, cpu, domain, datacenter, hostname, memory, network, tag):
                                     tags=tag)
 
     table = formatting.Table([
-        'guid',
+        'id',
         'hostname',
         'primary_ip',
         'backend_ip',
@@ -51,10 +51,8 @@ def cli(env, sortby, cpu, domain, datacenter, hostname, memory, network, tag):
     table.sortby = sortby or 'hostname'
 
     for server in servers:
-        # NOTE(kmcdonald): There are cases where a server might not have a
-        #                  globalIdentifier or hostname.
         table.add_row([
-            utils.lookup(server, 'globalIdentifier') or server['id'],
+            utils.lookup(server, 'id'),
             utils.lookup(server, 'hostname') or formatting.blank(),
             utils.lookup(server, 'primaryIpAddress') or formatting.blank(),
             utils.lookup(server, 'primaryBackendIpAddress') or
diff --git a/SoftLayer/CLI/virt/list.py b/SoftLayer/CLI/virt/list.py
index 8419f02a..8b92acc1 100644
--- a/SoftLayer/CLI/virt/list.py
+++ b/SoftLayer/CLI/virt/list.py
@@ -50,7 +50,7 @@ def cli(env, sortby, cpu, domain, datacenter, hostname, memory, network,
                                 tags=tag_list)
 
     table = formatting.Table([
-        'guid',
+        'id',
         'hostname',
         'primary_ip',
         'backend_ip',
@@ -61,7 +61,7 @@ def cli(env, sortby, cpu, domain, datacenter, hostname, memory, network,
 
     for guest in guests:
         table.add_row([
-            utils.lookup(guest, 'globalIdentifier') or guest['id'],
+            utils.lookup(guest, 'id'),
             utils.lookup(guest, 'hostname') or formatting.blank(),
             utils.lookup(guest, 'primaryIpAddress') or formatting.blank(),
             utils.lookup(guest, 'primaryBackendIpAddress') or


Test patch:
diff --git a/SoftLayer/tests/CLI/modules/server_tests.py b/SoftLayer/tests/CLI/modules/server_tests.py
index acbab824..a65538cf 100644
--- a/SoftLayer/tests/CLI/modules/server_tests.py
+++ b/SoftLayer/tests/CLI/modules/server_tests.py
@@ -65,7 +65,7 @@ def test_list_servers(self):
                 'datacenter': 'TEST00',
                 'primary_ip': '172.16.1.100',
                 'hostname': 'hardware-test1',
-                'guid': '1a2b3c-1701',
+                'id': 1000,
                 'backend_ip': '10.1.0.2',
                 'action': 'TXN_NAME',
             },
@@ -73,7 +73,7 @@ def test_list_servers(self):
                 'datacenter': 'TEST00',
                 'primary_ip': '172.16.4.94',
                 'hostname': 'hardware-test2',
-                'guid': '1a2b3c-1702',
+                'id': 1001,
                 'backend_ip': '10.1.0.3',
                 'action': None,
             },
@@ -81,7 +81,7 @@ def test_list_servers(self):
                 'datacenter': 'TEST00',
                 'primary_ip': '172.16.4.95',
                 'hostname': 'hardware-bad-memory',
-                'guid': 1002,
+                'id': 1002,
                 'backend_ip': '10.1.0.4',
                 'action': None,
             }
diff --git a/SoftLayer/tests/CLI/modules/vs_tests.py b/SoftLayer/tests/CLI/modules/vs_tests.py
index 75459ff0..9c1064bd 100644
--- a/SoftLayer/tests/CLI/modules/vs_tests.py
+++ b/SoftLayer/tests/CLI/modules/vs_tests.py
@@ -22,13 +22,13 @@ def test_list_vs(self):
                            'primary_ip': '172.16.240.2',
                            'hostname': 'vs-test1',
                            'action': None,
-                           'guid': '1a2b3c-1701',
+                           'id': 100,
                            'backend_ip': '10.45.19.37'},
                           {'datacenter': 'TEST00',
                            'primary_ip': '172.16.240.7',
                            'hostname': 'vs-test2',
                            'action': None,
-                           'guid': '05a8ac-6abf0',
+                           'id': 104,
                            'backend_ip': '10.45.19.35'}])
 
     def test_detail_vs(self):