Copyright (c) 2011 The Substance Project. All Rights Reserved. Licensed under the GNU LGPL. For full terms see the file COPYING or visit http://fsf.org
Contributors:
Clemens Klokmose: clemens@klokmose.net
The Substance environment is booted and loaded by importing the substance.environment.bootstrap lib
from substance.environment.bootstrap import *
In order for us to mount a subtree from the network, we need to import a Mounter facet
from substance.std.sharing.mounter import Mounter
We create our main facet for the Slave environment
class Slave(Facet):
Now we install the Mounter facet on our local node
local.add_facet(self, Mounter())
We can now use it to mount the share that we have shared in the Master environment
mount = local.Mounter.mount(self, "SomeShare", "examples.substance")
And now we can manipulate it as it were a local node
mount.new_value(self, "Foo", "A new value on the mounted subtree", "Bar")
boot_std_default(name = "Slave", description = "Testing sharing - slave")
boot.add_facet(Slave(), environment / "app")
done_boot()