func LoadAllSubnetClasses() (SubnetClasses, error) {
	cfgs := make(SubnetClasses)
	items, err := GetItemsByType("subnets")
	if err != nil {
		return cfgs, err
	}
	cfgs.Marshal(items)
	return cfgs, nil
}
LoadAllSubnetClasses loads all Subnet Classes
package config
import (
	"encoding/json"
	"strconv"
	"strings"
	"github.com/aws/aws-sdk-go/service/simpledb"
)
type SubnetClasses map[string]SubnetClass
type SubnetClass struct {
	CIDR string `json:"cidr" awsmClass:"CIDR"`
	CreateInternetGateway              bool `json:"createInternetGateway" awsmClass:"Create Internet Gateway"`
	AddInternetGatewayToMainRouteTable bool `json:"addInternetGatewayToMainRouteTable" awsmClass:"Add Internet Gateway To Main Route Table"`
	AddInternetGatewayToNewRouteTable  bool `json:"addInternetGatewayToNewRouteTable" awsmClass:"Add Internet Gateway To New Route Table"`
	CreateNatGateway              bool `json:"createNatGateway" awsmClass:"Create NAT Gateway"`
	AddNatGatewayToMainRouteTable bool `json:"addNatGatewayToMainRouteTable" awsmClass:"Add NAT Gateway To Main Route Table"`
	AddNatGatewayToNewRouteTable  bool `json:"addNatGatewayToNewRouteTable" awsmClass:"Add NAT Gateway To New Route Table"`
}
func DefaultSubnetClasses() SubnetClasses {
	defaultSubnets := make(SubnetClasses)
	defaultSubnets["private"] = SubnetClass{
		CIDR: "/24",
	}
	defaultSubnets["public"] = SubnetClass{
		CIDR: "/24",
		CreateInternetGateway:             true,
		AddInternetGatewayToNewRouteTable: true,
		CreateNatGateway:                  true,
		AddNatGatewayToMainRouteTable:     true,
	}
	return defaultSubnets
}
func SaveSubnetClass(className string, data []byte) (class SubnetClass, err error) {
	err = json.Unmarshal(data, &class)
	if err != nil {
		return
	}
	err = Insert("subnets", SubnetClasses{className: class})
	return
}
func LoadSubnetClass(name string) (SubnetClass, error) {
	cfgs := make(SubnetClasses)
	item, err := GetItemByName("subnets", name)
	if err != nil {
		return cfgs[name], err
	}
	cfgs.Marshal([]*simpledb.Item{item})
	return cfgs[name], nil
}