1 В избранное 0 Ответвления 0

OSCHINA-MIRROR/openeuler-stratovirt

Присоединиться к Gitlife
Откройте для себя и примите участие в публичных проектах с открытым исходным кодом с участием более 10 миллионов разработчиков. Приватные репозитории также полностью бесплатны :)
Присоединиться бесплатно
В этом репозитории не указан файл с открытой лицензией (LICENSE). При использовании обратитесь к конкретному описанию проекта и его зависимостям в коде.
Клонировать/Скачать
args.rs 3.5 КБ
Копировать Редактировать Web IDE Исходные данные Просмотреть построчно История
yezengruan Отправлено 2 лет назад 3f9f1ec
// Copyright (c) 2020 Huawei Technologies Co.,Ltd. All rights reserved.
//
// StratoVirt is licensed under Mulan PSL v2.
// You can use this software according to the terms and conditions of the Mulan
// PSL v2.
// You may obtain a copy of Mulan PSL v2 at:
// http://license.coscl.org.cn/MulanPSL2
// THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY
// KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
// NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
// See the Mulan PSL v2 for more details.
use util::arg_parser::{Arg, ArgParser};
const VERSION: Option<&'static str> = option_env!("CARGO_PFG_VERSION");
/// Create arguments parser from cmdline.
pub fn create_args_parser<'a>() -> ArgParser<'a> {
ArgParser::new("Ozone")
.version(VERSION.unwrap_or("unknown"))
.author("Huawei Technologies Co., Ltd")
.about("A light security sandbox.\nUse \'--\' to set exec_file arguments")
.arg(
Arg::with_name("name")
.long("name")
.value_name("process_name")
.help("set the name of the ozone.")
.required(true)
.takes_value(true),
)
.arg(
Arg::with_name("exec_file")
.long("exec-file")
.value_name("binary_file_path")
.help("set the executable binary file of the ozone.")
.required(true)
.takes_value(true),
)
.arg(
Arg::with_name("uid")
.long("uid")
.value_name("user id")
.help("set the user id of the ozone.")
.required(true)
.takes_value(true),
)
.arg(
Arg::with_name("gid")
.long("gid")
.value_name("group id")
.help("set the group id of the ozone.")
.required(true)
.takes_value(true),
)
.arg(
Arg::with_name("source_files")
.long("source")
.value_name("source_file")
.help("set the source file of the ozone, such as vmlinux and rootfs")
.required(false)
.takes_values(true),
)
.arg(
Arg::with_name("network namespace")
.long("netns")
.value_name("network namespace path")
.help("set the network namespace of the ozone.")
.required(false)
.takes_value(true),
)
.arg(
Arg::with_name("clean_resource")
.long("clean-resource")
.help("clean ozone mount path.")
.required(false)
.takes_value(false),
)
.arg(
Arg::with_name("capability")
.long("capability")
.value_name("set capabilities")
.help("set the capabilities of the ozone.")
.required(false)
.takes_value(true),
)
.arg(
Arg::with_name("cgroup")
.long("cgroup")
.help("set cgroup arguments, use -cgroup <controller>=<value1> ...")
.required(false)
.takes_values(true),
)
.arg(
Arg::with_name("numa")
.long("numa")
.value_name("set numa node")
.help("set the numa node of the ozone.")
.required(false)
.takes_value(true),
)
}

Опубликовать ( 0 )

Вы можете оставить комментарий после Вход в систему

1
https://gitlife.ru/oschina-mirror/openeuler-stratovirt.git
git@gitlife.ru:oschina-mirror/openeuler-stratovirt.git
oschina-mirror
openeuler-stratovirt
openeuler-stratovirt
master