summaryrefslogtreecommitdiffstats
path: root/doc/sphinx/uml/currentHost4.uml
blob: 1e9ef4d847906cb991f3b89abc50c2536c43a427 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
@startuml

title currentHost DHCPv4 (Kea 1.8.0)

agent "Subnet Selection" as entry

agent "Set subnet to the selected subnet" as setSelected

agent "Has client a lease for its client id?" as clientid_lookup

agent "Iterate on allowed subnets for client id" as clientid_iterate

agent "Set subnet to the by client id lease" as found_clientid

agent "Has client a matching lease?" as hwaddr_lookup

agent "Iterate on allowed subnets for hardware address" as hwaddr_iterate

agent "Set subnet to the matching lease" as found_hwaddr

agent "Has an address reservation?" as hasAddressReservation

agent "Set subnet to address reservation subnet" as setAddressReservation

agent "Is the address in an allowed pool?" as pool

agent "Iterate on allowed subnets with pool" as pool_iterate

agent "Set subnet to address pool subnet" as inAllowedPool

agent "Allocate a new lease" as allocate

agent "Iterate on allowed subnets" as allocate_iterate

agent "Set subnet to allocated lease subnet" as allocated

agent "Get subnet host reservation mode" as getHRmode

agent "Is subnet host reservation mode global?" as checkHRmode

agent "Get global host reservation" as global

agent "Get subnet host reservation" as bySubnet

agent "Return current host reservation" as return

entry --> setSelected
setSelected --> clientid_lookup
clientid_lookup ---> hwaddr_lookup : no client id option
clientid_lookup --> clientid_iterate
clientid_iterate -> clientid_iterate : match-client-id is false or no lease
clientid_iterate --> found_clientid : found a lease
found_clientid ----> hasAddressReservation
clientid_iterate --> hwaddr_lookup : not found by client id, try by hardware address
hwaddr_lookup ---> hasAddressReservation : no hardware address
hwaddr_lookup --> hwaddr_iterate
hwaddr_iterate -> hwaddr_iterate : no lease or client id mismatch
hwaddr_iterate --> found_hwaddr : found a lease
found_hwaddr ----> hasAddressReservation
hwaddr_iterate --> hasAddressReservation : not found
hasAddressReservation --> setAddressReservation : yes
hasAddressReservation --> pool : no or not check in the taken branch
setAddressReservation --> pool
pool --> pool_iterate
pool ---> allocate : pool check is not in all branches
pool_iterate -> pool_iterate : address not in an allowed pool
pool_iterate --> inAllowedPool : address in an allowed pool
pool_iterate ---> allocate : no allowed pool
inAllowedPool --> allocate
allocate --> allocate_iterate : start from preferred (last used) subnet
allocate ---> getHRmode : allocation is not in all branches
allocate_iterate -> allocate_iterate : no free address
allocate_iterate --> allocated : found a free address
allocated --> getHRmode
getHRmode --> checkHRmode
checkHRmode --> global : yes
checkHRmode --> bySubnet : no
global --> return : return global host reservation
bySubnet --> return : return subnet host reservation

footer Only the initial lookup is always performed: other occasions to change the subnet so the current host are only in some branches

@enduml