k8s-object-absent

Description

n/a

Variables

Name Type Default Description

api_version

string v1

Use to specify the API version. Use to create, delete, or discover an object without providing a full resource definition. Use in conjunction with kind, name, and namespace to identify a specific object.

kind

string --

Use to specify an object model. Use to create, delete, or discover an object without providing a full resource definition. Use in conjunction with api_version, name, and namespace to identify a specific object.

name

string --

Use to specify an object name. Use to create, delete, or discover an object without providing a full resource definition. Use in conjunction with api_version, kind and namespace to identify a specific object. If resource definition is provided, the metadata.name value from the resource_definition will override this option.

namespace

string --

Use to specify an object namespace. Useful when creating, deleting, or discovering an object. Use in conjunction with api_version, kind, and name to identify a specfic object.

Code

args:
  api_version:
    doc:
      short_help: The API version.
      help: |
        Use to specify the API version. Use to create, delete, or discover an object without providing a full resource definition. Use in conjunction with kind, name, and namespace to identify a specific object.
    type: string
    required: false
    default: v1
  name:
    doc:
      short_help: The name of the namespace.
      help: |
        Use to specify an object name. Use to create, delete, or discover an object without providing a full resource definition. Use in conjunction with api_version, kind and namespace to identify a specific object. If resource definition is provided, the metadata.name value from the resource_definition will override this option.
    type: string
    required: false
  namespace:
    doc:
      short_help: The namespace where the object lives.
      help: |
        Use to specify an object namespace. Useful when creating, deleting, or discovering an object. Use in conjunction with api_version, kind, and name to identify a specfic object.
    type: string
    required: false
  kind:
    doc:
      short_help: The object model type.
      help: |
        Use to specify an object model. Use to create, delete, or discover an object without providing a full resource definition. Use in conjunction with api_version, name, and namespace to identify a specific object.
    type: string
    required: false

frecklets:
- frecklet:
    name: k8s
    type: ansible-module
    properties:
      idempotent: true
      elevated: false
    resources:
      python-package:
      - openshift
    desc:
      short: removing k8s resource
  task:
    become: false
    delegate_to: localhost
  vars:
    api_version: '{{:: api_version ::}}'
    kind: '{{:: kind ::}}'
    name: '{{:: name ::}}'
    namespace: '{{:: namespace ::}}'
    state: absent
frecklecute k8s-object-absent --help

Usage: frecklecute k8s-object-absent [OPTIONS]

  n/a

Options:
  --api-version API_VERSION  The API version.
  --kind KIND                The object model type.
  --name NAME                The name of the namespace.
  --namespace NAMESPACE      The namespace where the object lives.
  --help                     Show this message and exit.
# -*- coding: utf-8 -*-


#
# module path: pycklets.k8s_object_absent.K8sObjectAbsent
#


from dataclasses import dataclass
from pyckles import AutoPycklet
from typing import *    # noqa

@dataclass
class K8sObjectAbsent(AutoPycklet):
    """No documentation available.

       Args:
         api_version: The API version.
         kind: The object model type.
         name: The name of the namespace.
         namespace: The namespace where the object lives.

    """

    FRECKLET_ID = "k8s-object-absent"

    api_version: str = None
    kind: str = None
    name: str = None
    namespace: str = None


    def __post_init__(self):
        super(K8sObjectAbsent, self).__init__(var_names=["api_version", "kind", "name", "namespace"])


frecklet_class = K8sObjectAbsent
# -*- coding: utf-8 -*-


#
# module path: pycklets.k8s_object_absent.K8sObjectAbsent
#


from pyckles import AutoPycklet

class K8sObjectAbsent(AutoPycklet):
    """No documentation available.

       Args:
         api_version: The API version.
         kind: The object model type.
         name: The name of the namespace.
         namespace: The namespace where the object lives.

    """

    FRECKLET_ID = "k8s-object-absent"

    def __init__(self, api_version="v1", kind=None, name=None, namespace=None):

        super(K8sObjectAbsent, self).__init__(var_names=["api_version", "kind", "name", "namespace"])
        self._api_version = api_version
        self._kind = kind
        self._name = name
        self._namespace = namespace

    @property
    def api_version(self):
        return self._api_version

    @api_version.setter
    def api_version(self, api_version):
        self._api_version = api_version

    @property
    def kind(self):
        return self._kind

    @kind.setter
    def kind(self, kind):
        self._kind = kind

    @property
    def name(self):
        return self._name

    @name.setter
    def name(self, name):
        self._name = name

    @property
    def namespace(self):
        return self._namespace

    @namespace.setter
    def namespace(self, namespace):
        self._namespace = namespace



frecklet_class = K8sObjectAbsent