package be.iminds.ilabt.jfed.gts;

/**
 * User: twalcari
 * Date: 5/18/2015
 * Time: 16:24
 */
public class GtsDslWriterTest {

    private static final String TWO_NODES_ONE_LINK_RSPEC = "<?xml version='1.0'?>\n" +
            "<rspec xmlns=\"http://www.geni.net/resources/rspec/3\" type=\"request\" generated_by=\"jFed RSpec Editor\" generated=\"2015-05-18T16:26:37.528+02:00\" xmlns:emulab=\"http://www.protogeni.net/resources/rspec/ext/emulab/1\" xmlns:delay=\"http://www.protogeni.net/resources/rspec/ext/delay/1\" xmlns:jfed-command=\"http://jfed.iminds.be/rspec/ext/jfed-command/1\" xmlns:client=\"http://www.protogeni.net/resources/rspec/ext/client/1\" xmlns:jfed-ssh-keys=\"http://jfed.iminds.be/rspec/ext/jfed-ssh-keys/1\" xmlns:jfed=\"http://jfed.iminds.be/rspec/ext/jfed/1\" xmlns:sharedvlan=\"http://www.protogeni.net/resources/rspec/ext/shared-vlan/1\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://www.geni.net/resources/rspec/3 http://www.geni.net/resources/rspec/3/request.xsd \">\n" +
            "  <node client_id=\"node0\" exclusive=\"true\" component_manager_id=\"urn:publicid:IDN+wall2.ilabt.iminds.be+authority+cm\">\n" +
            "    <sliver_type name=\"raw-pc\"/>\n" +
            "    <location xmlns=\"http://jfed.iminds.be/rspec/ext/jfed/1\" x=\"103.0\" y=\"75.5\"/>\n" +
            "    <interface client_id=\"node0:if0\">\n" +
            "      <ip address=\"192.168.0.1\" netmask=\"255.255.255.0\" type=\"ipv4\"/>\n" +
            "    </interface>\n" +
            "  </node>\n" +
            "  <node client_id=\"node1\" exclusive=\"true\" component_manager_id=\"urn:publicid:IDN+wall2.ilabt.iminds.be+authority+cm\">\n" +
            "    <sliver_type name=\"raw-pc\"/>\n" +
            "    <location xmlns=\"http://jfed.iminds.be/rspec/ext/jfed/1\" x=\"277.0\" y=\"214.5\"/>\n" +
            "    <interface client_id=\"node1:if0\">\n" +
            "      <ip address=\"192.168.0.2\" netmask=\"255.255.255.0\" type=\"ipv4\"/>\n" +
            "    </interface>\n" +
            "  </node>\n" +
            "  <link client_id=\"link0\">\n" +
            "    <component_manager name=\"urn:publicid:IDN+wall2.ilabt.iminds.be+authority+cm\"/>\n" +
            "    <interface_ref client_id=\"node0:if0\"/>\n" +
            "    <interface_ref client_id=\"node1:if0\"/>\n" +
            "    <link_type name=\"lan\"/>\n" +
            "  </link>\n" +
            "</rspec>";


//    public void twoNodesOneLinkTest() throws Exception {
//        ModelRspec rspec =
//                new StaxRspecParser(TWO_NODES_ONE_LINK_RSPEC, RspecFactoryFactory.getRspecFactoryInstance(ModelRspecType.BASIC)).call();
//        GtsDslWriter writer = new GtsDslWriter("TowNodesOneLink", rspec);
//
//        String result = writer.call();
//
//        System.out.println(result);
//
//    }

}
