Package org.platformlayer.service.aptcache.model

Examples of org.platformlayer.service.aptcache.model.AptCacheService


  @Test
  public void testCreateAndDeleteItem() throws Exception {
    String id = random.randomAlphanumericString(8);

    AptCacheService aptCache = new AptCacheService();
    aptCache.dnsName = id + ".test.platformlayer.org";

    aptCache = putItem(id, aptCache);
    aptCache = waitForHealthy(aptCache);
View Full Code Here


  public void doOperation() {
  }

  @Override
  protected void addChildren() throws OpsException {
    AptCacheService model = OpsContext.get().getInstance(AptCacheService.class);

    // TODO: Create endpoint with default port; maybe default to closed?
    // model.dnsName

    InstanceBuilder instance = InstanceBuilder.build(model.dnsName, this, model.getTags());
    instance.hostPolicy.allowRunInContainer = true;
    addChild(instance);

    instance.addChild(PackageDependency.build("squid3"));

    instance.addChild(SimpleFile.build(getClass(), new File("/etc/squid3/squid.conf")));

    instance.addChild(ManagedService.build("squid3"));

    // instance.addChild(CollectdCollector.build());

    {
      PublicEndpoint endpoint = injected(PublicEndpoint.class);
      endpoint.publicPort = PORT;
      endpoint.backendPort = PORT;
      endpoint.dnsName = model.dnsName;

      endpoint.tagItem = model.getKey();
      endpoint.parentItem = model.getKey();

      instance.addChild(endpoint);
    }
  }
View Full Code Here

    }
  }

  @Override
  public String getUrl(Object modelObject, NetworkPoint forNetworkPoint, URI uri) throws OpsException {
    AptCacheService model = (AptCacheService) modelObject;

    if (model.getState() != ManagedItemState.ACTIVE) {
      log.info("Cache not active; returning null URL");
      return null;
    }

    // {
View Full Code Here

TOP

Related Classes of org.platformlayer.service.aptcache.model.AptCacheService

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.