Package org.platformlayer.ops.packages

Examples of org.platformlayer.ops.packages.AsBlock


      // We need to download from A and then upload to B, so d(A, Me) + d(Me, B)
      // TODO: This is a poor metric. Our metric isn't really rich enough here
      return 8;
    }

    AsBlock asA = AsBlock.find(a.getAddress());
    AsBlock asB = AsBlock.find(b.getAddress());

    if (asA != null && asB != null) {
      if (asA.equals(asB)) {
        return 1;
      }

      if (Objects.equal(asA.getCountry(), asB.getCountry())) {
        return 2;
      }
    }

    return 4;
View Full Code Here


      log.warn("No (internal) resolvers found; will set up default public nameservers; reconfigure needed if this changes");

      if (usePrivateResolvers) {
        OpsTarget target = OpsContext.get().getInstance(OpsTarget.class);

        AsBlock as = AsBlock.find(target);

        if (as != null) {
          // We had problems with the SL resolvers...
          /*
           * if (Objects.equal(AsBlock.SOFTLAYER, as)) { log.warn("Adding private Softlayer resolvers");
View Full Code Here

    addChild(new LateBound<ManagedFilesystemItem>() {
      @Override
      protected ManagedFilesystemItem get() throws OpsException {
        OpsTarget target = OpsContext.get().getInstance(OpsTarget.class);

        AsBlock asBlock = AsBlock.find(target);
        if (asBlock != AsBlock.GOOGLE_COMPUTE_ENGINE) {
          return TemplatedFile.build(Injection.getInstance(DnsResolverModuleBuilder.class),
              new File("/etc/resolv.conf")).setFileMode("644");
        } else {
          return null;
View Full Code Here

TOP

Related Classes of org.platformlayer.ops.packages.AsBlock

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.