-
Notifications
You must be signed in to change notification settings - Fork 664
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
171 changed files
with
308,046 additions
and
1,469 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
Copyright 2016-2020 Microsoft, Inc. | ||
|
||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
|
||
http://www.apache.org/licenses/LICENSE-2.0 | ||
|
||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
#!/usr/sbin/env python | ||
|
||
import click | ||
|
||
import utilities_common.cli as clicommon | ||
|
||
# | ||
# 'chassis_modules' group ('config chassis_modules ...') | ||
# | ||
@click.group(cls=clicommon.AliasedGroup) | ||
def chassis_modules(): | ||
"""Configure chassis-modules options""" | ||
pass | ||
|
||
# | ||
# 'shutdown' subcommand ('config chassis_modules shutdown ...') | ||
# | ||
@chassis_modules.command('shutdown') | ||
@clicommon.pass_db | ||
@click.argument('chassis_module_name', metavar='<module_name>', required=True) | ||
def shutdown_chassis_module(db, chassis_module_name): | ||
"""Chassis-module shutdown of module""" | ||
config_db = db.cfgdb | ||
ctx = click.get_current_context() | ||
|
||
if not chassis_module_name.startswith("SUPERVISOR") and \ | ||
not chassis_module_name.startswith("LINE-CARD") and \ | ||
not chassis_module_name.startswith("FABRIC-CARD"): | ||
ctx.fail("'module_name' has to begin with 'SUPERVISOR', 'LINE-CARD' or 'FABRIC-CARD'") | ||
|
||
fvs = {'admin_status': 'down'} | ||
config_db.set_entry('CHASSIS_MODULE', chassis_module_name, fvs) | ||
|
||
# | ||
# 'startup' subcommand ('config chassis_modules startup ...') | ||
# | ||
@chassis_modules.command('startup') | ||
@clicommon.pass_db | ||
@click.argument('chassis_module_name', metavar='<module_name>', required=True) | ||
def startup_chassis_module(db, chassis_module_name): | ||
"""Chassis-module startup of module""" | ||
config_db = db.cfgdb | ||
|
||
config_db.set_entry('CHASSIS_MODULE', chassis_module_name, None) |
Oops, something went wrong.