From dc65633f4dea14f06030d4d2d77d40843e076587 Mon Sep 17 00:00:00 2001 From: Tlams Date: Thu, 8 Feb 2018 18:18:02 +0000 Subject: [PATCH] Update mapping API for clusters, disks and sto --- code/scripts/main/startup.py | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/code/scripts/main/startup.py b/code/scripts/main/startup.py index a9e6b5c..a81bac3 100644 --- a/code/scripts/main/startup.py +++ b/code/scripts/main/startup.py @@ -90,18 +90,35 @@ if __name__ == "__main__": '/api/v1/administration/cluster/new', 'Cluster', # CACHE DATA (MONGO) + # date/cluster/node/vmid + + # Cluster mapping + '/api/v1/static/(cluster)/([0-9]+)/', 'QueryCache_Infra', + + # Disks mapping + '/api/v1/static/(disks)/([0-9]+)/([0-9a-zA-Z]+)/([0-9a-zA-Z]+)/([0-9]+)', 'QueryCache_Infra', + '/api/v1/static/(disks)/([0-9]+)/([0-9a-zA-Z]+)/([0-9a-zA-Z]+)/', 'QueryCache_Infra', + '/api/v1/static/(disks)/([0-9]+)/([0-9a-zA-Z]+)/', 'QueryCache_Infra', + '/api/v1/static/(disks)/([0-9]+)/', 'QueryCache_Infra', + + # Storages mapping + '/api/v1/static/(storages)/([0-9]+)/([0-9a-zA-Z]+)/([0-9a-zA-Z]+)/', 'QueryCache_Infra', + '/api/v1/static/(storages)/([0-9]+)/([0-9a-zA-Z]+)/', 'QueryCache_Infra', + '/api/v1/static/(storages)/([0-9]+)/', 'QueryCache_Infra', + + # Instances mapping '/api/v1/static/(instances)/([0-9]+)/([0-9a-zA-Z]+)/([0-9a-zA-Z]+)/([0-9]+)', 'QueryCache_Infra', '/api/v1/static/(instances)/([0-9]+)/([0-9a-zA-Z]+)/([0-9a-zA-Z]+)/', 'QueryCache_Infra', '/api/v1/static/(instances)/([0-9]+)/([0-9a-zA-Z]+)/', 'QueryCache_Infra', '/api/v1/static/(instances)/([0-9]+)/', 'QueryCache_Infra', - # date/cluster/node + # Nodes mapping '/api/v1/static/(nodes)/([0-9]+)/([0-9a-zA-Z]+)/([0-9a-zA-Z]+)', 'QueryCache_Infra', '/api/v1/static/(nodes)/([0-9]+)/([0-9a-zA-Z]+)/', 'QueryCache_Infra', '/api/v1/static/(nodes)/([0-9]+)/', 'QueryCache_Infra', - # cluster + # cluster mapping '/api/v1/static/(clusters)/([0-9]+)/(?:[0-9a-zA-Z]+)', 'QueryCache_Infra', '/api/v1/static/(clusters)/([0-9]+)/', 'QueryCache_Infra',