Documentation ¶
Index ¶
- Constants
- Variables
- func GatherKinds(ocfg, ncfg *map[string]interface{}) []string
- type BIGIP
- type BIGIPContext
- func (bc *BIGIPContext) All(kind string) (*map[string]interface{}, error)
- func (bc *BIGIPContext) Arps() (*map[string]string, error)
- func (bc *BIGIPContext) CommitTrans(transId float64) error
- func (bc *BIGIPContext) Delete(kind, name, partition, subfolder string) error
- func (bc *BIGIPContext) DeleteDataGroup(dgkey string) error
- func (bc *BIGIPContext) DeletePartition(name string) error
- func (bc *BIGIPContext) Deploy(kind, name, partition, subfolder string, body map[string]interface{}) error
- func (bc *BIGIPContext) DeployPartition(name string) error
- func (bc *BIGIPContext) DeployWithTrans(rr *[]RestRequest, transId float64) (int, error)
- func (bc *BIGIPContext) DoRestRequests(rr *[]RestRequest) error
- func (bc *BIGIPContext) Exist(kind, name, partition, subfolder string) (*map[string]interface{}, error)
- func (bc *BIGIPContext) Fdbs(tunnelName string) (*map[string]string, error)
- func (bc *BIGIPContext) GenRestRequests(partition string, ocfg, ncfg *map[string]interface{}) (*[]RestRequest, error)
- func (bc *BIGIPContext) GetExistingResources(partition string, kinds []string) (*map[string]map[string]interface{}, error)
- func (bc *BIGIPContext) ListPartitions() ([]string, error)
- func (bc *BIGIPContext) LoadDataGroup(dgkey string) (*PersistedConfig, error)
- func (bc *BIGIPContext) MakeTrans() (float64, error)
- func (bc *BIGIPContext) Members(poolname string, partition string, subfolder string) ([]interface{}, error)
- func (bc *BIGIPContext) ModifyDbValue(name, value string) error
- func (bc *BIGIPContext) Ndps() (*map[string]string, error)
- func (bc *BIGIPContext) SaveDataGroup(dgkey string, pc *PersistedConfig) error
- func (bc *BIGIPContext) SaveSysConfig(partitions []string) error
- func (bc *BIGIPContext) Tmsh(cmd string) (*map[string]interface{}, error)
- func (bc *BIGIPContext) Update(kind, name, partition, subfolder string, body map[string]interface{}) error
- func (bc *BIGIPContext) Upload(name, content string) (string, error)
- type BIGIPVersion
- type PersistedConfig
- type RestRequest
Constants ¶
const TmUriPrefix = "/mgmt/tm"
Variables ¶
var ( // slog *utils.SLOG ResOrder []string BIGIPiControlTimeCostTotal *prometheus.GaugeVec BIGIPiControlTimeCostCount *prometheus.GaugeVec )
Functions ¶
func GatherKinds ¶
Types ¶
type BIGIP ¶
type BIGIPContext ¶
func (*BIGIPContext) All ¶
func (bc *BIGIPContext) All(kind string) (*map[string]interface{}, error)
func (*BIGIPContext) CommitTrans ¶
func (bc *BIGIPContext) CommitTrans(transId float64) error
func (*BIGIPContext) Delete ¶
func (bc *BIGIPContext) Delete(kind, name, partition, subfolder string) error
func (*BIGIPContext) DeleteDataGroup ¶
func (bc *BIGIPContext) DeleteDataGroup(dgkey string) error
func (*BIGIPContext) DeletePartition ¶
func (bc *BIGIPContext) DeletePartition(name string) error
DeletePartition delete the specified partition if exists on BIG-IP
func (*BIGIPContext) Deploy ¶
func (bc *BIGIPContext) Deploy(kind, name, partition, subfolder string, body map[string]interface{}) error
func (*BIGIPContext) DeployPartition ¶
func (bc *BIGIPContext) DeployPartition(name string) error
DeployPartition create the specified partition if not exists on BIG-IP
func (*BIGIPContext) DeployWithTrans ¶
func (bc *BIGIPContext) DeployWithTrans(rr *[]RestRequest, transId float64) (int, error)
func (*BIGIPContext) DoRestRequests ¶
func (bc *BIGIPContext) DoRestRequests(rr *[]RestRequest) error
func (*BIGIPContext) Exist ¶
func (bc *BIGIPContext) Exist(kind, name, partition, subfolder string) (*map[string]interface{}, error)
func (*BIGIPContext) Fdbs ¶
func (bc *BIGIPContext) Fdbs(tunnelName string) (*map[string]string, error)
func (*BIGIPContext) GenRestRequests ¶
func (bc *BIGIPContext) GenRestRequests(partition string, ocfg, ncfg *map[string]interface{}) (*[]RestRequest, error)
GenRestRequests generate a list of rest requests, each item is type of RestRequest GenRestRequests will compare the passed ocfg and ncfg, and in addition the actual states got from BIG-IP, and concludes into a list of RestRequests indicating which resource needs to be POST, PATCH or DELETE, and in which order. The generated []RestRequest will be used by DoRestRequests function for execution in trasaction mode. ocfg, ncfg format:
{ "<folder name>": { "[ltm|net|...]/<resource type>/<resource name>": { "resource property key": "resource property value", "...": "..." } }, "...": "..." }
The data transformation is:
{ocfgs} {ncfgs}
{typed-[rDels]} {typed-[rCrts]}
[c] [u] [d] Existings
u c u c d n/a
[sorted-rrs]
func (*BIGIPContext) GetExistingResources ¶
func (*BIGIPContext) ListPartitions ¶
func (bc *BIGIPContext) ListPartitions() ([]string, error)
func (*BIGIPContext) LoadDataGroup ¶
func (bc *BIGIPContext) LoadDataGroup(dgkey string) (*PersistedConfig, error)
func (*BIGIPContext) MakeTrans ¶
func (bc *BIGIPContext) MakeTrans() (float64, error)
func (*BIGIPContext) Members ¶
func (bc *BIGIPContext) Members(poolname string, partition string, subfolder string) ([]interface{}, error)
Members return []interface{} as /mgmt/tm/ltm/pool?expandSubcollections=true returns to us Key information like 'partition', 'name', 'address' are included.
func (*BIGIPContext) ModifyDbValue ¶
func (bc *BIGIPContext) ModifyDbValue(name, value string) error
func (*BIGIPContext) SaveDataGroup ¶
func (bc *BIGIPContext) SaveDataGroup(dgkey string, pc *PersistedConfig) error
func (*BIGIPContext) SaveSysConfig ¶
func (bc *BIGIPContext) SaveSysConfig(partitions []string) error
func (*BIGIPContext) Tmsh ¶
func (bc *BIGIPContext) Tmsh(cmd string) (*map[string]interface{}, error)