33 Commits

Author SHA1 Message Date
Tovin Seven
1877a1e4e8 Make --os-profile load from environment variables
+ Make --os-profile argument can be loaded from OS_PROFILE
  environment variables to avoid repeating --os-profile
  in client commands.
+ Correct information in help of --os-profile argument

Co-Authored-By: Hieu LE <hieulq@vn.fujitsu.com>
Change-Id: Ib1bbc3627bf976cc96ac623ee37b5d848e44f34f
2017-06-19 13:38:13 +07:00
ForestLee
5aada5194e delete bash_completion in subcommand
There are two "completion" in the subcommand table: bash-completion
and bash_completion. but "bash_completion" is not in help information
and it is repeated with "bash-completion", so delete it.

Change-Id: I0c2fb8b77b737c2ffc05dd4bb641125e88a4fde4
Closes-Bug: #1670123
2017-03-13 19:54:46 +08:00
lvdongbing
e648fb44db Change osprofiler option "--profile" to "--os-profile"
Osprofiler option "--profile" is conficting with the one in
cluster-create and node-create, this patch changes the former
to "--os-profile".

Change-Id: Ida340a6e503c735d45d8bc27c59e45dcb5d0e018
2016-10-14 02:07:42 -04:00
xiaozhuangqing
41f7679062 Make shell main() specify return value in exit code
sys.exit() calls in main() will make the interactive
python interpreter exit. We can call the main() as
below to avoid to exit the interactive interpreter,
and specify the return value of main() in the exit
code at the same time.
sys.exit(main())

also see: I6ead9853fe27e99df3e9121478e906a06839f48c

Change-Id: I3086dc0529c4343f246f543de1b6ee6540438a98
2016-09-08 09:40:49 +08:00
tengqm
92f52735cb Remove 'ProfileAction' and related arguments
The 'ProfileAction' class and the related user_preferences are
pre-history relics. Keeping them in senlinclient is only causing
confusion considering that 1) senlin shell will be deprecated someday;
2) SDK has some tweaks to the design that we cannot follow up; 3) these
arguments are rarely used.

Change-Id: Ia79a069bde4fd94bc1bd00f719b4e6b4a56770f8
2016-08-10 03:48:42 -04:00
tengqm
f7ecc4bb86 Add cluster_collect support
This patch adds the cluster_collect command.

Change-Id: I750a33ceb9353aa445dba8464affd8ae7798eba6
2016-08-09 11:42:53 -04:00
Jenkins
3743dbc8b9 Merge "Update senlinclient for new sdk version" 2016-07-30 15:37:05 +00:00
tengqm
dd21b7aa0b Update senlinclient for new sdk version
This patch fixes problem found after sdk version 0.9.1 which includes a
new implementation of senlin cluster resources.

Change-Id: I67b265731f34080df85233dac09c1256f43aecdb
2016-07-29 02:15:56 -04:00
zzxwill
b5dc38d8ff Enhance message related to OS_PROJECT_DOMAIN_NAME
env[OS_PROJECT_DOMAIN_NAME] aren't complete in the
two messages. Enhance them.

Change-Id: Ia6c63cfa648be48d40bb2473ffbdcbd3304ee344
2016-06-23 14:14:22 +00:00
tengqm
ece213914b Revert "Remove senlin CLI commands"
This reverts commit 3bda3b997bf3701746c7a2e4760f9528a18a2cbd.

We cannot rely on openstackclient as it is today. There are OSC
parameters preventing senlin client from normal operation and we see no
easy resolution when both OSC and senlinclient has been released.

Change-Id: I6b09699afcd45d36caea3e9f6ee0d132cc57354f
2016-03-31 21:59:24 -04:00
tengqm
3bda3b997b Remove senlin CLI commands
We are deprecating the senlin CLI in favor of the OSC-plugin way of
command line support. This patch removes shell support from the code
base.

Change-Id: I1ff2f4643ab9f8e719abad9b7cca3c2a60fbffc2
2016-03-25 01:07:01 -04:00
Ayush Garg
d9c7398ed4 Update the word 'Senin' to 'Senlin'
Correcting the word 'Senin' to 'Senlin' in the msg variable for
warning.

Change-Id: I5b4a309ddc36328bf56123f1b979f3eb5e1ff171
2016-01-19 15:41:56 +05:30
tengqm
d14f733765 Switch to use SDK calls in client
This patch revises more calls from client side to use SDK interface.

Change-Id: I3ec4c3e7315f204d4eb6022bed63abd6b28e8157
2016-01-04 01:36:36 -05:00
zhangguoqing
0edbcd5cc1 Fix pep8 error about D300
This patch fix the pep8 error D300 about symbol that
D300  Use """triple double quotes""" (found '''-quotes)
when execute run_tests.sh.

Change-Id: I79076b0d2a02eea59a47f263ad6bb30e48c6d1b7
2015-12-09 21:26:55 +08:00
tengqm
0e1e4857f6 Fix bug introduced by openstacksdk
This patch sets the default auth_plugin to 'password', it also removes
the authenticator reference from client module. These code are breaking
the client code.

Change-Id: I7f815d3847b0bd0f5e6c3f78c2cc0efd3c80a523
2015-11-24 02:00:25 -05:00
tengqm
63b8839741 Fix client constructor for ease of use
This patch optimizes the client constructor so that caller doesn't have
to provide user_preferences or user_agent arguments. It would be a
convenience for projects such as senlin-dashboard.

Change-Id: I0e98fb055441a941ad7c9da6e36b4a388ae0a75a
2015-09-30 04:45:26 -04:00
tengqm
256e6302bd Revise client constructor
This patch revises the client.Client constructor so that other software
can invoke senlinclient in the same way as they do with other client
packages.

Change-Id: I060e2bf70d51ec381934cfd487a1a6cb44f0edd2
Closes-Bug: #1498906
2015-09-23 11:14:52 -04:00
Haiwei Xu
c96b93087b Add test case for shell(part2)
Add test case for shell, also fix some LOG errors.

Change-Id: Ib46c604f710beee39b884170621fd95efac4c041
2015-09-16 11:36:13 +09:00
tengqm
f5161f283e Shell unit test (1)
Unit tests for the shell module.

Change-Id: I77e56afb48fea769dd526916bf3e06222f83a613
2015-09-08 05:59:12 -04:00
Haiwei Xu
ac7c4b3a06 Support keystone v2 and v3
Though senlin uses keystone v3 on the server side, on the
client side should support both keystone v2 and v3.

Change-Id: I12711b87a2ab114f42abd1c1b4e7fd1724311e4c
2015-07-03 09:18:50 +09:00
tengqm
bf4f39564d Try please flake8 for imports grouping
Flake8 is now complaining about the grouping of imports. This patch try
please it by moving imports around.

Change-Id: I65a0ee03d8fcc78de597d06424f647e0a2d2beae
2015-05-15 03:32:10 -04:00
Ethan Lynn
365bcee3a6 Add options for tennat_id/tenant_name
Add options for tennat_id/tenant_name and remove some args check.

Change-Id: Ib7d3177587232ce5489e52fa55839575a8a7c3f9
2015-04-17 10:52:25 +08:00
tengqm
e3ed9b95c0 Added support to OS_TRUST_ID 2015-03-05 16:25:15 +08:00
tengqm
f5618e3643 Added support to project field in node objects 2015-02-27 19:35:07 +08:00
tengqm
0175bc6578 Fix user name argument parsing 2015-02-25 19:35:39 +08:00
tengqm
8f3600c7ed assign alias to client module
With alias, the reference is more clear.
2015-01-30 13:52:21 +08:00
tengqm
d373c15158 Make error message more clear when username is assigned 2015-01-26 22:46:03 +08:00
tengqm
d3c4b191db Fixed flake8 errors 2015-01-25 19:50:02 +08:00
tengqm
a45014b691 Major revision to shell main module
Revisions include:
1. Added user agent support.
2. Partially completed identity argument checking that will check
   all options for authentication.
3. Added project_id, domain_id, project_domain_id, user_domain_id and
   user_id to the call of connection creation.
2015-01-25 19:31:56 +08:00
tengqm
4bde100d32 Revised error message for project_id validation 2015-01-18 22:09:06 +08:00
tengqm
d95088619d Reimplemented client shell
The shell now skips discovery of keystone versions or session creation
because all those details are encapsulated inside SDK.

We don't support server side authentication at the moment.

Argument parsing is moved out to a separate module.
2015-01-16 15:23:45 +08:00
tengqm
f3e30679ed Move exc module to common subdir 2015-01-05 19:51:23 +08:00
tengqm
0a79f60ff1 Initial version
Need to revisit if keystone V2 support is needed.
2015-01-05 10:05:04 +08:00