~hazmat/pyjuju/rapi-delta

« back to all changes in this revision

Viewing changes to juju/control/initialize.py

  • Committer: Kapil Thangavelu
  • Date: 2012-09-19 20:38:44 UTC
  • mfrom: (573.1.6 rest-context)
  • Revision ID: kapil@canonical.com-20120919203844-dc2pf82ttm7xj3xs
Merged rest-context into rapi-delta.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
from base64 import b64decode
2
2
import os
3
 
import yaml
4
3
 
5
4
from twisted.internet.defer import inlineCallbacks
6
5
 
7
6
from txzookeeper import ZookeeperClient
8
7
 
 
8
from juju.lib import serializer
9
9
from juju.state.initialize import StateHierarchy
10
10
 
11
11
 
34
34
    zk_address = os.environ.get("ZOOKEEPER_ADDRESS", "127.0.0.1:2181")
35
35
    client = yield ZookeeperClient(zk_address).connect()
36
36
    try:
37
 
        constraints_data = yaml.load(b64decode(options.constraints_data))
 
37
        constraints_data = serializer.load(b64decode(options.constraints_data))
38
38
        hierarchy = StateHierarchy(
39
39
            client,
40
40
            options.admin_identity,