Skip to content

Commit 8a7eb76

Browse files
DumpySquaref5-rahm
andauthored
V3.10.0 (#201)
* changelog/pjson/sidebar * api tree work 11.18 * tree work POST leaf * codeLens working, schema validation in progress * n schema start * abstract schema files * xc Rules update Issues 198/199 * initial schema work complete * Enhancement.icall tmsh (#200) * Added iCall script to IRULES/IAPPS Tree treeViewsProviders * Fixed an issue with big-ip obj wrapper * Added iCall and TMSH scripts to the editor tree. - modified: package.json - modified: src/tclCore.ts - modified: src/treeViewsProviders/tclTreeProvider.ts Co-authored-by: Jason Rahm <[email protected]>
1 parent 8aeb0b4 commit 8a7eb76

File tree

87 files changed

+47840
-101
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

87 files changed

+47840
-101
lines changed

.vscode/launch.json

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,23 @@
3232
],
3333
"preLaunchTask": "${defaultBuildTask}"
3434
},
35+
{
36+
"name": "Debug current test",
37+
"type": "node",
38+
"request": "launch",
39+
"runtimeVersion": "16.18.0",
40+
"program": "${workspaceFolder}/node_modules/mocha/bin/_mocha",
41+
"args": [
42+
"-r",
43+
"ts-node/register",
44+
"-u",
45+
"tdd",
46+
"--no-timeout",
47+
"--colors",
48+
"${file}",
49+
],
50+
"internalConsoleOptions": "neverOpen",
51+
},
3552
{
3653
"name": "device import Tests",
3754
"type": "node",
@@ -46,7 +63,6 @@
4663
"${workspaceFolder}/src/test/suite/deviceImport.tests.ts",
4764
],
4865
"internalConsoleOptions": "neverOpen",
49-
"protocol": "inspector",
5066
}
5167
]
5268
}

CHANGELOG.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,42 @@ Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how
1111

1212
---
1313

14+
## [3.10.0] - (12-8-2022)
15+
16+
- Next api schema validation work initial
17+
- XC Diagnostics: Missing Rule for UDP VIP #199 - added
18+
- <https://github.com/f5devcentral/vscode-f5/issues/199>
19+
- XC Diagnostics Rule: 05ab needs to be more specific. #198 - updated
20+
- <https://github.com/f5devcentral/vscode-f5/issues/198>
21+
- PR - Enhancement.icall tmsh #200
22+
- <https://github.com/f5devcentral/vscode-f5/pull/200>
23+
- Update IRULES/IAPPS navigation to include icall/tmsh scripts #195
24+
- <https://github.com/f5devcentral/vscode-f5/issues/195>
25+
- Adds support for:
26+
- iCall scripts
27+
- TMSH scripts
28+
- Modifies the nomenclature for:
29+
- IRULES/IAPPS navigation, is now: TCL OBJECTS
30+
- iCall Scripts added to menu
31+
- TMSH Scripts added to menu
32+
- Deployed-Apps, is now: iApps (Deployed)
33+
- iApp-Templates, is now: iApps (Templates)
34+
35+
---
36+
37+
## [3.9.0] - (11-04-2022)
38+
39+
- tmos -> XC diasnostics updates
40+
- Better rule refresh flow
41+
- Updated rules
42+
- NEXT/CM integration (gen2)
43+
- manages regular connectivity
44+
- discover some information about instance
45+
- provides raw api call functionality
46+
- explore openapi spec
47+
48+
---
49+
1450
## [3.8.6] - (08-31-2022)
1551

1652
- tmos -> XC diasnostics updates

diagRules/tmosXcRules.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -102,14 +102,14 @@
102102
"severity": "Warning",
103103
"title": "XC reserved ports",
104104
"message": "Http failure response: 400 Bad Request \nFor tcp_loadbalancer dude/test configuration for child object advertise_policy ves-io-tcp-loadbalancer-test-df9979789 is wrong - 8443 is a reserved port, list of reserved ports 28000 - 32767 (kubernetes),28000 - 32767 (volterra),2379,9090,9999,18091,22222,23790,23791,1067,2380,8005,18092,9153,10250,10252,10259,500,8007,8443,10251,18095,23801,5355,8507,9007,68,323,23802,8444,8505,10249,10257,22,4500,8087,18093,53,6443,10256",
105-
"regex": ":(8443|2379|9090|9999|18091|22222|23790|23791|1067|2380|8005|18092|9153|10250|10252|10259|500|8007|10251|18095|23801|5355|8507|9007|68|323|23802|8444|8505|10249|10257|22|4500|8087|18093|53|6443|10256)"
105+
"regex": "/(?=.*destination)(:(8443|2379|9090|9999|18091|22222|23790|23791|1067|2380|8005|18092|9153|10250|10252|10259|500|8007|10251|18095|23801|5355|8507|9007|68|323|23802|8444|8505|10249|10257|22|4500|8087|18093|53|6443|10256))/si"
106106
},
107107
{
108108
"code": "0049",
109-
"severity": "Information",
110-
"title": "",
111-
"message": "",
112-
"regex": ""
109+
"severity": "Error",
110+
"title": "XC UDP Unsupported",
111+
"message": "XC does not currently support UDP",
112+
"regex": "ip-protocol udp"
113113
},
114114
{
115115
"code": "2671",

docs/_sidebar.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
- [Device Importing](device_importing.md)
1212
- [ATC RPM Mgmt](atc_rpm_mgmt.md)
1313
- [Generic Rest Calls](generic_rest_calls.md)
14+
- [TMOS -> XC Diagnostics](xcDiagnostics.md)
1415
- [Utilities](utilities.md)
1516
- [Change Log](/changelog)
1617

docs/schemaRefVariables.md

Lines changed: 158 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,158 @@
1+
# documenting local schema reference veriables in vscode json editor
2+
3+
This whole process is part of an effort to figure out how to get vscode schema validation working with json bodies destined for an api endpoint with a swagger/OpenApi spec
4+
5+
The key point about OpenApi schema, is that we can have many different endpoints with many different schemas. So, the typical schema mapping provided by vscode doesn't scale. But I can programmatically provide the schema/reference depending on how the user got the json.
6+
7+
Also, as noted in this issue, there is no programmatic way to provide the schema and/or reference
8+
9+
Seems someone has already opened an issue for this feature (it was pretty much rejected)
10+
[json] $schema: support predefined variables like ${workspaceFolder} #166438
11+
<https://github.com/microsoft/vscode/issues/166438>
12+
13+
OpenApi schema validation #162
14+
<https://github.com/microsoft/vscode-json-languageservice/issues/162>
15+
16+
## package.json contributes
17+
18+
<https://code.visualstudio.com/api/references/contribution-points#contributes.jsonValidation>
19+
20+
## current understanding of behavior
21+
22+
Currently the "$schema" value in a vscode editor/textDocument with the language set to json, is used to provide schema validation of the json object.
23+
24+
This schema reference in the json body can be a local file or an HTTP destination that will be fetched
25+
26+
## Behavior change or feature request
27+
28+
Requesting the support of variables in the "$schema" reference value, preferrably the vscode variables for debugging and task json files, so something similar.
29+
30+
The intent is to reference many different schema files bundled with an extension.
31+
32+
### extension schema references?
33+
34+
What about the current ability to reference a schema provided by the extension "contributes" package.json
35+
36+
It is my understanding that this is a static reference of a single schema to many file types
37+
38+
### local project schema reference
39+
40+
The following example shows local workspace reference, meaning the device_schema.json file is in the same directory as the current open project/workspace
41+
42+
```json
43+
{
44+
"$schema": "./device_schema.json",
45+
"address": "10.1.1.7",
46+
"port": "5443",
47+
"device_user": "admin",
48+
"device_password": "whos-clues",
49+
"management_user": "admin-cm",
50+
"management_password": "blues-clues",
51+
"something": "new"
52+
}
53+
```
54+
55+
## Other parts of the local file system
56+
57+
The following shows how absolute directory traversal is possible
58+
59+
```json
60+
{
61+
"$schema": "/home/ted/projects/vscode-f5/schemas/nextCm/DeviceDiscoveryRequest.json",
62+
"address": "10.1.1.7",
63+
"port": "5443",
64+
"device_user": "admin",
65+
"device_password": "whos-clues",
66+
"management_user": "admin-cm",
67+
"management_password": "blues-clues",
68+
"something": "new"
69+
}
70+
```
71+
72+
## linux local user home system variable
73+
74+
Attempting to use a linux current user dir var is unsuccessful
75+
76+
```json
77+
{
78+
"$schema": "$HOME/projects/vscode-f5/schemas/nextCm/DeviceDiscoveryRequest.json",
79+
"address": "10.1.1.7",
80+
"port": "5443",
81+
"device_user": "admin",
82+
"device_password": "whos-clues",
83+
"management_user": "admin-cm",
84+
"management_password": "blues-clues",
85+
"something": "new"
86+
}
87+
```
88+
89+
### error
90+
91+
```text
92+
Unable to load schema from '/home/ted/projects/f5-fasting/NEXT/$HOME/projects/vscode-f5/schemas/nextCm/DeviceDiscoveryRequest.json': ENOENT: no such file or directory, open '/home/ted/projects/f5-fasting/NEXT/$HOME/projects/vscode-f5/schemas/nextCm/DeviceDiscoveryRequest.json'.(768)
93+
```
94+
95+
## vscode exec path
96+
97+
Attempting to use built in vscode variables is unsuccessful (${execPath})
98+
99+
<https://code.visualstudio.com/docs/editor/variables-reference>
100+
101+
### execPath
102+
103+
```json
104+
{
105+
"$schema": "${execPath}/projects/vscode-f5/schemas/nextCm/DeviceDiscoveryRequest.json",
106+
"address": "10.1.1.7",
107+
"port": "5443",
108+
"device_user": "admin",
109+
"device_password": "whos-clues",
110+
"management_user": "admin-cm",
111+
"management_password": "blues-clues",
112+
"something": "new"
113+
}
114+
```
115+
116+
```text
117+
Unable to load schema from '/home/ted/projects/f5-fasting/NEXT/${execPath}/projects/vscode-f5/schemas/nextCm/DeviceDiscoveryRequest.json': ENOENT: no such file or directory, open '/home/ted/projects/f5-fasting/NEXT/${execPath}/projects/vscode-f5/schemas/nextCm/DeviceDiscoveryRequest.json'.(768)
118+
```
119+
120+
### userHome
121+
122+
```json
123+
{
124+
"$schema": "${userHome}/projects/vscode-f5/schemas/nextCm/DeviceDiscoveryRequest.json",
125+
"address": "10.1.1.7",
126+
"port": "5443",
127+
"device_user": "admin",
128+
"device_password": "whos-clues",
129+
"management_user": "admin-cm",
130+
"management_password": "blues-clues",
131+
"something": "new"
132+
}
133+
```
134+
135+
```text
136+
Unable to load schema from '/home/ted/projects/f5-fasting/NEXT/${userHome}/projects/vscode-f5/schemas/nextCm/DeviceDiscoveryRequest.json': ENOENT: no such file or directory, open '/home/ted/projects/f5-fasting/NEXT/${userHome}/projects/vscode-f5/schemas/nextCm/DeviceDiscoveryRequest.json'.(768)
137+
```
138+
139+
## double bracket on vscode variable
140+
141+
double bracket vscode variables do not work
142+
143+
```json
144+
{
145+
"$schema": "${{userHome}}/projects/vscode-f5/schemas/nextCm/DeviceDiscoveryRequest.json",
146+
"address": "10.1.1.7",
147+
"port": "5443",
148+
"device_user": "admin",
149+
"device_password": "whos-clues",
150+
"management_user": "admin-cm",
151+
"management_password": "blues-clues",
152+
"something": "new"
153+
}
154+
```
155+
156+
```text
157+
Unable to load schema from '/home/ted/projects/f5-fasting/NEXT/${{userHome}}/projects/vscode-f5/schemas/nextCm/DeviceDiscoveryRequest.json': ENOENT: no such file or directory, open '/home/ted/projects/f5-fasting/NEXT/${{userHome}}/projects/vscode-f5/schemas/nextCm/DeviceDiscoveryRequest.json'.(768)
158+
```

docs/schema_validation.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -115,9 +115,7 @@ https://code.visualstudio.com/docs/editor/userdefinedsnippets
115115

116116
Install the RedHat YAML extension
117117

118-
>https://marketplace.visualstudio.com/items?itemName=redhat.vscode-yaml
119-
120-
><https://marketplace.visualstudio.com/items?itemName=redhat.vscode-yaml>
118+
> <https://marketplace.visualstudio.com/items?itemName=redhat.vscode-yaml>
121119
122120
In the vscode settings for that extension:
123121

0 commit comments

Comments
 (0)