MCPcopy
hub / github.com/cloudfoundry/cli / NewSecurityGroup

Function NewSecurityGroup

integration/helpers/security_group.go:15–25  ·  view source on GitHub ↗

NewSecurityGroup returns a new security group with the given attributes

(name string, protocol string, destination string, ports *string, description *string)

Source from the content-addressed store, hash-verified

13
14// NewSecurityGroup returns a new security group with the given attributes
15func NewSecurityGroup(name string, protocol string, destination string, ports *string, description *string) resources.SecurityGroup {
16 return resources.SecurityGroup{
17 Name: name,
18 Rules: []resources.Rule{{
19 Protocol: protocol,
20 Destination: destination,
21 Ports: ports,
22 Description: description,
23 }},
24 }
25}
26
27// CreateSecurityGroup Creates a new security group on the API using the 'cf create-security-group'
28func CreateSecurityGroup(s resources.SecurityGroup) {

Calls

no outgoing calls

Tested by

no test coverage detected