test_class.declarator: log = LoggerFactory.getLogger(getClass())
test_class.modifier: private final
test_class.original_string: private final Logger log = LoggerFactory.getLogger(getClass());
test_class.type: Logger
test_class.var_name: log
test_class.declarator: plugin
test_class.original_string: PlatformHADRCrawlerPlugin plugin;
test_class.type: PlatformHADRCrawlerPlugin
test_class.var_name: plugin
test_class.file: crawler/src/test/java/com/oneops/crawler/plugins/hadr/PlatformHADRCrawlerPluginTest.java
test_class.identifier: PlatformHADRCrawlerPluginTest
test_case.body: @Test(enabled = true)
    public void testSetCloudCategories(){
      plugin = new PlatformHADRCrawlerPlugin();
      PlatformHADRRecord inputPlatformHADRRecord=new PlatformHADRRecord();
      Map<String, Cloud> clouds=new HashMap<String, Cloud>();
      
      Cloud activeCloud = new Cloud();
      activeCloud.setId("dc1-TestCloud1");
      activeCloud.setPriority(1);//primaryCloud
      activeCloud.setAdminstatus("active"); // activeCloud
      activeCloud.setDeploymentorder(1);
      activeCloud.setScalepercentage(100);;
     
      Cloud offlineCloud = new Cloud();
      offlineCloud.setId("dc2-TestCloud1");
      offlineCloud.setPriority(2);//secondaryCloud
      offlineCloud.setAdminstatus("offline"); // oflineCloud
      offlineCloud.setDeploymentorder(1);
      offlineCloud.setScalepercentage(100);;
     
      List<String> activeClouds = new ArrayList<String>();
      List<String> offlineClouds = new ArrayList<String>();
      List<String> primaryClouds = new ArrayList<String>();
      List<String> secondaryClouds = new ArrayList<String>();
      
      activeClouds.add("dc1-TestCloud1");
      primaryClouds.add("dc1-TestCloud1");
      clouds.put("dc1-TestCloud1", activeCloud);
      offlineClouds.add("dc2-TestCloud1");
      secondaryClouds.add("dc2-TestCloud1");
      clouds.put("dc2-TestCloud1", offlineCloud);
      
      PlatformHADRRecord expectedPlatformHADRRecord=new PlatformHADRRecord();
     
      expectedPlatformHADRRecord.setActiveClouds(activeClouds);
      expectedPlatformHADRRecord.setOfflineClouds(offlineClouds);
      expectedPlatformHADRRecord.setPrimaryClouds(primaryClouds);
      expectedPlatformHADRRecord.setSecondaryClouds(secondaryClouds);
      
      PlatformHADRRecord actualPlatformHADRRecord=plugin.setCloudCategories(inputPlatformHADRRecord, clouds);
     
      assertEquals(expectedPlatformHADRRecord.getActiveClouds(), actualPlatformHADRRecord.getActiveClouds());
      assertEquals(expectedPlatformHADRRecord.getSecondaryClouds(), actualPlatformHADRRecord.getSecondaryClouds());
      assertEquals(expectedPlatformHADRRecord.getOfflineClouds(), actualPlatformHADRRecord.getOfflineClouds());
      assertEquals(expectedPlatformHADRRecord.getPrimaryClouds(), actualPlatformHADRRecord.getPrimaryClouds());
      
      
    }
test_case.class_method_signature: PlatformHADRCrawlerPluginTest.testSetCloudCategories()
test_case.full_signature: @Test(enabled = true) public void testSetCloudCategories()
test_case.identifier: testSetCloudCategories
test_case.invocations: setId setPriority setAdminstatus setDeploymentorder setScalepercentage setId setPriority setAdminstatus setDeploymentorder setScalepercentage add add put add add put setActiveClouds setOfflineClouds setPrimaryClouds setSecondaryClouds setCloudCategories assertEquals getActiveClouds getActiveClouds assertEquals getSecondaryClouds getSecondaryClouds assertEquals getOfflineClouds getOfflineClouds assertEquals getPrimaryClouds getPrimaryClouds
test_case.modifiers: @Test(enabled = true) public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testSetCloudCategories()
focal_class.declarator: log = LoggerFactory.getLogger(getClass())
focal_class.modifier: private final
focal_class.original_string: private final Logger log = LoggerFactory.getLogger(getClass());
focal_class.type: Logger
focal_class.var_name: log
focal_class.declarator: isHadrPluginEnabled
focal_class.modifier: private
focal_class.original_string: private boolean isHadrPluginEnabled;
focal_class.type: boolean
focal_class.var_name: isHadrPluginEnabled
focal_class.declarator: isHadrEsEnabled
focal_class.modifier: private
focal_class.original_string: private boolean isHadrEsEnabled;
focal_class.type: boolean
focal_class.var_name: isHadrEsEnabled
focal_class.declarator: prodDataCentersList
focal_class.modifier: private
focal_class.original_string: private String prodDataCentersList;
focal_class.type: String
focal_class.var_name: prodDataCentersList
focal_class.declarator: dataCentersArr
focal_class.modifier: private
focal_class.original_string: private String[] dataCentersArr;
focal_class.type: String[]
focal_class.var_name: dataCentersArr
focal_class.declarator: oo_baseUrl
focal_class.modifier: private
focal_class.original_string: private String oo_baseUrl;
focal_class.type: String
focal_class.var_name: oo_baseUrl
focal_class.declarator: hadrElasticSearchIndexName = "hadr"
focal_class.modifier: final
focal_class.original_string: final String hadrElasticSearchIndexName = "hadr";
focal_class.type: String
focal_class.var_name: hadrElasticSearchIndexName
focal_class.declarator: hadrElasticSearchIndexMappings = "hadrIndexMappings.json"
focal_class.modifier: final
focal_class.original_string: final String hadrElasticSearchIndexMappings = "hadrIndexMappings.json";
focal_class.type: String
focal_class.var_name: hadrElasticSearchIndexMappings
focal_class.declarator: searchDal
focal_class.modifier: private
focal_class.original_string: private SearchDal searchDal;
focal_class.type: SearchDal
focal_class.var_name: searchDal
focal_class.declarator: environmentProdProfileFilter
focal_class.modifier: private
focal_class.original_string: private String environmentProdProfileFilter;
focal_class.type: String
focal_class.var_name: environmentProdProfileFilter
focal_class.declarator: produtionCloudsArr
focal_class.modifier: private
focal_class.original_string: private String[] produtionCloudsArr;
focal_class.type: String[]
focal_class.var_name: produtionCloudsArr
focal_class.declarator: prodCloudsListRegex
focal_class.modifier: private
focal_class.original_string: private String prodCloudsListRegex;
focal_class.type: String
focal_class.var_name: prodCloudsListRegex
focal_class.declarator: isHALabel="isHA"
focal_class.modifier: final private
focal_class.original_string: final private String isHALabel="isHA";
focal_class.type: String
focal_class.var_name: isHALabel
focal_class.declarator: isDRLabel="isDR"
focal_class.modifier: final private
focal_class.original_string: final private String isDRLabel="isDR";
focal_class.type: String
focal_class.var_name: isDRLabel
focal_class.declarator: isAutoRepairEnabledLabel="isAutoRepairEnabled"
focal_class.modifier: final private
focal_class.original_string: final private String isAutoRepairEnabledLabel="isAutoRepairEnabled";
focal_class.type: String
focal_class.var_name: isAutoRepairEnabledLabel
focal_class.declarator: isAutoReplaceEnabledLabel="isAutoReplaceEnabled"
focal_class.modifier: final private
focal_class.original_string: final private String isAutoReplaceEnabledLabel="isAutoReplaceEnabled";
focal_class.type: String
focal_class.var_name: isAutoReplaceEnabledLabel
focal_class.declarator: isProdCloudInNonProdEnvLabel="isProdCloudInNonProdEnv"
focal_class.modifier: final private
focal_class.original_string: final private String isProdCloudInNonProdEnvLabel="isProdCloudInNonProdEnv";
focal_class.type: String
focal_class.var_name: isProdCloudInNonProdEnvLabel
focal_class.declarator: isProdProfileWithNonProdCloudsLabel="isProdProfileWithNonProdClouds"
focal_class.modifier: final  private
focal_class.original_string: final  private String isProdProfileWithNonProdCloudsLabel="isProdProfileWithNonProdClouds";
focal_class.type: String
focal_class.var_name: isProdProfileWithNonProdCloudsLabel
focal_class.declarator: dateTimeFormatPattern="yyyy-MM-dd:HH:mm:ss z"
focal_class.modifier: final
focal_class.original_string: final String dateTimeFormatPattern="yyyy-MM-dd:HH:mm:ss z";
focal_class.type: String
focal_class.var_name: dateTimeFormatPattern
focal_class.declarator: formatter = DateTimeFormatter.ofPattern(dateTimeFormatPattern)
focal_class.modifier: final
focal_class.original_string: final DateTimeFormatter formatter = DateTimeFormatter.ofPattern(dateTimeFormatPattern);
focal_class.type: DateTimeFormatter
focal_class.var_name: formatter
focal_class.file: crawler/src/main/java/com/oneops/crawler/plugins/hadr/PlatformHADRCrawlerPlugin.java
focal_class.identifier: PlatformHADRCrawlerPlugin
focal_class.class_method_signature: PlatformHADRCrawlerPlugin.getSearchDal()
focal_class.full_signature: public SearchDal getSearchDal()
focal_class.identifier: getSearchDal
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: SearchDal
focal_class.signature: SearchDal getSearchDal()
focal_class.class_method_signature: PlatformHADRCrawlerPlugin.setSearchDal(SearchDal searchDal)
focal_class.full_signature: public void setSearchDal(SearchDal searchDal)
focal_class.identifier: setSearchDal
focal_class.modifiers: public
focal_class.parameters: (SearchDal searchDal)
focal_class.return: void
focal_class.signature: void setSearchDal(SearchDal searchDal)
focal_class.class_method_signature: PlatformHADRCrawlerPlugin.PlatformHADRCrawlerPlugin()
focal_class.full_signature: public  PlatformHADRCrawlerPlugin()
focal_class.identifier: PlatformHADRCrawlerPlugin
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.signature:  PlatformHADRCrawlerPlugin()
focal_class.class_method_signature: PlatformHADRCrawlerPlugin.readConfig()
focal_class.full_signature: public void readConfig()
focal_class.identifier: readConfig
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void readConfig()
focal_class.class_method_signature: PlatformHADRCrawlerPlugin.processEnvironment(Environment env, Map<String, Organization> organizationsMapCache)
focal_class.full_signature: public void processEnvironment(Environment env, Map<String, Organization> organizationsMapCache)
focal_class.identifier: processEnvironment
focal_class.modifiers: public
focal_class.parameters: (Environment env, Map<String, Organization> organizationsMapCache)
focal_class.return: void
focal_class.signature: void processEnvironment(Environment env, Map<String, Organization> organizationsMapCache)
focal_class.class_method_signature: PlatformHADRCrawlerPlugin.processPlatformsInEnv(Environment env,
        Map<String, Organization> organizationsMapCache)
focal_class.full_signature: public void processPlatformsInEnv(Environment env,
        Map<String, Organization> organizationsMapCache)
focal_class.identifier: processPlatformsInEnv
focal_class.modifiers: public
focal_class.parameters: (Environment env,
        Map<String, Organization> organizationsMapCache)
focal_class.return: void
focal_class.signature: void processPlatformsInEnv(Environment env,
        Map<String, Organization> organizationsMapCache)
focal_class.class_method_signature: PlatformHADRCrawlerPlugin.getOOURL(String path)
focal_class.full_signature: public String getOOURL(String path)
focal_class.identifier: getOOURL
focal_class.modifiers: public
focal_class.parameters: (String path)
focal_class.return: String
focal_class.signature: String getOOURL(String path)
focal_class.class_method_signature: PlatformHADRCrawlerPlugin.parseAssemblyNameFromNsPath(String path)
focal_class.full_signature: public String parseAssemblyNameFromNsPath(String path)
focal_class.identifier: parseAssemblyNameFromNsPath
focal_class.modifiers: public
focal_class.parameters: (String path)
focal_class.return: String
focal_class.signature: String parseAssemblyNameFromNsPath(String path)
focal_class.class_method_signature: PlatformHADRCrawlerPlugin.IsDR(Platform platform)
focal_class.full_signature: public String IsDR(Platform platform)
focal_class.identifier: IsDR
focal_class.modifiers: public
focal_class.parameters: (Platform platform)
focal_class.return: String
focal_class.signature: String IsDR(Platform platform)
focal_class.class_method_signature: PlatformHADRCrawlerPlugin.IsHA(Platform platform)
focal_class.full_signature: public String IsHA(Platform platform)
focal_class.identifier: IsHA
focal_class.modifiers: public
focal_class.parameters: (Platform platform)
focal_class.return: String
focal_class.signature: String IsHA(Platform platform)
focal_class.class_method_signature: PlatformHADRCrawlerPlugin.saveToElasticSearch(PlatformHADRRecord platformHADRRecord, String platformCId)
focal_class.full_signature: public void saveToElasticSearch(PlatformHADRRecord platformHADRRecord, String platformCId)
focal_class.identifier: saveToElasticSearch
focal_class.modifiers: public
focal_class.parameters: (PlatformHADRRecord platformHADRRecord, String platformCId)
focal_class.return: void
focal_class.signature: void saveToElasticSearch(PlatformHADRRecord platformHADRRecord, String platformCId)
focal_class.class_method_signature: PlatformHADRCrawlerPlugin.createIndexInElasticSearch()
focal_class.full_signature: public void createIndexInElasticSearch()
focal_class.identifier: createIndexInElasticSearch
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void createIndexInElasticSearch()
focal_class.class_method_signature: PlatformHADRCrawlerPlugin.setCloudCategories(PlatformHADRRecord platformHADRRecord,
        Map<String, Cloud> clouds)
focal_class.full_signature: public PlatformHADRRecord setCloudCategories(PlatformHADRRecord platformHADRRecord,
        Map<String, Cloud> clouds)
focal_class.identifier: setCloudCategories
focal_class.modifiers: public
focal_class.parameters: (PlatformHADRRecord platformHADRRecord,
        Map<String, Cloud> clouds)
focal_class.return: PlatformHADRRecord
focal_class.signature: PlatformHADRRecord setCloudCategories(PlatformHADRRecord platformHADRRecord,
        Map<String, Cloud> clouds)
focal_class.class_method_signature: PlatformHADRCrawlerPlugin.getPlatformTechDebtForEnvironment(Platform platform, Environment env)
focal_class.full_signature: public Map<String, Object> getPlatformTechDebtForEnvironment(Platform platform, Environment env)
focal_class.identifier: getPlatformTechDebtForEnvironment
focal_class.modifiers: public
focal_class.parameters: (Platform platform, Environment env)
focal_class.return: Map<String, Object>
focal_class.signature: Map<String, Object> getPlatformTechDebtForEnvironment(Platform platform, Environment env)
focal_class.class_method_signature: PlatformHADRCrawlerPlugin.isNonProdEnvUsingProdutionClouds(Map<String, Cloud> cloudsMap)
focal_class.full_signature: public boolean isNonProdEnvUsingProdutionClouds(Map<String, Cloud> cloudsMap)
focal_class.identifier: isNonProdEnvUsingProdutionClouds
focal_class.modifiers: public
focal_class.parameters: (Map<String, Cloud> cloudsMap)
focal_class.return: boolean
focal_class.signature: boolean isNonProdEnvUsingProdutionClouds(Map<String, Cloud> cloudsMap)
focal_class.class_method_signature: PlatformHADRCrawlerPlugin.prodProfileWithNonProdClouds(Map<String, Cloud> cloudsMap)
focal_class.full_signature: public boolean prodProfileWithNonProdClouds(Map<String, Cloud> cloudsMap)
focal_class.identifier: prodProfileWithNonProdClouds
focal_class.modifiers: public
focal_class.parameters: (Map<String, Cloud> cloudsMap)
focal_class.return: boolean
focal_class.signature: boolean prodProfileWithNonProdClouds(Map<String, Cloud> cloudsMap)
focal_class.class_method_signature: PlatformHADRCrawlerPlugin.isHadrPluginEnabled()
focal_class.full_signature: public boolean isHadrPluginEnabled()
focal_class.identifier: isHadrPluginEnabled
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean isHadrPluginEnabled()
focal_class.class_method_signature: PlatformHADRCrawlerPlugin.isHadrEsEnabled()
focal_class.full_signature: public boolean isHadrEsEnabled()
focal_class.identifier: isHadrEsEnabled
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean isHadrEsEnabled()
focal_class.class_method_signature: PlatformHADRCrawlerPlugin.getProdDataCentersList()
focal_class.full_signature: public String getProdDataCentersList()
focal_class.identifier: getProdDataCentersList
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getProdDataCentersList()
focal_class.class_method_signature: PlatformHADRCrawlerPlugin.getHadrElasticSearchIndexName()
focal_class.full_signature: public String getHadrElasticSearchIndexName()
focal_class.identifier: getHadrElasticSearchIndexName
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getHadrElasticSearchIndexName()
focal_class.class_method_signature: PlatformHADRCrawlerPlugin.getDataCentersArr()
focal_class.full_signature: public String[] getDataCentersArr()
focal_class.identifier: getDataCentersArr
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: String[]
focal_class.signature: String[] getDataCentersArr()
focal_class.class_method_signature: PlatformHADRCrawlerPlugin.setHadrEsEnabled(boolean isHadrEsEnabled)
focal_class.full_signature: public void setHadrEsEnabled(boolean isHadrEsEnabled)
focal_class.identifier: setHadrEsEnabled
focal_class.modifiers: public
focal_class.parameters: (boolean isHadrEsEnabled)
focal_class.return: void
focal_class.signature: void setHadrEsEnabled(boolean isHadrEsEnabled)
focal_class.class_method_signature: PlatformHADRCrawlerPlugin.getHadrElasticSearchIndexMappings()
focal_class.full_signature: public String getHadrElasticSearchIndexMappings()
focal_class.identifier: getHadrElasticSearchIndexMappings
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getHadrElasticSearchIndexMappings()
focal_class.class_method_signature: PlatformHADRCrawlerPlugin.getIsHALabel()
focal_class.full_signature: public String getIsHALabel()
focal_class.identifier: getIsHALabel
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getIsHALabel()
focal_class.class_method_signature: PlatformHADRCrawlerPlugin.getIsDRLabel()
focal_class.full_signature: public String getIsDRLabel()
focal_class.identifier: getIsDRLabel
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getIsDRLabel()
focal_class.class_method_signature: PlatformHADRCrawlerPlugin.getIsAutoRepairEnabledLabel()
focal_class.full_signature: public String getIsAutoRepairEnabledLabel()
focal_class.identifier: getIsAutoRepairEnabledLabel
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getIsAutoRepairEnabledLabel()
focal_class.class_method_signature: PlatformHADRCrawlerPlugin.getIsAutoReplaceEnabledLabel()
focal_class.full_signature: public String getIsAutoReplaceEnabledLabel()
focal_class.identifier: getIsAutoReplaceEnabledLabel
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getIsAutoReplaceEnabledLabel()
focal_class.class_method_signature: PlatformHADRCrawlerPlugin.getIsProdCloudInNonProdEnvLabel()
focal_class.full_signature: public String getIsProdCloudInNonProdEnvLabel()
focal_class.identifier: getIsProdCloudInNonProdEnvLabel
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getIsProdCloudInNonProdEnvLabel()
focal_class.class_method_signature: PlatformHADRCrawlerPlugin.getIsProdProfileWithNonProdCloudsLabel()
focal_class.full_signature: public String getIsProdProfileWithNonProdCloudsLabel()
focal_class.identifier: getIsProdProfileWithNonProdCloudsLabel
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getIsProdProfileWithNonProdCloudsLabel()
focal_class.class_method_signature: PlatformHADRCrawlerPlugin.getEnvironmentProdProfileFilter()
focal_class.full_signature: public String getEnvironmentProdProfileFilter()
focal_class.identifier: getEnvironmentProdProfileFilter
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getEnvironmentProdProfileFilter()
focal_class.class_method_signature: PlatformHADRCrawlerPlugin.getDateTimeFormatPattern()
focal_class.full_signature: public String getDateTimeFormatPattern()
focal_class.identifier: getDateTimeFormatPattern
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getDateTimeFormatPattern()
focal_class.superclass: extends AbstractCrawlerPlugin
focal_method.body: public PlatformHADRRecord setCloudCategories(PlatformHADRRecord platformHADRRecord,
        Map<String, Cloud> clouds) {
  
      List<String> activeClouds = new ArrayList<String>();
      List<String> primaryClouds = new ArrayList<String>();
      List<String> secondaryClouds = new ArrayList<String>();
      List<String> offlineClouds = new ArrayList<String>();
  
      for (String cloudName : clouds.keySet()) {
        Cloud cloud = clouds.get(cloudName);
  
        try {
        switch (cloud.getAdminstatus()) {
  
          case "active":
            activeClouds.add(cloudName);
            break;
  
          case "offline":
            offlineClouds.add(cloudName);
            break;
  
        }
        switch (cloud.getPriority()) {
  
          case 1:
            primaryClouds.add(cloudName);
            break;
          case 2:
            secondaryClouds.add(cloudName);
            break;
  
        }
  
      } catch (Exception e) {
          log.warn("Error while setting cloud categories for cloud {} , error message: {} :",cloudName,e);
          
        }
      }
      platformHADRRecord.setActiveClouds(activeClouds);
      platformHADRRecord.setPrimaryClouds(primaryClouds);
      platformHADRRecord.setSecondaryClouds(secondaryClouds);
      platformHADRRecord.setOfflineClouds(offlineClouds);
      
  
      return platformHADRRecord;
  
    }
focal_method.class_method_signature: PlatformHADRCrawlerPlugin.setCloudCategories(PlatformHADRRecord platformHADRRecord,
        Map<String, Cloud> clouds)
focal_method.full_signature: public PlatformHADRRecord setCloudCategories(PlatformHADRRecord platformHADRRecord,
        Map<String, Cloud> clouds)
focal_method.identifier: setCloudCategories
focal_method.invocations: keySet get getAdminstatus add add getPriority add add warn setActiveClouds setPrimaryClouds setSecondaryClouds setOfflineClouds
focal_method.modifiers: public
focal_method.parameters: (PlatformHADRRecord platformHADRRecord,
        Map<String, Cloud> clouds)
focal_method.return: PlatformHADRRecord
focal_method.signature: PlatformHADRRecord setCloudCategories(PlatformHADRRecord platformHADRRecord,
        Map<String, Cloud> clouds)