Skip to content

Instantly share code, notes, and snippets.

@flashvoid
Last active April 28, 2016 09:16
Show Gist options
  • Save flashvoid/43c9843b784c788c01851b41018a0958 to your computer and use it in GitHub Desktop.
Save flashvoid/43c9843b784c788c01851b41018a0958 to your computer and use it in GitHub Desktop.
{
"Description": "hello there, security policies are fun!",
"Rules": [
{
"IsStateful": true,
"Ports": [
80,
443
],
"Protocol": "TCP"
}
],
"Peers": [
{
"SegmentNetworkId": 2
}
],
"Direction": "Ingress",
"AppliedTo": [
{
"SegmentNetworkId": 1,
"TenantNetworkId": 1
}
],
"NetworkConfig" : {
"RomanaNet" : "10.0.0.0/8",
"HostBits": 8,
"TenentBits" : 4,
"SegmentBits" : 4,
"EndpointSpaceBits" : 0,
"EndpointBits" : 8
},
"Name": "pol"
}
@flashvoid
Copy link
Author

Problems

  • is_stateful makes no sense right now since stateful is default.
  • applied_to allows multiple tenants but tenant id is a part of policy name so loop over applied_to implicitly produces multiple policies.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment