Skip to content

Commit 11013fc

Browse files
authored
Update API documentation for control_plane and control_plane_info modules (#322)
Signed-off-by: Webster Mudge <wmudge@cloudera.com>
1 parent d55a801 commit 11013fc

File tree

2 files changed

+32
-24
lines changed

2 files changed

+32
-24
lines changed

plugins/modules/control_plane.py

Lines changed: 27 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -15,30 +15,6 @@
1515
# See the License for the specific language governing permissions and
1616
# limitations under the License.
1717

18-
19-
import yaml
20-
from typing import Optional
21-
from cm_client import (
22-
ClustersResourceApi,
23-
ControlPlanesResourceApi,
24-
ApiInstallControlPlaneArgs,
25-
ApiInstallEmbeddedControlPlaneArgs,
26-
CommandsResourceApi,
27-
)
28-
29-
from ansible_collections.cloudera.cluster.plugins.module_utils.cm_utils import (
30-
ClouderaManagerModule,
31-
)
32-
33-
from ansible_collections.cloudera.cluster.plugins.module_utils.cluster_utils import (
34-
parse_cluster_result,
35-
parse_control_plane_result,
36-
)
37-
from ansible.module_utils.common.validation import check_missing_parameters
38-
from ansible.module_utils.common.text.converters import to_native
39-
40-
from cm_client.rest import ApiException
41-
4218
DOCUMENTATION = r"""
4319
module: control_plane
4420
short_description: Manage Cloudera control planes
@@ -50,13 +26,16 @@
5026
- "Jim Enright (@jimright)"
5127
version_added: 5.0.0
5228
extends_documentation_fragment:
29+
- ansible.builtin.action_common_attributes
5330
- cloudera.cluster.cm_options
5431
- cloudera.cluster.cm_endpoint
5532
attributes:
5633
check_mode:
5734
support: full
5835
diff_mode:
5936
support: full
37+
platform:
38+
platforms: all
6039
requirements:
6140
- cm-client
6241
options:
@@ -245,6 +224,30 @@
245224
returned: when available
246225
"""
247226

227+
import yaml
228+
229+
from typing import Optional
230+
231+
from cm_client import (
232+
ClustersResourceApi,
233+
ControlPlanesResourceApi,
234+
ApiInstallEmbeddedControlPlaneArgs,
235+
CommandsResourceApi,
236+
)
237+
from cm_client.rest import ApiException
238+
239+
from ansible_collections.cloudera.cluster.plugins.module_utils.cm_utils import (
240+
ClouderaManagerModule,
241+
)
242+
243+
from ansible_collections.cloudera.cluster.plugins.module_utils.cluster_utils import (
244+
parse_cluster_result,
245+
parse_control_plane_result,
246+
)
247+
from ansible.module_utils.common.validation import check_missing_parameters
248+
from ansible.module_utils.common.text.converters import to_native
249+
250+
248251
# Constant for the tag used to identify the control plane in Experience Cluster
249252
CONTROL_PLANE_IDENTIFIER_TAG = "_cldr_cm_ek8s_control_plane"
250253

plugins/modules/control_plane_info.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,16 @@
2424
author:
2525
- "Jim Enright (@jimright)"
2626
extends_documentation_fragment:
27+
- ansible.builtin.action_common_attributes
2728
- cloudera.cluster.cm_options
2829
- cloudera.cluster.cm_endpoint
2930
attributes:
3031
check_mode:
3132
support: full
33+
diff_mode:
34+
support: full
35+
platform:
36+
platforms: all
3237
requirements:
3338
- cm-client
3439
seealso:

0 commit comments

Comments
 (0)