INNER CODE UNIT · Python

gather_response_data

vchinnipilli/kubestriker · kubestriker/apps_v1api.py:35

    def gather_response_data(self, json_data):
        '''
        This functions captures the names of various resources in kuberentes
        '''
        names_list = []
        items_data = json_data.get('items')
        if items_data:
            for items in items_data:
                name = items.get('metadata', {}).get('name')
                if name:
                    names_list.append(name)
        return names_list

    def read_namespaced_data(self, context):
        '''
        This function calls namespaced resources
        '''
        json_result = {}

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…