oracle / weblogic-deploy-tooling

WebLogic Deploy Tooling
https://oracle.github.io/weblogic-deploy-tooling/
Universal Permissive License v1.0
151 stars 89 forks source link

Self generated elements #935

Open textanalyticsman opened 3 years ago

textanalyticsman commented 3 years ago

Hello,

I am working with BAM and BPM domains and after adjusting my models it works. However, I can see these elements.

image

These elements are not part of my model and I know I can delete it from them by using

    JMSServer:
        # TO DELETE JMS SERVERS CREATED BY DEFAULT
        '!BamReportCacheJmsServer_auto_1':
        '!BamReportCacheJmsServer_auto_2':
        '!BamPersistenceJmsServer_auto_1':
        '!BamPersistenceJmsServer_auto_2':
        '!BamAlertEngineJmsServer_auto_1':
        '!BamAlertEngineJmsServer_auto_2':

However, suffixes such as auto_[9,10,11,12,13] look totally random for my domain whose BAM cluster only has two servers.

Is there any way to delete elements by using wildcards or regular expressions? For example,

    JMSServer:
        # TO DELETE JMS SERVERS CREATED BY DEFAULT
        '!BamReportCacheJmsServer_auto_*':
        '!BamPersistenceJmsServer_auto_*':
        '!BamAlertEngineJmsServer_auto_*':

Best regards, TAM

CarolynRountree commented 3 years ago

To be reviewed for enhancement

textanalyticsman commented 3 years ago

Hello,

Here you can see an example of the element that are generated in my domain. I have two managed servers in a BamCluster and then I do not understand how these numbers are generated.

        '!BamCQServiceJmsFileStore_auto_1':
        '!BamCQServiceJmsFileStore_auto_7':
        '!BamCQServiceJmsFileStore_auto_8':        
        '!BamCQServiceJmsFileStore_auto_9':
        '!BamCQServiceJmsFileStore_auto_10':                
        '!BamCQServiceJmsFileStore_auto_11':
        '!BamCQServiceJmsFileStore_auto_12':                
        '!BamCQServiceJmsFileStore_auto_13':
        '!BamCQServiceJmsFileStore_auto_14':  

Best regards, TAM

robertpatrick commented 2 years ago

@textanalyticsman Can you help me understand what you are doing with WDT and these BAM/BPM domains? For example, are you just using createDomain from a model that you are maintaining? Are you trying to use discoverDomain?

I am just trying to make sure I understand what you are trying to do so that I can scope the work needed. For example, the createDomain case would suggest that you need the wildcard syntax in the model itself whereas the discoverDomain case would require putting the wildcard syntax in the system-elements portion of the typedef file.

robertpatrick commented 2 years ago

@textanalyticsman As it turns out, the system-elements portion of the typedef file already supports that due to the elements being treated as regular expressions. There are several tricky elements of implementing this wildcard syntax, such as how to detect when a name is a name versus a pattern since there is one (or more?) properties folder that supports names that end in an asterisk (see PR 563).

textanalyticsman commented 2 years ago

Could you provide an example about using regular expressions?

robertpatrick commented 2 years ago

@textanalyticsman The system-elements section of the typedef files support the use of regular expressions for filtering out "system components," which is primarily used for excluding model definitions of these components during discovery since these components are created by the WLST domain extension templates applied to a JRF domain. See https://github.com/oracle/weblogic-deploy-tooling/blob/main/core/src/main/typedefs/JRF.json for examples.