integ/extended/python-voluptuous/centos/patches/0001-add-NotIn-validation.patch
Angie Wang 27f421a078 Integrate gnocchi for OpenStack Telemetry
This is part of feature integrating gnocchi as metric storage backend
because of the deprecation of ceilometer metering backend.
With gnocchi integrated, ceilometer api and collector processes are
removed, ceilometer agent nofitication and polling processes
are still running to collect and normalise data from other openstack
services. Ceilometer notification agent also has the responsiblity
to send samples to gnocchi backend through its gnocchi publisher and
events to panko backend.
Two gnocchi processes are introduced, gnocchi api is REST API service
and gnocchi metricd is for metric computing and gnocchi CLI is
supported to query measures/metric from gnocchi backend. Ceilometer
service and user still need to be registered in keystone, but stop
creating endpoints. Gnocchi is a seperate user/service in keystone and
run on active controller licensing on port 8041

Changes in this commit:
- add uid gid for telemetry services
- remove the oslo cache configuration
- fix puppet gnocchi warning
- remove ceilometer and add gnocchi logs in syslog

Story: 2002825
Task: 22871
Depends-On: https://review.openstack.org/587279

Change-Id: I3294927c676bee771e719bb581e00266f161ec86
Signed-off-by: Don Penney <don.penney@windriver.com>
Signed-off-by: Jack Ding <jack.ding@windriver.com>
2018-07-31 08:59:40 -04:00

48 lines
1.1 KiB
Diff

From afc63cafd4388310f865fb0fba3165a228796049 Mon Sep 17 00:00:00 2001
From: Angie Wang <Angie.Wang@windriver.com>
Date: Mon, 28 May 2018 20:12:43 -0400
Subject: [PATCH 1/1] add NotIn validation
---
voluptuous.py | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)
diff --git a/voluptuous.py b/voluptuous.py
index 5b561b1..b4ed666 100644
--- a/voluptuous.py
+++ b/voluptuous.py
@@ -1584,6 +1584,30 @@ def In(container, msg=None):
return validator
+class NotInInvalid(Invalid):
+ pass
+
+
+class NotIn(object):
+ """Validate that a value is not in a collection."""
+
+ def __init__(self, container, msg=None):
+ self.container = container
+ self.msg = msg
+
+ def __call__(self, v):
+ try:
+ check = v in self.container
+ except TypeError:
+ check = True
+ if check:
+ raise NotInInvalid(self.msg or 'value is not allowed')
+ return v
+
+ def __repr__(self):
+ return 'NotIn(%s)' % (self.container,)
+
+
def Lower(v):
"""Transform a string to lower case.
--
1.8.3.1