Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Gelencsér Szabolcs
/
circlestack
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
bad51a79
authored
Mar 13, 2018
by
Szabolcs Gelencser
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add circle policy.json and rule circle:template:create
parent
d31bb288
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
1 deletions
+9
-1
.idea/workspace.xml
+0
-0
circle/circle/os_policies/circle_policy.json
+7
-0
circle/circle/settings/base.py
+1
-0
circle/vm/operations.py
+1
-1
No files found.
.idea/workspace.xml
View file @
bad51a79
This diff is collapsed.
Click to expand it.
circle/circle/os_policies/circle_policy.json
0 → 100644
View file @
bad51a79
{
"admin_or_owner"
:
"is_admin:True or (role:admin and is_admin_project:True) or project_id:%(project_id)s"
,
"default"
:
"rule:admin_or_owner"
,
"template:create"
:
""
}
\ No newline at end of file
circle/circle/settings/base.py
View file @
bad51a79
...
...
@@ -561,6 +561,7 @@ POLICY_FILES = {
'volume'
:
'cinder_policy.json'
,
'image'
:
'glance_policy.json'
,
'network'
:
'neutron_policy.json'
,
'circle'
:
'circle_policy.json'
,
}
# Services for which horizon has extra policies are defined
# in POLICY_DIRS by default.
...
...
circle/vm/operations.py
View file @
bad51a79
...
...
@@ -507,7 +507,7 @@ class SaveAsTemplateOperation(InstanceOperation):
"template (and to the networks it uses) will be able to "
"start an instance of it."
)
accept_states
=
(
'SHUTOFF'
,
'ACTIVE'
)
# TODO: try other states
# os_policy_actions = (("compute", "compute:stop
"),)
os_policy_actions
=
((
"circle"
,
"template:create
"
),)
@staticmethod
def
_rename
(
name
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment