@@ -812,13 +812,10 @@ def dashboard_token(
812
812
813
813
@intercept_exception
814
814
def k8smanifest (self ):
815
- """Retrieve the k8smanifest.
816
- """
815
+ """Retrieve the k8smanifest."""
817
816
response = get_client ().k8s_cluster .k8smanifest ()
818
817
print (
819
- yaml .dump (
820
- yaml .load (json .dumps (response ), Loader = yaml .FullLoader ,)
821
- )
818
+ yaml .dump (yaml .load (json .dumps (response ), Loader = yaml .FullLoader ,))
822
819
)
823
820
824
821
def get_installed_addons (self , id ):
@@ -1524,7 +1521,7 @@ def _get_metadata(self):
1524
1521
for module_name in self .cli .__dict__ .keys ():
1525
1522
1526
1523
# we manually define autocomplete for these methods
1527
- if module_name in ["autocomplete" , "configure_cli" ]:
1524
+ if module_name in ["autocomplete" , "configure_cli" , "version" ]:
1528
1525
continue
1529
1526
1530
1527
module = getattr (self .cli , module_name )
@@ -1666,7 +1663,7 @@ def bash(self,):
1666
1663
COMPREPLY=( $(compgen -W "bash" -- $cur) )
1667
1664
;;
1668
1665
*"hpecp"*)
1669
- COMPREPLY=( $(compgen -W "autocomplete configure-cli {{module_names}}" -- $cur) )
1666
+ COMPREPLY=( $(compgen -W "autocomplete configure-cli version {{module_names}}" -- $cur) )
1670
1667
;;
1671
1668
esac
1672
1669
return 0
@@ -1685,6 +1682,11 @@ def bash(self,):
1685
1682
)
1686
1683
1687
1684
1685
+ def version ():
1686
+ """Display version information."""
1687
+ print (ContainerPlatformClient .version ())
1688
+
1689
+
1688
1690
class CLI (object ):
1689
1691
"""Command Line Interface for the HPE Container Platform."""
1690
1692
@@ -1706,6 +1708,7 @@ def __init__(self,):
1706
1708
self .httpclient = HttpClientProxy ()
1707
1709
self .user = UserProxy ()
1708
1710
self .role = RoleProxy ()
1711
+ self .version = version
1709
1712
1710
1713
1711
1714
if __name__ == "__main__" :
0 commit comments