Fix Oslo-Genconfig formatting
This commit is contained in:
parent
16508c32ee
commit
c68bfcf0c5
@ -8,10 +8,13 @@ project and/or branch desired as necessary.
|
||||
|
||||
``` bash
|
||||
docker build . -t gen-oslo-openstack-helm
|
||||
PROJECT=heat
|
||||
sudo rm -rf /tmp/${PROJECT} || true
|
||||
docker run -it --rm \
|
||||
-e PROJECT="heat" \
|
||||
-e PROJECT="${PROJECT}" \
|
||||
-e PROJECT_BRANCH="stable/newton" \
|
||||
-e PROJECT_REPO=https://git.openstack.org/openstack/heat.git \
|
||||
-e PROJECT_REPO=https://git.openstack.org/openstack/${PROJECT}.git \
|
||||
-v /tmp:/tmp:rw \
|
||||
gen-oslo-openstack-helm
|
||||
```
|
||||
|
||||
|
@ -185,8 +185,8 @@ class _ValuesSkeletonFormatter(object):
|
||||
if len(group_name.split('.')) > 1:
|
||||
|
||||
line = '{{- if not .%s -}}\
|
||||
{{- set . "%s" dict -}}\
|
||||
{{- end -}}\n' % (
|
||||
{{- set . "%s" dict -}}\
|
||||
{{- end -}}\n' % (
|
||||
group_name.lower().split('.')[0],
|
||||
group_name.lower().split('.')[0])
|
||||
|
||||
@ -195,8 +195,8 @@ class _ValuesSkeletonFormatter(object):
|
||||
lines.append(line)
|
||||
|
||||
line = '{{- if not .%s.%s -}}\
|
||||
{{- set .%s "%s" dict -}}\
|
||||
{{- end -}}\n' % (
|
||||
{{- set .%s "%s" dict -}}\
|
||||
{{- end -}}\n' % (
|
||||
group_name.lower().split('.')[0],
|
||||
group_name.lower().split('.')[1],
|
||||
group_name.lower().split('.')[0],
|
||||
@ -208,8 +208,8 @@ class _ValuesSkeletonFormatter(object):
|
||||
|
||||
else:
|
||||
line = '{{- if not .%s -}}\
|
||||
{{- set . "%s" dict -}}\
|
||||
{{- end -}}\n' % (
|
||||
{{- set . "%s" dict -}}\
|
||||
{{- end -}}\n' % (
|
||||
group_name.lower(),
|
||||
group_name.lower())
|
||||
if line not in self.done:
|
||||
@ -218,8 +218,8 @@ class _ValuesSkeletonFormatter(object):
|
||||
|
||||
if len(namespace.split('.')) == 1:
|
||||
line = '{{- if not .%s.%s -}}\
|
||||
{{- set .%s "%s" dict -}}\
|
||||
{{- end -}}\n' % (
|
||||
{{- set .%s "%s" dict -}}\
|
||||
{{- end -}}\n' % (
|
||||
group_name.lower(),
|
||||
namespace,
|
||||
group_name.lower(),
|
||||
@ -230,8 +230,8 @@ class _ValuesSkeletonFormatter(object):
|
||||
|
||||
if len(namespace.split('.')) > 1:
|
||||
line = '{{- if not .%s.%s -}}\
|
||||
{{- set .%s "%s" dict -}}\
|
||||
{{- end -}}\n' % (
|
||||
{{- set .%s "%s" dict -}}\
|
||||
{{- end -}}\n' % (
|
||||
group_name.lower(),
|
||||
namespace.split('.')[0],
|
||||
group_name.lower(),
|
||||
@ -241,8 +241,8 @@ class _ValuesSkeletonFormatter(object):
|
||||
lines.append(line)
|
||||
|
||||
line = '{{- if not .%s.%s.%s -}}\
|
||||
{{- set .%s.%s "%s" dict -}}\
|
||||
{{- end -}}\n' % (
|
||||
{{- set .%s.%s "%s" dict -}}\
|
||||
{{- end -}}\n' % (
|
||||
group_name.lower(),
|
||||
namespace.split('.')[0],
|
||||
namespace.split('.')[1],
|
||||
@ -255,8 +255,8 @@ class _ValuesSkeletonFormatter(object):
|
||||
|
||||
if len(namespace.split('.')) > 2:
|
||||
line = '{{- if not .%s.%s.%s.%s -}}\
|
||||
{{- set .%s.%s.%s "%s" dict -}}\
|
||||
{{- end -}}\n' % (
|
||||
{{- set .%s.%s.%s "%s" dict -}}\
|
||||
{{- end -}}\n' % (
|
||||
group_name.lower(),
|
||||
namespace.split('.')[0],
|
||||
namespace.split('.')[1],
|
||||
@ -271,8 +271,8 @@ class _ValuesSkeletonFormatter(object):
|
||||
|
||||
if len(opt.dest.split('.')) > 1:
|
||||
line = '{{- if not .%s.%s.%s -}}\
|
||||
{{- set .%s.%s "%s" dict -}}\
|
||||
{{- end -}}\n' % (
|
||||
{{- set .%s.%s "%s" dict -}}\
|
||||
{{- end -}}\n' % (
|
||||
group_name.lower(),
|
||||
namespace,
|
||||
opt.dest.split('.')[0],
|
||||
@ -285,8 +285,8 @@ class _ValuesSkeletonFormatter(object):
|
||||
|
||||
if len(opt.dest.split('.')) > 2:
|
||||
line = '{{- if not .%s.%s.%s.%s -}}\
|
||||
{{- set .%s.%s.%s "%s" dict -}}\
|
||||
{{- end -}}\n' % (
|
||||
{{- set .%s.%s.%s "%s" dict -}}\
|
||||
{{- end -}}\n' % (
|
||||
group_name.lower(),
|
||||
namespace,
|
||||
opt.dest.split('.')[0],
|
||||
|
Loading…
x
Reference in New Issue
Block a user