Beispiel #1
0
    def get_descriptors(type_descriptor):
        """Returns all descriptors of a given type"""
        log.debug("Get %s descriptors", type_descriptor)
        try:
            client = Client()
            if type_descriptor == 'nsd':
                result = client.nsd_list()

            elif type_descriptor == 'vnfd':
                result = client.vnfd_list()

        except Exception as e:
            log.exception(e)
            result = {}
        return result
Beispiel #2
0
    def get_overview_data():
        client = Client()
        nsd = client.nsd_list()
        vnfd = client.vnfd_list()
        ns = client.ns_list()
        vnf = client.vnf_list()
        result = {
            'owner': '-',
            'name': '-',
            'updated_date': '-',
            'info': '-',
            'type': 'osm',
            'nsd': len(nsd) if nsd else 0,
            'vnfd': len(vnfd) if vnfd else 0,
            'ns': len(ns) if ns else 0,
            'vnf': len(vnf) if vnf else 0,
        }

        return result