#
# @copyright@
# Copyright (c) 2006 - 2018 Teradata
# All rights reserved. Stacki(r) v5.x stacki.com
# https://github.com/Teradata/stacki/blob/master/LICENSE.txt
# @copyright@
#
import os
import stack.sql
import subprocess

class Plugin(stack.sql.InsertEthersPlugin):
	"""
	Calls "rocks sync config"
	"""
	def added(self, nodename, id):
		self.sync()

	def removed(self, nodename, id):
		self.sync()

	def update(self):
		self.sync()

	def done(self):
		pass

	def sync(self):
		p = subprocess.Popen([
			'/opt/stack/bin/stack','sync','config'],
			stdout=open('/dev/null'),
			stderr=open('/dev/null'),
			)
		rc = p.wait()
		return

7535cb9e7cd4f7f5dbc5e0cc5bc57a6051f155b1
<mask token>


class Plugin(stack.sql.InsertEthersPlugin):
    <mask token>

    def added(self, nodename, id):
        self.sync()

    def removed(self, nodename, id):
        self.sync()

    def update(self):
        self.sync()
    <mask token>

    def sync(self):
        p = subprocess.Popen(['/opt/stack/bin/stack', 'sync', 'config'],
            stdout=open('/dev/null'), stderr=open('/dev/null'))
        rc = p.wait()
        return

<mask token>


class Plugin(stack.sql.InsertEthersPlugin):
    <mask token>

    def added(self, nodename, id):
        self.sync()

    def removed(self, nodename, id):
        self.sync()

    def update(self):
        self.sync()

    def done(self):
        pass

    def sync(self):
        p = subprocess.Popen(['/opt/stack/bin/stack', 'sync', 'config'],
            stdout=open('/dev/null'), stderr=open('/dev/null'))
        rc = p.wait()
        return

<mask token>


class Plugin(stack.sql.InsertEthersPlugin):
    """
	Calls "rocks sync config"
	"""

    def added(self, nodename, id):
        self.sync()

    def removed(self, nodename, id):
        self.sync()

    def update(self):
        self.sync()

    def done(self):
        pass

    def sync(self):
        p = subprocess.Popen(['/opt/stack/bin/stack', 'sync', 'config'],
            stdout=open('/dev/null'), stderr=open('/dev/null'))
        rc = p.wait()
        return

import os
import stack.sql
import subprocess


class Plugin(stack.sql.InsertEthersPlugin):
    """
	Calls "rocks sync config"
	"""

    def added(self, nodename, id):
        self.sync()

    def removed(self, nodename, id):
        self.sync()

    def update(self):
        self.sync()

    def done(self):
        pass

    def sync(self):
        p = subprocess.Popen(['/opt/stack/bin/stack', 'sync', 'config'],
            stdout=open('/dev/null'), stderr=open('/dev/null'))
        rc = p.wait()
        return

#
# @copyright@
# Copyright (c) 2006 - 2018 Teradata
# All rights reserved. Stacki(r) v5.x stacki.com
# https://github.com/Teradata/stacki/blob/master/LICENSE.txt
# @copyright@
#
import os
import stack.sql
import subprocess

class Plugin(stack.sql.InsertEthersPlugin):
	"""
	Calls "rocks sync config"
	"""
	def added(self, nodename, id):
		self.sync()

	def removed(self, nodename, id):
		self.sync()

	def update(self):
		self.sync()

	def done(self):
		pass

	def sync(self):
		p = subprocess.Popen([
			'/opt/stack/bin/stack','sync','config'],
			stdout=open('/dev/null'),
			stderr=open('/dev/null'),
			)
		rc = p.wait()
		return
