Comment 3 for bug 1472988

Revision history for this message
Daisuke Nakajima (dnakajima) wrote :

WebUI set "security_group_id" instead of "congigured-security-group-id" if security group is manually configured.
And, if user cannot modify "security_group_id", please return Error code such as 501 or 503.

root@console:~/Documents/python_test# ./Contrail_json.py -d security-group/eacd4e45-5d41-48bf-b6f1-f1d94f2c7f34
{
    "security-group": {
        "access_control_lists": [
            {
                "href": "http://172.27.113.85:8082/access-control-list/2b42e15c-fdc9-4c1f-8fda-e9124479d360",
                "to": [
                    "default-domain",
                    "demo",
                    "PR1472988",
                    "ingress-access-control-list"
                ],
                "uuid": "2b42e15c-fdc9-4c1f-8fda-e9124479d360"
            },
            {
                "href": "http://172.27.113.85:8082/access-control-list/36e7e82c-ed76-4fc6-8664-ed50590eca18",
                "to": [
                    "default-domain",
                    "demo",
                    "PR1472988",
                    "egress-access-control-list"
                ],
                "uuid": "36e7e82c-ed76-4fc6-8664-ed50590eca18"
            }
        ],
        "configured_security_group_id": 1000,
        "display_name": "PR1472988",
        "fq_name": [
            "default-domain",
            "demo",
            "PR1472988"
        ],
        "href": "http://172.27.113.85:8082/security-group/eacd4e45-5d41-48bf-b6f1-f1d94f2c7f34",
        "id_perms": {
            "created": "2015-07-10T00:09:10.164829",
            "creator": null,
            "description": null,
            "enable": true,
            "last_modified": "2015-07-10T00:09:10.265780",
            "permissions": {
                "group": "admin",
                "group_access": 7,
                "other_access": 7,
                "owner": "admin",
                "owner_access": 7
            },
            "user_visible": true,
            "uuid": {
                "uuid_lslong": 13182583499928665908,
                "uuid_mslong": 16919265434925091007
            }
        },
        "name": "PR1472988",
        "parent_href": "http://172.27.113.85:8082/project/8e19297b-5c3c-4b48-85f2-76229e27b1a1",
        "parent_type": "project",
        "parent_uuid": "8e19297b-5c3c-4b48-85f2-76229e27b1a1",
        "security_group_entries": {
            "policy_rule": [
                {
                    "direction": ">",
                    "dst_addresses": [
                        {
                            "network_policy": null,
                            "security_group": null,
                            "subnet": {
                                "ip_prefix": "0.0.0.0",
                                "ip_prefix_len": 0
                            },
                            "virtual_network": null
                        }
                    ],
                    "dst_ports": [
                        {
                            "end_port": 65535,
                            "start_port": 0
                        }
                    ],
                    "ethertype": "IPv4",
                    "protocol": "any",
                    "rule_uuid": "be855292-0f0a-4f35-9502-7515c6e6c6c7",
                    "src_addresses": [
                        {
                            "network_policy": null,
                            "security_group": "local",
                            "subnet": null,
                            "virtual_network": null
                        }
                    ],
                    "src_ports": [
                        {
                            "end_port": 65535,
                            "start_port": 0
                        }
                    ]
                },
                {
                    "direction": ">",
                    "dst_addresses": [
                        {
                            "network_policy": null,
                            "security_group": null,
                            "subnet": {
                                "ip_prefix": "::",
                                "ip_prefix_len": 0
                            },
                            "virtual_network": null
                        }
                    ],
                    "dst_ports": [
                        {
                            "end_port": 65535,
                            "start_port": 0
                        }
                    ],
                    "ethertype": "IPv6",
                    "protocol": "any",
                    "rule_uuid": "9e652217-03a8-49f4-ba0b-2cca46036618",
                    "src_addresses": [
                        {
                            "network_policy": null,
                            "security_group": "local",
                            "subnet": null,
                            "virtual_network": null
                        }
                    ],
                    "src_ports": [
                        {
                            "end_port": 65535,
                            "start_port": 0
                        }
                    ]
                }
            ]
        },
        "security_group_id": "1000",
        "uuid": "eacd4e45-5d41-48bf-b6f1-f1d94f2c7f34"
    }
}