-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathcommon.py
More file actions
57 lines (49 loc) · 1.2 KB
/
common.py
File metadata and controls
57 lines (49 loc) · 1.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
import click
def common(function):
"""Add common options to click commands"""
function = click.option(
"--input",
"input_json",
help="JSON input data with settings",
required=False,
type=str,
)(function)
function = click.option(
"--username",
help="Username for authentication",
type=str,
required=False,
)(function)
function = click.option(
"--password",
help="Password for authentication",
type=str,
required=False,
hide_input=True,
)(function)
# Add additional user properties
function = click.option(
"--uid",
help="User ID number",
type=int,
required=False,
)(function)
function = click.option(
"--gid",
help="Primary group ID",
type=int,
required=False,
)(function)
function = click.option(
"--home",
help="Home directory path",
type=str,
required=False,
)(function)
function = click.option(
"--shell",
help="Login shell path",
type=str,
required=False,
)(function)
return function