def test_add_package_config():
    eucalyptus = Eucalyptus()
    eucalyptus_repo = 'eucalyptus-repo'
    euca2ools_repo = 'euca2ools-repo'
    eucalyptus.eucalyptus_repo.value = eucalyptus_repo
    eucalyptus.euca2ools_repo.value = euca2ools_repo
    assert eucalyptus.eucalyptus_repo.value == eucalyptus_repo
    assert eucalyptus.euca2ools_repo.value == euca2ools_repo
Example #2
0
def test_init():
    Eucalyptus()
def test_add_network():
    eucalyptus = Eucalyptus()
    network_json = '{}'
    network_json_file = mock_open()
    network = Network(network_json_file, network_json)
    eucalyptus.network.value = network
def test_add_topology():
    eucalyptus = Eucalyptus()
    topology = Topology(name="Test Topo")
    eucalyptus.add_topology(topology)
def test_setters():
    eucalyptus = Eucalyptus()
    log_level = "TEST-LEVEL"
    eucalyptus.set_log_level(log_level)
    assert eucalyptus.log_level.value == log_level
#!/usr/bin/env python
from config_manager.eucalyptus import Eucalyptus
from config_manager.eucalyptus.enterprise import Enterprise
from config_manager.eucalyptus.topology import Topology
from config_manager.eucalyptus.topology.cluster import Cluster
from config_manager.eucalyptus.topology.cluster.nodecontroller import NodeController

eucalyptus = Eucalyptus()
topology = Topology()

eucalyptus.add_repositories(eucalyptus_repo="http://this.is.eucalyptus.repo",
                            euca2ools_repo="http://this.is.euca2ools.repo",
                            enterprise_repo="http://this.is.enterprise.repo")

eucalyptus.set_log_level('INFO')
eucalyptus.set_bind_addr_value(True)
topo = Topology()
eucalyptus.add_topology(topo)
# cluster = topo.create_cluster('CLUSTER1', hypervisor='kvm')
# node_controller = cluster.create_node(ip='1.1.1.1')
# node_controller.max_cores.value = 32
# node_controller.cache_size.value = 10000
#
#
# enterprise = Enterprise()
# enterprise.set_credentials(clientkey="myclientkey",
#                            clientcert="myclientcert")
#
# eucalyptus.add_enterprise_credentials(enterprise)
#
# print "### JSON with Hidden(!) Attributes: ###"
#!/usr/bin/env python
from config_manager.eucalyptus import Eucalyptus
from config_manager.eucalyptus.enterprise import Enterprise
from config_manager.eucalyptus.topology import Topology
from config_manager.eucalyptus.topology.cluster import Cluster
from config_manager.eucalyptus.topology.cluster.nodecontroller import NodeController


eucalyptus = Eucalyptus()
topology = Topology()

eucalyptus.add_repositories(eucalyptus_repo="http://this.is.eucalyptus.repo",
                            euca2ools_repo="http://this.is.euca2ools.repo",
                            enterprise_repo="http://this.is.enterprise.repo")

eucalyptus.set_log_level('INFO')
eucalyptus.set_bind_addr_value(True)
topo = Topology()
eucalyptus.add_topology(topo)
cluster = topo.create_cluster('CLUSTER1', hypervisor='kvm')
node_controller = cluster.create_node(ip='1.1.1.1')
node_controller.max_cores.value = 32
node_controller.cache_size.value = 10000


enterprise = Enterprise()
enterprise.set_credentials(clientkey="myclientkey",
                           clientcert="myclientcert")

eucalyptus.add_enterprise_credentials(enterprise)
#!/usr/bin/env python
from config_manager.eucalyptus import Eucalyptus
from config_manager.eucalyptus.enterprise import Enterprise
from config_manager.eucalyptus.topology import Topology
from config_manager.eucalyptus.topology.cluster import Cluster
from config_manager.eucalyptus.topology.cluster.nodecontroller import NodeController


eucalyptus = Eucalyptus()
topology = Topology()

eucalyptus.add_repositories(eucalyptus_repo="http://this.is.eucalyptus.repo",
                            euca2ools_repo="http://this.is.euca2ools.repo",
                            enterprise_repo="http://this.is.enterprise.repo")

eucalyptus.set_log_level('INFO')
eucalyptus.set_bind_addr_value(True)
topo = Topology()
eucalyptus.add_topology(topo)
# cluster = topo.create_cluster('CLUSTER1', hypervisor='kvm')
# node_controller = cluster.create_node(ip='1.1.1.1')
# node_controller.max_cores.value = 32
# node_controller.cache_size.value = 10000
#
#
# enterprise = Enterprise()
# enterprise.set_credentials(clientkey="myclientkey",
#                            clientcert="myclientcert")
#
# eucalyptus.add_enterprise_credentials(enterprise)
#
Example #9
0
#!/usr/bin/env python
from config_manager.eucalyptus import Eucalyptus
from config_manager.eucalyptus.enterprise import Enterprise
from config_manager.eucalyptus.topology import Topology
from config_manager.eucalyptus.topology.cluster import Cluster
from config_manager.eucalyptus.topology.cluster.nodecontroller import NodeController

eucalyptus = Eucalyptus()
topology = Topology()

eucalyptus.add_repositories(eucalyptus_repo="http://this.is.eucalyptus.repo",
                            euca2ools_repo="http://this.is.euca2ools.repo",
                            enterprise_repo="http://this.is.enterprise.repo")

eucalyptus.set_log_level('INFO')
eucalyptus.set_bind_addr_value(True)
topo = Topology()
eucalyptus.add_topology(topo)
cluster = topo.create_cluster('CLUSTER1', hypervisor='kvm')
node_controller = cluster.create_node(ip='1.1.1.1')
node_controller.max_cores.value = 32
node_controller.cache_size.value = 10000

enterprise = Enterprise()
enterprise.set_credentials(clientkey="myclientkey", clientcert="myclientcert")

eucalyptus.add_enterprise_credentials(enterprise)

print "### JSON with Hidden(!) Attributes: ###"
print eucalyptus.to_json(show_all=True)
print "\n### Actual JSON: ###"