1 import uuid

2

3 from pydantic import BaseModel

4

5

6 class ClientEnrollment(BaseModel):

7 enrollment_key: str

8 public_net_key: str

9 public_auth_key: str

10 preferred_hostname: str

11 public_ip: str = None

12 interface: str = "nebula1"

13 enroll_on_existence: bool = False

14

15

16 class NetworkCreate(BaseModel):

17 name: str

18 cidr: str

19

20

21 class TemplateCreate(BaseModel):

22 name: str

23 network_name: str

24 is_lighthouse: bool = False

25 is_relay: bool = False

26 use_relay: bool = True

27

28

29 class NetworkResponse(BaseModel):

30 id: int

31 name: str

32 cidr: str

33

34

35 class TemplateResponse(BaseModel):

36 id: int

37 name: str

38 enrollment_key: uuid.UUID