get rid of sunstone-oneflow.conf

This commit is contained in:
Ruben S. Montero committed 2013-07-15 19:35:16 +02:00
1 parent e11643ac01
commit 330bfa1eb2
4 files changed
+12 -38

No files matched your search

+1 -2
View File
@@ -1472,8 +1472,7 @@ SUNSTONE_BIN_FILES="src/sunstone/bin/sunstone-server \
src/sunstone/bin/novnc-server"
SUNSTONE_ETC_FILES="src/sunstone/etc/sunstone-server.conf \
src/sunstone/etc/sunstone-views.yaml \
src/sunstone/etc/sunstone-oneflow.conf"
src/sunstone/etc/sunstone-views.yaml"
SUNSTONE_ETC_VIEW_FILES="src/sunstone/etc/sunstone-views/admin.yaml \
src/sunstone/etc/sunstone-views/user.yaml \
-23
View File
@@ -1,23 +0,0 @@
# -------------------------------------------------------------------------- #
# Copyright 2010-2013, C12G Labs S.L. #
# #
# Licensed 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. #
#--------------------------------------------------------------------------- #
################################################################################
# OneFlow
################################################################################
# OneFlow endpoint
#
:oneflow_server: http://localhost:2474/
+9 -1
View File
@@ -104,6 +104,14 @@
#
:marketplace_url: http://marketplace.c12g.com/appliance
################################################################################
# OneFlow
################################################################################
# OneFlow endpoint
#
:oneflow_server: http://localhost:2474/
################################################################################
# Routes
################################################################################
@@ -126,4 +134,4 @@
# - other
:routes:
- oneflow
- oneflow
+2 -12
View File
@@ -14,28 +14,18 @@
# limitations under the License. #
#--------------------------------------------------------------------------- #
ONEFLOW_CONF_FILE = ETC_LOCATION + "/sunstone-oneflow.conf"
$: << RUBY_LIB_LOCATION+"/oneflow"
require 'opennebula/oneflow_client'
begin
oneflow_conf = YAML.load_file(ONEFLOW_CONF_FILE)
rescue Exception => e
STDERR.puts "Error parsing config file #{ONEFLOW_CONF_FILE}: #{e.message}"
exit 1
end
set :oneflow_config, oneflow_conf
helpers do
def af_build_client
flow_client = settings.cloud_auth.client(session[:user])
flow_client = $cloud_auth.client(session[:user])
split_array = flow_client.one_auth.split(':')
Service::Client.new(
:url => settings.oneflow_config[:oneflow_server],
:url => $conf[:oneflow_server],
:user_agent => "Sunstone",
:username => split_array.shift,
:password => split_array.join(':'))