Allow for dynamic config file creation
diff --git a/gstack/__init__.py b/gstack/__init__.py
index 4b54091..2627d2b 100644
--- a/gstack/__init__.py
+++ b/gstack/__init__.py
@@ -35,21 +35,23 @@
 
     return config_file
 
+
+def configure_app():
+    config_file = _load_config_file()
+    app.config.from_pyfile(config_file)
+    app.config['DATA'] = os.path.abspath(os.path.dirname(__file__)) + '/data'
+    app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///' + \
+        os.path.join(app.config['DATA'], 'app.db')
+
+
 app = Flask(__name__)
+
 db = SQLAlchemy(app)
 publickey_storage = {}
 
+from gstack.controllers import *
+
 
 basedir = os.path.abspath(os.path.dirname(__file__))
 
-config_file = _load_config_file()
-app.config.from_pyfile(config_file)
-
-app.config['DATA'] = os.path.abspath(os.path.dirname(__file__)) + '/data'
-
-app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///' + \
-    os.path.join(app.config['DATA'], 'app.db')
-
-from gstack.controllers import *
-
 db.create_all()
diff --git a/gstack/appserver.py b/gstack/appserver.py
index 36707f4..6526d7c 100755
--- a/gstack/appserver.py
+++ b/gstack/appserver.py
@@ -17,12 +17,13 @@
 # specific language governing permissions and limitations
 # under the License.
 
-from gstack import app
+from gstack import app, configure_app
 
 from OpenSSL import SSL
 
 
 def main():
+    configure_app()
     context = SSL.Context(SSL.SSLv23_METHOD)
     context.use_privatekey_file(app.config['DATA'] + '/server.key')
     context.use_certificate_file(app.config['DATA'] + '/server.crt')
diff --git a/gstack/controllers/disks.py b/gstack/controllers/disks.py
index a7bcdbd..4c8d8a4 100644
--- a/gstack/controllers/disks.py
+++ b/gstack/controllers/disks.py
@@ -81,7 +81,7 @@
     return response
 
 
-@app.route('/' + app.config['PATH'] + '<projectid>/aggregated/disks', methods=['GET'])
+@app.route('/compute/v1/projects/<projectid>/aggregated/disks', methods=['GET'])
 @authentication.required
 def aggregatedlistdisks(projectid, authorization):
     disk_list = _get_disks(authorization=authorization)
@@ -133,7 +133,7 @@
     return helper.create_response(data=populated_response)
 
 
-@app.route('/' + app.config['PATH'] + '<projectid>/zones/<zone>/disks', methods=['GET'])
+@app.route('/compute/v1/projects/<projectid>/zones/<zone>/disks', methods=['GET'])
 @authentication.required
 def listdisks(projectid, authorization, zone):
     disk = None
@@ -184,7 +184,7 @@
     return helper.create_response(data=populated_response)
 
 
-@app.route('/' + app.config['PATH'] + '<projectid>/zones/<zone>/disks/<disk>', methods=['GET'])
+@app.route('/compute/v1/projects/<projectid>/zones/<zone>/disks/<disk>', methods=['GET'])
 @authentication.required
 def getdisk(projectid, authorization, zone, disk):
     response = get_disk_by_name(
diff --git a/gstack/controllers/firewalls.py b/gstack/controllers/firewalls.py
index f85c4b6..ce162e4 100755
--- a/gstack/controllers/firewalls.py
+++ b/gstack/controllers/firewalls.py
@@ -56,7 +56,7 @@
     })
 
 
-@app.route('/' + app.config['PATH'] + '<projectid>/global/firewalls',
+@app.route('/compute/v1/projects/<projectid>/global/firewalls',
            methods=['GET'])
 @authentication.required
 def listsecuritygroups(projectid, authorization):
@@ -99,9 +99,7 @@
     return res
 
 
-@app.route('/' + app.config['PATH'] +
-           '<projectid>/global/firewalls/<firewall>',
-           methods=['GET'])
+@app.route('/compute/v1/projects/<projectid>/global/firewalls/<firewall>', methods=['GET'])
 @authentication.required
 def getsecuritygroup(projectid, authorization, firewall):
     command = 'listSecurityGroups'
@@ -138,9 +136,7 @@
     return res
 
 
-@app.route(
-    '/' + app.config['PATH'] + '<projectid>/global/firewalls/<firewall>',
-    methods=['DELETE'])
+@app.route('/compute/v1/projects/<projectid>/global/firewalls/<firewall>', methods=['DELETE'])
 @authentication.required
 def deletesecuritygroup(projectid, authorization, firewall):
     command = 'deleteSecurityGroup'
@@ -169,9 +165,7 @@
     return res
 
 
-@app.route(
-    '/' + app.config['PATH'] + '<projectid>/global/firewalls',
-    methods=['POST'])
+@app.route('/compute/v1/projects/<projectid>/global/firewalls', methods=['POST'])
 @authentication.required
 def createsecuritygroup(projectid, authorization):
     command = 'createSecurityGroup'
diff --git a/gstack/controllers/images.py b/gstack/controllers/images.py
index 2685d14..25c400a 100755
--- a/gstack/controllers/images.py
+++ b/gstack/controllers/images.py
@@ -94,24 +94,21 @@
     return response
 
 
-@app.route(
-    '/' + app.config['PATH'] + 'centos-cloud/global/images', methods=['GET'])
+@app.route('/compute/v1/projects/centos-cloud/global/images', methods=['GET'])
 @authentication.required
 def listnocentoscloudimages(authorization):
     populated_response = _create_populated_image_response('centos-cloud')
     return helper.create_response(data=populated_response)
 
 
-@app.route(
-    '/' + app.config['PATH'] + 'debian-cloud/global/images', methods=['GET'])
+@app.route('/compute/v1/projects/debian-cloud/global/images', methods=['GET'])
 @authentication.required
 def listnodebiancloudimages(authorization):
     populated_response = _create_populated_image_response('debian-cloud')
     return helper.create_response(data=populated_response)
 
 
-@app.route(
-    '/' + app.config['PATH'] + '<projectid>/global/images', methods=['GET'])
+@app.route('/compute/v1/projects/<projectid>/global/images', methods=['GET'])
 @authentication.required
 def listimages(projectid, authorization):
     image_list = _get_templates(
@@ -129,11 +126,7 @@
     return helper.create_response(data=populated_response)
 
 
-@app.route(
-    '/' +
-    app.config['PATH'] +
-    '<projectid>/global/images/<image>',
-    methods=['GET'])
+@app.route('/compute/v1/projects/<projectid>/global/images/<image>', methods=['GET'])
 @authentication.required
 def getimage(projectid, authorization, image):
     response = get_template_by_name(
diff --git a/gstack/controllers/instances.py b/gstack/controllers/instances.py
index ece69a7..f2bee6d 100755
--- a/gstack/controllers/instances.py
+++ b/gstack/controllers/instances.py
@@ -164,7 +164,7 @@
         return None
 
 
-@app.route('/' + app.config['PATH'] + '<projectid>/aggregated/instances', methods=['GET'])
+@app.route('/compute/v1/projects/<projectid>/aggregated/instances', methods=['GET'])
 @authentication.required
 def aggregatedlistinstances(authorization, projectid):
     zone_list = zones.get_zone_names(authorization=authorization)
@@ -215,7 +215,7 @@
     return helper.create_response(data=populated_response)
 
 
-@app.route('/' + app.config['PATH'] + '<projectid>/zones/<zone>/instances', methods=['GET'])
+@app.route('/compute/v1/projects/<projectid>/zones/<zone>/instances', methods=['GET'])
 @authentication.required
 def listinstances(authorization, projectid, zone):
     instance = None
@@ -262,7 +262,7 @@
     return helper.create_response(data=populated_response)
 
 
-@app.route('/' + app.config['PATH'] + '<projectid>/zones/<zone>/instances/<instance>', methods=['GET'])
+@app.route('/compute/v1/projects/<projectid>/zones/<zone>/instances/<instance>', methods=['GET'])
 @authentication.required
 def getinstance(projectid, authorization, zone, instance):
     response = _get_virtual_machine_by_name(
@@ -286,7 +286,7 @@
         return errors.resource_not_found(function_route)
 
 
-@app.route('/' + app.config['PATH'] + '<projectid>/zones/<zone>/instances', methods=['POST'])
+@app.route('/compute/v1/projects/<projectid>/zones/<zone>/instances', methods=['POST'])
 @authentication.required
 def addinstance(authorization, projectid, zone):
     data = json.loads(request.data)
@@ -329,7 +329,7 @@
     return helper.create_response(data=populated_response)
 
 
-@app.route('/' + app.config['PATH'] + '<projectid>/zones/<zone>/instances/<instance>', methods=['DELETE'])
+@app.route('/compute/v1/projects/<projectid>/zones/<zone>/instances/<instance>', methods=['DELETE'])
 @authentication.required
 def deleteinstance(projectid, authorization, zone, instance):
     deletion_result = _destroy_virtual_machine(authorization, instance)
diff --git a/gstack/controllers/machine_type.py b/gstack/controllers/machine_type.py
index 1c7be0f..f2bdd26 100755
--- a/gstack/controllers/machine_type.py
+++ b/gstack/controllers/machine_type.py
@@ -76,11 +76,7 @@
     return response
 
 
-@app.route(
-    '/' +
-    app.config['PATH'] +
-    '<projectid>/aggregated/machineTypes',
-    methods=['GET'])
+@app.route('/compute/v1/projects/<projectid>/aggregated/machineTypes', methods=['GET'])
 @authentication.required
 def aggregatedlistmachinetypes(projectid, authorization):
     machine_types = _get_machinetypes(authorization)
@@ -114,11 +110,7 @@
     return helper.create_response(data=populated_response)
 
 
-@app.route(
-    '/' +
-    app.config['PATH'] +
-    '<projectid>/zones/<zone>/machineTypes',
-    methods=['GET'])
+@app.route('/compute/v1/projects/<projectid>/zones/<zone>/machineTypes', methods=['GET'])
 @authentication.required
 def listmachinetype(projectid, authorization, zone):
     machinetype = None
@@ -170,11 +162,7 @@
     return helper.create_response(data=populated_response)
 
 
-@app.route(
-    '/' +
-    app.config['PATH'] +
-    '<projectid>/zones/<zone>/machineTypes/<machinetype>',
-    methods=['GET'])
+@app.route('/compute/v1/projects/<projectid>/zones/<zone>/machineTypes/<machinetype>', methods=['GET'])
 @authentication.required
 def getmachinetype(projectid, authorization, zone, machinetype):
     response = get_machinetype_by_name(
diff --git a/gstack/controllers/networks.py b/gstack/controllers/networks.py
index bbe42c4..df69812 100644
--- a/gstack/controllers/networks.py
+++ b/gstack/controllers/networks.py
@@ -124,7 +124,7 @@
 
 
 @app.route(
-    '/' + app.config['PATH'] + '<projectid>/global/networks', methods=['GET'])
+    '/compute/v1/projects/<projectid>/global/networks', methods=['GET'])
 @authentication.required
 def listnetworks(projectid, authorization):
     securitygroup_list = _get_networks(
@@ -145,11 +145,7 @@
     return helper.create_response(data=populated_response)
 
 
-@app.route(
-    '/' +
-    app.config['PATH'] +
-    '<projectid>/global/networks/<network>',
-    methods=['GET'])
+@app.route('/compute/v1/projects/<projectid>/global/networks/<network>', methods=['GET'])
 @authentication.required
 def getnetwork(projectid, authorization, network):
     response = get_network_by_name(
@@ -169,8 +165,7 @@
         return errors.resource_not_found(func_route)
 
 
-@app.route(
-    '/' + app.config['PATH'] + '<projectid>/global/networks', methods=['POST'])
+@app.route('/compute/v1/projects/<projectid>/global/networks', methods=['POST'])
 @authentication.required
 def addnetwork(authorization, projectid):
     data = json.loads(request.data)
@@ -212,11 +207,7 @@
     return helper.create_response(data=populated_response)
 
 
-@app.route(
-    '/' +
-    app.config['PATH'] +
-    '<projectid>/global/networks/<network>',
-    methods=['DELETE'])
+@app.route('/compute/v1/projects/<projectid>/global/networks/<network>', methods=['DELETE'])
 @authentication.required
 def deletenetwork(projectid, authorization, network):
     _delete_network(authorization, projectid, network)
diff --git a/gstack/controllers/operations.py b/gstack/controllers/operations.py
index 822372a..e8c1d1e 100644
--- a/gstack/controllers/operations.py
+++ b/gstack/controllers/operations.py
@@ -183,7 +183,7 @@
     return populated_response
 
 
-@app.route('/' + app.config['PATH'] + '<projectid>/global/operations/<operationid>', methods=['GET'])
+@app.route('/compute/v1/projects/<projectid>/global/operations/<operationid>', methods=['GET'])
 @authentication.required
 def getoperations(authorization, operationid, projectid):
     return helper.create_response(create_response(
diff --git a/gstack/controllers/project.py b/gstack/controllers/project.py
index 042e0ec..b18eeba 100755
--- a/gstack/controllers/project.py
+++ b/gstack/controllers/project.py
@@ -156,7 +156,7 @@
     return response
 
 
-@app.route('/' + app.config['PATH'] + '<projectid>', methods=['GET'])
+@app.route('//compute/v1/projects/<projectid>', methods=['GET'])
 @authentication.required
 def getproject(authorization, projectid):
     project = _get_account_by_name(authorization, projectid)
@@ -178,7 +178,7 @@
     return res
 
 
-@app.route('/' + app.config['PATH'] + '<projectid>/setCommonInstanceMetadata', methods=['POST'])
+@app.route('//compute/v1/projects/<projectid>/setCommonInstanceMetadata', methods=['POST'])
 @authentication.required
 def setglobalmetadata(projectid, authorization):
     data = json.loads(request.data)
diff --git a/gstack/controllers/regions.py b/gstack/controllers/regions.py
index 0344f25..a25bdc1 100755
--- a/gstack/controllers/regions.py
+++ b/gstack/controllers/regions.py
@@ -48,7 +48,7 @@
     return response
 
 
-@app.route('/' + app.config['PATH'] + '<projectid>/regions', methods=['GET'])
+@app.route('/compute/v1/projects/<projectid>/regions', methods=['GET'])
 @authentication.required
 def listregions(projectid, authorization):
     cloudstack_response = _get_regions(authorization)
@@ -68,8 +68,7 @@
     return helper.create_response(data=populated_response)
 
 
-@app.route(
-    '/' + app.config['PATH'] + '<projectid>/regions/<region>', methods=['GET'])
+@app.route('/compute/v1/projects/<projectid>/regions/<region>', methods=['GET'])
 @authentication.required
 def getregion(projectid, authorization, region):
     cloudstack_response = _get_regions(
diff --git a/gstack/controllers/zones.py b/gstack/controllers/zones.py
index 64f1b8d..9ff90bd 100755
--- a/gstack/controllers/zones.py
+++ b/gstack/controllers/zones.py
@@ -80,7 +80,7 @@
     })
 
 
-@app.route('/' + app.config['PATH'] + '<projectid>/zones', methods=['GET'])
+@app.route('/compute/v1/projects/<projectid>/zones', methods=['GET'])
 @authentication.required
 def listzones(projectid, authorization):
     zone_list = _get_zones(authorization)
@@ -100,7 +100,7 @@
     return helper.create_response(data=populated_response)
 
 
-@app.route('/' + app.config['PATH'] + '<projectid>/zones/<zone>', methods=['GET'])
+@app.route('/compute/v1/projects/<projectid>/zones/<zone>', methods=['GET'])
 @authentication.required
 def getzone(projectid, authorization, zone):
     response = get_zone_by_name(
diff --git a/setup.py b/setup.py
index d30e80b..d72cb5d 100755
--- a/setup.py
+++ b/setup.py
@@ -59,7 +59,7 @@
     zip_safe=False,
     entry_points="""
         [console_scripts]
-        gstack-configure = gstack.configure:main
         gstack = gstack.appserver:main
+        gstack-configure = gstack.configure:main
     """,
 )