Package org.platformlayer.ops.networks

Examples of org.platformlayer.ops.networks.InterfaceModel


    Map<String, Object> model = Maps.newHashMap();
    model.put("hostname", getHostname());

    model.put("name", lxcId);

    InterfaceModel eth0 = InterfaceModel.build("eth0");
    AddressModel ipv4 = address4.get();
    eth0.addAddress(ipv4);

    AddressModel ipv6 = address6.get();
    eth0.addAddress(ipv6);

    List<InterfaceModel> interfaces = Lists.newArrayList();
    interfaces.add(eth0);

    model.put("interfaces", interfaces);
View Full Code Here


      iso.isoFile = getConfigIsoPath();
      iso.buildDir = new File(getInstanceDir(), "config_iso_src");
      iso.model = new TemplateDataSource() {
        @Override
        public void buildTemplateModel(Map<String, Object> model) throws OpsException {
          InterfaceModel eth0 = InterfaceModel.build("eth0");
          AddressModel ipv4 = address4.get();
          eth0.addAddress(ipv4);

          AddressModel ipv6 = address6.get();
          eth0.addAddress(ipv6);

          List<InterfaceModel> interfaces = Lists.newArrayList();
          interfaces.add(eth0);

          model.put("interfaces", interfaces);
View Full Code Here

TOP

Related Classes of org.platformlayer.ops.networks.InterfaceModel

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.