1 # Licensed to the Apache Software Foundation (ASF) under one or more
2 # contributor license agreements. See the NOTICE file distributed with
3 # this work for additional information regarding copyright ownership.
4 # The ASF licenses this file to You under the Apache License, Version 2.0
5 # (the "License"); you may not use this file except in compliance with
6 # the License. You may obtain a copy of the License at
8 # http://www.apache.org/licenses/LICENSE-2.0
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
17 CLI ``reset`` command.
20 from .. import helptexts
21 from ..core import aria
23 from ..exceptions import AriaCliError
26 @aria.command(name='reset',
27 short_help="Reset ARIA working directory")
28 @aria.options.force(help=helptexts.FORCE_RESET)
29 @aria.options.reset_config
31 @aria.options.verbose()
32 def reset(force, reset_config, logger):
34 Reset ARIA working directory
36 Deletes installed plugins, service templates, services, executions, and logs. The user
37 configuration will remain intact unless the `--reset_config` flag has been set as well, in
38 which case the entire ARIA working directory shall be removed.
41 raise AriaCliError("To reset the ARIA's working directory, you must also provide the force"
42 " flag ('-f'/'--force').")
44 env.reset(reset_config=reset_config)
45 logger.info("ARIA's working directory has been reset")