Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add groups to pack metadata #3214

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 8 additions & 1 deletion st2common/st2common/models/api/pack.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,12 @@ class PackAPI(BaseAPI):
'items': {'type': 'string'},
'default': []
},
'groups': {
'type': 'array',
'description': 'Groups of actions inside the pack. Reserved for future use.',
'items': {'type': 'object'},
'default': []
},
'system': {
'type': 'object',
'description': 'Specification for the system components and packages '
Expand Down Expand Up @@ -204,12 +210,13 @@ def to_model(cls, pack):
email = pack.email
contributors = getattr(pack, 'contributors', [])
files = getattr(pack, 'files', [])
groups = getattr(pack, 'groups', [])
dependencies = getattr(pack, 'dependencies', [])
system = getattr(pack, 'system', {})

model = cls.model(ref=ref, name=name, description=description, keywords=keywords,
version=version, author=author, email=email, contributors=contributors,
files=files, dependencies=dependencies, system=system,
files=files, dependencies=dependencies, system=system, groups=groups,
stackstorm_version=stackstorm_version)
return model

Expand Down
1 change: 1 addition & 0 deletions st2common/st2common/models/db/pack.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ class PackDB(stormbase.StormFoundationDB, stormbase.UIDFieldMixin,
email = me.EmailField()
contributors = me.ListField(field=me.StringField())
files = me.ListField(field=me.StringField())
groups = me.ListField(field=me.DictField())
dependencies = me.ListField(field=me.StringField())
system = me.DictField()

Expand Down