cisco_n9k 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/CHANGELOG.md +7 -0
- data/LICENSE +21 -0
- data/README.md +59 -0
- data/lib/cisco_n9k/version.rb +5 -0
- data/lib/cisco_n9k.rb +7 -0
- metadata +50 -0
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: 4a32d46b0b504cc7d465d83e608e74327b6e7678b26d369881043a7dbce1e28a
|
|
4
|
+
data.tar.gz: 6efd10bc448ac51f52677b910876e3c797705bd020092201c6508fcc0720a5af
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: 8666d22139f264dcbd44a5685c79092e5270f8e9d6472f2c6dd533472924be80b4db4d529be668ae91b63db17b5a83658aad73f3797e76980c2f2847e03e574b
|
|
7
|
+
data.tar.gz: b56e919d544e3248932ce41e0966081f2f7800d907fa3ce356c23fea58203d447402baa4f4bde7f61f622bcadb279a292b19bfda89fc03fbd7365f916639cb29
|
data/CHANGELOG.md
ADDED
data/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 gatework
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
data/README.md
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# cisco_n9k
|
|
2
|
+
|
|
3
|
+
[](https://github.com/gatework/cisco_n9k/actions/workflows/ci.yml)
|
|
4
|
+
[](https://rubygems.org/gems/cisco_n9k)
|
|
5
|
+
|
|
6
|
+
面向 Cisco Nexus 9000 设备自动化的 Ruby gem。目前为初始骨架,提供命名空间、版本常量与基础异常;设备连接、配置解析和命令操作尚未实现。
|
|
7
|
+
|
|
8
|
+
## 安装
|
|
9
|
+
|
|
10
|
+
要求 Ruby 3.3 或更高版本。
|
|
11
|
+
|
|
12
|
+
```sh
|
|
13
|
+
gem install cisco_n9k
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
或在 Gemfile 中添加:
|
|
17
|
+
|
|
18
|
+
```ruby
|
|
19
|
+
gem "cisco_n9k", "~> 0.1.0"
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## 使用
|
|
23
|
+
|
|
24
|
+
```ruby
|
|
25
|
+
require "cisco_n9k"
|
|
26
|
+
|
|
27
|
+
CiscoN9K::VERSION # => "0.1.0"
|
|
28
|
+
CiscoN9K::Error # StandardError 的子类
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## 开发
|
|
32
|
+
|
|
33
|
+
```sh
|
|
34
|
+
bundle install
|
|
35
|
+
bundle exec rake
|
|
36
|
+
bundle exec rake package
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
CI 覆盖 Ruby 3.3、3.4、4.0。打包步骤在临时 GEM_HOME 中安装并加载 gem,检查版本与加载路径。
|
|
40
|
+
|
|
41
|
+
## 发布
|
|
42
|
+
|
|
43
|
+
1. 更新 `lib/cisco_n9k/version.rb` 与 `CHANGELOG.md`,提交并推送到 `main`。
|
|
44
|
+
2. 等待该提交的 CI 通过,创建并推送同版本标签,例如 `v0.1.1`。
|
|
45
|
+
3. 在 GitHub 发布该标签的 Release;`release.yml` 会重新运行完整 CI,下载通过验证的 gem,发布到 RubyGems,再将相同的 gem 与 `SHA256SUMS` 附加到 Release。
|
|
46
|
+
|
|
47
|
+
```sh
|
|
48
|
+
git tag -a v0.1.1 -m "Release 0.1.1"
|
|
49
|
+
git push origin v0.1.1
|
|
50
|
+
gh release create v0.1.1 --verify-tag --title v0.1.1 --notes-file CHANGELOG.md
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
发布使用 GitHub `release` environment 的 `RUBYGEMS_API_KEY` secret。API key 需要 `push_rubygem` 权限,并允许非交互式发布;不要提交凭据。也可配置 [RubyGems Trusted Publishing](https://guides.rubygems.org/trusted-publishing/)(owner `gatework`、repository `cisco_n9k`、workflow `release.yml`、environment `release`),随后删除该 secret,工作流将使用 OIDC。
|
|
54
|
+
|
|
55
|
+
失败时优先重新运行失败的 job,以复用原 CI 产物。`workflow_dispatch` 仅接受版本标签,并要求 GitHub Release 已存在。已发布的相同版本只有校验和一致才可继续;不同内容必须提升版本号。
|
|
56
|
+
|
|
57
|
+
## 许可
|
|
58
|
+
|
|
59
|
+
MIT,见 [LICENSE](LICENSE)。本项目由 gatework 维护,与设备厂商无隶属关系。
|
data/lib/cisco_n9k.rb
ADDED
metadata
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
|
2
|
+
name: cisco_n9k
|
|
3
|
+
version: !ruby/object:Gem::Version
|
|
4
|
+
version: 0.1.0
|
|
5
|
+
platform: ruby
|
|
6
|
+
authors:
|
|
7
|
+
- gatework
|
|
8
|
+
bindir: bin
|
|
9
|
+
cert_chain: []
|
|
10
|
+
date: 2026-10-16 00:00:00.000000000 Z
|
|
11
|
+
dependencies: []
|
|
12
|
+
description: Initial Cisco Nexus 9000 gem scaffold with a versioned namespace and
|
|
13
|
+
error class. Device connections and operations are not implemented yet.
|
|
14
|
+
executables: []
|
|
15
|
+
extensions: []
|
|
16
|
+
extra_rdoc_files: []
|
|
17
|
+
files:
|
|
18
|
+
- CHANGELOG.md
|
|
19
|
+
- LICENSE
|
|
20
|
+
- README.md
|
|
21
|
+
- lib/cisco_n9k.rb
|
|
22
|
+
- lib/cisco_n9k/version.rb
|
|
23
|
+
homepage: https://github.com/gatework/cisco_n9k
|
|
24
|
+
licenses:
|
|
25
|
+
- MIT
|
|
26
|
+
metadata:
|
|
27
|
+
source_code_uri: https://github.com/gatework/cisco_n9k
|
|
28
|
+
bug_tracker_uri: https://github.com/gatework/cisco_n9k/issues
|
|
29
|
+
changelog_uri: https://github.com/gatework/cisco_n9k/blob/main/CHANGELOG.md
|
|
30
|
+
documentation_uri: https://github.com/gatework/cisco_n9k/blob/main/README.md
|
|
31
|
+
allowed_push_host: https://rubygems.org
|
|
32
|
+
rubygems_mfa_required: 'true'
|
|
33
|
+
rdoc_options: []
|
|
34
|
+
require_paths:
|
|
35
|
+
- lib
|
|
36
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
|
37
|
+
requirements:
|
|
38
|
+
- - ">="
|
|
39
|
+
- !ruby/object:Gem::Version
|
|
40
|
+
version: '3.3'
|
|
41
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
42
|
+
requirements:
|
|
43
|
+
- - ">="
|
|
44
|
+
- !ruby/object:Gem::Version
|
|
45
|
+
version: '0'
|
|
46
|
+
requirements: []
|
|
47
|
+
rubygems_version: 4.0.20
|
|
48
|
+
specification_version: 4
|
|
49
|
+
summary: Ruby library foundation for Cisco Nexus 9000 device automation
|
|
50
|
+
test_files: []
|