diff --git a/oslo_metrics/__main__.py b/oslo_metrics/__main__.py index cfe74b3034824f6d350670d222a74f2f00a1bd67..74dec0a5a3537f69966462f93ded72cdb38edba8 100644 --- a/oslo_metrics/__main__.py +++ b/oslo_metrics/__main__.py @@ -1,16 +1,17 @@ # Copyright 2020 LINE Corp. +# All Rights Reserved. # -# Licensed under the Apache License, Version 2.0 (the 'License'); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at # -# http://www.apache.org/licenses/LICENSE-2.0 +# http://www.apache.org/licenses/LICENSE-2.0 # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an 'AS IS' BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. import os import select @@ -53,7 +54,8 @@ class MetricsListener(): def serve(self): while self.start: - readable, writable, exceptional = select.select([self.socket], [], [], 1) + readable, writable, exceptional = select.select( + [self.socket], [], [], 1) if len(readable) == 0: continue try: diff --git a/oslo_metrics/message_router.py b/oslo_metrics/message_router.py index c18ff8c1b578b671062ecf1ac4ad74fec52bf8c8..fc7e0b76df43d32d850a23f28ca04584f1b75122 100644 --- a/oslo_metrics/message_router.py +++ b/oslo_metrics/message_router.py @@ -1,16 +1,17 @@ # Copyright 2020 LINE Corp. +# All Rights Reserved. # -# Licensed under the Apache License, Version 2.0 (the 'License'); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at # -# http://www.apache.org/licenses/LICENSE-2.0 +# http://www.apache.org/licenses/LICENSE-2.0 # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an 'AS IS' BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. from oslo_log import log as logging from oslo_utils import importutils diff --git a/oslo_metrics/message_type.py b/oslo_metrics/message_type.py index dea2f1508079d24826d849af92f6e6cdce46a601..e81f5269cb6930758b089bbfa49ad3f104296289 100644 --- a/oslo_metrics/message_type.py +++ b/oslo_metrics/message_type.py @@ -1,3 +1,18 @@ +# Copyright 2020 LINE Corp. +# All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. + import json @@ -27,7 +42,7 @@ class MetricAction(): raise MetricValidationError("action need 'action' field") if metric_action_dict["action"] not in cls.actions: raise MetricValidationError( - "action should be choosen from %s" % cls.actions) + "action should be choosen from %s" % cls.actions) @classmethod def from_dict(cls, metric_action_dict): diff --git a/oslo_metrics/metrics/oslo_messaging.py b/oslo_metrics/metrics/oslo_messaging.py index bbb8ab1853da73711ff06b3db6b1e9bc2d687198..3245bffbef5fb792fc06d6853232cf1b3f2da640 100644 --- a/oslo_metrics/metrics/oslo_messaging.py +++ b/oslo_metrics/metrics/oslo_messaging.py @@ -1,16 +1,18 @@ -# Copyright 2019 LINE Corp. +# Copyright 2020 LINE Corp. +# All Rights Reserved. # -# Licensed under the Apache License, Version 2.0 (the 'License'); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at # -# http://www.apache.org/licenses/LICENSE-2.0 +# http://www.apache.org/licenses/LICENSE-2.0 # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an 'AS IS' BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. + import prometheus_client standard_labels_for_server = [