18 lines
507 B
Python
18 lines
507 B
Python
from .base import Portainer
|
|
|
|
|
|
class Endpoints(Portainer):
|
|
def list_endpoints(self):
|
|
endpoints = self.portainer.endpoints.list_endpoints()
|
|
endpoints_list = []
|
|
for endpoint in endpoints:
|
|
endpoint_data = {
|
|
"id": endpoint['Id'],
|
|
"name": endpoint['Name'],
|
|
"url": endpoint['URL'],
|
|
"status": endpoint['Status'],
|
|
}
|
|
endpoints_list.append(endpoint_data)
|
|
|
|
return endpoints_list
|
|
|