rest

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 7, 2024 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Overview

  • Copyright 2019-2020 VMware, Inc.
  • All Rights Reserved.

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * http://www.apache.org/licenses/LICENSE-2.0 * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License.

  • Copyright 2019-2020 VMware, Inc.
  • All Rights Reserved.

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * http://www.apache.org/licenses/LICENSE-2.0 * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License.

  • Copyright 2019-2020 VMware, Inc.
  • All Rights Reserved.

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * http://www.apache.org/licenses/LICENSE-2.0 * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License.

Index

Constants

This section is empty.

Variables

View Source
var (
	L4PolicySetModel = initL4PolSetModel()
)

Functions

func AviVsHttpPSAdd

func AviVsHttpPSAdd(vs_meta interface{}, isEVH bool) []*avimodels.HTTPPolicies

func ExtractStatusCode

func ExtractStatusCode(word string) string

func ExtractVsName

func ExtractVsName(word string) string

func GetIPAMProviderType

func GetIPAMProviderType() string

Types

type AviRestClientPool

type AviRestClientPool struct {
	AviClient []*clients.AviClient
}

type L4PolicySetSchema

type L4PolicySetSchema struct {
	Type string
	// contains filtered or unexported fields
}

func (*L4PolicySetSchema) GetType

func (v *L4PolicySetSchema) GetType() string

func (*L4PolicySetSchema) RemoveRef

func (v *L4PolicySetSchema) RemoveRef(refType string) func(*utils.RestOp, string) bool

type RestOperations

type RestOperations struct {
	// contains filtered or unexported fields
}

func NewRestOperations

func NewRestOperations(cache *avicache.AviObjCache, aviRestPoolClient *utils.AviRestClientPool, overrideLeaderFlag ...bool) RestOperations

func (*RestOperations) AviDSBuild

func (rest *RestOperations) AviDSBuild(ds_meta *nodes.AviHTTPDataScriptNode, cache_obj *avicache.AviDSCache, key string) *utils.RestOp

func (*RestOperations) AviDSCacheAdd

func (rest *RestOperations) AviDSCacheAdd(rest_op *utils.RestOp, vsKey avicache.NamespaceName, key string) error

func (*RestOperations) AviDSCacheDel

func (rest *RestOperations) AviDSCacheDel(rest_op *utils.RestOp, vsKey avicache.NamespaceName, key string) error

func (*RestOperations) AviDSDel

func (rest *RestOperations) AviDSDel(uuid string, tenant string, key string) *utils.RestOp

func (*RestOperations) AviHTTPPolicyCacheAdd

func (rest *RestOperations) AviHTTPPolicyCacheAdd(rest_op *utils.RestOp, vsKey avicache.NamespaceName, key string) error

func (*RestOperations) AviHTTPPolicyCacheDel

func (rest *RestOperations) AviHTTPPolicyCacheDel(rest_op *utils.RestOp, vsKey avicache.NamespaceName, key string) error

func (*RestOperations) AviHttpPSBuild

func (rest *RestOperations) AviHttpPSBuild(hps_meta *nodes.AviHttpPolicySetNode, cache_obj *avicache.AviHTTPPolicyCache, key string) *utils.RestOp

func (*RestOperations) AviHttpPolicyDel

func (rest *RestOperations) AviHttpPolicyDel(uuid string, tenant string, key string) *utils.RestOp

func (*RestOperations) AviL4PSBuild

func (rest *RestOperations) AviL4PSBuild(hps_meta *nodes.AviL4PolicyNode, cache_obj *avicache.AviL4PolicyCache, key string) *utils.RestOp

func (*RestOperations) AviL4PolicyCacheAdd

func (rest *RestOperations) AviL4PolicyCacheAdd(rest_op *utils.RestOp, vsKey avicache.NamespaceName, key string) error

func (*RestOperations) AviL4PolicyCacheDel

func (rest *RestOperations) AviL4PolicyCacheDel(rest_op *utils.RestOp, vsKey avicache.NamespaceName, key string) error

func (*RestOperations) AviL4PolicyDel

func (rest *RestOperations) AviL4PolicyDel(uuid string, tenant string, key string) *utils.RestOp

func (*RestOperations) AviPGCacheAdd

func (rest *RestOperations) AviPGCacheAdd(rest_op *utils.RestOp, vsKey avicache.NamespaceName, key string) error

func (*RestOperations) AviPGCacheDel

func (rest *RestOperations) AviPGCacheDel(rest_op *utils.RestOp, vsKey avicache.NamespaceName, key string) error

func (*RestOperations) AviPGDel

func (rest *RestOperations) AviPGDel(uuid string, tenant string, key string) *utils.RestOp

func (*RestOperations) AviPkiProfileAdd

func (rest *RestOperations) AviPkiProfileAdd(rest_op *utils.RestOp, poolKey avicache.NamespaceName, key string) error

func (*RestOperations) AviPkiProfileBuild

func (rest *RestOperations) AviPkiProfileBuild(pki_node *nodes.AviPkiProfileNode, cache_obj *avicache.AviPkiProfileCache) *utils.RestOp

func (*RestOperations) AviPkiProfileCacheDel

func (rest *RestOperations) AviPkiProfileCacheDel(rest_op *utils.RestOp, poolKey avicache.NamespaceName, key string) error

func (*RestOperations) AviPkiProfileDel

func (rest *RestOperations) AviPkiProfileDel(uuid string, tenant string) *utils.RestOp

func (*RestOperations) AviPoolBuild

func (rest *RestOperations) AviPoolBuild(pool_meta *nodes.AviPoolNode, cache_obj *avicache.AviPoolCache, key string) *utils.RestOp

func (*RestOperations) AviPoolCacheAdd

func (rest *RestOperations) AviPoolCacheAdd(rest_op *utils.RestOp, vsKey avicache.NamespaceName, key string) error

func (*RestOperations) AviPoolCacheDel

func (rest *RestOperations) AviPoolCacheDel(rest_op *utils.RestOp, vsKey avicache.NamespaceName, key string) error

func (*RestOperations) AviPoolDel

func (rest *RestOperations) AviPoolDel(uuid string, tenant string, key string) *utils.RestOp

func (*RestOperations) AviPoolGroupBuild

func (rest *RestOperations) AviPoolGroupBuild(pg_meta *nodes.AviPoolGroupNode, cache_obj *avicache.AviPGCache, key string) *utils.RestOp

func (*RestOperations) AviRestOperateWrapper

func (rest *RestOperations) AviRestOperateWrapper(aviClient *utils.AviRestClientPool, rest_ops []*utils.RestOp, key string, bkt uint32) error

func (*RestOperations) AviSSLBuild

func (rest *RestOperations) AviSSLBuild(ssl_node *nodes.AviTLSKeyCertNode, cache_obj *avicache.AviSSLCache) *utils.RestOp

func (*RestOperations) AviSSLCacheDel

func (rest *RestOperations) AviSSLCacheDel(rest_op *utils.RestOp, vsKey avicache.NamespaceName, key string) error

func (*RestOperations) AviSSLKeyCertAdd

func (rest *RestOperations) AviSSLKeyCertAdd(rest_op *utils.RestOp, vsKey avicache.NamespaceName, key string) error

func (*RestOperations) AviSSLKeyCertDel

func (rest *RestOperations) AviSSLKeyCertDel(uuid string, tenant string) *utils.RestOp

func (*RestOperations) AviVSDel

func (rest *RestOperations) AviVSDel(uuid string, tenant string, key string) (*utils.RestOp, bool)

func (*RestOperations) AviVrfBuild

func (rest *RestOperations) AviVrfBuild(key string, vrfNode *nodes.AviVrfNode, uuid string) *utils.RestOp

func (*RestOperations) AviVrfCacheAdd

func (rest *RestOperations) AviVrfCacheAdd(restOp *utils.RestOp, vrfKey avicache.NamespaceName, key string) error

func (*RestOperations) AviVrfGet

func (rest *RestOperations) AviVrfGet(key, uuid, name string) *avimodels.VrfContext

func (*RestOperations) AviVsBuild

func (rest *RestOperations) AviVsBuild(vs_meta *nodes.AviVsNode, rest_method utils.RestMethod, cache_obj *avicache.AviVsCache, key string) []*utils.RestOp

func (*RestOperations) AviVsBuildForEvh

func (rest *RestOperations) AviVsBuildForEvh(vs_meta *nodes.AviEvhVsNode, rest_method utils.RestMethod, cache_obj *avicache.AviVsCache, key string) []*utils.RestOp

func (*RestOperations) AviVsCacheAdd

func (rest *RestOperations) AviVsCacheAdd(rest_op *utils.RestOp, key string) error

func (*RestOperations) AviVsCacheDel

func (rest *RestOperations) AviVsCacheDel(rest_op *utils.RestOp, vsKey avicache.NamespaceName, key string) error

func (*RestOperations) AviVsChildEvhBuild

func (rest *RestOperations) AviVsChildEvhBuild(vs_meta *nodes.AviEvhVsNode, rest_method utils.RestMethod, cache_obj *avicache.AviVsCache, key string) []*utils.RestOp

func (*RestOperations) AviVsSniBuild

func (rest *RestOperations) AviVsSniBuild(vs_meta *nodes.AviVsNode, rest_method utils.RestMethod, cache_obj *avicache.AviVsCache, key string) []*utils.RestOp

func (*RestOperations) AviVsVipBuild

func (rest *RestOperations) AviVsVipBuild(vsvip_meta *nodes.AviVSVIPNode, vsCache *avicache.AviVsCache, cache_obj *avicache.AviVSVIPCache, key string) (*utils.RestOp, error)

func (*RestOperations) AviVsVipCacheAdd

func (rest *RestOperations) AviVsVipCacheAdd(rest_op *utils.RestOp, vsKey avicache.NamespaceName, key string) error

func (*RestOperations) AviVsVipCacheDel

func (rest *RestOperations) AviVsVipCacheDel(rest_op *utils.RestOp, vsKey avicache.NamespaceName, key string) error

func (*RestOperations) AviVsVipDel

func (rest *RestOperations) AviVsVipDel(uuid string, tenant string, key string) *utils.RestOp

func (*RestOperations) AviVsVipGet

func (rest *RestOperations) AviVsVipGet(key, uuid, name, tenant string) (*avimodels.VsVip, error)

func (*RestOperations) AviVsVipPut

func (rest *RestOperations) AviVsVipPut(uuid string, vsvipObj *avimodels.VsVip, tenant string, key string) *utils.RestOp

func (*RestOperations) CACertCU

func (rest *RestOperations) CACertCU(caCertNodes []*nodes.AviTLSKeyCertNode, certKeys []avicache.NamespaceName, namespace string, rest_ops []*utils.RestOp, key string) ([]avicache.NamespaceName, []*utils.RestOp)

func (*RestOperations) CheckAndPublishForRetry

func (rest *RestOperations) CheckAndPublishForRetry(err error, publishKey avicache.NamespaceName, key string, avimodel *nodes.AviObjectGraph) bool

CheckAndPublishForRetry : Check if the error is of type 401, has string "Rest request error" or was timed out, then publish the key to retry layer. These error do not depend on the object state, hence cache refresh is not required.

func (*RestOperations) CleanupVS

func (rest *RestOperations) CleanupVS(key string, skipVS bool)

func (*RestOperations) DSDelete

func (rest *RestOperations) DSDelete(ds_to_delete []avicache.NamespaceName, namespace string, rest_ops []*utils.RestOp, key string) []*utils.RestOp

func (*RestOperations) DataScriptDelete

func (rest *RestOperations) DataScriptDelete(dsToDelete []avicache.NamespaceName, namespace string, restOps []*utils.RestOp, key string) []*utils.RestOp

func (*RestOperations) DatascriptCU

func (rest *RestOperations) DatascriptCU(ds_nodes []*nodes.AviHTTPDataScriptNode, vs_cache_obj *avicache.AviVsCache, namespace string, rest_ops []*utils.RestOp, key string) ([]avicache.NamespaceName, []*utils.RestOp)

func (*RestOperations) DeletePoolIngressStatus

func (rest *RestOperations) DeletePoolIngressStatus(poolKey avicache.NamespaceName, isVSDelete bool, vsName, key string)

func (*RestOperations) DeleteVSOper

func (rest *RestOperations) DeleteVSOper(vsKey avicache.NamespaceName, vs_cache_obj *avicache.AviVsCache, namespace string, key string, skipVS, skipVSVip bool) bool

func (*RestOperations) DequeueNodes

func (rest *RestOperations) DequeueNodes(key string)

func (*RestOperations) EvhNodeCU

func (rest *RestOperations) EvhNodeCU(sni_node *nodes.AviEvhVsNode, vs_cache_obj *avicache.AviVsCache, namespace string, cache_sni_nodes []avicache.NamespaceName, rest_ops []*utils.RestOp, key string) ([]avicache.NamespaceName, []*utils.RestOp)

func (*RestOperations) ExecuteRestAndPopulateCache

func (rest *RestOperations) ExecuteRestAndPopulateCache(rest_ops []*utils.RestOp, aviObjKey avicache.NamespaceName, avimodel *nodes.AviObjectGraph, key string, isEvh bool, sslKey ...utils.NamespaceName) (bool, bool)

func (*RestOperations) GetIPAddrsFromCache

func (rest *RestOperations) GetIPAddrsFromCache(vsCache *avicache.AviVsCache) []string

func (*RestOperations) HTTPPolicyCU

func (rest *RestOperations) HTTPPolicyCU(http_nodes []*nodes.AviHttpPolicySetNode, vs_cache_obj *avicache.AviVsCache, namespace string, rest_ops []*utils.RestOp, key string) ([]avicache.NamespaceName, []*utils.RestOp)

func (*RestOperations) HTTPPolicyDelete

func (rest *RestOperations) HTTPPolicyDelete(https_to_delete []avicache.NamespaceName, namespace string, rest_ops []*utils.RestOp, key string) []*utils.RestOp

func (*RestOperations) IstioCU

func (rest *RestOperations) IstioCU(key string, avimodel *nodes.AviObjectGraph) (bool, bool)

func (*RestOperations) KeyCertCU

func (rest *RestOperations) KeyCertCU(sslkey_nodes []*nodes.AviTLSKeyCertNode, certKeys []avicache.NamespaceName, namespace string, rest_ops []*utils.RestOp, key string) ([]avicache.NamespaceName, []*utils.RestOp)

func (*RestOperations) L4PolicyCU

func (rest *RestOperations) L4PolicyCU(l4_nodes []*nodes.AviL4PolicyNode, vs_cache_obj *avicache.AviVsCache, namespace string, rest_ops []*utils.RestOp, key string) ([]avicache.NamespaceName, []*utils.RestOp)

func (*RestOperations) L4PolicyDelete

func (rest *RestOperations) L4PolicyDelete(l4_to_delete []avicache.NamespaceName, namespace string, rest_ops []*utils.RestOp, key string) []*utils.RestOp

func (*RestOperations) PassthroughChildCU

func (rest *RestOperations) PassthroughChildCU(passChildNode *nodes.AviVsNode, vsCacheObj *avicache.AviVsCache, namespace string, restOps []*utils.RestOp, key string) []*utils.RestOp

func (*RestOperations) PkiProfileCU

func (rest *RestOperations) PkiProfileCU(pki_node *nodes.AviPkiProfileNode, pool_cache_obj *avicache.AviPoolCache, namespace string, rest_ops []*utils.RestOp, key string) ([]avicache.NamespaceName, []*utils.RestOp)

func (*RestOperations) PkiProfileDelete

func (rest *RestOperations) PkiProfileDelete(pkiProfileDelete []avicache.NamespaceName, namespace string, rest_ops []*utils.RestOp, key string) []*utils.RestOp

func (*RestOperations) PoolCU

func (rest *RestOperations) PoolCU(pool_nodes []*nodes.AviPoolNode, vs_cache_obj *avicache.AviVsCache, namespace string, rest_ops []*utils.RestOp, key string) ([]avicache.NamespaceName, []*utils.RestOp)

func (*RestOperations) PoolDelete

func (rest *RestOperations) PoolDelete(pools_to_delete []avicache.NamespaceName, namespace string, rest_ops []*utils.RestOp, key string) []*utils.RestOp

func (*RestOperations) PoolGroupCU

func (rest *RestOperations) PoolGroupCU(pg_nodes []*nodes.AviPoolGroupNode, vs_cache_obj *avicache.AviVsCache, namespace string, rest_ops []*utils.RestOp, key string) ([]avicache.NamespaceName, []*utils.RestOp)

func (*RestOperations) PoolGroupDelete

func (rest *RestOperations) PoolGroupDelete(pgs_to_delete []avicache.NamespaceName, namespace string, rest_ops []*utils.RestOp, key string) []*utils.RestOp

func (*RestOperations) PopulateOneCache

func (rest *RestOperations) PopulateOneCache(rest_op *utils.RestOp, aviObjKey avicache.NamespaceName, key string)

func (*RestOperations) PublishKeyToRetryLayer

func (rest *RestOperations) PublishKeyToRetryLayer(parentVsKey avicache.NamespaceName, key string)

func (*RestOperations) PublishKeyToSlowRetryLayer

func (rest *RestOperations) PublishKeyToSlowRetryLayer(parentVsKey avicache.NamespaceName, key string)

func (*RestOperations) RefreshCacheForRetryLayer

func (rest *RestOperations) RefreshCacheForRetryLayer(parentVsKey string, aviObjKey avicache.NamespaceName, rest_op *utils.RestOp, aviError session.AviError, c *clients.AviClient, avimodel *nodes.AviObjectGraph, key string, isEvh bool) (bool, bool, bool)

func (*RestOperations) RestOperation

func (rest *RestOperations) RestOperation(vsName string, namespace string, avimodel *nodes.AviObjectGraph, vs_cache_obj *avicache.AviVsCache, key string)

func (*RestOperations) RestOperationForEvh

func (rest *RestOperations) RestOperationForEvh(vsName string, namespace string, avimodel *nodes.AviObjectGraph, sniNode bool, vs_cache_obj *avicache.AviVsCache, key string)

func (*RestOperations) SNINodeCU

func (rest *RestOperations) SNINodeCU(sni_node *nodes.AviVsNode, vs_cache_obj *avicache.AviVsCache, namespace string, cache_sni_nodes []avicache.NamespaceName, rest_ops []*utils.RestOp, key string) ([]avicache.NamespaceName, []*utils.RestOp)

func (*RestOperations) SNINodeDelete

func (rest *RestOperations) SNINodeDelete(del_sni avicache.NamespaceName, namespace string, rest_ops []*utils.RestOp, avimodel *nodes.AviObjectGraph, key string) bool

func (*RestOperations) SSLKeyCertCU

func (rest *RestOperations) SSLKeyCertCU(sslkeyNodes []*nodes.AviTLSKeyCertNode, certKeys []avicache.NamespaceName, namespace string, rest_ops []*utils.RestOp, key string) ([]avicache.NamespaceName, []*utils.RestOp)

func (*RestOperations) SSLKeyCertDelete

func (rest *RestOperations) SSLKeyCertDelete(ssl_to_delete []avicache.NamespaceName, namespace string, rest_ops []*utils.RestOp, key string) []*utils.RestOp

func (*RestOperations) SanitizePGMembers

func (rest *RestOperations) SanitizePGMembers(Members []*avimodels.PoolGroupMember, key string) []*avimodels.PoolGroupMember

func (*RestOperations) StatusUpdateForPool

func (rest *RestOperations) StatusUpdateForPool(restMethod utils.RestMethod, vs_cache_obj *avicache.AviVsCache, key string)

func (*RestOperations) StatusUpdateForVS

func (rest *RestOperations) StatusUpdateForVS(restMethod utils.RestMethod, vsCacheObj *avicache.AviVsCache, key string)

func (*RestOperations) SyncObjectStatuses

func (rest *RestOperations) SyncObjectStatuses()

SyncObjectStatuses gets data from L3 cache and does a status update on the ingress objects based on the service metadata objects it finds in the cache This is executed once AKO is done with populating the L3 cache in reboot scenarios

func (*RestOperations) VSVipCU

func (rest *RestOperations) VSVipCU(vsvip_nodes []*nodes.AviVSVIPNode, vs_cache_obj *avicache.AviVsCache, namespace string, rest_ops []*utils.RestOp, key string) ([]avicache.NamespaceName, []*utils.RestOp, error)

func (*RestOperations) VSVipDelete

func (rest *RestOperations) VSVipDelete(vsvip_to_delete []avicache.NamespaceName, namespace string, rest_ops []*utils.RestOp, key string) []*utils.RestOp

type RestOperator

type RestOperator interface {
	AviRestOperate(c *utils.AviRestClientPool, rest_ops []*utils.RestOp, key string, bkt uint32) error

	SyncObjectStatuses()
	RestRespArrToObjByType(rest_op *utils.RestOp, obj_type string, key string) []map[string]interface{}
	// contains filtered or unexported methods
}

func NewRestOperator

func NewRestOperator(restOp *RestOperations, overrideLeaderFlag ...bool) RestOperator

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL