Bug 7809 - [CLI] Syntax `ipRange' Eingabe- und Ausgabeformat unterscheiden sich
[CLI] Syntax `ipRange' Eingabe- und Ausgabeformat unterscheiden sich
Status: CLOSED WORKSFORME
Product: UCS
Classification: Unclassified
Component: UDM - CLI
UCS 4.1
All Linux
: P4 normal (vote)
: UCS 4.1-4-errata
Assigned To: Philipp Hahn
Florian Best
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2007-02-21 13:42 CET by Martin Kuehl
Modified: 2016-11-14 19:29 CET (History)
2 users (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 1: Cosmetic issue or missing function but workaround exists
Who will be affected by this bug?: 1: Will affect a very few installed domains
How will those affected feel about the bug?: 1: Nuisance – not a big deal but noticeable
User Pain: 0.006
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Kuehl univentionstaff 2007-02-21 13:42:38 CET
Die Syntax `ipRange' wird mit zwei Leerzeichen zwischen Start- und Endpunkt ausgegeben, z.B. an einem dhcp/subnet:

cn=19.168.1.0
DN: cn=19.168.1.0,cn=testdhcpservice,cn=dhcp,dc=ucs,dc=local
ARG: None
  filler: None
  subnet: 19.168.1.0
  range: 19.168.1.100  19.168.1.150
  range: 19.168.1.151  19.168.1.200
  broadcastaddress: None
  subnetmask: 24

Das Eingabeformat fordert aber ein *einzelnes* Leerzeichen zwischen den beiden; der Aufruf des CLI-Admin mit zweien führt zu diesem Traceback:

Traceback (most recent call last):
  File "/usr/share/univention-admin-tools/univention-cli-server", line 227, in doit
    output = univention.admincli.admin.doit(arglist)
  File "/usr/lib/python2.4/site-packages/univention/admincli/admin.py", line 704, in doit
    dn=object.create()
  File "modules/univention/admin/handlers/__init__.py", line 288, in create
  File "modules/univention/admin/handlers/__init__.py", line 538, in _create
  File "modules/univention/admin/handlers/dhcp/subnet.py", line 190, in _ldap_modlist
  File "modules/univention/admin/ipaddress.py", line 48, in ip_is_in_network
error: illegal IP address string passed to inet_aton

Das Problem ist dabei, dass der cli-admin den Wert an einem *einzelnen* Leerzeichen auftrennt (admin.py, Z. 240):

    val=value[i].split(' ')

Damit sich das Eingabe- und Ausgabeformat entsprechen, könnte entweder
- syntax.ipRange.tostring so geändert werden, dass ein -- statt zwei -- Leerzeichen als Trennung benutzt wird, oder
- admin.py so geändert werden, dass an None getrennt wird (dazu werden `split' einfach keine Argumente übergeben), womit automatisch zusamenhängende Läufe von Leerzeichen verwandt werden.
Leerzeichen in Werten werden weiterhin (und genauso wie vorher) durch explizite quotes unterstützt.
Comment 1 Stefan Gohmann univentionstaff 2014-02-18 21:29:19 CET
This issue has been filed against the UCS version "unstable" which does not really exist. Please change the version value.
Comment 2 Philipp Hahn univentionstaff 2016-11-02 12:08:43 CET
# udm dhcp/subnet list --superordinate cn=test,cn=dhcp,dc=phahn,dc=qa
DN: cn=1.1.0.0,cn=test,cn=dhcp,dc=phahn,dc=qa
ARG: None
  subnet: 1.1.0.0
  range: 1.1.128.1 1.1.191.254
  range: 1.1.1.1 1.1.127.254
  broadcastaddress: 1.1.255.255
  subnetmask: 16
Comment 3 Florian Best univentionstaff 2016-11-14 19:29:22 CET
Verified:

# udm dhcp/subnet create --superordinate cn=service1672,dc=school,dc=local --set subnet=19.168.1.0 --append range='19.168.1.100  19.168.1.150' --append range='19.168.1.151  19.168.1.200' --set subnetmask=24
E: Invalid Syntax: range: too many arguments
Comment 4 Florian Best univentionstaff 2016-11-14 19:29:33 CET
Nothing to release.