osel/openstack_mock_test.go
Nate Johnston ca0e1ca769 Initial import of osel code
This is an initial import of the osel codebase.  The osel tool is a tool that
initiates external security scans (initially through Qualys) upon reciept of
AMQP events that indicate certain sensitive events have occurred, like a
security group rule change.

The commit history had to be thrown away because it contained some non-public
data, so I would like to call out the following contributors:

This uses go 1.10 and vgo for dependency management.

Co-Authored-By: Charles Bitter <Charles_Bitter@cable.comcast.com>
Co-Authored-By: Olivier Gagnon <Olivier_Gagnon@cable.comcast.com>
Co-Authored-By: Joseph Sleiman <Joseph_Sleiman@comcast.com>

Change-Id: Ib6abe2024fd91978b783ceee4cff8bb4678d7b15
2018-03-24 15:30:57 +00:00

32 lines
631 B
Go

package main
type OpenStackTestActions struct {
regionName string
tenantID string
}
func (s OpenStackTestActions) Connect(tenantID string, username string) error {
return nil
}
func (s OpenStackTestActions) GetPortList() []OpenStackIPMap {
return []OpenStackIPMap{
{
ipAddress: "10.0.0.1",
securityGroup: "46d46540-98ac-4c93-ae62-68dddab2282e",
},
{
ipAddress: "10.0.0.2",
securityGroup: "groupTwo",
},
{
ipAddress: "10.0.0.3",
securityGroup: "46d46540-98ac-4c93-ae62-68dddab2282e",
},
}
}
func connectFakeOpenstack() *OpenStackTestActions {
return new(OpenStackTestActions)
}