reqmon 2.3.10__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- Utils/CPMetrics.py +270 -0
- Utils/CertTools.py +62 -0
- Utils/EmailAlert.py +50 -0
- Utils/ExtendedUnitTestCase.py +62 -0
- Utils/FileTools.py +182 -0
- Utils/IteratorTools.py +80 -0
- Utils/MathUtils.py +31 -0
- Utils/MemoryCache.py +119 -0
- Utils/Patterns.py +24 -0
- Utils/Pipeline.py +137 -0
- Utils/PortForward.py +97 -0
- Utils/ProcessStats.py +103 -0
- Utils/PythonVersion.py +17 -0
- Utils/Signals.py +36 -0
- Utils/TemporaryEnvironment.py +27 -0
- Utils/Throttled.py +227 -0
- Utils/Timers.py +130 -0
- Utils/Timestamps.py +86 -0
- Utils/TokenManager.py +143 -0
- Utils/Tracing.py +60 -0
- Utils/TwPrint.py +98 -0
- Utils/Utilities.py +308 -0
- Utils/__init__.py +11 -0
- WMCore/Algorithms/Permissions.py +27 -0
- WMCore/Algorithms/__init__.py +7 -0
- WMCore/Cache/GenericDataCache.py +98 -0
- WMCore/Cache/WMConfigCache.py +572 -0
- WMCore/Cache/__init__.py +0 -0
- WMCore/Configuration.py +651 -0
- WMCore/DataStructs/File.py +177 -0
- WMCore/DataStructs/Fileset.py +140 -0
- WMCore/DataStructs/Job.py +182 -0
- WMCore/DataStructs/JobGroup.py +142 -0
- WMCore/DataStructs/JobPackage.py +49 -0
- WMCore/DataStructs/LumiList.py +734 -0
- WMCore/DataStructs/Mask.py +219 -0
- WMCore/DataStructs/Pickleable.py +24 -0
- WMCore/DataStructs/Run.py +256 -0
- WMCore/DataStructs/Subscription.py +175 -0
- WMCore/DataStructs/WMObject.py +47 -0
- WMCore/DataStructs/WorkUnit.py +112 -0
- WMCore/DataStructs/Workflow.py +60 -0
- WMCore/DataStructs/__init__.py +8 -0
- WMCore/Database/CMSCouch.py +1349 -0
- WMCore/Database/CouchUtils.py +118 -0
- WMCore/Database/__init__.py +9 -0
- WMCore/Lexicon.py +836 -0
- WMCore/REST/Auth.py +202 -0
- WMCore/REST/CherryPyPeriodicTask.py +166 -0
- WMCore/REST/Error.py +333 -0
- WMCore/REST/Format.py +642 -0
- WMCore/REST/HeartbeatMonitorBase.py +90 -0
- WMCore/REST/Main.py +623 -0
- WMCore/REST/Server.py +2435 -0
- WMCore/REST/Services.py +24 -0
- WMCore/REST/Test.py +120 -0
- WMCore/REST/Tools.py +38 -0
- WMCore/REST/Validation.py +250 -0
- WMCore/REST/__init__.py +1 -0
- WMCore/ReqMgr/DataStructs/AuthzByStatus.py +113 -0
- WMCore/ReqMgr/DataStructs/DefaultConfig/CAMPAIGN_CONFIG.py +116 -0
- WMCore/ReqMgr/DataStructs/DefaultConfig/DAS_RESULT_FILTER.py +3 -0
- WMCore/ReqMgr/DataStructs/DefaultConfig/EDITABLE_SPLITTING_PARAM_CONFIG.py +42 -0
- WMCore/ReqMgr/DataStructs/DefaultConfig/UNIFIED_CONFIG.py +240 -0
- WMCore/ReqMgr/DataStructs/DefaultConfig/__init__.py +0 -0
- WMCore/ReqMgr/DataStructs/ReqMgrConfigDataCache.py +65 -0
- WMCore/ReqMgr/DataStructs/Request.py +293 -0
- WMCore/ReqMgr/DataStructs/RequestError.py +21 -0
- WMCore/ReqMgr/DataStructs/RequestStatus.py +209 -0
- WMCore/ReqMgr/DataStructs/RequestType.py +13 -0
- WMCore/ReqMgr/DataStructs/__init__.py +0 -0
- WMCore/ReqMgr/__init__.py +1 -0
- WMCore/Services/AlertManager/AlertManagerAPI.py +111 -0
- WMCore/Services/AlertManager/__init__.py +0 -0
- WMCore/Services/CRIC/CRIC.py +238 -0
- WMCore/Services/CRIC/__init__.py +0 -0
- WMCore/Services/DBS/DBS3Reader.py +1044 -0
- WMCore/Services/DBS/DBSConcurrency.py +44 -0
- WMCore/Services/DBS/DBSErrors.py +113 -0
- WMCore/Services/DBS/DBSReader.py +23 -0
- WMCore/Services/DBS/DBSUtils.py +139 -0
- WMCore/Services/DBS/DBSWriterObjects.py +381 -0
- WMCore/Services/DBS/ProdException.py +133 -0
- WMCore/Services/DBS/__init__.py +8 -0
- WMCore/Services/FWJRDB/FWJRDBAPI.py +118 -0
- WMCore/Services/FWJRDB/__init__.py +0 -0
- WMCore/Services/HTTPS/HTTPSAuthHandler.py +66 -0
- WMCore/Services/HTTPS/__init__.py +0 -0
- WMCore/Services/LogDB/LogDB.py +201 -0
- WMCore/Services/LogDB/LogDBBackend.py +191 -0
- WMCore/Services/LogDB/LogDBExceptions.py +11 -0
- WMCore/Services/LogDB/LogDBReport.py +85 -0
- WMCore/Services/LogDB/__init__.py +0 -0
- WMCore/Services/MSPileup/__init__.py +0 -0
- WMCore/Services/MSUtils/MSUtils.py +54 -0
- WMCore/Services/MSUtils/__init__.py +0 -0
- WMCore/Services/McM/McM.py +173 -0
- WMCore/Services/McM/__init__.py +8 -0
- WMCore/Services/MonIT/Grafana.py +133 -0
- WMCore/Services/MonIT/__init__.py +0 -0
- WMCore/Services/PyCondor/PyCondorAPI.py +154 -0
- WMCore/Services/PyCondor/PyCondorUtils.py +105 -0
- WMCore/Services/PyCondor/__init__.py +0 -0
- WMCore/Services/ReqMgr/ReqMgr.py +261 -0
- WMCore/Services/ReqMgr/__init__.py +0 -0
- WMCore/Services/ReqMgrAux/ReqMgrAux.py +419 -0
- WMCore/Services/ReqMgrAux/__init__.py +0 -0
- WMCore/Services/RequestDB/RequestDBReader.py +267 -0
- WMCore/Services/RequestDB/RequestDBWriter.py +39 -0
- WMCore/Services/RequestDB/__init__.py +0 -0
- WMCore/Services/Requests.py +624 -0
- WMCore/Services/Rucio/Rucio.py +1287 -0
- WMCore/Services/Rucio/RucioUtils.py +74 -0
- WMCore/Services/Rucio/__init__.py +0 -0
- WMCore/Services/RucioConMon/RucioConMon.py +128 -0
- WMCore/Services/RucioConMon/__init__.py +0 -0
- WMCore/Services/Service.py +400 -0
- WMCore/Services/StompAMQ/__init__.py +0 -0
- WMCore/Services/TagCollector/TagCollector.py +155 -0
- WMCore/Services/TagCollector/XMLUtils.py +98 -0
- WMCore/Services/TagCollector/__init__.py +0 -0
- WMCore/Services/UUIDLib.py +13 -0
- WMCore/Services/UserFileCache/UserFileCache.py +160 -0
- WMCore/Services/UserFileCache/__init__.py +8 -0
- WMCore/Services/WMAgent/WMAgent.py +63 -0
- WMCore/Services/WMAgent/__init__.py +0 -0
- WMCore/Services/WMArchive/CMSSWMetrics.py +526 -0
- WMCore/Services/WMArchive/DataMap.py +463 -0
- WMCore/Services/WMArchive/WMArchive.py +33 -0
- WMCore/Services/WMArchive/__init__.py +0 -0
- WMCore/Services/WMBS/WMBS.py +97 -0
- WMCore/Services/WMBS/__init__.py +0 -0
- WMCore/Services/WMStats/DataStruct/RequestInfoCollection.py +300 -0
- WMCore/Services/WMStats/DataStruct/__init__.py +0 -0
- WMCore/Services/WMStats/WMStatsPycurl.py +145 -0
- WMCore/Services/WMStats/WMStatsReader.py +445 -0
- WMCore/Services/WMStats/WMStatsWriter.py +273 -0
- WMCore/Services/WMStats/__init__.py +0 -0
- WMCore/Services/WMStatsServer/WMStatsServer.py +134 -0
- WMCore/Services/WMStatsServer/__init__.py +0 -0
- WMCore/Services/WorkQueue/WorkQueue.py +492 -0
- WMCore/Services/WorkQueue/__init__.py +0 -0
- WMCore/Services/__init__.py +8 -0
- WMCore/Services/pycurl_manager.py +574 -0
- WMCore/WMBase.py +50 -0
- WMCore/WMException.py +183 -0
- WMCore/WMExceptions.py +269 -0
- WMCore/WMFactory.py +76 -0
- WMCore/WMLogging.py +108 -0
- WMCore/WMStats/CherryPyThreads/CleanUpTask.py +46 -0
- WMCore/WMStats/CherryPyThreads/DataCacheUpdate.py +45 -0
- WMCore/WMStats/CherryPyThreads/HeartbeatMonitor.py +6 -0
- WMCore/WMStats/CherryPyThreads/LogDBTasks.py +29 -0
- WMCore/WMStats/CherryPyThreads/__init__.py +0 -0
- WMCore/WMStats/DataStructs/DataCache.py +92 -0
- WMCore/WMStats/DataStructs/__init__.py +0 -0
- WMCore/WMStats/Service/ActiveRequestJobInfo.py +123 -0
- WMCore/WMStats/Service/MetaDataInfo.py +26 -0
- WMCore/WMStats/Service/RequestInfo.py +127 -0
- WMCore/WMStats/Service/RestApiHub.py +51 -0
- WMCore/WMStats/Service/__init__.py +0 -0
- WMCore/WMStats/T0/CherryPyThreads/T0DataCacheUpdate.py +35 -0
- WMCore/WMStats/T0/CherryPyThreads/__init__.py +0 -0
- WMCore/WMStats/T0/Service/T0RestApiHub.py +37 -0
- WMCore/WMStats/T0/Service/__init__.py +0 -0
- WMCore/WMStats/T0/__init__.py +0 -0
- WMCore/WMStats/WebGui/FrontPage.py +59 -0
- WMCore/WMStats/WebGui/__init__.py +0 -0
- WMCore/WMStats/__init__.py +1 -0
- WMCore/Wrappers/JsonWrapper/JSONThunker.py +342 -0
- WMCore/Wrappers/JsonWrapper/__init__.py +7 -0
- WMCore/Wrappers/__init__.py +6 -0
- WMCore/__init__.py +10 -0
- reqmon-2.3.10.data/data/bin/wmc-dist-patch +15 -0
- reqmon-2.3.10.data/data/bin/wmc-dist-unpatch +8 -0
- reqmon-2.3.10.data/data/bin/wmc-httpd +3 -0
- reqmon-2.3.10.data/data/data/couchapps/LogDB/_id +1 -0
- reqmon-2.3.10.data/data/data/couchapps/LogDB/couchapp.json +5 -0
- reqmon-2.3.10.data/data/data/couchapps/LogDB/filters/filterDeletedDocs.js +3 -0
- reqmon-2.3.10.data/data/data/couchapps/LogDB/language +1 -0
- reqmon-2.3.10.data/data/data/couchapps/LogDB/validate_doc_update.js +6 -0
- reqmon-2.3.10.data/data/data/couchapps/LogDB/views/logByRequest/map.js +9 -0
- reqmon-2.3.10.data/data/data/couchapps/LogDB/views/logByRequestAndThread/map.js +3 -0
- reqmon-2.3.10.data/data/data/couchapps/LogDB/views/requests/map.js +5 -0
- reqmon-2.3.10.data/data/data/couchapps/LogDB/views/requests/reduce.js +1 -0
- reqmon-2.3.10.data/data/data/couchapps/LogDB/views/tstamp/map.js +7 -0
- reqmon-2.3.10.data/data/data/couchapps/T0Request/_id +1 -0
- reqmon-2.3.10.data/data/data/couchapps/T0Request/couchapp.json +5 -0
- reqmon-2.3.10.data/data/data/couchapps/T0Request/filters/repfilter.js +3 -0
- reqmon-2.3.10.data/data/data/couchapps/T0Request/language +1 -0
- reqmon-2.3.10.data/data/data/couchapps/T0Request/updates/updaterequest.js +79 -0
- reqmon-2.3.10.data/data/data/couchapps/T0Request/validate_doc_update.js +6 -0
- reqmon-2.3.10.data/data/data/couchapps/T0Request/views/byrequest/map.js +3 -0
- reqmon-2.3.10.data/data/data/couchapps/T0Request/views/bystatus/map.js +7 -0
- reqmon-2.3.10.data/data/data/couchapps/T0Request/views/bystatusandtime/map.js +7 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/css/ColVis.css +76 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/css/font-awesome.min.css +4 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/css/images/badge-circle-check-16.png +0 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/css/images/badge-circle-cross-16.png +0 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/css/images/badge-circle-plus-16.png +0 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/css/images/badge-square-check-16.png +0 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/css/images/cms_logo.gif +0 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/css/images/cms_logo.jpeg +0 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/css/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/css/images/ui-bg_flat_55_fbec88_40x100.png +0 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/css/images/ui-bg_glass_100_e4f1fb_1x400.png +0 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/css/images/ui-bg_glass_75_d0e5f5_1x400.png +0 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/css/images/ui-bg_glass_80_d7ebf9_1x400.png +0 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/css/images/ui-bg_glass_85_dfeffc_1x400.png +0 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/css/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/css/images/ui-bg_highlight-hard_55_5c9ccc_1x100.png +0 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/css/images/ui-bg_inset-hard_100_f5f8f9_1x100.png +0 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/css/images/ui-bg_inset-soft_100_fcfdfd_1x100.png +0 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/css/images/ui-icons_217bc0_256x240.png +0 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/css/images/ui-icons_2694e8_256x240.png +0 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/css/images/ui-icons_2e83ff_256x240.png +0 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/css/images/ui-icons_469bdd_256x240.png +0 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/css/images/ui-icons_6da8d5_256x240.png +0 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/css/images/ui-icons_cd0a0a_256x240.png +0 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/css/images/ui-icons_d8e7f3_256x240.png +0 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/css/images/ui-icons_f9bd01_256x240.png +0 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/css/images/warning-16.png +0 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/css/jquery-ui-1.12.0.css +1312 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/css/jquery.dataTables.css +241 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/css/logdb.css +60 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/css/main_layout.css +565 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/fonts/FontAwesome.otf +0 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/fonts/fontawesome-webfont.eot +0 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/fonts/fontawesome-webfont.svg +565 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/fonts/fontawesome-webfont.ttf +0 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/fonts/fontawesome-webfont.woff +0 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/fonts/fontawesome-webfont.woff2 +0 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/images/Sorting icons.psd +0 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/images/back_disabled.jpg +0 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/images/back_enabled.jpg +0 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/images/error.png +0 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/images/favicon.ico +0 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/images/forward_disabled.jpg +0 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/images/forward_enabled.jpg +0 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/images/loader-1.gif +0 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/images/module.caption.backg.png +0 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/images/module.caption.backg.rolledup.png +0 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/images/rollup.gif +0 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/images/sort_asc.png +0 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/images/sort_asc_disabled.png +0 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/images/sort_both.png +0 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/images/sort_desc.png +0 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/images/sort_desc_disabled.png +0 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/images/stable.png +0 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/images/warning.png +0 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/index.html +105 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/index.html.min +106 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/index.html.org +125 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Controller/WMStats.ActiveRequestController.js +61 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Controller/WMStats.GenericController.js +38 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Controller/WMStats.WorkloadSummaryController.js +12 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Controller/import.js +6 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/DataStruct/T0/WMStats.RequestSummary.js +71 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/DataStruct/T0/WMStats.RunSummary.js +70 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/DataStruct/T1/WMStats.AgentRequestSummary.js +28 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/DataStruct/T1/WMStats.CMSSWSummary.js +28 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/DataStruct/T1/WMStats.CampaignSummary.js +28 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/DataStruct/T1/WMStats.ReqMgrRequest.js +10 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/DataStruct/T1/WMStats.RequestSummary.js +190 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/DataStruct/WMStats.Agents.js +98 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/DataStruct/WMStats.Alerts.js +21 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/DataStruct/WMStats.Campaigns.js +25 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/DataStruct/WMStats.GenericRequests.js +728 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/DataStruct/WMStats.History.js +78 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/DataStruct/WMStats.JobDetails.js +19 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/DataStruct/WMStats.JobSummary.js +32 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/DataStruct/WMStats.LogDBData.js +93 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/DataStruct/WMStats.LogMessage.js +38 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/DataStruct/WMStats.SiteSummary.js +24 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/DataStruct/WMStats.Sites.js +25 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/DataStruct/WMStats.Tasks.js +107 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/DataStruct/WMStats.WorkloadSummary.js +20 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/DataStruct/WMStats._StructBase.js +37 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/DataStruct/import.js +29 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Models/T0/WMStats.ActiveRequestModel.js +9 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Models/T0/WMStats.RequestLogDetailModel.js +17 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Models/T0/WMStats.RequestLogModel.js +14 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Models/T0/WMStats.RequestModel.js +3 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Models/T0/WMStats.RequestSearchModel.js +8 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Models/T1/WMStats.ActiveRequestModel.js +9 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Models/T1/WMStats.ReqMgrRequestModel.js +8 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Models/T1/WMStats.RequestLogDetailModel.js +18 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Models/T1/WMStats.RequestLogModel.js +14 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Models/T1/WMStats.RequestSearchModel.js +8 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Models/WMStats.AgentModel.js +3 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Models/WMStats.AlertModel.js +6 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Models/WMStats.HistoryModel.js +14 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Models/WMStats.JobDetailModel.js +22 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Models/WMStats.JobSummaryModel.js +18 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Models/WMStats.WorkloadSummaryModel.js +8 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Models/WMStats._AjaxModelBase.js +55 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Models/WMStats._ModelBase.js +77 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Models/WMStats._RequestModelBase.js +127 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Models/import.js +26 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/ViewModels/WMStats.ViewModel.js +511 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/ViewModels/import.js +2 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/Controls/T0/WMStats.Controls.js +117 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/Controls/T1/WMStats.Controls.js +158 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/Controls/WMStats.CommonControls.js +100 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/Controls/import.js +10 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/Graphs/WMStats.SiteHistoryGraph.js +8 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/Graphs/import.js +3 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/HTMLList/T0/WMStats.CategoryDetailList.js +38 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/HTMLList/T0/WMStats.RequestAlertGUI.js +128 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/HTMLList/T0/WMStats.RequestDataList.js +25 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/HTMLList/T0/WMStats.RequestDetailList.js +68 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/HTMLList/T0/WMStats.RequestSummaryList.js +31 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/HTMLList/T1/WMStats.CategoryDetailList.js +54 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/HTMLList/T1/WMStats.RequestAlertGUI.js +81 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/HTMLList/T1/WMStats.RequestDataList.js +26 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/HTMLList/T1/WMStats.RequestDetailList.js +122 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/HTMLList/T1/WMStats.RequestSummaryList.js +35 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/HTMLList/T1/WMStats.ResubmissionList.js +64 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/HTMLList/WMStats.AgentDetailList.js +137 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/HTMLList/WMStats.CategoryTitle.js +20 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/HTMLList/WMStats.HTMLList.js +12 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/HTMLList/WMStats.JobDetailList.js +178 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/HTMLList/WMStats.RequestLogList.js +88 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/HTMLList/WMStats.RequestTitle.js +33 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/HTMLList/import.js +25 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/Tables/T0/WMStats.ActiveRequestTable.js +142 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/Tables/T0/WMStats.RunSummaryTable.js +77 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/Tables/T0/WMStats.TaskSummaryTable.js +127 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/Tables/T0/addCategoryMap.js +10 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/Tables/T1/WMStats.ActiveRequestTable.js +132 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/Tables/T1/WMStats.ActiveRequestTableWithJob.js +164 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/Tables/T1/WMStats.AgentRequestSummaryTable.js +78 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/Tables/T1/WMStats.CMSSWSummaryTable.js +76 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/Tables/T1/WMStats.CampaignSummaryTable.js +76 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/Tables/T1/WMStats.SiteSummaryTable.js +63 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/Tables/T1/WMStats.TaskSummaryTable.js +124 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/Tables/T1/addCategoryMap.js +17 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/Tables/WMStats.JobSummaryTable.js +71 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/Tables/WMStats.Table.js +70 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/Tables/WMStats.TableController.js +130 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/Tables/WMStats.WorkloadSummaryTable.js +62 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/Tables/import.js +26 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/WMStats.CategoryMap.js +45 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/WMStats.View.IndexHTML.js +137 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/import.js +3 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/WMStats.Ajax.js +74 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/WMStats.Couch.js +83 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/WMStats.Globals.js +200 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/WMStats.Utils.js +283 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/import-all.min.js +7 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/loader.js +27 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/minified/global.min.js +639 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/minified/import-all-t0.min.js +4317 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/minified/import-all-t1.min.js +4972 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/lib/jquery.dataTables.columnFilter.js +732 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/_attachments/lib/namespace.js +23 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/filters/deleteFatDocFilter.js +3 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/filters/filterDeletedDocs.js +3 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/filters/repfilter.js +7 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/rewrites.json +110 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/shows/redirect.js +23 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/updates/agentInfo.js +17 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/updates/generalFields.js +11 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/updates/insertRequest.js +13 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/updates/jobLogArchiveLocation.js +10 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/updates/jobStateTransition.js +17 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/updates/jobSummaryState.js +5 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/updates/totalStats.js +39 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStats/validate_doc_update.js +10 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStatsErl/language +1 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStatsErl/views/requestAgentUrl/map.erl +11 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStatsErl/views/requestAgentUrl/reduce.erl +1 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStatsErl1/language +1 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStatsErl1/views/byAgentURL/map.erl +11 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStatsErl2/language +1 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStatsErl2/views/allWorkflows/map.erl +10 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStatsErl2/views/allWorkflows/reduce.erl +1 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStatsErl3/language +1 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStatsErl3/views/jobsByStatusWorkflow/map.erl +32 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStatsErl3/views/jobsByStatusWorkflow/reduce.erl +1 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStatsErl4/language +1 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStatsErl4/views/cooledoffRequests/map.erl +16 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStatsErl4/views/cooledoffRequests/reduce.erl +1 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStatsErl5/language +1 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStatsErl5/views/time/map.erl +11 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStatsErl6/language +1 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStatsErl6/views/requestHistory/map.erl +11 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStatsErl6/views/requestHistory/reduce.erl +1 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStatsErl7/language +1 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStatsErl7/views/agentInfo/map.erl +10 -0
- reqmon-2.3.10.data/data/data/couchapps/WMStatsErl7/views/latestRequest/map.erl +11 -0
- reqmon-2.3.10.data/data/data/couchapps/WorkloadSummary/_attachments/index.html +44 -0
- reqmon-2.3.10.data/data/data/couchapps/WorkloadSummary/_attachments/js/container/histogram.js +141 -0
- reqmon-2.3.10.data/data/data/couchapps/WorkloadSummary/_attachments/js/container/tree.js +67 -0
- reqmon-2.3.10.data/data/data/couchapps/WorkloadSummary/_attachments/js/dataMap/errorData.js +69 -0
- reqmon-2.3.10.data/data/data/couchapps/WorkloadSummary/_attachments/js/htmlFormatter/listFormatter.js +79 -0
- reqmon-2.3.10.data/data/data/couchapps/WorkloadSummary/_attachments/js/layout/gridLayout.js +77 -0
- reqmon-2.3.10.data/data/data/couchapps/WorkloadSummary/_attachments/performanceHistogram.html +46 -0
- reqmon-2.3.10.data/data/data/couchapps/WorkloadSummary/_attachments/style/main.css +17 -0
- reqmon-2.3.10.data/data/data/couchapps/WorkloadSummary/couchapp.json +4 -0
- reqmon-2.3.10.data/data/data/couchapps/WorkloadSummary/filters/repfilter.js +3 -0
- reqmon-2.3.10.data/data/data/couchapps/WorkloadSummary/lib/mustache.js +333 -0
- reqmon-2.3.10.data/data/data/couchapps/WorkloadSummary/lib/validate.js +29 -0
- reqmon-2.3.10.data/data/data/couchapps/WorkloadSummary/lists/completedWorkflows.js +27 -0
- reqmon-2.3.10.data/data/data/couchapps/WorkloadSummary/lists/performanceHistogram.js +15 -0
- reqmon-2.3.10.data/data/data/couchapps/WorkloadSummary/rewrites.json +65 -0
- reqmon-2.3.10.data/data/data/couchapps/WorkloadSummary/shows/histogramByWorkflow.js +75 -0
- reqmon-2.3.10.data/data/data/couchapps/WorkloadSummary/shows/lumiMissingByWorkflow.js +97 -0
- reqmon-2.3.10.data/data/data/couchapps/WorkloadSummary/templates/histogramByWorkflow.html +126 -0
- reqmon-2.3.10.data/data/data/couchapps/WorkloadSummary/templates/performanceData.html +44 -0
- reqmon-2.3.10.data/data/data/couchapps/WorkloadSummary/updates/updateacdc.js +6 -0
- reqmon-2.3.10.data/data/data/couchapps/WorkloadSummary/updates/updatecollection.js +5 -0
- reqmon-2.3.10.data/data/data/couchapps/WorkloadSummary/validate_doc_update.js +8 -0
- reqmon-2.3.10.data/data/data/couchapps/WorkloadSummary/vendor/protovis/_attachments/protovis-r3.2.js +277 -0
- reqmon-2.3.10.data/data/data/couchapps/WorkloadSummary/views/outputDataByPrimDs/map.js +21 -0
- reqmon-2.3.10.data/data/data/couchapps/WorkloadSummary/views/performanceDataByCampaign/map.js +19 -0
- reqmon-2.3.10.data/data/data/couchapps/WorkloadSummary/views/summaryByInputdataset/map.js +7 -0
- reqmon-2.3.10.data/data/data/couchapps/WorkloadSummary/views/summaryByOutputdataset/map.js +7 -0
- reqmon-2.3.10.dist-info/LICENSE +202 -0
- reqmon-2.3.10.dist-info/METADATA +24 -0
- reqmon-2.3.10.dist-info/NOTICE +16 -0
- reqmon-2.3.10.dist-info/RECORD +424 -0
- reqmon-2.3.10.dist-info/WHEEL +5 -0
- reqmon-2.3.10.dist-info/top_level.txt +2 -0
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Main ReqMgr web page handler.
|
|
3
|
+
|
|
4
|
+
"""
|
|
5
|
+
import re
|
|
6
|
+
from WMCore.REST.Server import RESTFrontPage
|
|
7
|
+
|
|
8
|
+
# path to static resources
|
|
9
|
+
RX_STATIC_DIR_PATH = re.compile(r"^([a-zA-Z]+/)+[-a-z0-9_]+\.(?:css|js|png|gif|html)$")
|
|
10
|
+
|
|
11
|
+
class FrontPage(RESTFrontPage):
|
|
12
|
+
|
|
13
|
+
def __init__(self, app, config, mount):
|
|
14
|
+
"""
|
|
15
|
+
:arg app: reference to the application object.
|
|
16
|
+
:arg config: reference to the configuration.
|
|
17
|
+
:arg str mount: URL mount point.
|
|
18
|
+
|
|
19
|
+
"""
|
|
20
|
+
|
|
21
|
+
# must be in a static content directory
|
|
22
|
+
frontpage = "html/WMStats/index.html"
|
|
23
|
+
roots = \
|
|
24
|
+
{
|
|
25
|
+
"html":
|
|
26
|
+
{
|
|
27
|
+
# without repeating the 'html' here, it doesn't work
|
|
28
|
+
# due to path gymnastics in WMCore.REST.Server.py
|
|
29
|
+
# rather messy figuring out static content dir by
|
|
30
|
+
# counting file separators and making it compatible
|
|
31
|
+
# between localhost and VM running, hence the config
|
|
32
|
+
# value here
|
|
33
|
+
"root": "%s/html/" % config.static_content_dir,
|
|
34
|
+
|
|
35
|
+
"rx": RX_STATIC_DIR_PATH
|
|
36
|
+
},
|
|
37
|
+
"js":
|
|
38
|
+
{ "root": "%s/html/WMStats/js/" % config.static_content_dir,
|
|
39
|
+
"rx": re.compile(r"^([a-zA-Z]+/)+[-a-z0-9_]+\.(?:js)$")
|
|
40
|
+
},
|
|
41
|
+
"css":
|
|
42
|
+
{ "root": "%s/html/WMStats/css/" % config.static_content_dir,
|
|
43
|
+
"rx": re.compile(r"^([a-zA-Z]+/)+[-a-z0-9_]+\.(?:css)$")
|
|
44
|
+
},
|
|
45
|
+
"images":
|
|
46
|
+
{ "root": "%s/html/WMStats/images/" % config.static_content_dir,
|
|
47
|
+
"rx": re.compile(r"^([a-zA-Z]+/)+[-a-z0-9_]+\.(?:png|gif)$")
|
|
48
|
+
},
|
|
49
|
+
"lib":
|
|
50
|
+
{ "root": "%s/html/WMStats/lib/" % config.static_content_dir,
|
|
51
|
+
"rx": RX_STATIC_DIR_PATH
|
|
52
|
+
},
|
|
53
|
+
"fonts":
|
|
54
|
+
{ "root": "%s/html/WMStats/fonts/" % config.static_content_dir,
|
|
55
|
+
"rx": RX_STATIC_DIR_PATH
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
}
|
|
59
|
+
RESTFrontPage.__init__(self, app, config, mount, frontpage, roots)
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1,342 @@
|
|
|
1
|
+
from __future__ import print_function
|
|
2
|
+
|
|
3
|
+
from builtins import str, bytes, int
|
|
4
|
+
from future.utils import viewitems
|
|
5
|
+
from Utils.PythonVersion import PY2
|
|
6
|
+
|
|
7
|
+
import sys
|
|
8
|
+
import types
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class _EmptyClass(object):
|
|
12
|
+
pass
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
class JSONThunker(object):
|
|
16
|
+
"""
|
|
17
|
+
_JSONThunker_
|
|
18
|
+
Converts an arbitrary object to <-> from a jsonable object.
|
|
19
|
+
|
|
20
|
+
Will, for the most part "do the right thing" about various instance objects
|
|
21
|
+
by storing their class information along with their data in a dict. Handles
|
|
22
|
+
a recursion limit to prevent infinite recursion.
|
|
23
|
+
|
|
24
|
+
self.passThroughTypes - stores a list of types that should be passed
|
|
25
|
+
through unchanged to the JSON parser
|
|
26
|
+
|
|
27
|
+
self.blackListedModules - a list of modules that should not be stored in
|
|
28
|
+
the JSON.
|
|
29
|
+
|
|
30
|
+
"""
|
|
31
|
+
|
|
32
|
+
def __init__(self):
|
|
33
|
+
self.passThroughTypes = (type(None),
|
|
34
|
+
bool,
|
|
35
|
+
int,
|
|
36
|
+
float,
|
|
37
|
+
complex,
|
|
38
|
+
str,
|
|
39
|
+
bytes,
|
|
40
|
+
)
|
|
41
|
+
# objects that inherit from dict should be treated as a dict
|
|
42
|
+
# they don't store their data in __dict__. There was enough
|
|
43
|
+
# of those classes that it warrented making a special case
|
|
44
|
+
self.dictSortOfObjects = (('WMCore.Datastructs.Job', 'Job'),
|
|
45
|
+
('WMCore.WMBS.Job', 'Job'),
|
|
46
|
+
('WMCore.Database.CMSCouch', 'Document'))
|
|
47
|
+
# ditto above, but for lists
|
|
48
|
+
self.listSortOfObjects = (('WMCore.DataStructs.JobPackage', 'JobPackage'),
|
|
49
|
+
('WMCore.WMBS.JobPackage', 'JobPackage'),)
|
|
50
|
+
|
|
51
|
+
self.foundIDs = {}
|
|
52
|
+
# modules we don't want JSONed
|
|
53
|
+
self.blackListedModules = ('sqlalchemy.engine.threadlocal',
|
|
54
|
+
'WMCore.Database.DBCore',
|
|
55
|
+
'logging',
|
|
56
|
+
'WMCore.DAOFactory',
|
|
57
|
+
'WMCore.WMFactory',
|
|
58
|
+
'WMFactory',
|
|
59
|
+
'WMCore.Configuration',
|
|
60
|
+
'WMCore.Database.Transaction',
|
|
61
|
+
'threading',
|
|
62
|
+
'datetime')
|
|
63
|
+
|
|
64
|
+
def checkRecursion(self, data):
|
|
65
|
+
"""
|
|
66
|
+
handles checking for infinite recursion
|
|
67
|
+
"""
|
|
68
|
+
if id(data) in self.foundIDs:
|
|
69
|
+
if self.foundIDs[id(data)] > 5:
|
|
70
|
+
self.unrecurse(data)
|
|
71
|
+
return "**RECURSION**"
|
|
72
|
+
else:
|
|
73
|
+
self.foundIDs[id(data)] += 1
|
|
74
|
+
return data
|
|
75
|
+
else:
|
|
76
|
+
self.foundIDs[id(data)] = 1
|
|
77
|
+
return data
|
|
78
|
+
|
|
79
|
+
def unrecurse(self, data):
|
|
80
|
+
"""
|
|
81
|
+
backs off the recursion counter if we're returning from _thunk
|
|
82
|
+
"""
|
|
83
|
+
try:
|
|
84
|
+
self.foundIDs[id(data)] -= 1
|
|
85
|
+
except:
|
|
86
|
+
print("Could not find count for id %s of type %s data %s" % (id(data), type(data), data))
|
|
87
|
+
raise
|
|
88
|
+
|
|
89
|
+
def checkBlackListed(self, data):
|
|
90
|
+
"""
|
|
91
|
+
checks to see if a given object is from a blacklisted module
|
|
92
|
+
"""
|
|
93
|
+
try:
|
|
94
|
+
# special case
|
|
95
|
+
if data.__class__.__module__ == 'WMCore.Database.CMSCouch' and data.__class__.__name__ == 'Document':
|
|
96
|
+
data.__class__ = type({})
|
|
97
|
+
return data
|
|
98
|
+
if data.__class__.__module__ in self.blackListedModules:
|
|
99
|
+
return "Blacklisted JSON object: module %s, name %s, str() %s" % \
|
|
100
|
+
(data.__class__.__module__, data.__class__.__name__, str(data))
|
|
101
|
+
else:
|
|
102
|
+
return data
|
|
103
|
+
except Exception:
|
|
104
|
+
return data
|
|
105
|
+
|
|
106
|
+
def thunk(self, toThunk):
|
|
107
|
+
"""
|
|
108
|
+
Thunk - turns an arbitrary object into a JSONable object
|
|
109
|
+
"""
|
|
110
|
+
self.foundIDs = {}
|
|
111
|
+
data = self._thunk(toThunk)
|
|
112
|
+
return data
|
|
113
|
+
|
|
114
|
+
def unthunk(self, data):
|
|
115
|
+
"""
|
|
116
|
+
unthunk - turns a previously 'thunked' object back into a python object
|
|
117
|
+
"""
|
|
118
|
+
return self._unthunk(data)
|
|
119
|
+
|
|
120
|
+
def handleSetThunk(self, toThunk):
|
|
121
|
+
toThunk = self.checkRecursion(toThunk)
|
|
122
|
+
tempDict = {'thunker_encoded_json': True, 'type': 'set'}
|
|
123
|
+
tempDict['set'] = self._thunk(list(toThunk))
|
|
124
|
+
self.unrecurse(toThunk)
|
|
125
|
+
return tempDict
|
|
126
|
+
|
|
127
|
+
def handleListThunk(self, toThunk):
|
|
128
|
+
toThunk = self.checkRecursion(toThunk)
|
|
129
|
+
for k, v in enumerate(toThunk):
|
|
130
|
+
toThunk[k] = self._thunk(v)
|
|
131
|
+
self.unrecurse(toThunk)
|
|
132
|
+
return toThunk
|
|
133
|
+
|
|
134
|
+
def handleDictThunk(self, toThunk):
|
|
135
|
+
toThunk = self.checkRecursion(toThunk)
|
|
136
|
+
special = False
|
|
137
|
+
tmpdict = {}
|
|
138
|
+
for k, v in viewitems(toThunk):
|
|
139
|
+
if type(k) == type(int):
|
|
140
|
+
special = True
|
|
141
|
+
tmpdict['_i:%s' % k] = self._thunk(v)
|
|
142
|
+
elif type(k) == type(float):
|
|
143
|
+
special = True
|
|
144
|
+
tmpdict['_f:%s' % k] = self._thunk(v)
|
|
145
|
+
else:
|
|
146
|
+
tmpdict[k] = self._thunk(v)
|
|
147
|
+
if special:
|
|
148
|
+
toThunk['thunker_encoded_json'] = self._thunk(True)
|
|
149
|
+
toThunk['type'] = self._thunk('dict')
|
|
150
|
+
toThunk['dict'] = tmpdict
|
|
151
|
+
else:
|
|
152
|
+
toThunk.update(tmpdict)
|
|
153
|
+
self.unrecurse(toThunk)
|
|
154
|
+
return toThunk
|
|
155
|
+
|
|
156
|
+
def handleObjectThunk(self, toThunk):
|
|
157
|
+
toThunk = self.checkRecursion(toThunk)
|
|
158
|
+
toThunk = self.checkBlackListed(toThunk)
|
|
159
|
+
|
|
160
|
+
if isinstance(toThunk, (str, bytes)):
|
|
161
|
+
# things that got blacklisted
|
|
162
|
+
return toThunk
|
|
163
|
+
if hasattr(toThunk, '__to_json__'):
|
|
164
|
+
# Use classes own json thunker
|
|
165
|
+
toThunk2 = toThunk.__to_json__(self)
|
|
166
|
+
self.unrecurse(toThunk)
|
|
167
|
+
return toThunk2
|
|
168
|
+
elif isinstance(toThunk, dict):
|
|
169
|
+
toThunk2 = self.handleDictObjectThunk(toThunk)
|
|
170
|
+
self.unrecurse(toThunk)
|
|
171
|
+
return toThunk2
|
|
172
|
+
elif isinstance(toThunk, list):
|
|
173
|
+
# a mother thunking list
|
|
174
|
+
toThunk2 = self.handleListObjectThunk(toThunk)
|
|
175
|
+
self.unrecurse(toThunk)
|
|
176
|
+
return toThunk2
|
|
177
|
+
else:
|
|
178
|
+
try:
|
|
179
|
+
thunktype = '%s.%s' % (toThunk.__class__.__module__,
|
|
180
|
+
toThunk.__class__.__name__)
|
|
181
|
+
tempDict = {'thunker_encoded_json': True, 'type': thunktype}
|
|
182
|
+
tempDict[thunktype] = self._thunk(toThunk.__dict__)
|
|
183
|
+
self.unrecurse(toThunk)
|
|
184
|
+
return tempDict
|
|
185
|
+
except Exception as e:
|
|
186
|
+
tempDict = {'json_thunk_exception_': "%s" % e}
|
|
187
|
+
self.unrecurse(toThunk)
|
|
188
|
+
return tempDict
|
|
189
|
+
|
|
190
|
+
def handleDictObjectThunk(self, data):
|
|
191
|
+
thunktype = '%s.%s' % (data.__class__.__module__,
|
|
192
|
+
data.__class__.__name__)
|
|
193
|
+
tempDict = {'thunker_encoded_json': True,
|
|
194
|
+
'is_dict': True,
|
|
195
|
+
'type': thunktype,
|
|
196
|
+
thunktype: {}}
|
|
197
|
+
|
|
198
|
+
for k, v in viewitems(data.__dict__):
|
|
199
|
+
tempDict[k] = self._thunk(v)
|
|
200
|
+
for k, v in viewitems(data):
|
|
201
|
+
tempDict[thunktype][k] = self._thunk(v)
|
|
202
|
+
|
|
203
|
+
return tempDict
|
|
204
|
+
|
|
205
|
+
def handleDictObjectUnThunk(self, value, data):
|
|
206
|
+
data.pop('thunker_encoded_json', False)
|
|
207
|
+
data.pop('is_dict', False)
|
|
208
|
+
thunktype = data.pop('type', False)
|
|
209
|
+
|
|
210
|
+
for k, v in viewitems(data):
|
|
211
|
+
if k == thunktype:
|
|
212
|
+
for k2, v2 in viewitems(data[thunktype]):
|
|
213
|
+
value[k2] = self._unthunk(v2)
|
|
214
|
+
else:
|
|
215
|
+
value.__dict__[k] = self._unthunk(v)
|
|
216
|
+
return value
|
|
217
|
+
|
|
218
|
+
def handleListObjectThunk(self, data):
|
|
219
|
+
thunktype = '%s.%s' % (data.__class__.__module__,
|
|
220
|
+
data.__class__.__name__)
|
|
221
|
+
tempDict = {'thunker_encoded_json': True,
|
|
222
|
+
'is_list': True,
|
|
223
|
+
'type': thunktype,
|
|
224
|
+
thunktype: []}
|
|
225
|
+
for k, v in enumerate(data):
|
|
226
|
+
tempDict['thunktype'].append(self._thunk(v))
|
|
227
|
+
for k, v in viewitems(data.__dict__):
|
|
228
|
+
tempDict[k] = self._thunk(v)
|
|
229
|
+
return tempDict
|
|
230
|
+
|
|
231
|
+
def handleListObjectUnThunk(self, value, data):
|
|
232
|
+
data.pop('thunker_encoded_json', False)
|
|
233
|
+
data.pop('is_list', False)
|
|
234
|
+
thunktype = data.pop('type')
|
|
235
|
+
for k, v in viewitems(data[thunktype]):
|
|
236
|
+
setattr(value, k, self._unthunk(v))
|
|
237
|
+
|
|
238
|
+
for k, v in viewitems(data):
|
|
239
|
+
if k == thunktype:
|
|
240
|
+
continue
|
|
241
|
+
value.__dict__ = self._unthunk(v)
|
|
242
|
+
return value
|
|
243
|
+
|
|
244
|
+
def _thunk(self, toThunk):
|
|
245
|
+
"""
|
|
246
|
+
helper function for thunk, does the actual work
|
|
247
|
+
"""
|
|
248
|
+
if isinstance(toThunk, self.passThroughTypes):
|
|
249
|
+
return toThunk
|
|
250
|
+
elif type(toThunk) is list:
|
|
251
|
+
return self.handleListThunk(toThunk)
|
|
252
|
+
elif type(toThunk) is dict:
|
|
253
|
+
return self.handleDictThunk(toThunk)
|
|
254
|
+
elif type(toThunk) is set:
|
|
255
|
+
return self.handleSetThunk(toThunk)
|
|
256
|
+
elif type(toThunk) is types.FunctionType:
|
|
257
|
+
self.unrecurse(toThunk)
|
|
258
|
+
return "function reference"
|
|
259
|
+
elif isinstance(toThunk, object):
|
|
260
|
+
return self.handleObjectThunk(toThunk)
|
|
261
|
+
else:
|
|
262
|
+
self.unrecurse(toThunk)
|
|
263
|
+
raise RuntimeError(type(toThunk))
|
|
264
|
+
|
|
265
|
+
def _unthunk(self, jsondata):
|
|
266
|
+
"""
|
|
267
|
+
_unthunk - does the actual work for unthunk
|
|
268
|
+
"""
|
|
269
|
+
if PY2 and type(jsondata) is str:
|
|
270
|
+
return jsondata.encode("utf-8")
|
|
271
|
+
if type(jsondata) is dict:
|
|
272
|
+
if 'thunker_encoded_json' in jsondata:
|
|
273
|
+
# we've got a live one...
|
|
274
|
+
if jsondata['type'] == 'set':
|
|
275
|
+
newSet = set()
|
|
276
|
+
for i in self._unthunk(jsondata['set']):
|
|
277
|
+
newSet.add(self._unthunk(i))
|
|
278
|
+
return newSet
|
|
279
|
+
if jsondata['type'] == 'dict':
|
|
280
|
+
# We have a "special" dict
|
|
281
|
+
data = {}
|
|
282
|
+
for k, v in viewitems(jsondata['dict']):
|
|
283
|
+
tmp = self._unthunk(v)
|
|
284
|
+
if k.startswith('_i:'):
|
|
285
|
+
data[int(k.lstrip('_i:'))] = tmp
|
|
286
|
+
elif k.startswith('_f:'):
|
|
287
|
+
data[float(k.lstrip('_f:'))] = tmp
|
|
288
|
+
else:
|
|
289
|
+
data[k] = tmp
|
|
290
|
+
return data
|
|
291
|
+
else:
|
|
292
|
+
# spawn up an instance.. good luck
|
|
293
|
+
# here be monsters
|
|
294
|
+
# inspired from python's pickle code
|
|
295
|
+
ourClass = self.getThunkedClass(jsondata)
|
|
296
|
+
|
|
297
|
+
value = _EmptyClass()
|
|
298
|
+
if hasattr(ourClass, '__from_json__'):
|
|
299
|
+
# Use classes own json loader
|
|
300
|
+
try:
|
|
301
|
+
value.__class__ = ourClass
|
|
302
|
+
except Exception:
|
|
303
|
+
value = ourClass()
|
|
304
|
+
value = ourClass.__from_json__(value, jsondata, self)
|
|
305
|
+
elif 'thunker_encoded_json' in jsondata and 'is_dict' in jsondata:
|
|
306
|
+
try:
|
|
307
|
+
value.__class__ = ourClass
|
|
308
|
+
except Exception:
|
|
309
|
+
value = ourClass()
|
|
310
|
+
value = self.handleDictObjectUnThunk(value, jsondata)
|
|
311
|
+
elif 'thunker_encoded_json' in jsondata:
|
|
312
|
+
try:
|
|
313
|
+
value.__class__ = ourClass
|
|
314
|
+
except Exception:
|
|
315
|
+
value = ourClass()
|
|
316
|
+
value = self.handleListObjectUnThunk(value, jsondata)
|
|
317
|
+
else:
|
|
318
|
+
raise RuntimeError('Could not unthunk a class. Code to try was removed because it had errors.')
|
|
319
|
+
return value
|
|
320
|
+
else:
|
|
321
|
+
data = {}
|
|
322
|
+
for k, v in viewitems(jsondata):
|
|
323
|
+
data[k] = self._unthunk(v)
|
|
324
|
+
return data
|
|
325
|
+
|
|
326
|
+
else:
|
|
327
|
+
return jsondata
|
|
328
|
+
|
|
329
|
+
@staticmethod
|
|
330
|
+
def getThunkedClass(jsondata):
|
|
331
|
+
"""
|
|
332
|
+
Work out the class from it's thunked json representation
|
|
333
|
+
"""
|
|
334
|
+
module = jsondata['type'].rsplit('.', 1)[0]
|
|
335
|
+
name = jsondata['type'].rsplit('.', 1)[1]
|
|
336
|
+
if (module == 'WMCore.Services.Requests') and (name == JSONThunker):
|
|
337
|
+
raise RuntimeError("Attempted to unthunk a JSONThunker..")
|
|
338
|
+
|
|
339
|
+
__import__(module)
|
|
340
|
+
mod = sys.modules[module]
|
|
341
|
+
ourClass = getattr(mod, name)
|
|
342
|
+
return ourClass
|
WMCore/__init__.py
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
# Script to patch the server from the local developer area. The user's
|
|
3
|
+
# stuff goes into xbin/xlib/xpython directories, which are in front of
|
|
4
|
+
# the server's own bin/lib/python directories. So anything in x* will
|
|
5
|
+
# be picked up in preference to the server-distributed files.
|
|
6
|
+
|
|
7
|
+
R=${WMCORE_ROOT-$(dirname $(dirname $0))}
|
|
8
|
+
[ X"$R" = X ] && { echo '$WMCORE_ROOT not set' 1>&2; exit 1; }
|
|
9
|
+
|
|
10
|
+
[ -x $R/bin/wmc-dist-patch ] || { echo "$R does not appear to be the right place" 1>&2; exit 1; }
|
|
11
|
+
|
|
12
|
+
set -ex
|
|
13
|
+
rm -fr $R/x{lib,bin,python,data,doc}/{*,.??*}
|
|
14
|
+
python setup.py build_system ${1+"$@"}
|
|
15
|
+
python setup.py install_system ${1+"$@"} --patch --prefix=$R
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
# Script to unpatch the server area. Simply clears out xbin/xlib/xpython
|
|
3
|
+
# so the server will then pick up the files distributed with the RPM.
|
|
4
|
+
|
|
5
|
+
R=${WMCORE_ROOT-$(dirname $(dirname $0))}
|
|
6
|
+
[ X"$R" = X ] && { echo '$WMCORE_ROOT not set' 1>&2; exit 1; }
|
|
7
|
+
[ -x $R/bin/wmc-dist-patch ] || { echo "$R does not appear to be the right place" 1>&2; exit 1; }
|
|
8
|
+
exec rm -fr $R/x{lib,bin,python,data,doc}/{*,.??*}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
_design/LogDB
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
javascript
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
_count
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
_design/T0Request
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
javascript
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
// update function
|
|
2
|
+
// input: valueKey (what to change), value - new value
|
|
3
|
+
function(doc, req)
|
|
4
|
+
{
|
|
5
|
+
|
|
6
|
+
if (doc === null) {
|
|
7
|
+
return [null, "Error: document not found"];
|
|
8
|
+
};
|
|
9
|
+
/* Need to redefine the state transition comment out for now.
|
|
10
|
+
var allowedTranistion = {
|
|
11
|
+
"new": ["Closed"],
|
|
12
|
+
"Closed": ["Merge", "AlcaSkim"],
|
|
13
|
+
"AlcaSkim": ["Merge"],
|
|
14
|
+
"Merge": ["Harvesting", "Processing Done"],
|
|
15
|
+
"Harvesting": ["Processing Done"],
|
|
16
|
+
"Processing Done": ["completed"],
|
|
17
|
+
"completed": ["normal-archived"],
|
|
18
|
+
"normal-archived": []
|
|
19
|
+
};
|
|
20
|
+
*/
|
|
21
|
+
var allowedStates = ["new", "Closed", "Merge", "AlcaSkim", "Harvesting",
|
|
22
|
+
"Processing Done", "completed", "normal-archived"];
|
|
23
|
+
|
|
24
|
+
function isAllowedTransiton(oldStatus, newStatus) {
|
|
25
|
+
// This is tempro
|
|
26
|
+
if (oldStatus === "completed" && newStatus !== "normal-archived") {
|
|
27
|
+
return false;
|
|
28
|
+
} else if (oldStatus === "normal-archived"){
|
|
29
|
+
return false;
|
|
30
|
+
} else if (oldStatus === newStatus){
|
|
31
|
+
return false;
|
|
32
|
+
}
|
|
33
|
+
return true;
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
function updateTransition(newStatus) {
|
|
37
|
+
|
|
38
|
+
if (allowedStates.indexOf(newStatus) === -1) {
|
|
39
|
+
return "Not allowed state: '" + newStatus + "'";
|
|
40
|
+
}
|
|
41
|
+
if (doc.RequestStatus && !isAllowedTransiton(doc.RequestStatus, newStatus)) {
|
|
42
|
+
// don't update the status just ignore
|
|
43
|
+
return "Not allowed transition, from: '" + doc.RequestStatus + "' to '" + newStatus + "'";
|
|
44
|
+
}
|
|
45
|
+
doc.RequestStatus = newStatus;
|
|
46
|
+
|
|
47
|
+
var currentTS = Math.round((new Date()).getTime() / 1000);
|
|
48
|
+
var statusObj = {"Status": doc.RequestStatus, "UpdateTime": currentTS};
|
|
49
|
+
|
|
50
|
+
if (!doc.RequestTransition) {
|
|
51
|
+
doc.RequestTransition = new Array();
|
|
52
|
+
doc.RequestTransition.push(statusObj);
|
|
53
|
+
} else {
|
|
54
|
+
doc.RequestTransition.push(statusObj);
|
|
55
|
+
}
|
|
56
|
+
return "OK";
|
|
57
|
+
}
|
|
58
|
+
// req.query is dictionary fields into the
|
|
59
|
+
// CMSCouch.Database.updateDocument() method, which is a dictionary
|
|
60
|
+
var message = "OK";
|
|
61
|
+
var newValues = req.query;
|
|
62
|
+
for (key in newValues)
|
|
63
|
+
{
|
|
64
|
+
if (key == "RequestStatus") {
|
|
65
|
+
message = updateTransition(newValues[key]);
|
|
66
|
+
} else if (key == "RequestTransition") {
|
|
67
|
+
doc[key] = JSON.parse(newValues[key]);
|
|
68
|
+
} else {
|
|
69
|
+
doc[key] = newValues[key];
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
}
|
|
73
|
+
if (message == "OK") {
|
|
74
|
+
return [doc, message];
|
|
75
|
+
} else {
|
|
76
|
+
// then do not change anything in the document
|
|
77
|
+
return [null, message];
|
|
78
|
+
}
|
|
79
|
+
}
|