http_port information was used to display the guest console
But since we have changed how to redirect user to guest console by adding
the ui/pages/websockify/console.html it is not in use anymore.
So remove it.
Signed-off-by: Aline Manera <alinefm(a)linux.vnet.ibm.com>
---
docs/API.md | 1 -
src/kimchi/mockmodel.py | 5 ++---
src/kimchi/model/config.py | 3 +--
src/kimchi/server.py | 1 -
tests/test_rest.py | 3 ++-
5 files changed, 5 insertions(+), 8 deletions(-)
diff --git a/docs/API.md b/docs/API.md
index 20f5f23..13db844 100644
--- a/docs/API.md
+++ b/docs/API.md
@@ -598,7 +598,6 @@ Contains information about the application environment and
configuration.
**Methods:**
* **GET**: Retrieve configuration information
- * http_port: The port number on which the server is listening
* display_proxy_port: Port for vnc and spice's websocket proxy to listen on
* version: The version of the kimchi service
* **POST**: *See Configuration Actions*
diff --git a/src/kimchi/mockmodel.py b/src/kimchi/mockmodel.py
index e5e5467..5799d3c 100644
--- a/src/kimchi/mockmodel.py
+++ b/src/kimchi/mockmodel.py
@@ -924,9 +924,8 @@ class MockModel(object):
return disks.get_partition_details(name)
def config_lookup(self, name):
- return {'http_port': cherrypy.config.nginx_port,
- 'display_proxy_port':
- kconfig.get('display', 'display_proxy_port'),
+ return {'display_proxy_port': kconfig.get('display',
+ 'display_proxy_port'),
'version': config.get_version()}
def packagesupdate_get_list(self):
diff --git a/src/kimchi/model/config.py b/src/kimchi/model/config.py
index 0466f6f..90bb923 100644
--- a/src/kimchi/model/config.py
+++ b/src/kimchi/model/config.py
@@ -40,8 +40,7 @@ class ConfigModel(object):
def lookup(self, name):
proxy_port = kconfig.get('display', 'display_proxy_port')
- return {'http_port': cherrypy.config.nginx_port,
- 'display_proxy_port': proxy_port,
+ return {'display_proxy_port': proxy_port,
'version': get_version()}
diff --git a/src/kimchi/server.py b/src/kimchi/server.py
index bca2147..10f5dff 100644
--- a/src/kimchi/server.py
+++ b/src/kimchi/server.py
@@ -87,7 +87,6 @@ class Server(object):
# directly. You must go through the proxy.
cherrypy.server.socket_host = '127.0.0.1'
cherrypy.server.socket_port = options.cherrypy_port
- cherrypy.config.nginx_port = options.port
cherrypy.log.screen = True
cherrypy.log.access_file = options.access_log
diff --git a/tests/test_rest.py b/tests/test_rest.py
index 0bf5997..ca50f9e 100644
--- a/tests/test_rest.py
+++ b/tests/test_rest.py
@@ -1526,7 +1526,8 @@ class RestTests(unittest.TestCase):
def test_config(self):
resp = self.request('/config').read()
conf = json.loads(resp)
- self.assertEquals(port, conf['http_port'])
+ keys = ["display_proxy_port", "version"]
+ self.assertEquals(keys, sorted(conf.keys()))
def test_capabilities(self):
resp = self.request('/config/capabilities').read()
--
1.9.3