1 from django.urls import path

2

3 from meshadmin.server.networks import views

4 from meshadmin.server.networks.views import rollout

5

6 app_name = "networks"

7

8 urlpatterns = [

9 path("", views.NetworkListView.as_view(), name="network-list"),

10 path("network/create/", views.NetworkCreateView.as_view(), name="network-create"),

11 path("network/<int:pk>/", views.NetworkDetailView.as_view(), name="network-detail"),

12 path(

13 "network/<int:pk>/edit/", views.NetworkUpdateView.as_view(), name="network-edit"

14 ),

15 path(

16 "network/<int:pk>/delete/",

17 views.NetworkDeleteView.as_view(),

18 name="network-delete",

19 ),

20 path(

21 "network/<int:network_id>/host/create/",

22 views.HostCreateView.as_view(),

23 name="network-host-create",

24 ),

25 path("host/<int:pk>/", views.HostDetailView.as_view(), name="host-detail"),

26 path("host/<int:pk>/edit/", views.HostUpdateView.as_view(), name="host-edit"),

27 path("host/<int:pk>/delete/", views.HostDeleteView.as_view(), name="host-delete"),

28 path(

29 "host/<int:pk>/refresh-config/<int:rollout_id>/",

30 views.HostRefreshConfigView.as_view(),

31 name="host-refresh-config",

32 ),

33 path(

34 "host/<int:pk>/config", views.HostConfigView.as_view(), name="show-host-config"

35 ),

36 path(

37 "network/<int:network_id>/template/create/",

38 views.TemplateCreateView.as_view(),

39 name="network-template-create",

40 ),

41 path(

42 "template/<int:pk>/", views.TemplateDetailView.as_view(), name="template-detail"

43 ),

44 path(

45 "template/<int:pk>/edit/",

46 views.TemplateUpdateView.as_view(),

47 name="template-edit",

48 ),

49 path(

50 "template/<int:pk>/delete/",

51 views.TemplateDeleteView.as_view(),

52 name="template-delete",

53 ),

54 path(

55 "network/<int:network_id>/group/create/",

56 views.GroupCreateView.as_view(),

57 name="network-group-create",

58 ),

59 path("group/<int:pk>/", views.GroupDetailView.as_view(), name="group-detail"),

60 path("group/<int:pk>/edit/", views.GroupUpdateView.as_view(), name="group-edit"),

61 path(

62 "group/<int:pk>/delete/", views.GroupDeleteView.as_view(), name="group-delete"

63 ),

64 path("group/add-rule/", views.GroupAddRuleView.as_view(), name="group-add-rule"),

65 path("rule/form-modal/", views.RuleFormModalView.as_view(), name="rule-form-modal"),

66 path(

67 "group/config-modal/",

68 views.GroupConfigModalView.as_view(),

69 name="group-config-modal",

70 ),

71 path(

72 "group/add-config/",

73 views.GroupAddUpdateConfigView.as_view(),

74 name="group-add-config",

75 ),

76 path(

77 "group/config/<int:pk>/delete/",

78 views.GroupConfigDeleteView.as_view(),

79 name="group-config-delete",

80 ),

81 path(

82 "security-group/<int:security_group_id>/rule/create/",

83 views.RuleCreateView.as_view(),

84 name="security-group-rule-create",

85 ),

86 path(

87 "network/<int:network_id>/ca/create/",

88 views.CACreateView.as_view(),

89 name="network-ca-create",

90 ),

91 path("ca/<int:pk>/", views.CADetailView.as_view(), name="ca-detail"),

92 path("ca/<int:pk>/edit/", views.CAUpdateView.as_view(), name="ca-edit"),

93 path("ca/<int:pk>/delete/", views.CADeleteView.as_view(), name="ca-delete"),

94 path(

95 "ca/<int:pk>/make-signing/",

96 views.CAMakeSigningView.as_view(),

97 name="ca-make-signing",

98 ),

99 path("rule/<int:pk>/", views.RuleDetailView.as_view(), name="rule-detail"),

100 path("rule/<int:pk>/edit/", views.RuleUpdateView.as_view(), name="rule-edit"),

101 path("rule/<int:pk>/delete/", views.RuleDeleteView.as_view(), name="rule-delete"),

102 path("logout/", views.LogoutView.as_view(), name="logout"),

103 path(

104 "host/<int:base_id>/diff/<int:compare_id>/",

105 views.ConfigDiffView.as_view(),

106 name="config-diff",

107 ),

108 path(

109 "host/<int:pk>/upgrade/",

110 views.HostUpgradeView.as_view(),

111 name="host-upgrade",

112 ),

113 path(

114 "networks/<int:network_id>/rollouts/create/",

115 rollout.RolloutCreateView.as_view(),

116 name="network-rollout-create",

117 ),

118 path(

119 "rollouts/<int:pk>/",

120 rollout.RolloutDetailView.as_view(),

121 name="rollout-detail",

122 ),

123 path(

124 "rollouts/<int:pk>/unfreeze/",

125 rollout.UnfreezeHostConfigView.as_view(),

126 name="rollout-unfreeze",

127 ),

128 path(

129 "rollouts/<int:pk>/edit/",

130 rollout.RolloutUpdateView.as_view(),

131 name="rollout-edit",

132 ),

133 path(

134 "rollouts/<int:pk>/delete/",

135 rollout.RolloutDeleteView.as_view(),

136 name="rollout-delete",

137 ),

138 path(

139 "networks/<int:network_id>/members/add/",

140 views.NetworkMemberAddView.as_view(),

141 name="network-member-add",

142 ),

143 path(

144 "networks/<int:network_id>/members/<int:pk>/edit/",

145 views.NetworkMemberEditView.as_view(),

146 name="network-member-edit",

147 ),

148 path(

149 "networks/<int:network_id>/members/<int:pk>/delete/",

150 views.NetworkMemberDeleteView.as_view(),

151 name="network-member-delete",

152 ),

153]