Codota Logo
WorkItemBuilder.getWorkItemRunAnalysis
Code IndexAdd Codota to your IDE (free)

How to use
getWorkItemRunAnalysis
method
in
org.batfish.common.util.WorkItemBuilder

Best Java code snippets using org.batfish.common.util.WorkItemBuilder.getWorkItemRunAnalysis (Showing top 4 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
FileOutputStream f =
  • Codota IconFile file;new FileOutputStream(file)
  • Codota IconString name;new FileOutputStream(name)
  • Codota IconFile file;new FileOutputStream(file, true)
  • Smart code suggestions by Codota
}
origin: batfish/batfish

List<WorkItem> getAutoWorkQueue(String networkName, String testrigName) {
 List<WorkItem> autoWorkQueue = new LinkedList<>();
 WorkItem parseWork = WorkItemBuilder.getWorkItemParse(networkName, testrigName);
 autoWorkQueue.add(parseWork);
 Set<String> analysisNames = listAnalyses(networkName, AnalysisType.ALL);
 for (String analysis : analysisNames) {
  WorkItem analyzeWork =
    WorkItemBuilder.getWorkItemRunAnalysis(
      analysis, networkName, testrigName, null, false, false);
  autoWorkQueue.add(analyzeWork);
 }
 return autoWorkQueue;
}
origin: batfish/batfish

private boolean runAnalysis(
  @Nullable FileWriter outWriter,
  List<String> options,
  List<String> parameters,
  boolean delta,
  boolean differential) {
 Command command =
   differential
     ? Command.RUN_ANALYSIS_DIFFERENTIAL
     : delta ? Command.RUN_ANALYSIS_REFERENCE : Command.RUN_ANALYSIS;
 if (!isValidArgument(options, parameters, 0, 1, 1, command)) {
  return false;
 }
 if (!isSetContainer(true) || !isSetTestrig()) {
  return false;
 }
 String analysisName = parameters.get(0);
 // answer the question
 WorkItem wItemAs =
   WorkItemBuilder.getWorkItemRunAnalysis(
     analysisName, _currContainerName, _currTestrig, _currDeltaTestrig, delta, differential);
 return execute(wItemAs, outWriter);
}
origin: batfish/batfish

@Test
public void testGetAutoWorkQueueUserAnalysis() {
 String containerName = "myContainer";
 String testrigName = "myTestrig";
 _manager.initNetwork(containerName, null);
 // user policy
 _manager.configureAnalysis(
   containerName, true, "useranalysis", Maps.newHashMap(), Lists.newArrayList(), false);
 WorkItem parseWorkItem = WorkItemBuilder.getWorkItemParse(containerName, testrigName);
 WorkItem analysisWorkItem =
   WorkItemBuilder.getWorkItemRunAnalysis(
     "useranalysis", containerName, testrigName, null, false, false);
 List<WorkItem> workQueue = _manager.getAutoWorkQueue(containerName, testrigName);
 assertThat(workQueue, hasSize(2));
 // checking that the first work item is for parse
 assertThat(workQueue.get(0).matches(parseWorkItem), equalTo(true));
 // checking run analysis workitem
 assertThat(
   "Work Queue not correct for user analyses",
   workQueue.get(1).matches(analysisWorkItem),
   equalTo(true));
}
origin: batfish/batfish

@Test
public void testGetAutoWorkQueueSuggestedAnalysis() {
 String containerName = "myContainer";
 String testrigName = "myTestrig";
 _manager.initNetwork(containerName, null);
 // user policy
 _manager.configureAnalysis(
   containerName, true, "suggestedanalysis", Maps.newHashMap(), Lists.newArrayList(), true);
 WorkItem parseWorkItem = WorkItemBuilder.getWorkItemParse(containerName, testrigName);
 WorkItem analysisWorkItem =
   WorkItemBuilder.getWorkItemRunAnalysis(
     "suggestedanalysis", containerName, testrigName, null, false, false);
 List<WorkItem> workQueue = _manager.getAutoWorkQueue(containerName, testrigName);
 assertThat(workQueue, hasSize(2));
 // checking that the first work item is for parse
 assertThat(workQueue.get(0).matches(parseWorkItem), equalTo(true));
 // checking run analysis workitem
 assertThat(
   "Work Queue not correct for suggested analyses",
   workQueue.get(1).matches(analysisWorkItem),
   equalTo(true));
}
org.batfish.common.utilWorkItemBuildergetWorkItemRunAnalysis

Popular methods of WorkItemBuilder

  • getWorkItemParse
  • getWorkItemAnswerQuestion
  • getWorkItemGenerateDataPlane
  • getAnalysisName
  • getQuestionName
  • getWorkItemGenerateDeltaDataPlane
  • isAnalyzingWorkItem
  • isAnsweringWorkItem
  • isDataplaningWorkItem
  • isDifferential
  • isParsingWorkItem
  • isParsingWorkItem

Popular in Java

  • Start an intent from android
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • onCreateOptionsMenu (Activity)
  • setScale (BigDecimal)
    Returns a BigDecimal whose scale is the specified value, and whose value is numerically equal to thi
  • InputStreamReader (java.io)
    An InputStreamReader is a bridge from byte streams to character streams: It reads bytes and decodes
  • PrintStream (java.io)
    A PrintStream adds functionality to another output stream, namely the ability to print representatio
  • SortedSet (java.util)
    A Set that further provides a total ordering on its elements. The elements are ordered using their C
  • Vector (java.util)
    The Vector class implements a growable array of objects. Like an array, it contains components that
  • JLabel (javax.swing)
  • Location (org.springframework.beans.factory.parsing)
    Class that models an arbitrary location in a Resource.Typically used to track the location of proble
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now