Skip to content
This repository was archived by the owner on Dec 23, 2024. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/pr_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,11 @@ jobs:
- uses: actions/checkout@v3
- name: Build tests
run: cd src && go test -c rol/tests -o ./tests/rol.test
- name: Setup CAP_NET_ADMIN for compiled tests
- name: Setup CAP_NET_RAW and CAP_NET_ADMIN for compiled tests
if: matrix.os == 'ubuntu-22.04'
run: |
sudo setcap cap_net_admin+ep ./src/tests/rol.test
sudo setcap "cap_net_raw+ep cap_net_admin+ep" /usr/sbin/xtables-nft-multi
- name: Run tests
run: |
cd src/tests && ./rol.test -test.v
1,148 changes: 647 additions & 501 deletions docs/plantuml/controllers/HostNetworkBridgeController.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1,045 changes: 596 additions & 449 deletions docs/plantuml/controllers/HostNetworkController.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
41 changes: 41 additions & 0 deletions docs/plantuml/controllers/HostNetworkTrafficGinController.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
@startuml

!include ../services/HostNetworkService.puml
remove HostNetworkBridgeDto
remove HostNetworkBridgeUpdateDto
remove HostNetworkBridgeCreateDto
remove HostNetworkBridgeBaseDto
remove HostNetworkVlanDto
remove HostNetworkVlanUpdateDto
remove HostNetworkVlanCreateDto

package controllers {
class HostNetworkTrafficGinController {
-service *services.HostNetworkService
--
-logger *logrus.Logger
--
+GetTableRules(ctx *gin.Context)
--
+Create(ctx *gin.Context)
--
+Delete(ctx *gin.Context)
}

note left of HostNetworkTrafficGinController::GetTableRules
Get selected netfilter table rules
end note

note left of HostNetworkTrafficGinController::Create
Create new traffic rule in specified table
end note

note left of HostNetworkTrafficGinController::Delete
Delete netfilter traffic rule in specified table
end note


HostNetworkService -up- HostNetworkTrafficGinController::service
}

@enduml
629 changes: 629 additions & 0 deletions docs/plantuml/controllers/HostNetworkTrafficGinController.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1,144 changes: 645 additions & 499 deletions docs/plantuml/controllers/HostNetworkVlanController.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
@startuml

package dtos {
class HostNetworkTrafficRuleBaseDto {
+Chain string
--
+Target string
--
+Source string
--
+Destination string
}
}


@enduml
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
@startuml
!include HostNetworkTrafficRuleBaseDto.puml

package dtos {
class HostNetworkTrafficRuleCreateDto {
}

HostNetworkTrafficRuleCreateDto --* HostNetworkTrafficRuleBaseDto
}
@enduml
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
@startuml
!include HostNetworkTrafficRuleBaseDto.puml

package dtos {
class HostNetworkTrafficRuleDeleteDto {
}

HostNetworkTrafficRuleDeleteDto --* HostNetworkTrafficRuleBaseDto
}
@enduml
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
@startuml

!include HostNetworkTrafficRuleBaseDto.puml

package dtos {
class HostNetworkTrafficRuleDto {
}

HostNetworkTrafficRuleDto --* HostNetworkTrafficRuleBaseDto
}

@enduml
Loading