Ejemplo n.º 1
0
 def post(self, profile_name):
     rule_set_list = request.json['rule_set_list']
     replace = request.json.get('replace', False)
     if replace:
         # delete existing rules on the profile
         base_query.delete_item(models.WafProfileRuleSet, profile_name=profile_name)
     for rule_set_name in rule_set_list:
         data = {'profile_name': profile_name, 'rule_set_name': rule_set_name}
         base_query.create_item(models.WafProfileRuleSet, **data)
     # update waf-profile with the number of rules
     base_query.update_item(models.WafProfile, {'name': profile_name}, rule_count=len(rule_set_list))
     return None
Ejemplo n.º 2
0
 def delete(self, name):
     base_query.delete_item(models.WafProfile, name=name)
     # delete all the profile rulesets for this profile
     base_query.delete_item(models.WafProfileRuleSet, profile_name=name)
     return
Ejemplo n.º 3
0
 def delete(self, policy_profile_name, rule_id):
     return base_query.delete_item(models.PolicyProfileRule,
         profile_name=policy_profile_name, id=rule_id)
Ejemplo n.º 4
0
 def delete(self, name):
     return base_query.delete_item(models.PolicyProfile, name=name)
Ejemplo n.º 5
0
 def delete(self, name):
     base_query.delete_item(models.KubeProfile, name=name)
Ejemplo n.º 6
0
 def delete(self, name):
     base_query.delete_item(models.Address, name=name)
Ejemplo n.º 7
0
 def delete(self, name):
     base_query.delete_item(models.Certificate, name=name)