[COMMON] Add and run pre-commit linters via tox

- create a .pre-commit-config.yaml configuration file with
  * gitlint
  * trailing blanks linter
  * tabs removal linter
    - exclude .git folder from it
    - exclude Makefiles since tabs are mandatory by default in them
- create a tox pre-commit profile to run it from tox
  note gitlint is not runnable at this pre-commit stage
- create pre-commit-install and pre-commit-uninstall tox profiles to
  (un)install hooks locally and (un)perform tests at each "git commit"
  call (i.e. without calling manually the pre-commit tox profile)
- precise pre-commit stages/types in the pre-commit configuration file
  so that hooks are installed correctly. This avoids messages about
  skipped tests when they are run at a wrong stage.

Issue-ID: OOM-2643
Signed-off-by: guillaume.lambert <guillaume.lambert@orange.com>
Change-Id: Ie95bb4f6f90be80b05a1398973caffeff7936881
diff --git a/kubernetes/dcaegen2-services/resources/external/schemas/sa91-rel16/5gcNrm.yaml b/kubernetes/dcaegen2-services/resources/external/schemas/sa91-rel16/5gcNrm.yaml
index eb40832..16a01b4 100644
--- a/kubernetes/dcaegen2-services/resources/external/schemas/sa91-rel16/5gcNrm.yaml
+++ b/kubernetes/dcaegen2-services/resources/external/schemas/sa91-rel16/5gcNrm.yaml
@@ -486,7 +486,7 @@
               $ref: '#/components/schemas/SmfFunction-Multiple'
             UpfFunction:
               $ref: '#/components/schemas/UpfFunction-Multiple'
-            N3iwfFunction:   
+            N3iwfFunction:
               $ref: '#/components/schemas/N3iwfFunction-Multiple'
             PcfFunction:
               $ref: '#/components/schemas/PcfFunction-Multiple'
@@ -520,7 +520,7 @@
               $ref: '#/components/schemas/Configurable5QISet-Multiple'
             Dynamic5QISet:
               $ref: '#/components/schemas/Dynamic5QISet-Multiple'
- 
+
     AmfFunction-Single:
       allOf:
         - $ref: 'genericNrm.yaml#/components/schemas/Top-Attr'
@@ -1562,8 +1562,8 @@
                     configurable5QIs:
                       type: array
                       items:
-                        $ref: '#/components/schemas/FiveQICharacteristics'  
-   
+                        $ref: '#/components/schemas/FiveQICharacteristics'
+
     Dynamic5QISet-Single:
       allOf:
         - $ref: 'genericNrm.yaml#/components/schemas/Top-Attr'
@@ -1576,8 +1576,8 @@
                     dynamic5QIs:
                       type: array
                       items:
-                        $ref: '#/components/schemas/FiveQICharacteristics'                           
-                      
+                        $ref: '#/components/schemas/FiveQICharacteristics'
+
     GtpUPathQoSMonitoringControl-Single:
       allOf:
         - $ref: 'genericNrm.yaml#/components/schemas/Top-Attr'
@@ -1664,7 +1664,7 @@
                     predefinedPccRules:
                       type: array
                       items:
-                        $ref: '#/components/schemas/PccRule'                           
+                        $ref: '#/components/schemas/PccRule'
 
 #-------- Definition of JSON arrays for name-contained IOCs ----------------------
 
@@ -1774,7 +1774,7 @@
       type: array
       items:
         $ref: '#/components/schemas/AmfRegion-Single'
-  
+
     EP_N2-Multiple:
       type: array
       items:
diff --git a/kubernetes/dcaegen2-services/resources/external/schemas/sa91-rel16/FileDataReportingMnS.yaml b/kubernetes/dcaegen2-services/resources/external/schemas/sa91-rel16/FileDataReportingMnS.yaml
index 2d1a4fb..01ff52f 100644
--- a/kubernetes/dcaegen2-services/resources/external/schemas/sa91-rel16/FileDataReportingMnS.yaml
+++ b/kubernetes/dcaegen2-services/resources/external/schemas/sa91-rel16/FileDataReportingMnS.yaml
@@ -14,7 +14,7 @@
     variables:
       MnSRoot:
         description: See subclause 4.4 of TS 32.158
-        default: http://example.com/3GPPManagement 
+        default: http://example.com/3GPPManagement
       version:
         description: Indicates the current version of the specification
         default: 16.5.0
diff --git a/kubernetes/dcaegen2-services/resources/external/schemas/sa91-rel16/comDefs.yaml b/kubernetes/dcaegen2-services/resources/external/schemas/sa91-rel16/comDefs.yaml
index fb6d7f4..0528135 100644
--- a/kubernetes/dcaegen2-services/resources/external/schemas/sa91-rel16/comDefs.yaml
+++ b/kubernetes/dcaegen2-services/resources/external/schemas/sa91-rel16/comDefs.yaml
@@ -12,7 +12,7 @@
 paths: {}
 components:
   schemas:
-  
+
     Float:
       type: number
       format: float
diff --git a/kubernetes/dcaegen2-services/resources/external/schemas/sa91-rel16/faultMnS.yaml b/kubernetes/dcaegen2-services/resources/external/schemas/sa91-rel16/faultMnS.yaml
index 7ccf280..752ead6 100644
--- a/kubernetes/dcaegen2-services/resources/external/schemas/sa91-rel16/faultMnS.yaml
+++ b/kubernetes/dcaegen2-services/resources/external/schemas/sa91-rel16/faultMnS.yaml
@@ -464,7 +464,7 @@
   schemas:
 
   #---- Definition of AlarmRecord ----------------------------------------------------#
- 
+
     AlarmId:
       type: string
     AlarmType:
@@ -649,7 +649,7 @@
           type: string
 
   #---- Definition of alarm notifications --------------------------------------------#
-  
+
     AlarmNotificationTypes:
       type: string
       enum:
@@ -721,7 +721,7 @@
             - perceivedSeverity
             - serviceUser
             - serviceProvider
-            - securityAlarmDetector 
+            - securityAlarmDetector
           properties:
             alarmId:
               $ref: '#/components/schemas/AlarmId'
@@ -947,7 +947,7 @@
               $ref: '#/components/schemas/AlarmListAlignmentRequirement'
 
   #---- Definition of query parameters -----------------------------------------------#
-  
+
     AlarmAckState:
       type: string
       enum:
@@ -957,7 +957,7 @@
         - ALL_ACTIVE_AND_UNACKNOWLEDGED_ALARMS
         - ALL_CLEARED_AND_UNACKNOWLEDGED_ALARMS
         - ALL_UNACKNOWLEDGED_ALARMS
-        
+
   #---- Definition of patch documents ------------------------------------------------#
 
     MergePatchAcknowledgeAlarm:
diff --git a/kubernetes/dcaegen2-services/resources/external/schemas/sa91-rel16/genericNrm.yaml b/kubernetes/dcaegen2-services/resources/external/schemas/sa91-rel16/genericNrm.yaml
index aedf3c4..7e7576c 100644
--- a/kubernetes/dcaegen2-services/resources/external/schemas/sa91-rel16/genericNrm.yaml
+++ b/kubernetes/dcaegen2-services/resources/external/schemas/sa91-rel16/genericNrm.yaml
@@ -180,7 +180,7 @@
             enum:
              - FILE_BASED_LOC_SET_BY_PRODUCER
              - FILE_BASED_LOC_SET_BY_CONSUMER
-             - STREAM_BASED 
+             - STREAM_BASED
         monitorGranularityPeriods:
           type: array
           items:
@@ -216,7 +216,7 @@
           type: integer
 
 #-------- Definition of types used in Trace control NRM fragment------------------
-                
+
     tjJobType-Type:
       type: string
       description: Specifies whether the TraceJob represents only MDT, Logged MBSFN MDT, Trace or a combined Trace and MDT job. Applicable for Trace, MDT, RCEF and RLF reporting. See 3GPP TS 32.422 clause 5.9a for additional details.
@@ -657,7 +657,7 @@
       required:
         - TargetIdType
         - TargetIdValue
-    
+
     tjTriggeringEvent-Type:
       type: object
       description: Specifies when to start a Trace Recording Session and which message shall be recorded first, when to stop a Trace Recording Session and which message shall be recorded last respectively. See 3GPP TS 32.422 clause 5.1 for additional detials.
@@ -682,14 +682,14 @@
       required:
         - NetworkElement
         - EventBitmap
-    
+
     tjMDTAnonymizationOfData-Type:
       description: Specifies level of MDT anonymization. For additional details see 3GPP TS 32.422 clause 5.10.12.
       type: string
       enum:
         - NO_IDENTITY
         - TAC_OF_IMEI
-    
+
     tjMDTAreaConfigurationForNeighCell-Type:
       description: Used for logged NR MDT and defines the area for which UE is requested to perform measurement logging for neighbour cells which have list of frequencies. For additional details see 3GPP TS 32.422 clause 5.10.26.
       type: array
@@ -700,12 +700,12 @@
             type: string
           cell:
             type: string
-      
+
     tjMDTAreaScope-Type:
       description: defines the area in terms or Cells or Tracking Area/Routing Area/Location Area where the MDT data collection shall take place. For additional details see 3GPP TS 32.422 clause 5.10.2.
       allOf:
         - $ref: 'comDefs.yaml#/components/schemas/DnList'
-        
+
     tjMDTCollectionPeriodRrmLte-Type:
       description: See details in 3GPP TS 32.422 clause 5.10.20.
       type: string
@@ -737,7 +737,7 @@
         - 5120ms
         - 10240ms
         - 1min
-    
+
     tjMDTCollectionPeriodRrmNR-Type:
       description: See details in 3GPP TS 32.422 clause 5.10.30.
       type: string
@@ -764,7 +764,7 @@
           type: integer
           minimum: 0
           maximum: 97
-        EventThresholdRSRQ:      
+        EventThresholdRSRQ:
           type: integer
           minimum: 0
           maximum: 34
@@ -846,7 +846,7 @@
         - 3600s
         - 5400s
         - 7200s
-    
+
     tjMDTLoggingInterval-Type:
       description: See details in 3GPP TS 32.422 clause 5.10.8.
       type: string
@@ -1183,7 +1183,7 @@
         tjJobType:
           $ref: '#/components/schemas/tjJobType-Type'
         tjListOfInterfaces:
-          $ref: '#/components/schemas/tjListOfInterfaces-Type'                  
+          $ref: '#/components/schemas/tjListOfInterfaces-Type'
         tjListOfNeTypes:
           $ref: '#/components/schemas/tjListOfNeTypes-Type'
         tjPLMNTarget:
diff --git a/kubernetes/dcaegen2-services/resources/external/schemas/sa91-rel16/nrNrm.yaml b/kubernetes/dcaegen2-services/resources/external/schemas/sa91-rel16/nrNrm.yaml
index 3de2c63..3ff7a21 100644
--- a/kubernetes/dcaegen2-services/resources/external/schemas/sa91-rel16/nrNrm.yaml
+++ b/kubernetes/dcaegen2-services/resources/external/schemas/sa91-rel16/nrNrm.yaml
@@ -82,12 +82,12 @@
 
     GGnbIdList:
         type: array
-        items: 
+        items:
           $ref: '#/components/schemas/GGnbId'
 
     GEnbIdList:
         type: array
-        items: 
+        items:
           $ref: '#/components/schemas/GEnbId'
 
     NrPci:
@@ -408,7 +408,7 @@
     RSSetId:
       type: integer
       maximum: 4194303
-    
+
     RSSetType:
       type: string
       enum:
@@ -450,7 +450,7 @@
           type: string
           enum:
             - ENABLE
-            - DISABLE          
+            - DISABLE
         RIMRSScrambleTimerMultiplier:
           type: integer
         RIMRSScrambleTimerOffset:
@@ -511,12 +511,12 @@
           type: string
           enum:
             - ENABLE
-            - DISABLE          
+            - DISABLE
         enablenearfarIndicationRS2:
           type: string
           enum:
             - ENABLE
-            - DISABLE          
+            - DISABLE
 
     RimRSReportInfo:
       type: object
@@ -531,7 +531,7 @@
             - RS1
             - RS2
             - RS1forEnoughMitigation
-            - RS1forNotEnoughMitigation          
+            - RS1forNotEnoughMitigation
 
     RimRSReportConf:
       type: object
@@ -540,7 +540,7 @@
           type: string
           enum:
             - ENABLE
-            - DISABLE          
+            - DISABLE
         reportInterval:
            type: integer
         nrofRIMRSReportInfo:
@@ -1289,7 +1289,7 @@
         - $ref: 'genericNrm.yaml#/components/schemas/Top-Attr'
         - type: object
           properties:
-            attributes: 
+            attributes:
                   type: object
                   properties:
                     dmroControl:
@@ -1758,7 +1758,7 @@
       type: array
       items:
         $ref: '#/components/schemas/ExternalNrCellCu-Single'
-    
+
     ExternalENBFunction-Multiple:
       type: array
       items:
@@ -1831,7 +1831,7 @@
         - $ref: '#/components/schemas/CommonBeamformingFunction-Single'
         - $ref: '#/components/schemas/Beam-Single'
         - $ref: '#/components/schemas/RRMPolicyRatio-Single'
-        
+
         - $ref: '#/components/schemas/NRCellRelation-Single'
         - $ref: '#/components/schemas/EUtranCellRelation-Single'
         - $ref: '#/components/schemas/NRFreqRelation-Single'
@@ -1844,10 +1844,10 @@
         - $ref: '#/components/schemas/DPCIConfigurationFunction-Single'
         - $ref: '#/components/schemas/CPCIConfigurationFunction-Single'
         - $ref: '#/components/schemas/CESManagementFunction-Single'
-     
+
         - $ref: '#/components/schemas/RimRSGlobal-Single'
         - $ref: '#/components/schemas/RimRSSet-Single'
-        
+
         - $ref: '#/components/schemas/ExternalGnbDuFunction-Single'
         - $ref: '#/components/schemas/ExternalGnbCuUpFunction-Single'
         - $ref: '#/components/schemas/ExternalGnbCuCpFunction-Single'
@@ -1865,4 +1865,4 @@
         - $ref: '#/components/schemas/EP_NgU-Single'
         - $ref: '#/components/schemas/EP_X2U-Single'
         - $ref: '#/components/schemas/EP_S1U-Single'
- 
+
diff --git a/kubernetes/dcaegen2-services/resources/external/schemas/sa91-rel16/perfMnS.yaml b/kubernetes/dcaegen2-services/resources/external/schemas/sa91-rel16/perfMnS.yaml
index 1fd64a7..dec6127 100644
--- a/kubernetes/dcaegen2-services/resources/external/schemas/sa91-rel16/perfMnS.yaml
+++ b/kubernetes/dcaegen2-services/resources/external/schemas/sa91-rel16/perfMnS.yaml
@@ -16,7 +16,7 @@
         description: >-
           The open API server of the performance threshold monitoring service is
           located in the consumer side, see monitoringNotifTarget attribute of
-          the IOC ThresholdMonitor defined in 3GPP TS 28.622 [11]. 
+          the IOC ThresholdMonitor defined in 3GPP TS 28.622 [11].
         default: http://example.com/3GPPManagement
 paths:
   /notificationSink:
diff --git a/kubernetes/dcaegen2-services/resources/external/schemas/sa91-rel16/sliceNrm.yaml b/kubernetes/dcaegen2-services/resources/external/schemas/sa91-rel16/sliceNrm.yaml
index 1fa8d70..9bf5319 100644
--- a/kubernetes/dcaegen2-services/resources/external/schemas/sa91-rel16/sliceNrm.yaml
+++ b/kubernetes/dcaegen2-services/resources/external/schemas/sa91-rel16/sliceNrm.yaml
@@ -215,7 +215,7 @@
     ServiceProfile:
       type: object
       properties:
-          serviceProfileId: 
+          serviceProfileId:
             type: string
           plmnInfoList:
             $ref: 'nrNrm.yaml#/components/schemas/PlmnInfoList'
@@ -296,7 +296,7 @@
        type: array
        items:
         $ref: '#/components/schemas/ServiceProfile'
-            
+
     SliceProfileList:
       type: array
       items:
@@ -379,14 +379,14 @@
                 ipAddress:
                   $ref: '#/components/schemas/IpAddress'
                 logicInterfaceId:
-                  type: string 
+                  type: string
                 nextHopInfo:
-                  type: string 
+                  type: string
                 qosProfile:
-                  type: string 
+                  type: string
                 epApplicationRefs:
                   $ref: 'comDefs.yaml#/components/schemas/DnList'
-                      
+
 #-------- Definition of JSON arrays for name-contained IOCs ----------------------
     SubNetwork-Multiple:
       type: array