Skip to content
This repository has been archived by the owner on Sep 23, 2020. It is now read-only.

Commit

Permalink
Adjusted nimboss example
Browse files Browse the repository at this point in the history
  • Loading branch information
labisso committed Oct 15, 2010
1 parent 6a4c28b commit c2722db
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion examples/examples.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
import os
from nimboss.broker import BrokerClient
from nimboss.cluster import NimbusClusterDriver
from nimboss.node import NimbusNodeDriver

BROKER_URI = "http://mybroker.edu"
NIMBUS_URI = "http://mycloud.edu"


def main():
Expand All @@ -11,7 +13,8 @@ def main():
# in this example we are using the same credentials for broker and nimbus
# this would be different if we were launching on say, EC2
brokerclient = BrokerClient(BROKER_URI, key, secret)
cdriver = NimbusClusterDriver(key, secret, brokerclient)
ndriver = NimbusNodeDriver(key, secret, host=NIMBUS_URI)
cdriver = NimbusClusterDriver(brokerclient, node_driver=ndriver)

clusterdoc = open("/path/to/myclusterdoc.xml").read()
cluster = cdriver.create_cluster(clusterdoc) # return value is a Cluster
Expand Down

0 comments on commit c2722db

Please sign in to comment.