package be.iminds.ilabt.jfed.rspec.parser;

import javax.xml.namespace.QName;

/**
 * RspecXmlConstants
 */
public class RspecXmlConstants {
    public static final String PREFIX_CLIENT = "client";
    public static final String PREFIX_JFED = "jfed";
    public static final String PREFIX_JFED_SSH_KEYS = "jfed-ssh-keys";
    public static final String PREFIX_JFED_COMMAND = "jfed-command";
    public static final String PREFIX_JFED_GTS = "gts";
    public static final String PREFIX_DELAY = "delay";
    public static final String PREFIX_SHAREDVLAN = "sharedvlan";
    public static final String PREFIX_EMULAB = "emulab";
    public static final String PREFIX_NITOS_BROKER = "ol";
    public static final String PREFIX_FELIX = "felix";
 
    private RspecXmlConstants() {
    }

    public final static String NAMESPACE_CLIENT = "http://www.protogeni.net/resources/rspec/ext/client/1";
    public final static String NAMESPACE_RSPEC = "http://www.geni.net/resources/rspec/3";
    public final static String NAMESPACE_OPENFLOW = "http://www.geni.net/resources/rspec/ext/openflow/3";
    public final static String NAMESPACE_JFED = "http://jfed.iminds.be/rspec/ext/jfed/1";
    public final static String NAMESPACE_JFED_SSH = "http://jfed.iminds.be/rspec/ext/jfed-ssh-keys/1";
    public final static String NAMESPACE_JFED_COMMAND = "http://jfed.iminds.be/rspec/ext/jfed-command/1";
    public final static String NAMESPACE_JFED_GTS = "http://jfed.iminds.be/rspec/ext/jfed-gts/1";
    public final static String NAMESPACE_JFED_PROXY = "http://jfed.iminds.be/proxy/1.0";//"http://jfed.iminds.be/rspec/ext/proxy/1";
    public final static String NAMESPACE_XSI = "http://www.w3.org/2001/XMLSchema-instance";
    public final static String NAMESPACE_FLACK = "http://www.protogeni.net/resources/rspec/ext/flack/1";
    public final static String NAMESPACE_PROTOGENI_DELAY = "http://www.protogeni.net/resources/rspec/ext/delay/1";
    public final static String NAMESPACE_EMULAB_EXT = "http://www.protogeni.net/resources/rspec/ext/emulab/1";
    public final static String NAMESPACE_SHAREDLAN_EXT = "http://www.protogeni.net/resources/rspec/ext/shared-vlan/1";
    public final static String NAMESPACE_NITOS_BROKER = "http://nitlab.inf.uth.gr/schema/sfa/rspec/1";
    public final static String NAMESPACE_STITCHING_EXT = "http://hpn.east.isi.edu/rspec/ext/stitch/0.1/";
    public final static String NAMESPACE_FELIX = "http://ict-felix.eu/serm_request";
    public final static String NAMESPACE_FLEX = "http://nitlab.inf.uth.gr/schema/sfa/rspec/lte/1";

    public final static QName Q_XSI_SCHEMALOCATION = new QName(NAMESPACE_XSI, "schemaLocation", "xsi");
    public final static QName Q_RSPEC = new QName(NAMESPACE_RSPEC, "rspec");
    public final static QName Q_ATT_RSPEC_TYPE = new QName("type");
    public final static QName Q_ATT_RSPEC_GEN_DATE = new QName("generated");
    public final static QName Q_ATT_RSPEC_GEN_BY = new QName("generated_by");
    public final static QName Q_ATT_RSPEC_EXPIRES = new QName("expires");

    public final static QName Q_OPENFLOW_DATAPATH = new QName(NAMESPACE_OPENFLOW, "datapath");
    public final static QName Q_ATT_OPENFLOW_COM_MAN_ID = new QName("component_manager_id");
    public final static QName Q_ATT_OPENFLOW_COM_ID = new QName("component_id");
    public final static QName Q_ATT_OPENFLOW_DPID = new QName("dpid");

    public final static QName Q_NODE = new QName(NAMESPACE_RSPEC, "node");
    public final static QName Q_LINK = new QName(NAMESPACE_RSPEC, "link");
    public final static QName Q_INTERFACE = new QName(NAMESPACE_RSPEC, "interface");
    public final static QName Q_INTERFACE_REF = new QName(NAMESPACE_RSPEC, "interface_ref");

    public final static QName Q_ATT_COM_MAN_ID = new QName("component_manager_id");
    public final static QName Q_ATT_SLIVER_ID = new QName("sliver_id");
    public final static QName Q_ATT_CLIENT_ID = new QName("client_id");
    public final static QName Q_ATT_COM_ID = new QName("component_id");
    public final static QName Q_ATT_COM_NAME = new QName("component_name");
    public final static QName Q_ATT_FELIX_VLAN = new QName(NAMESPACE_FELIX, "vlan");

    public final static QName Q_ATT_NODE_EXCLUSIVE = new QName("exclusive");

    public final static QName Q_ATT_IFACE_PUBIP4 = new QName("public_ipv4");
    public final static QName Q_ATT_IFACE_ROLE = new QName("role");

    public final static QName Q_NODE_SLIVERTYPE = new QName(NAMESPACE_RSPEC, "sliver_type");
    public final static QName Q_ATT_NODE_SLIVERTYPE_NAME = new QName("name");
    public final static QName Q_NODE_SLIVERTYPE_DISKIMAGE = new QName(NAMESPACE_RSPEC, "disk_image");
    public final static QName Q_ATT_DISKIMAGE_NAME = new QName("name");
    public final static QName Q_ATT_DISKIMAGE_URL = new QName("url"); //not in xsd, but used by emulab ?
    public final static QName Q_ATT_DISKIMAGE_OS = new QName("os");
    public final static QName Q_ATT_DISKIMAGE_VERSION = new QName("version");
    public final static QName Q_ATT_DISKIMAGE_DESCRIPTION = new QName("description");
    public final static QName Q_ATT_DISKIMAGE_DEFAULT = new QName("default");
    public final static QName Q_NODE_FLACK_NODE_INFO = new QName(NAMESPACE_FLACK, "node_info");
    public final static QName Q_ATT_FLACK_NODE_INFO_X = new QName("x");
    public final static QName Q_ATT_FLACK_NODE_INFO_Y = new QName("y");
    public final static QName Q_NODE_SERVICES = new QName(NAMESPACE_RSPEC, "services");
    public final static QName Q_NODE_SERVICES_LOGIN = new QName(NAMESPACE_RSPEC, "login");
    public final static QName Q_ATT_NODE_SERVICES_LOGIN_AUTH = new QName("authentication");
    public final static QName Q_ATT_NODE_SERVICES_LOGIN_HOSTNAME = new QName("hostname");
    public final static QName Q_ATT_NODE_SERVICES_LOGIN_PORT = new QName("port");
    public final static QName Q_ATT_NODE_SERVICES_LOGIN_USERNAME = new QName("username");
    public final static QName Q_NODE_SERVICES_EXECUTE = new QName(NAMESPACE_RSPEC, "execute");
    public final static QName Q_ATT_NODE_SERVICES_EXECUTE_SHELL = new QName("shell");
    public final static QName Q_ATT_NODE_SERVICES_EXECUTE_COMMAND = new QName("command");
    public final static QName Q_NODE_SERVICES_INSTALL = new QName(NAMESPACE_RSPEC, "install");
    public final static QName Q_ATT_NODE_SERVICES_INSTALL_PATH = new QName("install_path");
    public final static QName Q_ATT_NODE_SERVICES_INSTALL_URL = new QName("url");
    public final static QName Q_NODE_HARDWARETYPE = new QName(NAMESPACE_RSPEC, "hardware_type");
    public final static QName Q_ATT_NODE_HARDWARETYPE_NAME = new QName("name");
    public final static QName Q_NODE_HARDWARETYPE_NODETYPE = new QName(NAMESPACE_EMULAB_EXT, "node_type");
    public final static QName Q_ATT_NODE_HARDWARETYPE_NODETYPE_TYPESLOTS = new QName("type_slots");
    public final static QName Q_NODE_AVAILABLE = new QName(NAMESPACE_RSPEC, "available");
    public final static QName Q_ATT_NODE_AVAILABLE_NOW = new QName("now");
    public final static QName Q_NODE_LOCATION = new QName(NAMESPACE_RSPEC, "location");
    public final static QName Q_NODE_HOST = new QName(NAMESPACE_RSPEC, "host"); //added by emulab in manifest
    public final static QName Q_NODE_VNODE = new QName(NAMESPACE_EMULAB_EXT, "vnode"); //added by emulab in manifest
    public final static QName Q_ATT_NODE_LOCATION_COUNTRY = new QName("country");
    public final static QName Q_ATT_NODE_LOCATION_LAT = new QName("latitude");
    public final static QName Q_ATT_NODE_LOCATION_LONG = new QName("longitude");

    public final static QName Q_ATT_INTERFACE_MAC = new QName("mac_address");
    public final static QName Q_INTERFACE_IP = new QName(NAMESPACE_RSPEC, "ip");
    public final static QName Q_ATT_INTERFACE_IP_ADDRESS = new QName("address");
    public final static QName Q_ATT_INTERFACE_IP_NETMASK = new QName("netmask");
    public final static QName Q_ATT_INTERFACE_IP_TYPE = new QName("type");

    public final static QName Q_LINK_PROPERTY = new QName(NAMESPACE_RSPEC, "property");
    public final static QName Q_LINK_TYPE = new QName(NAMESPACE_RSPEC, "link_type");
    public final static QName Q_ATT_LINK_VLANTAG = new QName("vlantag"); //used in stitching, but not in xsd.
    public final static QName Q_ATT_LINK_TYPE_NAME = new QName("name");
    public final static QName Q_ATT_LINK_COM_MAN_NAME = new QName("name");
    public final static QName Q_LINK_COM_MAN = new QName(NAMESPACE_RSPEC, "component_manager");
    /**
     * We saw that component_manager_id was used instead of component_manager on wall2,
     * so we added support for this incorrect use as well.
     */
    public final static QName Q_LINK_COM_MAN2 = new QName(NAMESPACE_RSPEC, "component_manager_id");
    public final static QName Q_ATT_LINK_PROPERTY_SOURCE = new QName("source_id");
    public final static QName Q_ATT_LINK_PROPERTY_DEST = new QName("dest_id");
    public final static QName Q_ATT_LINK_PROPERTY_CAPACITY = new QName("capacity");
    public final static QName Q_ATT_LINK_PROPERTY_LATENCY = new QName("latency");
    public final static QName Q_ATT_LINK_PROPERTY_LOSS = new QName("packet_loss");

    public final static QName Q_JFED_LOCATION = new QName(NAMESPACE_JFED, "location");
    public final static QName Q_ATT_JFED_LOCATION_X = new QName("x");
    public final static QName Q_ATT_JFED_LOCATION_Y = new QName("y");

    public final static QName Q_JFED_EXECUTE_ANSIBLE_PLAYBOOK = new QName(NAMESPACE_JFED, "execute_ansible_playbook");
    public final static QName Q_ATT_JFED_EXECUTE_ANSIBLE_PLAYBOOK_SOURCE = new QName("source");
    public final static QName Q_ATT_JFED_EXECUTE_ANSIBLE_PLAYBOOK_OUTPUT_FILE = new QName("output_file");

    public final static QName Q_JFED_DISTRIBUTE_SSH_KEYPAIR = new QName(NAMESPACE_JFED, "distribute_ssh_keypair");
    public final static QName Q_ATT_LOCATION = new QName("location");
    public final static QName Q_ATT_USER = new QName("user");

    public final static QName Q_JFED_LINK_AUTOSHARELAN = new QName(NAMESPACE_JFED, "auto_share_lan");
    public final static QName Q_ATT_JFED_LINK_AUTOSHARELAN_NAME = new QName("name");

    public final static QName Q_JFEDSSH_USER_SSH_KEYS =
            new QName(NAMESPACE_JFED_SSH, "user-ssh-keys", PREFIX_JFED_SSH_KEYS);
    public final static QName Q_JFEDSSH_KEY = new QName(NAMESPACE_JFED_SSH, "sshkey", PREFIX_JFED_SSH_KEYS);
    public final static QName Q_JFEDSSH_USER = new QName("user");

    public final static QName Q_JFEDCOMMAND_EXP_BARRIER_SEG =
            new QName(NAMESPACE_JFED_COMMAND, "experimentBarrierSegment");
    public final static QName Q_JFEDCOMMAND_EXP_COMMAND = new QName(NAMESPACE_JFED_COMMAND, "experimentCommand");
    public final static QName Q_JFEDCOMMAND_EXP_COMMAND_OLDERROR = new QName(NAMESPACE_JFED, "experimentCommand");

    public final static QName Q_PROXY_PROXY = new QName(NAMESPACE_JFED_PROXY, "proxy");
    public final static QName Q_ATT_PROXY = new QName("proxy");
    public final static QName Q_ATT_FOR = new QName("for");
    public static final QName Q_ATT_HOSTKEY = new QName("hostkey");

    public final static QName Q_ATT_JFED_EXECUTE_FINISHED_FLAG = new QName(NAMESPACE_JFED, "finished_flag");

    public final static QName Q_JFED_ANSIBLE_GROUP = new QName(NAMESPACE_JFED, "ansible_group");
    public final static QName Q_ATT_ANSIBLE_GROUP_NAME = new QName("name");

    public final static QName Q_JFED_ANSIBLE_SERVICE = new QName(NAMESPACE_JFED, "ansible");
    //public final static QName Q_ATT_INSTALL_IF_MISSING = new QName("install_if_missing");
    public final static QName Q_ATT_INSTALL_REQUIREMENTS = new QName("install_requirements");
    public final static QName Q_ATT_INVENTORY = new QName("inventory");
    public final static QName Q_ATT_EXECUTE_PLAYBOOK = new QName("execute_playbook");
    public final static QName Q_ATT_LOGFILE = new QName("logfile");
    public final static QName Q_ATT_DEBUG = new QName("debug");
    public final static QName Q_ATT_PLAYBOOK_COMMAND = new QName("playbook-command");
    public final static QName Q_ATT_GALAXY_COMMAND = new QName("galaxy-command");

    public final static QName Q_LINK_SHAREDLAN_LINKSHAREDVLAN = new QName(NAMESPACE_SHAREDLAN_EXT, "link_shared_vlan");
    public final static QName Q_LINK_SHAREDLAN_ATT_NAME = new QName("name");

    public final static QName Q_LINK_VLAN_TAGGING = new QName(NAMESPACE_EMULAB_EXT, "vlan_tagging");
    public final static QName Q_LINK_VLAN_TAGGING_ENABLED_ATT_NAME = new QName("enabled");

    public final static QName Q_LINK_LINK_MULTIPLEXING = new QName(NAMESPACE_EMULAB_EXT, "link_multiplexing");
    public final static QName Q_LINK_LINK_MULTIPLEXING_ENABLED_ATT_NAME = new QName("enabled");

    public final static QName Q_LINK_INTERSWITCH = new QName(NAMESPACE_EMULAB_EXT, "interswitch");
    public final static QName Q_LINK_INTERSWITCH_ALLOW = new QName("allow");

    public final static QName Q_LINK_BEST_EFFORT = new QName(NAMESPACE_EMULAB_EXT, "best_effort");
    public final static QName Q_LINK_BEST_EFFORT_ENABLED_ATT_NAME = new QName("enabled");

    public final static QName Q_LINK_LINKATTRIBUTE = new QName(NAMESPACE_EMULAB_EXT, "link_attribute");
    public final static QName Q_LINK_LINKATTRIBUTE_KEY = new QName("key");
    public final static QName Q_LINK_LINKATTRIBUTE_VALUE = new QName("value");
    public final static String Q_LINK_LINKATTRIBUTE_KEY_NO_MAC_LEARNING = "nomac_learning";

    public final static QName Q_NODE_SLIVERTYPE_XEN = new QName(NAMESPACE_EMULAB_EXT, "xen");
    public final static QName Q_ATT_XEN_CORES = new QName("cores");
    public final static QName Q_ATT_XEN_RAM = new QName("ram");
    public final static QName Q_ATT_XEN_DISK = new QName("disk");

    public final static QName Q_NODE_ROUTABLECONTROLIP = new QName(NAMESPACE_EMULAB_EXT, "routable_control_ip");

    public static final QName Q_LEASE = new QName(NAMESPACE_NITOS_BROKER, "lease", PREFIX_NITOS_BROKER);
    public static final QName Q_LEASE_REF = new QName(NAMESPACE_NITOS_BROKER, "lease_ref", PREFIX_NITOS_BROKER);

    public static final QName Q_ATT_ID = new QName("id");
    public static final QName Q_ATT_VALID_FROM = new QName("valid_from");
    public static final QName Q_ATT_VALID_UNTIL = new QName("valid_until");
    public static final QName Q_ATT_ID_REF = new QName("id_ref");

    public static final QName Q_CHANNEL = new QName(NAMESPACE_NITOS_BROKER, "channel", PREFIX_NITOS_BROKER);
    public final static QName Q_ATT_FREQUENCY = new QName("frequency");

    public static final QName Q_GEANT_TESTBED_TYPE = new QName(NAMESPACE_JFED_GTS,"geantTestbedType");
    public static final QName Q_ATT_GTT_NAME = new QName("name");
    public static final QName Q_GTS_DSL = new QName(NAMESPACE_JFED_GTS,"dsl");
    public static final QName Q_GTS_PORT_BINDING = new QName(NAMESPACE_JFED_GTS,"portBinding");
    public static final QName Q_ATT_GTS_PORT = new QName("gtsPortName");
    public static final QName Q_ATT_RSPEC_NODE = new QName(NAMESPACE_JFED_GTS,"node");
    public static final QName Q_ATT_RSPEC_INTERFACE = new QName(NAMESPACE_JFED_GTS,"interface");

    public final static QName Q_STITCHING = new QName(NAMESPACE_STITCHING_EXT, "stitching");
    public final static QName Q_STITCHING_PATH = new QName(NAMESPACE_STITCHING_EXT, "path");
    public final static QName Q_STITCHING_PATH_ID = new QName("id");
    public final static QName Q_STITCHING_HOP = new QName(NAMESPACE_STITCHING_EXT, "hop");
    public final static QName Q_STITCHING_LINK = new QName(NAMESPACE_STITCHING_EXT, "link");
    public final static QName Q_STITCHING_LINK_ID = new QName("id");
    public final static QName Q_STITCHING_DESC = new QName(NAMESPACE_STITCHING_EXT, "switchingCapabilityDescriptor");
    public final static QName Q_STITCHING_DESC_L2 =
            new QName(NAMESPACE_STITCHING_EXT, "switchingCapabilitySpecificInfo_L2sc");
    public final static QName Q_STITCHING_VLAN_AVAILABLE = new QName(NAMESPACE_STITCHING_EXT, "vlanRangeAvailability");
    public final static QName Q_STITCHING_VLAN_SUGGESTED = new QName(NAMESPACE_STITCHING_EXT, "suggestedVLANRange");
    public final static QName Q_STITCHING_VLAN_TRANSLATION = new QName(NAMESPACE_STITCHING_EXT, "vlanTranslation");

    public final static QName Q_NODE_ROUTABLEADRESSES = new QName(NAMESPACE_EMULAB_EXT, "rspec_routable_addresses");
    public final static QName Q_ATT_ROUTABLEADRESSES_AVAILABLE = new QName("available");
    public final static QName Q_ATT_ROUTABLEADRESSES_CONFIGURED = new QName("configured");

    public final static QName Q_ROUTABLE_POOL = new QName(NAMESPACE_EMULAB_EXT, "routable_pool", PREFIX_EMULAB);
    public final static QName Q_ATT_COUNT = new QName("count");
    public final static QName Q_ATT_ROUTABLE_POOL_TYPE= new QName("type");
    public final static QName Q_IPV4 = new QName(NAMESPACE_EMULAB_EXT, "ipv4", PREFIX_EMULAB);
    public final static QName Q_ATT_IPV4_ADDRESS= new QName("address");
    public final static QName Q_ATT_IPV4_NETMASK= new QName("netmask");

    public final static QName Q_COLLOCATE_FACTOR = new QName(NAMESPACE_EMULAB_EXT, "collocate_factor", PREFIX_EMULAB);
    public final static QName Q_ATT_COLLOCATE_FACTOR_COUNT = new QName("count");


    public final static QName Q_NITOS_E_NODE_B = new QName(NAMESPACE_FLEX, "e_node_b");



    public final static String HACK_FIXED_HARDWARETYPE_E_NODE_B = "e_node_b";
}
