-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #174 from tbotnz/refactor
Refactor
- Loading branch information
Showing
31 changed files
with
675 additions
and
924 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
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,25 @@ | ||
import argparse | ||
import os | ||
|
||
if __name__ == "__main__": | ||
parser = argparse.ArgumentParser(description='netpalm service package generate') | ||
required_files = parser.add_argument_group('required arguments') | ||
required_files.add_argument('-n', '--name', help='service package name', required=True) | ||
required_files.add_argument('-o', '--output', help='python | base64', default="python", required=True) | ||
args = parser.parse_args() | ||
|
||
package_name = args.name.replace(" ", "_") | ||
|
||
if os.path.isdir(package_name) or os.path.isfile(package_name): | ||
print("Please use a different package name, this is in use already") | ||
exit() | ||
|
||
os.mkdir(package_name) | ||
|
||
|
||
|
||
example_service = """ | ||
""" | ||
|
||
with open(f'{package_name}.py', 'w') as fp: | ||
pass |
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
Oops, something went wrong.