Debian Codegraph @

heatclient/osc/v1/common.py

raw symbols SCIP
1 #
2 # Licensed under the Apache License, Version 2.0 (the "License"); you may
3 # not use this file except in compliance with the License. You may obtain
4 # a copy of the License at
5 #
6 # http://www.apache.org/licenses/LICENSE-2.0
7 #
8 # Unless required by applicable law or agreed to in writing, software
9 # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
10 # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
11 # License for the specific language governing permissions and limitations
12 # under the License.
13 #
14
15 from cliff import columns
16
17 from heatclient.common import utils as heat_utils
18
19
20 class LinkColumn(columns.FormattableColumn):
21 def human_readable(self):
22 return heat_utils.link_formatter(self._value)
23
24
25 class JsonColumn(columns.FormattableColumn):
26 def human_readable(self):
27 return heat_utils.json_formatter(self._value)
28
29
30 class YamlColumn(columns.FormattableColumn):
31 def human_readable(self):
32 return heat_utils.yaml_formatter(self._value)
33
34
35 class TextWrapColumn(columns.FormattableColumn):
36 def human_readable(self):
37 return heat_utils.text_wrap_formatter(self._value)
38
39
40 class NewlineListColumn(columns.FormattableColumn):
41 def human_readable(self):
42 return heat_utils.newline_list_formatter(self._value)