EMMA Coverage Report (generated Wed Oct 26 13:47:17 EDT 2011)
[all classes][org.jclouds.compute]

COVERAGE SUMMARY FOR SOURCE FILE [RunScriptOnNodesException.java]

nameclass, %method, %block, %line, %
RunScriptOnNodesException.java0%   (0/1)0%   (0/6)0%   (0/51)0%   (0/12)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class RunScriptOnNodesException0%   (0/1)0%   (0/6)0%   (0/51)0%   (0/12)
RunScriptOnNodesException (Statement, RunScriptOptions, Map, Map, Map): void 0%   (0/1)0%   (0/36)0%   (0/7)
getExecutionErrors (): Map 0%   (0/1)0%   (0/3)0%   (0/1)
getNodeErrors (): Map 0%   (0/1)0%   (0/3)0%   (0/1)
getOptions (): RunScriptOptions 0%   (0/1)0%   (0/3)0%   (0/1)
getRunScript (): Statement 0%   (0/1)0%   (0/3)0%   (0/1)
getSuccessfulNodes (): Map 0%   (0/1)0%   (0/3)0%   (0/1)

1/**
2 * Licensed to jclouds, Inc. (jclouds) under one or more
3 * contributor license agreements.  See the NOTICE file
4 * distributed with this work for additional information
5 * regarding copyright ownership.  jclouds licenses this file
6 * to you under the Apache License, Version 2.0 (the
7 * "License"); you may not use this file except in compliance
8 * with the License.  You may obtain a copy of the License at
9 *
10 *   http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing,
13 * software distributed under the License is distributed on an
14 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 * KIND, either express or implied.  See the License for the
16 * specific language governing permissions and limitations
17 * under the License.
18 */
19package org.jclouds.compute;
20 
21import static org.jclouds.compute.util.ComputeServiceUtils.createExecutionErrorMessage;
22import static org.jclouds.compute.util.ComputeServiceUtils.createNodeErrorMessage;
23 
24import java.util.Map;
25 
26import org.jclouds.javax.annotation.Nullable;
27 
28import org.jclouds.compute.domain.ExecResponse;
29import org.jclouds.compute.domain.NodeMetadata;
30import org.jclouds.compute.options.RunScriptOptions;
31import org.jclouds.scriptbuilder.domain.Statement;
32 
33/**
34 * 
35 * @author Adrian Cole
36 */
37public class RunScriptOnNodesException extends Exception {
38 
39   /** The serialVersionUID */
40   private static final long serialVersionUID = -2272965726680821281L;
41   private final Statement runScript;
42   private final RunScriptOptions options;
43   private final Map<NodeMetadata, ExecResponse> successfulNodes;
44   private final Map<? extends NodeMetadata, ? extends Throwable> failedNodes;
45   private final Map<?, Exception> executionExceptions;
46 
47   public RunScriptOnNodesException(Statement runScript, @Nullable RunScriptOptions options,
48            Map<NodeMetadata, ExecResponse> successfulNodes, Map<?, Exception> executionExceptions,
49            Map<? extends NodeMetadata, ? extends Throwable> failedNodes) {
50      super(String.format("error runScript on filtered nodes options(%s)%n%s%n%s", options,
51               createExecutionErrorMessage(executionExceptions), createNodeErrorMessage(failedNodes)));
52      this.runScript = runScript;
53      this.options = options;
54      this.successfulNodes = successfulNodes;
55      this.failedNodes = failedNodes;
56      this.executionExceptions = executionExceptions;
57   }
58 
59   /**
60    * @return Nodes that performed ssh without error
61    */
62   public Map<NodeMetadata, ExecResponse> getSuccessfulNodes() {
63      return successfulNodes;
64   }
65 
66   /**
67    * 
68    * @return Nodes that performed startup without error, but incurred problems applying options
69    */
70   public Map<?, ? extends Throwable> getExecutionErrors() {
71      return executionExceptions;
72   }
73 
74   /**
75    * 
76    * @return Nodes that performed startup without error, but incurred problems applying options
77    */
78   public Map<? extends NodeMetadata, ? extends Throwable> getNodeErrors() {
79      return failedNodes;
80   }
81 
82   public Statement getRunScript() {
83      return runScript;
84   }
85 
86   public RunScriptOptions getOptions() {
87      return options;
88   }
89 
90}

[all classes][org.jclouds.compute]
EMMA 2.0.5312 (C) Vladimir Roubtsov