Tabnine Logo
ComponentInstance.asExternal
Code IndexAdd Tabnine to your IDE (free)

How to use
asExternal
method
in
org.cloudml.core.ComponentInstance

Best Java code snippets using org.cloudml.core.ComponentInstance.asExternal (Showing top 11 results out of 315)

origin: SINTEF-9012/cloudml

public ExternalComponentInstanceGroup onlyExternals() {
  final ExternalComponentInstanceGroup externalInstances = new ExternalComponentInstanceGroup();
  for (final T instance: this) {
    if (instance.isExternal()) {
      externalInstances.add(instance.asExternal());
    }
  }
  return externalInstances;
}

origin: SINTEF-9012/cloudml

  public String toString(){
    String result="   Component instances:\n";
    for(ComponentInstance c: components){
      if(c.isExternal()){
        if(c.asExternal().isVM()){
          result+="   VM-> "+c.asExternal().asVM().getId()+"::"+c.getName()+"\n";
        }else{
          result+="   External component-> "+c.getQualifiedName()+"\n";
        }
      }else{
        result+="   Instance component-> "+c.getQualifiedName()+"\n";
      }
    }
    return result;
  }
}
origin: SINTEF-9012/cloudml

/**
 * Extract the tag that can be identified on the given component instance.
 *
 * @param componentInstance the component whose tags are needed
 * @param tagged the already initialised maps of tags, to be filled in
 */
private void extractTags(ComponentInstance componentInstance, Map<String, List<String>> tagged) {
  assert componentInstance != null: "Unable to extract tags from 'null'";
  assert !tagged.isEmpty(): "The map of tag must have been initialized";
  if (componentInstance.isExternal()) {
    tagged.get(EXTERNAL.getLabel()).add(componentInstance.getName());
    if (componentInstance.asExternal().isVM()) {
      tagged.get(VM.getLabel()).add(componentInstance.getName());
    }
  }
  if (componentInstance.isInternal()) {
    tagged.get(INTERNAL.getLabel()).add(componentInstance.getName());
  }
  if (isService(componentInstance)) {
    tagged.get(SERVICE.getLabel()).add(componentInstance.getName());
  } else {
    tagged.get(NOT_SERVICE.getLabel()).add(componentInstance.getName());
  }
}
origin: SINTEF-9012/cloudml

public VMInstanceGroup onlyVMs() {
  final VMInstanceGroup selection = new VMInstanceGroup();
  for (final T instance: this) {
    if (instance.isExternal()) {
      final ExternalComponentInstance<? extends ExternalComponent> external = instance.asExternal();
      if (external.isVM()) {
        selection.add(external.asVM());
      }
    }
  }
  return selection;
}

origin: SINTEF-9012/cloudml

/**
 * @return the external component at the bottom of the underlying software
 * stack. For instance, if an application, is running on the top of a war
 * container, itself running on linux virtual machine, externalHost will
 * return the linux VM.
 */
public ExternalComponentInstance<? extends ExternalComponent> externalHost() {
  final ComponentInstance<? extends Component> directHost = getHost();
  if(directHost != null){
    if (directHost.isInternal()) {
      return directHost.asInternal().externalHost();
    }
    return directHost.asExternal();
  }else{
    return null;
  }
}
origin: SINTEF-9012/cloudml

for(Property p : c.getProperties()){
  if(p.getName().startsWith("env:")){
    if(c.getHost().asExternal().isVM()){
      prepareSetEnv(d,c,p);
origin: SINTEF-9012/cloudml

    .getComponentInstances()
    .firstNamed(sub)
    .asExternal();
ExternalComponent subEc = subEci.getType().asExternal();
String subEndPoint = subEc.getEndPoint();
origin: SINTEF-9012/cloudml

/**
 * For each component, execute the puppet manifest associated
 * @param components
 */
private void configureWithPuppet(ComponentInstanceGroup<InternalComponentInstance> components){
  unlessNotNull("Cannot configure null!", components);
  Connector jc;
  for (InternalComponentInstance ic : components) {
    if(ic.externalHost().isVM()){
      for(Resource r: ic.getType().getResources()){
        if(r instanceof PuppetResource){
          PuppetResource pr=(PuppetResource)r;
          if(!pr.getConfigurationFile().isEmpty()){
            journal.log(Level.INFO, ">> Using Puppet to configure the following component: "+ic.getName());
            VMInstance n= ic.getHost().asExternal().asVM();
            Provider p = n.getType().getProvider();
            managePuppet(pr,n, pr.getName(),pr.getConfigurationFile());
          }
        }
      }
    }
  }
}
origin: SINTEF-9012/cloudml

ci=lib.provision(targetModel,v).asExternal().asVM();
origin: SINTEF-9012/cloudml

  currentModel.getComponents().add(v);
ci=lib.provision(currentModel,v).asExternal().asVM();
return v;
origin: SINTEF-9012/cloudml

  target.getComponents().add(v);
VMInstance ci=lib.provision(target,v).asExternal().asVM();
return ci;
org.cloudml.coreComponentInstanceasExternal

Popular methods of ComponentInstance

  • getName
  • getType
  • isExternal
  • asInternal
  • getProvidedExecutionPlatforms
  • getProvidedPorts
  • isInternal
  • canHost
  • getQualifiedName
  • hostedComponents
  • accept
  • canBeUninstalled
  • accept,
  • canBeUninstalled,
  • clientComponents,
  • equals,
  • getDeployment,
  • getOwner,
  • instantiateAllExecutionPlatforms,
  • instantiateAllProvidedPorts,
  • isHosting

Popular in Java

  • Reactive rest calls using spring rest template
  • requestLocationUpdates (LocationManager)
  • getSupportFragmentManager (FragmentActivity)
  • getApplicationContext (Context)
  • FileInputStream (java.io)
    An input stream that reads bytes from a file. File file = ...finally if (in != null) in.clos
  • URLConnection (java.net)
    A connection to a URL for reading or writing. For HTTP connections, see HttpURLConnection for docume
  • Timestamp (java.sql)
    A Java representation of the SQL TIMESTAMP type. It provides the capability of representing the SQL
  • JButton (javax.swing)
  • Logger (org.apache.log4j)
    This is the central class in the log4j package. Most logging operations, except configuration, are d
  • LoggerFactory (org.slf4j)
    The LoggerFactory is a utility class producing Loggers for various logging APIs, most notably for lo
  • From CI to AI: The AI layer in your organization
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now