From a06f36c6a058c2dd1a61bc9b477287a92762a972 Mon Sep 17 00:00:00 2001 From: Daniel Molina Date: Mon, 24 Sep 2012 16:53:58 +0200 Subject: [PATCH 1/9] appmarket: Fix integer validation --- market/lib/validator.rb | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/market/lib/validator.rb b/market/lib/validator.rb index 88cd48a916..15f775b0d0 100644 --- a/market/lib/validator.rb +++ b/market/lib/validator.rb @@ -243,12 +243,10 @@ class Validator # # def validate_integer(body, schema_array, schema_key) - if body.is_a?(Integer) - body - else - raise ParseException, "KEY: '#{schema_key}' must be an Integer;"\ - " SCHEMA: #{schema_array}" - end + Integer(body) + rescue ArgumentError + raise ParseException, "KEY: '#{schema_key}' must be an Integer;"\ + " SCHEMA: #{schema_array}" end # Validate an null type From 91a6dd43369ae4a24985f2f31b87555ea53c65d5 Mon Sep 17 00:00:00 2001 From: Javi Fontan Date: Mon, 24 Sep 2012 17:26:13 +0200 Subject: [PATCH 2/9] Fix log dir ownership When the packages are generated as root the appflow log directory gets ownership oneadmin:oneadmin --- gen_package.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/gen_package.sh b/gen_package.sh index b81f8b17b7..529d7f6880 100755 --- a/gen_package.sh +++ b/gen_package.sh @@ -35,13 +35,17 @@ rm $NAME DIRS="apptools env flow market" export DESTDIR=$PWD/tmp +if [ "$(id -u)" = "0" ]; then + OWNER_FLAGS='-u oneadmin -g oneadmin' +fi + rm -rf $DESTDIR mkdir $DESTDIR for TOOL in $DIRS; do ( cd $TOOL - ./install.sh + ./install.sh $OWNER_FLAGS ) done From 4845533943ef6ec4df9773a1cee82c5c9387b235 Mon Sep 17 00:00:00 2001 From: Javi Fontan Date: Mon, 24 Sep 2012 18:08:02 +0200 Subject: [PATCH 3/9] appenv: add chown and chgrp to CLI --- env/bin/appenv | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/env/bin/appenv b/env/bin/appenv index b00b04b594..48989d3e19 100755 --- a/env/bin/appenv +++ b/env/bin/appenv @@ -100,6 +100,14 @@ cmd = CommandParser::CmdParser.new(ARGV) do helper = AppEnvHelper.new template_helper = OneTemplateHelper.new + set :format, :groupid, OpenNebulaHelper.rname_to_id_desc("GROUP") do |arg| + OpenNebulaHelper.rname_to_id(arg, "GROUP") + end + + set :format, :userid, OpenNebulaHelper.rname_to_id_desc("USER") do |arg| + OpenNebulaHelper.rname_to_id(arg, "USER") + end + set :format, :node, AppEnvHelper.to_id_desc do |arg| helper.to_id(arg) end @@ -197,6 +205,29 @@ cmd = CommandParser::CmdParser.new(ARGV) do 0 end + chgrp_desc = <<-EOT.unindent + Changes the node group + EOT + + command :chgrp, chgrp_desc,[:range, :node_list], :groupid do + helper.perform_actions(args[0],options,"Group changed") do |node| + node.chown(-1, args[1].to_i) + end + end + + chown_desc = <<-EOT.unindent + Changes the node owner and group + EOT + + command :chown, chown_desc, [:range, :node_list], :userid, + [:groupid,nil] do + gid = args[2].nil? ? -1 : args[2].to_i + helper.perform_actions(args[0],options, + "Owner/Group changed") do |node| + node.chown(args[1].to_i, gid) + end + end + instantiate_desc = <<-EOT.unindent Instantiate a template with a node EOT From 43cd91060318befc5c148fde8f265efd1069561c Mon Sep 17 00:00:00 2001 From: Daniel Molina Date: Mon, 24 Sep 2012 17:49:14 +0200 Subject: [PATCH 4/9] Add LICENSE headers --- flow/Rakefile | 15 +++++++++++++++ flow/bin/appflow-server | 19 +++++++++---------- flow/client/bin/appflow | 15 +++++++++++++++ flow/client/bin/appflow-template | 15 +++++++++++++++ flow/client/lib/appflow_client.rb | 15 +++++++++++++++ flow/config.ru | 15 +++++++++++++++ flow/config/appflow-server.conf | 15 +++++++++++++++ flow/controllers/appflow-server.rb | 15 +++++++++++++++ flow/lcm/LifeCycleManager.rb | 19 +++++++++---------- flow/lcm/strategy.rb | 19 +++++++++---------- flow/lcm/strategy/straight.rb | 15 +++++++++++++++ flow/lib/log.rb | 19 +++++++++---------- flow/lib/validator.rb | 15 +++++++++++++++ flow/models.rb | 15 +++++++++++++++ flow/models/Role.rb | 19 +++++++++---------- flow/models/Service.rb | 19 +++++++++---------- flow/models/ServicePool.rb | 21 ++++++++++----------- flow/models/ServiceTemplate.rb | 19 +++++++++---------- flow/models/ServiceTemplatePool.rb | 19 +++++++++---------- flow/sunstone/etc/sunstone-appflow.conf | 15 +++++++++++++++ flow/sunstone/routes/appflow.rb | 15 +++++++++++++++ market/Gemfile | 15 +++++++++++++++ market/Rakefile | 15 +++++++++++++++ market/client/bin/appmarket | 15 +++++++++++++++ market/client/bin/appmarket-user | 15 +++++++++++++++ market/client/lib/appmarket_client.rb | 15 +++++++++++++++ market/config.ru | 15 +++++++++++++++ market/config/appmarket-server.conf | 15 +++++++++++++++ market/config/init.rb | 15 +++++++++++++++ market/controllers/appmarket-server.rb | 15 +++++++++++++++ market/lib/mailer.rb | 15 +++++++++++++++ market/lib/parser.rb | 15 +++++++++++++++ market/lib/session.rb | 15 +++++++++++++++ market/lib/validator.rb | 15 +++++++++++++++ market/models.rb | 15 +++++++++++++++ market/models/appliance.rb | 15 +++++++++++++++ market/models/user.rb | 15 +++++++++++++++ market/sunstone/etc/sunstone-appmarket.conf | 15 +++++++++++++++ market/sunstone/routes/appmarket.rb | 15 +++++++++++++++ market/views/app_form.haml | 15 +++++++++++++++ market/views/appliance_index.haml | 15 +++++++++++++++ market/views/appliance_show.haml | 15 +++++++++++++++ market/views/custom/banner.haml | 15 +++++++++++++++ market/views/custom/footer.haml | 15 +++++++++++++++ market/views/custom/logos.haml | 15 +++++++++++++++ market/views/custom/terms_of_use.haml | 15 +++++++++++++++ market/views/custom/tittle.haml | 15 +++++++++++++++ market/views/layout.haml | 15 +++++++++++++++ market/views/nav_login.haml | 15 +++++++++++++++ market/views/user_form.haml | 15 +++++++++++++++ market/views/user_index.haml | 15 +++++++++++++++ market/views/user_show.haml | 15 +++++++++++++++ 52 files changed, 727 insertions(+), 91 deletions(-) diff --git a/flow/Rakefile b/flow/Rakefile index a4c9a52881..633bffa619 100644 --- a/flow/Rakefile +++ b/flow/Rakefile @@ -1,4 +1,19 @@ #!/usr/bin/env rake +# -------------------------------------------------------------------------- # +# Copyright 2010-2012, C12G Labs S.L. # +# # +# Licensed under the C12G Commercial Open-source License (the # +# "License"); you may not use this file except in compliance # +# with the License. You may obtain a copy of the License as part # +# of the software distribution. # +# # +# Unless 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. # +#--------------------------------------------------------------------------- # + require 'rspec/core/rake_task' RSpec::Core::RakeTask.new(:spec) do |t| diff --git a/flow/bin/appflow-server b/flow/bin/appflow-server index 87054a8272..d8b96dd864 100755 --- a/flow/bin/appflow-server +++ b/flow/bin/appflow-server @@ -1,18 +1,17 @@ #! /bin/sh # -------------------------------------------------------------------------- # -# Copyright 2002-2012, OpenNebula Project Leads (OpenNebula.org) # +# Copyright 2010-2012, 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 # +# Licensed under the C12G Commercial Open-source License (the # +# "License"); you may not use this file except in compliance # +# with the License. You may obtain a copy of the License as part # +# of the software distribution. # # # -# 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 # +# Unless 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. # #--------------------------------------------------------------------------- # diff --git a/flow/client/bin/appflow b/flow/client/bin/appflow index f7729ced20..fabb69bec8 100755 --- a/flow/client/bin/appflow +++ b/flow/client/bin/appflow @@ -1,5 +1,20 @@ #!/usr/bin/env ruby +# -------------------------------------------------------------------------- # +# Copyright 2010-2012, C12G Labs S.L. # +# # +# Licensed under the C12G Commercial Open-source License (the # +# "License"); you may not use this file except in compliance # +# with the License. You may obtain a copy of the License as part # +# of the software distribution. # +# # +# Unless 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. # +#--------------------------------------------------------------------------- # + ONE_LOCATION=ENV["ONE_LOCATION"] if !ONE_LOCATION diff --git a/flow/client/bin/appflow-template b/flow/client/bin/appflow-template index 5c3630faab..ef3bb70e64 100755 --- a/flow/client/bin/appflow-template +++ b/flow/client/bin/appflow-template @@ -1,5 +1,20 @@ #!/usr/bin/env ruby +# -------------------------------------------------------------------------- # +# Copyright 2010-2012, C12G Labs S.L. # +# # +# Licensed under the C12G Commercial Open-source License (the # +# "License"); you may not use this file except in compliance # +# with the License. You may obtain a copy of the License as part # +# of the software distribution. # +# # +# Unless 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. # +#--------------------------------------------------------------------------- # + ONE_LOCATION=ENV["ONE_LOCATION"] if !ONE_LOCATION diff --git a/flow/client/lib/appflow_client.rb b/flow/client/lib/appflow_client.rb index 5343190b0d..90c18f4e53 100644 --- a/flow/client/lib/appflow_client.rb +++ b/flow/client/lib/appflow_client.rb @@ -1,3 +1,18 @@ +# -------------------------------------------------------------------------- # +# Copyright 2010-2012, C12G Labs S.L. # +# # +# Licensed under the C12G Commercial Open-source License (the # +# "License"); you may not use this file except in compliance # +# with the License. You may obtain a copy of the License as part # +# of the software distribution. # +# # +# Unless 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. # +#--------------------------------------------------------------------------- # + require 'uri' require 'cloud/CloudClient' diff --git a/flow/config.ru b/flow/config.ru index ead48ef4e8..84e4ce2f37 100644 --- a/flow/config.ru +++ b/flow/config.ru @@ -1,3 +1,18 @@ +# -------------------------------------------------------------------------- # +# Copyright 2010-2012, C12G Labs S.L. # +# # +# Licensed under the C12G Commercial Open-source License (the # +# "License"); you may not use this file except in compliance # +# with the License. You may obtain a copy of the License as part # +# of the software distribution. # +# # +# Unless 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. # +#--------------------------------------------------------------------------- # + $: << '.' require 'controllers/appflow-server' diff --git a/flow/config/appflow-server.conf b/flow/config/appflow-server.conf index de021cbbac..a47f0c4587 100644 --- a/flow/config/appflow-server.conf +++ b/flow/config/appflow-server.conf @@ -1,3 +1,18 @@ +# -------------------------------------------------------------------------- # +# Copyright 2010-2012, C12G Labs S.L. # +# # +# Licensed under the C12G Commercial Open-source License (the # +# "License"); you may not use this file except in compliance # +# with the License. You may obtain a copy of the License as part # +# of the software distribution. # +# # +# Unless 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. # +#--------------------------------------------------------------------------- # + ################################################################################ # Server Configuration ################################################################################ diff --git a/flow/controllers/appflow-server.rb b/flow/controllers/appflow-server.rb index 48d8c3b545..8ca6a0dd2b 100644 --- a/flow/controllers/appflow-server.rb +++ b/flow/controllers/appflow-server.rb @@ -1,3 +1,18 @@ +# -------------------------------------------------------------------------- # +# Copyright 2010-2012, C12G Labs S.L. # +# # +# Licensed under the C12G Commercial Open-source License (the # +# "License"); you may not use this file except in compliance # +# with the License. You may obtain a copy of the License as part # +# of the software distribution. # +# # +# Unless 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. # +#--------------------------------------------------------------------------- # + require 'rubygems' require 'sinatra' require 'yaml' diff --git a/flow/lcm/LifeCycleManager.rb b/flow/lcm/LifeCycleManager.rb index 9dd7ad0312..874359dc67 100644 --- a/flow/lcm/LifeCycleManager.rb +++ b/flow/lcm/LifeCycleManager.rb @@ -1,16 +1,15 @@ # -------------------------------------------------------------------------- # -# Copyright 2002-2012, OpenNebula Project Leads (OpenNebula.org) # +# Copyright 2010-2012, 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 # +# Licensed under the C12G Commercial Open-source License (the # +# "License"); you may not use this file except in compliance # +# with the License. You may obtain a copy of the License as part # +# of the software distribution. # # # -# 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 # +# Unless 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. # #--------------------------------------------------------------------------- # diff --git a/flow/lcm/strategy.rb b/flow/lcm/strategy.rb index 718f90fb39..3af3b29390 100644 --- a/flow/lcm/strategy.rb +++ b/flow/lcm/strategy.rb @@ -1,16 +1,15 @@ # -------------------------------------------------------------------------- # -# Copyright 2002-2012, OpenNebula Project Leads (OpenNebula.org) # +# Copyright 2010-2012, 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 # +# Licensed under the C12G Commercial Open-source License (the # +# "License"); you may not use this file except in compliance # +# with the License. You may obtain a copy of the License as part # +# of the software distribution. # # # -# 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 # +# Unless 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. # #--------------------------------------------------------------------------- # diff --git a/flow/lcm/strategy/straight.rb b/flow/lcm/strategy/straight.rb index 337175b17f..4d631f431c 100644 --- a/flow/lcm/strategy/straight.rb +++ b/flow/lcm/strategy/straight.rb @@ -1,3 +1,18 @@ +# -------------------------------------------------------------------------- # +# Copyright 2010-2012, C12G Labs S.L. # +# # +# Licensed under the C12G Commercial Open-source License (the # +# "License"); you may not use this file except in compliance # +# with the License. You may obtain a copy of the License as part # +# of the software distribution. # +# # +# Unless 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. # +#--------------------------------------------------------------------------- # + module Straight # Using this strategy the service is deployed based on a directed # acyclic graph where each node defines its parents. diff --git a/flow/lib/log.rb b/flow/lib/log.rb index 9d6f4b70dc..d340d0d8bf 100644 --- a/flow/lib/log.rb +++ b/flow/lib/log.rb @@ -1,16 +1,15 @@ # -------------------------------------------------------------------------- # -# Copyright 2002-2012, OpenNebula Project Leads (OpenNebula.org) # +# Copyright 2010-2012, 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 # +# Licensed under the C12G Commercial Open-source License (the # +# "License"); you may not use this file except in compliance # +# with the License. You may obtain a copy of the License as part # +# of the software distribution. # # # -# 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 # +# Unless 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. # #--------------------------------------------------------------------------- # diff --git a/flow/lib/validator.rb b/flow/lib/validator.rb index 15f775b0d0..9590f1a4a0 100644 --- a/flow/lib/validator.rb +++ b/flow/lib/validator.rb @@ -1,3 +1,18 @@ +# -------------------------------------------------------------------------- # +# Copyright 2010-2012, C12G Labs S.L. # +# # +# Licensed under the C12G Commercial Open-source License (the # +# "License"); you may not use this file except in compliance # +# with the License. You may obtain a copy of the License as part # +# of the software distribution. # +# # +# Unless 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. # +#--------------------------------------------------------------------------- # + require 'uri' class Hash diff --git a/flow/models.rb b/flow/models.rb index a0b3fd40ed..6a8f30bcca 100644 --- a/flow/models.rb +++ b/flow/models.rb @@ -1,3 +1,18 @@ +# -------------------------------------------------------------------------- # +# Copyright 2010-2012, C12G Labs S.L. # +# # +# Licensed under the C12G Commercial Open-source License (the # +# "License"); you may not use this file except in compliance # +# with the License. You may obtain a copy of the License as part # +# of the software distribution. # +# # +# Unless 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. # +#--------------------------------------------------------------------------- # + require 'OpenNebula' include OpenNebula diff --git a/flow/models/Role.rb b/flow/models/Role.rb index 5f6d0fa8f3..dd1bc7c6f7 100644 --- a/flow/models/Role.rb +++ b/flow/models/Role.rb @@ -1,16 +1,15 @@ # -------------------------------------------------------------------------- # -# Copyright 2002-2012, OpenNebula Project Leads (OpenNebula.org) # +# Copyright 2010-2012, 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 # +# Licensed under the C12G Commercial Open-source License (the # +# "License"); you may not use this file except in compliance # +# with the License. You may obtain a copy of the License as part # +# of the software distribution. # # # -# 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 # +# Unless 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. # #--------------------------------------------------------------------------- # diff --git a/flow/models/Service.rb b/flow/models/Service.rb index da0734fbc7..a583b19773 100644 --- a/flow/models/Service.rb +++ b/flow/models/Service.rb @@ -1,16 +1,15 @@ # -------------------------------------------------------------------------- # -# Copyright 2002-2012, OpenNebula Project Leads (OpenNebula.org) # +# Copyright 2010-2012, 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 # +# Licensed under the C12G Commercial Open-source License (the # +# "License"); you may not use this file except in compliance # +# with the License. You may obtain a copy of the License as part # +# of the software distribution. # # # -# 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 # +# Unless 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. # #--------------------------------------------------------------------------- # diff --git a/flow/models/ServicePool.rb b/flow/models/ServicePool.rb index 73331679c5..5ac05098c3 100644 --- a/flow/models/ServicePool.rb +++ b/flow/models/ServicePool.rb @@ -1,16 +1,15 @@ # -------------------------------------------------------------------------- # -# Copyright 2002-2012, OpenNebula Project Leads (OpenNebula.org) # +# Copyright 2010-2012, 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 # +# Licensed under the C12G Commercial Open-source License (the # +# "License"); you may not use this file except in compliance # +# with the License. You may obtain a copy of the License as part # +# of the software distribution. # # # -# 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 # +# Unless 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. # #--------------------------------------------------------------------------- # @@ -67,7 +66,7 @@ module OpenNebula if entry.nil? entry = [Mutex.new, 0] - + @@mutex_hash[service_id] = entry end diff --git a/flow/models/ServiceTemplate.rb b/flow/models/ServiceTemplate.rb index f0a1aee577..1ad4029b1e 100644 --- a/flow/models/ServiceTemplate.rb +++ b/flow/models/ServiceTemplate.rb @@ -1,16 +1,15 @@ # -------------------------------------------------------------------------- # -# Copyright 2002-2012, OpenNebula Project Leads (OpenNebula.org) # +# Copyright 2010-2012, 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 # +# Licensed under the C12G Commercial Open-source License (the # +# "License"); you may not use this file except in compliance # +# with the License. You may obtain a copy of the License as part # +# of the software distribution. # # # -# 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 # +# Unless 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. # #--------------------------------------------------------------------------- # diff --git a/flow/models/ServiceTemplatePool.rb b/flow/models/ServiceTemplatePool.rb index 6dd81ad221..31c675a909 100644 --- a/flow/models/ServiceTemplatePool.rb +++ b/flow/models/ServiceTemplatePool.rb @@ -1,16 +1,15 @@ # -------------------------------------------------------------------------- # -# Copyright 2002-2012, OpenNebula Project Leads (OpenNebula.org) # +# Copyright 2010-2012, 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 # +# Licensed under the C12G Commercial Open-source License (the # +# "License"); you may not use this file except in compliance # +# with the License. You may obtain a copy of the License as part # +# of the software distribution. # # # -# 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 # +# Unless 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. # #--------------------------------------------------------------------------- # diff --git a/flow/sunstone/etc/sunstone-appflow.conf b/flow/sunstone/etc/sunstone-appflow.conf index 188a091b56..2b66ee924b 100644 --- a/flow/sunstone/etc/sunstone-appflow.conf +++ b/flow/sunstone/etc/sunstone-appflow.conf @@ -1,3 +1,18 @@ +# -------------------------------------------------------------------------- # +# Copyright 2010-2012, C12G Labs S.L. # +# # +# Licensed under the C12G Commercial Open-source License (the # +# "License"); you may not use this file except in compliance # +# with the License. You may obtain a copy of the License as part # +# of the software distribution. # +# # +# Unless 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. # +#--------------------------------------------------------------------------- # + ################################################################################ # Appflow ################################################################################ diff --git a/flow/sunstone/routes/appflow.rb b/flow/sunstone/routes/appflow.rb index acaba258ab..a757de5228 100644 --- a/flow/sunstone/routes/appflow.rb +++ b/flow/sunstone/routes/appflow.rb @@ -1,3 +1,18 @@ +# -------------------------------------------------------------------------- # +# Copyright 2010-2012, C12G Labs S.L. # +# # +# Licensed under the C12G Commercial Open-source License (the # +# "License"); you may not use this file except in compliance # +# with the License. You may obtain a copy of the License as part # +# of the software distribution. # +# # +# Unless 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. # +#--------------------------------------------------------------------------- # + APPFLOW_CONF_FILE = ETC_LOCATION + "/sunstone-appflow.conf" $: << RUBY_LIB_LOCATION+"/apptools/flow" diff --git a/market/Gemfile b/market/Gemfile index dead67e2f3..92a322c9ad 100644 --- a/market/Gemfile +++ b/market/Gemfile @@ -1,3 +1,18 @@ +# -------------------------------------------------------------------------- # +# Copyright 2010-2012, C12G Labs S.L. # +# # +# Licensed under the C12G Commercial Open-source License (the # +# "License"); you may not use this file except in compliance # +# with the License. You may obtain a copy of the License as part # +# of the software distribution. # +# # +# Unless 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. # +#--------------------------------------------------------------------------- # + source "http://rubygems.org" gem 'json' diff --git a/market/Rakefile b/market/Rakefile index 0259d0e06f..0a27807db9 100644 --- a/market/Rakefile +++ b/market/Rakefile @@ -1,3 +1,18 @@ +# -------------------------------------------------------------------------- # +# Copyright 2010-2012, C12G Labs S.L. # +# # +# Licensed under the C12G Commercial Open-source License (the # +# "License"); you may not use this file except in compliance # +# with the License. You may obtain a copy of the License as part # +# of the software distribution. # +# # +# Unless 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. # +#--------------------------------------------------------------------------- # + $: << './' require 'models' diff --git a/market/client/bin/appmarket b/market/client/bin/appmarket index 79a3340b79..1d7fa641e6 100755 --- a/market/client/bin/appmarket +++ b/market/client/bin/appmarket @@ -1,5 +1,20 @@ #!/usr/bin/env ruby +# -------------------------------------------------------------------------- # +# Copyright 2010-2012, C12G Labs S.L. # +# # +# Licensed under the C12G Commercial Open-source License (the # +# "License"); you may not use this file except in compliance # +# with the License. You may obtain a copy of the License as part # +# of the software distribution. # +# # +# Unless 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. # +#--------------------------------------------------------------------------- # + ONE_LOCATION=ENV["ONE_LOCATION"] if !ONE_LOCATION diff --git a/market/client/bin/appmarket-user b/market/client/bin/appmarket-user index 828fd4c343..569f81aa04 100755 --- a/market/client/bin/appmarket-user +++ b/market/client/bin/appmarket-user @@ -1,5 +1,20 @@ #!/usr/bin/env ruby +# -------------------------------------------------------------------------- # +# Copyright 2010-2012, C12G Labs S.L. # +# # +# Licensed under the C12G Commercial Open-source License (the # +# "License"); you may not use this file except in compliance # +# with the License. You may obtain a copy of the License as part # +# of the software distribution. # +# # +# Unless 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. # +#--------------------------------------------------------------------------- # + ONE_LOCATION=ENV["ONE_LOCATION"] if !ONE_LOCATION diff --git a/market/client/lib/appmarket_client.rb b/market/client/lib/appmarket_client.rb index 8aaac18d65..160bc9165f 100644 --- a/market/client/lib/appmarket_client.rb +++ b/market/client/lib/appmarket_client.rb @@ -1,3 +1,18 @@ +# -------------------------------------------------------------------------- # +# Copyright 2010-2012, C12G Labs S.L. # +# # +# Licensed under the C12G Commercial Open-source License (the # +# "License"); you may not use this file except in compliance # +# with the License. You may obtain a copy of the License as part # +# of the software distribution. # +# # +# Unless 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. # +#--------------------------------------------------------------------------- # + require 'uri' require 'CloudClient' diff --git a/market/config.ru b/market/config.ru index b4e73551d6..5cccbbd51f 100644 --- a/market/config.ru +++ b/market/config.ru @@ -1,3 +1,18 @@ +# -------------------------------------------------------------------------- # +# Copyright 2010-2012, C12G Labs S.L. # +# # +# Licensed under the C12G Commercial Open-source License (the # +# "License"); you may not use this file except in compliance # +# with the License. You may obtain a copy of the License as part # +# of the software distribution. # +# # +# Unless 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. # +#--------------------------------------------------------------------------- # + $: << '.' require 'controllers/appmarket-server' diff --git a/market/config/appmarket-server.conf b/market/config/appmarket-server.conf index a8dde2533d..d82b5dbbca 100644 --- a/market/config/appmarket-server.conf +++ b/market/config/appmarket-server.conf @@ -1,3 +1,18 @@ +# -------------------------------------------------------------------------- # +# Copyright 2010-2012, C12G Labs S.L. # +# # +# Licensed under the C12G Commercial Open-source License (the # +# "License"); you may not use this file except in compliance # +# with the License. You may obtain a copy of the License as part # +# of the software distribution. # +# # +# Unless 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. # +#--------------------------------------------------------------------------- # + # Host and port where AppMarket server will run :host: 127.0.0.1 :port: 6242 diff --git a/market/config/init.rb b/market/config/init.rb index eed240be34..fd46e3227f 100644 --- a/market/config/init.rb +++ b/market/config/init.rb @@ -1,3 +1,18 @@ +# -------------------------------------------------------------------------- # +# Copyright 2010-2012, C12G Labs S.L. # +# # +# Licensed under the C12G Commercial Open-source License (the # +# "License"); you may not use this file except in compliance # +# with the License. You may obtain a copy of the License as part # +# of the software distribution. # +# # +# Unless 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. # +#--------------------------------------------------------------------------- # + require 'rubygems' require 'mongo' require 'yaml' diff --git a/market/controllers/appmarket-server.rb b/market/controllers/appmarket-server.rb index 72e66fb123..e88e1a9589 100644 --- a/market/controllers/appmarket-server.rb +++ b/market/controllers/appmarket-server.rb @@ -1,3 +1,18 @@ +# -------------------------------------------------------------------------- # +# Copyright 2010-2012, C12G Labs S.L. # +# # +# Licensed under the C12G Commercial Open-source License (the # +# "License"); you may not use this file except in compliance # +# with the License. You may obtain a copy of the License as part # +# of the software distribution. # +# # +# Unless 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. # +#--------------------------------------------------------------------------- # + require 'rubygems' require 'sinatra' require 'haml' diff --git a/market/lib/mailer.rb b/market/lib/mailer.rb index f536405a7e..25fa2d018e 100644 --- a/market/lib/mailer.rb +++ b/market/lib/mailer.rb @@ -1,3 +1,18 @@ +# -------------------------------------------------------------------------- # +# Copyright 2010-2012, C12G Labs S.L. # +# # +# Licensed under the C12G Commercial Open-source License (the # +# "License"); you may not use this file except in compliance # +# with the License. You may obtain a copy of the License as part # +# of the software distribution. # +# # +# Unless 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. # +#--------------------------------------------------------------------------- # + require 'mail' require 'erb' diff --git a/market/lib/parser.rb b/market/lib/parser.rb index 21d12e2932..1cb08bf8d7 100644 --- a/market/lib/parser.rb +++ b/market/lib/parser.rb @@ -1,3 +1,18 @@ +# -------------------------------------------------------------------------- # +# Copyright 2010-2012, C12G Labs S.L. # +# # +# Licensed under the C12G Commercial Open-source License (the # +# "License"); you may not use this file except in compliance # +# with the License. You may obtain a copy of the License as part # +# of the software distribution. # +# # +# Unless 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. # +#--------------------------------------------------------------------------- # + require 'json' module Parser diff --git a/market/lib/session.rb b/market/lib/session.rb index c0453d3849..524cb5cf41 100644 --- a/market/lib/session.rb +++ b/market/lib/session.rb @@ -1,3 +1,18 @@ +# -------------------------------------------------------------------------- # +# Copyright 2010-2012, C12G Labs S.L. # +# # +# Licensed under the C12G Commercial Open-source License (the # +# "License"); you may not use this file except in compliance # +# with the License. You may obtain a copy of the License as part # +# of the software distribution. # +# # +# Unless 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. # +#--------------------------------------------------------------------------- # + require 'digest/sha1' class Session diff --git a/market/lib/validator.rb b/market/lib/validator.rb index 15f775b0d0..9590f1a4a0 100644 --- a/market/lib/validator.rb +++ b/market/lib/validator.rb @@ -1,3 +1,18 @@ +# -------------------------------------------------------------------------- # +# Copyright 2010-2012, C12G Labs S.L. # +# # +# Licensed under the C12G Commercial Open-source License (the # +# "License"); you may not use this file except in compliance # +# with the License. You may obtain a copy of the License as part # +# of the software distribution. # +# # +# Unless 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. # +#--------------------------------------------------------------------------- # + require 'uri' class Hash diff --git a/market/models.rb b/market/models.rb index 48b6da165a..c02fe76ec1 100644 --- a/market/models.rb +++ b/market/models.rb @@ -1,3 +1,18 @@ +# -------------------------------------------------------------------------- # +# Copyright 2010-2012, C12G Labs S.L. # +# # +# Licensed under the C12G Commercial Open-source License (the # +# "License"); you may not use this file except in compliance # +# with the License. You may obtain a copy of the License as part # +# of the software distribution. # +# # +# Unless 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. # +#--------------------------------------------------------------------------- # + require 'init' require 'validator' diff --git a/market/models/appliance.rb b/market/models/appliance.rb index 25cefcef2d..8ddfede51d 100644 --- a/market/models/appliance.rb +++ b/market/models/appliance.rb @@ -1,3 +1,18 @@ +# -------------------------------------------------------------------------- # +# Copyright 2010-2012, C12G Labs S.L. # +# # +# Licensed under the C12G Commercial Open-source License (the # +# "License"); you may not use this file except in compliance # +# with the License. You may obtain a copy of the License as part # +# of the software distribution. # +# # +# Unless 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. # +#--------------------------------------------------------------------------- # + require 'uri' require 'net/http' diff --git a/market/models/user.rb b/market/models/user.rb index d31f795d11..47ed8aec38 100644 --- a/market/models/user.rb +++ b/market/models/user.rb @@ -1,3 +1,18 @@ +# -------------------------------------------------------------------------- # +# Copyright 2010-2012, C12G Labs S.L. # +# # +# Licensed under the C12G Commercial Open-source License (the # +# "License"); you may not use this file except in compliance # +# with the License. You may obtain a copy of the License as part # +# of the software distribution. # +# # +# Unless 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. # +#--------------------------------------------------------------------------- # + require 'bcrypt' class User diff --git a/market/sunstone/etc/sunstone-appmarket.conf b/market/sunstone/etc/sunstone-appmarket.conf index 6a5a3b1086..a0944b0b9c 100644 --- a/market/sunstone/etc/sunstone-appmarket.conf +++ b/market/sunstone/etc/sunstone-appmarket.conf @@ -1,3 +1,18 @@ +# -------------------------------------------------------------------------- # +# Copyright 2010-2012, C12G Labs S.L. # +# # +# Licensed under the C12G Commercial Open-source License (the # +# "License"); you may not use this file except in compliance # +# with the License. You may obtain a copy of the License as part # +# of the software distribution. # +# # +# Unless 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. # +#--------------------------------------------------------------------------- # + ################################################################################ # AppMarket ################################################################################ diff --git a/market/sunstone/routes/appmarket.rb b/market/sunstone/routes/appmarket.rb index e725f4071c..52de3e1390 100644 --- a/market/sunstone/routes/appmarket.rb +++ b/market/sunstone/routes/appmarket.rb @@ -1,3 +1,18 @@ +# -------------------------------------------------------------------------- # +# Copyright 2010-2012, C12G Labs S.L. # +# # +# Licensed under the C12G Commercial Open-source License (the # +# "License"); you may not use this file except in compliance # +# with the License. You may obtain a copy of the License as part # +# of the software distribution. # +# # +# Unless 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. # +#--------------------------------------------------------------------------- # + APPMARKET_CONF_FILE = ETC_LOCATION + "/sunstone-appmarket.conf" $: << RUBY_LIB_LOCATION+"/apptools/market" diff --git a/market/views/app_form.haml b/market/views/app_form.haml index 9b61f16c38..9751814a95 100644 --- a/market/views/app_form.haml +++ b/market/views/app_form.haml @@ -1,3 +1,18 @@ +//--------------------------------------------------------------------------// +// Copyright 2010-2012, C12G Labs S.L. // +// // +// Licensed under the C12G Commercial Open-source License (the // +// "License"); you may not use this file except in compliance // +// with the License. You may obtain a copy of the License as part // +// of the software distribution. // +// // +// Unless 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. // +//--------------------------------------------------------------------------// + %fieldset .control-group %label.control-label{'for' => 'name_form'} Name diff --git a/market/views/appliance_index.haml b/market/views/appliance_index.haml index c231f7b6ce..b174e2278b 100644 --- a/market/views/appliance_index.haml +++ b/market/views/appliance_index.haml @@ -1,3 +1,18 @@ +//--------------------------------------------------------------------------// +// Copyright 2010-2012, C12G Labs S.L. // +// // +// Licensed under the C12G Commercial Open-source License (the // +// "License"); you may not use this file except in compliance // +// with the License. You may obtain a copy of the License as part // +// of the software distribution. // +// // +// Unless 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. // +//--------------------------------------------------------------------------// + .navbar.navbar-static .navbar-inner .container diff --git a/market/views/appliance_show.haml b/market/views/appliance_show.haml index aa948da6e3..b644033a7f 100644 --- a/market/views/appliance_show.haml +++ b/market/views/appliance_show.haml @@ -1,3 +1,18 @@ +//--------------------------------------------------------------------------// +// Copyright 2010-2012, C12G Labs S.L. // +// // +// Licensed under the C12G Commercial Open-source License (the // +// "License"); you may not use this file except in compliance // +// with the License. You may obtain a copy of the License as part // +// of the software distribution. // +// // +// Unless 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. // +//--------------------------------------------------------------------------// + .navbar.navbar-static .navbar-inner .container diff --git a/market/views/custom/banner.haml b/market/views/custom/banner.haml index 064bf70b21..dea91e5f71 100644 --- a/market/views/custom/banner.haml +++ b/market/views/custom/banner.haml @@ -1,3 +1,18 @@ +//--------------------------------------------------------------------------// +// Copyright 2010-2012, C12G Labs S.L. // +// // +// Licensed under the C12G Commercial Open-source License (the // +// "License"); you may not use this file except in compliance // +// with the License. You may obtain a copy of the License as part // +// of the software distribution. // +// // +// Unless 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. // +//--------------------------------------------------------------------------// + .row-fluid .span4 :plain diff --git a/market/views/custom/footer.haml b/market/views/custom/footer.haml index 3f629946c1..1e16ade778 100644 --- a/market/views/custom/footer.haml +++ b/market/views/custom/footer.haml @@ -1,3 +1,18 @@ +//--------------------------------------------------------------------------// +// Copyright 2010-2012, C12G Labs S.L. // +// // +// Licensed under the C12G Commercial Open-source License (the // +// "License"); you may not use this file except in compliance // +// with the License. You may obtain a copy of the License as part // +// of the software distribution. // +// // +// Unless 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. // +//--------------------------------------------------------------------------// + %p © 2012 C12G Labs S.L. All Rights Reserved. %a{'href' => "http://www.c12g.com/legal-notice"} Legal Notice. diff --git a/market/views/custom/logos.haml b/market/views/custom/logos.haml index 1ad6a7e484..5f4b8b55e3 100644 --- a/market/views/custom/logos.haml +++ b/market/views/custom/logos.haml @@ -1,3 +1,18 @@ +//--------------------------------------------------------------------------// +// Copyright 2010-2012, C12G Labs S.L. // +// // +// Licensed under the C12G Commercial Open-source License (the // +// "License"); you may not use this file except in compliance // +// with the License. You may obtain a copy of the License as part // +// of the software distribution. // +// // +// Unless 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. // +//--------------------------------------------------------------------------// + %a.span4{'href' => "http://www.opennebula.org/"} %img{'src' => "/img/opennebula_gray.png"} %a.pull-right{'href' => "http://www.c12g.com/"} diff --git a/market/views/custom/terms_of_use.haml b/market/views/custom/terms_of_use.haml index 885c25fe39..5a0d556322 100644 --- a/market/views/custom/terms_of_use.haml +++ b/market/views/custom/terms_of_use.haml @@ -1,2 +1,17 @@ +//--------------------------------------------------------------------------// +// Copyright 2010-2012, C12G Labs S.L. // +// // +// Licensed under the C12G Commercial Open-source License (the // +// "License"); you may not use this file except in compliance // +// with the License. You may obtain a copy of the License as part // +// of the software distribution. // +// // +// Unless 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. // +//--------------------------------------------------------------------------// + Accept %a{'href' => 'http://www.c12g.com//marketplace-terms-of-use', 'target' => 'blank'} Terms of Use \ No newline at end of file diff --git a/market/views/custom/tittle.haml b/market/views/custom/tittle.haml index ca4380cf1d..1671958df0 100644 --- a/market/views/custom/tittle.haml +++ b/market/views/custom/tittle.haml @@ -1,2 +1,17 @@ +//--------------------------------------------------------------------------// +// Copyright 2010-2012, C12G Labs S.L. // +// // +// Licensed under the C12G Commercial Open-source License (the // +// "License"); you may not use this file except in compliance // +// with the License. You may obtain a copy of the License as part // +// of the software distribution. // +// // +// Unless 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. // +//--------------------------------------------------------------------------// + %i.icon-shopping-cart.icon-white OpenNebula AppMarket \ No newline at end of file diff --git a/market/views/layout.haml b/market/views/layout.haml index c612316c13..27f241b42f 100644 --- a/market/views/layout.haml +++ b/market/views/layout.haml @@ -1,3 +1,18 @@ +//--------------------------------------------------------------------------// +// Copyright 2010-2012, C12G Labs S.L. // +// // +// Licensed under the C12G Commercial Open-source License (the // +// "License"); you may not use this file except in compliance // +// with the License. You may obtain a copy of the License as part // +// of the software distribution. // +// // +// Unless 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. // +//--------------------------------------------------------------------------// + !!! %html{:lang => "en"} %head diff --git a/market/views/nav_login.haml b/market/views/nav_login.haml index 3ac054fb21..f4d94a19a5 100644 --- a/market/views/nav_login.haml +++ b/market/views/nav_login.haml @@ -1,3 +1,18 @@ +//--------------------------------------------------------------------------// +// Copyright 2010-2012, C12G Labs S.L. // +// // +// Licensed under the C12G Commercial Open-source License (the // +// "License"); you may not use this file except in compliance // +// with the License. You may obtain a copy of the License as part // +// of the software distribution. // +// // +// Unless 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. // +//--------------------------------------------------------------------------// + %ul.nav.pull-right.nav-pills %li.divider-vertical - if @session.anonymous? diff --git a/market/views/user_form.haml b/market/views/user_form.haml index 3f7ae1cb3d..e99f0edd7a 100644 --- a/market/views/user_form.haml +++ b/market/views/user_form.haml @@ -1,3 +1,18 @@ +//--------------------------------------------------------------------------// +// Copyright 2010-2012, C12G Labs S.L. // +// // +// Licensed under the C12G Commercial Open-source License (the // +// "License"); you may not use this file except in compliance // +// with the License. You may obtain a copy of the License as part // +// of the software distribution. // +// // +// Unless 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. // +//--------------------------------------------------------------------------// + %fieldset .control-group %label.control-label{'for' => 'organization_form'} Organization diff --git a/market/views/user_index.haml b/market/views/user_index.haml index 8b9044fa65..e0f07edab2 100644 --- a/market/views/user_index.haml +++ b/market/views/user_index.haml @@ -1,3 +1,18 @@ +//--------------------------------------------------------------------------// +// Copyright 2010-2012, C12G Labs S.L. // +// // +// Licensed under the C12G Commercial Open-source License (the // +// "License"); you may not use this file except in compliance // +// with the License. You may obtain a copy of the License as part // +// of the software distribution. // +// // +// Unless 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. // +//--------------------------------------------------------------------------// + .navbar.navbar-static .navbar-inner .container diff --git a/market/views/user_show.haml b/market/views/user_show.haml index c394286c24..41d1ff5d22 100644 --- a/market/views/user_show.haml +++ b/market/views/user_show.haml @@ -1,3 +1,18 @@ +//--------------------------------------------------------------------------// +// Copyright 2010-2012, C12G Labs S.L. // +// // +// Licensed under the C12G Commercial Open-source License (the // +// "License"); you may not use this file except in compliance // +// with the License. You may obtain a copy of the License as part // +// of the software distribution. // +// // +// Unless 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. // +//--------------------------------------------------------------------------// + .navbar.navbar-static .navbar-inner .container From 7409d3eaaf4d13d2f1f0fda1bbb2edf3500bca10 Mon Sep 17 00:00:00 2001 From: Daniel Molina Date: Mon, 24 Sep 2012 18:28:07 +0200 Subject: [PATCH 5/9] appmarket: Disable mail service by default --- market/config/appmarket-server.conf | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/market/config/appmarket-server.conf b/market/config/appmarket-server.conf index d82b5dbbca..cd9d300310 100644 --- a/market/config/appmarket-server.conf +++ b/market/config/appmarket-server.conf @@ -34,11 +34,11 @@ user: # Parameters that will be used to configure the delivery method of the # mail service. More information: http://rubygems.org/gems/mail -mail: - :address: mail.default.com - :port: 587 - :domain: default.com - :user_name: default@default.com - :password: password - :authentication: plain - :enable_starttls_auto: false \ No newline at end of file +#mail: +# :address: mail.default.com +# :port: 587 +# :domain: default.com +# :user_name: default@default.com +# :password: password +# :authentication: plain +# :enable_starttls_auto: false From 25c64611351ac053b430015348cba9b22f387838 Mon Sep 17 00:00:00 2001 From: Daniel Molina Date: Mon, 24 Sep 2012 18:59:45 +0200 Subject: [PATCH 6/9] Add opennebula.js from one-3.6 --- .../share/sunstone/public/js/opennebula.js | 63 +++++++------------ 1 file changed, 23 insertions(+), 40 deletions(-) diff --git a/apptools/share/sunstone/public/js/opennebula.js b/apptools/share/sunstone/public/js/opennebula.js index e5feba7291..571364a855 100644 --- a/apptools/share/sunstone/public/js/opennebula.js +++ b/apptools/share/sunstone/public/js/opennebula.js @@ -44,12 +44,11 @@ var OpenNebula = { "Helper": { "resource_state": function(type, value) { - var state; switch(type) { case "HOST": case "host": - state = tr(["INIT", + return tr(["INIT", "MONITORING_MONITORED", "MONITORED", "ERROR", @@ -58,7 +57,7 @@ var OpenNebula = { break; case "HOST_SIMPLE": case "host_simple": - state = tr(["INIT", + return tr(["INIT", "UPDATE", "ON", "ERROR", @@ -67,19 +66,18 @@ var OpenNebula = { break; case "VM": case "vm": - state = tr(["INIT", + return tr(["INIT", "PENDING", "HOLD", "ACTIVE", "STOPPED", "SUSPENDED", "DONE", - "FAILED", - "POWEROFF"][value]); + "FAILED"][value]); break; case "VM_LCM": case "vm_lcm": - state = tr(["LCM_INIT", + return tr(["LCM_INIT", "PROLOG", "BOOT", "RUNNING", @@ -96,12 +94,11 @@ var OpenNebula = { "FAILURE", "CLEANUP", "UNKNOWN", - "HOTPLUG", - "SHUTDOWN_POWEROFF"][value]); + "HOTPLUG"][value]); break; case "IMAGE": case "image": - state = tr(["INIT", + return tr(["INIT", "READY", "USED", "DISABLED", @@ -113,17 +110,15 @@ var OpenNebula = { break; case "VM_MIGRATE_REASON": case "vm_migrate_reason": - state = tr(["NONE", + return tr(["NONE", "ERROR", "STOP_RESUME", "USER", "CANCEL"][value]); break; default: - return value; + return; } - if (!state) state = value - return state; }, "image_type": function(value) @@ -361,6 +356,7 @@ var OpenNebula = { var data = params.data; var method = "monitor"; + var action = OpenNebula.Helper.action(method); var request = OpenNebula.Helper.request(resource,method, data); var url = path ? path : resource.toLowerCase(); @@ -401,16 +397,9 @@ var OpenNebula = { type: "POST", data: {remember: remember}, beforeSend : function(req) { - var token = username + ':' + password; - var authString = 'Basic '; - if (typeof(btoa) === 'function') - authString += btoa(token) - else { - token = CryptoJS.enc.Utf8.parse(token); - authString += CryptoJS.enc.Base64.stringify(token) - } - - req.setRequestHeader( "Authorization", authString); + req.setRequestHeader( "Authorization", + "Basic " + btoa(username + ":" + password) + ) }, success: function(response){ return callback ? callback(request, response) : null; @@ -503,7 +492,7 @@ var OpenNebula = { }, "monitor" : function(params){ OpenNebula.Action.monitor(params,OpenNebula.Host.resource,false); - } + }, }, "Network": { @@ -577,7 +566,7 @@ var OpenNebula = { }, "fetch_template" : function(params){ OpenNebula.Action.show(params,OpenNebula.Network.resource,"template"); - } + }, }, "VM": { @@ -635,9 +624,6 @@ var OpenNebula = { "resubmit": function(params){ OpenNebula.Action.simple_action(params,OpenNebula.VM.resource,"resubmit"); }, - "poweroff" : function(params){ - OpenNebula.Action.simple_action(params,OpenNebula.VM.resource,"poweroff"); - }, "reboot" : function(params){ OpenNebula.Action.simple_action(params,OpenNebula.VM.resource,"reboot"); }, @@ -693,6 +679,9 @@ var OpenNebula = { "startvnc" : function(params){ OpenNebula.VM.vnc(params,"startvnc"); }, + "stopvnc" : function(params){ + OpenNebula.VM.vnc(params,"stopvnc"); + }, "monitor" : function(params){ OpenNebula.Action.monitor(params,OpenNebula.VM.resource,false); }, @@ -726,9 +715,6 @@ var OpenNebula = { }, "show" : function(params){ OpenNebula.Action.show(params,OpenNebula.Group.resource); - }, - "accounting" : function(params){ - OpenNebula.Action.monitor(params,OpenNebula.Group.resource,false); } }, @@ -772,13 +758,10 @@ var OpenNebula = { "fetch_template" : function(params){ OpenNebula.Action.show(params,OpenNebula.User.resource,"template"); }, - "accounting" : function(params){ - OpenNebula.Action.monitor(params,OpenNebula.User.resource,false); - }, "set_quota" : function(params){ var action_obj = { quotas : params.data.extra_param }; OpenNebula.Action.simple_action(params,OpenNebula.User.resource,"set_quota",action_obj); - } + }, // "addgroup" : function(params){ // var action_obj = {"group_id": params.data.extra_param }; @@ -1020,7 +1003,7 @@ var OpenNebula = { }, "fetch_template" : function(params){ OpenNebula.Action.show(params,OpenNebula.Datastore.resource,"template"); - } + }, }, "Marketplace" : { @@ -1048,8 +1031,8 @@ var OpenNebula = { }, error: function(res){ return callback_error ? callback_error(request, OpenNebula.Error(res)) : null; - } + }, }); - } - } + }, + }, } From dbaed939f3b4a5c76a53158475fe754db54fd9f7 Mon Sep 17 00:00:00 2001 From: Javi Fontan Date: Tue, 25 Sep 2012 14:44:59 +0200 Subject: [PATCH 7/9] appstage: changed name from oneenv to appstage --- gen_package.sh | 2 +- {env => stage}/README.md | 22 +- env/bin/appenv => stage/bin/appstage | 12 +- .../cli/appstage_helper.rb | 4 +- {env => stage}/install.sh | 2 +- {env => stage}/lib/onecast.rb | 0 {env => stage}/lib/onechef.rb | 0 {env => stage}/share/README.md | 2 +- {env => stage}/share/gen_package.sh | 2 +- .../share/guest/etc/one-context.d/99-one-chef | 0 .../share/packages/app-context_3.6.0.deb | Bin .../share/packages/app-context_3.6.0.rpm | Bin .../sunstone/public/images/appstage_icon.png | Bin .../apptools.appstage-dashboard.js | 32 +- .../js/user-plugins/apptools.appstage.js | 494 +++++++++--------- .../sunstone/routes/appstage.rb | 36 +- 16 files changed, 304 insertions(+), 304 deletions(-) rename {env => stage}/README.md (85%) rename env/bin/appenv => stage/bin/appstage (96%) rename env/cli/appenv_helper.rb => stage/cli/appstage_helper.rb (97%) rename {env => stage}/install.sh (96%) rename {env => stage}/lib/onecast.rb (100%) rename {env => stage}/lib/onechef.rb (100%) rename {env => stage}/share/README.md (95%) rename {env => stage}/share/gen_package.sh (93%) rename {env => stage}/share/guest/etc/one-context.d/99-one-chef (100%) rename {env => stage}/share/packages/app-context_3.6.0.deb (100%) rename {env => stage}/share/packages/app-context_3.6.0.rpm (100%) rename env/sunstone/public/images/appenv_icon.png => stage/sunstone/public/images/appstage_icon.png (100%) rename env/sunstone/public/js/user-plugins/apptools.appenv-dashboard.js => stage/sunstone/public/js/user-plugins/apptools.appstage-dashboard.js (65%) rename env/sunstone/public/js/user-plugins/apptools.appenv.js => stage/sunstone/public/js/user-plugins/apptools.appstage.js (64%) rename env/sunstone/routes/appenv.rb => stage/sunstone/routes/appstage.rb (86%) diff --git a/gen_package.sh b/gen_package.sh index 529d7f6880..830100beea 100755 --- a/gen_package.sh +++ b/gen_package.sh @@ -32,7 +32,7 @@ SCRIPTS_DIR=$PWD NAME="${PACKAGE_NAME}_${VERSION}.${PACKAGE_TYPE}" rm $NAME -DIRS="apptools env flow market" +DIRS="apptools stage flow market" export DESTDIR=$PWD/tmp if [ "$(id -u)" = "0" ]; then diff --git a/env/README.md b/stage/README.md similarity index 85% rename from env/README.md rename to stage/README.md index c26b894ef3..ff722c070d 100644 --- a/env/README.md +++ b/stage/README.md @@ -5,7 +5,7 @@ Installing services can sometimes be tedious. Getting the VM ins good shape, ins With this software we can script the installation and configuration of applications and services. You can also describe the services and their configuration that will be installed on a node so we can automate its installation. We will also be sure that each installation will be equal to other using the same configuration. -The tool oneenv will make use of [chef-solo](http://wiki.opscode.com/display/chef/Chef+Solo). It lets you register chef configurations and instantiate them using predefined templates and images. +The tool onestage will make use of [chef-solo](http://wiki.opscode.com/display/chef/Chef+Solo). It lets you register chef configurations and instantiate them using predefined templates and images. # Guide @@ -35,15 +35,15 @@ The node files are JSON encoded and contain the recipes that are going to be run ${WP_DB_NAME|wordpress} -oneenv comes with a template engine that will let you create node files with variables. These variables are named and can contain default values. the form is: +onestage comes with a template engine that will let you create node files with variables. These variables are named and can contain default values. the form is: ${NAME[|]} The name will be used to refer to it on VM instantiation (we will see this later on) and the default value will substitute the variable if it is not explicitly specified. -We save this file as node.json and now comes the registration part. oneenv will let us register it in the OpenNebula database. To register the node file we can use the command `oneenv create`: +We save this file as node.json and now comes the registration part. onestage will let us register it in the OpenNebula database. To register the node file we can use the command `onestage create`: - $ oneenv create node.json + $ onestage create node.json 21 The number returned is the identifier to our newly registered node file. We can also specify some parameters: @@ -54,19 +54,19 @@ The number returned is the identifier to our newly registered node file. We can On VM creation the recipes specified in the node file will be automatically downloaded from the standard chef cookbooks repository but we can specify a URL of a tar.gz containing extra cookbooks that you have created. For example: - $ oneenv create --name my_blog --templates ubuntu,centos --cookbooks http://some.url.com/cookbooks.tar.gz node.json + $ onestage create --name my_blog --templates ubuntu,centos --cookbooks http://some.url.com/cookbooks.tar.gz node.json 22 We can list the nodes we already have defined: - $ oneenv list + $ onestage list ID NAME 21 wordpress 22 my_blog And show the properties: - $ ./oneenv show my_blog + $ ./onestage show my_blog ROLE 22 INFORMATION ID : 22 NAME : my_blog @@ -107,11 +107,11 @@ And show the properties: There we can see the node file and its properties. It is also handy the default variables. Those are the ones we can change on instantiation. -We will be also able to update the node file using `oneenv update `. A text editor will be run letting us modify the node file. +We will be also able to update the node file using `onestage update `. A text editor will be run letting us modify the node file. -To instantiate a VM that will use this node we will use the command `oneenv instantiate