increment version
parent
88ed88f2b5
commit
d39b4a3109
|
|
@ -40,7 +40,8 @@ class KRParser:
|
||||||
groups=p.parseServicesAndMethods(subject)
|
groups=p.parseServicesAndMethods(subject)
|
||||||
|
|
||||||
if len(groups) > 0:
|
if len(groups) > 0:
|
||||||
groups[0]["pattern"]=str(p.__class__)
|
for g in groups:
|
||||||
|
g["pattern"]=str(p.__class__)
|
||||||
break
|
break
|
||||||
|
|
||||||
return groups
|
return groups
|
||||||
|
|
@ -152,7 +153,7 @@ class KRParser:
|
||||||
if len(entities)> 0:
|
if len(entities)> 0:
|
||||||
for ent in entities:
|
for ent in entities:
|
||||||
|
|
||||||
tmp_kr={"displayName":ent["displayName"], "entityId":ent["entityId"], "groupId":gid, "hasData":{}, "count":{},"services":[], "found":False, "foundCount":0, "exception":""}
|
tmp_kr=merge({"displayName":ent["displayName"], "entityId":ent["entityId"], "groupId":gid, "hasData":{}, "count":{},"services":[], "found":False, "foundCount":0, "exception":"", "_mInSloDef": group["_mInSloDef"] }, self.config["extendResultObjects"])
|
||||||
|
|
||||||
if "isServiceMethodOfService" in ent["fromRelationships"]:
|
if "isServiceMethodOfService" in ent["fromRelationships"]:
|
||||||
tmp_kr["services"]=ent["fromRelationships"]["isServiceMethodOfService"]
|
tmp_kr["services"]=ent["fromRelationships"]["isServiceMethodOfService"]
|
||||||
|
|
@ -164,9 +165,9 @@ class KRParser:
|
||||||
|
|
||||||
else:
|
else:
|
||||||
if k.startswith('SERVICE_METHOD-'):
|
if k.startswith('SERVICE_METHOD-'):
|
||||||
tmp_kr=merge({"displayName": None,"comparer": "entityId", "entityId":k, "groupId":gid, "hasData":{},"count":{},"services":[], "found":False, "foundCount":0, "exception":""}, self.config["extendResultObjects"]) #"exists":None, 'hasData_1W':None,
|
tmp_kr=merge({"displayName": None,"comparer": "entityId", "entityId":k, "groupId":gid, "hasData":{},"count":{},"services":[], "found":False, "foundCount":0, "exception":"", "_mInSloDef": group["_mInSloDef"]}, self.config["extendResultObjects"]) #"exists":None, 'hasData_1W':None,
|
||||||
else:
|
else:
|
||||||
tmp_kr=merge({"displayName":k,"comparer": "displayName", "entityId":None, "groupId":gid, "hasData":{}, "count":{},"services":[], "found":False, "foundCount":0, "exception":""}, self.config["extendResultObjects"]) #"exists":None, 'hasData_1W':None,
|
tmp_kr=merge({"displayName":k,"comparer": "displayName", "entityId":None, "groupId":gid, "hasData":{}, "count":{},"services":[], "found":False, "foundCount":0, "exception":"", "_mInSloDef": group["_mInSloDef"]}, self.config["extendResultObjects"]) #"exists":None, 'hasData_1W':None,
|
||||||
|
|
||||||
tmp_KR.append(tmp_kr)
|
tmp_KR.append(tmp_kr)
|
||||||
|
|
||||||
|
|
@ -297,6 +298,7 @@ class KRParser:
|
||||||
|
|
||||||
for m in tmp_methods:
|
for m in tmp_methods:
|
||||||
group["methods"].append(m["entityId"])
|
group["methods"].append(m["entityId"])
|
||||||
|
|
||||||
# tmp=merge({"displayName": None,"comparer": "entityId", "entityId":m["entityId"], "groupId":gid, "hasData":{}, "count":{},"services":[], "found":False, "foundCount":0, "exception":""},self.config["extendResultObjects"]) #"exists":None, 'hasData_1W':None,
|
# tmp=merge({"displayName": None,"comparer": "entityId", "entityId":m["entityId"], "groupId":gid, "hasData":{}, "count":{},"services":[], "found":False, "foundCount":0, "exception":""},self.config["extendResultObjects"]) #"exists":None, 'hasData_1W':None,
|
||||||
# kr.keyRequests.append(tmp)
|
# kr.keyRequests.append(tmp)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@ class Pattern1:
|
||||||
for r in result:
|
for r in result:
|
||||||
services=[s.strip() for s in urllib.parse.unquote_plus(r[0]).split(",")]
|
services=[s.strip() for s in urllib.parse.unquote_plus(r[0]).split(",")]
|
||||||
methods=[s.strip() for s in urllib.parse.unquote_plus(r[1]).split(",")]
|
methods=[s.strip() for s in urllib.parse.unquote_plus(r[1]).split(",")]
|
||||||
groups.append({"services":services, "methods":methods})
|
groups.append({"services":services, "methods":methods, "_mInSloDef":True})
|
||||||
#return services, methods
|
#return services, methods
|
||||||
return groups
|
return groups
|
||||||
|
|
||||||
|
|
@ -38,7 +38,7 @@ class Pattern2:
|
||||||
for r in result:
|
for r in result:
|
||||||
services=[s.strip() for s in urllib.parse.unquote_plus(r[0]).split(",")]
|
services=[s.strip() for s in urllib.parse.unquote_plus(r[0]).split(",")]
|
||||||
methods=[s.strip() for s in urllib.parse.unquote_plus(r[2]).split(",")]
|
methods=[s.strip() for s in urllib.parse.unquote_plus(r[2]).split(",")]
|
||||||
groups.append({"services":services, "methods":methods})
|
groups.append({"services":services, "methods":methods, "_mInSloDef":True})
|
||||||
|
|
||||||
return groups
|
return groups
|
||||||
|
|
||||||
|
|
@ -55,7 +55,7 @@ class Pattern3:
|
||||||
if result:
|
if result:
|
||||||
for r in result:
|
for r in result:
|
||||||
methods=[s.strip() for s in urllib.parse.unquote_plus(r).split(",")]
|
methods=[s.strip() for s in urllib.parse.unquote_plus(r).split(",")]
|
||||||
groups.append({"services":[], "methods":methods})
|
groups.append({"services":[], "methods":methods, "_mInSloDef":True})
|
||||||
|
|
||||||
return groups
|
return groups
|
||||||
|
|
||||||
|
|
@ -72,7 +72,7 @@ class Pattern4:
|
||||||
#if not r:
|
#if not r:
|
||||||
#methods=[s.strip() for s in r.split(",")]
|
#methods=[s.strip() for s in r.split(",")]
|
||||||
services=[s.strip() for s in urllib.parse.unquote_plus(r).split(",")]
|
services=[s.strip() for s in urllib.parse.unquote_plus(r).split(",")]
|
||||||
groups.append({"services":services, "methods":[]})
|
groups.append({"services":services, "methods":[], "_mInSloDef":False})
|
||||||
|
|
||||||
return groups
|
return groups
|
||||||
|
|
||||||
|
|
@ -92,6 +92,6 @@ class Pattern5:
|
||||||
for r in result:
|
for r in result:
|
||||||
services=[s.strip() for s in urllib.parse.unquote_plus(r).split(",")]
|
services=[s.strip() for s in urllib.parse.unquote_plus(r).split(",")]
|
||||||
#methods=[s.strip() for s in urllib.parse.unquote_plus(r[1]).split(",")]
|
#methods=[s.strip() for s in urllib.parse.unquote_plus(r[1]).split(",")]
|
||||||
groups.append({"services":services, "methods":[]})
|
groups.append({"services":services, "methods":[], "_mInSloDef":False})
|
||||||
#return services, methods
|
#return services, methods
|
||||||
return groups
|
return groups
|
||||||
2
setup.py
2
setup.py
|
|
@ -1,7 +1,7 @@
|
||||||
from setuptools import setup, find_packages
|
from setuptools import setup, find_packages
|
||||||
setup(
|
setup(
|
||||||
name='KeyRequestParser',
|
name='KeyRequestParser',
|
||||||
version='0.5',
|
version='0.6',
|
||||||
packages=find_packages(include=["KRParser"]),
|
packages=find_packages(include=["KRParser"]),
|
||||||
license='MIT',
|
license='MIT',
|
||||||
long_description="Parses Keyrequests",
|
long_description="Parses Keyrequests",
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue