#51160 Ticket 51159 - dsidm ou delete fails
Closed 3 years ago by spichugi. Opened 3 years ago by firstyear.
firstyear/389-ds-base 51159-delete-ou  into  master

@@ -41,7 +41,7 @@ 

      _generic_create(inst, basedn, log.getChild('_generic_create'), MANY, kwargs, args)

  

  def delete(inst, basedn, log, args):

-     dn = _get_arg( args, msg="Enter dn to delete")

+     dn = _get_arg(args.dn, msg="Enter dn to delete")

      _warn(dn, msg="Deleting %s %s" % (SINGULAR.__name__, dn))

      _generic_delete(inst, basedn, log.getChild('_generic_delete'), SINGULAR, dn, args)

  

Bug Description: delete ou would fail with a stack
trace due to incorrect variable args

Fix Description: use args.dn

https://pagure.io/389-ds-base/issue/51159

Author: William Brown william@blackhats.net.au

Review by: ???

I wonder if we should specify RDN value there (as dsidm -b dc=example,dc=com organizationalunit list shows the list of RDN values so it's more convenient)

But it's probably not the PR where we should deal with it. So you have an ack from me too, BTW

Yeah, in the past I used the shortnams because most of the get/modify commands use the selector element rather than the dn. The dn in delete is more abotu being really sure about what you are deleting.

Saying that, the better answer may just be to have delete take the shortname instead.

rebased onto f97a86a

3 years ago

Pull-Request has been merged by firstyear

3 years ago

389-ds-base is moving from Pagure to Github. This means that new issues and pull requests
will be accepted only in 389-ds-base's github repository.

This pull request has been cloned to Github as issue and is available here:
- https://github.com/389ds/389-ds-base/issues/4213

If you want to continue to work on the PR, please navigate to the github issue,
download the patch from the attachments and file a new pull request.

Thank you for understanding. We apologize for all inconvenience.

Pull-Request has been closed by spichugi

3 years ago
Metadata