diff --git a/docker/manage-secrets.py b/docker/manage-secrets.py index 0bfd6b1d9..558f4d77d 100644 --- a/docker/manage-secrets.py +++ b/docker/manage-secrets.py @@ -80,7 +80,7 @@ "RELEASE_CHECK_URL=https://api.github.com/repos/netbox-community/netbox/releases\n" f"SECRET_KEY='{netbox_secret_key}'\n" "SKIP_SUPERUSER=false\n" - "SUPERUSER_EMAIL='noreply@example.org'\n" + "SUPERUSER_EMAIL='noreply@orthos2.test'\n" "SUPERUSER_NAME='admin'\n" f"SUPERUSER_PASSWORD={netbox_superuser_password}\n" "WEBHOOKS_ENABLED=true\n" diff --git a/docker/orthos/devel-server.sh b/docker/orthos/devel-server.sh index 5fe796153..cd50dce71 100755 --- a/docker/orthos/devel-server.sh +++ b/docker/orthos/devel-server.sh @@ -44,7 +44,7 @@ exit(0 if Machine.objects.filter(fqdn='testmachine.orthos2.test').exists() else python3.11 manage.py shell -c " from django.contrib.auth.models import User exit(0 if User.objects.filter(username='admin').exists() else 1) -" || DJANGO_SUPERUSER_PASSWORD="$ORTHOS2_SUPERUSER_PASSWORD" python3.11 manage.py createsuperuser --noinput --username admin --email admin@example.com +" || DJANGO_SUPERUSER_PASSWORD="$ORTHOS2_SUPERUSER_PASSWORD" python3.11 manage.py createsuperuser --noinput --username admin --email admin@orthos2.test python3.11 manage.py shell Manufacturers and Device Types Serial Console Type - Machine Groups Remote Power Types Remote Power Devices diff --git a/docs/adminguide/architectures.rst b/docs/adminguide/architectures.rst index 85e438222..542916e18 100644 --- a/docs/adminguide/architectures.rst +++ b/docs/adminguide/architectures.rst @@ -39,12 +39,8 @@ Contact email Email address to the person who is the contact person for an architecture. -Write DHCPv4 -============ - -Enable/disable writing a DHCPv4 file for this architecture. - -Write DHCPv6 -============ +Default profile +=============== -Enable/disable writing a DHCPv6 file for this architecture. +The name of the Cobbler profile used as the default installation choice for machines of this architecture when +using the "Setup Machine" action. diff --git a/docs/adminguide/domains.rst b/docs/adminguide/domains.rst index a0b5980a4..f31750277 100644 --- a/docs/adminguide/domains.rst +++ b/docs/adminguide/domains.rst @@ -118,5 +118,5 @@ The end of the range for auto-generated IPv6 addresses that are handed out by Or Setup architectures =================== -Here the list of domains with their corresponding contact e-mails are being listed. If an architecture is not listed, -its machines cannot use the "Setup machine" functionality. +Here the list of architectures supported by this domain, each with a corresponding contact e-mail, is listed. If an +architecture is not listed, its machines cannot use the "Setup machine" functionality. diff --git a/docs/adminguide/groups_and_users.rst b/docs/adminguide/groups_and_users.rst index 51f943e94..ad29ab8c0 100644 --- a/docs/adminguide/groups_and_users.rst +++ b/docs/adminguide/groups_and_users.rst @@ -6,8 +6,10 @@ Concepts ######## A standard user does not belong to a group. Orthos can manage its own user base. Additionally it can also connect to an -OIDC server and add OIDC users to its local database if successfully authenticated. By default the user cannot log -in to the admin dashboard, the necessary rights must be granted by an administrator over the admin dashboard. +OIDC server and add OIDC users to its local database if successfully authenticated. By default a user has no +administrative permissions; the necessary Django model permissions (e.g. to change enclosures or machines) must be +granted by an administrator via Groups or directly on the user. Superuser-only pages (Users, Groups, Systems, Server +Configuration, etc.) additionally require superuser status, which only an existing superuser can grant. It is possible to create a user without group membership. However, users should be added to the appropriate groups for easier administration and permissions. Administrative permissions are set in Orthos in such a way that everything is forbidden first, necessary rights must be set. @@ -20,9 +22,9 @@ Orthos in such a way that everything is forbidden first, necessary rights must b | granular administrative | --------------------------- | permissions |-----| Users | --------------------------- --------------------------- - | granular administrative | ------------------- - | permissions |-----| Admin Dashboard | - --------------------------- ------------------- + | granular administrative | ----------------------- + | permissions |-----| Administrative Pages | + --------------------------- ----------------------- Groups fields description @@ -36,10 +38,10 @@ Name of group. Please, use unique name. Permissions =========== -Detailed Orthos administration rights. Every user in the profile must have the blalbla enabled to login to the admin -dashboard. by the name of rights, rights are self-explanatory. +Detailed Orthos administration rights, granted to every member of the group. Rights that can be assigned are +self-explanatory. -Example: ``admin | log entry | Can add log entry, data | enclosure | Can add enclosure etc.`` +Example: ``data | enclosure | Can change enclosure, data | machine | Can change machine etc.`` Users fields description ######################## @@ -52,7 +54,9 @@ Name of user. Password ======== -User password, it must comply with password rules. +There is no password field when creating a user from this page. New accounts start with no usable password; +access is granted afterward by using the "Send password reset email" action on the user's detail page, or the user +can simply log in via OIDC if configured. Active ====== @@ -62,7 +66,8 @@ Designates whether this user should be treated as active. Unselect this instead Staff status ============ -Designates whether the user can log into this admin site. +A Django built-in flag, shown as a badge and filterable on the Users list. It is not currently used to gate access +to any Orthos 2 page — administrative pages are gated by superuser status and/or Django model permissions instead. Superuser status ================ @@ -72,13 +77,6 @@ Designates that this user has all permissions without explicitly assigning them. Groups ====== -Here users can be grouped and administrative rights can be assigned to individual groups. - -User permissions -================ - -Detailed Orthos administration rights. Every user in the profile must have the Staff status enabled to login to the -admin dashboard. Rights that can be assigned are self-explanatory. - -Example: ``admin | log entry | Can add log entry, data | enclosure | Can add enclosure etc.`` +Here users can be grouped and administrative rights can be assigned to individual groups. This is the only way to +grant a user model permissions from this page; individual (per-user) permissions are not editable here. diff --git a/docs/adminguide/machine.rst b/docs/adminguide/machine.rst index dee07fe67..7062e4c31 100644 --- a/docs/adminguide/machine.rst +++ b/docs/adminguide/machine.rst @@ -52,7 +52,7 @@ System (required) The type of system of the machine. -Example: VM, BMC, BareMetal, LPAR, Desctop, RemotePower etc. +Example: VM, BMC, BareMetal, LPAR, Desktop, RemotePower etc. Serial number/Product code/Device Type ======================================= @@ -214,13 +214,6 @@ is via telnet. Access to the console runs via the CScreen srever. Example: sconsole3.arch.suse.de -Device -====== - -Kernel device through which the output for the serial console runs. - -Example: ttyS0, ttyS1 etc. - Port ==== @@ -233,9 +226,20 @@ A free command can be entered here. Example: telnet sconsole3.arch.suse.de 2008 +Comment +======= + +Free-text comment for this serial console configuration. + REMOTE POWER description ######################## +Fence Agent +=========== + +The Remote Power Type (fence agent) used to control power for this machine. Available choices depend on whether the +machine is a BMC, a Hypervisor, or has a Remote Power Device assigned, see :doc:`remote_power_type`. + Remote power device =================== @@ -248,6 +252,11 @@ Port Network port for accessing the RemotePower. +Comment +======= + +Free-text comment for this remote power configuration. + Options ======= @@ -256,10 +265,11 @@ The option to append to the fence agents call. See individual fence agent for av Delete a machine ################ -To delete a machine, choose from the machine list and press 'Delete' at the bottom of the machine view. All related -information that is also deleted together with the machine object is displayed. Press ``Yes`` to confirm. For -administrative reasons, a copy of each deleted machine object is stored in the form of a file. The format (JSON, Yaml) -as well as the target directory can be set via the server configuration. +There is no "Delete" button for a machine in the web frontend; a machine can currently only be deleted via the API +(``DELETE`` command). All related sub-objects (network interfaces, BMC, serial console, remote power, annotations, +etc.) are deleted together with the machine. If the ``serialization.execute`` key is enabled (the default), a copy of +each deleted machine object is stored in the form of a file beforehand. The format (JSON, Yaml) as well as the target +directory can be set via the server configuration. Further configuration information can be found in the :ref:`admin-guide` (``serialization.*``). diff --git a/docs/adminguide/machine_groups.rst b/docs/adminguide/machine_groups.rst deleted file mode 100644 index 364f6598e..000000000 --- a/docs/adminguide/machine_groups.rst +++ /dev/null @@ -1,64 +0,0 @@ -************** -Machine Groups -************** - -Concepts -######## - -In Orthos it is possible to group machines. Users can be assigned to one or more machine groups. Only users assigned to -a group of machines can reserve and work with this set of machines. It is possible to assign different administrative -rights. - -.. code-block:: - - -------------------- - | Privileged Users | - -------------------- - | Users | - -------------------- ----------- - | | Machine | - | /----------- - ----------------- / - | Machine Group |----< - ----------------- \ - \----------- - | Machine | - ----------- - -Machine fields description -########################## - -Name (required) -=============== - -Name of the machine group. - -Comment -======= - -Comment about the machine group. - -DHCP filename -============= - -Path to the boot files on the TFTP server. - -Write DHCPv4 -============ - -Enable/disable writing a DHCPv4 file for this machine group. - -Write DHCPv6 -============ - -Enable/disable writing a DHCPv6 file for this machine group. - -Use machines architecture for setup -=================================== - -It is possible to set the setup settings of the associated machine architecture for the machine group. - -USER -==== - -Add/delete users to machine group and assign administrative rights. diff --git a/docs/adminguide/remote_power_device.rst b/docs/adminguide/remote_power_device.rst index 466595619..78bd8e286 100644 --- a/docs/adminguide/remote_power_device.rst +++ b/docs/adminguide/remote_power_device.rst @@ -20,6 +20,16 @@ MAC (required) The MAC address of the device. +Architecture (required) +======================== + +The CPU architecture of the power device. + +Domain (required) +================== + +The network domain the power device's FQDN belongs to. + Username (required) =================== @@ -33,8 +43,18 @@ The password to login to the remote power device. Fence Agent (required) ====================== -The fence agent used. This is a choice field that shows all Orthos 2 Remote Power Types that are available for the type -"rpower". +The fence agent used. This is a choice field that shows all Orthos 2 Remote Power Types that are available for the +device kind "Remote Power Device" (internal value ``rpowerdevice``). + +IPv4 Address +============ + +The IPv4 address of the power device, if any. + +IPv6 Address +============ + +The IPv6 address of the power device, if any. URL === diff --git a/docs/adminguide/server_configuration.rst b/docs/adminguide/server_configuration.rst index 78907d7a2..587a3f8ce 100644 --- a/docs/adminguide/server_configuration.rst +++ b/docs/adminguide/server_configuration.rst @@ -23,11 +23,11 @@ NETBOX_URL URL in the format of ``://:``. Specifies the NetBox instance used to retrieve data from. -Environment Variable: ``ORTHOS_NETBOX_URL`` +Environment Variable: ``ORTHOS2_NETBOX_URL`` Default: ``""`` (empty string) -Example: ``https://netbox.example.org`` +Example: ``https://netbox.orthos2.test`` NETBOX_TOKEN ============ @@ -40,10 +40,35 @@ Default: ``""`` (emtpy string) Example: ``1111111111aaaaaaaa22222222bbbbbbbb333333`` +NETBOX_AUTH_SCHEME +================== + +The HTTP authentication scheme used for the ``Authorization`` header sent with the ``NETBOX_TOKEN``. + +Environment Variable: ``ORTHOS2_NETBOX_AUTH_SCHEME`` + +Default: ``Bearer`` + ServerConfig ############ -The list of settings below can be modified at runtime in the Django Admin Interface. +The list of settings below can be modified at runtime via the Server Configuration page in the web frontend +(Administration → Server Configuration). + +``cobbler.prune.enabled`` +========================= + +Whether to prune orphaned Cobbler records (systems no longer known to Orthos) during Cobbler regeneration. + +Default: ``false`` + +``cobbler.prune.dryrun`` +======================== + +Whether Cobbler pruning only logs what would be removed instead of actually removing it. Only relevant if +``cobbler.prune.enabled`` is ``true``. + +Default: ``true`` ``domain.validendings`` ======================= @@ -53,9 +78,9 @@ Multiple endings can be separated by a comma. Leave empty if all domains should be accepted. -Default: ``example.de, example.com`` +Default: ``orthos2.test, sub.orthos2.test`` -Example: ``example.de, example.com, example.bayern`` +Example: ``orthos2.test, sub.orthos2.test, other.orthos2.test`` ``mail.from.address`` ===================== @@ -81,6 +106,16 @@ A whitespace after the prefix is recommended. Default: ``[ORTHOS]`` +``mail.validdomains`` +===================== + +List of valid domains for new users' email addresses on self-registration. Multiple domains can be separated by a +comma. + +No default; if this key is not configured, new-account email validation fails for every address. + +Example: ``orthos2.test, sub.orthos2.test`` + ``orthos.api.welcomemessage`` ============================= @@ -93,7 +128,7 @@ Default: blank The path to the online repo is set here. If errors occur in the Orthos code, they can be reported there. -Default: https://gitlab.suse.de/orthos-maintainers/orthos2/issues +Default: https://github.com/openSUSE/orthos2/issues ``orthos.configuration.inline.begin`` ===================================== @@ -139,7 +174,7 @@ Here you can activate or deactivate the writing of the machine installation file The path to the Orthos documentation. -Default: https://gitlab.suse.de/orthos-maintainers/orthos2/tree/development/docs +Default: https://github.com/openSUSE/orthos2/tree/master/docs ``orthos.web.welcomemessage`` ============================= @@ -158,20 +193,6 @@ Default password for remote power access. Default user for remote power access. -``remotepower.dominionpx.password`` -=================================== - -Password for remote Power Distribution Unit(Dominion PX) access. - -Default: xxxxxxx - -``remotepower.dominionpx.username.`` -==================================== - -User for remote Power Distribution Unit(Dominion PX) access. - -Default: orthos - ``remotepower.ipmi.command`` ============================ @@ -179,34 +200,6 @@ Path and command to power cycle over baseboard management controller (ipmitool). Default: ``/usr/bin/ipmitool -I lanplus -H {{ machine.bmc.fqdn }} -U {{ ipmi.user }} -P {{ ipmi.password }} power {{ action }}`` -``remotepower.ipmi.password`` -============================= - -Password for remote power access over baseboard management controller. - -Default: xxxxxxx - -``remotepower.ipmi.username`` -============================= - -User for remote power access over baseboard management controller. - -Default: oroot - -``remotepower.sentry.password`` -=============================== - -Password for remote Remote Power Manager(sentry) access. - -Default: xxxxxxx - -``remotepower.sentry.username`` -=============================== - -User for remote Remote Power Manager(sentry) access. - -Default: orthos - ``serialconsole.ipmi.password`` =============================== @@ -221,11 +214,19 @@ User for serial over LAN(SOL) over the baseboard management controller. Default: oroot +``serialization.execute`` +========================= + +Whether a copy of a machine object is stored as a file before it is deleted, see :doc:`machine` ("Delete a +machine"). + +Default: ``false`` (if unset, no backup is written) + ``serialization.output.directory`` ================================== Local directory where the machine object copies are stored after deleting a machine -(see [Machines](./adminguide/machine.md) for more information). +(see :ref:`machines` for more information). Default: ``/tmp`` @@ -280,6 +281,14 @@ Set the SSH connecting timeout (in seconds). Default: ``10`` +``ssh.use.systemuser`` +======================= + +Whether SSH connections to machines use the local system user's own SSH configuration (e.g. ssh-agent/``~/.ssh``) +instead of the key files configured in ``ssh.keys.paths``. + +Default: ``false`` + ``tasks.daily.executiontime`` ============================= @@ -287,6 +296,15 @@ Time at which the daily tasks are started. Must be in 24h format. Default: ``00:00`` +``virtualization.libvirt.bridge`` +================================== + +The network bridge on the libvirt host that new virtual machines are attached to. + +No default; VM creation fails with an error if this key is not configured. + +Example: ``br0`` + ``virtualization.libvirt.images.directory`` =========================================== diff --git a/docs/adminguide/setup_devel.rst b/docs/adminguide/setup_devel.rst index 79d95380e..b9c26dc61 100644 --- a/docs/adminguide/setup_devel.rst +++ b/docs/adminguide/setup_devel.rst @@ -45,10 +45,11 @@ Installation/Setup (Devel system) 6. Setting up the SSC credentials for docker: .. code-block:: - get a registration code from SUSE Customer Center - $ docker run --rm registry.suse.com/suse/sle15:latest bash -c \ - "zypper -n in SUSEConnect; SUSEConnect --regcode YOUR_REGISTRATION_CODE; \ - cat /etc/zypp/credentials.d/SCCcredentials" + + # get a registration code from SUSE Customer Center + $ docker run --rm registry.suse.com/suse/sle15:latest bash -c \ + "zypper -n in SUSEConnect; SUSEConnect --regcode YOUR_REGISTRATION_CODE; \ + cat /etc/zypp/credentials.d/SCCcredentials" (if you don't use Docker `click here for more information `__) diff --git a/docs/adminguide/systems_and_enclosures.rst b/docs/adminguide/systems_and_enclosures.rst index 2a2de9223..822c7d395 100644 --- a/docs/adminguide/systems_and_enclosures.rst +++ b/docs/adminguide/systems_and_enclosures.rst @@ -32,6 +32,16 @@ Virtual Use this if the system a virtual system (VM Gast). +Allow BMC +========= + +Whether a network interface can be assigned to a machine of this system to serve as its BMC. + +Allow Hypervisor +================ + +Whether machines of this system may be marked as a dedicated VM host and serve virtual machines. + Administrative ============== @@ -72,6 +82,12 @@ Description Since Enclosure is the generic term of a complete system, this should be as precise as possible. +Is Virtual +========== + +Whether the enclosure is a Virtual Machine or a Device in NetBox. Determines whether NetBox comparisons/fetches +treat it as a VM or a physical device. + NetBox ID ========= diff --git a/docs/img/userguide/00_architecture.png b/docs/img/userguide/00_architecture.png deleted file mode 100644 index 7c6ad6024..000000000 Binary files a/docs/img/userguide/00_architecture.png and /dev/null differ diff --git a/docs/img/userguide/01_login_screen.jpg b/docs/img/userguide/01_login_screen.jpg deleted file mode 100644 index fecf7f8e0..000000000 Binary files a/docs/img/userguide/01_login_screen.jpg and /dev/null differ diff --git a/docs/img/userguide/01_login_screen_built_in.png b/docs/img/userguide/01_login_screen_built_in.png new file mode 100644 index 000000000..d1403bdd0 Binary files /dev/null and b/docs/img/userguide/01_login_screen_built_in.png differ diff --git a/docs/img/userguide/01_login_screen_oidc.png b/docs/img/userguide/01_login_screen_oidc.png new file mode 100644 index 000000000..2e1faefcd Binary files /dev/null and b/docs/img/userguide/01_login_screen_oidc.png differ diff --git a/docs/img/userguide/02_landingpage.jpg b/docs/img/userguide/02_landingpage.jpg deleted file mode 100644 index 8652e9683..000000000 Binary files a/docs/img/userguide/02_landingpage.jpg and /dev/null differ diff --git a/docs/img/userguide/02_landingpage_admin.png b/docs/img/userguide/02_landingpage_admin.png new file mode 100644 index 000000000..08ed51aa2 Binary files /dev/null and b/docs/img/userguide/02_landingpage_admin.png differ diff --git a/docs/img/userguide/02_landingpage_user.png b/docs/img/userguide/02_landingpage_user.png new file mode 100644 index 000000000..2cdf93b41 Binary files /dev/null and b/docs/img/userguide/02_landingpage_user.png differ diff --git a/docs/img/userguide/03_sidebar_navigation.png b/docs/img/userguide/03_sidebar_navigation.png new file mode 100644 index 000000000..33f07c696 Binary files /dev/null and b/docs/img/userguide/03_sidebar_navigation.png differ diff --git a/docs/img/userguide/03_top_menu_overviews.png b/docs/img/userguide/03_top_menu_overviews.png deleted file mode 100644 index 2f1bb7f4d..000000000 Binary files a/docs/img/userguide/03_top_menu_overviews.png and /dev/null differ diff --git a/docs/img/userguide/04_arch_quickfilter.jpg b/docs/img/userguide/04_arch_quickfilter.jpg deleted file mode 100644 index 420273cfb..000000000 Binary files a/docs/img/userguide/04_arch_quickfilter.jpg and /dev/null differ diff --git a/docs/img/userguide/04_arch_quickfilter.png b/docs/img/userguide/04_arch_quickfilter.png new file mode 100644 index 000000000..ec84c776e Binary files /dev/null and b/docs/img/userguide/04_arch_quickfilter.png differ diff --git a/docs/img/userguide/05_machine_page.png b/docs/img/userguide/05_machine_page.png deleted file mode 100644 index 5c16f67de..000000000 Binary files a/docs/img/userguide/05_machine_page.png and /dev/null differ diff --git a/docs/img/userguide/05_machine_page_admin.png b/docs/img/userguide/05_machine_page_admin.png new file mode 100644 index 000000000..8e470b8e9 Binary files /dev/null and b/docs/img/userguide/05_machine_page_admin.png differ diff --git a/docs/img/userguide/05_machine_page_user.png b/docs/img/userguide/05_machine_page_user.png new file mode 100644 index 000000000..114d1e40f Binary files /dev/null and b/docs/img/userguide/05_machine_page_user.png differ diff --git a/docs/img/userguide/06_machine_infos.png b/docs/img/userguide/06_machine_infos.png deleted file mode 100644 index 01305f34d..000000000 Binary files a/docs/img/userguide/06_machine_infos.png and /dev/null differ diff --git a/docs/img/userguide/06_machine_infos_admin.png b/docs/img/userguide/06_machine_infos_admin.png new file mode 100644 index 000000000..12ebb941d Binary files /dev/null and b/docs/img/userguide/06_machine_infos_admin.png differ diff --git a/docs/img/userguide/06_machine_infos_user.png b/docs/img/userguide/06_machine_infos_user.png new file mode 100644 index 000000000..63b1ae0ca Binary files /dev/null and b/docs/img/userguide/06_machine_infos_user.png differ diff --git a/docs/img/userguide/09_machine_actions.png b/docs/img/userguide/09_machine_actions.png deleted file mode 100644 index 26a6876b5..000000000 Binary files a/docs/img/userguide/09_machine_actions.png and /dev/null differ diff --git a/docs/img/userguide/09_machine_actions_admin.png b/docs/img/userguide/09_machine_actions_admin.png new file mode 100644 index 000000000..dc8e45eab Binary files /dev/null and b/docs/img/userguide/09_machine_actions_admin.png differ diff --git a/docs/img/userguide/09_machine_actions_user.png b/docs/img/userguide/09_machine_actions_user.png new file mode 100644 index 000000000..b9c4852f1 Binary files /dev/null and b/docs/img/userguide/09_machine_actions_user.png differ diff --git a/docs/img/userguide/09_machine_actions_user_reserved.png b/docs/img/userguide/09_machine_actions_user_reserved.png new file mode 100644 index 000000000..ac0d39521 Binary files /dev/null and b/docs/img/userguide/09_machine_actions_user_reserved.png differ diff --git a/docs/img/userguide/10_machine_release.jpg b/docs/img/userguide/10_machine_release.jpg deleted file mode 100644 index bfae79d18..000000000 Binary files a/docs/img/userguide/10_machine_release.jpg and /dev/null differ diff --git a/docs/img/userguide/11_machine_virtual.jpg b/docs/img/userguide/11_machine_virtual.jpg deleted file mode 100644 index 6f4eaf1e3..000000000 Binary files a/docs/img/userguide/11_machine_virtual.jpg and /dev/null differ diff --git a/docs/img/userguide/11_machine_virtual.png b/docs/img/userguide/11_machine_virtual.png new file mode 100644 index 000000000..276f24e9f Binary files /dev/null and b/docs/img/userguide/11_machine_virtual.png differ diff --git a/docs/img/userguide/12_machine_virtual_gast.jpg b/docs/img/userguide/12_machine_virtual_gast.jpg deleted file mode 100644 index d76cf7953..000000000 Binary files a/docs/img/userguide/12_machine_virtual_gast.jpg and /dev/null differ diff --git a/docs/img/userguide/12_machine_virtual_guest.png b/docs/img/userguide/12_machine_virtual_guest.png new file mode 100644 index 000000000..0da05e2a6 Binary files /dev/null and b/docs/img/userguide/12_machine_virtual_guest.png differ diff --git a/docs/img/userguide/13_machine_add_netbox.png b/docs/img/userguide/13_machine_add_netbox.png index 51143d68b..5a7c022f3 100644 Binary files a/docs/img/userguide/13_machine_add_netbox.png and b/docs/img/userguide/13_machine_add_netbox.png differ diff --git a/docs/img/userguide/14_enclosure_view_list.png b/docs/img/userguide/14_enclosure_view_list.png index 4b87eb098..7ba9d5ba0 100644 Binary files a/docs/img/userguide/14_enclosure_view_list.png and b/docs/img/userguide/14_enclosure_view_list.png differ diff --git a/docs/img/userguide/15_enclosure_add.png b/docs/img/userguide/15_enclosure_add.png index 8b33ca172..25eaa4d90 100644 Binary files a/docs/img/userguide/15_enclosure_add.png and b/docs/img/userguide/15_enclosure_add.png differ diff --git a/docs/img/userguide/20_netboxcomparison_list_view.png b/docs/img/userguide/20_netboxcomparison_list_view.png index d159321b0..06980d7b5 100644 Binary files a/docs/img/userguide/20_netboxcomparison_list_view.png and b/docs/img/userguide/20_netboxcomparison_list_view.png differ diff --git a/docs/img/userguide/21_netboxcomparison_detail_view.png b/docs/img/userguide/21_netboxcomparison_detail_view.png index 4e3d2de8a..cb10dd6d2 100644 Binary files a/docs/img/userguide/21_netboxcomparison_detail_view.png and b/docs/img/userguide/21_netboxcomparison_detail_view.png differ diff --git a/docs/img/userguide/22_netboxcomparison_quick_filter.png b/docs/img/userguide/22_netboxcomparison_quick_filter.png new file mode 100644 index 000000000..31f803d97 Binary files /dev/null and b/docs/img/userguide/22_netboxcomparison_quick_filter.png differ diff --git a/docs/img/userguide/23_advanced_search.png b/docs/img/userguide/23_advanced_search.png new file mode 100644 index 000000000..a2e56cd3c Binary files /dev/null and b/docs/img/userguide/23_advanced_search.png differ diff --git a/docs/img/userguide/24_manufacturers.png b/docs/img/userguide/24_manufacturers.png new file mode 100644 index 000000000..eb97dd35b Binary files /dev/null and b/docs/img/userguide/24_manufacturers.png differ diff --git a/docs/img/userguide/25_devicetypes.png b/docs/img/userguide/25_devicetypes.png new file mode 100644 index 000000000..94029f7cd Binary files /dev/null and b/docs/img/userguide/25_devicetypes.png differ diff --git a/docs/img/userguide/26_statistics_numbers.png b/docs/img/userguide/26_statistics_numbers.png new file mode 100644 index 000000000..ed73e6b26 Binary files /dev/null and b/docs/img/userguide/26_statistics_numbers.png differ diff --git a/docs/img/userguide/27_statistics_charts.png b/docs/img/userguide/27_statistics_charts.png new file mode 100644 index 000000000..8cb2d58f8 Binary files /dev/null and b/docs/img/userguide/27_statistics_charts.png differ diff --git a/docs/img/userguide/28_administrative_machines.png b/docs/img/userguide/28_administrative_machines.png new file mode 100644 index 000000000..f89d5caa3 Binary files /dev/null and b/docs/img/userguide/28_administrative_machines.png differ diff --git a/docs/img/userguide/29_remote_power_devices.png b/docs/img/userguide/29_remote_power_devices.png new file mode 100644 index 000000000..f028e1cc7 Binary files /dev/null and b/docs/img/userguide/29_remote_power_devices.png differ diff --git a/docs/img/userguide/30_ansible_results.png b/docs/img/userguide/30_ansible_results.png new file mode 100644 index 000000000..580767def Binary files /dev/null and b/docs/img/userguide/30_ansible_results.png differ diff --git a/docs/img/userguide/31_serial_console_types.png b/docs/img/userguide/31_serial_console_types.png new file mode 100644 index 000000000..2b08d2c5f Binary files /dev/null and b/docs/img/userguide/31_serial_console_types.png differ diff --git a/docs/img/userguide/32_systems.png b/docs/img/userguide/32_systems.png new file mode 100644 index 000000000..d2e226be7 Binary files /dev/null and b/docs/img/userguide/32_systems.png differ diff --git a/docs/img/userguide/33_remote_power_types.png b/docs/img/userguide/33_remote_power_types.png new file mode 100644 index 000000000..6737bfe21 Binary files /dev/null and b/docs/img/userguide/33_remote_power_types.png differ diff --git a/docs/img/userguide/34_architectures.png b/docs/img/userguide/34_architectures.png new file mode 100644 index 000000000..0f00c93a1 Binary files /dev/null and b/docs/img/userguide/34_architectures.png differ diff --git a/docs/img/userguide/35_server_configuration.png b/docs/img/userguide/35_server_configuration.png new file mode 100644 index 000000000..9d713df95 Binary files /dev/null and b/docs/img/userguide/35_server_configuration.png differ diff --git a/docs/img/userguide/36_single_tasks.png b/docs/img/userguide/36_single_tasks.png new file mode 100644 index 000000000..9b6031e92 Binary files /dev/null and b/docs/img/userguide/36_single_tasks.png differ diff --git a/docs/img/userguide/37_daily_tasks.png b/docs/img/userguide/37_daily_tasks.png new file mode 100644 index 000000000..51379a5bd Binary files /dev/null and b/docs/img/userguide/37_daily_tasks.png differ diff --git a/docs/img/userguide/38_domains.png b/docs/img/userguide/38_domains.png new file mode 100644 index 000000000..4b4e0fbd0 Binary files /dev/null and b/docs/img/userguide/38_domains.png differ diff --git a/docs/img/userguide/38_domains_detail.png b/docs/img/userguide/38_domains_detail.png new file mode 100644 index 000000000..cf8e7042b Binary files /dev/null and b/docs/img/userguide/38_domains_detail.png differ diff --git a/docs/img/userguide/39_users.png b/docs/img/userguide/39_users.png new file mode 100644 index 000000000..d6a84c584 Binary files /dev/null and b/docs/img/userguide/39_users.png differ diff --git a/docs/img/userguide/40_tokens.png b/docs/img/userguide/40_tokens.png new file mode 100644 index 000000000..4702911e0 Binary files /dev/null and b/docs/img/userguide/40_tokens.png differ diff --git a/docs/img/userguide/41_groups.png b/docs/img/userguide/41_groups.png new file mode 100644 index 000000000..bc8ae5cc9 Binary files /dev/null and b/docs/img/userguide/41_groups.png differ diff --git a/docs/img/userguide/42_oidc_diagnostics.png b/docs/img/userguide/42_oidc_diagnostics.png new file mode 100644 index 000000000..a321c807f Binary files /dev/null and b/docs/img/userguide/42_oidc_diagnostics.png differ diff --git a/docs/userguide.rst b/docs/userguide.rst index a2ed0abbd..a6e23c321 100644 --- a/docs/userguide.rst +++ b/docs/userguide.rst @@ -14,3 +14,22 @@ GUI. Enclosure Page NetBox Comparison Page Machine Add + Advanced Search + Manufacturers + Device Types + Statistics + Administrative Machines + Remote Power Devices + Ansible Results + Serial Console Types + Systems + Remote Power Types + Architectures + Server Configuration + Single Tasks + Daily Tasks + Domains + Users + Tokens + Groups + OIDC Diagnostics diff --git a/docs/userguide/administrative_machines.rst b/docs/userguide/administrative_machines.rst new file mode 100644 index 000000000..ad7a94d8a --- /dev/null +++ b/docs/userguide/administrative_machines.rst @@ -0,0 +1,14 @@ +**************************************** +Administrative Machines +**************************************** + +.. note:: This page is only visible to you if you have administrator rights. + +The Administrative Machines page lists machines that are flagged as administrative, either directly (the machine's +own "Administrative" flag) or because their System type is administrative, see :doc:`systems`. Administrative +machines are excluded from all other machine overviews for non-superusers, and cannot be installed or reserved. + +.. image:: ../img/userguide/28_administrative_machines.png + :alt: Orthos2 Administrative Machines List + +The list uses the same columns and quick filters as the other machine overviews, see :doc:`landing_page`. diff --git a/docs/userguide/advanced_search.rst b/docs/userguide/advanced_search.rst new file mode 100644 index 000000000..1105d57a4 --- /dev/null +++ b/docs/userguide/advanced_search.rst @@ -0,0 +1,22 @@ +**************************************** +Advanced Search +**************************************** + +The Advanced Search page lets you filter machines by a wide range of hardware, software and status criteria at +once, beyond what the Quick Filters on the machine list pages offer. + +.. image:: ../img/userguide/23_advanced_search.png + :alt: Orthos2 Advanced Search Form + +You can search by: + +- Manufacturer, Device Type (including Cartridge/Blade type), System, Architecture +- FQDN, CPU model, CPU flags, CPU cores (with a >, = or < comparison), RAM amount (with a >, = or < comparison) +- Hardware/software scan output: ``hwinfo``, ``dmidecode``, ``dmesg``, ``lspci``, ``lsmod`` +- Installed distribution +- Whether the machine is reserved, has IPMI, has EFI, has a serial console or has a remote power device configured +- Network interface MAC address +- Ping, SSH and Login status + +Search results are shown using the same machine list you already know from the other machine overviews, see +:doc:`landing_page`. diff --git a/docs/userguide/ansible_results.rst b/docs/userguide/ansible_results.rst new file mode 100644 index 000000000..9a3853af7 --- /dev/null +++ b/docs/userguide/ansible_results.rst @@ -0,0 +1,17 @@ +**************************************** +Ansible Results +**************************************** + +.. note:: This page is only visible to you if you have administrator rights. + +The Ansible Results page lists the results of Ansible checks that have been run against machines. + +.. image:: ../img/userguide/30_ansible_results.png + :alt: Orthos2 Ansible Results List + +- Machine: The machine the check was run against. +- Run Date: When the check was executed. +- Ansible Version: The Ansible version used for the run. + +You can filter by machine, a date range, or search by machine FQDN. Results can be deleted individually or in bulk, +or re-applied to a machine. diff --git a/docs/userguide/architectures.rst b/docs/userguide/architectures.rst new file mode 100644 index 000000000..7e6735b95 --- /dev/null +++ b/docs/userguide/architectures.rst @@ -0,0 +1,18 @@ +**************************************** +Architectures +**************************************** + +.. note:: This page is only visible to you if you have administrator rights. + +Architectures represent the CPU architectures known to Orthos 2 (e.g. x86_64, aarch64, s390x). This page lists the +configured architectures. + +.. image:: ../img/userguide/34_architectures.png + :alt: Orthos2 Architectures List + +- Name: The architecture's name. +- DHCP Filename: The PXE boot filename served for this architecture. +- Machines: Number of machines using this architecture. + +An architecture that is still in use by a machine cannot be deleted. See :doc:`../adminguide/architectures` for the +full field reference. diff --git a/docs/userguide/daily_tasks.rst b/docs/userguide/daily_tasks.rst new file mode 100644 index 000000000..b421ec4e3 --- /dev/null +++ b/docs/userguide/daily_tasks.rst @@ -0,0 +1,18 @@ +**************************************** +Daily Tasks +**************************************** + +.. note:: This page is only visible to you if you have administrator rights. + +Daily Tasks are recurring background jobs processed by the Orthos 2 Taskmanager on a schedule. This page lists and +manages them. + +.. image:: ../img/userguide/37_daily_tasks.png + :alt: Orthos2 Daily Tasks List + +- Name: The task's name. +- Module: The Python module implementing the task. +- Enabled: Whether the task is currently scheduled to run. +- Running: Whether the task is currently executing. + +You can force a task to run on its next poll, enable/disable it, or clear a stuck "Running" flag from this page. diff --git a/docs/userguide/devicetypes.rst b/docs/userguide/devicetypes.rst new file mode 100644 index 000000000..edd615ed3 --- /dev/null +++ b/docs/userguide/devicetypes.rst @@ -0,0 +1,19 @@ +**************************************** +Device Types +**************************************** + +The Device Types page lists every hardware device type known to Orthos 2, most of which are synchronized from +NetBox. + +.. image:: ../img/userguide/25_devicetypes.png + :alt: Orthos2 Device Types List + +- Name: The device type's name. +- Manufacturer: The manufacturer this device type belongs to. +- Cartridge/Blade: Whether this device type is a cartridge or blade system. +- NetBox ID: The linked NetBox object, if any. + +You can filter the list by name, or by whether a device type is linked to NetBox. + +Administrators can add, edit or delete a device type. Once a device type is linked to NetBox, its name and +description can no longer be edited manually. diff --git a/docs/userguide/domains.rst b/docs/userguide/domains.rst new file mode 100644 index 000000000..0243b12c8 --- /dev/null +++ b/docs/userguide/domains.rst @@ -0,0 +1,25 @@ +**************************************** +Domains +**************************************** + +.. note:: This page is only visible to you if you have administrator rights. + +Domains represent the network domains Orthos 2 manages, including their Cobbler/TFTP servers, IP ranges and DNS +settings. This page lists them. + +.. image:: ../img/userguide/38_domains.png + :alt: Orthos2 Domains List + +- Name: The domain's name. +- IPv4 / IPv6: The domain's configured IP ranges. +- Machines: Number of machines in this domain. + +Clicking a domain's name opens its detail page, showing the full field reference (Cobbler/TFTP/CScreen servers, +IPv4/IPv6 ranges and whether they're enabled, dynamic ranges, and machine count) alongside Edit and Delete actions, +plus a "Supported Architectures" tab for per-domain architecture settings. + +.. image:: ../img/userguide/38_domains_detail.png + :alt: Orthos2 Domain Detail View + +A domain that is still in use by a machine cannot be deleted. See :doc:`../adminguide/domains` for the full field +reference. diff --git a/docs/userguide/enclosure_page.rst b/docs/userguide/enclosure_page.rst index a27f2ef3f..39e328712 100644 --- a/docs/userguide/enclosure_page.rst +++ b/docs/userguide/enclosure_page.rst @@ -12,9 +12,10 @@ List View .. image:: ../img/userguide/14_enclosure_view_list.png :alt: Orthos2 Enclosure List View -This page will show a list of all enclosures and allow you to delete individual servers if desired. The quick filter -allows you to display only servers of a specific Device Type. The green plus button on the top right can be used to -navigate to the add view. +This page will show a list of all enclosures and allow you to delete individual enclosures if desired (deleting an +enclosure also deletes its linked machines). The quick filter allows you to search by name or display only +enclosures of a specific Device Type. The green plus button on the top right can be used to navigate to the add +view. Add View ######## @@ -22,8 +23,9 @@ Add View .. image:: ../img/userguide/15_enclosure_add.png :alt: Orthos2 Add Enclosure -The add view is reused to edit enclosures as well and takes the name, NetBox ID and optionally a Device Type and -Description. In case the NetBox ID is different to zero, Orthos 2 will try to fetch the location and description from +The add view is reused to edit enclosures as well and takes the name, NetBox ID, "Is Virtual" flag and optionally a +Device Type and Description. "Is Virtual" tells Orthos 2 whether to fetch this enclosure from NetBox as a Virtual +Machine or as a physical Device. In case the NetBox ID is different to zero, Orthos 2 will try to fetch the location and description from a NetBox "Device" object. In case the containing Orthos 2 Machines are NetBox "Virtual Machines", please use the ID of the NetBox "Device" which hosts the cluster. If a NetBox Virtual Machine Cluster consists of multiple host nodes, this mapping will not make sense anymore and it is better to leave the NetBox ID at its default of zero. @@ -37,8 +39,8 @@ Overview .. image:: ../img/userguide/16_enclosure_overview.png :alt: Orthos2 Enclosure Overview Details -Here the name, Device Type, description and location can be seen. On the bottom of the tab the link for the HTTP API and -Django Admin can be seen. +Here the name, Device Type, description and location can be seen. On the bottom of the tab the link for the HTTP API +can be seen. Actions ======= diff --git a/docs/userguide/general.rst b/docs/userguide/general.rst index 2558dc388..8f238d3c3 100644 --- a/docs/userguide/general.rst +++ b/docs/userguide/general.rst @@ -17,26 +17,37 @@ tasks: - reboot the machines remotely and - managing remote consoles. -This document describes the usage. For implementation specific notes, please refer to the “Developer’s Guide”. However, -sometimes this document describes some aspects of the implementation simply to let the user better understand why things -work as they do. All users of Orthos have a very technical background. +This document describes the usage. Sometimes this document describes some aspects of the implementation simply to let +the user better understand why things work as they do. All users of Orthos have a very technical background. Architecture ############ -.. image:: ../img/userguide/00_architecture.png - :alt: Orthos2 High-Level Architecture +.. code-block:: text -Image Overall Architecture shows the overall architecture. All data is kept in the database. The Orthos Server is the + +--------------------------------------------+ + | | + | +--------------+ +----------------+ | + | | Database |<----| Orthos Server | | + | +--------------+ +----------------+ | + | ^ ^ | + | | | | + | | +------------+ | | + | +-----| Orthos Web |--+ | + | +------------+ | + | | + +--------------------------------------------+ + +The diagram above shows the overall architecture. All data is kept in the database. The Orthos Server is the central component of Orthos. It has the following tasks: - gathering machine data, - communicating with the clients, - executing jobs such as rebooting or installating the machine or syncing some files. -There is the web UI for simple tasks. For more complex opperations, please use the API. +There is the web UI for simple tasks. For more complex operations, please use the API. Web Client ########## @@ -57,10 +68,20 @@ You can: - Report Problems for each machine - Get an overview of the reservation history -If administrative rights are required, they must be set up by an Orthos administrator. Below a screenshot of the login -page. +If administrative rights are required, they must be set up by an Orthos administrator. + +Login +===== + +Most users authenticate via OIDC by clicking "Login with Authentik": + +.. image:: ../img/userguide/01_login_screen_oidc.png + :alt: Orthos2 OIDC Login Screen .. note:: Account creation and password restoration may be disabled in case OIDC authentication is configured. -.. image:: ../img/userguide/01_login_screen.jpg - :alt: Orthos2 Login Screen +Power users who maintain a local-only Orthos account (not backed by the OIDC provider) can reach the built-in login +form by appending ``?builtin=true`` to the login page URL: + +.. image:: ../img/userguide/01_login_screen_built_in.png + :alt: Orthos2 Built-in Login Screen diff --git a/docs/userguide/groups.rst b/docs/userguide/groups.rst new file mode 100644 index 000000000..ac47e359c --- /dev/null +++ b/docs/userguide/groups.rst @@ -0,0 +1,16 @@ +**************************************** +Groups +**************************************** + +.. note:: This page is only visible to you if you have administrator rights. + +The Groups page lets administrators manage permission groups and assign granular administrative rights to them. + +.. image:: ../img/userguide/41_groups.png + :alt: Orthos2 Groups List + +- Name: The group's name. +- Permissions: The number of permissions assigned to this group. + +Users can be added to groups from their own detail page under :doc:`users`. See +:doc:`../adminguide/groups_and_users` for background on the permission model. diff --git a/docs/userguide/landing_page.rst b/docs/userguide/landing_page.rst index 186c73e80..366212774 100644 --- a/docs/userguide/landing_page.rst +++ b/docs/userguide/landing_page.rst @@ -5,34 +5,72 @@ Landing Page After logging in you will be redirected to the Orthos landing page. Here you will find a direct overview of all machines that are available in Orthos. -.. image:: ../img/userguide/02_landingpage.jpg - :alt: Orthos2 Landing Page +.. image:: ../img/userguide/02_landingpage_user.png + :alt: Orthos2 Landing Page (regular user) -Navigation Bar -############## +Administrators see a few additional entries in the sidebar, and an "Add Machine" button above the machine table: -Here different possibilities are available to get to machines or to get an entire machine status. +.. image:: ../img/userguide/02_landingpage_admin.png + :alt: Orthos2 Landing Page (administrator) -.. image:: ../img/userguide/03_top_menu_overviews.png - :alt: Orthos2 Top Menu Overview +Sidebar Navigation +################## + +.. image:: ../img/userguide/03_sidebar_navigation.png + :alt: Orthos2 Sidebar Navigation (administrator, all entries expanded) + :align: right + +The sidebar on the left gives access to the different machine overviews and tools: - All Machines: Overview of all machines that are available in Orthos. -- Free Machines: Overview of all machines that are available in Orthos. +- Free Machines: Overview of all machines that are currently not reserved and not a dedicated VM host. - My Machines: Overview of all Orthos machines reserved under your name. - Virtual Machines: Overview of all virtual machines. (Host and Guest) -- Advanced Search: Advanced machine search. -- Statistics: Statistics about the machines located in Orthos. -- Add Machine: Add a machine directly from NetBox. (Only visible with Admin Permissions.) +- :doc:`advanced_search`: Advanced machine search. +- :doc:`manufacturers`: Overview of the known hardware manufacturers. +- :doc:`devicetypes`: Overview of the known device types. +- :doc:`statistics`: Statistics about the machines located in Orthos. +- Documentation / API Documentation: Links to this documentation and the REST API documentation. +- REST API: Browsable REST API. + +Administrators additionally see: + +- :doc:`administrative_machines`: Overview of machines flagged for administrative purposes. (Only visible with Admin + Permissions.) - NetBox Comparisons: Check the comparison logs between Orthos 2 and NetBox. (Only visible with Admin Permissions.) -- Enclosures: Create, View, Edit and Delete Enclosures of Orthos 2. (Only visible with Admin Permissions.) + See :doc:`netbox_comparison_page`. +- Enclosures: Create, View, Edit and Delete Enclosures of Orthos 2. (Only visible with Admin Permissions.) See + :doc:`enclosure_page`. +- :doc:`remote_power_devices`: Overview of the configured Remote Power Devices. (Only visible with Admin + Permissions.) +- :doc:`ansible_results`: Overview of Ansible run results. (Only visible with Admin Permissions.) +- Administration: A collapsible menu section (not the Django administration backend) that expands in place to reveal + further administrative pages. (Only visible with Admin Permissions.) It links to: + + - :doc:`serial_console_types` + - :doc:`systems` + - :doc:`remote_power_types` + - :doc:`architectures` + - :doc:`server_configuration` + - :doc:`single_tasks` + - :doc:`daily_tasks` + - :doc:`domains` + - :doc:`users` + - :doc:`tokens` + - :doc:`groups` + - :doc:`oidc_diagnostics` + +The "Add Machine" button above the machine table lets administrators add a machine directly from NetBox, see +:doc:`machine_add`. Quick Filters ############# -.. image:: ../img/userguide/04_arch_quickfilter.jpg - :alt: Orthos2 Architecture Quickfilter +.. image:: ../img/userguide/04_arch_quickfilter.png + :alt: Orthos2 Quick Filters -- x86_64, unspecified, embedded, s390x, ppc64le etc: Sorting by architecture -- Ping, SSH and Login: Sort by availability status. -- All Network Domains: Sort by network domain. -- All Machine Groups: Overview and sorting of machines in the respective machine group. +- All Architectures: Filter machines by architecture (x86_64, embedded, s390x, ppc64le, etc.). +- Ping, SSH and Login: Filter by availability status. +- All Network Domains: Filter by network domain. +- NetBox Synchronized: Filter by whether the machine is synchronized with NetBox. +- FQDN Search: Search machines by (partial) FQDN. diff --git a/docs/userguide/machine_add.rst b/docs/userguide/machine_add.rst index cee874187..0904b0fa8 100644 --- a/docs/userguide/machine_add.rst +++ b/docs/userguide/machine_add.rst @@ -2,8 +2,8 @@ Machine Add *********** -.. note:: The tab "Add Machine" can only be used for people with administrative capabilities. For this to work a NetBox - instance has to be connected to Orthos 2 beforehand in the backend. +.. note:: The "Add Machine" button (shown above the machine table) can only be used by administrators. For this to + work a NetBox instance has to be connected to Orthos 2 beforehand in the backend. .. image:: ../img/userguide/13_machine_add_netbox.png :alt: Orthos2 Machine Add with NetBox diff --git a/docs/userguide/machine_page.rst b/docs/userguide/machine_page.rst index 4683fa952..6d9286e5c 100644 --- a/docs/userguide/machine_page.rst +++ b/docs/userguide/machine_page.rst @@ -6,19 +6,28 @@ Each machine (machine object) has its own page here you have the possibility to machine, to request the status of a machine, to have machines scanned, to install the machine with a new OS, to open error tickets and to write annotations to the machines. -.. image:: ../img/userguide/05_machine_page.png - :alt: Orthos2 Machine Overview Page +.. image:: ../img/userguide/05_machine_page_user.png + :alt: Orthos2 Machine Overview Page (regular user) -Navigation Bar -############## +Administrators see additional tabs and actions, such as editing the machine, power control, and NetBox/Cobbler +maintenance actions: -.. image:: ../img/userguide/06_machine_infos.png - :alt: Orthos2 Machine Details Tabs +.. image:: ../img/userguide/05_machine_page_admin.png + :alt: Orthos2 Machine Overview Page (administrator) + +Tabs +#### + +.. image:: ../img/userguide/06_machine_infos_admin.png + :alt: Orthos2 Machine Details Tabs (administrator) - Overview: The most important information about a machine, information about the status, possibility to scan the machine, to reinstall, to report errors and to write annotations. -- CPU, Network, Installation, PCI, USB, SCSI, Miscellaneous and Reservation History: Detailed information on the - Subitems. +- CPU, Network, Serial Console, Remote Power, Installations, PCI, USB, SCSI, Miscellaneous and Reservation History: + Detailed information on the respective subitem. +- Virtualization: Shown for dedicated VM hosts with a virtualization API configured; lists the host's VM guests. +- Cobbler Cleanup: Shown for machines serving as a Cobbler server; lets you clean up stale Cobbler records. +- Ansible Results: Results of the Ansible checks run against the machine. (Only visible with Admin Permissions.) - NetBox Comparison: This page compares the data between Orthos 2 and NetBox. (Only visible with Admin Permissions.) Status @@ -44,28 +53,42 @@ Additional machine information should be entered here. For example, upgrades, ha Machine Actions ############### -.. image:: ../img/userguide/09_machine_actions.png - :alt: Orthos2 Machine Overview - Crop on Actions +Before reserving a machine, a regular user only sees the Reserve Machine and Report Problem actions: + +.. image:: ../img/userguide/09_machine_actions_user.png + :alt: Orthos2 Machine Overview - Crop on Actions (regular user, unreserved) -- Reserve Machines: Here it is possible to reserve a machine under your name. In general, make sure that machines are +- Reserve Machine: Here it is possible to reserve a machine under your name. In general, make sure that machines are only reserved for as long as you actually need them. A maximum of 90 days is planned. Please remember that other users may also need the machine. If you need a machine for a longer period of time, only an Orthos administrator can make reservations under your name for longer time periods, up to infinite for constant machine assignment. -- Rescan Status: Rescan the status information of a machine. -- Rescan All: Rescan all information of a machine. -- Rescan Installations: Resacan the installation status of a machine. -- Rescan Network Interfaces: Rescan the machine network interfaces. -- Fetch NetBox: Fetch all data from NetBox and overwrite machine data in Orthos 2. (Only visible with Admin - Permissions.) -- Setup Machine: Here you can install your machine according to your needs. You have the possibility to install SLES, - SLED, Opensuse Leap, Opensuse and Tumbleweed. During the installation you have several options: install, install ssh - install ssh auto, install auto etc. -- Queue SOL Deactivation: For machines with IPMI serial consoles, this action queues a background task to deactivate - Serial-over-LAN (SOL) via the configured serial console server. - Report Problem: If you unexpectedly encounter a problem with the machine, you can create a support ticket here. -.. image:: ../img/userguide/10_machine_release.jpg - :alt: Orthos2 Machine Overview - Crop on Release & Extend Reservation +Once you have reserved the machine yourself, several more actions become available: + +.. image:: ../img/userguide/09_machine_actions_user_reserved.png + :alt: Orthos2 Machine Overview - Crop on Actions (regular user, reserved by you) -- Release Machine: This field is only for machines that are reserved under your name. Here you have the possibility to - release the machine for other users. +- Extend Reservation: Extend your existing reservation. +- Release Machine: Release the machine again so other users may reserve it. +- Rescan Status: Rescan the status information of a machine. +- Rescan All: Rescan all information of a machine. +- Rescan Installations: Rescan the installation status of a machine. +- Power On, Power Off, Reboot, Check Power Status: Control and query the machine's remote power state. +- Fetch NetBox, Setup Machine: Available to you too while the machine is reserved under your name; each is enabled + based on the machine's own state (whether it has a NetBox ID, and whether it supports the "Setup Machine" + workflow) rather than on your permissions. + +Administrators see all actions enabled, plus a few administrator-only ones, regardless of who has the machine +reserved: + +.. image:: ../img/userguide/09_machine_actions_admin.png + :alt: Orthos2 Machine Overview - Crop on Actions (administrator) + +- Edit Machine: Edit the machine's fields directly. +- Fetch NetBox: Fetch all data from NetBox and overwrite machine data in Orthos 2. +- Setup Machine: Here you can install your machine according to your needs. You have the possibility to install SLES, + SLED, openSUSE Leap and openSUSE Tumbleweed. During the installation you have several options: install, install ssh + install ssh auto, install auto etc. +- Regenerate MOTD: Regenerate the machine's message of the day. +- Regenerate Cobbler Record: Regenerate the machine's Cobbler configuration. diff --git a/docs/userguide/manufacturers.rst b/docs/userguide/manufacturers.rst new file mode 100644 index 000000000..54d730b1a --- /dev/null +++ b/docs/userguide/manufacturers.rst @@ -0,0 +1,18 @@ +**************************************** +Manufacturers +**************************************** + +The Manufacturers page lists every hardware manufacturer known to Orthos 2, most of which are synchronized from +NetBox. + +.. image:: ../img/userguide/24_manufacturers.png + :alt: Orthos2 Manufacturers List + +- Name: The manufacturer's name. +- NetBox ID: The linked NetBox object, if any. +- Device Types: Link to the Device Types belonging to this manufacturer. + +You can filter the list by name, or by whether a manufacturer is linked to NetBox. + +Administrators can add, edit or delete a manufacturer. Once a manufacturer is linked to NetBox, its name can no +longer be edited manually. diff --git a/docs/userguide/netbox_comparison_page.rst b/docs/userguide/netbox_comparison_page.rst index bc7bc9b08..344ab1f17 100644 --- a/docs/userguide/netbox_comparison_page.rst +++ b/docs/userguide/netbox_comparison_page.rst @@ -14,14 +14,24 @@ List View ######### .. image:: ../img/userguide/20_netboxcomparison_list_view.png - :alt: Orthos2 Enclosure List View + :alt: Orthos2 NetBox Comparison List View This page provides a list of comparison runs between Orthos 2 and NetBox. +Quick Filter +############ + +.. image:: ../img/userguide/22_netboxcomparison_quick_filter.png + :alt: Orthos2 NetBox Comparison Quick Filter + +- All Object Types: Filter comparisons by object type (machine, network_interface, enclosure, etc.). +- From / To: Filter comparisons by the date range they were run in. +- Object Name Search: Search comparisons by (partial) object name. + Detail View ########### .. image:: ../img/userguide/21_netboxcomparison_detail_view.png - :alt: Orthos2 Enclosure List View + :alt: Orthos2 NetBox Comparison Detail View This page provides a detail view of a single comparison for a single object. diff --git a/docs/userguide/oidc_diagnostics.rst b/docs/userguide/oidc_diagnostics.rst new file mode 100644 index 000000000..25e5c7e85 --- /dev/null +++ b/docs/userguide/oidc_diagnostics.rst @@ -0,0 +1,14 @@ +**************************************** +OIDC Diagnostics +**************************************** + +.. note:: This page is only visible to you if you have administrator rights. + +OIDC Diagnostics is a read-only troubleshooting page for the OIDC login handshake. It shows the bookkeeping tables +used internally during authentication and isn't otherwise used by Orthos 2. + +.. image:: ../img/userguide/42_oidc_diagnostics.png + :alt: Orthos2 OIDC Diagnostics + +- Associations: Server URL, Handle, Assoc Type, Issued and Lifetime for each OIDC association. +- Nonces: Server URL, Timestamp and Salt for each OIDC nonce. diff --git a/docs/userguide/remote_power_devices.rst b/docs/userguide/remote_power_devices.rst new file mode 100644 index 000000000..934374c5e --- /dev/null +++ b/docs/userguide/remote_power_devices.rst @@ -0,0 +1,19 @@ +**************************************** +Remote Power Devices +**************************************** + +.. note:: This page is only visible to you if you have administrator rights. + +Remote Power Devices are shared power distribution units (PDUs) or similar devices that control power for multiple +machines. This page lists the ones known to Orthos 2. + +.. image:: ../img/userguide/29_remote_power_devices.png + :alt: Orthos2 Remote Power Devices List + +- FQDN: The remote power device's FQDN. +- NetBox ID: The linked NetBox object, if any. +- Machines: Number of machines whose power is controlled by this device. + +Adding a device requires its FQDN (which must match the corresponding NetBox device's name), its NetBox ID, and +login credentials and URL; IP addresses, MAC address, fence agent and architecture are then fetched automatically +from NetBox. See :doc:`../adminguide/remote_power_device` for background on the underlying model. diff --git a/docs/userguide/remote_power_types.rst b/docs/userguide/remote_power_types.rst new file mode 100644 index 000000000..4487e17f4 --- /dev/null +++ b/docs/userguide/remote_power_types.rst @@ -0,0 +1,18 @@ +**************************************** +Remote Power Types +**************************************** + +.. note:: This page is only visible to you if you have administrator rights. + +Remote Power Types describe the fence agent used to control power for a given device kind (BMC, Remote Power +Device, or Hypervisor). This page lists the configured types. + +.. image:: ../img/userguide/33_remote_power_types.png + :alt: Orthos2 Remote Power Types List + +- Name: The remote power type's name. +- Device: Which kind of device this type applies to (BMC, Remote Power Device, or Hypervisor). +- Devices: Number of devices using this type. + +You can filter the list by device kind. See :doc:`../adminguide/remote_power_type` for the fence agent concepts and +field reference. diff --git a/docs/userguide/serial_console_types.rst b/docs/userguide/serial_console_types.rst new file mode 100644 index 000000000..aef956e48 --- /dev/null +++ b/docs/userguide/serial_console_types.rst @@ -0,0 +1,16 @@ +**************************************** +Serial Console Types +**************************************** + +.. note:: This page is only visible to you if you have administrator rights. + +Serial Console Types define how Orthos 2 talks to a machine's serial console. This page lists the configured types. + +.. image:: ../img/userguide/31_serial_console_types.png + :alt: Orthos2 Serial Console Types List + +- Name: The serial console type's name. +- Command: The command template used to open a console session. +- Has IPMI SOL?: Whether this type uses IPMI Serial-over-LAN. + +See :doc:`../adminguide/serial_console_type` for background and examples (IPMI, ILO2, Telnet, libvirt). diff --git a/docs/userguide/server_configuration.rst b/docs/userguide/server_configuration.rst new file mode 100644 index 000000000..c96bf47dc --- /dev/null +++ b/docs/userguide/server_configuration.rst @@ -0,0 +1,16 @@ +**************************************** +Server Configuration +**************************************** + +.. note:: This page is only visible to you if you have administrator rights. + +This page lets administrators manage the database-backed ``ServerConfig`` key/value settings at runtime, without +editing files on the server. + +.. image:: ../img/userguide/35_server_configuration.png + :alt: Orthos2 Server Configuration List + +- Key: The setting's key. +- Value: The setting's current value. + +See :doc:`../adminguide/server_configuration` for the full list of supported keys, their defaults and examples. diff --git a/docs/userguide/single_tasks.rst b/docs/userguide/single_tasks.rst new file mode 100644 index 000000000..bab4b726c --- /dev/null +++ b/docs/userguide/single_tasks.rst @@ -0,0 +1,18 @@ +**************************************** +Single Tasks +**************************************** + +.. note:: This page is only visible to you if you have administrator rights. + +Single Tasks are one-off background jobs processed by the Orthos 2 Taskmanager. This page lists and lets you queue +them manually. + +.. image:: ../img/userguide/36_single_tasks.png + :alt: Orthos2 Single Tasks List + +- Name: The task's name. +- Module: The Python module implementing the task. +- Running: Whether the task is currently executing. + +If the Taskmanager process was killed while a task was running, you can manually clear a stuck "Running" flag from +this page. diff --git a/docs/userguide/statistics.rst b/docs/userguide/statistics.rst new file mode 100644 index 000000000..d67b2e5a7 --- /dev/null +++ b/docs/userguide/statistics.rst @@ -0,0 +1,19 @@ +**************************************** +Statistics +**************************************** + +The Statistics page gives you an overview of the current machine inventory and recent reservation activity. + +.. image:: ../img/userguide/26_statistics_numbers.png + :alt: Orthos2 Statistics Numbers + +- Numbers: Total machines, free machines, machines with a working login and machines with an infinite reservation, + broken down per architecture. +- Released Machines: Machines released within the last 48 hours, with reservation reason and timeframe. +- Reserved Machines: Machines reserved within the last 48 hours, with owner, reason and timeframe. + +.. image:: ../img/userguide/27_statistics_charts.png + :alt: Orthos2 Statistics Charts + +Two charts complement the tables above: one comparing checked-for vs. actually working Ping/SSH/Login status, and +one showing the machine count per network domain. diff --git a/docs/userguide/systems.rst b/docs/userguide/systems.rst new file mode 100644 index 000000000..d7ef7ec5d --- /dev/null +++ b/docs/userguide/systems.rst @@ -0,0 +1,18 @@ +**************************************** +Systems +**************************************** + +.. note:: This page is only visible to you if you have administrator rights. + +System types describe what kind of machine a Machine object represents (bare metal, a specific virtualization +platform, an LPAR, ...) and which capabilities that implies. This page lists the configured system types. + +.. image:: ../img/userguide/32_systems.png + :alt: Orthos2 Systems List + +- Name: The system type's name. +- Virtual: Whether machines of this type are virtual machines (and may therefore have a hypervisor). +- Administrative: Whether machines of this type are administrative (excluded from installation/reservation). + +Editing a system type also lets you set whether it may serve as a dedicated VM host ("Allow Hypervisor") or may have +a BMC assigned ("Allow BMC"). See :doc:`../adminguide/systems_and_enclosures` for background. diff --git a/docs/userguide/tokens.rst b/docs/userguide/tokens.rst new file mode 100644 index 000000000..31e6301c1 --- /dev/null +++ b/docs/userguide/tokens.rst @@ -0,0 +1,17 @@ +**************************************** +Tokens +**************************************** + +.. note:: This page is only visible to you if you have administrator rights. + +The Tokens page gives administrators an overview of every API token issued to a user. + +.. image:: ../img/userguide/40_tokens.png + :alt: Orthos2 Tokens List + +- Owner: The user the token belongs to. +- Key: The token value. +- Created: When the token was issued. + +Tokens are generated per-user, either from the user's own Preferences page or from their detail page under +:doc:`users`; this page is for overview and revocation only. See :doc:`../adminguide/tokens` for background. diff --git a/docs/userguide/users.rst b/docs/userguide/users.rst new file mode 100644 index 000000000..964613063 --- /dev/null +++ b/docs/userguide/users.rst @@ -0,0 +1,18 @@ +**************************************** +Users +**************************************** + +.. note:: This page is only visible to you if you have administrator rights. + +The Users page lets administrators manage Orthos 2 user accounts. + +.. image:: ../img/userguide/39_users.png + :alt: Orthos2 Users List + +- Username, First Name, Last Name, Email +- Staff / Superuser: Badges indicating elevated permissions. + +You can filter the list by username/email/name, staff status or superuser status. Opening a user shows their +reservations and API tokens, and lets you reserve a machine on their behalf, deactivate their account, or send them +a password reset email. New accounts are created without a usable password until the user resets it themselves (or +logs in via OIDC). See :doc:`../adminguide/groups_and_users` for background. diff --git a/docs/userguide/virtual_machine_page.rst b/docs/userguide/virtual_machine_page.rst index b43aa1af2..bd25062c3 100644 --- a/docs/userguide/virtual_machine_page.rst +++ b/docs/userguide/virtual_machine_page.rst @@ -5,12 +5,15 @@ Virtual Machines In Orthos it is possible that you work with virtual machines. You can work with a virtual machine as well as with a bare metal machine. You can use the Power Cycle and access the console. -.. image:: ../img/userguide/11_machine_virtual.jpg +.. image:: ../img/userguide/11_machine_virtual.png :alt: Orthos2 Virtual Machine Overview -Under Virtual Machine select a VM host and click on the plus (+) to create a VM guest. +The Virtual Machines page lists every VM host together with its VM guests (marked with a cloud icon). Click the plus +(+) next to a VM host to create a new VM guest on it. -.. image:: ../img/userguide/12_machine_virtual_gast.jpg - :alt: Orthos2 Virtual Machine Details +.. image:: ../img/userguide/12_machine_virtual_guest.png + :alt: Orthos2 Add Virtual Machine Form -After Add Virtual Machines the VM host is created and made available under the My Machines +Choose the System, Architecture, Memory, Image, Disk size and number of NICs for the new guest, optionally enable +UEFI boot or VNC, and add any extra command line parameters (e.g. ``--cdrom /dev/cdrom``). Click "Add Virtual +Machine" to create it. Once created, the new VM guest is reserved under your name and appears under My Machines. diff --git a/orthos2.spec b/orthos2.spec index 52b391127..e8a9e06ec 100644 --- a/orthos2.spec +++ b/orthos2.spec @@ -21,7 +21,7 @@ %endif Name: orthos2 -Version: 1.17 +Version: 1.18 Release: 0 Summary: Machine administration Url: https://github.com/openSUSE/orthos2 diff --git a/orthos2/api/commands/add.py b/orthos2/api/commands/add.py index 6d2b4e181..64f6e7ffd 100644 --- a/orthos2/api/commands/add.py +++ b/orthos2/api/commands/add.py @@ -153,7 +153,7 @@ class AddCommand(BaseAPIView): ADD system BareMetal ADD remotepowertype "Dummy BMC" ADD architecture x86_64 - ADD serverconfig foo.bar baz + ADD serverconfig orthos2.test baz ADD enclosure Rack01 ADD domainarchitecture ADD domain foo.domain.tld diff --git a/orthos2/api/tests/commands/test_add.py b/orthos2/api/tests/commands/test_add.py index 1278389fe..4efa76187 100644 --- a/orthos2/api/tests/commands/test_add.py +++ b/orthos2/api/tests/commands/test_add.py @@ -25,7 +25,7 @@ class AddBMCTest(APITestCase): def setUp(self) -> None: self.user = User.objects.create_superuser( - username="testuser", email="test@test.de", password="12345" + username="testuser", email="test@orthos2.test", password="12345" ) auth_token, _ = Token.objects.get_or_create(user=self.user) self.client.credentials(HTTP_AUTHORIZATION="Token " + auth_token.key) @@ -89,7 +89,7 @@ class AddMachineTest(APITestCase): def setUp(self) -> None: self.user = User.objects.create_superuser( - username="testuser", email="test@test.de", password="12345" + username="testuser", email="test@orthos2.test", password="12345" ) auth_token, _ = Token.objects.get_or_create(user=self.user) self.client.credentials(HTTP_AUTHORIZATION="Token " + auth_token.key) @@ -143,7 +143,7 @@ class AddRemotePowerDeviceTest(APITestCase): def setUp(self) -> None: self.user = User.objects.create_superuser( - username="testuser", email="test@test.de", password="12345" + username="testuser", email="test@orthos2.test", password="12345" ) auth_token, _ = Token.objects.get_or_create(user=self.user) self.client.credentials(HTTP_AUTHORIZATION="Token " + auth_token.key) diff --git a/orthos2/api/tests/commands/test_annotation.py b/orthos2/api/tests/commands/test_annotation.py index 320fdeebc..06c8e2fab 100644 --- a/orthos2/api/tests/commands/test_annotation.py +++ b/orthos2/api/tests/commands/test_annotation.py @@ -16,10 +16,10 @@ class DeleteAnnotationTest(APITestCase): def setUp(self) -> None: self.superuser = User.objects.create_superuser( - username="superuser", email="super@test.de", password="secret" + username="superuser", email="super@orthos2.test", password="secret" ) self.regular_user = User.objects.create_user( - username="user", email="user@test.de", password="secret" + username="user", email="user@orthos2.test", password="secret" ) superuser_token, _ = Token.objects.get_or_create(user=self.superuser) self.superuser_token = superuser_token.key diff --git a/orthos2/api/tests/commands/test_architecture.py b/orthos2/api/tests/commands/test_architecture.py index 2c589a800..0587ba8f2 100644 --- a/orthos2/api/tests/commands/test_architecture.py +++ b/orthos2/api/tests/commands/test_architecture.py @@ -14,10 +14,10 @@ class ArchitectureCommandTestCase(APITestCase): def setUp(self) -> None: self.superuser = User.objects.create_superuser( - username="superuser", email="super@test.de", password="secret" + username="superuser", email="super@orthos2.test", password="secret" ) self.regular_user = User.objects.create_user( - username="user", email="user@test.de", password="secret" + username="user", email="user@orthos2.test", password="secret" ) superuser_token, _ = Token.objects.get_or_create(user=self.superuser) self.superuser_token = superuser_token.key diff --git a/orthos2/api/tests/commands/test_bmc.py b/orthos2/api/tests/commands/test_bmc.py index 5ad77f206..9c137e6f3 100644 --- a/orthos2/api/tests/commands/test_bmc.py +++ b/orthos2/api/tests/commands/test_bmc.py @@ -16,10 +16,10 @@ class BMCCommandTestCase(APITestCase): def setUp(self) -> None: self.superuser = User.objects.create_superuser( - username="superuser", email="super@test.de", password="secret" + username="superuser", email="super@orthos2.test", password="secret" ) self.regular_user = User.objects.create_user( - username="user", email="user@test.de", password="secret" + username="user", email="user@orthos2.test", password="secret" ) superuser_token, _ = Token.objects.get_or_create(user=self.superuser) self.superuser_token = superuser_token.key diff --git a/orthos2/api/tests/commands/test_dailytask.py b/orthos2/api/tests/commands/test_dailytask.py index 371e672bb..ba3301730 100644 --- a/orthos2/api/tests/commands/test_dailytask.py +++ b/orthos2/api/tests/commands/test_dailytask.py @@ -16,10 +16,10 @@ class DailyTaskCommandTestCase(APITestCase): def setUp(self) -> None: self.superuser = User.objects.create_superuser( - username="superuser", email="super@test.de", password="secret" + username="superuser", email="super@orthos2.test", password="secret" ) self.regular_user = User.objects.create_user( - username="user", email="user@test.de", password="secret" + username="user", email="user@orthos2.test", password="secret" ) superuser_token, _ = Token.objects.get_or_create(user=self.superuser) self.superuser_token = superuser_token.key diff --git a/orthos2/api/tests/commands/test_delete_networkinterface.py b/orthos2/api/tests/commands/test_delete_networkinterface.py index 3f25efdf3..ec6e77669 100644 --- a/orthos2/api/tests/commands/test_delete_networkinterface.py +++ b/orthos2/api/tests/commands/test_delete_networkinterface.py @@ -35,10 +35,10 @@ class DeleteNetworkInterfaceTest(APITestCase): def setUp(self) -> None: self.superuser = User.objects.create_superuser( - username="superuser", email="super@test.de", password="secret" + username="superuser", email="super@orthos2.test", password="secret" ) self.regular_user = User.objects.create_user( - username="user", email="user@test.de", password="secret" + username="user", email="user@orthos2.test", password="secret" ) superuser_token, _ = Token.objects.get_or_create(user=self.superuser) self.superuser_token = superuser_token.key diff --git a/orthos2/api/tests/commands/test_devicetype.py b/orthos2/api/tests/commands/test_devicetype.py index fae2e1e10..8c7a85abe 100644 --- a/orthos2/api/tests/commands/test_devicetype.py +++ b/orthos2/api/tests/commands/test_devicetype.py @@ -14,10 +14,10 @@ class DeviceTypeCommandTestCase(APITestCase): def setUp(self) -> None: self.superuser = User.objects.create_superuser( - username="superuser", email="super@test.de", password="secret" + username="superuser", email="super@orthos2.test", password="secret" ) self.regular_user = User.objects.create_user( - username="user", email="user@test.de", password="secret" + username="user", email="user@orthos2.test", password="secret" ) superuser_token, _ = Token.objects.get_or_create(user=self.superuser) self.superuser_token = superuser_token.key diff --git a/orthos2/api/tests/commands/test_domain.py b/orthos2/api/tests/commands/test_domain.py index 84e860820..89fdedafc 100644 --- a/orthos2/api/tests/commands/test_domain.py +++ b/orthos2/api/tests/commands/test_domain.py @@ -14,10 +14,10 @@ class DomainCommandTestCase(APITestCase): def setUp(self) -> None: self.superuser = User.objects.create_superuser( - username="superuser", email="super@test.de", password="secret" + username="superuser", email="super@orthos2.test", password="secret" ) self.regular_user = User.objects.create_user( - username="user", email="user@test.de", password="secret" + username="user", email="user@orthos2.test", password="secret" ) superuser_token, _ = Token.objects.get_or_create(user=self.superuser) self.superuser_token = superuser_token.key diff --git a/orthos2/api/tests/commands/test_domainarchitecture.py b/orthos2/api/tests/commands/test_domainarchitecture.py index 3d206edd8..d410dde14 100644 --- a/orthos2/api/tests/commands/test_domainarchitecture.py +++ b/orthos2/api/tests/commands/test_domainarchitecture.py @@ -14,10 +14,10 @@ class DomainArchitectureCommandTestCase(APITestCase): def setUp(self) -> None: self.superuser = User.objects.create_superuser( - username="superuser", email="super@test.de", password="secret" + username="superuser", email="super@orthos2.test", password="secret" ) self.regular_user = User.objects.create_user( - username="user", email="user@test.de", password="secret" + username="user", email="user@orthos2.test", password="secret" ) superuser_token, _ = Token.objects.get_or_create(user=self.superuser) self.superuser_token = superuser_token.key diff --git a/orthos2/api/tests/commands/test_enclosure.py b/orthos2/api/tests/commands/test_enclosure.py index 5ad7e9ba6..8c57b9520 100644 --- a/orthos2/api/tests/commands/test_enclosure.py +++ b/orthos2/api/tests/commands/test_enclosure.py @@ -14,10 +14,10 @@ class EnclosureCommandTestCase(APITestCase): def setUp(self) -> None: self.superuser = User.objects.create_superuser( - username="superuser", email="super@test.de", password="secret" + username="superuser", email="super@orthos2.test", password="secret" ) self.regular_user = User.objects.create_user( - username="user", email="user@test.de", password="secret" + username="user", email="user@orthos2.test", password="secret" ) superuser_token, _ = Token.objects.get_or_create(user=self.superuser) self.superuser_token = superuser_token.key diff --git a/orthos2/api/tests/commands/test_info.py b/orthos2/api/tests/commands/test_info.py index 3da79f2ea..e6d93a36f 100644 --- a/orthos2/api/tests/commands/test_info.py +++ b/orthos2/api/tests/commands/test_info.py @@ -17,7 +17,7 @@ class InfoTest(APITestCase): def setUp(self) -> None: self.user = User.objects.create_superuser( - username="testuser", email="test@test.de", password="12345" + username="testuser", email="test@orthos2.test", password="12345" ) self.client.force_authenticate(user=self.user) diff --git a/orthos2/api/tests/commands/test_machine_edit.py b/orthos2/api/tests/commands/test_machine_edit.py index 04cc477ff..c0d3de2a7 100644 --- a/orthos2/api/tests/commands/test_machine_edit.py +++ b/orthos2/api/tests/commands/test_machine_edit.py @@ -25,10 +25,10 @@ class EditMachineCommandTestCase(APITestCase): def setUp(self, m_is_dns_resolvable: mock.MagicMock) -> None: m_is_dns_resolvable.return_value = True - ServerConfig.objects.create(key="domain.validendings", value="bar.de") + ServerConfig.objects.create(key="domain.validendings", value="orthos2.test") Domain( - name="foo.bar.de", + name="foo.orthos2.test", ip_v4="127.0.0.1", ip_v6="::1", dynamic_range_v4_start="127.0.0.1", @@ -42,17 +42,17 @@ def setUp(self, m_is_dns_resolvable: mock.MagicMock) -> None: self.machine.system = System.get_system_manager().get_by_natural_key( "BareMetal" ) - self.machine.fqdn = "machine1.foo.bar.de" + self.machine.fqdn = "machine1.foo.orthos2.test" self.machine.architecture_id = ( Architecture.get_architecture_manager().get_by_natural_key("x86_64").id ) self.machine.save() self.superuser = User.objects.create_superuser( - username="superuser", email="super@test.de", password="secret" + username="superuser", email="super@orthos2.test", password="secret" ) self.regular_user = User.objects.create_user( - username="user", email="user@test.de", password="secret" + username="user", email="user@orthos2.test", password="secret" ) superuser_token, _ = Token.objects.get_or_create(user=self.superuser) self.superuser_token = superuser_token.key @@ -134,7 +134,7 @@ def test_superuser_post_hypervisor_on_non_virtual_system_returns_error( def test_superuser_post_unknown_fqdn_returns_error(self) -> None: self._auth_superuser() url = reverse( - "api:machine_edit_post", kwargs={"fqdn": "does-not-exist.foo.bar.de"} + "api:machine_edit_post", kwargs={"fqdn": "does-not-exist.foo.orthos2.test"} ) response = self.client.post( url, diff --git a/orthos2/api/tests/commands/test_manufacturer.py b/orthos2/api/tests/commands/test_manufacturer.py index 6e9239862..d1c97ad6f 100644 --- a/orthos2/api/tests/commands/test_manufacturer.py +++ b/orthos2/api/tests/commands/test_manufacturer.py @@ -14,10 +14,10 @@ class ManufacturerCommandTestCase(APITestCase): def setUp(self) -> None: self.superuser = User.objects.create_superuser( - username="superuser", email="super@test.de", password="secret" + username="superuser", email="super@orthos2.test", password="secret" ) self.regular_user = User.objects.create_user( - username="user", email="user@test.de", password="secret" + username="user", email="user@orthos2.test", password="secret" ) superuser_token, _ = Token.objects.get_or_create(user=self.superuser) self.superuser_token = superuser_token.key diff --git a/orthos2/api/tests/commands/test_networkinterface.py b/orthos2/api/tests/commands/test_networkinterface.py index f915ded22..b9b858894 100644 --- a/orthos2/api/tests/commands/test_networkinterface.py +++ b/orthos2/api/tests/commands/test_networkinterface.py @@ -16,10 +16,10 @@ class NetworkInterfaceCommandTestCase(APITestCase): def setUp(self) -> None: self.superuser = User.objects.create_superuser( - username="superuser", email="super@test.de", password="secret" + username="superuser", email="super@orthos2.test", password="secret" ) self.regular_user = User.objects.create_user( - username="user", email="user@test.de", password="secret" + username="user", email="user@orthos2.test", password="secret" ) superuser_token, _ = Token.objects.get_or_create(user=self.superuser) self.superuser_token = superuser_token.key diff --git a/orthos2/api/tests/commands/test_remotepower.py b/orthos2/api/tests/commands/test_remotepower.py index f1270b49a..3b806a3b6 100644 --- a/orthos2/api/tests/commands/test_remotepower.py +++ b/orthos2/api/tests/commands/test_remotepower.py @@ -16,10 +16,10 @@ class RemotePowerCommandTestCase(APITestCase): def setUp(self) -> None: self.superuser = User.objects.create_superuser( - username="superuser", email="super@test.de", password="secret" + username="superuser", email="super@orthos2.test", password="secret" ) self.regular_user = User.objects.create_user( - username="user", email="user@test.de", password="secret" + username="user", email="user@orthos2.test", password="secret" ) superuser_token, _ = Token.objects.get_or_create(user=self.superuser) self.superuser_token = superuser_token.key diff --git a/orthos2/api/tests/commands/test_remotepowerdevice.py b/orthos2/api/tests/commands/test_remotepowerdevice.py index 3e574ed98..b080da250 100644 --- a/orthos2/api/tests/commands/test_remotepowerdevice.py +++ b/orthos2/api/tests/commands/test_remotepowerdevice.py @@ -20,10 +20,10 @@ class RemotePowerDeviceCommandTestCase(APITestCase): def setUp(self) -> None: self.superuser = User.objects.create_superuser( - username="superuser", email="super@test.de", password="secret" + username="superuser", email="super@orthos2.test", password="secret" ) self.regular_user = User.objects.create_user( - username="user", email="user@test.de", password="secret" + username="user", email="user@orthos2.test", password="secret" ) superuser_token, _ = Token.objects.get_or_create(user=self.superuser) self.superuser_token = superuser_token.key diff --git a/orthos2/api/tests/commands/test_remotepowertype.py b/orthos2/api/tests/commands/test_remotepowertype.py index 92736f5ee..5919820cc 100644 --- a/orthos2/api/tests/commands/test_remotepowertype.py +++ b/orthos2/api/tests/commands/test_remotepowertype.py @@ -14,10 +14,10 @@ class RemotePowerTypeCommandTestCase(APITestCase): def setUp(self) -> None: self.superuser = User.objects.create_superuser( - username="superuser", email="super@test.de", password="secret" + username="superuser", email="super@orthos2.test", password="secret" ) self.regular_user = User.objects.create_user( - username="user", email="user@test.de", password="secret" + username="user", email="user@orthos2.test", password="secret" ) superuser_token, _ = Token.objects.get_or_create(user=self.superuser) self.superuser_token = superuser_token.key diff --git a/orthos2/api/tests/commands/test_reservationhistory.py b/orthos2/api/tests/commands/test_reservationhistory.py index 83840c87e..92aea3cdd 100644 --- a/orthos2/api/tests/commands/test_reservationhistory.py +++ b/orthos2/api/tests/commands/test_reservationhistory.py @@ -20,7 +20,7 @@ class ReservationHistoryTest(APITestCase): def setUp(self) -> None: self.user = User.objects.create_superuser( - username="testuser", email="test@test.de", password="12345" + username="testuser", email="test@orthos2.test", password="12345" ) self.client.force_authenticate(user=self.user) diff --git a/orthos2/api/tests/commands/test_serialconsole.py b/orthos2/api/tests/commands/test_serialconsole.py index 34fc3bd3b..e280884e5 100644 --- a/orthos2/api/tests/commands/test_serialconsole.py +++ b/orthos2/api/tests/commands/test_serialconsole.py @@ -16,10 +16,10 @@ class SerialConsoleCommandTestCase(APITestCase): def setUp(self) -> None: self.superuser = User.objects.create_superuser( - username="superuser", email="super@test.de", password="secret" + username="superuser", email="super@orthos2.test", password="secret" ) self.regular_user = User.objects.create_user( - username="user", email="user@test.de", password="secret" + username="user", email="user@orthos2.test", password="secret" ) superuser_token, _ = Token.objects.get_or_create(user=self.superuser) self.superuser_token = superuser_token.key diff --git a/orthos2/api/tests/commands/test_serialconsoletype.py b/orthos2/api/tests/commands/test_serialconsoletype.py index e870a5790..2bda5dd2c 100644 --- a/orthos2/api/tests/commands/test_serialconsoletype.py +++ b/orthos2/api/tests/commands/test_serialconsoletype.py @@ -14,10 +14,10 @@ class SerialConsoleTypeCommandTestCase(APITestCase): def setUp(self) -> None: self.superuser = User.objects.create_superuser( - username="superuser", email="super@test.de", password="secret" + username="superuser", email="super@orthos2.test", password="secret" ) self.regular_user = User.objects.create_user( - username="user", email="user@test.de", password="secret" + username="user", email="user@orthos2.test", password="secret" ) superuser_token, _ = Token.objects.get_or_create(user=self.superuser) self.superuser_token = superuser_token.key diff --git a/orthos2/api/tests/commands/test_serverconfig.py b/orthos2/api/tests/commands/test_serverconfig.py index 9742f5e53..b28709497 100644 --- a/orthos2/api/tests/commands/test_serverconfig.py +++ b/orthos2/api/tests/commands/test_serverconfig.py @@ -14,10 +14,10 @@ class ServerConfigCommandTestCase(APITestCase): def setUp(self) -> None: self.superuser = User.objects.create_superuser( - username="superuser", email="super@test.de", password="secret" + username="superuser", email="super@orthos2.test", password="secret" ) self.regular_user = User.objects.create_user( - username="user", email="user@test.de", password="secret" + username="user", email="user@orthos2.test", password="secret" ) superuser_token, _ = Token.objects.get_or_create(user=self.superuser) self.superuser_token = superuser_token.key diff --git a/orthos2/api/tests/commands/test_singletask.py b/orthos2/api/tests/commands/test_singletask.py index 2f49bf21b..792da5892 100644 --- a/orthos2/api/tests/commands/test_singletask.py +++ b/orthos2/api/tests/commands/test_singletask.py @@ -14,10 +14,10 @@ class SingleTaskCommandTestCase(APITestCase): def setUp(self) -> None: self.superuser = User.objects.create_superuser( - username="superuser", email="super@test.de", password="secret" + username="superuser", email="super@orthos2.test", password="secret" ) self.regular_user = User.objects.create_user( - username="user", email="user@test.de", password="secret" + username="user", email="user@orthos2.test", password="secret" ) superuser_token, _ = Token.objects.get_or_create(user=self.superuser) self.superuser_token = superuser_token.key diff --git a/orthos2/api/tests/commands/test_system.py b/orthos2/api/tests/commands/test_system.py index 2d37f7a59..fd8c3128e 100644 --- a/orthos2/api/tests/commands/test_system.py +++ b/orthos2/api/tests/commands/test_system.py @@ -14,10 +14,10 @@ class SystemCommandTestCase(APITestCase): def setUp(self) -> None: self.superuser = User.objects.create_superuser( - username="superuser", email="super@test.de", password="secret" + username="superuser", email="super@orthos2.test", password="secret" ) self.regular_user = User.objects.create_user( - username="user", email="user@test.de", password="secret" + username="user", email="user@orthos2.test", password="secret" ) superuser_token, _ = Token.objects.get_or_create(user=self.superuser) self.superuser_token = superuser_token.key diff --git a/orthos2/api/tests/test_forms.py b/orthos2/api/tests/test_forms.py index 2665faa78..8f3740174 100644 --- a/orthos2/api/tests/test_forms.py +++ b/orthos2/api/tests/test_forms.py @@ -119,7 +119,7 @@ def test_form(self) -> None: # Arrange & Act form = MachineAPIForm( { - "fqdn": "test.foo.de", + "fqdn": "test.foo.orthos2.test", "enclosure": "", "architecture_id": "1", "system_id": "1", diff --git a/orthos2/data/fixtures/serverconfigs.json b/orthos2/data/fixtures/serverconfigs.json index f1c4589fc..ce5482f7a 100644 --- a/orthos2/data/fixtures/serverconfigs.json +++ b/orthos2/data/fixtures/serverconfigs.json @@ -36,7 +36,7 @@ "pk": null, "fields": { "key": "domain.validendings", - "value": "example.de, excample.com" + "value": "orthos2.test, sub.orthos2.test" } }, { @@ -71,14 +71,6 @@ "value": "/usr/bin/cobbler system edit --name={{machine.fqdn}} --profile={{architecture}}:{{choice}} --netboot=True" } }, - { - "model": "data.serverconfig", - "pk": null, - "fields": { - "key": "setup.list.command", - "value": "/usr/bin/cobbler system --list {{ architecture }}" - } - }, { "model": "data.serverconfig", "pk": null, @@ -212,7 +204,7 @@ "pk": null, "fields": { "key": "mail.validdomains", - "value": "example.de, example.com" + "value": "orthos2.test, sub.orthos2.test" } }, { @@ -279,14 +271,6 @@ "value": "/usr/bin/ipmitool -I lanplus -H {{ machine.bmc.fqdn }} -U {{ ipmi.user }} -P {{ ipmi.password }} power {{ action }}" } }, - { - "model": "data.serverconfig", - "pk": null, - "fields": { - "key": "cobbler.command", - "value": "/usr/bin/cobbler" - } - }, { "model": "data.serverconfig", "pk": null, diff --git a/orthos2/data/fixtures/tests/test_serverconfig_domainending.json b/orthos2/data/fixtures/tests/test_serverconfig_domainending.json index e9d9e69bc..4fef88201 100644 --- a/orthos2/data/fixtures/tests/test_serverconfig_domainending.json +++ b/orthos2/data/fixtures/tests/test_serverconfig_domainending.json @@ -4,7 +4,7 @@ "pk": null, "fields": { "key": "domain.validendings", - "value": "example.de, example.com, foo.de" + "value": "orthos2.test, sub.orthos2.test, foo.orthos2.test" } } ] diff --git a/orthos2/data/tests/migrations/test_0052.py b/orthos2/data/tests/migrations/test_0052.py index 76391fef0..9d4dfc5f3 100644 --- a/orthos2/data/tests/migrations/test_0052.py +++ b/orthos2/data/tests/migrations/test_0052.py @@ -25,7 +25,7 @@ def test_migration_0052(self): # Create an existing domain Domain.objects.create( - name="example.com", + name="orthos2.test", ip_v4="192.168.1.0", ip_v6="2001:db8::", dynamic_range_v4_start="192.168.1.200", @@ -41,7 +41,7 @@ def test_migration_0052(self): # Create RemotePowerDevice rpd1 = RemotePowerDevice.objects.create( - fqdn="pdu.example.com", + fqdn="pdu.orthos2.test", mac="AA:BB:CC:DD:EE:01", fence_agent=fence_agent, ) @@ -55,7 +55,7 @@ def test_migration_0052(self): RemotePowerDeviceNew = new_state.apps.get_model("data", "RemotePowerDevice") rpd1_new = RemotePowerDeviceNew.objects.get(id=rpd1.id) - self.assertEqual(rpd1_new.domain.name, "example.com") + self.assertEqual(rpd1_new.domain.name, "orthos2.test") self.assertEqual(rpd1_new.architecture.name, "embedded") # Cleanup @@ -82,7 +82,7 @@ def test_migration_0052_missing_domain(self): # Create RemotePowerDevice with a domain that does not exist in the database test_rpd = RemotePowerDevice.objects.create( - fqdn="pdu.missing-domain.com", + fqdn="pdu.missing-domain.orthos2.test", mac="AA:BB:CC:DD:EE:02", fence_agent=fence_agent, ) @@ -90,7 +90,7 @@ def test_migration_0052_missing_domain(self): # Act & Assert with self.assertRaisesMessage( CommandError, - 'Domain "missing-domain.com" does not exist! Please create it first.', + 'Domain "missing-domain.orthos2.test" does not exist! Please create it first.', ): migrator.apply_tested_migration( ("data", "0052_remotepowerdevice_architecture_and_more") diff --git a/orthos2/data/tests/test_serverconfig.py b/orthos2/data/tests/test_serverconfig.py index e401085ed..d2942eb87 100644 --- a/orthos2/data/tests/test_serverconfig.py +++ b/orthos2/data/tests/test_serverconfig.py @@ -135,9 +135,10 @@ def test_get_smtp_relay(self) -> None: assert ServerConfig.get_server_config_manager().get_smtp_relay() is None ServerConfig.get_server_config_manager().filter(key=SMTP_RELAY).delete() - ServerConfig(key=SMTP_RELAY, value="foo.test.de").save() + ServerConfig(key=SMTP_RELAY, value="smtp.orthos2.test").save() assert ( - ServerConfig.get_server_config_manager().get_smtp_relay() == "foo.test.de" + ServerConfig.get_server_config_manager().get_smtp_relay() + == "smtp.orthos2.test" ) ServerConfig.get_server_config_manager().filter(key=SMTP_RELAY).delete() diff --git a/orthos2/frontend/tests/admin/test_machine_edit_views.py b/orthos2/frontend/tests/admin/test_machine_edit_views.py index 49fc8bc94..a94d94bbb 100644 --- a/orthos2/frontend/tests/admin/test_machine_edit_views.py +++ b/orthos2/frontend/tests/admin/test_machine_edit_views.py @@ -23,10 +23,10 @@ class MachineDetailedEditViewTest(TestCase): def setUp(self, m_is_dns_resolvable: mock.MagicMock) -> None: m_is_dns_resolvable.return_value = True - ServerConfig.objects.create(key="domain.validendings", value="bar.de") + ServerConfig.objects.create(key="domain.validendings", value="orthos2.test") Domain( - name="foo.bar.de", + name="foo.orthos2.test", ip_v4="127.0.0.1", ip_v6="::1", dynamic_range_v4_start="127.0.0.1", @@ -40,7 +40,7 @@ def setUp(self, m_is_dns_resolvable: mock.MagicMock) -> None: self.machine.system = System.get_system_manager().get_by_natural_key( "BareMetal" ) - self.machine.fqdn = "machine1.foo.bar.de" + self.machine.fqdn = "machine1.foo.orthos2.test" self.machine.architecture_id = ( Architecture.get_architecture_manager().get_by_natural_key("x86_64").id ) diff --git a/orthos2/frontend/tests/admin/test_machine_views.py b/orthos2/frontend/tests/admin/test_machine_views.py index 2c8642de1..155fdb9ff 100644 --- a/orthos2/frontend/tests/admin/test_machine_views.py +++ b/orthos2/frontend/tests/admin/test_machine_views.py @@ -30,10 +30,10 @@ class ChangeView(WebTest): def setUp(self, m_is_dns_resolvable: mock.MagicMock): m_is_dns_resolvable.return_value = True - ServerConfig.objects.create(key="domain.validendings", value="bar.de") + ServerConfig.objects.create(key="domain.validendings", value="orthos2.test") Domain( - name="foo.bar.de", + name="foo.orthos2.test", ip_v4="127.0.0.1", ip_v6="::1", dynamic_range_v4_start="127.0.0.1", @@ -45,7 +45,7 @@ def setUp(self, m_is_dns_resolvable: mock.MagicMock): m1 = Machine() m1.pk = 1 m1.system = System.get_system_manager().get_by_natural_key("BareMetal") - m1.fqdn = "machine1.foo.bar.de" + m1.fqdn = "machine1.foo.orthos2.test" m1.architecture_id = ( Architecture.get_architecture_manager().get_by_natural_key("x86_64").id ) @@ -56,7 +56,7 @@ def setUp(self, m_is_dns_resolvable: mock.MagicMock): m2.pk = 2 m2.administrative = True m2.system = System.get_system_manager().get_by_natural_key("BareMetal") - m2.fqdn = "machine2.foo.bar.de" + m2.fqdn = "machine2.foo.orthos2.test" m2.architecture_id = ( Architecture.get_architecture_manager().get_by_natural_key("x86_64").id ) @@ -120,7 +120,7 @@ def test_virtualization_server_hidden_for_non_hypervisor_capable_systems( m3 = Machine() m3.pk = 3 m3.system = virtual_system - m3.fqdn = "machine3.foo.bar.de" + m3.fqdn = "machine3.foo.orthos2.test" m3.architecture_id = ( Architecture.get_architecture_manager().get_by_natural_key("x86_64").id ) @@ -142,7 +142,7 @@ def test_editing_machine_on_non_hypervisor_capable_system_persists(self) -> None m3 = Machine() m3.pk = 3 m3.system = non_hypervisor_system - m3.fqdn = "machine3.foo.bar.de" + m3.fqdn = "machine3.foo.orthos2.test" m3.architecture_id = ( Architecture.get_architecture_manager().get_by_natural_key("x86_64").id ) diff --git a/orthos2/frontend/tests/admin/test_user_admin_views.py b/orthos2/frontend/tests/admin/test_user_admin_views.py index 1a56b0cc8..2e0d8ff0d 100644 --- a/orthos2/frontend/tests/admin/test_user_admin_views.py +++ b/orthos2/frontend/tests/admin/test_user_admin_views.py @@ -36,7 +36,7 @@ def test_superuser_post_creates_user_with_unusable_password(self) -> None: url, { "username": "newperson", - "email": "newperson@foo.bar", + "email": "newperson@orthos2.test", "first_name": "New", "last_name": "Person", "is_active": "on", @@ -59,7 +59,7 @@ class UserDetailedEditViewTest(TestCase): def setUp(self) -> None: self.target = User.objects.create_user( - username="targetuser", email="target@foo.bar" + username="targetuser", email="target@orthos2.test" ) def test_unauthenticated_get_redirects_to_login(self) -> None: @@ -87,7 +87,7 @@ def test_superuser_post_updates_user(self) -> None: url, { "username": "targetuser", - "email": "changed@foo.bar", + "email": "changed@orthos2.test", "first_name": "", "last_name": "", "is_active": "on", @@ -96,7 +96,7 @@ def test_superuser_post_updates_user(self) -> None: ) assert response.status_code == 302 self.target.refresh_from_db() - assert self.target.email == "changed@foo.bar" + assert self.target.email == "changed@orthos2.test" assert self.target.is_staff def test_regular_user_post_does_not_update_user(self) -> None: diff --git a/orthos2/frontend/tests/fixtures/serverconfigs.json b/orthos2/frontend/tests/fixtures/serverconfigs.json index 3707e71a4..b1fee6ef8 100644 --- a/orthos2/frontend/tests/fixtures/serverconfigs.json +++ b/orthos2/frontend/tests/fixtures/serverconfigs.json @@ -20,7 +20,7 @@ "pk": null, "fields": { "key": "mail.validdomains", - "value": "example.de, example.com, foo.bar" + "value": "sub.orthos2.test, other.orthos2.test, orthos2.test" } } ] diff --git a/orthos2/frontend/tests/user/fixtures/users.json b/orthos2/frontend/tests/user/fixtures/users.json index c2176df04..121cbb456 100644 --- a/orthos2/frontend/tests/user/fixtures/users.json +++ b/orthos2/frontend/tests/user/fixtures/users.json @@ -5,7 +5,7 @@ "fields": { "username": "superuser", "password": "pbkdf2_sha256$36000$FFhkWCuL1AyE$QFlRwInY3INsxQ0Y+N5rWGpp/3MSTsU72PRkkEnZkvs=", - "email": "superuser@foo.bar", + "email": "superuser@orthos2.test", "is_superuser": true, "is_staff": true } @@ -16,7 +16,7 @@ "fields": { "username": "user", "password": "pbkdf2_sha256$36000$FFhkWCuL1AyE$QFlRwInY3INsxQ0Y+N5rWGpp/3MSTsU72PRkkEnZkvs=", - "email": "user@foo.bar", + "email": "user@orthos2.test", "is_superuser": false, "is_staff": false } @@ -26,7 +26,7 @@ "pk": null, "fields": { "username": "user-nopassword", - "email": "user-nopassword@foo.bar", + "email": "user-nopassword@orthos2.test", "is_superuser": false, "is_staff": false } @@ -36,7 +36,7 @@ "pk": null, "fields": { "username": "user-nopassword-multiple1", - "email": "user-nopassword-multiple@foo.bar", + "email": "user-nopassword-multiple@orthos2.test", "is_superuser": false, "is_staff": false } @@ -46,7 +46,7 @@ "pk": null, "fields": { "username": "user-nopassword-multiple2", - "email": "user-nopassword-multiple@foo.baz", + "email": "user-nopassword-multiple@sub.orthos2.test", "is_superuser": false, "is_staff": false } diff --git a/orthos2/frontend/tests/user/test_create_account.py b/orthos2/frontend/tests/user/test_create_account.py index 1987e458e..c8ee94743 100644 --- a/orthos2/frontend/tests/user/test_create_account.py +++ b/orthos2/frontend/tests/user/test_create_account.py @@ -16,7 +16,7 @@ def test_successful_user_creation(self) -> None: with self.settings(AUTH_ALLOW_USER_CREATION=True): form = self.app.get(reverse("frontend:create_user")).form # type: ignore form["login"] = "new-user" - form["email"] = "new-user@foo.bar" + form["email"] = "new-user@orthos2.test" form["password"] = "linux1234" form["password2"] = "linux1234" page = form.submit().maybe_follow() # type: ignore @@ -29,7 +29,7 @@ def test_password_too_short(self) -> None: """Check if password is too short (at least 8 characters).""" form = self.app.get(reverse("frontend:create_user")).form # type: ignore form["login"] = "new-user" - form["email"] = "new-user@foo.bar" + form["email"] = "new-user@orthos2.test" form["password"] = "1234567" form["password2"] = "1234567" page = form.submit().maybe_follow() # type: ignore @@ -42,7 +42,7 @@ def test_password_confirmation_not_match(self) -> None: """Check if passwords do match.""" form = self.app.get(reverse("frontend:create_user")).form # type: ignore form["login"] = "new-user" - form["email"] = "new-user@foo.bar" + form["email"] = "new-user@orthos2.test" form["password"] = "123456789" form["password2"] = "123456798" page = form.submit().maybe_follow() # type: ignore @@ -55,7 +55,7 @@ def test_user_already_exists(self) -> None: """Check if user does already exists.""" form = self.app.get(reverse("frontend:create_user")).form # type: ignore form["login"] = "user" - form["email"] = "user@foo.bar" + form["email"] = "user@orthos2.test" form["password"] = "12345678" form["password2"] = "12345678" page = form.submit().maybe_follow() # type: ignore @@ -68,7 +68,7 @@ def test_email_does_already_exists(self) -> None: """Check if email does already exists.""" form = self.app.get(reverse("frontend:create_user")).form # type: ignore form["login"] = "new-user" - form["email"] = "user@foo.bar" + form["email"] = "user@orthos2.test" form["password"] = "12345678" form["password2"] = "12345678" page = form.submit().maybe_follow() # type: ignore diff --git a/orthos2/frontend/tests/user/test_login.py b/orthos2/frontend/tests/user/test_login.py index e954f1663..b08b45c32 100644 --- a/orthos2/frontend/tests/user/test_login.py +++ b/orthos2/frontend/tests/user/test_login.py @@ -119,7 +119,7 @@ def test_login_with_password_free_user(self) -> None: form = page.form # type: ignore form["login"] = "user-nopassword" - form["email"] = "user-nopassword@foo.bar" + form["email"] = "user-nopassword@orthos2.test" page = form.submit().maybe_follow() # type: ignore self.assertContains(page, "Password restored - check your mails.") # type: ignore @@ -178,7 +178,7 @@ def test_login_screen_without_oidc(self) -> None: def test_login_screen_with_oidc_default(self) -> None: """When OIDC is configured, default screen shows only OIDC button.""" - with self.settings(SOCIAL_AUTH_OIDC_OIDC_ENDPOINT="https://auth.example.com"): + with self.settings(SOCIAL_AUTH_OIDC_OIDC_ENDPOINT="https://auth.orthos2.test"): page = self.app.get(reverse("frontend:login")) # type: ignore # Should show OIDC button @@ -193,7 +193,7 @@ def test_login_screen_with_oidc_default(self) -> None: def test_login_screen_with_oidc_builtin_param(self) -> None: """When OIDC is configured but ?builtin=true, show built-in form.""" - with self.settings(SOCIAL_AUTH_OIDC_OIDC_ENDPOINT="https://auth.example.com"): + with self.settings(SOCIAL_AUTH_OIDC_OIDC_ENDPOINT="https://auth.orthos2.test"): page = self.app.get(reverse("frontend:login") + "?builtin=true") # type: ignore # Should show built-in login form @@ -208,7 +208,7 @@ def test_login_screen_with_oidc_builtin_param(self) -> None: def test_builtin_login_works_with_oidc_enabled(self) -> None: """Verify built-in auth still functions when OIDC is configured.""" - with self.settings(SOCIAL_AUTH_OIDC_OIDC_ENDPOINT="https://auth.example.com"): + with self.settings(SOCIAL_AUTH_OIDC_OIDC_ENDPOINT="https://auth.orthos2.test"): page = self.app.get(reverse("frontend:login") + "?builtin=true") # type: ignore form = page.form # type: ignore form["username"] = "user" @@ -220,7 +220,7 @@ def test_builtin_login_works_with_oidc_enabled(self) -> None: def test_next_parameter_preserved_with_builtin(self) -> None: """Ensure ?next parameter works with ?builtin=true.""" - with self.settings(SOCIAL_AUTH_OIDC_OIDC_ENDPOINT="https://auth.example.com"): + with self.settings(SOCIAL_AUTH_OIDC_OIDC_ENDPOINT="https://auth.orthos2.test"): page = self.app.get( # type: ignore reverse("frontend:login") + "?builtin=true&next=/machines/my" ) @@ -235,7 +235,7 @@ def test_next_parameter_preserved_with_builtin(self) -> None: def test_password_free_user_with_oidc_and_builtin(self) -> None: """Password-free user redirect should work with OIDC + builtin.""" with self.settings( - SOCIAL_AUTH_OIDC_OIDC_ENDPOINT="https://auth.example.com", + SOCIAL_AUTH_OIDC_OIDC_ENDPOINT="https://auth.orthos2.test", AUTH_ALLOW_USER_CREATION=True, ): page = self.app.get(reverse("frontend:login") + "?builtin=true") # type: ignore @@ -251,7 +251,7 @@ def test_password_free_user_with_oidc_and_builtin(self) -> None: def test_navbar_links_hidden_on_oidc_only_screen(self) -> None: """Create Account and Restore Password links hidden on OIDC-only screen.""" with self.settings( - SOCIAL_AUTH_OIDC_OIDC_ENDPOINT="https://auth.example.com", + SOCIAL_AUTH_OIDC_OIDC_ENDPOINT="https://auth.orthos2.test", AUTH_ALLOW_USER_CREATION=True, ): page = self.app.get(reverse("frontend:login")) # type: ignore @@ -263,7 +263,7 @@ def test_navbar_links_hidden_on_oidc_only_screen(self) -> None: def test_navbar_links_visible_on_builtin_screen(self) -> None: """Create Account and Restore Password links appear on builtin screen.""" with self.settings( - SOCIAL_AUTH_OIDC_OIDC_ENDPOINT="https://auth.example.com", + SOCIAL_AUTH_OIDC_OIDC_ENDPOINT="https://auth.orthos2.test", AUTH_ALLOW_USER_CREATION=True, ): page = self.app.get(reverse("frontend:login") + "?builtin=true") # type: ignore @@ -285,7 +285,7 @@ class LoginOIDCBehaviorNoCSRF(WebTest): def test_post_to_oidc_only_screen_ignored(self) -> None: """POST requests to OIDC-only screen should not process form.""" - with self.settings(SOCIAL_AUTH_OIDC_OIDC_ENDPOINT="https://auth.example.com"): + with self.settings(SOCIAL_AUTH_OIDC_OIDC_ENDPOINT="https://auth.orthos2.test"): # POST to OIDC-only screen (without builtin param) response = self.app.post( # type: ignore reverse("frontend:login"), diff --git a/orthos2/frontend/tests/user/test_restore_password.py b/orthos2/frontend/tests/user/test_restore_password.py index b1b908f5c..4736f6c84 100644 --- a/orthos2/frontend/tests/user/test_restore_password.py +++ b/orthos2/frontend/tests/user/test_restore_password.py @@ -18,7 +18,7 @@ def test_successful_restore_password(self) -> None: """Test restore password functionality.""" form = self.app.get(reverse("frontend:password_restore")).form # type: ignore form["login"] = "user" - form["email"] = "user@foo.bar" + form["email"] = "user@orthos2.test" page = form.submit().maybe_follow() # type: ignore self.assertNotEqual(page.context["user"].username, "user") # type: ignore @@ -42,7 +42,7 @@ def test_unknown_login(self) -> None: """Check if login exists.""" form = self.app.get(reverse("frontend:password_restore")).form # type: ignore form["login"] = "unknown" - form["email"] = "user@foo.bar" + form["email"] = "user@orthos2.test" page = form.submit().maybe_follow() # type: ignore self.assertNotEqual(page.context["user"].username, "unknown") # type: ignore diff --git a/orthos2/frontend/tests/user/test_user_reserve_machine.py b/orthos2/frontend/tests/user/test_user_reserve_machine.py index 63078329c..d7df8f9fa 100644 --- a/orthos2/frontend/tests/user/test_user_reserve_machine.py +++ b/orthos2/frontend/tests/user/test_user_reserve_machine.py @@ -29,7 +29,7 @@ def setUp(self) -> None: self.superuser = User.objects.get(username="superuser") self.regular_user = User.objects.get(username="user") self.target_user = User.objects.create_user( - username="targetuser", password="linux", email="target@example.com" + username="targetuser", password="linux", email="target@orthos2.test" ) def _reserve_url(self, user_id: int) -> str: diff --git a/orthos2/frontend/views/compare_netbox.py b/orthos2/frontend/views/compare_netbox.py index 6ac1569ac..30ef81a7a 100644 --- a/orthos2/frontend/views/compare_netbox.py +++ b/orthos2/frontend/views/compare_netbox.py @@ -51,6 +51,18 @@ def get_queryset(self) -> "QuerySet[NetboxOrthosComparisionRun]": if date_to: filters.append(Q(compare_timestamp__date__lte=date_to)) + query = self.request.GET.get("query") + if query: + filters.append( + Q(object_bmc__fqdn__icontains=query) + | Q(object_device_type__name__icontains=query) + | Q(object_enclosure__name__icontains=query) + | Q(object_machine__fqdn__icontains=query) + | Q(object_manufacturer__name__icontains=query) + | Q(object_network_interface__name__icontains=query) + | Q(object_remote_power_device__fqdn__icontains=query) + ) + return super().get_queryset().filter(*filters) # type: ignore def get_context_data(self, **kwargs: Any) -> Dict[str, Any]: diff --git a/orthos2/utils/misc.py b/orthos2/utils/misc.py index ca23c3833..65418eaf8 100644 --- a/orthos2/utils/misc.py +++ b/orthos2/utils/misc.py @@ -67,8 +67,8 @@ def has_valid_domain_ending( valid domain endings are given. Example: - example.de - example.com + orthos2.test + sub.orthos2.test """ if valid_endings is None: return True diff --git a/orthos2/utils/tests/test_misc.py b/orthos2/utils/tests/test_misc.py index 03a80b86b..5b08a97b2 100644 --- a/orthos2/utils/tests/test_misc.py +++ b/orthos2/utils/tests/test_misc.py @@ -27,24 +27,24 @@ class MiscMethodTests(TestCase): def test_get_domain(self) -> None: """get_domain() should return the domain for a given FQDN.""" - fqdn = "foo.bar" - assert get_domain(fqdn) == "bar" + fqdn = "foo.orthos2.test" + assert get_domain(fqdn) == "orthos2.test" - fqdn = "foo.bar.suse.de" - assert get_domain(fqdn) == "bar.suse.de" + fqdn = "foo.sub.orthos2.test" + assert get_domain(fqdn) == "sub.orthos2.test" - fqdn = "foo.bar.foobar.suse.de" - assert get_domain(fqdn) == "bar.foobar.suse.de" + fqdn = "foo.deep.sub.orthos2.test" + assert get_domain(fqdn) == "deep.sub.orthos2.test" def test_get_hostname(self) -> None: """get_hostname() should return the hostname for a given FQDN.""" - fqdn = "foo.bar" + fqdn = "foo.orthos2.test" assert get_hostname(fqdn) == "foo" - fqdn = "foo.bar.suse.de" + fqdn = "foo.sub.orthos2.test" assert get_hostname(fqdn) == "foo" - fqdn = "foo.bar.foobar.suse.de" + fqdn = "foo.deep.sub.orthos2.test" assert get_hostname(fqdn) == "foo" @mock.patch("orthos2.utils.misc.socket.gethostbyname") @@ -52,7 +52,7 @@ def test_is_dns_resolvable(self, mocked_gethostbyname: mock.MagicMock) -> None: """is_dns_resolvable() should return True if a FQDN is resolvable, False otherwise.""" import socket - fqdn = "foo.bar.suse.de" + fqdn = "foo.orthos2.test" mocked_gethostbyname.return_value = "192.168.0.1" assert is_dns_resolvable(fqdn) is True @@ -65,7 +65,7 @@ def test_has_valid_domain_ending(self) -> None: False otherwise. """ assert has_valid_domain_ending("test.foo", "foo") is True - assert has_valid_domain_ending("test.foo.bar", "foo.bar") is True + assert has_valid_domain_ending("test.orthos2.test", "orthos2.test") is True assert has_valid_domain_ending("test.foo", ["foo"]) is True assert has_valid_domain_ending("test.foo", ["bar", "foo"]) is True @@ -86,11 +86,12 @@ def test_str_time_to_datetime(self) -> None: class MiscSuggestIpTests(TestCase): def setUp(self) -> None: ServerConfig( - key="domain.validendings", value="example.de, example.com, foo.de" + key="domain.validendings", + value="orthos2.test, sub.orthos2.test, other.orthos2.test", ).save() self.domain = Domain( - name="example.de", + name="orthos2.test", ip_v4="192.168.178.0", ip_v6="fe80:0:0:1::", subnet_mask_v4=29, @@ -109,7 +110,7 @@ def setUp(self) -> None: self.arch.save() self.machine = Machine( - fqdn="test.example.de", system=self.sys, architecture=self.arch + fqdn="test.orthos2.test", system=self.sys, architecture=self.arch ) self.machine.save() @@ -178,7 +179,7 @@ def test_suggest_host_ip_v6_small_network_value(self) -> None: """ # Arrange small_domain = Domain( - name="small.example.de", + name="small.orthos2.test", ip_v4="192.168.179.0", ip_v6="::1", subnet_mask_v4=29, @@ -201,7 +202,7 @@ class ChecksMethodTests(TestCase): @mock.patch("orthos2.utils.misc.subprocess.Popen") def test_ping_check(self, mocked_popen: mock.MagicMock): """ping_check() should return True if a FQDN is pingable, False otherwise.""" - fqdn = "foo.bar.suse.de" + fqdn = "foo.orthos2.test" mocked_popen.return_value.returncode = 0 assert ping_check(fqdn) is True @@ -218,7 +219,7 @@ def test_nmap_check( """nmap_check() should return True if a host runs SSH, False otherwise.""" import socket - fqdn = "foo.bar.suse.de" + fqdn = "foo.orthos2.test" mocked_ping_check.return_value = False mocked_connect.return_value = True assert nmap_check(fqdn) is False diff --git a/setup.py b/setup.py index 7d0d1f8d7..b456f59b6 100644 --- a/setup.py +++ b/setup.py @@ -22,7 +22,7 @@ def requires(filename: str = "requirements.txt"): if __name__ == "__main__": setup( name="orthos2", - version="1.17", + version="1.18", description="Machine administration server", long_description=""" Orthos is the machine administration tool of the development network at SUSE.