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,22 +185,22 @@ class _ValuesSkeletonFormatter(object):
|
||||
if len(group_name.split('.')) > 1:
|
||||
|
||||
line = '{{- if not .%s -}}\
|
||||
{{- set . "%s" dict -}}\
|
||||
{{- end -}}\n' % (
|
||||
group_name.lower().split('.')[0],
|
||||
group_name.lower().split('.')[0])
|
||||
{{- set . "%s" dict -}}\
|
||||
{{- end -}}\n' % (
|
||||
group_name.lower().split('.')[0],
|
||||
group_name.lower().split('.')[0])
|
||||
|
||||
if line not in self.done:
|
||||
self.done.append(line)
|
||||
lines.append(line)
|
||||
|
||||
line = '{{- if not .%s.%s -}}\
|
||||
{{- set .%s "%s" dict -}}\
|
||||
{{- end -}}\n' % (
|
||||
group_name.lower().split('.')[0],
|
||||
group_name.lower().split('.')[1],
|
||||
group_name.lower().split('.')[0],
|
||||
group_name.lower().split('.')[1])
|
||||
{{- set .%s "%s" dict -}}\
|
||||
{{- end -}}\n' % (
|
||||
group_name.lower().split('.')[0],
|
||||
group_name.lower().split('.')[1],
|
||||
group_name.lower().split('.')[0],
|
||||
group_name.lower().split('.')[1])
|
||||
|
||||
if line not in self.done:
|
||||
self.done.append(line)
|
||||
@ -208,93 +208,93 @@ class _ValuesSkeletonFormatter(object):
|
||||
|
||||
else:
|
||||
line = '{{- if not .%s -}}\
|
||||
{{- set . "%s" dict -}}\
|
||||
{{- end -}}\n' % (
|
||||
group_name.lower(),
|
||||
group_name.lower())
|
||||
{{- set . "%s" dict -}}\
|
||||
{{- end -}}\n' % (
|
||||
group_name.lower(),
|
||||
group_name.lower())
|
||||
if line not in self.done:
|
||||
self.done.append(line)
|
||||
lines.append(line)
|
||||
|
||||
if len(namespace.split('.')) == 1:
|
||||
line = '{{- if not .%s.%s -}}\
|
||||
{{- set .%s "%s" dict -}}\
|
||||
{{- end -}}\n' % (
|
||||
group_name.lower(),
|
||||
namespace,
|
||||
group_name.lower(),
|
||||
namespace)
|
||||
{{- set .%s "%s" dict -}}\
|
||||
{{- end -}}\n' % (
|
||||
group_name.lower(),
|
||||
namespace,
|
||||
group_name.lower(),
|
||||
namespace)
|
||||
if line not in self.done:
|
||||
self.done.append(line)
|
||||
lines.append(line)
|
||||
|
||||
if len(namespace.split('.')) > 1:
|
||||
line = '{{- if not .%s.%s -}}\
|
||||
{{- set .%s "%s" dict -}}\
|
||||
{{- end -}}\n' % (
|
||||
group_name.lower(),
|
||||
namespace.split('.')[0],
|
||||
group_name.lower(),
|
||||
namespace.split('.')[0])
|
||||
{{- set .%s "%s" dict -}}\
|
||||
{{- end -}}\n' % (
|
||||
group_name.lower(),
|
||||
namespace.split('.')[0],
|
||||
group_name.lower(),
|
||||
namespace.split('.')[0])
|
||||
if line not in self.done:
|
||||
self.done.append(line)
|
||||
lines.append(line)
|
||||
|
||||
line = '{{- if not .%s.%s.%s -}}\
|
||||
{{- set .%s.%s "%s" dict -}}\
|
||||
{{- end -}}\n' % (
|
||||
group_name.lower(),
|
||||
namespace.split('.')[0],
|
||||
namespace.split('.')[1],
|
||||
group_name.lower(),
|
||||
namespace.split('.')[0],
|
||||
namespace.split('.')[1])
|
||||
{{- set .%s.%s "%s" dict -}}\
|
||||
{{- end -}}\n' % (
|
||||
group_name.lower(),
|
||||
namespace.split('.')[0],
|
||||
namespace.split('.')[1],
|
||||
group_name.lower(),
|
||||
namespace.split('.')[0],
|
||||
namespace.split('.')[1])
|
||||
if line not in self.done:
|
||||
self.done.append(line)
|
||||
lines.append(line)
|
||||
|
||||
if len(namespace.split('.')) > 2:
|
||||
line = '{{- if not .%s.%s.%s.%s -}}\
|
||||
{{- set .%s.%s.%s "%s" dict -}}\
|
||||
{{- end -}}\n' % (
|
||||
group_name.lower(),
|
||||
namespace.split('.')[0],
|
||||
namespace.split('.')[1],
|
||||
namespace.split('.')[2],
|
||||
group_name.lower(),
|
||||
namespace.split('.')[0],
|
||||
namespace.split('.')[1],
|
||||
namespace.split('.')[2])
|
||||
{{- set .%s.%s.%s "%s" dict -}}\
|
||||
{{- end -}}\n' % (
|
||||
group_name.lower(),
|
||||
namespace.split('.')[0],
|
||||
namespace.split('.')[1],
|
||||
namespace.split('.')[2],
|
||||
group_name.lower(),
|
||||
namespace.split('.')[0],
|
||||
namespace.split('.')[1],
|
||||
namespace.split('.')[2])
|
||||
if line not in self.done:
|
||||
self.done.append(line)
|
||||
lines.append(line)
|
||||
|
||||
if len(opt.dest.split('.')) > 1:
|
||||
line = '{{- if not .%s.%s.%s -}}\
|
||||
{{- set .%s.%s "%s" dict -}}\
|
||||
{{- end -}}\n' % (
|
||||
group_name.lower(),
|
||||
namespace,
|
||||
opt.dest.split('.')[0],
|
||||
group_name.lower(),
|
||||
namespace,
|
||||
opt.dest.split('.')[0])
|
||||
{{- set .%s.%s "%s" dict -}}\
|
||||
{{- end -}}\n' % (
|
||||
group_name.lower(),
|
||||
namespace,
|
||||
opt.dest.split('.')[0],
|
||||
group_name.lower(),
|
||||
namespace,
|
||||
opt.dest.split('.')[0])
|
||||
if line not in self.done:
|
||||
self.done.append(line)
|
||||
lines.append(line)
|
||||
|
||||
if len(opt.dest.split('.')) > 2:
|
||||
line = '{{- if not .%s.%s.%s.%s -}}\
|
||||
{{- set .%s.%s.%s "%s" dict -}}\
|
||||
{{- end -}}\n' % (
|
||||
group_name.lower(),
|
||||
namespace,
|
||||
opt.dest.split('.')[0],
|
||||
opt.dest.split('.')[1],
|
||||
group_name.lower(),
|
||||
namespace,
|
||||
opt.dest.split('.')[0],
|
||||
opt.dest.split('.')[1])
|
||||
{{- set .%s.%s.%s "%s" dict -}}\
|
||||
{{- end -}}\n' % (
|
||||
group_name.lower(),
|
||||
namespace,
|
||||
opt.dest.split('.')[0],
|
||||
opt.dest.split('.')[1],
|
||||
group_name.lower(),
|
||||
namespace,
|
||||
opt.dest.split('.')[0],
|
||||
opt.dest.split('.')[1])
|
||||
if line not in self.done:
|
||||
self.done.append(line)
|
||||
lines.append(line)
|
||||
|
Loading…
Reference in New Issue
Block a user