saltstack/salt — pull request #14772 by colinbjohnson (2014-08-05 23:23:55+00:00)
Title: provide support for VPC security groups in boto_secgroup state module

This module provides vpc support for the boto_secgroup state module.

Functional test plan was completed and is described below:
## Run Functional Test:
salt-call --local state.highstate --log-level debug

## EC-VPC Security Group Tests
### Testing Present from Not Present
Ensure gateway security group exists:
boto_secgroup.present:
- name: gateway
- description: gateway security group
- region: us-east-1
- vpc_id: vpc-379b3952

### Testing Present and No Change
Ensure gateway security group exists:
boto_secgroup.present:
- name: gateway
- description: gateway security group
- region: us-east-1
- vpc_id: vpc-379b3952

### Testing Present and Update - Authorize Rule
Ensure gateway security group exists:
boto_secgroup.present:
- name: gateway
- description: gateway security group
- region: us-east-1
- vpc_id: vpc-379b3952
- rules:
- ip_protocol: tcp
from_port: 22
to_port: 22
cidr_ip: 10.0.0.0/8

### Testing Present and Update - Authorize/Revoke Rule
Ensure gateway security group exists:
boto_secgroup.present:
- name: gateway
- description: gateway security group
- region: us-east-1
- vpc_id: vpc-379b3952
- rules:
- ip_protocol: tcp
from_port: 80
to_port: 80
cidr_ip: 10.0.0.0/8

### Testing Present and Update - Revoke Rule
Ensure gateway security group exists:
boto_secgroup.present:
- name: gateway
- description: gateway security group
- region: us-east-1
- vpc_id: vpc-379b3952

### Testing Absent
Ensure gateway security group absent:
boto_secgroup.absent:
- name: gateway
- description: gateway security group
- region: us-east-1
- vpc_id: vpc-379b3952

### Testing Absent when Absent
Ensure gateway security group absent:
boto_secgroup.absent:
- name: gateway
- description: gateway security group
- region: us-east-1
- vpc_id: vpc-379b3952

## EC2-Classic Security Group Tests
### Testing Present from Not Present
Ensure gateway security group exists:
boto_secgroup.present:
- name: gateway
- description: gateway security group
- region: us-east-1

### Testing Present and No Change
Ensure gateway security group exists:
boto_secgroup.present:
- name: gateway
- description: gateway security group
- region: us-east-1

### Testing Present and Update - Authorize Rule
Ensure gateway security group exists:
boto_secgroup.present:
- name: gateway
- description: gateway security group
- region: us-east-1
- rules:
- ip_protocol: tcp
from_port: 22
to_port: 22
cidr_ip: 10.0.0.0/8

### Testing Present and Update - Authorize/Revoke Rule
Ensure gateway security group exists:
boto_secgroup.present:
- name: gateway
- description: gateway security group
- region: us-east-1
- rules:
- ip_protocol: tcp
from_port: 80
to_port: 80
cidr_ip: 10.0.0.0/8

### Testing Present and Update - Revoke Rule
Ensure gateway security group exists:
boto_secgroup.present:
- name: gateway
- description: gateway security group
- region: us-east-1

### Testing Absent
Ensure gateway security group absent:
boto_secgroup.absent:
- name: gateway
- description: gateway security group
- region: us-east-1

### Testing Absent when Absent
Ensure gateway security group absent:
boto_secgroup.absent:
- name: gateway
- description: gateway security group
- region: us-east-1