diff options
author | Markus Lehtonen <markus.lehtonen@linux.intel.com> | 2015-05-11 16:17:01 +0300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-05-16 22:31:50 +0100 |
commit | 7883af3097e043dd5b0f2c6f5f37189d9f70549e (patch) | |
tree | 449b76bfab9f172c2c55b8161f72f17b6b296abe /scripts/lib/devtool/deploy.py | |
parent | c977cdf3d85da74ff4f5c9b10bf3caad7cb25204 (diff) | |
download | poky-7883af3097e043dd5b0f2c6f5f37189d9f70549e.tar.gz |
devtool: add missing docstrings
(From OE-Core rev: 07b2e731a378c56852e2715f6c001097b81abe46)
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/lib/devtool/deploy.py')
-rw-r--r-- | scripts/lib/devtool/deploy.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/scripts/lib/devtool/deploy.py b/scripts/lib/devtool/deploy.py index 4f968c6f21..3c7abfa8a7 100644 --- a/scripts/lib/devtool/deploy.py +++ b/scripts/lib/devtool/deploy.py | |||
@@ -14,6 +14,7 @@ | |||
14 | # You should have received a copy of the GNU General Public License along | 14 | # You should have received a copy of the GNU General Public License along |
15 | # with this program; if not, write to the Free Software Foundation, Inc., | 15 | # with this program; if not, write to the Free Software Foundation, Inc., |
16 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | 16 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
17 | """Devtool plugin containing the deploy subcommands""" | ||
17 | 18 | ||
18 | import os | 19 | import os |
19 | import subprocess | 20 | import subprocess |
@@ -23,10 +24,12 @@ from devtool import exec_build_env_command | |||
23 | logger = logging.getLogger('devtool') | 24 | logger = logging.getLogger('devtool') |
24 | 25 | ||
25 | def plugin_init(pluginlist): | 26 | def plugin_init(pluginlist): |
27 | """Plugin initialization""" | ||
26 | pass | 28 | pass |
27 | 29 | ||
28 | 30 | ||
29 | def deploy(args, config, basepath, workspace): | 31 | def deploy(args, config, basepath, workspace): |
32 | """Entry point for the devtool 'deploy' subcommand""" | ||
30 | import re | 33 | import re |
31 | 34 | ||
32 | if not args.recipename in workspace: | 35 | if not args.recipename in workspace: |
@@ -87,7 +90,7 @@ def deploy(args, config, basepath, workspace): | |||
87 | return 0 | 90 | return 0 |
88 | 91 | ||
89 | def undeploy(args, config, basepath, workspace): | 92 | def undeploy(args, config, basepath, workspace): |
90 | 93 | """Entry point for the devtool 'undeploy' subcommand""" | |
91 | deploy_file = os.path.join(basepath, 'target_deploy', args.target, args.recipename + '.list') | 94 | deploy_file = os.path.join(basepath, 'target_deploy', args.target, args.recipename + '.list') |
92 | if not os.path.exists(deploy_file): | 95 | if not os.path.exists(deploy_file): |
93 | logger.error('%s has not been deployed' % args.recipename) | 96 | logger.error('%s has not been deployed' % args.recipename) |
@@ -122,6 +125,7 @@ def undeploy(args, config, basepath, workspace): | |||
122 | 125 | ||
123 | 126 | ||
124 | def register_commands(subparsers, context): | 127 | def register_commands(subparsers, context): |
128 | """Register devtool subcommands from the deploy plugin""" | ||
125 | parser_deploy = subparsers.add_parser('deploy-target', help='Deploy recipe output files to live target machine') | 129 | parser_deploy = subparsers.add_parser('deploy-target', help='Deploy recipe output files to live target machine') |
126 | parser_deploy.add_argument('recipename', help='Recipe to deploy') | 130 | parser_deploy.add_argument('recipename', help='Recipe to deploy') |
127 | parser_deploy.add_argument('target', help='Live target machine running an ssh server: user@hostname[:destdir]') | 131 | parser_deploy.add_argument('target', help='Live target machine running an ssh server: user@hostname[:destdir]') |