package pt.utl.ist.scripts.runOnce.remote;

import pt.ist.fenixframework.plugins.remote.domain.RemoteHost;
import pt.utl.ist.fenix.tools.util.Strings;
import pt.utl.ist.scripts.commons.AtomicScript;

public class CreateRemoteHost extends AtomicScript {

    public static void main(String[] args) {
        logger.info("Starting create remote host...");
        processWriteTransaction(new CreateRemoteHost());
        logger.info("Creation finalized");
    }

    @Override
    protected void run() throws Exception {
        createRemoteHost();
    }

    private void createRemoteHost() {
//        new RemoteHost(new Strings(new String[] { "127.0.0.1", "2001:690:2100:2:ca9c:dcff:fe26:efeb", "193.136.132.95",
//                "ashtray.ist.utl.pt" }), "dot", "646f742e6973742e75746c2e7074", Boolean.TRUE);

//        RemoteHost host = FenixFramework.getDomainObject("5488968208491");
//        host.setUrl(new Strings(new String[] { "127.0.0.1", "2001:690:2100:2:ca9c:dcff:fe26:efeb", "193.136.132.95",
//                "ashtray.ist.utl.pt", "0:0:0:0:0:0:0:1" }));

        new RemoteHost(new Strings(new String[] { "2001:690:2100:2:216:3eff:fe00:845c", "193.136.132.92", "slave.ist.utl.pt" }),
                "fenixignition", "b804a8603ba02602402a8f27", Boolean.TRUE);
    }

}
