Documentation ¶
Index ¶
- Constants
- Variables
- func CreateFacilityModel(name string, m *xir.Facility) error
- func DeleteEnclaveWgIfreqs(enclave string) error
- func DeleteEndpoints(rlz *portal.Realization) error
- func DeleteMaterialization(pid, eid, rid string) error
- func EnsureVlistBucket() error
- func InitPortalEtcdClient() error
- func InitPortalMinIOClient() error
- func IsValidMaterializationName(pid, eid, rid string) error
- func ListWgIfreqs() (map[string][]*WgIfRequest, error)
- func ReadBlockPool(b *BlockPool) error
- func ReadBlockPoolAllocations(b []*BlockPoolAllocations) error
- func ReadExperiments(es []*Experiment) error
- func ReadFacilities(fs []*Facility) error
- func ReadFacilityModel(name string) (*xir.Facility, error)
- func ReadMaterialization(pid, eid, rid string) (*portal.Materialization, error)
- func ReadOrganizations(orgs []*Organization) error
- func ReadProjects(ps []*Project) error
- func ReadRealizationResult(project, experiment, realization string) (*portal.RealizationResult, error)
- func ReadRealizeRequests(rs []*RealizeRequest) error
- func ReadUsers(users []*User) error
- func RecordEndpoints(rlz *portal.Realization) error
- func SaveMaterialization(mtz *portal.Materialization) error
- func UpdateFacilityModel(rq *portal.UpdateFacilityRequest) error
- func UserExists(username string) bool
- func WriteRealizationResult(r *portal.RealizationResult) error
- func XdcId(name, project string) string
- func XpPathSplit(path string) (string, string, error)
- type BlockPool
- type BlockPoolAllocations
- func (x *BlockPoolAllocations) Bucket() string
- func (x *BlockPoolAllocations) GetVersion() int64
- func (x *BlockPoolAllocations) Id() string
- func (x *BlockPoolAllocations) Key() string
- func (x *BlockPoolAllocations) SetVersion(v int64)
- func (x *BlockPoolAllocations) Substrate() Substrate
- func (x *BlockPoolAllocations) Value() interface{}
- type Counter
- func (c *Counter) Bucket() string
- func (c *Counter) Create() (*Rollback, error)
- func (c *Counter) Delete() (*Rollback, error)
- func (c *Counter) Free(v uint64) error
- func (c *Counter) GetVersion() int64
- func (c *Counter) Id() string
- func (c *Counter) Key() string
- func (c *Counter) Next() (uint64, error)
- func (c *Counter) Read() error
- func (c *Counter) SetVersion(v int64)
- func (c *Counter) Substrate() Substrate
- func (c *Counter) Update() (*Rollback, error)
- func (c *Counter) Value() interface{}
- type EmuServers
- type EtcdRollback
- type Experiment
- func (e *Experiment) AddCompilation(revision string, comp_err error) error
- func (e *Experiment) Bucket() string
- func (e *Experiment) Create() (*Rollback, error)
- func (e *Experiment) Delete() (*Rollback, error)
- func (e *Experiment) DeleteLinkedOps(tc *TransactionCache) ([]StorOp, error)
- func (e *Experiment) DeleteLinkedOpsUsers(projUsers []ObjectIO) ([]StorOp, error)
- func (e *Experiment) GetVersion() int64
- func (e *Experiment) Id() string
- func (e *Experiment) Key() string
- func (e *Experiment) Read() error
- func (e *Experiment) ReadExperimentModel(revision string) (*portal.XpNetModel, string, error)
- func (e *Experiment) ReadExperimentModels() (map[string]*portal.XpNetModel, error)
- func (e *Experiment) SetVersion(v int64)
- func (e *Experiment) Substrate() Substrate
- func (e *Experiment) Update() (*Rollback, error)
- func (e *Experiment) Value() interface{}
- type Facility
- func (f *Facility) Bucket() string
- func (f *Facility) Create() (*Rollback, error)
- func (f *Facility) Delete() (*Rollback, error)
- func (f *Facility) GetVersion() int64
- func (f *Facility) Id() string
- func (f *Facility) Key() string
- func (f *Facility) Read() error
- func (f *Facility) SetVersion(v int64)
- func (f *Facility) Substrate() Substrate
- func (f *Facility) Update() (*Rollback, error)
- func (f *Facility) Value() interface{}
- type InitHarborRequest
- func (i *InitHarborRequest) Bucket() string
- func (r *InitHarborRequest) Create() (*Rollback, error)
- func (r *InitHarborRequest) Delete() (*Rollback, error)
- func (i *InitHarborRequest) GetVersion() int64
- func (i *InitHarborRequest) Id() string
- func (i *InitHarborRequest) Key() string
- func (i *InitHarborRequest) SetVersion(v int64)
- func (i *InitHarborRequest) Substrate() Substrate
- func (i *InitHarborRequest) Value() interface{}
- type JupyterCfg
- func (j *JupyterCfg) Bucket() string
- func (j *JupyterCfg) Create() (*Rollback, error)
- func (j *JupyterCfg) Delete() (*Rollback, error)
- func (j *JupyterCfg) GetVersion() int64
- func (j *JupyterCfg) Id() string
- func (j *JupyterCfg) Key() string
- func (j *JupyterCfg) Read() error
- func (j *JupyterCfg) SetVersion(v int64)
- func (j *JupyterCfg) Substrate() Substrate
- func (j *JupyterCfg) Update() (*Rollback, error)
- func (j *JupyterCfg) Value() interface{}
- type Lock
- type Locks
- type MaterializeRequest
- func (m *MaterializeRequest) Bucket() string
- func (m *MaterializeRequest) Create() (*Rollback, error)
- func (m *MaterializeRequest) Delete() (*Rollback, error)
- func (m *MaterializeRequest) DeleteLinkedOps() ([]StorOp, error)
- func (m *MaterializeRequest) GetVersion() int64
- func (m *MaterializeRequest) Id() string
- func (m *MaterializeRequest) Key() string
- func (m *MaterializeRequest) Read() error
- func (m *MaterializeRequest) SetVersion(v int64)
- func (m *MaterializeRequest) Substrate() Substrate
- func (m *MaterializeRequest) Value() interface{}
- type Object
- type ObjectIO
- type Operation
- type Organization
- func (o *Organization) Bucket() string
- func (o *Organization) Create() (*Rollback, error)
- func (o *Organization) Delete() (*Rollback, error)
- func (o *Organization) DeleteLinkedOps(tc *TransactionCache) ([]StorOp, error)
- func (o *Organization) GetVersion() int64
- func (o *Organization) Id() string
- func (o *Organization) Key() string
- func (o *Organization) Read() error
- func (o *Organization) SetVersion(v int64)
- func (o *Organization) Substrate() Substrate
- func (o *Organization) Update() (*Rollback, error)
- func (o *Organization) Value() interface{}
- type Pool
- func (p *Pool) AddFacility(facility string, resources []string) (*Rollback, error)
- func (p *Pool) AddOrganization(organization string) (*Rollback, error)
- func (p *Pool) AddProject(project string) (*Rollback, error)
- func (p *Pool) Bucket() string
- func (p *Pool) Create() (*Rollback, error)
- func (p *Pool) Delete() (*Rollback, error)
- func (p *Pool) GetVersion() int64
- func (p *Pool) Id() string
- func (p *Pool) Key() string
- func (p *Pool) Read() error
- func (p *Pool) RemoveFacility(facility string) (*Rollback, error)
- func (p *Pool) RemoveOrganization(organization string) (*Rollback, error)
- func (p *Pool) RemoveProject(project string) (*Rollback, error)
- func (p *Pool) SetVersion(ver int64)
- func (p *Pool) Substrate() Substrate
- func (p *Pool) Update() (*Rollback, error)
- func (p *Pool) UpdateResources(facility string, resources []string, strat *portal.PatchStrategy) (*Rollback, error)
- func (p *Pool) Value() interface{}
- type PortalConfig
- func (c *PortalConfig) Bucket() string
- func (c *PortalConfig) Create() (*Rollback, error)
- func (c *PortalConfig) Delete() (*Rollback, error)
- func (c *PortalConfig) GetVersion() int64
- func (c *PortalConfig) Id() string
- func (c *PortalConfig) Key() string
- func (c *PortalConfig) Marshal() ([]byte, error)
- func (c *PortalConfig) Read() error
- func (c *PortalConfig) SetVersion(v int64)
- func (c *PortalConfig) Substrate() Substrate
- func (c *PortalConfig) Unmarshal(b []byte) error
- func (c *PortalConfig) Update() (*Rollback, error)
- func (c *PortalConfig) Value() interface{}
- type Project
- func (p *Project) Bucket() string
- func (p *Project) Create() (*Rollback, error)
- func (p *Project) Delete() (*Rollback, error)
- func (p *Project) DeleteLinkedOps(tc *TransactionCache) ([]StorOp, error)
- func (p *Project) GetVersion() int64
- func (p *Project) Id() string
- func (p *Project) Key() string
- func (p *Project) Read() error
- func (p *Project) SetVersion(v int64)
- func (p *Project) Substrate() Substrate
- func (p *Project) Update() (*Rollback, error)
- func (p *Project) Value() interface{}
- type PublicKey
- func (p *PublicKey) Bucket() string
- func (p *PublicKey) Create() (*Rollback, error)
- func (p *PublicKey) Delete() (*Rollback, error)
- func (p *PublicKey) GetVersion() int64
- func (p *PublicKey) Id() string
- func (p *PublicKey) Key() string
- func (p *PublicKey) Read() error
- func (p *PublicKey) SetVersion(v int64)
- func (p *PublicKey) Substrate() Substrate
- func (p *PublicKey) Update() (*Rollback, error)
- func (p *PublicKey) Value() interface{}
- type RbStack
- type RealizeRequest
- func (r *RealizeRequest) Bucket() string
- func (r *RealizeRequest) Create() (*Rollback, error)
- func (r *RealizeRequest) Delete() (*Rollback, error)
- func (r *RealizeRequest) DeleteLinkedOps() ([]StorOp, error)
- func (r *RealizeRequest) GetVersion() int64
- func (r *RealizeRequest) Id() string
- func (r *RealizeRequest) Key() string
- func (r *RealizeRequest) Read() error
- func (r *RealizeRequest) SetVersion(v int64)
- func (r *RealizeRequest) Substrate() Substrate
- func (r *RealizeRequest) Value() interface{}
- type Rollback
- type SSHCert
- func (sc *SSHCert) Bucket() string
- func (sc *SSHCert) Create() (*Rollback, error)
- func (sc *SSHCert) Delete() (*Rollback, error)
- func (sc *SSHCert) GetVersion() int64
- func (sc *SSHCert) Id() string
- func (sc *SSHCert) Key() string
- func (sc *SSHCert) Read() error
- func (sc *SSHCert) SetVersion(ver int64)
- func (sc *SSHCert) Substrate() Substrate
- func (sc *SSHCert) Type() string
- func (sc *SSHCert) Update() (*Rollback, error)
- func (sc *SSHCert) Value() interface{}
- type SSHJump
- func (j *SSHJump) Bucket() string
- func (j *SSHJump) Create() (*Rollback, error)
- func (j *SSHJump) Delete() (*Rollback, error)
- func (j *SSHJump) GetVersion() int64
- func (j *SSHJump) Id() string
- func (j *SSHJump) Key() string
- func (j *SSHJump) Read() error
- func (j *SSHJump) SetVersion(v int64)
- func (j *SSHJump) Substrate() Substrate
- func (j *SSHJump) Update() (*Rollback, error)
- func (j *SSHJump) Value() interface{}
- type SSHKeyPair
- func (skp *SSHKeyPair) Bucket() string
- func (skp *SSHKeyPair) Create() (*Rollback, error)
- func (skp *SSHKeyPair) Delete() (*Rollback, error)
- func (skp *SSHKeyPair) GetVersion() int64
- func (skp *SSHKeyPair) Id() string
- func (skp *SSHKeyPair) Key() string
- func (skp *SSHKeyPair) Read() error
- func (skp *SSHKeyPair) SetVersion(ver int64)
- func (skp *SSHKeyPair) Substrate() Substrate
- func (skp *SSHKeyPair) Type() string
- func (skp *SSHKeyPair) Update() (*Rollback, error)
- func (skp *SSHKeyPair) Value() interface{}
- type StorOp
- type StorageMessage
- type Substrate
- type Transaction
- type TransactionCache
- type TransactionCacheType
- type User
- func (u *User) Bucket() string
- func (u *User) Create() (*Rollback, error)
- func (u *User) Delete() (*Rollback, error)
- func (u *User) DeleteLinkedOps(tc *TransactionCache) ([]StorOp, error)
- func (u *User) GetVersion() int64
- func (u *User) Id() string
- func (u *User) Key() string
- func (u *User) Read() error
- func (u *User) SetVersion(v int64)
- func (u *User) Substrate() Substrate
- func (u *User) Update() (*Rollback, error)
- func (u *User) Value() interface{}
- func (u *User) WriteRegistration() (*Rollback, error)
- type UserStatus
- func (us *UserStatus) Bucket() string
- func (us *UserStatus) Create() (*Rollback, error)
- func (us *UserStatus) Delete() (*Rollback, error)
- func (us *UserStatus) GetVersion() int64
- func (us *UserStatus) Id() string
- func (us *UserStatus) Key() string
- func (us *UserStatus) Read() error
- func (us *UserStatus) SetVersion(v int64)
- func (us *UserStatus) Substrate() Substrate
- func (us *UserStatus) Unmarshal(b []byte) error
- func (us *UserStatus) Update() (*Rollback, error)
- func (us *UserStatus) Value() interface{}
- type VlanAllocationTable
- type Vlist
- func (vl *Vlist) Bucket() string
- func (vl *Vlist) Create() (*Rollback, error)
- func (vl *Vlist) Delete() (*Rollback, error)
- func (vl *Vlist) Free(val uint32) error
- func (vl *Vlist) GetVersion() int64
- func (vl *Vlist) Id() string
- func (vl *Vlist) Key() string
- func (vl *Vlist) Lock() (*Lock, error)
- func (vl *Vlist) Next() (uint32, error)
- func (vl *Vlist) Read() error
- func (vl *Vlist) SetVersion(ver int64)
- func (vl *Vlist) Substrate() Substrate
- func (vl *Vlist) Unlock(lk *Lock) error
- func (vl *Vlist) Update() (*Rollback, error)
- func (vl *Vlist) Value() interface{}
- func (vl *Vlist) Write() error
- type Vset
- func (v *Vset) Bucket() string
- func (v *Vset) Contains(val uint32) bool
- func (v *Vset) Create() (*Rollback, error)
- func (v *Vset) Delete() (*Rollback, error)
- func (v *Vset) Get(val uint32) error
- func (v *Vset) GetAny() (uint32, error)
- func (v *Vset) GetVersion() int64
- func (v *Vset) Id() string
- func (v *Vset) Key() string
- func (v *Vset) Put(val uint32) error
- func (v *Vset) Read() error
- func (v *Vset) SetVersion(x int64)
- func (v *Vset) Substrate() Substrate
- func (v *Vset) Update() (*Rollback, error)
- func (v *Vset) Value() interface{}
- type WgEnclave
- func (e *WgEnclave) Bucket() string
- func (e *WgEnclave) Create() (*Rollback, error)
- func (e *WgEnclave) Delete() (*Rollback, error)
- func (e *WgEnclave) GetVersion() int64
- func (e *WgEnclave) Id() string
- func (e *WgEnclave) Key() string
- func (e *WgEnclave) Read() error
- func (e *WgEnclave) SetVersion(ver int64)
- func (e *WgEnclave) Substrate() Substrate
- func (e *WgEnclave) Update() (*Rollback, error)
- func (e *WgEnclave) Value() interface{}
- type WgIfRequest
- func (r *WgIfRequest) Bucket() string
- func (r *WgIfRequest) Create() (*Rollback, error)
- func (r *WgIfRequest) Delete() (*Rollback, error)
- func (r *WgIfRequest) GetVersion() int64
- func (r *WgIfRequest) Id() string
- func (r *WgIfRequest) Key() string
- func (r *WgIfRequest) Read() error
- func (r *WgIfRequest) SetVersion(ver int64)
- func (r *WgIfRequest) Substrate() Substrate
- func (r *WgIfRequest) Update() (*Rollback, error)
- func (r *WgIfRequest) Value() interface{}
- type XDC
- func (x *XDC) Bucket() string
- func (x *XDC) Create() (*Rollback, error)
- func (x *XDC) DelLinkedOps() ([]StorOp, error)
- func (x *XDC) Delete() (*Rollback, error)
- func (x *XDC) GetVersion() int64
- func (x *XDC) Id() string
- func (x *XDC) Key() string
- func (x *XDC) Read() error
- func (x *XDC) SetMaterialization(mtz string) (*Rollback, error)
- func (x *XDC) SetVersion(v int64)
- func (x *XDC) Substrate() Substrate
- func (x *XDC) Update() (*Rollback, error)
- func (x *XDC) Value() interface{}
- func (x *XDC) XdcId() string
- type XdcWgClient
- func (x *XdcWgClient) Bucket() string
- func (x *XdcWgClient) Create() (*Rollback, error)
- func (x *XdcWgClient) Delete() (*Rollback, error)
- func (x *XdcWgClient) GetVersion() int64
- func (x *XdcWgClient) Id() string
- func (x *XdcWgClient) Key() string
- func (x *XdcWgClient) Read() error
- func (x *XdcWgClient) SetVersion(ver int64)
- func (x *XdcWgClient) Substrate() Substrate
- func (x *XdcWgClient) Update() (*Rollback, error)
- func (x *XdcWgClient) Value() interface{}
Constants ¶
const ( VlanMergeReserved = 100 // reserved for Merge VlanSwitchReserved = 1000 // reserved for Cumulus VlanMax = 1<<12 - 1 - VlanSwitchReserved VlanMin = VlanMergeReserved VtepMergeReserved = 100 // reserved for Merge VtepSwitchReserved = 0 VtepMax = 1<<24 - 1 - VtepSwitchReserved VtepMin = VtepMergeReserved )
Variables ¶
var EtcdClient *clientv3.Client
var MinIOClient *minio.Client
Functions ¶
func DeleteEnclaveWgIfreqs ¶ added in v1.1.38
func DeleteEndpoints ¶
func DeleteEndpoints(rlz *portal.Realization) error
DeleteEndpoints removes the etcd keys containing the emulation endpoint count for a realization
func DeleteMaterialization ¶
func EnsureVlistBucket ¶
func EnsureVlistBucket() error
func InitPortalEtcdClient ¶
func InitPortalEtcdClient() error
func InitPortalMinIOClient ¶
func InitPortalMinIOClient() error
func IsValidMaterializationName ¶ added in v1.1.28
IsValidMaterializationName - return an error if the given component names would create an invalid mtz name.
func ListWgIfreqs ¶ added in v1.1.38
func ListWgIfreqs() (map[string][]*WgIfRequest, error)
func ReadBlockPool ¶
func ReadBlockPoolAllocations ¶
func ReadBlockPoolAllocations(b []*BlockPoolAllocations) error
func ReadExperiments ¶
func ReadExperiments(es []*Experiment) error
func ReadFacilities ¶
func ReadMaterialization ¶
func ReadMaterialization(pid, eid, rid string) (*portal.Materialization, error)
func ReadOrganizations ¶ added in v1.1.22
func ReadOrganizations(orgs []*Organization) error
Read the organization data for the given organizations.
func ReadProjects ¶
Read the project data for the given projects.
func ReadRealizationResult ¶
func ReadRealizationResult(project, experiment, realization string) (*portal.RealizationResult, error)
func ReadRealizeRequests ¶
func ReadRealizeRequests(rs []*RealizeRequest) error
ReadRealizeRequests will read the given realization requests
func RecordEndpoints ¶
func RecordEndpoints(rlz *portal.Realization) error
RecordEndpoints stores the number of endpoints on the emulation server used for a realization. This information is used by the realization engine to load balance materializations across multiple emulation servers.
func SaveMaterialization ¶
func SaveMaterialization(mtz *portal.Materialization) error
func UpdateFacilityModel ¶
func UpdateFacilityModel(rq *portal.UpdateFacilityRequest) error
func UserExists ¶ added in v1.1.22
func WriteRealizationResult ¶ added in v1.1.40
func WriteRealizationResult(r *portal.RealizationResult) error
Types ¶
type BlockPool ¶
type BlockPool struct { *portal.BlockPool // contains filtered or unexported fields }
The max size of this data structure should be 1024 address blocks times 15 characters max per address ~15KB, so should be safe for etcd.
func FetchBlockPool ¶
func NewBlockPool ¶
func NewBlockPool() *BlockPool
func (*BlockPool) GetVersion ¶
func (*BlockPool) SetVersion ¶
type BlockPoolAllocations ¶
type BlockPoolAllocations struct { *portal.BlockPoolAllocations // contains filtered or unexported fields }
func FetchBlockPoolAllocations ¶
func FetchBlockPoolAllocations(id string) (*BlockPoolAllocations, error)
func NewBlockPoolAllocations ¶
func NewBlockPoolAllocations(id string) *BlockPoolAllocations
func (*BlockPoolAllocations) Bucket ¶
func (x *BlockPoolAllocations) Bucket() string
func (*BlockPoolAllocations) GetVersion ¶
func (x *BlockPoolAllocations) GetVersion() int64
func (*BlockPoolAllocations) Id ¶
func (x *BlockPoolAllocations) Id() string
func (*BlockPoolAllocations) Key ¶
func (x *BlockPoolAllocations) Key() string
func (*BlockPoolAllocations) SetVersion ¶
func (x *BlockPoolAllocations) SetVersion(v int64)
func (*BlockPoolAllocations) Substrate ¶
func (x *BlockPoolAllocations) Substrate() Substrate
func (*BlockPoolAllocations) Value ¶
func (x *BlockPoolAllocations) Value() interface{}
type EmuServers ¶ added in v1.1.2
Stores the number of endpoints each network emulation server is processing
func GetEmuServers ¶ added in v1.1.2
func GetEmuServers(nodes []string) (EmuServers, error)
Returns a map with the number of endpoints on each requested emulation server
func (EmuServers) Alloc ¶ added in v1.1.2
func (s EmuServers) Alloc(count int) string
Alloc requests an emulation server with "count" endpoints
type EtcdRollback ¶
type EtcdRollback func() (*clientv3.TxnResponse, error)
type Experiment ¶
type Experiment struct { *portal.Experiment UpdateRequest *portal.UpdateExperimentRequest }
func NewExperiment ¶
func NewExperiment(name, project string) *Experiment
func (*Experiment) AddCompilation ¶
func (e *Experiment) AddCompilation(revision string, comp_err error) error
func (*Experiment) Bucket ¶
func (e *Experiment) Bucket() string
func (*Experiment) Create ¶
func (e *Experiment) Create() (*Rollback, error)
func (*Experiment) Delete ¶
func (e *Experiment) Delete() (*Rollback, error)
func (*Experiment) DeleteLinkedOps ¶
func (e *Experiment) DeleteLinkedOps(tc *TransactionCache) ([]StorOp, error)
Get the storage ops that should be transacted when an experiment is deleted. The existing writeOp users are passed in and should be modified in place.
func (*Experiment) DeleteLinkedOpsUsers ¶ added in v1.1.22
func (e *Experiment) DeleteLinkedOpsUsers(projUsers []ObjectIO) ([]StorOp, error)
Get the storage ops that should be transacted when an experiment is deleted. The existing writeOp users are passed in and should be modified in place.
func (*Experiment) GetVersion ¶
func (e *Experiment) GetVersion() int64
func (*Experiment) Id ¶
func (e *Experiment) Id() string
func (*Experiment) Key ¶
func (e *Experiment) Key() string
func (*Experiment) Read ¶
func (e *Experiment) Read() error
func (*Experiment) ReadExperimentModel ¶
func (e *Experiment) ReadExperimentModel(revision string) (*portal.XpNetModel, string, error)
func (*Experiment) ReadExperimentModels ¶
func (e *Experiment) ReadExperimentModels() (map[string]*portal.XpNetModel, error)
func (*Experiment) SetVersion ¶
func (e *Experiment) SetVersion(v int64)
func (*Experiment) Substrate ¶
func (e *Experiment) Substrate() Substrate
func (*Experiment) Update ¶
func (e *Experiment) Update() (*Rollback, error)
func (*Experiment) Value ¶
func (e *Experiment) Value() interface{}
type Facility ¶
type Facility struct { *portal.Facility UpdateRequest *portal.UpdateFacilityRequest }
func ListFacilities ¶
func NewFacility ¶
func (*Facility) GetVersion ¶
func (*Facility) SetVersion ¶
type InitHarborRequest ¶
type InitHarborRequest struct {
*portal.InitHarborRequest
}
func NewInitHarborRequest ¶
func NewInitHarborRequest(facility string) *InitHarborRequest
func (*InitHarborRequest) Bucket ¶
func (i *InitHarborRequest) Bucket() string
func (*InitHarborRequest) Create ¶
func (r *InitHarborRequest) Create() (*Rollback, error)
func (*InitHarborRequest) Delete ¶
func (r *InitHarborRequest) Delete() (*Rollback, error)
func (*InitHarborRequest) GetVersion ¶
func (i *InitHarborRequest) GetVersion() int64
func (*InitHarborRequest) Id ¶
func (i *InitHarborRequest) Id() string
func (*InitHarborRequest) Key ¶
func (i *InitHarborRequest) Key() string
func (*InitHarborRequest) SetVersion ¶
func (i *InitHarborRequest) SetVersion(v int64)
func (*InitHarborRequest) Substrate ¶
func (i *InitHarborRequest) Substrate() Substrate
func (*InitHarborRequest) Value ¶
func (i *InitHarborRequest) Value() interface{}
type JupyterCfg ¶
type JupyterCfg struct { *portal.JupyterCfg // contains filtered or unexported fields }
func NewJupyterCfg ¶
func NewJupyterCfg(host string) *JupyterCfg
func (*JupyterCfg) Bucket ¶
func (j *JupyterCfg) Bucket() string
func (*JupyterCfg) Create ¶
func (j *JupyterCfg) Create() (*Rollback, error)
func (*JupyterCfg) Delete ¶
func (j *JupyterCfg) Delete() (*Rollback, error)
func (*JupyterCfg) GetVersion ¶
func (j *JupyterCfg) GetVersion() int64
func (*JupyterCfg) Id ¶
func (j *JupyterCfg) Id() string
func (*JupyterCfg) Key ¶
func (j *JupyterCfg) Key() string
func (*JupyterCfg) Read ¶
func (j *JupyterCfg) Read() error
func (*JupyterCfg) SetVersion ¶
func (j *JupyterCfg) SetVersion(v int64)
func (*JupyterCfg) Substrate ¶
func (j *JupyterCfg) Substrate() Substrate
func (*JupyterCfg) Update ¶
func (j *JupyterCfg) Update() (*Rollback, error)
func (*JupyterCfg) Value ¶
func (j *JupyterCfg) Value() interface{}
type MaterializeRequest ¶
type MaterializeRequest struct {
*portal.MaterializeRequest
}
func ListMaterializeRequests ¶ added in v1.1.38
func ListMaterializeRequests() ([]*MaterializeRequest, error)
func NewMaterializeRequest ¶
func NewMaterializeRequest(name, experiment, project string) *MaterializeRequest
func (*MaterializeRequest) Bucket ¶
func (m *MaterializeRequest) Bucket() string
func (*MaterializeRequest) Create ¶
func (m *MaterializeRequest) Create() (*Rollback, error)
func (*MaterializeRequest) Delete ¶
func (m *MaterializeRequest) Delete() (*Rollback, error)
func (*MaterializeRequest) DeleteLinkedOps ¶
func (m *MaterializeRequest) DeleteLinkedOps() ([]StorOp, error)
func (*MaterializeRequest) GetVersion ¶
func (m *MaterializeRequest) GetVersion() int64
func (*MaterializeRequest) Id ¶
func (m *MaterializeRequest) Id() string
func (*MaterializeRequest) Key ¶
func (m *MaterializeRequest) Key() string
func (*MaterializeRequest) Read ¶
func (m *MaterializeRequest) Read() error
func (*MaterializeRequest) SetVersion ¶
func (m *MaterializeRequest) SetVersion(v int64)
func (*MaterializeRequest) Substrate ¶
func (m *MaterializeRequest) Substrate() Substrate
func (*MaterializeRequest) Value ¶
func (m *MaterializeRequest) Value() interface{}
type ObjectIO ¶
type ObjectIO interface { Bucket() string //XXX Id() string //XXX Key() string Value() interface{} Substrate() Substrate //XXX GetVersion() int64 SetVersion(int64) }
TODO the original idea here was for the object interface to pull double transaction duty with etcd and minio, but this did not really pan out and we just wound up using it for etcd, so i think we can remove the minio specific trappings
type Organization ¶ added in v1.1.22
type Organization struct { *portal.Organization UpdateRequest *portal.UpdateOrganizationRequest }
func ListOrganizations ¶ added in v1.1.22
func ListOrganizations() ([]*Organization, error)
Return a list of all organizations.
func NewOrganization ¶ added in v1.1.22
func NewOrganization(name string) *Organization
func (*Organization) Bucket ¶ added in v1.1.22
func (o *Organization) Bucket() string
func (*Organization) Create ¶ added in v1.1.22
func (o *Organization) Create() (*Rollback, error)
func (*Organization) Delete ¶ added in v1.1.22
func (o *Organization) Delete() (*Rollback, error)
func (*Organization) DeleteLinkedOps ¶ added in v1.1.22
func (o *Organization) DeleteLinkedOps(tc *TransactionCache) ([]StorOp, error)
func (*Organization) GetVersion ¶ added in v1.1.22
func (o *Organization) GetVersion() int64
func (*Organization) Id ¶ added in v1.1.22
func (o *Organization) Id() string
func (*Organization) Key ¶ added in v1.1.22
func (o *Organization) Key() string
func (*Organization) Read ¶ added in v1.1.22
func (o *Organization) Read() error
func (*Organization) SetVersion ¶ added in v1.1.22
func (o *Organization) SetVersion(v int64)
func (*Organization) Substrate ¶ added in v1.1.22
func (o *Organization) Substrate() Substrate
func (*Organization) Update ¶ added in v1.1.22
func (o *Organization) Update() (*Rollback, error)
func (*Organization) Value ¶ added in v1.1.22
func (o *Organization) Value() interface{}
type Pool ¶
type Pool struct { // *portal.Pool // modify this, then call Update() to update the pool PoolUpdate *portal.Pool }
func GetOrganizationPool ¶ added in v1.1.22
func GetProjectPool ¶ added in v1.0.4
func (*Pool) AddFacility ¶ added in v1.0.4
func (*Pool) AddOrganization ¶ added in v1.1.22
func (*Pool) GetVersion ¶
func (*Pool) RemoveFacility ¶ added in v1.0.4
func (*Pool) RemoveOrganization ¶ added in v1.1.22
func (*Pool) SetVersion ¶
func (*Pool) UpdateResources ¶ added in v1.0.4
type PortalConfig ¶
type PortalConfig struct { Config struct { APIEndpoint string `json:"api_endpoint"` GRPCEndpoint string `json:"grpc_endpoint"` SSHJumpEndpoint string `json:"sshjump_endpoint"` Ver int64 `json:"ver"` Reconcile struct { HeartbeatIntervalSec int64 `json:"heartbeat_interval_sec,omitempty"` HeartbeatGracePeriodSec int64 `json:"heartbeat_grace_period_sec,omitempty"` } Institutions []string `json:"institutions"` // User categories Categories []string `json:"categories"` // Types points to list of subtypes. EntityTypes map[string][]string `json:"entitytypes"` } Ver int64 }
func GetPortalConfig ¶
func GetPortalConfig() (*PortalConfig, error)
func (*PortalConfig) Bucket ¶
func (c *PortalConfig) Bucket() string
func (*PortalConfig) Create ¶
func (c *PortalConfig) Create() (*Rollback, error)
func (*PortalConfig) Delete ¶
func (c *PortalConfig) Delete() (*Rollback, error)
func (*PortalConfig) GetVersion ¶
func (c *PortalConfig) GetVersion() int64
func (*PortalConfig) Id ¶
func (c *PortalConfig) Id() string
func (*PortalConfig) Key ¶
func (c *PortalConfig) Key() string
func (*PortalConfig) Marshal ¶
func (c *PortalConfig) Marshal() ([]byte, error)
func (*PortalConfig) Read ¶
func (c *PortalConfig) Read() error
func (*PortalConfig) SetVersion ¶
func (c *PortalConfig) SetVersion(v int64)
func (*PortalConfig) Substrate ¶
func (c *PortalConfig) Substrate() Substrate
func (*PortalConfig) Unmarshal ¶
func (c *PortalConfig) Unmarshal(b []byte) error
func (*PortalConfig) Update ¶
func (c *PortalConfig) Update() (*Rollback, error)
func (*PortalConfig) Value ¶
func (c *PortalConfig) Value() interface{}
type Project ¶
type Project struct { *portal.Project UpdateRequest *portal.UpdateProjectRequest }
func NewProject ¶
func (*Project) DeleteLinkedOps ¶ added in v1.1.22
func (p *Project) DeleteLinkedOps(tc *TransactionCache) ([]StorOp, error)
func (*Project) GetVersion ¶
func (*Project) SetVersion ¶
type PublicKey ¶
type PublicKey struct { *portal.PublicKey User string // to whom does this pubkey belong? only used for constructing etcd keys Ver int64 // not stored, is that OK? }
func ListUserPublicKeys ¶
Return a list of all keys for the specified user
func NewPublicKey ¶
func (*PublicKey) GetVersion ¶
func (*PublicKey) SetVersion ¶
type RealizeRequest ¶
type RealizeRequest struct {
*portal.RealizeRequest
}
func GetAllRealizationRequests ¶ added in v1.1.40
func GetAllRealizationRequests() ([]*RealizeRequest, error)
GetAllRealizations will read all realization requests in the database and return the values.
func NewRealizeRequest ¶
func NewRealizeRequest(name, experiment, project string) *RealizeRequest
func (*RealizeRequest) Bucket ¶
func (r *RealizeRequest) Bucket() string
func (*RealizeRequest) Create ¶
func (r *RealizeRequest) Create() (*Rollback, error)
func (*RealizeRequest) Delete ¶
func (r *RealizeRequest) Delete() (*Rollback, error)
func (*RealizeRequest) DeleteLinkedOps ¶
func (r *RealizeRequest) DeleteLinkedOps() ([]StorOp, error)
func (*RealizeRequest) GetVersion ¶
func (r *RealizeRequest) GetVersion() int64
func (*RealizeRequest) Id ¶
func (r *RealizeRequest) Id() string
func (*RealizeRequest) Key ¶
func (r *RealizeRequest) Key() string
func (*RealizeRequest) Read ¶
func (r *RealizeRequest) Read() error
func (*RealizeRequest) SetVersion ¶
func (r *RealizeRequest) SetVersion(v int64)
func (*RealizeRequest) Substrate ¶
func (r *RealizeRequest) Substrate() Substrate
func (*RealizeRequest) Value ¶
func (r *RealizeRequest) Value() interface{}
type Rollback ¶
type Rollback struct {
Etcd EtcdRollback
}
func WriteBlockPool ¶
func WriteBlockPoolAllocations ¶
func WriteBlockPoolAllocations(b []*BlockPoolAllocations) (*Rollback, error)
func WriteVsets ¶
type SSHCert ¶
type SSHCert struct { *portal.SSHCert User string IsHost bool // if true this is a host cert, else a user cert Ver int64 }
func GetSSHCerts ¶
func NewSSHHostCert ¶
func NewSSHUserCert ¶
func (*SSHCert) GetVersion ¶
func (*SSHCert) SetVersion ¶
type SSHJump ¶
func ListSSHJumps ¶
func NewSSHJump ¶
func (*SSHJump) GetVersion ¶
func (*SSHJump) SetVersion ¶
type SSHKeyPair ¶
type SSHKeyPair struct { *portal.SSHKeyPair User string IsHost bool Ver int64 }
func GetSSHKeys ¶
func GetSSHKeys() ([]*SSHKeyPair, error)
func NewSSHHostKeyPair ¶
func NewSSHHostKeyPair(host string) *SSHKeyPair
func NewSSHUserKeyPair ¶
func NewSSHUserKeyPair(user string) *SSHKeyPair
func (*SSHKeyPair) Bucket ¶
func (skp *SSHKeyPair) Bucket() string
func (*SSHKeyPair) Create ¶
func (skp *SSHKeyPair) Create() (*Rollback, error)
func (*SSHKeyPair) Delete ¶
func (skp *SSHKeyPair) Delete() (*Rollback, error)
func (*SSHKeyPair) GetVersion ¶
func (skp *SSHKeyPair) GetVersion() int64
func (*SSHKeyPair) Id ¶
func (skp *SSHKeyPair) Id() string
func (*SSHKeyPair) Key ¶
func (skp *SSHKeyPair) Key() string
func (*SSHKeyPair) Read ¶
func (skp *SSHKeyPair) Read() error
func (*SSHKeyPair) SetVersion ¶
func (skp *SSHKeyPair) SetVersion(ver int64)
func (*SSHKeyPair) Substrate ¶
func (skp *SSHKeyPair) Substrate() Substrate
func (*SSHKeyPair) Type ¶
func (skp *SSHKeyPair) Type() string
func (*SSHKeyPair) Update ¶
func (skp *SSHKeyPair) Update() (*Rollback, error)
func (*SSHKeyPair) Value ¶
func (skp *SSHKeyPair) Value() interface{}
type StorageMessage ¶
Support for types that want to marshal and unmarshal themselves.
type Transaction ¶
type Transaction []StorOp
func (Transaction) Exec ¶
func (t Transaction) Exec() error
type TransactionCache ¶ added in v1.1.22
type TransactionCache struct { // Cache objects by type and etcd key. Objs map[TransactionCacheType]map[string]Object }
func NewTransactionCache ¶ added in v1.1.22
func NewTransactionCache() *TransactionCache
func (*TransactionCache) NewObj ¶ added in v1.1.22
func (tc *TransactionCache) NewObj(t TransactionCacheType, args ...string) Object
Create a new thing or give back a cahed version of the thing. args are what is used to New...() the object type requestsed.
func (*TransactionCache) Read ¶ added in v1.1.22
func (tc *TransactionCache) Read() (*Rollback, error)
Read objects using cache.
type TransactionCacheType ¶ added in v1.1.22
type TransactionCacheType int64
Keep track of ongoing updates to data while gathering all the operations for a single transaction.
const ( PTOrg TransactionCacheType = iota PTProj PTExp PTUser PTFac PTPool )
type User ¶
type User struct { *portal.User UpdateRequest *portal.UpdateUserRequest }
func (*User) DeleteLinkedOps ¶ added in v1.1.22
func (u *User) DeleteLinkedOps(tc *TransactionCache) ([]StorOp, error)
func (*User) GetVersion ¶
func (*User) SetVersion ¶
func (*User) WriteRegistration ¶ added in v1.1.39
WriteRegistration - write the user data required for registration only. Do not "init" the user by allocating a uid/gid or creating a user personal project. This function only write a minimal set of user data that is given during account registration. To generate UID/GID and a personal project, call user.Create().
type UserStatus ¶
type UserStatus struct {
*portal.UserStatus
}
Keep track of user state wrt current status. Used to generate certs, keys, xdc accounts, etc.
func NewUserStatus ¶
func NewUserStatus(username string) *UserStatus
func (*UserStatus) Bucket ¶
func (us *UserStatus) Bucket() string
**************************************************************************** UserStatus ****************************************************************************
func (*UserStatus) Create ¶
func (us *UserStatus) Create() (*Rollback, error)
func (*UserStatus) Delete ¶
func (us *UserStatus) Delete() (*Rollback, error)
func (*UserStatus) GetVersion ¶
func (us *UserStatus) GetVersion() int64
func (*UserStatus) Id ¶
func (us *UserStatus) Id() string
func (*UserStatus) Key ¶
func (us *UserStatus) Key() string
func (*UserStatus) Read ¶
func (us *UserStatus) Read() error
func (*UserStatus) SetVersion ¶
func (us *UserStatus) SetVersion(v int64)
func (*UserStatus) Substrate ¶
func (us *UserStatus) Substrate() Substrate
func (*UserStatus) Unmarshal ¶
func (us *UserStatus) Unmarshal(b []byte) error
func (*UserStatus) Update ¶
func (us *UserStatus) Update() (*Rollback, error)
func (*UserStatus) Value ¶
func (us *UserStatus) Value() interface{}
type VlanAllocationTable ¶
type VlanAllocationTable struct { // hosts participating in the VID allocation VidHosts []string // name of the VNI table VniTable string }
func NewVlanAllocationTable ¶
func NewVlanAllocationTable(hosts []string, vnitable string) *VlanAllocationTable
func (*VlanAllocationTable) AllocateVid ¶
func (vat *VlanAllocationTable) AllocateVid() (uint32, error)
Find a VID that is free on each host in the VAT This involves read/modify/write over a collection of switches and hosts, and so could fail, particularly for large realizations. Use a retry loop to catch them
func (*VlanAllocationTable) AllocateVni ¶
func (vat *VlanAllocationTable) AllocateVni() (uint32, error)
Allocate a globally free VNI VNI is a global entity, use a lock
func (*VlanAllocationTable) FreeVid ¶
func (vat *VlanAllocationTable) FreeVid(vid uint32) error
Release the VID back to each host set
func (*VlanAllocationTable) FreeVni ¶
func (vat *VlanAllocationTable) FreeVni(vni uint32) error
Free a VNI back to the pool VNI is a global entity, use a lock
type Vlist ¶
Uses countset backend with minio as substrate. We need this because VNI lists can easily grow well beyond the 1.5 MiB etcd limit
Though this is stored in minio, we use an etcd lock to protect it, which makes this a little bit of a messy object definition
func (*Vlist) GetVersion ¶
func (*Vlist) SetVersion ¶
type Vset ¶
Uses a set backend implementation and Etcd as a substrate, so must be kept small
func (*Vset) GetVersion ¶
func (*Vset) SetVersion ¶
type WgEnclave ¶
type WgEnclave struct { *portal.WgEnclave AddIf *portal.AddWgIfConfigRequest DelIf *portal.AddWgIfConfigRequest }
func ListWgEnclaves ¶
func NewWgEnclave ¶
func (*WgEnclave) GetVersion ¶
func (*WgEnclave) SetVersion ¶
type WgIfRequest ¶
type WgIfRequest struct { *portal.AddWgIfConfigRequest Ver int64 }
*************************************************************************** Wireguard interface requests ***************************************************************************
func NewWgIfRequest ¶
func NewWgIfRequest(enclaveid, key string) *WgIfRequest
func (*WgIfRequest) Bucket ¶
func (r *WgIfRequest) Bucket() string
func (*WgIfRequest) Create ¶
func (r *WgIfRequest) Create() (*Rollback, error)
func (*WgIfRequest) Delete ¶
func (r *WgIfRequest) Delete() (*Rollback, error)
func (*WgIfRequest) GetVersion ¶
func (r *WgIfRequest) GetVersion() int64
func (*WgIfRequest) Id ¶
func (r *WgIfRequest) Id() string
func (*WgIfRequest) Key ¶
func (r *WgIfRequest) Key() string
func (*WgIfRequest) Read ¶
func (r *WgIfRequest) Read() error
func (*WgIfRequest) SetVersion ¶
func (r *WgIfRequest) SetVersion(ver int64)
func (*WgIfRequest) Substrate ¶
func (r *WgIfRequest) Substrate() Substrate
func (*WgIfRequest) Update ¶
func (r *WgIfRequest) Update() (*Rollback, error)
func (*WgIfRequest) Value ¶
func (r *WgIfRequest) Value() interface{}
type XDC ¶
type XDC struct { *portal.XDCStorage UpdateRequest *portal.XDCStorage }
func (*XDC) DelLinkedOps ¶ added in v1.1.9
DelLinkedOps ...
func (*XDC) GetVersion ¶
func (*XDC) SetMaterialization ¶ added in v1.0.5
func (*XDC) SetVersion ¶
type XdcWgClient ¶
type XdcWgClient struct { *portal.AttachXDCRequest Ver int64 }
*************************************************************************** XDC Specific wireguard client information. ***************************************************************************
func NewXdcWgClient ¶
func NewXdcWgClient(rq *portal.AttachXDCRequest) *XdcWgClient
func (*XdcWgClient) Bucket ¶
func (x *XdcWgClient) Bucket() string
func (*XdcWgClient) Create ¶
func (x *XdcWgClient) Create() (*Rollback, error)
func (*XdcWgClient) Delete ¶
func (x *XdcWgClient) Delete() (*Rollback, error)
func (*XdcWgClient) GetVersion ¶
func (x *XdcWgClient) GetVersion() int64
func (*XdcWgClient) Id ¶
func (x *XdcWgClient) Id() string
func (*XdcWgClient) Key ¶
func (x *XdcWgClient) Key() string
func (*XdcWgClient) Read ¶
func (x *XdcWgClient) Read() error
func (*XdcWgClient) SetVersion ¶
func (x *XdcWgClient) SetVersion(ver int64)
func (*XdcWgClient) Substrate ¶
func (x *XdcWgClient) Substrate() Substrate
func (*XdcWgClient) Update ¶
func (x *XdcWgClient) Update() (*Rollback, error)
func (*XdcWgClient) Value ¶
func (x *XdcWgClient) Value() interface{}