Documentation
¶
Index ¶
- Constants
- Variables
- func Login(user, password string) ([]byte, error)
- func SetCertificate(comboCert []byte) error
- type AccessMember
- type Attribute
- type Body
- type Capacity
- type ChallengeResponseEnvelope
- type ChallengeResponseResponse
- type ChallengeResponseResponseEnvelope
- type ChangeAttribute
- type ChangeExperimentACLEnvelope
- type ChangeExperimentACLResponse
- type ChangeExperimentACLResponseEnvelope
- type ChangeExperimentProfileEnvelope
- type ChangeExperimentProfileResponse
- type ChangeExperimentProfileResponseEnvelope
- type ChangeResult
- type Computer
- type CreateExperimentEnvelope
- type CreateExperimentResponse
- type CreateExperimentResponseEnvelope
- type DescriptionAttr
- type Element
- type Elements
- type Envelope
- type Experiment
- type ExperimentAspect
- type ExperimentDescription
- type ExperimentFaultEnvelope
- type Interface
- type Kind
- type Latency
- type Member
- type OS
- type ProjectDescription
- type RealizationContainment
- type RealizationDescription
- type RealizationMap
- type RealizationsFaultEnvelope
- type RealizeExperimentEnvelope
- type RealizeExperimentResponse
- type RealizeExperimentResponseEnvelope
- type ReleaseRealizationEnvelope
- type ReleaseRealizationResponse
- type ReleaseRealizationResponseEnvelope
- type RemoveExperimentEnvelope
- type RemoveExperimentResponse
- type RemoveExperimentResponseEnvelope
- type RemoveRealizationEnvelope
- type RemoveRealizationResponse
- type RemoveRealizationResponseEnvelope
- type RequestChallengeEnvelope
- type RequestChallengeResponse
- type RequestChallengeResponseEnvelope
- type Substrate
- type TopDLAttribute
- type ViewExperimentsEnvelope
- type ViewExperimentsResponse
- type ViewExperimentsResponseEnvelope
- type ViewProjectsEnvelope
- type ViewProjectsResponse
- type ViewProjectsResponseEnvelope
- type ViewRealizationsEnvelope
- type ViewRealizationsResponse
- type ViewRealizationsResponseEnvelope
Constants ¶
View Source
const ( //note: you must set your /etc/hosts for this entry API_HOST = "spi.deterlab.net" API_PORT = "52323" API_HTTPS = "https://" + API_HOST + ":" + API_PORT + "/axis2/services" )
View Source
const PROJECTS_HTTPS = API_HTTPS + "/Projects"
View Source
const REX_HTTPS = API_HTTPS + "/Realizations"
View Source
const USERS_HTTPS = API_HTTPS + "/Users"
View Source
const XPS_HTTPS = API_HTTPS + "/Experiments"
Variables ¶
View Source
var Debug = false
Functions ¶
func SetCertificate ¶
setCertificate sets the certificate that is used when communicating with the SPI server
Types ¶
type AccessMember ¶
type ChallengeResponseEnvelope ¶
type ChallengeResponseEnvelope struct { Envelope Body struct { Body ChallengeResponse struct { XMLName xml.Name `xml:"http://api.testbed.deterlab.net/xsd challengeResponse"` ResponseData string `xml:"http://api.testbed.deterlab.net/xsd responseData"` ChallengeID int64 `xml:"http://api.testbed.deterlab.net/xsd challengeID"` } } }
type ChallengeResponseResponse ¶
type ChallengeResponseResponse struct {
Return string `xml:"http://api.testbed.deterlab.net/xsd return"`
}
func ChallengeResponse ¶
func ChallengeResponse(challengeID int64, password string) ( *ChallengeResponseResponse, error)
ChallengeResponse returns the SPI's response to a challenge with the certificate decoded. The provided challengeID must be the result fo a RequestChallenge call and the password is just a plain-text standard encoded string.
type ChallengeResponseResponseEnvelope ¶
type ChallengeResponseResponseEnvelope struct { Envelope Body struct { Body ChallengeResponseResponse ChallengeResponseResponse `xml:"http://api.testbed.deterlab.net/xsd challengeResponseResponse"` } }
type ChangeAttribute ¶
type ChangeExperimentACLResponse ¶
type ChangeExperimentACLResponse struct {
Return []ChangeResult `xml:"return"`
}
func ChangeExperimentACL ¶
func ChangeExperimentACL(name string, acl []AccessMember) ( *ChangeExperimentACLResponse, error)
type ChangeExperimentACLResponseEnvelope ¶
type ChangeExperimentACLResponseEnvelope struct { Envelope Body struct { Body ChangeExperimentACLResponse ChangeExperimentACLResponse } }
type ChangeExperimentProfileResponse ¶
type ChangeExperimentProfileResponse struct {
Return []ChangeResult `xml:"return"`
}
func ChangeExperimentProfile ¶
func ChangeExperimentProfile(name string, attributes []ChangeAttribute) ( *ChangeExperimentProfileResponse, error)
type ChangeExperimentProfileResponseEnvelope ¶
type ChangeExperimentProfileResponseEnvelope struct { Envelope Body struct { Body ChangeExperimentProfileResponse ChangeExperimentProfileResponse } }
type ChangeResult ¶
type CreateExperimentResponse ¶
type CreateExperimentResponse struct {
Return bool `xml:"return"`
}
func CreateExperiment ¶
func CreateExperiment(expId, owner, topdl string, virtualized bool) ( *CreateExperimentResponse, error)
type CreateExperimentResponseEnvelope ¶
type CreateExperimentResponseEnvelope struct { Envelope Body struct { Body CreateExperimentResponse CreateExperimentResponse `xml:"createExperimentResponse"` } }
type DescriptionAttr ¶
type DescriptionAttr struct { XMLName xml.Name `xml:"http://api.testbed.deterlab.net/xsd profile"` Name string `xml:"name"` Value string `xml:"value"` }
func (DescriptionAttr) GetName ¶
func (d DescriptionAttr) GetName() string
type Envelope ¶
type Envelope struct { XMLName xml.Name `xml:"http://www.w3.org/2003/05/soap-envelope Envelope"` Body Body }
Common messaging structs -----------------------------------------------------
type Experiment ¶
type ExperimentAspect ¶
type ExperimentDescription ¶
type ExperimentFaultEnvelope ¶
type ExperimentFaultEnvelope struct { Envelope Body struct { Body Fault struct { Code struct { Value string } Reason struct { Text string } Detail struct { ExperimentsDeterFault struct { //XMLName xml.Name `xml:"http://api.testbed.deterlab.net/xsd ExperimentsDeterFault"` DeterFault struct { //XMLName xml.Name `xml:"http://api.testbed.deterlab.net/xsd DeterFault"` DetailMessage string `xml:"detailMessage"` ErrorCode int `xml:"errorCode"` ErrorMessage string `xml:"errorMessage"` } } } } } }
func (ExperimentFaultEnvelope) String ¶
func (f ExperimentFaultEnvelope) String() string
type Member ¶
type Member struct { Permissions string `xml:"http://api.testbed.deterlab.net/xsd permissions"` // contains filtered or unexported fields }
type ProjectDescription ¶
type ProjectDescription struct { Approved bool `xml:"http://api.testbed.deterlab.net/xsd approved"` Members Member `xml:"http://api.testbed.deterlab.net/xsd members"` Owner string `xml:"http://api.testbed.deterlab.net/xsd owner"` ProjectId string `xml:"http://api.testbed.deterlab.net/xsd projectId"` }
type RealizationContainment ¶
type RealizationDescription ¶
type RealizationDescription struct { XMLName xml.Name `xml:"http://api.testbed.deterlab.net/xsd return"` Circle string `xml:"circle"` Experiment string `xml:"experiment"` Name string `xml:"name"` Status string `xml:"status"` Containment []RealizationContainment `xml:"containment"` Mapping []RealizationMap `xml:"mapping"` Perms []string `xml:"perms"` }
type RealizationMap ¶
type RealizationsFaultEnvelope ¶
type RealizationsFaultEnvelope struct { Envelope Body struct { Body Fault struct { Code struct { Value string } Reason struct { Text string } Detail struct { RealizationsDeterFault struct { //XMLName xml.Name `xml:"http://api.testbed.deterlab.net/xsd ExperimentsDeterFault"` DeterFault struct { //XMLName xml.Name `xml:"http://api.testbed.deterlab.net/xsd DeterFault"` DetailMessage string `xml:"detailMessage"` ErrorCode int `xml:"errorCode"` ErrorMessage string `xml:"errorMessage"` } } } } } }
func (RealizationsFaultEnvelope) String ¶
func (f RealizationsFaultEnvelope) String() string
type RealizeExperimentResponse ¶
type RealizeExperimentResponse struct {
Return RealizationDescription `xml:"return"`
}
func RealizeExperiment ¶
func RealizeExperiment(expId, circle, owner string) ( *RealizeExperimentResponse, error)
type RealizeExperimentResponseEnvelope ¶
type RealizeExperimentResponseEnvelope struct { Envelope Body struct { Body RealizeExperimentResponse RealizeExperimentResponse `xml:"realizeExperimentResponse"` } }
type ReleaseRealizationResponse ¶
type ReleaseRealizationResponse struct {
Return bool `xml:"return"`
}
func ReleaseRealization ¶
func ReleaseRealization(expId string) (*ReleaseRealizationResponse, error)
type ReleaseRealizationResponseEnvelope ¶
type ReleaseRealizationResponseEnvelope struct { Envelope Body struct { Body ReleaseRealizationResponse ReleaseRealizationResponse `xml:"releaseRealizationResponse"` } }
type RemoveExperimentResponse ¶
type RemoveExperimentResponse struct { XMLName xml.Name `xml:"http://api.testbed.deterlab.net/xsd removeExperimentResponse"` Return bool `xml:"return"` }
func RemoveExperiment ¶
func RemoveExperiment(expId string) (*RemoveExperimentResponse, error)
type RemoveExperimentResponseEnvelope ¶
type RemoveExperimentResponseEnvelope struct { Envelope Body struct { Body RemoveExperimentResponse RemoveExperimentResponse } }
type RemoveRealizationResponse ¶
type RemoveRealizationResponse struct {
Return bool `xml:"return"`
}
func RemoveRealization ¶
func RemoveRealization(expId string) (*RemoveRealizationResponse, error)
type RemoveRealizationResponseEnvelope ¶
type RemoveRealizationResponseEnvelope struct { Envelope Body struct { Body RemoveRealizationResponse RemoveRealizationResponse `xml:"removeRealizationResponse"` } }
type RequestChallengeResponse ¶
type RequestChallengeResponse struct { ChallengeID int64 `xml:"http://api.testbed.deterlab.net/xsd challengeID"` Validity string `xml:"http://api.testbed.deterlab.net/xsd validity"` Type string `xml:"http://api.testbed.deterlab.net/xsd type"` }
func RequestChallenge ¶
func RequestChallenge(uid string) (*RequestChallengeResponse, error)
RequestChallenge returns the SPI's response to a challenge given a user-id.
type RequestChallengeResponseEnvelope ¶
type RequestChallengeResponseEnvelope struct { Envelope Body struct { Body RequestChallengeResponse struct { XMLName xml.Name `xml:"http://api.testbed.deterlab.net/xsd requestChallengeResponse"` Return struct { XMLName xml.Name `xml:"http://api.testbed.deterlab.net/xsd return"` RequestChallengeResponse } } } }
type TopDLAttribute ¶
type ViewExperimentsEnvelope ¶
type ViewExperimentsEnvelope struct { Envelope Body struct { Body ViewExperiments struct { XMLName xml.Name `xml:"http://api.testbed.deterlab.net/xsd viewExperiments"` UID string `xml:"uid"` Regex string `xml:"regex"` ListOnly bool `xml:"listOnly"` Offset int `xml:"offset"` Count int `xml:"count"` } } }
type ViewExperimentsResponse ¶
type ViewExperimentsResponse struct {
Return []ExperimentDescription `xml:"return"`
}
func ViewExperiments ¶
func ViewExperiments(user, regex string, listOnly bool) (*ViewExperimentsResponse, error)
type ViewExperimentsResponseEnvelope ¶
type ViewExperimentsResponseEnvelope struct { Envelope Body struct { Body ViewExperimentsResponse ViewExperimentsResponse `xml:"viewExperimentsResponse"` } }
type ViewProjectsEnvelope ¶
type ViewProjectsResponse ¶
type ViewProjectsResponse struct {
Return []ProjectDescription `xml:"http://api.testbed.deterlab.net/xsd return"`
}
func ViewProjects ¶
func ViewProjects(uid string, regex string) (*ViewProjectsResponse, error)
type ViewProjectsResponseEnvelope ¶
type ViewProjectsResponseEnvelope struct { Envelope Body struct { Body ViewProjectsResponse ViewProjectsResponse `xml:"http://api.testbed.deterlab.net/xsd viewProjectsResponse"` } }
type ViewRealizationsResponse ¶
type ViewRealizationsResponse struct {
Return []RealizationDescription `xml:"return"`
}
func ViewRealizations ¶
func ViewRealizations(user, regex string) (*ViewRealizationsResponse, error)
type ViewRealizationsResponseEnvelope ¶
type ViewRealizationsResponseEnvelope struct { Envelope Body struct { Body ViewRealizationsResponse ViewRealizationsResponse `xml:"viewRealizationsResponse"` } }
Click to show internal directories.
Click to hide internal directories.