http://git-wip-us.apache.org/repos/asf/stratos/blob/4280eec2/tools/puppet3/modules/python_agent/templates/extensions/subscription-domain-removed.sh.erb
----------------------------------------------------------------------
diff --git 
a/tools/puppet3/modules/python_agent/templates/extensions/subscription-domain-removed.sh.erb
 
b/tools/puppet3/modules/python_agent/templates/extensions/subscription-domain-removed.sh.erb
new file mode 100644
index 0000000..ff7b56b
--- /dev/null
+++ 
b/tools/puppet3/modules/python_agent/templates/extensions/subscription-domain-removed.sh.erb
@@ -0,0 +1,34 @@
+#!/bin/bash
+# --------------------------------------------------------------
+#
+# 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.
+#
+# --------------------------------------------------------------
+# This extension script will be executed when subscription domain
+# removed event is received.
+# --------------------------------------------------------------
+#
+
+log=/var/log/apache-stratos/cartridge-agent-extensions.log
+OUTPUT=`date`": Subscription Domain Removed Event"
+OUTPUT="$OUTPUT STRATOS_SUBSCRIPTION_SERVICE_NAME: 
${STRATOS_SUBSCRIPTION_SERVICE_NAME},"
+OUTPUT="$OUTPUT STRATOS_SUBSCRIPTION_DOMAIN_NAME: 
${STRATOS_SUBSCRIPTION_DOMAIN_NAME},"
+OUTPUT="$OUTPUT STRATOS_SUBSCRIPTION_TENANT_ID: 
${STRATOS_SUBSCRIPTION_TENANT_ID},"
+OUTPUT="$OUTPUT APP_PATH: ${APP_PATH},"
+OUTPUT="$OUTPUT STRATOS_SUBSCRIPTION_TENANT_DOMAIN: 
$STRATOS_SUBSCRIPTION_TENANT_DOMAIN}"
+echo $OUTPUT | tee -a $log

http://git-wip-us.apache.org/repos/asf/stratos/blob/4280eec2/tools/puppet3/modules/python_agent/templates/logging.ini.erb
----------------------------------------------------------------------
diff --git a/tools/puppet3/modules/python_agent/templates/logging.ini.erb 
b/tools/puppet3/modules/python_agent/templates/logging.ini.erb
new file mode 100644
index 0000000..3fd9381
--- /dev/null
+++ b/tools/puppet3/modules/python_agent/templates/logging.ini.erb
@@ -0,0 +1,34 @@
+[formatters]
+keys=default
+
+[formatter_default]
+format=%(asctime)s:%(levelname)s:%(message)s
+class=logging.Formatter
+
+[handlers]
+keys=console, error_file
+
+[handler_console]
+class=logging.StreamHandler
+formatter=default
+args=tuple()
+
+[handler_log_file]
+class=logging.FileHandler
+level=INFO
+formatter=default
+args=("agent.log", "w")
+
+[handler_error_file]
+class=logging.FileHandler
+level=ERROR
+formatter=default
+args=("error.log", "w")
+
+[loggers]
+keys=root
+
+[logger_root]
+level=DEBUG
+formatter=default
+handlers=console,error_file
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/stratos/blob/4280eec2/tools/puppet3/modules/ruby/manifests/init.pp
----------------------------------------------------------------------
diff --git a/tools/puppet3/modules/ruby/manifests/init.pp 
b/tools/puppet3/modules/ruby/manifests/init.pp
index 8d54995..97a1896 100644
--- a/tools/puppet3/modules/ruby/manifests/init.pp
+++ b/tools/puppet3/modules/ruby/manifests/init.pp
@@ -20,7 +20,7 @@ class ruby( $target = '/mnt' ) {
   require java
 
   $custom_agent_templates = ['extensions/instance-started.sh']
-  class {'agent':
+  class {'python_agent':
     custom_templates => $custom_agent_templates,
     module=>'ruby'
   }
@@ -67,5 +67,5 @@ class ruby( $target = '/mnt' ) {
   }
 
   # install stratos_base before java before ruby before agent
-  Class['stratos_base'] -> Class['java'] -> Class['agent'] -> Class['ruby']
+  Class['stratos_base'] -> Class['python_agent'] -> Class['ruby']
 }

http://git-wip-us.apache.org/repos/asf/stratos/blob/4280eec2/tools/puppet3/modules/tomcat/manifests/init.pp
----------------------------------------------------------------------
diff --git a/tools/puppet3/modules/tomcat/manifests/init.pp 
b/tools/puppet3/modules/tomcat/manifests/init.pp
index 7ef64dd..b716c0f 100644
--- a/tools/puppet3/modules/tomcat/manifests/init.pp
+++ b/tools/puppet3/modules/tomcat/manifests/init.pp
@@ -22,7 +22,7 @@ class tomcat(
 ){
 
   require java
-  class {'agent':}
+  class {'python_agent':}
 
   $package_name    = "apache-tomcat-${tomcat_version}"
   $service_code    = 'apache-tomcat'
@@ -81,6 +81,6 @@ class tomcat(
   }
 
   # install stratos_base before java before tomcat before agent
-  Class['stratos_base'] -> Class['java'] -> Class['agent'] -> Class['tomcat']
+  Class['stratos_base'] -> Class['java'] -> Class['python_agent'] -> 
Class['tomcat']
 }
 

http://git-wip-us.apache.org/repos/asf/stratos/blob/4280eec2/tools/puppet3/modules/wordpress/manifests/init.pp
----------------------------------------------------------------------
diff --git a/tools/puppet3/modules/wordpress/manifests/init.pp 
b/tools/puppet3/modules/wordpress/manifests/init.pp
index 20fae4e..4488961 100644
--- a/tools/puppet3/modules/wordpress/manifests/init.pp
+++ b/tools/puppet3/modules/wordpress/manifests/init.pp
@@ -23,7 +23,7 @@ class wordpress (
 ) { 
   
   require java
-  class {'agent':}
+  class {'python_agent':}
 
   $packages = [
     'httpd',
@@ -88,5 +88,5 @@ class wordpress (
   }
  
   # install stratos_base before java before mysql before wordpress before agent
-  Class['stratos_base'] -> Class['java'] -> Class['agent'] -> Class['mysql'] 
-> Class['wordpress']
+  Class['stratos_base'] -> Class['python_agent'] -> Class['mysql'] -> 
Class['wordpress']
 }

Reply via email to