1 # Copyright (c) 2018 Amdocs
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at:
7 # http://www.apache.org/licenses/LICENSE-2.0
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 from rest_framework.views import APIView
17 from rest_framework.response import Response
19 logger = logging.getLogger(__name__)
20 log_file = "/var/log/onap/multicloud/azure/azure.log"
23 class SampleList(APIView):
28 def get(self, request, format=None):
31 if os.path.exists(log_file):
32 with open("/var/log/onap/multicloud/azure/azure.log", "r") as f:
35 return Response({"status": "active", "logs": output})