def test_create_cluster():
    from PetaSAN.backend.cluster.deploy import Wizard
    wiz = Wizard()
    wiz.create_cluster_info("password", "test")
    test_set_cluter_info("")
    test_set_Node()
    test_build()
def test_set_Node():
    from PetaSAN.core.cluster.configuration import configuration
    from PetaSAN.backend.cluster.manage_node import ManageNode
    from PetaSAN.backend.cluster.deploy import Wizard
    from PetaSAN.core.cluster.network import Network
    net = Network()
    wizerd = Wizard()
    conf = configuration()

    node = NodeInfo()
    m_node = ManageNode()
    node.backend_1_ip = "192.168.130.100"
    node.backend_2_ip = "192.168.120.100"
    node.management_ip = net.get_node_management_ip()
    #clu= conf.get_cluster_info()
    #clu.management_nodes.append(node)
    #conf.set_cluster_network_info(clu)
    print wizerd.set_node_info(node)
def test_join(ip,password):
    wiz = Wizard()

    print wiz.join(ip,password)
    #test_set_Node()
    wiz.build()
 def get_node_url(self):
     deploy_url = Wizard().get_node_deploy_url()
     return deploy_url
 def get_manage_urls(self):
     manage_urls = Wizard().get_management_urls()
     return manage_urls
 def get_cluster_name(self):
     cluster_name = Wizard().get_cluster_name()
     return cluster_name
 def get_cluster_state(self):
     wizard = Wizard()
     cluster_state = wizard.is_cluster_config_complated()
     return cluster_state
def test_is_valid():
    from PetaSAN.backend.cluster.deploy import Wizard
    config = Wizard()
    print config.is_valid_network_setting()
def test_build():
    from PetaSAN.backend.cluster.deploy import Wizard
    wiz = Wizard()
    wiz.build()