Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get latest changes to the branch #1

Open
wants to merge 305 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 43 commits
Commits
Show all changes
305 commits
Select commit Hold shift + click to select a range
a528844
adding missing use of PROXMOX_PORT
MrBE4R Feb 27, 2023
9fbf424
first pass on getting ip from proxmox. qemu for now
MrBE4R Feb 27, 2023
552f93d
adding lxc
MrBE4R Mar 1, 2023
ed25cae
rework of interfaces import + adding deleting old interfaces
MrBE4R Mar 1, 2023
c3d4253
rework of ips import + adding deleting old ips
MrBE4R Mar 2, 2023
c5abbfa
adding node interfaces retrieval + vms get mtu from bridge if mtu=1
MrBE4R Mar 2, 2023
376b610
Update node.py
MrBE4R Mar 8, 2023
6cbb58a
correcting missing imports
MrBE4R Mar 8, 2023
176b647
Merge pull request #84 from MrBE4R/getting-ips
emersonfelipesp Mar 8, 2023
5bbcf00
Merge pull request #83 from MrBE4R/correcting-config
emersonfelipesp Mar 8, 2023
2ed6b6a
If PROXMOX_SSL is set to 'False', disable urllib3 'InsecureRequestWar…
emersonfelipesp Mar 9, 2023
531eea0
fix some minor errors related to interface and IP address creation
emersonfelipesp Mar 9, 2023
b23894b
testing: using native djang_tables2 module
emersonfelipesp Mar 10, 2023
d912b45
template tebles changed to render_table feature
emersonfelipesp Mar 10, 2023
c9f5b03
adjust tables style to show like netbox tables
emersonfelipesp Mar 10, 2023
ed6626e
fix interface creation
Gskill75 Mar 12, 2023
2c2bf3e
add required field virtual_machine
Gskill75 Mar 12, 2023
a3771db
test workflow
Gskill75 Mar 12, 2023
4983797
fix error vmid
Gskill75 Mar 12, 2023
be8085f
delete lower attribute on interface.mac_address
Gskill75 Mar 13, 2023
3686219
Merge pull request #87 from Gskill75/develop
emersonfelipesp Mar 14, 2023
ecc741c
Merge branch 'develop' of https://github.com/netdevopsbr/netbox-proxb…
emersonfelipesp Mar 16, 2023
2be7041
change how json is returned to adapt to table display
emersonfelipesp Mar 16, 2023
2ab77f4
Merge pull request #91 from netdevopsbr/change_tables
emersonfelipesp Mar 16, 2023
bf6b4c1
Update to v0.0.5
emersonfelipesp Mar 17, 2023
f010ed5
Merge pull request #92 from netdevopsbr/develop
emersonfelipesp Mar 17, 2023
e792f3f
Merge pull request #93 from netdevopsbr/main
emersonfelipesp Mar 17, 2023
eb18bac
Rollback the use of django_tables2 since I wasn't able to add child e…
emersonfelipesp Mar 17, 2023
ca24338
Add link to Virtual Machines and Nodes on update result table
emersonfelipesp Mar 17, 2023
0befcae
replace title with image of both systems integrated
emersonfelipesp Mar 17, 2023
5f09309
fix duplicate update due to case sensitive mismatch
emersonfelipesp Mar 20, 2023
7a426e7
Add try-except and other if to check cluster name
emersonfelipesp Mar 20, 2023
29a818a
Declare 'cluster_updated' variable before try-except
emersonfelipesp Mar 20, 2023
719a10f
add more print to help debugging
emersonfelipesp Mar 20, 2023
6b71aa9
check if 'netbox_node' is None
emersonfelipesp Mar 20, 2023
1053876
add netbox_node print to help debugging
emersonfelipesp Mar 20, 2023
15b3503
add more prints
emersonfelipesp Mar 20, 2023
67d389d
remove prints as error was found, now I will work on definitive solution
emersonfelipesp Mar 20, 2023
0c0e281
create device with '(2)' appended if it already exists on Netbox
emersonfelipesp Mar 20, 2023
afc4572
Add comment with information about the original device which was dupl…
emersonfelipesp Mar 20, 2023
2b515db
Merge pull request #95 from netdevopsbr/fix-interface-update
emersonfelipesp Mar 21, 2023
4001389
Add 'Show JSON result' button on botton of page to show raw json result
emersonfelipesp Mar 21, 2023
f8b4118
Fix minor bugs related to creating duplicated device
emersonfelipesp Mar 21, 2023
c650f37
create device with '(2)' appended if it already exists on Netbox
emersonfelipesp Mar 21, 2023
b3900a3
Add 'show configuration' to view raw config and link to examples
emersonfelipesp Mar 22, 2023
1c179ae
transform example links into buttons
emersonfelipesp Mar 22, 2023
4aba25c
minor changes
emersonfelipesp Mar 22, 2023
f7e22f8
correcting missing mtu and wrong identifier
MrBE4R Mar 22, 2023
fc370ed
adding custom field to keep interface
MrBE4R Mar 23, 2023
8adc2a1
create cluster with '(2)' appended if it already exists on Netbox
emersonfelipesp Mar 23, 2023
1febec8
comment 'RequestConfig' so that it pass the action validation
emersonfelipesp Mar 23, 2023
3b58e35
Merge pull request #100 from netdevopsbr/cluster-nonetype
emersonfelipesp Mar 23, 2023
2b3c45a
Merge pull request #99 from MrBE4R/fix-98
emersonfelipesp Mar 23, 2023
29f4472
Merge pull request #81 from netdevopsbr/dependabot/pip/gitpython-3.1.30
emersonfelipesp Mar 23, 2023
47f3eca
change all print() to logging.<loglevel>
emersonfelipesp Mar 23, 2023
cef1110
Add logging section to README
emersonfelipesp Mar 23, 2023
0806704
fix wrong markdown link
emersonfelipesp Mar 23, 2023
0584f6f
fix another markdown links typo's
emersonfelipesp Mar 23, 2023
a926947
Merge pull request #102 from netdevopsbr/logging
emersonfelipesp Mar 23, 2023
4f09e81
Fixed the mgmt_only and proxmox_keep_interface bool logic
RWL-Dittrich Mar 24, 2023
4b2e8a2
Merge pull request #103 from RWL-Dittrich/fix/keep-interface-logic
emersonfelipesp Mar 24, 2023
42a2bc5
Create FastAPI app and make all functions assynchronous
emersonfelipesp Mar 28, 2023
d7e6ba5
Add FastAPI example to README and to HomeView
emersonfelipesp Mar 28, 2023
f3bc074
Add development verification to know if use '--reload' uvicorn parame…
emersonfelipesp Mar 28, 2023
67cf78e
Add HTML code to homepage of FastAPI
emersonfelipesp Mar 28, 2023
334cc63
Add 'deploy_uvicorn' module to deploy FastAPI and add Jinja2 templates
emersonfelipesp Mar 29, 2023
199841e
Add more required packages to setup
emersonfelipesp Mar 29, 2023
34d05d6
add 'requirements.txt' with proxbox dependencies
emersonfelipesp Apr 6, 2023
fdb6c68
minor adjust to uvicorn deploy when checking existing service using port
emersonfelipesp Apr 6, 2023
504b576
Add search for proccess to inform user about existing uvicorn proccess
emersonfelipesp Apr 6, 2023
eef5f2d
change uvicorn spawn to gunicorn workers
emersonfelipesp Apr 6, 2023
cf62d27
Merge branch 'develop' of https://github.com/N-Multifibra/netbox-prox…
emersonfelipesp Apr 12, 2023
cb29a40
saves work
emersonfelipesp Apr 12, 2023
5fe7af9
Merge branch 'performance' of https://github.com/N-Multifibra/netbox-…
emersonfelipesp Apr 12, 2023
0fc786d
check if fastapi host and port is configured and warn user about it
emersonfelipesp Apr 12, 2023
991fe84
remove all() function
emersonfelipesp Apr 12, 2023
e86e320
saves work
emersonfelipesp Apr 18, 2023
8dd27dc
Add section "8 - Get Help from Community!"
emersonfelipesp Apr 20, 2023
2d23569
Create FUNDING.yml
emersonfelipesp Apr 20, 2023
5a5cf95
Add 'best effort' warning at the top of the page
emersonfelipesp May 2, 2023
69db5a6
Add anchor link to 'Pull Request'
emersonfelipesp May 2, 2023
3b96c1f
support for custom BASE_URL
ugenk May 11, 2023
83f2697
Merge pull request #109 from ugenk/patch-1
emersonfelipesp May 11, 2023
6fb9fed
Merge branch 'develop' of https://github.com/netdevopsbr/netbox-proxb…
emersonfelipesp May 11, 2023
0ffa6ae
Add docs initial pages
emersonfelipesp May 22, 2023
b57da97
Add GitHub Action to auto-deploy docs and CNAME file
emersonfelipesp May 22, 2023
de04734
Merge pull request #114 from netdevopsbr/docs
emersonfelipesp May 22, 2023
c2fbc5a
Change language to 'eng' and minor fixes
emersonfelipesp May 22, 2023
dad6285
Change language to 'en'
emersonfelipesp May 22, 2023
1577fb9
Copy README to introduction.md and add images
emersonfelipesp May 22, 2023
22da268
Add 'roadmap.md' page
emersonfelipesp May 22, 2023
9737c05
Update README.md to http://proxbox.netbox.dev.br/ Docs
emersonfelipesp May 29, 2023
f301533
Change remaining URLs to proxbox.netbox.dev.br
emersonfelipesp May 29, 2023
319f6cf
Merge branch 'develop' of https://github.com/netdevopsbr/netbox-proxb…
emersonfelipesp May 29, 2023
cb5a887
Add curly bracket fix #117
Langlais115 May 31, 2023
78e3fcc
Merge pull request #1 from Langlais115/Langlais115-patch-1
Langlais115 May 31, 2023
f008c1b
Merge pull request #118 from Langlais115/develop
emersonfelipesp Jun 1, 2023
76c7b79
Update docs.yml changing master to develop branch
emersonfelipesp Jun 29, 2023
75021d0
Modify index.md page to test it
emersonfelipesp Jun 29, 2023
28bfd77
feat(Multi server): Add multi server support https://github.com/netde…
devopstales Jul 6, 2023
5310468
feat(Multi server): Update missing components https://github.com/netd…
devopstales Jul 8, 2023
8edcf65
feat(Multi server): Update README and add custom fields csv https://g…
devopstales Jul 8, 2023
0b39b77
feat(Multi server): Update UI https://github.com/netdevopsbr/netbox-p…
devopstales Jul 8, 2023
37fbd62
fix: Create non existing vlans https://github.com/netdevopsbr/netbox-…
devopstales Jul 8, 2023
482c570
fix(Multi server): Proxmox password authentication
devopstales Jul 8, 2023
0002900
feat(Multi server): Sync single cluster https://github.com/netdevopsb…
devopstales Jul 9, 2023
b850c23
Update README.md with Stars History Graph
emersonfelipesp Jul 13, 2023
dd6768a
Move current navigation to top-level navigation
emersonfelipesp Jul 20, 2023
46e587b
Add 'Contributing' navigation button with external link to communities
emersonfelipesp Jul 20, 2023
ca9d456
Change 'Discord' icon background to gray
emersonfelipesp Jul 20, 2023
42d27b6
Add 'Community' page
emersonfelipesp Jul 20, 2023
df27c08
Add 'GitHub' and 'LinkedIn' sections
emersonfelipesp Jul 20, 2023
ec1afbc
Merge branch 'add-multi-cluster' into develop
emersonfelipesp Jul 21, 2023
64f6f82
Merge pull request #122 from devopstales/develop
emersonfelipesp Jul 21, 2023
beb16c8
Add ']' to fix array error or urls.py module
emersonfelipesp Jul 21, 2023
68121fd
Merge branch 'performance' into develop
emersonfelipesp Jul 21, 2023
965276c
Merge branch 'develop' into add-multi-cluster
emersonfelipesp Jul 21, 2023
3ff985a
Merge pull request #126 from netdevopsbr/add-multi-cluster
emersonfelipesp Jul 21, 2023
9fb5090
Add 'fastapi' app package to refactor proxbox backend
emersonfelipesp Jul 21, 2023
07799d2
Add new main fastapi module and reorganize modules
emersonfelipesp Jul 22, 2023
c4547c4
Saves FastAPI work
emersonfelipesp Jul 22, 2023
8ef170b
Increase result message of '/proxmox' base path including api results
emersonfelipesp Jul 22, 2023
f4e136f
Add static json response to '/' root FastAPI path
emersonfelipesp Jul 24, 2023
a796ec8
Add top-level endpoints like /cluster and /access
emersonfelipesp Jul 24, 2023
f2eee32
Fixed README
CodeBleu Jul 24, 2023
f497a51
Dynamically response to top-level endpoints using '/proxmox/{top_leve…
emersonfelipesp Jul 24, 2023
5a79431
adjust and minimize '/proxmox' json result
emersonfelipesp Jul 24, 2023
ccf610a
change name of api base result
emersonfelipesp Jul 24, 2023
df5781a
Return 'ResourceException' error as HTTP response
emersonfelipesp Jul 24, 2023
0df1150
Add condition if path is 'cluster/resources' to add optional type arg…
emersonfelipesp Jul 24, 2023
5b7a8e2
Add condition if path is 'cluster/resources' to add optional type arg…
emersonfelipesp Jul 24, 2023
a6771bf
Stop using static vars and imports Proxmox Sessions from 'plugins_con…
emersonfelipesp Jul 24, 2023
14ab2ac
Add basic instructions of how to deploy FastAPI
emersonfelipesp Jul 24, 2023
8ffe997
Fix markdown formatting
emersonfelipesp Jul 24, 2023
e015506
Removes <> from variable namespace
emersonfelipesp Jul 24, 2023
45d3d9e
Replace variables to UPPERCASE
emersonfelipesp Jul 24, 2023
a13e7c0
Merge pull request #133 from CodeBleu/develop
emersonfelipesp Jul 24, 2023
cd1d61d
Merge pull request #134 from netdevopsbr/proxmox-fastapi
emersonfelipesp Jul 24, 2023
8b87fb7
Add first HTML response using dependency injection
emersonfelipesp Jul 24, 2023
151bd28
Update README.md with Joao Lucas Macedo's video
emersonfelipesp Jul 25, 2023
3c5744b
Change initial page '/' from JSON to HTML using Jinja2
emersonfelipesp Jul 25, 2023
74e51a8
Add 02 more cards to homepage
emersonfelipesp Jul 25, 2023
5d8142e
Revert proxbox_api/__init__.py change from #07799d2
CodeBleu Jul 26, 2023
2d44f11
Merge pull request #135 from CodeBleu/multi-cluster
emersonfelipesp Jul 31, 2023
3993a04
Saves 'main.py' work
emersonfelipesp Jul 31, 2023
09c0db1
Merge branch 'develop' of https://github.com/netdevopsbr/netbox-proxb…
emersonfelipesp Jul 31, 2023
f083334
fix 404 error
lug-gh Aug 10, 2023
87ca4b7
add missing }
lug-gh Aug 10, 2023
118b5d9
Add systemd proxbox service
emersonfelipesp Aug 17, 2023
134058f
Merge pull request #142 from netdevopsbr/standalone
emersonfelipesp Aug 17, 2023
9441a57
Merge pull request #139 from lug-gh/develop
emersonfelipesp Aug 17, 2023
af2ee3e
Bump gitpython from 3.1.30 to 3.1.34
dependabot[bot] Sep 6, 2023
5dc5ea0
fix missing '{% load static %}' from 'home.html' template
emersonfelipesp Oct 9, 2023
a1ef41a
Merge pull request #147 from netdevopsbr/dependabot/pip/gitpython-3.1.34
emersonfelipesp Oct 9, 2023
e48aaf5
'proxbox.service' systemd running into port 8800
emersonfelipesp Oct 10, 2023
6dd0027
Add FastAPI paths related to plugin settings
emersonfelipesp Oct 10, 2023
a69e990
Add BaseModels for Netbox and Proxmox sessions & add query paramters …
emersonfelipesp Oct 10, 2023
86ec91f
fix: attempt to fix #150
alryaz Oct 10, 2023
ff1aa56
refactor: allow password as token auth fallback
alryaz Oct 10, 2023
99692bd
Finish 'PluginConfig' pydantic model to validate 'netbox_proxbox' plu…
emersonfelipesp Oct 10, 2023
cafcad5
Move pydantic models from main to 'backend.schemas' subpackage
emersonfelipesp Oct 10, 2023
ae58c7c
Add routes and schemas packages to better structure the project
emersonfelipesp Oct 10, 2023
9cfe19c
Add /proxbox/settings/{app} path to retrieve both Proxmox and Netbox …
emersonfelipesp Oct 10, 2023
cbfd99b
Rename 'proxbox_settings' function to 'app_settings'
emersonfelipesp Oct 10, 2023
bc05fd6
Bump gitpython from 3.1.34 to 3.1.37
dependabot[bot] Oct 10, 2023
41d12da
Bump urllib3 from 2.0.4 to 2.0.7
dependabot[bot] Oct 17, 2023
a923054
NetboxSession working, example endpoint: <fastapi>/netbox/status
emersonfelipesp Oct 17, 2023
7eb1fa9
Add '/netbox/openapi' HTTP path and create Annotated var 'NetboxSessi…
emersonfelipesp Oct 18, 2023
805844c
Make pynetbox() assync remove pynetbox attribute from NetboxSession c…
emersonfelipesp Oct 18, 2023
fb71611
Start ProxmoxSession class, not tested yet.
emersonfelipesp Oct 18, 2023
ce1b199
Saves work. ProxboxException created, making error handling better
emersonfelipesp Oct 23, 2023
4e78fbb
'/{top_level}/{second_level}' proxmox dynamic path working with singl…
emersonfelipesp Oct 24, 2023
1ebdcfa
Add Enum validation to '/{top_level}' proxmox path and minor changes
emersonfelipesp Oct 24, 2023
29b6f7f
/proxmox/cluster/resources path working with data validation and resp…
emersonfelipesp Oct 25, 2023
e09689e
Add Query class to describe query parameters of /cluster/resources an…
emersonfelipesp Oct 25, 2023
5bb350f
Separate /proxmox/cluster/{path} routes from proxmox.py into specific…
emersonfelipesp Oct 25, 2023
4d606c7
Create ProxmoxSessions so that I can return not only the session obje…
emersonfelipesp Oct 25, 2023
c27b443
Add docs to 'ProxmoxSession' and 'ProxmoxSessions' and try-excepts to…
emersonfelipesp Oct 26, 2023
db74bf5
proxmox_sessions(), ProxmoxConfigDep and ProxmoxConfigDep returning c…
emersonfelipesp Oct 26, 2023
5ff8d5d
All /proxmox paths working with 'ProxmoxSessionsDep' dependency repre…
emersonfelipesp Oct 27, 2023
36d1d38
Add query descriptions to 'ProxmoxSessionsDep'
emersonfelipesp Oct 27, 2023
0738617
/proxmox/nodes/ path working with pydantic and multi-cluster
emersonfelipesp Oct 27, 2023
b20fc5e
Add first Netbox View 'Clusters' rendering '/proxmox/cluster/status' …
emersonfelipesp Nov 1, 2023
f6ad5bf
Fist React component using Next.js with dynamic data from FastAPI bac…
emersonfelipesp Nov 8, 2023
9fa7a6c
Start styling with tailwind
emersonfelipesp Nov 9, 2023
8a50cb2
Create draft of homepage with tailwind grid and flex
emersonfelipesp Nov 9, 2023
f727064
Split cluster card into components and add navbar
emersonfelipesp Nov 9, 2023
1074c95
Adjust RootLayout with Components
emersonfelipesp Nov 10, 2023
19ac707
Home() component from '/home' path making fetch to backend inside you…
emersonfelipesp Nov 10, 2023
bc73868
Restart ClusterCard style, base CSS already done
emersonfelipesp Nov 14, 2023
1e1d017
Use Composition Pattern to list Proxmox sessions at homepage
emersonfelipesp Nov 14, 2023
70bf70e
Add 'Add New Proxmox Cluster' button (without actions yet)
emersonfelipesp Nov 14, 2023
d362f9a
Merge pull request #158 from netdevopsbr/nextjs
emersonfelipesp Nov 15, 2023
e764634
Add new sub-routes for /netbox and change NetboxSession class to embb…
emersonfelipesp Nov 16, 2023
1ff54c4
Add Site class with get() and post() methods
emersonfelipesp Nov 16, 2023
16e750f
Finish Sites class with fully functionable get() and post() methods
emersonfelipesp Nov 16, 2023
61b9738
'ClusterTypes' functional on '/netbox/virtualization/cluster-types' w…
emersonfelipesp Nov 16, 2023
b9fe50a
Minor fixes to 'Sites' class
emersonfelipesp Nov 16, 2023
0a31442
Parent 'NetboxBase' class working with both 'ClusterType' and 'Sites'…
emersonfelipesp Nov 17, 2023
3671755
Change NetboxBase docstring
emersonfelipesp Nov 17, 2023
884effc
Add 'default_extra_fields' to 'NetboxBase' class to enable Clusters G…
emersonfelipesp Nov 18, 2023
78487f6
Started '_check_duplicate()' to be used by 'get()' and 'post()' metho…
emersonfelipesp Nov 22, 2023
be877bb
Added logging with colored messages
emersonfelipesp Nov 23, 2023
cc57e8c
Saves work
emersonfelipesp Dec 8, 2023
d7a5e63
Adjust default behavior when creating objects and adds detailed log m…
emersonfelipesp Dec 13, 2023
cdfb642
Increase corner cases handling when posting (creating) new objects us…
emersonfelipesp Dec 13, 2023
90542b0
'/proxbox/clusters' path successfully creating Cluster with its Clust…
emersonfelipesp Dec 13, 2023
fc61a60
Add 'Device Types', 'Device Roles', 'Manufacturers' objects types to …
emersonfelipesp Dec 14, 2023
b154ea8
/netbox/dcim/devices correctly adding default Device object
emersonfelipesp Dec 14, 2023
da763af
Add base_dict var and minor changes to use | and |= dict merge syntax
emersonfelipesp Dec 15, 2023
f02c39a
All current backend paths working with both 'GET' and 'POST' HTTPmeth…
emersonfelipesp Dec 19, 2023
2839ea9
Proxbox successfully creating Virtual Machines based on Proxbox using…
emersonfelipesp Dec 19, 2023
b367b36
Add 'asyncio.to_thread' to all pynetbox calls on 'generic.NetboxBase'
emersonfelipesp Dec 20, 2023
379437b
Implement generic caching system to avoid duplicate requests
emersonfelipesp Dec 27, 2023
0826685
Hide sensitive data in web view
q3k Apr 11, 2024
de2bb66
Adapt to Netbox v4.0
emersonfelipesp May 20, 2024
f8032a9
Merge pull request #178 from netdevopsbr/optimize-performance
emersonfelipesp May 27, 2024
a59c44f
Add default object function to netbox Site object
emersonfelipesp May 27, 2024
b3c52af
minor fix to import
emersonfelipesp Jun 25, 2024
db99672
Add 'vcpus', 'memory' and 'disk' properties to Netbox Virtual Machines
emersonfelipesp Jul 24, 2024
1e9cb41
Add Device Role to Virtual Machines when creating it. (QEMU or LXC)
emersonfelipesp Jul 24, 2024
cdad0a5
Virtual Machines platform is updated now. Also created Proxmox VM ID …
emersonfelipesp Jul 29, 2024
12d4635
Add 'Start at Boot' custom field and group Proxmox CF's together
emersonfelipesp Jul 29, 2024
4ef2675
Add interfaces to nodes, but missing bridge and slave ports
emersonfelipesp Aug 1, 2024
c3ac6d8
Save changes
emersonfelipesp Aug 15, 2024
792f8c7
Correctly adding interface with IP address to Devices (Nodes)
emersonfelipesp Aug 21, 2024
6697a2f
Sucessfully creating devices with interfacesd and virtual machines (w…
emersonfelipesp Aug 22, 2024
5abb0fc
Allow creating virtual machines with the same name within the same cl…
emersonfelipesp Aug 22, 2024
cf48673
Getting network data from VM and parsing data into JSON. Next step is…
emersonfelipesp Aug 22, 2024
ebfcd13
Update main.py
Uzoma8Chi Sep 12, 2024
f02c5e0
Save changes
emersonfelipesp Sep 17, 2024
6472f01
Add 'Proxmox Nodes Update' and 'Proxmox Virtual Machines Update' on P…
emersonfelipesp Sep 17, 2024
30442a3
Add log messages to Netbox GUI using Websockets
emersonfelipesp Sep 19, 2024
bfcb460
Merge pull request #181 from Uzoma8Chi/patch-1
emersonfelipesp Sep 23, 2024
24a8dbd
Merge pull request #171 from q3k/q3k/dont-show-sensitive-data
emersonfelipesp Sep 23, 2024
7dd06e3
Merge pull request #153 from alryaz/patch-1
emersonfelipesp Sep 24, 2024
d0b211f
Merge pull request #155 from netdevopsbr/dependabot/pip/urllib3-2.0.7
emersonfelipesp Sep 24, 2024
829998b
Bump braces from 3.0.2 to 3.0.3 in /standalone
dependabot[bot] Sep 24, 2024
3f3b57f
Merge pull request #154 from netdevopsbr/dependabot/pip/gitpython-3.1.37
emersonfelipesp Sep 24, 2024
26257e3
Bump black from 20.8b1 to 24.3.0
dependabot[bot] Sep 24, 2024
dd09afa
Merge pull request #182 from netdevopsbr/dependabot/npm_and_yarn/stan…
emersonfelipesp Sep 24, 2024
1f458e5
Merge pull request #183 from netdevopsbr/dependabot/pip/black-24.3.0
emersonfelipesp Sep 24, 2024
95fc73f
Bump certifi from 2023.7.22 to 2024.7.4
dependabot[bot] Sep 24, 2024
b31d0df
Bump cryptography from 42.0.8 to 43.0.1
dependabot[bot] Sep 24, 2024
cb7227d
Bump urllib3 from 2.0.7 to 2.2.2
dependabot[bot] Sep 24, 2024
917a4f2
Bump idna from 3.4 to 3.7
dependabot[bot] Sep 24, 2024
01026ad
Merge pull request #184 from netdevopsbr/dependabot/pip/certifi-2024.7.4
emersonfelipesp Sep 24, 2024
8e2f602
Merge pull request #185 from netdevopsbr/dependabot/pip/cryptography-…
emersonfelipesp Sep 24, 2024
8a5d10d
Merge pull request #186 from netdevopsbr/dependabot/pip/urllib3-2.2.2
emersonfelipesp Sep 24, 2024
cf2d999
Merge pull request #187 from netdevopsbr/dependabot/pip/idna-3.7
emersonfelipesp Sep 24, 2024
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
32 changes: 32 additions & 0 deletions .github/workflows/pypi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Upload Python Package

on:
release:
types:
- created

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel build

- name: Build distributable
run: |
python -m build

- name: Publish a Python distribution to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
156 changes: 135 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,32 @@
<p align="center">
<img width="532" src="https://github.com/N-Multifibra/proxbox/blob/main/etc/img/proxbox-full-logo.png" alt="Proxbox logo">
</p>
<div align="center">
<a href="https://docs.netbox.dev.br/en/netbox/plugins/netbox-proxbox">
<img width="532" src="https://github.com/N-Multifibra/proxbox/blob/main/etc/img/proxbox-full-logo.png" alt="Proxbox logo">
</a>
<br>

<div>

### [New Documentation available!](https://docs.netbox.dev.br/en/netbox/plugins/netbox-proxbox)
</div>
<br>
</div>


# proxbox (In Development!)
**NOTE:** Although the Proxbox plugin is in development, it only use GET requests and there is no risk to harm your Proxmox environment by changing things incorrectly.

Netbox plugin which integrates Proxmox and Netbox using proxmoxer and pynetbox.

It is currently able to get the following information from Proxmox:
## Netbox Plugin which integrates [Proxmox](https://www.proxmox.com/) and [Netbox](https://netbox.readthedocs.io/)!

- Cluster name
- Nodes:
> **NOTE:** Although the Proxbox plugin is in development, it only use **GET requests** and there is **no risk to harm your Proxmox environment** by changing things incorrectly.

<br>

Proxbox is currently able to get the following information from Proxmox:

- **Cluster name**
- **Nodes:**
- Status (online / offline)
- Name
- Virtual Machines and Containers:
- **Virtual Machines and Containers:**
- Status (online / offline)
- Name
- ID
Expand All @@ -23,22 +35,34 @@ It is currently able to get the following information from Proxmox:
- Memory
- Node (Server)

---

<div align="center">

### Versions


The following table shows the Netbox and Proxmox versions compatible (tested) with Proxbox plugin.

| netbox version | proxmox version | proxbox version
| ------------- |-------------|-------------|
| >= 2.10.9 | >= v6.2.0 | v0.0.3
| >= v3.2.0 | >= v6.2.0 | =v0.0.4
| >= v3.0.0 < v3.2| >= v6.2.0 | =v0.0.3


</div>

---

### Summary
[1. Installation](#1-installation)
- [1.1. Install package](#11-install-package)
- [1.1.1. Using pip (production use)](#111-using-pip-production-use)
- [1.1.1. Using pip (production use)](#111-using-pip-production-use---not-working-yet)
- [1.1.2. Using git (development use)](#112-using-git-development-use)
- [1.2. Enable the Plugin](#12-enable-the-plugin)
- [1.3. Configure Plugin](#13-configure-plugin)
- [1.3.1. Change Netbox 'configuration.py' to add PLUGIN parameters](#131-change-netbox-configurationpy-to-add-plugin-parameters)
- [1.3.2. Change Netbox 'settings.py' to include Proxbox Template directory](#132-change-netbox-settingspy-to-include-proxbox-template-directory)
- [1.4. Run Database Migrations](#14-run-database-migrations)
- [1.5 Restart WSGI Service](#15-restart-wsgi-service)

Expand Down Expand Up @@ -66,7 +90,7 @@ The plugin is available as a Python package in pypi and can be installed with pi

### 1.1. Install package

#### 1.1.1. Using pip (production use - not working yet!)
#### 1.1.1. Using pip (production use)

Enter Netbox's virtual environment.
```
Expand All @@ -88,7 +112,7 @@ cd /opt/netbox/netbox

Clone netbox-proxbox repository
```
git clone https://github.com/N-Multifibra/netbox-proxbox.git
git clone https://github.com/netdevopsbr/netbox-proxbox.git
```

Install netbox-proxbox
Expand All @@ -98,6 +122,7 @@ source /opt/netbox/venv/bin/activate
python3 setup.py develop
```

---

### 1.2. Enable the Plugin

Expand All @@ -106,8 +131,11 @@ Enable the plugin in **/opt/netbox/netbox/netbox/configuration.py**:
PLUGINS = ['netbox_proxbox']
```

---

### 1.3. Configure Plugin

#### 1.3.1. Change Netbox '**[configuration.py](https://github.com/netbox-community/netbox/blob/develop/netbox/netbox/configuration.example.py)**' to add PLUGIN parameters
The plugin's configuration is also located in **/opt/netbox/netbox/netbox/configuration.py**:

Replace the values with your own following the [Configuration Parameters](#configuration-parameters) section.
Expand All @@ -119,8 +147,8 @@ PLUGINS_CONFIG = {
'proxmox': {
'domain': 'proxbox.example.com', # May also be IP address
'http_port': 8006,
'user': 'root@pam',
'password': 'Strong@P4ssword',
'user': 'root@pam', # always required
'password': 'Strong@P4ssword', # only required, if you don't want to use token based authentication
'token': {
'name': 'tokenID', # Only type the token name and not the 'user@pam:tokenID' format
'value': '039az154-23b2-4be0-8d20-b66abc8c4686'
Expand All @@ -141,13 +169,97 @@ PLUGINS_CONFIG = {
}
```

<br>

#### 1.3.2. Change Netbox '**[settings.py](https://github.com/netbox-community/netbox/blob/develop/netbox/netbox/settings.py)**' to include Proxbox Template directory

> Probably on the next release of Netbox, it will not be necessary to make the configuration below! As the [Pull Request #8733](https://github.com/netbox-community/netbox/pull/8734) got merged to develop branch

Edit **/opt/netbox/netbox/netbox** and find TEMPLATE_DIR section

<div align=center>

### How it is configured by default (Netbox >= v3.2.0):
</div>

```python
TEMPLATES_DIR = BASE_DIR + '/templates'
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [TEMPLATES_DIR],
'APP_DIRS': True,
'OPTIONS': {
'builtins': [
'utilities.templatetags.builtins.filters',
'utilities.templatetags.builtins.tags',
],
'context_processors': [
'django.template.context_processors.debug',
'django.template.context_processors.request',
'django.template.context_processors.media',
'django.contrib.auth.context_processors.auth',
'django.contrib.messages.context_processors.messages',
'netbox.context_processors.settings_and_registry',
],
},
},
]
```

<br>

<div align=center>

### How it MUST be configured to Proxbox work:
</div>

```python
TEMPLATES_DIR = BASE_DIR + '/templates'

# PROXBOX CUSTOM TEMPLATE
PROXBOX_TEMPLATE_DIR = BASE_DIR + '/netbox-proxbox/netbox_proxbox/templates/netbox_proxbox'

TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [TEMPLATES_DIR, PROXBOX_TEMPLATE_DIR], # <--- IMPORTANT
# The Parameters below is equal to default Netbox config
'APP_DIRS': True,
'OPTIONS': {
'builtins': [
'utilities.templatetags.builtins.filters',
'utilities.templatetags.builtins.tags',
],
'context_processors': [
'django.template.context_processors.debug',
'django.template.context_processors.request',
'django.template.context_processors.media',
'django.contrib.auth.context_processors.auth',
'django.contrib.messages.context_processors.messages',
'netbox.context_processors.settings_and_registry',
],
},
},
]
```

### Example of error if not configuring the code above on `settings.py`
![image](https://user-images.githubusercontent.com/24397251/167919319-00c67a81-0679-4114-a66d-3e294b3ae28c.png)

I did it because I had to change the **base/layout.html** from Netbox, since there is no **Jinja2 block** to fill with custom information into the **footer HTML tag**

---

### 1.4. Run Database Migrations

```
(venv) $ cd /opt/netbox/netbox/
(venv) $ python3 manage.py migrate
```

---

### 1.5. Restart WSGI Service

Restart the WSGI service to load the new plugin:
Expand Down Expand Up @@ -190,7 +302,7 @@ The following options are available:
To get Proxmox ID, Node and Type information, is necessary to configure Custom Fields.
Below the parameters needed to make it work:

---
<br>

### 3.1. Custom Field Configuration

Expand All @@ -206,7 +318,7 @@ Optional values (may be different)
- [Custom Field] **Label:** [Proxmox] ID
- [Custom Field] **Description:** Proxmox VM/CT ID

---
<br>

#### 3.1.2. Proxmox Node

Expand All @@ -219,7 +331,7 @@ Optional values (may be different)
- [Custom Field] **Label:** [Proxmox] Node
- [Custom Field] **Description:** Proxmox Node (Server)

---
<br>

#### 3.1.3. Proxmox Type (qemu or lxc)

Expand All @@ -233,7 +345,7 @@ Optional values (may be different)
- [Custom Field] **Label:** [Proxmox] Type
- [Custom Field] **Description:** Proxmox type (VM or CT)

---
<br>

### 3.2. Custom Field Example

Expand All @@ -258,9 +370,11 @@ Developing tools for this project based on [ntc-netbox-plugin-onboarding](https:

Issues and pull requests are welcomed.

---

## 6. Roadmap
- Start using custom models to optimize the use of the Plugin and stop using 'Custom Fields'
- Automatically remove Nodes on Netbox when removed on Promox (as it already happens with Virutal Machines and Containers)
- Automatically remove Nodes on Netbox when removed on Promox (as it already happens with Virtual Machines and Containers)
- Add individual update of VM/CT's and Nodes (currently is only possible to update all at once)
- Add periodic update of the whole environment so that the user does not need to manually click the update button.
- Create virtual machines and containers directly on Netbox, having no need to access Proxmox.
Expand Down
2 changes: 1 addition & 1 deletion netbox_proxbox/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ class ProxboxConfig(PluginConfig):
name = "netbox_proxbox"
verbose_name = "Proxbox"
description = "Integrates Proxmox and Netbox"
version = "0.0.3"
version = "0.0.5-beta1"
author = "Emerson Felipe (@emersonfelipesp)"
author_email = "[email protected]"
base_url = "proxbox"
Expand Down
33 changes: 18 additions & 15 deletions netbox_proxbox/navigation.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,23 @@

menu_items = (
PluginMenuItem(
link="plugins:netbox_proxbox:proxmoxvm_list",
link_text="Proxmox VM/CT",
buttons=(
PluginMenuButton(
# match the names of the path for create view defined in ./urls.py
link="plugins:netbox_proxbox:proxmoxvm_add",
# text that appears when hovering the ubtton
title="Add",
# font-awesome icon to use
icon_class="mdi mdi-plus-thick", # 'fa fa-plus' didn't work
# defines color button to green
color=ButtonColorChoices.GREEN,
permissions=["netbox_proxbox.add_proxmoxvm"],
),
),
link="plugins:netbox_proxbox:home",
link_text="Home",
),
)

'''
buttons=(
PluginMenuButton(
# match the names of the path for create view defined in ./urls.py
link="plugins:netbox_proxbox:proxmoxvm_add",
# text that appears when hovering the ubtton
title="Add",
# font-awesome icon to use
icon_class="mdi mdi-plus-thick", # 'fa fa-plus' didn't work
# defines color button to green
color=ButtonColorChoices.GREEN,
permissions=["netbox_proxbox.add_proxmoxvm"],
),
),
'''
Loading