Mike Frysinger | e58c0e2 | 2017-10-04 15:43:30 -0400 | [diff] [blame] | 1 | # -*- coding: utf-8 -*- |
Achuith Bhandarkar | d8d1929 | 2016-05-03 14:32:58 -0700 | [diff] [blame] | 2 | # Copyright 2016 The Chromium OS Authors. All rights reserved. |
| 3 | # Use of this source code is governed by a BSD-style license that can be |
| 4 | # found in the LICENSE file. |
| 5 | |
Achuith Bhandarkar | e3d5e57 | 2018-11-17 14:29:51 -0800 | [diff] [blame] | 6 | """CLI entry point into lib/vm.py; used for VM management.""" |
Achuith Bhandarkar | d8d1929 | 2016-05-03 14:32:58 -0700 | [diff] [blame] | 7 | |
| 8 | from __future__ import print_function |
| 9 | |
Mike Frysinger | 4a243fb | 2020-02-21 02:56:35 -0500 | [diff] [blame^] | 10 | import sys |
| 11 | |
Achuith Bhandarkar | e3d5e57 | 2018-11-17 14:29:51 -0800 | [diff] [blame] | 12 | from chromite.lib import vm |
Achuith Bhandarkar | 9f49aca | 2018-10-30 17:46:07 -0700 | [diff] [blame] | 13 | |
Mike Frysinger | 4a243fb | 2020-02-21 02:56:35 -0500 | [diff] [blame^] | 14 | |
| 15 | assert sys.version_info >= (3, 6), 'This module requires Python 3.6+' |
| 16 | |
| 17 | |
Achuith Bhandarkar | d8d1929 | 2016-05-03 14:32:58 -0700 | [diff] [blame] | 18 | def main(argv): |
Achuith Bhandarkar | e3d5e57 | 2018-11-17 14:29:51 -0800 | [diff] [blame] | 19 | opts = vm.VM.GetParser().parse_args(argv) |
Achuith Bhandarkar | 2beae29 | 2018-03-26 16:44:53 -0700 | [diff] [blame] | 20 | opts.Freeze() |
| 21 | |
Achuith Bhandarkar | e3d5e57 | 2018-11-17 14:29:51 -0800 | [diff] [blame] | 22 | vm.VM(opts).Run() |