Commit 7815b0b4 authored by Sigmund Augdal's avatar Sigmund Augdal

Allow creating new security/library groups with cli util

parent 9e6bd228
......@@ -39,6 +39,8 @@ def parse_args():
help="Make a group shared acress clouds")
parser.add_argument('--get-references', metavar="GROUP",
help="Find groups that use GROUP as source in a rule")
parser.add_argument('--create-group', metavar="NAME",
help="Create a new shared security/library group called NAME")
args = parser.parse_args()
for filename, description in ((args.cert, "certificate"),
(args.key, "private key"),
......@@ -94,5 +96,8 @@ def main():
if args.get_references:
for group, rule in security_groups.get_group_references(etcd_client, args.get_references):
print(group)
if args.create_group:
security_groups.create_security_group(etcd_client, args.create_group, None,
library=args.library)
if __name__ == '__main__':
main()
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment