本文整理汇总了Golang中k8s/io/kubernetes/pkg/client/testing/core.NewListAction函数的典型用法代码示例。如果您正苦于以下问题:Golang NewListAction函数的具体用法?Golang NewListAction怎么用?Golang NewListAction使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了NewListAction函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Golang代码示例。
示例1: List
func (c *FakePolicyBindings) List(opts kapi.ListOptions) (*authorizationapi.PolicyBindingList, error) {
obj, err := c.Fake.Invokes(core.NewListAction(policyBindingsResource, c.Namespace, opts), &authorizationapi.PolicyBindingList{})
if obj == nil {
return nil, err
}
return obj.(*authorizationapi.PolicyBindingList), err
}
示例2: List
func (c *FakeDeploymentConfigs) List(opts kapi.ListOptions) (*deployapi.DeploymentConfigList, error) {
obj, err := c.Fake.Invokes(core.NewListAction(deploymentConfigsResource, c.Namespace, opts), &deployapi.DeploymentConfigList{})
if obj == nil {
return nil, err
}
return obj.(*deployapi.DeploymentConfigList), err
}
示例3: List
func (c *FakeTemplates) List(opts kapi.ListOptions) (*templateapi.TemplateList, error) {
obj, err := c.Fake.Invokes(core.NewListAction(templatesResource, c.Namespace, opts), &templateapi.TemplateList{})
if obj == nil {
return nil, err
}
return obj.(*templateapi.TemplateList), err
}
示例4: List
func (c *FakeBuildConfigs) List(opts kapi.ListOptions) (*buildapi.BuildConfigList, error) {
obj, err := c.Fake.Invokes(core.NewListAction(buildConfigsResource, c.Namespace, opts), &buildapi.BuildConfigList{})
if obj == nil {
return nil, err
}
return obj.(*buildapi.BuildConfigList), err
}
示例5: List
func (c *FakeAppliedClusterResourceQuotas) List(opts kapi.ListOptions) (*quotaapi.AppliedClusterResourceQuotaList, error) {
obj, err := c.Fake.Invokes(core.NewListAction(appliedClusterResourceQuotasResource, c.Namespace, opts), "aapi.AppliedClusterResourceQuotaList{})
if obj == nil {
return nil, err
}
return obj.(*quotaapi.AppliedClusterResourceQuotaList), err
}
示例6: List
func (c *FakePodSecurityPolicySubjectReviews) List(opts api.ListOptions) (result *v1.PodSecurityPolicySubjectReviewList, err error) {
obj, err := c.Fake.
Invokes(core.NewListAction(podsecuritypolicysubjectreviewsResource, c.ns, opts), &v1.PodSecurityPolicySubjectReviewList{})
if obj == nil {
return nil, err
}
return obj.(*v1.PodSecurityPolicySubjectReviewList), err
}
示例7: Search
// Search returns a list of events matching the specified object.
func (c *FakeEvents) Search(objOrRef runtime.Object) (*v1.EventList, error) {
action := core.NewRootListAction(eventsResource, api.ListOptions{})
if c.ns != "" {
action = core.NewListAction(eventsResource, c.ns, api.ListOptions{})
}
obj, err := c.Fake.Invokes(action, &v1.EventList{})
if obj == nil {
return nil, err
}
return obj.(*v1.EventList), err
}
示例8: List
func (c *FakePersistentVolumeClaims) List(opts api.ListOptions) (result *api.PersistentVolumeClaimList, err error) {
obj, err := c.Fake.
Invokes(core.NewListAction(persistentvolumeclaimsResource, c.ns, opts), &api.PersistentVolumeClaimList{})
if obj == nil {
return nil, err
}
label, _, _ := core.ExtractFromListOptions(opts)
if label == nil {
label = labels.Everything()
}
list := &api.PersistentVolumeClaimList{}
for _, item := range obj.(*api.PersistentVolumeClaimList).Items {
if label.Matches(labels.Set(item.Labels)) {
list.Items = append(list.Items, item)
}
}
return list, err
}
示例9: List
func (c *FakeThirdPartyResources) List(opts api.ListOptions) (result *v1beta1.ThirdPartyResourceList, err error) {
obj, err := c.Fake.
Invokes(core.NewListAction("thirdpartyresources", c.ns, opts), &v1beta1.ThirdPartyResourceList{})
if obj == nil {
return nil, err
}
label := opts.LabelSelector
if label == nil {
label = labels.Everything()
}
list := &v1beta1.ThirdPartyResourceList{}
for _, item := range obj.(*v1beta1.ThirdPartyResourceList).Items {
if label.Matches(labels.Set(item.Labels)) {
list.Items = append(list.Items, item)
}
}
return list, err
}
示例10: List
func (c *FakeHorizontalPodAutoscalers) List(opts api.ListOptions) (result *v1beta1.HorizontalPodAutoscalerList, err error) {
obj, err := c.Fake.
Invokes(core.NewListAction("horizontalpodautoscalers", c.ns, opts), &v1beta1.HorizontalPodAutoscalerList{})
if obj == nil {
return nil, err
}
label := opts.LabelSelector
if label == nil {
label = labels.Everything()
}
list := &v1beta1.HorizontalPodAutoscalerList{}
for _, item := range obj.(*v1beta1.HorizontalPodAutoscalerList).Items {
if label.Matches(labels.Set(item.Labels)) {
list.Items = append(list.Items, item)
}
}
return list, err
}
示例11: List
func (c *FakeDaemonSets) List(opts api.ListOptions) (result *extensions.DaemonSetList, err error) {
obj, err := c.Fake.
Invokes(core.NewListAction("daemonsets", c.ns, opts), &extensions.DaemonSetList{})
if obj == nil {
return nil, err
}
label := opts.LabelSelector
if label == nil {
label = labels.Everything()
}
list := &extensions.DaemonSetList{}
for _, item := range obj.(*extensions.DaemonSetList).Items {
if label.Matches(labels.Set(item.Labels)) {
list.Items = append(list.Items, item)
}
}
return list, err
}
示例12: List
func (c *FakeTestTypes) List(opts api.ListOptions) (result *testgroup_k8s_io.TestTypeList, err error) {
obj, err := c.Fake.
Invokes(core.NewListAction("testtypes", c.ns, opts), &testgroup_k8s_io.TestTypeList{})
if obj == nil {
return nil, err
}
label := opts.LabelSelector
if label == nil {
label = labels.Everything()
}
list := &testgroup_k8s_io.TestTypeList{}
for _, item := range obj.(*testgroup_k8s_io.TestTypeList).Items {
if label.Matches(labels.Set(item.Labels)) {
list.Items = append(list.Items, item)
}
}
return list, err
}
示例13: List
func (c *FakeIngresses) List(opts api.ListOptions) (result *extensions.IngressList, err error) {
obj, err := c.Fake.
Invokes(core.NewListAction(ingressesResource, c.ns, opts), &extensions.IngressList{})
if obj == nil {
return nil, err
}
label, _, _ := core.ExtractFromListOptions(opts)
if label == nil {
label = labels.Everything()
}
list := &extensions.IngressList{}
for _, item := range obj.(*extensions.IngressList).Items {
if label.Matches(labels.Set(item.Labels)) {
list.Items = append(list.Items, item)
}
}
return list, err
}
示例14: List
func (c *FakePodDisruptionBudgets) List(opts api.ListOptions) (result *policy.PodDisruptionBudgetList, err error) {
obj, err := c.Fake.
Invokes(core.NewListAction(poddisruptionbudgetsResource, c.ns, opts), &policy.PodDisruptionBudgetList{})
if obj == nil {
return nil, err
}
label, _, _ := core.ExtractFromListOptions(opts)
if label == nil {
label = labels.Everything()
}
list := &policy.PodDisruptionBudgetList{}
for _, item := range obj.(*policy.PodDisruptionBudgetList).Items {
if label.Matches(labels.Set(item.Labels)) {
list.Items = append(list.Items, item)
}
}
return list, err
}
示例15: List
func (c *FakePods) List(opts api.ListOptions) (result *api.PodList, err error) {
obj, err := c.Fake.
Invokes(core.NewListAction(podsResource, c.ns, opts), &api.PodList{})
if obj == nil {
return nil, err
}
label := opts.LabelSelector
if label == nil {
label = labels.Everything()
}
list := &api.PodList{}
for _, item := range obj.(*api.PodList).Items {
if label.Matches(labels.Set(item.Labels)) {
list.Items = append(list.Items, item)
}
}
return list, err
}