aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/generated/informers/externalversions
diff options
context:
space:
mode:
authorRitu Sood <ritu.sood@intel.com>2019-12-29 10:52:06 -0800
committerRitu Sood <ritu.sood@intel.com>2019-12-29 10:52:06 -0800
commitc23ec42c2c25ecfa16a65e3b108aaec945760eba (patch)
treed69d09ed9653a8458820f72ba345791232e5998c /pkg/generated/informers/externalversions
parent52123c4bdcfad323f8fb57742400be993167ae2d (diff)
Adding generated code for service chaining
API and generated code for route based chaining CRD Change-Id: I631ec38c08c76059f6e742c5c241763b33597bd4 Signed-off-by: Ritu Sood <ritu.sood@intel.com>
Diffstat (limited to 'pkg/generated/informers/externalversions')
-rw-r--r--pkg/generated/informers/externalversions/generic.go2
-rw-r--r--pkg/generated/informers/externalversions/k8s/v1alpha1/interface.go7
-rw-r--r--pkg/generated/informers/externalversions/k8s/v1alpha1/networkchaining.go89
3 files changed, 98 insertions, 0 deletions
diff --git a/pkg/generated/informers/externalversions/generic.go b/pkg/generated/informers/externalversions/generic.go
index badc74f..4579982 100644
--- a/pkg/generated/informers/externalversions/generic.go
+++ b/pkg/generated/informers/externalversions/generic.go
@@ -55,6 +55,8 @@ func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource
// Group=k8s.plugin.opnfv.org, Version=v1alpha1
case v1alpha1.SchemeGroupVersion.WithResource("networks"):
return &genericInformer{resource: resource.GroupResource(), informer: f.K8s().V1alpha1().Networks().Informer()}, nil
+ case v1alpha1.SchemeGroupVersion.WithResource("networkchainings"):
+ return &genericInformer{resource: resource.GroupResource(), informer: f.K8s().V1alpha1().NetworkChainings().Informer()}, nil
case v1alpha1.SchemeGroupVersion.WithResource("providernetworks"):
return &genericInformer{resource: resource.GroupResource(), informer: f.K8s().V1alpha1().ProviderNetworks().Informer()}, nil
diff --git a/pkg/generated/informers/externalversions/k8s/v1alpha1/interface.go b/pkg/generated/informers/externalversions/k8s/v1alpha1/interface.go
index cef0e40..a7d9f6d 100644
--- a/pkg/generated/informers/externalversions/k8s/v1alpha1/interface.go
+++ b/pkg/generated/informers/externalversions/k8s/v1alpha1/interface.go
@@ -26,6 +26,8 @@ import (
type Interface interface {
// Networks returns a NetworkInformer.
Networks() NetworkInformer
+ // NetworkChainings returns a NetworkChainingInformer.
+ NetworkChainings() NetworkChainingInformer
// ProviderNetworks returns a ProviderNetworkInformer.
ProviderNetworks() ProviderNetworkInformer
}
@@ -46,6 +48,11 @@ func (v *version) Networks() NetworkInformer {
return &networkInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions}
}
+// NetworkChainings returns a NetworkChainingInformer.
+func (v *version) NetworkChainings() NetworkChainingInformer {
+ return &networkChainingInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions}
+}
+
// ProviderNetworks returns a ProviderNetworkInformer.
func (v *version) ProviderNetworks() ProviderNetworkInformer {
return &providerNetworkInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions}
diff --git a/pkg/generated/informers/externalversions/k8s/v1alpha1/networkchaining.go b/pkg/generated/informers/externalversions/k8s/v1alpha1/networkchaining.go
new file mode 100644
index 0000000..70f7839
--- /dev/null
+++ b/pkg/generated/informers/externalversions/k8s/v1alpha1/networkchaining.go
@@ -0,0 +1,89 @@
+/*
+Copyright The Kubernetes Authors.
+
+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.
+*/
+
+// Code generated by informer-gen. DO NOT EDIT.
+
+package v1alpha1
+
+import (
+ k8sv1alpha1 "ovn4nfv-k8s-plugin/pkg/apis/k8s/v1alpha1"
+ versioned "ovn4nfv-k8s-plugin/pkg/generated/clientset/versioned"
+ internalinterfaces "ovn4nfv-k8s-plugin/pkg/generated/informers/externalversions/internalinterfaces"
+ v1alpha1 "ovn4nfv-k8s-plugin/pkg/generated/listers/k8s/v1alpha1"
+ time "time"
+
+ v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ runtime "k8s.io/apimachinery/pkg/runtime"
+ watch "k8s.io/apimachinery/pkg/watch"
+ cache "k8s.io/client-go/tools/cache"
+)
+
+// NetworkChainingInformer provides access to a shared informer and lister for
+// NetworkChainings.
+type NetworkChainingInformer interface {
+ Informer() cache.SharedIndexInformer
+ Lister() v1alpha1.NetworkChainingLister
+}
+
+type networkChainingInformer struct {
+ factory internalinterfaces.SharedInformerFactory
+ tweakListOptions internalinterfaces.TweakListOptionsFunc
+ namespace string
+}
+
+// NewNetworkChainingInformer constructs a new informer for NetworkChaining type.
+// Always prefer using an informer factory to get a shared informer instead of getting an independent
+// one. This reduces memory footprint and number of connections to the server.
+func NewNetworkChainingInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
+ return NewFilteredNetworkChainingInformer(client, namespace, resyncPeriod, indexers, nil)
+}
+
+// NewFilteredNetworkChainingInformer constructs a new informer for NetworkChaining type.
+// Always prefer using an informer factory to get a shared informer instead of getting an independent
+// one. This reduces memory footprint and number of connections to the server.
+func NewFilteredNetworkChainingInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
+ return cache.NewSharedIndexInformer(
+ &cache.ListWatch{
+ ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
+ if tweakListOptions != nil {
+ tweakListOptions(&options)
+ }
+ return client.K8sV1alpha1().NetworkChainings(namespace).List(options)
+ },
+ WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
+ if tweakListOptions != nil {
+ tweakListOptions(&options)
+ }
+ return client.K8sV1alpha1().NetworkChainings(namespace).Watch(options)
+ },
+ },
+ &k8sv1alpha1.NetworkChaining{},
+ resyncPeriod,
+ indexers,
+ )
+}
+
+func (f *networkChainingInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
+ return NewFilteredNetworkChainingInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
+}
+
+func (f *networkChainingInformer) Informer() cache.SharedIndexInformer {
+ return f.factory.InformerFor(&k8sv1alpha1.NetworkChaining{}, f.defaultInformer)
+}
+
+func (f *networkChainingInformer) Lister() v1alpha1.NetworkChainingLister {
+ return v1alpha1.NewNetworkChainingLister(f.Informer().GetIndexer())
+}