test_class.declarator: nvpApi = mock(NiciraNvpApi.class)
test_class.original_string: NiciraNvpApi nvpApi = mock(NiciraNvpApi.class);
test_class.type: NiciraNvpApi
test_class.var_name: nvpApi
test_class.declarator: resource
test_class.original_string: NiciraNvpResource resource;
test_class.type: NiciraNvpResource
test_class.var_name: resource
test_class.declarator: parameters
test_class.original_string: Map<String, Object> parameters;
test_class.type: Map<String, Object>
test_class.var_name: parameters
test_class.declarator: retryUtility
test_class.modifier: private
test_class.original_string: private CommandRetryUtility retryUtility;
test_class.type: CommandRetryUtility
test_class.var_name: retryUtility
test_class.file: plugins/network-elements/nicira-nvp/src/test/java/com/cloud/network/resource/NiciraNvpResourceTest.java
test_class.identifier: NiciraNvpResourceTest
test_case.body: @Test(expected = ConfigurationException.class)
      public void resourceConfigureFailure() throws ConfigurationException {
          resource.configure("NiciraNvpResource", Collections.<String, Object> emptyMap());
      }
test_case.class_method_signature: NiciraNvpResourceTest.resourceConfigureFailure()
test_case.full_signature: @Test(expected = ConfigurationException.class) public void resourceConfigureFailure()
test_case.identifier: resourceConfigureFailure
test_case.invocations: configure emptyMap
test_case.modifiers: @Test(expected = ConfigurationException.class) public
test_case.parameters: ()
test_case.return: void
test_case.signature: void resourceConfigureFailure()
focal_class.declarator: s_logger = LoggerFactory.getLogger(NiciraNvpResource.class)
focal_class.modifier: private static final
focal_class.original_string: private static final Logger s_logger = LoggerFactory.getLogger(NiciraNvpResource.class);
focal_class.type: Logger
focal_class.var_name: s_logger
focal_class.declarator: NAME_MAX_LEN = 40
focal_class.modifier: public static final
focal_class.original_string: public static final int NAME_MAX_LEN = 40;
focal_class.type: int
focal_class.var_name: NAME_MAX_LEN
focal_class.declarator: NUM_RETRIES = 2
focal_class.modifier: public static final
focal_class.original_string: public static final int NUM_RETRIES = 2;
focal_class.type: int
focal_class.var_name: NUM_RETRIES
focal_class.declarator: MAX_REDIRECTS = 5
focal_class.modifier: private static final
focal_class.original_string: private static final int MAX_REDIRECTS = 5;
focal_class.type: int
focal_class.var_name: MAX_REDIRECTS
focal_class.declarator: name
focal_class.modifier: private
focal_class.original_string: private String name;
focal_class.type: String
focal_class.var_name: name
focal_class.declarator: guid
focal_class.modifier: private
focal_class.original_string: private String guid;
focal_class.type: String
focal_class.var_name: guid
focal_class.declarator: zoneId
focal_class.modifier: private
focal_class.original_string: private String zoneId;
focal_class.type: String
focal_class.var_name: zoneId
focal_class.declarator: niciraNvpApi
focal_class.modifier: private
focal_class.original_string: private NiciraNvpApi niciraNvpApi;
focal_class.type: NiciraNvpApi
focal_class.var_name: niciraNvpApi
focal_class.declarator: niciraNvpUtilities
focal_class.modifier: private
focal_class.original_string: private NiciraNvpUtilities niciraNvpUtilities;
focal_class.type: NiciraNvpUtilities
focal_class.var_name: niciraNvpUtilities
focal_class.declarator: retryUtility
focal_class.modifier: private
focal_class.original_string: private CommandRetryUtility retryUtility;
focal_class.type: CommandRetryUtility
focal_class.var_name: retryUtility
focal_class.file: plugins/network-elements/nicira-nvp/src/main/java/com/cloud/network/resource/NiciraNvpResource.java
focal_class.identifier: NiciraNvpResource
focal_class.interfaces: implements ServerResource
focal_class.class_method_signature: NiciraNvpResource.createNiciraNvpApi(final String host, final String username, final String password)
focal_class.full_signature: protected NiciraNvpApi createNiciraNvpApi(final String host, final String username, final String password)
focal_class.identifier: createNiciraNvpApi
focal_class.modifiers: protected
focal_class.parameters: (final String host, final String username, final String password)
focal_class.return: NiciraNvpApi
focal_class.signature: NiciraNvpApi createNiciraNvpApi(final String host, final String username, final String password)
focal_class.class_method_signature: NiciraNvpResource.configure(final String ignoredName, final Map<String, Object> params)
focal_class.full_signature: @Override public boolean configure(final String ignoredName, final Map<String, Object> params)
focal_class.identifier: configure
focal_class.modifiers: @Override public
focal_class.parameters: (final String ignoredName, final Map<String, Object> params)
focal_class.return: boolean
focal_class.signature: boolean configure(final String ignoredName, final Map<String, Object> params)
focal_class.class_method_signature: NiciraNvpResource.getNiciraNvpApi()
focal_class.full_signature: public NiciraNvpApi getNiciraNvpApi()
focal_class.identifier: getNiciraNvpApi
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: NiciraNvpApi
focal_class.signature: NiciraNvpApi getNiciraNvpApi()
focal_class.class_method_signature: NiciraNvpResource.getNiciraNvpUtilities()
focal_class.full_signature: public NiciraNvpUtilities getNiciraNvpUtilities()
focal_class.identifier: getNiciraNvpUtilities
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: NiciraNvpUtilities
focal_class.signature: NiciraNvpUtilities getNiciraNvpUtilities()
focal_class.class_method_signature: NiciraNvpResource.getRetryUtility()
focal_class.full_signature: public CommandRetryUtility getRetryUtility()
focal_class.identifier: getRetryUtility
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: CommandRetryUtility
focal_class.signature: CommandRetryUtility getRetryUtility()
focal_class.class_method_signature: NiciraNvpResource.start()
focal_class.full_signature: @Override public boolean start()
focal_class.identifier: start
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean start()
focal_class.class_method_signature: NiciraNvpResource.stop()
focal_class.full_signature: @Override public boolean stop()
focal_class.identifier: stop
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean stop()
focal_class.class_method_signature: NiciraNvpResource.getName()
focal_class.full_signature: @Override public String getName()
focal_class.identifier: getName
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getName()
focal_class.class_method_signature: NiciraNvpResource.getType()
focal_class.full_signature: @Override public Type getType()
focal_class.identifier: getType
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: Type
focal_class.signature: Type getType()
focal_class.class_method_signature: NiciraNvpResource.initialize()
focal_class.full_signature: @Override public StartupCommand[] initialize()
focal_class.identifier: initialize
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: StartupCommand[]
focal_class.signature: StartupCommand[] initialize()
focal_class.class_method_signature: NiciraNvpResource.getCurrentStatus(final long id)
focal_class.full_signature: @Override public PingCommand getCurrentStatus(final long id)
focal_class.identifier: getCurrentStatus
focal_class.modifiers: @Override public
focal_class.parameters: (final long id)
focal_class.return: PingCommand
focal_class.signature: PingCommand getCurrentStatus(final long id)
focal_class.class_method_signature: NiciraNvpResource.getApiProviderMajorityVersion(ControlClusterStatus ccs)
focal_class.full_signature: private void getApiProviderMajorityVersion(ControlClusterStatus ccs)
focal_class.identifier: getApiProviderMajorityVersion
focal_class.modifiers: private
focal_class.parameters: (ControlClusterStatus ccs)
focal_class.return: void
focal_class.signature: void getApiProviderMajorityVersion(ControlClusterStatus ccs)
focal_class.class_method_signature: NiciraNvpResource.searchApiProvider(ClusterRoleConfig[] configuredRoles)
focal_class.full_signature: private String searchApiProvider(ClusterRoleConfig[] configuredRoles)
focal_class.identifier: searchApiProvider
focal_class.modifiers: private
focal_class.parameters: (ClusterRoleConfig[] configuredRoles)
focal_class.return: String
focal_class.signature: String searchApiProvider(ClusterRoleConfig[] configuredRoles)
focal_class.class_method_signature: NiciraNvpResource.executeRequest(final Command cmd)
focal_class.full_signature: @Override public Answer executeRequest(final Command cmd)
focal_class.identifier: executeRequest
focal_class.modifiers: @Override public
focal_class.parameters: (final Command cmd)
focal_class.return: Answer
focal_class.signature: Answer executeRequest(final Command cmd)
focal_class.class_method_signature: NiciraNvpResource.disconnected()
focal_class.full_signature: @Override public void disconnected()
focal_class.identifier: disconnected
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void disconnected()
focal_class.class_method_signature: NiciraNvpResource.getAgentControl()
focal_class.full_signature: @Override public IAgentControl getAgentControl()
focal_class.identifier: getAgentControl
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: IAgentControl
focal_class.signature: IAgentControl getAgentControl()
focal_class.class_method_signature: NiciraNvpResource.setAgentControl(final IAgentControl agentControl)
focal_class.full_signature: @Override public void setAgentControl(final IAgentControl agentControl)
focal_class.identifier: setAgentControl
focal_class.modifiers: @Override public
focal_class.parameters: (final IAgentControl agentControl)
focal_class.return: void
focal_class.signature: void setAgentControl(final IAgentControl agentControl)
focal_class.class_method_signature: NiciraNvpResource.natRuleToString(final NatRule rule)
focal_class.full_signature: public String natRuleToString(final NatRule rule)
focal_class.identifier: natRuleToString
focal_class.modifiers: public
focal_class.parameters: (final NatRule rule)
focal_class.return: String
focal_class.signature: String natRuleToString(final NatRule rule)
focal_class.class_method_signature: NiciraNvpResource.truncate(final String string, final int length)
focal_class.full_signature: public String truncate(final String string, final int length)
focal_class.identifier: truncate
focal_class.modifiers: public
focal_class.parameters: (final String string, final int length)
focal_class.return: String
focal_class.signature: String truncate(final String string, final int length)
focal_class.class_method_signature: NiciraNvpResource.generateStaticNatRulePair(final String insideIp, final String outsideIp)
focal_class.full_signature: public NatRule[] generateStaticNatRulePair(final String insideIp, final String outsideIp)
focal_class.identifier: generateStaticNatRulePair
focal_class.modifiers: public
focal_class.parameters: (final String insideIp, final String outsideIp)
focal_class.return: NatRule[]
focal_class.signature: NatRule[] generateStaticNatRulePair(final String insideIp, final String outsideIp)
focal_class.class_method_signature: NiciraNvpResource.generatePortForwardingRulePair(final String insideIp, final int[] insidePorts, final String outsideIp, final int[] outsidePorts,
                      final String protocol)
focal_class.full_signature: public NatRule[] generatePortForwardingRulePair(final String insideIp, final int[] insidePorts, final String outsideIp, final int[] outsidePorts,
                      final String protocol)
focal_class.identifier: generatePortForwardingRulePair
focal_class.modifiers: public
focal_class.parameters: (final String insideIp, final int[] insidePorts, final String outsideIp, final int[] outsidePorts,
                      final String protocol)
focal_class.return: NatRule[]
focal_class.signature: NatRule[] generatePortForwardingRulePair(final String insideIp, final int[] insidePorts, final String outsideIp, final int[] outsidePorts,
                      final String protocol)
focal_class.class_method_signature: NiciraNvpResource.setName(final String name)
focal_class.full_signature: @Override public void setName(final String name)
focal_class.identifier: setName
focal_class.modifiers: @Override public
focal_class.parameters: (final String name)
focal_class.return: void
focal_class.signature: void setName(final String name)
focal_class.class_method_signature: NiciraNvpResource.setConfigParams(final Map<String, Object> params)
focal_class.full_signature: @Override public void setConfigParams(final Map<String, Object> params)
focal_class.identifier: setConfigParams
focal_class.modifiers: @Override public
focal_class.parameters: (final Map<String, Object> params)
focal_class.return: void
focal_class.signature: void setConfigParams(final Map<String, Object> params)
focal_class.class_method_signature: NiciraNvpResource.getConfigParams()
focal_class.full_signature: @Override public Map<String, Object> getConfigParams()
focal_class.identifier: getConfigParams
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: Map<String, Object>
focal_class.signature: Map<String, Object> getConfigParams()
focal_class.class_method_signature: NiciraNvpResource.getRunLevel()
focal_class.full_signature: @Override public int getRunLevel()
focal_class.identifier: getRunLevel
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int getRunLevel()
focal_class.class_method_signature: NiciraNvpResource.setRunLevel(final int level)
focal_class.full_signature: @Override public void setRunLevel(final int level)
focal_class.identifier: setRunLevel
focal_class.modifiers: @Override public
focal_class.parameters: (final int level)
focal_class.return: void
focal_class.signature: void setRunLevel(final int level)
focal_method.body: @Override
      public boolean configure(final String ignoredName, final Map<String, Object> params) throws ConfigurationException {
  
          name = (String) params.get("name");
          if (name == null) {
              throw new ConfigurationException("Unable to find name");
          }
  
          guid = (String) params.get("guid");
          if (guid == null) {
              throw new ConfigurationException("Unable to find the guid");
          }
  
          zoneId = (String) params.get("zoneId");
          if (zoneId == null) {
              throw new ConfigurationException("Unable to find zone");
          }
  
          final String ip = (String) params.get("ip");
          if (ip == null) {
              throw new ConfigurationException("Unable to find IP");
          }
  
          final String adminuser = (String) params.get("adminuser");
          if (adminuser == null) {
              throw new ConfigurationException("Unable to find admin username");
          }
  
          final String adminpass = (String) params.get("adminpass");
          if (adminpass == null) {
              throw new ConfigurationException("Unable to find admin password");
          }
  
          niciraNvpUtilities = NiciraNvpUtilities.getInstance();
          retryUtility = CommandRetryUtility.getInstance();
          retryUtility.setServerResource(this);
  
          try {
              niciraNvpApi = createNiciraNvpApi(ip, adminuser, adminpass);
          } catch (final CloudstackRESTException e) {
              throw new ConfigurationException("Could not create a Nicira Nvp API client: " + e.getMessage());
          }
  
          return true;
      }
focal_method.class_method_signature: NiciraNvpResource.configure(final String ignoredName, final Map<String, Object> params)
focal_method.full_signature: @Override public boolean configure(final String ignoredName, final Map<String, Object> params)
focal_method.identifier: configure
focal_method.invocations: get get get get get get getInstance getInstance setServerResource createNiciraNvpApi getMessage
focal_method.modifiers: @Override public
focal_method.parameters: (final String ignoredName, final Map<String, Object> params)
focal_method.return: boolean
focal_method.signature: boolean configure(final String ignoredName, final Map<String, Object> params)