Repository: cobbler/cobbler

Issue:
Cannot enable PXE menu for a profile
### Describe the bug

<!--- A clear and concise description of what the bug is. -->

<!--- HINT: You can paste gist.github.com links for long logs or larger files -->

Running the following command fails:

```
# cobbler profile edit --name packer-ppc64le --enable-menu 1
exception on server: 'Archs' object has no attribute 'startswith'
```

### Steps to reproduce

1. Create a distro (ppc64le)
2. Create a profile
3. Try to enable PXE menu

### Expected behavior

<!--- A clear and concise description of what you expected to happen. -->

The command should not fail.

### Cobbler version

<!--- Paste output from `cobbler version` -->
````paste below
Cobbler 3.2.1
  source: ?, ?
  build time: Tue Jun 22 15:41:34 2021
````

### Operating system

<!--- On which operating system do you use Cobbler? -->

CentOS 8.

### Cobbler log

<!--- Paste (partial) output from `/var/log/cobbler/cobbler.log` -->
````paste below
[Thread-283] 2021-06-22T16:27:59 - INFO | find_items; ['']                                                                                                                   [5/1913]
[Thread-283] 2021-06-22T16:27:59 - INFO | find_items; ['distro']
[Thread-283] 2021-06-22T16:27:59 - INFO | find_items; ['profile']
[Thread-283] 2021-06-22T16:27:59 - INFO | find_items; ['system']
[Thread-283] 2021-06-22T16:27:59 - INFO | Exception occurred: <class 'AttributeError'>
[Thread-283] 2021-06-22T16:27:59 - INFO | Exception value: 'Archs' object has no attribute 'startswith'
[Thread-283] 2021-06-22T16:27:59 - INFO | Exception Info:
  File "/usr/lib/python3.6/site-packages/cobbler/remote.py", line 3505, in _dispatch
    return method_handle(*params)

  File "/usr/lib/python3.6/site-packages/cobbler/remote.py", line 1988, in xapi_object_edit
    self.save_item(object_type, handle, token)

  File "/usr/lib/python3.6/site-packages/cobbler/remote.py", line 2008, in save_item
    self.api.add_item(what, obj)

  File "/usr/lib/python3.6/site-packages/cobbler/api.py", line 744, in add_item
    self.get_items(what).add(ref, check_for_duplicate_names=check_for_duplicate_names, save=save)

  File "/usr/lib/python3.6/site-packages/cobbler/cobbler_collections/collection.py", line 401, in add
    self.lite_sync.add_single_profile(ref.name)

  File "/usr/lib/python3.6/site-packages/cobbler/actions/sync.py", line 396, in add_single_profile
    self.add_single_system(k)

  File "/usr/lib/python3.6/site-packages/cobbler/actions/sync.py", line 442, in add_single_system
    self.tftpd.sync_single_system(system)

  File "/usr/lib/python3.6/site-packages/cobbler/modules/managers/in_tftpd.py", line 117, in sync_single_system
    menu_items = self.tftpgen.get_menu_items()

  File "/usr/lib/python3.6/site-packages/cobbler/tftpgen.py", line 367, in get_menu_items
    return self.get_menu_level(None, arch)

  File "/usr/lib/python3.6/site-packages/cobbler/tftpgen.py", line 549, in get_menu_level
    self.get_profiles_menu(menu, metadata, arch)

  File "/usr/lib/python3.6/site-packages/cobbler/tftpgen.py", line 449, in get_profiles_menu
    image=None, format=boot_loader)

  File "/usr/lib/python3.6/site-packages/cobbler/tftpgen.py", line 677, in write_pxe_file
    image, arch, metadata["autoinstall"])

  File "/usr/lib/python3.6/site-packages/cobbler/tftpgen.py", line 1004, in build_kernel_options
    if arch is not None and arch.startswith("arm"):
````



Discussion:

Resolving patch:
diff --git a/cobbler/tftpgen.py b/cobbler/tftpgen.py
--- a/cobbler/tftpgen.py
+++ b/cobbler/tftpgen.py
@@ -1001,7 +1001,7 @@ def build_kernel_options(self, system, profile, distro, image, arch: str, autoin
             append_line = "%s suite=%s" % (append_line, distro.os_version)
 
         # append necessary kernel args for arm architectures
-        if arch is not None and arch.startswith("arm"):
+        if arch is enums.Archs.ARM:
             append_line = "%s fixrtc vram=48M omapfb.vram=0:24M" % append_line
 
         # do variable substitution on the append line


Test patch: