Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenStack
oslo
python-oslo.metrics
Commits
703e73d9
Commit
703e73d9
authored
Jun 11, 2020
by
Hervé Beraud
Browse files
fix pep8 issues
Change-Id: I597040ac536c1d45ceae5183e48ef809e7db38e9
parent
760b1a06
Changes
4
Hide whitespace changes
Inline
Side-by-side
oslo_metrics/__main__.py
View file @
703e73d9
# 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
:
...
...
oslo_metrics/message_router.py
View file @
703e73d9
# 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
...
...
oslo_metrics/message_type.py
View file @
703e73d9
# 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
):
...
...
oslo_metrics/metrics/oslo_messaging.py
View file @
703e73d9
# 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
=
[
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment