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

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

        The returned result is an object with property 'items' and each
        item under this is a BayModel.
        """
        result = magnum.baymodel_list(request)
        return {'items': [change_to_id(n.to_dict()) for n in result]}
Exemple #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]}
Exemple #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]}
Exemple #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]}
Exemple #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]}
Exemple #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]}
Exemple #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]}