示例#1
0
    def get(self, request):
        """Get a list of the Bays for a project.

        The returned result is an object with property 'items' and each
        item under this is a Bay.
        """
        result = magnum.bay_list(request)
        return {'items': [change_to_id(n.to_dict()) for n in result]}
示例#2
0
    def get(self, request):
        """Get a list of the Bays for a project.

        The returned result is an object with property 'items' and each
        item under this is a Bay.
        """
        result = magnum.bay_list(request)
        return {'items': [change_to_id(n.to_dict()) for n in result]}
示例#3
0
    def get(self, request):
        """Get a list of the Services for a project.

        The returned result is an object with property 'items' and each
        item under this is a Service.
        """
        bays = magnum.bay_list(request)
        baymodels = magnum.baymodel_list(request)
        result = []
        baymodel = {}
        for model in baymodels:
            baymodel[model.uuid] = model
        for bay in bays:
            if bay.status == "CREATE_COMPLETE" and (baymodel[bay.baymodel_id].coe == "kubernetes"):
                result += magnum.service_list(request, bay.uuid)
        services = []
        for s in result:
            services.append(magnum.service_show(request, s.uuid, s.bay_uuid))
        return {"items": [change_to_id(s.to_dict()) for s in services]}
示例#4
0
    def get(self, request):
        """Get a list of the ReplicationControllers for a project.

        The returned result is an object with property 'items' and each
        item under this is a ReplicationController.
        """
        bays = magnum.bay_list(request)
        baymodels = magnum.baymodel_list(request)
        result = []
        baymodel = {}
        for model in baymodels:
            baymodel[model.uuid] = model
        for bay in bays:
            if bay.status == "CREATE_COMPLETE" and (baymodel[bay.baymodel_id].coe == "kubernetes"):
                result += magnum.rc_list(request, bay.uuid)
        rcs = []
        for r in result:
            rcs.append(magnum.rc_show(request, r.uuid, r.bay_uuid))
        return {"items": [change_to_id(r.to_dict()) for r in rcs]}
示例#5
0
    def get(self, request):
        """Get a list of the Pods for a project.

        The returned result is an object with property 'items' and each
        item under this is a Pod.
        """
        bays = magnum.bay_list(request)
        baymodels = magnum.baymodel_list(request)
        result = []
        baymodel = {}
        for model in baymodels:
            baymodel[model.uuid] = model
        for bay in bays:
            if bay.status == "CREATE_COMPLETE" and (baymodel[bay.baymodel_id].coe == "kubernetes"):
                result += magnum.pod_list(request, bay.name)
        pods = []
        for p in result:
            pods.append(magnum.pod_show(request, p.uuid, p.bay_uuid))
        return {"items": [change_to_id(p.to_dict()) for p in pods]}
示例#6
0
    def get(self, request):
        """Get a list of the Services for a project.

        The returned result is an object with property 'items' and each
        item under this is a Service.
        """
        bays = magnum.bay_list(request)
        baymodels = magnum.baymodel_list(request)
        result = []
        baymodel = {}
        for model in baymodels:
            baymodel[model.uuid] = model
        for bay in bays:
            if bay.status == 'CREATE_COMPLETE' and (
                    baymodel[bay.baymodel_id].coe == "kubernetes"):
                result += magnum.service_list(request, bay.uuid)
        services = []
        for s in result:
            services.append(magnum.service_show(request, s.uuid, s.bay_uuid))
        return {'items': [change_to_id(s.to_dict()) for s in services]}
示例#7
0
    def get(self, request):
        """Get a list of the ReplicationControllers for a project.

        The returned result is an object with property 'items' and each
        item under this is a ReplicationController.
        """
        bays = magnum.bay_list(request)
        baymodels = magnum.baymodel_list(request)
        result = []
        baymodel = {}
        for model in baymodels:
            baymodel[model.uuid] = model
        for bay in bays:
            if bay.status == 'CREATE_COMPLETE' and (
                    baymodel[bay.baymodel_id].coe == "kubernetes"):
                result += magnum.rc_list(request, bay.uuid)
        rcs = []
        for r in result:
            rcs.append(magnum.rc_show(request, r.uuid, r.bay_uuid))
        return {'items': [change_to_id(r.to_dict()) for r in rcs]}
示例#8
0
    def get(self, request):
        """Get a list of the Pods for a project.

        The returned result is an object with property 'items' and each
        item under this is a Pod.
        """
        bays = magnum.bay_list(request)
        baymodels = magnum.baymodel_list(request)
        result = []
        baymodel = {}
        for model in baymodels:
            baymodel[model.uuid] = model
        for bay in bays:
            if bay.status == 'CREATE_COMPLETE' and (
                    baymodel[bay.baymodel_id].coe == "kubernetes"):
                result += magnum.pod_list(request, bay.name)
        pods = []
        for p in result:
            pods.append(magnum.pod_show(request, p.uuid, p.bay_uuid))
        return {'items': [change_to_id(p.to_dict()) for p in pods]}