Browse files

Merge pull request #31 from ZuzanaLietavcova/my_sgmanager

PAAS-11126 sgmanager --validate arg edit
  • Loading branch information...
pbenas committed Sep 1, 2017
2 parents d48572a + aa5bf3d commit 68659cfe91c2032950f3ce71cc9d3c01ae04465f
Showing with 5 additions and 5 deletions.
  1. +2 −2 Makefile
  2. +2 −2 sgmanager/
  3. +1 −1 sgmanager/securitygroups/
@@ -30,8 +30,8 @@ version:
# Helps keeping version consistent both in and sgmanager.spec
@echo "Current version: $(VERSION)"
@read -p "Type new version: " newversion; \
sed -i -e "s/ 'version': .*/ 'version': '$$newversion',/"; \
sed -i -e "s,Version: .*,Version: $$newversion," sgmanager.spec
sed -i -e "s/version=.*/version='$$newversion',/"; \
sed -i -e "s/Version:\(\s*\).*/Version:\1$$newversion/" sgmanager.spec
git tag "v$(VERSION)"
@@ -59,7 +59,7 @@ def cli():
parser.add_argument('--insecure', action='store_true', help='Do not validate SSL certs')
parser.add_argument('--threshold', help='Maximum threshold to use for add/rm of groups/rules in percentage (default: 15)', default=15)
parser.add_argument('--cert', help='Path to CA certificates (eg. /etc/pki/cacert.pem)')
parser.add_argument('--validate', action='store_true', help='Dry-run, validates the config file')
parser.add_argument('--validate', action='store_true', help='Only validate config')
args = parser.parse_args()
if args.quiet:
@@ -97,7 +97,7 @@ def cli():
manager.load_local_groups(args.config, mode)
except InvalidConfiguration as e:
lg.error("Invalid config file: %s" %e)
lg.error("Invalid config file %s: %s", args.config, e)
if args.validate:
@@ -138,7 +138,7 @@ def load_local_groups(self, config, mode):
raise InvalidConfiguration("Can't parse config file %s: %s" % (config, e))
# Empty config file is considered invalid
if not conf:
raise InvalidConfiguration("Config file %s is empty" % config)
raise InvalidConfiguration("Config file is empty")
# Remove include keys
conf = self._fix_include(conf)

0 comments on commit 68659cf

Please sign in to comment.