)]}'
{"nova/policies/security_groups.py":[{"author":{"_account_id":20217,"name":"Anusha Unnam","email":"anusha.unnam25@gmail.com","username":"aunnam"},"change_message_id":"e0a69629f1cc8ed385fcc3cefa39bfbfb6d23163","unresolved":false,"context_lines":[{"line_number":23,"context_line":""},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"security_groups_policies \u003d ["},{"line_number":26,"context_line":"    base.create_rule_default("},{"line_number":27,"context_line":"        BASE_POLICY_NAME,"},{"line_number":28,"context_line":"        base.RULE_ADMIN_OR_OWNER,"},{"line_number":29,"context_line":"        \"\"\"Lists, shows information for, creates, updates and deletes"},{"line_number":30,"context_line":"security groups. Creates and deletes security group rules. All these"},{"line_number":31,"context_line":"API\u0027s are deprecated."}],"source_content_type":"text/x-python","patch_set":1,"id":"dfeb2761_6be30407","line":28,"range":{"start_line":26,"start_character":4,"end_line":28,"end_character":32},"updated":"2017-03-31 20:10:54.000000000","message":"Many API\u0027s were using this single rule. Some of them are deprecated. Not sure if this documentation is understandable. Any suggestions appreciated.\n\nShould we add new rule for security group actions on a server? This way it looks more cleaner.","commit_id":"810373bb6de69c10c6f7a1bfcf5fb6741563ad91"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"cb8b5472992b0008121a250c1e29b6d62f649c1e","unresolved":false,"context_lines":[{"line_number":23,"context_line":""},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"security_groups_policies \u003d ["},{"line_number":26,"context_line":"    base.create_rule_default("},{"line_number":27,"context_line":"        BASE_POLICY_NAME,"},{"line_number":28,"context_line":"        base.RULE_ADMIN_OR_OWNER,"},{"line_number":29,"context_line":"        \"\"\"Lists, shows information for, creates, updates and deletes"},{"line_number":30,"context_line":"security groups. Creates and deletes security group rules. All these"},{"line_number":31,"context_line":"API\u0027s are deprecated."}],"source_content_type":"text/x-python","patch_set":1,"id":"dfeb2761_45db431a","line":28,"range":{"start_line":26,"start_character":4,"end_line":28,"end_character":32},"in_reply_to":"dfeb2761_6be30407","updated":"2017-04-04 10:00:30.000000000","message":"humm, yea at least last 3 are not deprecated.\n\nAlso this policy is checked while extending the server representation to include \"security_groups\".\n\nhttp://git.openstack.org/cgit/openstack/nova/tree/nova/api/openstack/compute/security_groups.py#n447\n\nI am not sure about adding new rule at this time but we can clearly mention deprecated and non-deprecated APIs clearly in description. something like below (but need more opinion on this if that looks fine):\n\n\n\"\"\"This policy checks permission on security groups related APIs.\n\nAPIs which are directly related to security groups resource are deprecated:\nLists, shows information for, creates, updates and deletes\nsecurity groups. Creates and deletes security group rules. \n\nAPIs which are related to server resource are not deprecated:\nLists Security Groups for a server.\n\nAdd Security Group to a server and remove security group from a server.\n\nExpand \u0027security_groups\u0027 in server representation\"\"\",","commit_id":"810373bb6de69c10c6f7a1bfcf5fb6741563ad91"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"cb8b5472992b0008121a250c1e29b6d62f649c1e","unresolved":false,"context_lines":[{"line_number":54,"context_line":"            \u0027method\u0027: \u0027DELETE\u0027,"},{"line_number":55,"context_line":"            \u0027path\u0027: \u0027/os-security-groups/{security_group_id}\u0027"},{"line_number":56,"context_line":"        },"},{"line_number":57,"context_line":"        {"},{"line_number":58,"context_line":"            \u0027method\u0027: \u0027GET\u0027,"},{"line_number":59,"context_line":"            \u0027path\u0027: \u0027/servers/{server_id}/os-security-groups\u0027"},{"line_number":60,"context_line":"        },"},{"line_number":61,"context_line":"        {"},{"line_number":62,"context_line":"            \u0027method\u0027: \u0027POST\u0027,"},{"line_number":63,"context_line":"            \u0027path\u0027: \u0027/servers/{server_id}/action (addSecurityGroup)\u0027"},{"line_number":64,"context_line":"        },"},{"line_number":65,"context_line":"        {"},{"line_number":66,"context_line":"            \u0027method\u0027: \u0027POST\u0027,"},{"line_number":67,"context_line":"            \u0027path\u0027: \u0027/servers/{server_id}/action (removeSecurityGroup)\u0027"},{"line_number":68,"context_line":"        }"},{"line_number":69,"context_line":"    ]),"},{"line_number":70,"context_line":"    policy.RuleDefault("},{"line_number":71,"context_line":"        name\u003dPOLICY_ROOT % \u0027discoverable\u0027,"}],"source_content_type":"text/x-python","patch_set":1,"id":"dfeb2761_e52b777f","line":68,"range":{"start_line":57,"start_character":0,"end_line":68,"end_character":9},"updated":"2017-04-04 10:00:30.000000000","message":"these are not deprecated APIs","commit_id":"810373bb6de69c10c6f7a1bfcf5fb6741563ad91"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"cb8b5472992b0008121a250c1e29b6d62f649c1e","unresolved":false,"context_lines":[{"line_number":66,"context_line":"            \u0027method\u0027: \u0027POST\u0027,"},{"line_number":67,"context_line":"            \u0027path\u0027: \u0027/servers/{server_id}/action (removeSecurityGroup)\u0027"},{"line_number":68,"context_line":"        }"},{"line_number":69,"context_line":"    ]),"},{"line_number":70,"context_line":"    policy.RuleDefault("},{"line_number":71,"context_line":"        name\u003dPOLICY_ROOT % \u0027discoverable\u0027,"},{"line_number":72,"context_line":"        check_str\u003dbase.RULE_ANY),"}],"source_content_type":"text/x-python","patch_set":1,"id":"dfeb2761_e5ca5718","line":69,"range":{"start_line":69,"start_character":4,"end_line":69,"end_character":7},"updated":"2017-04-04 10:00:30.000000000","message":"we should add POST/GET/server APIs as this policy checks while expanding the server response with \"security_groups\" attribute.\n\n- http://git.openstack.org/cgit/openstack/nova/tree/nova/api/openstack/compute/security_groups.py#n447","commit_id":"810373bb6de69c10c6f7a1bfcf5fb6741563ad91"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"8f10f5732d4feb51dd44384a41cb6472bdea9d89","unresolved":false,"context_lines":[{"line_number":33,"context_line":"security groups. Creates and deletes security group rules. All these"},{"line_number":34,"context_line":"API\u0027s are deprecated."},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"APIs which are related to server resource are not deprecated:"},{"line_number":37,"context_line":"Lists Security Groups for a server. Add Security Group to a server and"},{"line_number":38,"context_line":"remove security group from a server. Expand security_groups in server"},{"line_number":39,"context_line":"representation\"\"\","},{"line_number":40,"context_line":"    ["},{"line_number":41,"context_line":"        {"},{"line_number":42,"context_line":"            \u0027method\u0027: \u0027GET\u0027,"}],"source_content_type":"text/x-python","patch_set":3,"id":"bff0334d_0d585d53","line":39,"range":{"start_line":36,"start_character":0,"end_line":39,"end_character":18},"updated":"2017-04-12 09:36:49.000000000","message":"seems like some issue in generated doc string which end up like:\n\n\n# APIs which are related to server resource are not deprecated:\n# Lists Security Groups for a server. Add Security Group to a server\n# and\n# remove security group from a server. Expand security_groups in\n# server\n# representation\n\n\nhttp://docs-draft.openstack.org/09/452309/3/check/gate-nova-docs-ubuntu-xenial/566eb83//doc/build/html/sample_policy.html","commit_id":"60b5a69362a90148e7634041dd40b79a541986e6"}]}
