← Back to team overview

cloud-init-dev team mailing list archive

Re: [Merge] ~daniel-thewatkins/cloud-init/+git/cloud-init:useradd into cloud-init:master


On Mon, Aug 12, 2019 at 02:31:18PM -0000, Ryan Harper wrote:
> The method is call add_user and the variables match the method.

If the variable matched the method, I'd expect it to be add_user_cmd.
I'd be fine with that, if that's what you would prefer?

> So now we have
> def add_user()
>    useradd_cmd = 
> Isn't this the same confusion?

I don't think so; the name of the command we do actually use is
hardcoded in a string literal later on that line:

    useradd_cmd = ['useradd', ...]

> The command to add a user could be something else.

Not without code changes, which I would expect to also change the
variable name.

> In cloudinit/distros/freebsd.py for example, the adduser_cmd , is 'pw
> useradd'.

Right, I didn't touch the variable name there.

Your team cloud-init commiters is requested to review the proposed merge of ~daniel-thewatkins/cloud-init/+git/cloud-init:useradd into cloud-init:master.