Skip to content
Permalink
Browse files
More packaging
  • Loading branch information
sebgoa committed Aug 26, 2013
1 parent b13c5c6 commit 40e58c55d402507a7a04594bd6233290f9920acc
Showing 5 changed files with 58 additions and 5 deletions.
@@ -0,0 +1,2 @@
run:
python ./appserver.py
@@ -24,6 +24,8 @@

app = Flask(__name__)

from gcecloudstack.controllers import *

# Configuration Options

app.config['API_KEY'] = 'apikey'
@@ -32,5 +34,3 @@
app.config['HOST'] = 'localhost'
app.config['PORT'] = '8080'
app.config['PROTOCOL'] = 'http'

from gcecloudstack.controllers import *
@@ -0,0 +1,29 @@
#!/usr/bin/env python
# encoding: utf-8
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.

import os

from gcecloudstack import app

def main():
port = int(os.environ.get('PORT', 5000))
app.run(host='127.0.0.1', port=port, debug=True)

if __name__ == '__main__':
main()
@@ -1,3 +1,22 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.

from pyoauth2.provider import AuthorizationProvider

class CloudstackAuthorizationProvider(AuthorizationProvider):
@@ -64,4 +83,4 @@ def discard_refresh_token(self, client_id, refresh_token):

def discard_client_user_tokens(self, client_id, user_id):
""" remove client tokens """
print 'discarding user token'
print 'discarding user token'
@@ -40,14 +40,17 @@ def read(fname):
author_email="",
long_description="Google Compute Engine Interface to the Apache CloudStack API",
platforms=("Any",),
packages=["gcecloudstack"],
license="LICENSE.txt",
packages = ["gcecloudstack", "gcecloudstack.controllers", "gcecloudstack.services"],
install_requires=[
"flask",
"requests",
"pycrypto",
"pyoauth2"
],
py_modules=[''],
zip_safe=False,
entry_points="""
[console_scripts]
gcecloudstack = gcecloudstack.appserver:main
""",
)

0 comments on commit 40e58c5

Please sign in to comment.