Merge branch 'develop' into coredev-painttool
This commit is contained in:
commit
9a506fc35f
9 changed files with 114 additions and 83 deletions
|
@ -5,7 +5,7 @@ verify_ssl = true
|
|||
|
||||
[scripts]
|
||||
core = "python scripts/core-daemon -f data/core.conf -l data/logging.conf"
|
||||
coretk = "python core/gui/app.py"
|
||||
coretk = "python scripts/coretk-gui"
|
||||
test = "pytest -v tests"
|
||||
test-mock = "pytest -v --mock tests"
|
||||
test-emane = "pytest -v tests/emane"
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
import logging
|
||||
import tkinter as tk
|
||||
from tkinter import ttk
|
||||
|
||||
|
@ -96,12 +95,3 @@ class Application(tk.Frame):
|
|||
|
||||
def close(self):
|
||||
self.master.destroy()
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
log_format = "%(asctime)s - %(levelname)s - %(module)s:%(funcName)s - %(message)s"
|
||||
logging.basicConfig(level=logging.DEBUG, format=log_format)
|
||||
Images.load_all()
|
||||
appconfig.check_directory()
|
||||
app = Application()
|
||||
app.mainloop()
|
||||
|
|
|
@ -357,7 +357,7 @@ class CanvasGraph(tk.Canvas):
|
|||
return
|
||||
|
||||
# edge dst must be a node
|
||||
logging.debug(f"current selected: {self.selected}")
|
||||
logging.debug("current selected: %s", self.selected)
|
||||
dst_node = self.nodes.get(self.selected)
|
||||
if not dst_node:
|
||||
edge.delete()
|
||||
|
@ -634,7 +634,7 @@ class CanvasGraph(tk.Canvas):
|
|||
selected = self.get_selected(event)
|
||||
canvas_node = self.nodes.get(selected)
|
||||
if canvas_node:
|
||||
logging.debug(f"node context: {selected}")
|
||||
logging.debug("node context: %s", selected)
|
||||
self.context = canvas_node.create_context()
|
||||
self.context.post(event.x_root, event.y_root)
|
||||
else:
|
||||
|
|
|
@ -4,13 +4,13 @@ Information on how Docker can be leveraged and included to create
|
|||
nodes based on Docker containers and images to interface with
|
||||
existing CORE nodes, when needed.
|
||||
|
||||
# Installation
|
||||
## Installation
|
||||
|
||||
```shell
|
||||
sudo apt install docker.io
|
||||
```
|
||||
|
||||
# Configuration
|
||||
## Configuration
|
||||
|
||||
Custom configuration required to avoid iptable rules being added and removing
|
||||
the need for the default docker network, since core will be orchestrating
|
||||
|
@ -19,12 +19,28 @@ connections between nodes.
|
|||
Place the file below in **/etc/docker/**
|
||||
* daemon.json
|
||||
|
||||
# Tools and Versions Tested With
|
||||
## Group Setup
|
||||
|
||||
To use Docker nodes within the python GUI, you will need to make sure the user running the GUI is a member of the
|
||||
docker group.
|
||||
|
||||
```shell
|
||||
# add group if does not exist
|
||||
sudo groupadd docker
|
||||
|
||||
# add user to group
|
||||
sudo usermod -aG docker $USER
|
||||
|
||||
# to get this change to take effect, log out and back in or run the following
|
||||
newgrp docker
|
||||
```
|
||||
|
||||
## Tools and Versions Tested With
|
||||
|
||||
* Docker version 18.09.5, build e8ff056
|
||||
* nsenter from util-linux 2.31.1
|
||||
|
||||
# Examples
|
||||
## Examples
|
||||
|
||||
This directory provides a few small examples creating Docker nodes
|
||||
and linking them to themselves or with standard CORE nodes.
|
||||
|
|
|
@ -4,13 +4,13 @@ Information on how LXD can be leveraged and included to create
|
|||
nodes based on LXC containers and images to interface with
|
||||
existing CORE nodes, when needed.
|
||||
|
||||
# Installation
|
||||
## Installation
|
||||
|
||||
```shell
|
||||
sudo snap install lxd
|
||||
```
|
||||
|
||||
# Configuration
|
||||
## Configuration
|
||||
|
||||
Initialize LXD and say no to adding a default bridge.
|
||||
|
||||
|
@ -18,12 +18,28 @@ Initialize LXD and say no to adding a default bridge.
|
|||
sudo lxd init
|
||||
```
|
||||
|
||||
# Tools and Versions Tested With
|
||||
## Group Setup
|
||||
|
||||
To use LXC nodes within the python GUI, you will need to make sure the user running the GUI is a member of the
|
||||
lxd group.
|
||||
|
||||
```shell
|
||||
# add group if does not exist
|
||||
sudo groupadd lxd
|
||||
|
||||
# add user to group
|
||||
sudo usermod -aG lxd $USER
|
||||
|
||||
# to get this change to take effect, log out and back in or run the following
|
||||
newgrp lxd
|
||||
```
|
||||
|
||||
## Tools and Versions Tested With
|
||||
|
||||
* LXD 3.14
|
||||
* nsenter from util-linux 2.31.1
|
||||
|
||||
# Examples
|
||||
## Examples
|
||||
|
||||
This directory provides a few small examples creating LXC nodes
|
||||
using LXD and linking them to themselves or with standard CORE nodes.
|
||||
|
|
14
daemon/scripts/coretk-gui
Executable file
14
daemon/scripts/coretk-gui
Executable file
|
@ -0,0 +1,14 @@
|
|||
#!/usr/bin/env python
|
||||
import logging
|
||||
|
||||
from core.gui import appconfig
|
||||
from core.gui.app import Application
|
||||
from core.gui.images import Images
|
||||
|
||||
if __name__ == "__main__":
|
||||
log_format = "%(asctime)s - %(levelname)s - %(module)s:%(funcName)s - %(message)s"
|
||||
logging.basicConfig(level=logging.DEBUG, format=log_format)
|
||||
Images.load_all()
|
||||
appconfig.check_directory()
|
||||
app = Application()
|
||||
app.mainloop()
|
|
@ -45,7 +45,6 @@ setup(
|
|||
],
|
||||
tests_require=[
|
||||
"pytest",
|
||||
"mock",
|
||||
],
|
||||
data_files=data_files,
|
||||
scripts=glob.glob("scripts/*"),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue