Giter VIP home page Giter VIP logo

f5devcentral / vscode-f5 Goto Github PK

View Code? Open in Web Editor NEW
56.0 13.0 13.0 86.11 MB

Let the F5 VSCode extension supercharge your workflows with schema validation, rest client, fast templates, and so much more!!!

Home Page: https://f5devcentral.github.io/vscode-f5/#/

License: Apache License 2.0

TypeScript 98.68% CSS 1.32%
microsoft-extension-marketplace vscode f5 f5-bigip as3 declarative-onboarding telemetry-streaming rest-client json-s tmos

vscode-f5's Introduction

The F5 VSCode Extension

Let the F5 VSCode Extension supercharge your abilities to write (A)utomated (T)ool(C)hain declarations with snippets, examples and declaration schema validation, and also assist with connecting, deploying, retrieving and updating declarations on F5 devices.

It can also help with iRules/iApps, BIG-IQ, and regular configuration/migration.

  • GET/POST/DELETE of all ATC services, including FAST/AS3/DO/TS/CF
  • links to quickly open related ATC documentation
  • Direct access to ATC examples from git repo
  • Install/UnInstall of ATC rpms
  • Convert JSON <-> YAML
  • Hovers to view decoded information for (certificates/base64)
  • Extract TMOS applications (per virtual server)
  • Write, deploy and modify iRules/iApps (with vscode-irule extension for language support)

!> Any comments, questions or feature requests, please open an issue!

Documentation site

https://f5devcentral.github.io/vscode-f5/#/

Getting the extension

The best path is to install Visual Studio Code from: https://code.visualstudio.com/

VSCode Marketplace

Open Source Marketplace

VSCode Marketplace

Open Source Marketplace

Then install the extension following the steps below:

Select the extensions view

drawing

Search for F5, select the extension "The F5 Extension", then Install

drawing

Create a device and connect

Select Add Host in the F5: Hosts view. Then type in device details in the <user>@x.x.x.x format, hit Enter to submit

drawing

Deploy example as3 app

Click on the hostname of the connected device at the bottom of the window.

This is the easiest way to get an editor window for JSON files and it also demontrates how to get device details

Now that we have a json editor, select all text (control + a), then delete.

Type as3 to get the example AS3 snippet, press Enter.

This should insert a sample AS3 declaration into the editor

Note the declaration schema reference at the top. This provides instant feedback and validation for any necssary modifications. Please see Schema Validation for more details

Right-click in the editor and select POST as AS3 Declaration. This should post the declaration to the currently connected device

!> Please be sure to have the AS3 service installed prior. See ATC RPM Mgmt for assistance with getting a service installed

drawing


To delete deployed AS3 tenant from device

Right-click on the tenant in the AS3 view on the left, then select Delete Tenant

Known Issues

HTTP/422 responses - Can happen for a handful of reasons:

  • Getting DO declaration when device has settings DO can configure but device was not deployed with DO (it can't manage the settings that are already there)
  • Improperly formatted/wrong declaration
    • Sometimes this is from the '$schema' reference in the declaration
  • Sometimes you can fix a DO HTTP/400 response by overwriting with a clean/updated declaration

HTTP Auth Failures

When utilizing an external auth provider, occasionally restjavad/restnoded can have some issues, resulting in some occansional HTTP/400 auth errors:

The fix is to restart: restjavad and restnoded

Error from extension

HTTP Auth FAILURE: 400 - undefined

Error from restjavad log

[SEVERE][6859][24 Jul 2020 13:11:39 UTC][8100/shared/authn/login AuthnWorker] Error as the maximum time to wait exceeded while getting value of loginProviderName
[SEVERE][6860][24 Jul 2020 13:11:39 UTC][8100/shared/authn/login AuthnWorker] Error while setting value to loginProviderName when no loginReference and no loginProviderName were given
[WARNING][6861][24 Jul 2020 13:11:39 UTC][com.f5.rest.common.RestWorker] dispatch to worker http://localhost:8100/shared/authn/login caught following exception: java.lang.NullPointerException
        at com.f5.rest.workers.authn.AuthnWorker.onPost(AuthnWorker.java:394)
        at com.f5.rest.common.RestWorker.callDerivedRestMethod(RestWorker.java:1276)
        at com.f5.rest.common.RestWorker.callRestMethodHandler(RestWorker.java:1190)
        at com.f5.rest.common.RestServer.processQueuedRequests(RestServer.java:1207)
        at com.f5.rest.common.RestServer.access$000(RestServer.java:44)
        at com.f5.rest.common.RestServer$1.run(RestServer.java:285)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:473)
        at java.util.concurrent.FutureTask.run(FutureTask.java:262)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1152)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:622)
        at java.lang.Thread.run(Thread.java:748)

Client side extension debugging

Developer Debugger

VScode has a built in debugger very much like Chrome. This can be used to gain insight to what is happening when things don't respond as expected.

If you are having issues, it may be best to start here and capture the output as described below:

  • In the main VSCode window, along the top, select Help, then Toggle Developer Tools, select the Console tab.
    • Then, explore the requests and responses to see if there are any areas of concern
      • Expand some of the objects by clicking the little triangle next to the obejct under a request or response to inspect

If needed, right-click on an entry, then select save-as to save the log including expanded objects to a file. This can be used for troubleshooting

drawing

This mainly catches logs send through the console.log(''), which should typically be for development.

installing vsix

The recommended way to get this extension is to install from the Microsoft VScode extension marketplace or from within VSCode directly, under the extensions activity bar view on the left.

If you still need to install from vsix, they can be downloaded under the 'release' tab above: https://github.com/f5devcentral/vscode-f5/releases

Different ways to install vsix:

Running the extension for dev

  • Clone and install dependencies:

    git clone https://github.com/f5devcentral/vscode-f5.git
    cd vscode-f5-fast/
    npm install
    code .
  • Start Debugging environment: Keystroke F5

  • Navigate to view container by clicking on the f5 icon in the Activity bar (typically on the left)

  • Update device list in tree view on the left with a device in your environment

    • ADD in the F5 Hosts view
    • or click the pencil icon on an item and modify the item
  • Connect to device

    • (click device in host tree or Cntrl+shift+P or F1)

vscode-f5's People

Contributors

dependabot[bot] avatar dumpysquare avatar f5-rahm avatar kashwath avatar vinnie357 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

vscode-f5's Issues

Setup unit/e2e testing

as the base extension functionality matures and new features are added it is imperative that tests are developed to keep extension functionality stable.

Long term goal is to transition to test driven development

[RFE] get json schema verified yaml declaration authoring

Most agree that yaml is just easier to write, but json is the default since it is more of a serialization format, and...

It is more explicit and more suitable for data interchange between your apis

https://www.json2yaml.com/yaml-vs-json#:~:text=JSON%20wins%20as%20a%20serialization,data%20interchange%20between%20your%20apis.&text=You%20can%20learn%20JSON%20a,JSON%20with%20a%20YAML%20parser.

However, docker/k8s and ansible popularity has shown that yaml is the way to go for actually writing.

RedHat has a very nice YAML language server extension that allows one to specify a json schema that it can use to validate yaml.
https://marketplace.visualstudio.com/items?itemName=redhat.vscode-yaml

It is worth exploring, either integrating that extension, or it's functionality, to provide users the ability to write F5 declarations in yaml (with comments) AND provide schema validation during the authoring process

[RFE] Better schema validation during authoring

Right now, we just set the file type to json and inject the "$schema": "(https://)./file.schema", which works for now, but can cause problems with some declarations (I hear).

idea:  create command to insert schema reference.  Can detect necessary schema type by the class of the declaration.

I think we can detect what kind of declaration it is from the base json object "class" and "version", if needed. The following git issue talks about associating a custom schema to particular files:
microsoft/vscode#77433
This is doable, but not ideal. I'm thinking the different file sub-extension types to catch, but I don't think this is robust enough since it requires special file naming and doesn't cover different schema versions:

  • dec1.as3.json
  • baseInstall.do.json
  • loggingDec.ts.json

That article and some other reading leads me to believe that we can find a better way to match then apply the appropriate schema

I guess, if we really need, we can just read the declaration when we get it. Figure out the base class and schema version, then inject the right schema URL to the declaration and remove it when posting...

Another similar git issue for further reading: microsoft/vscode#79363, microsoft/vscode#81078

Another route was a language server, but that might be overkill but seems to being us may other very useful features...

Maybe through a Custom Editor? https://code.visualstudio.com/api/extension-guides/custom-editors#custom-editor-api-basics

Virtual documents (I think relates to git issues referenced above): https://code.visualstudio.com/api/extension-guides/virtual-documents

[RFE] Reuse response window/editor

User has to constantly close editor windows after working in the extension for some time.

It would be nice to have some control over how the extension re-uses editor tabs for responses.

I like the way this vscode rest client reuses windows:
https://github.com/Huachao/vscode-restclient/blob/7b5ff0d9f30163dd562b0a9dade32d51e93b2359/src/views/httpResponseTextDocumentView.ts#L29

It may also be that the reason he decided to use webviews, other than they look cool, is work around vscode always asking to save the doc when closing...

I think that ultimately, I would prefer the same behavior. By default, webviews for responses, reuse existing window. Then also have the json editor like current.

Maybe there could also be a button on the webview to convert to json doc?

[RFE] Better http request logging perf-stats

Similar to the global logging RFE submitted, this is more tailored to visibility into the HTTP calls being made and any additional stats, like errors and timing. Is it worth collecting performance stats on the different calls to better understand which ones take longer or if a device is responding slower than normal?

[RFE] view x509 certificate details

User would like to be able to view/decrypt certificate. This would also be nice for some base64 encoded items...

This would be a good first use case to look at doing this in a codelens

https://vscode.rocks/codelens/
https://code.visualstudio.com/blogs/2017/02/12/code-lens-roundup
https://github.com/microsoft/vscode-extension-samples/tree/master/codelens-sample

Or probably intellesense hover:
https://code.visualstudio.com/api/language-extensions/programmatic-language-features#show-hovers
https://code.visualstudio.com/api/references/vscode-api#languages

Or even a peek?
https://code.visualstudio.com/docs/editor/editingevolved#_peek

Option 1:
https://stackoverflow.com/questions/58724396/parse-x509-certificate-string-in-node

let tls = require('tls');
let net = require('net');

let secureContext = tls.createSecureContext({
  cert: yourPemCertificateString
});

let secureSocket = new tls.TLSSocket(new net.Socket(), { secureContext });

let cert = secureSocket.getCertificate();

Option 2:
https://www.npmjs.com/package/x509

const x509 = require('x509');
var cert = x509.parseCert(__dirname + '/certs/nodejitsu.com.crt');
/*
cert = { subject:
   { countryName: 'US',
     postalCode: '10010',
     stateOrProvinceName: 'NY',
     localityName: 'New York',
     streetAddress: '902 Broadway, 4th Floor',
     organizationName: 'Nodejitsu',
     organizationalUnitName: 'PremiumSSL Wildcard',
     commonName: '*.nodejitsu.com' },
  issuer:
   { countryName: 'GB',
     stateOrProvinceName: 'Greater Manchester',
     localityName: 'Salford',
     organizationName: 'COMODO CA Limited',
     commonName: 'COMODO High-Assurance Secure Server CA' },
  notBefore: Sun Oct 28 2012 20:00:00 GMT-0400 (EDT),
  notAfter: Wed Nov 26 2014 18:59:59 GMT-0500 (EST),
  altNames: [ '*.nodejitsu.com', 'nodejitsu.com' ],
  signatureAlgorithm: 'sha1WithRSAEncryption',
  fingerPrint: 'E4:7E:24:8E:86:D2:BE:55:C0:4D:41:A1:C2:0E:06:96:56:B9:8E:EC',
  publicKey: {
    algorithm: 'rsaEncryption',
    e: '65537',
    n: '.......' } }
*/

[RFE] support remote authentication of bigip devices

user needs to be able to an F5 what utilizes remote authentication

fix will be related to #34

Solution:

  • The idea is to check for auth provider during the initial device connect (when discovering installed ILX plugins).

provide creds using basic auth to the following url, it should provide what the configured logon provider

/mgmt/tm/auth/source

{
"username":"",
"password":"",
"logonProviderName":"tmos"
}

"fallback":"false","type":"active-directory"

curl:

curl -s -k -u admin:changeme -X POST -H "Content-Type: application/json" -d '{ "username": "awesomeUser", "password": "changeme1234", "loginProviderName": "tmos"}' https://x.x.x.x/mgmt/shared/authn/login

Follow-up calls during long processing operations clear password

User indicates scenarios where the extension executes another task/query to the selected device while a long running operation is under way (ie. big as3 declaration post). This can cause the ILX extension to respond with an HTTP/401, but it's not an auth error, but a server error that it's busy and couldn't process the auth.

Need to add more logic in the auth token call to look for more specific errors to auth before clearing password.

https://github.com/DumpySquare/vscode-f5-fast/blob/fd490f356e5d092fd101f7b1212fdfbf4f4b7b34/src/utils/f5Api.ts#L548

HTTP-REQUEST: 192.168.200.131 - GET - /mgmt/shared/appsvcs/task/

  • port:443, method:"GET", rejectUnauthorized:false, headers:Object, host:"192.168.200.131", path:"/mgmt/shared/appsvcs/task/"

HTTP-RESPONSE: 401

  • status:401
  • headers:Object
  • body:Object
  • code:401
  • message:"java.net.ProtocolException: status:503, body:{"code":503,"message":"There is an active asynchronous task executing.","errorStack":[],"apiError":32964609}"
  • originalRequestBody:"{"username":"admin","generation":0,"lastUpdateMicros":0}"
  • referer:"192.168.200.20"
  • restOperationId:30599862
  • kind:":resterrorresponse"

HTTP FAILURE: 401 - java.net.ProtocolException: status:503, body:{"code":503,"message":"There is an active asynchronous task executing.","errorStack":[],"apiError":32964609}

Potential name change and global scope extension pack

Some users have indicated that FAST may be misleading, since it currently doesn't support any fast functionality, yet, and can/will do much more and just fast.

Potential Options include:

  • vscode-f5-automation
  • vscode-f5-ilx
  • vscode-f5-declarative
  • vscode-f5-dec-dev
  • vscode-f5-ats
  • vscode-f5-atc
  • vscode-f5-atc-toolkit
  • vscode-f5-atc-helper
  • vscode-f5-atc-devkit
  • vscode-f5-atc-kit
  • vscode-f5-adm (pronounced "adam"), f5 (A)utomation (D)eclaration (M)odule/mgmt/maker

Furthermore, this could open the discussion on a wider scope of potential functionality with F5 products and vscode extension functionality. Similar to the different modules of F5 products, like LTM/GTM/ASM/AFM, extension functionality could be broken into different sub-extensions. At it's highest level a user could install the F5-extension pack, which would include all functionality (like: https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.vscode-remote-extensionpack).

The sub extension pack could be installed all together or individually, allowing the user to tailor the needed functionality and minimize resource utilization (network, local disk space and running resources).

Sub-extensions:

  • tcl/iRules/iApps
  • AS3/DO/TS
    • or even broken out by each ILX extension
  • FAST
  • DWAF
  • nginx
  • cloud services?
  • silverline?

[RFE] deploy/delete fast app

User would like to deploy fast application, then delete from within VScode extension, as part of development and testing.

This work flow is supported as of v.0.1.10:

  • Deploy application using editor text and command palette "F5-FAST: Deploy Fast App"
  • Delete application by right clicking on application in FAST view, and selecting delete

[RFE] Better tree view information (icons?)

The tree views are highly customizable for many different things, some of the more alluring features are custom icons that can change depending on different scenarios.

Idea 1: provide custom icons for the devices tree view

  • if F5 device = regular red f5 symbol?
  • if BIG-IQ = BIG-IQ icon
  • if ILX docker container = f5 docker symbol

idea 2: visual status of AS3 tasks

  • customize the tasks view to display red/yellow/green dot/icon depending on the status of the task
    • if all succeeded = green
    • if at least one failed = yellow
    • if all failed red

examples in these extensions:

[RFE] Command to start ssh session

Since we will have defined a device and processed creds to connect to the device, this RFE is to add a bash command to connect over ssh in the terminal window, so the user is ready to use the bash terminal. Could probably set this as a boolean in the base extension config. If enabled, auto-connect bash terminal.

supporting links for ideas:

[RFE] Support ILX containers

ILX docker containers have not been tested. Like BIG-IQ, it is a good possibility it will just work, but some minor testing, adjustments may be needed. This usage scenario needs to be tested and documented.

[RFE] allow user to provide ANY URI to call against connected device

While testing and troubleshooting, the user may need to call a different URI not already configured or baked into the extension.

Provide the user with some way to specify the URI (and body if needed), to call to the connected device.

Thoughts:

  • in any editor, create the following text block, highligh -> righ-click -> some command (make API?)
    • if body detected, make POST
    • if "method" parameter detected, set specified method
  • same as method detection, provide a way to specify headers?
URI=/mgmt/shared/authn/login
BODY=
{
    "username": "someUser",
    "password": "myDecoderRing"
}

Or do we just make the whole thing a json blob...

{
    "uri": "/mgmt/shared/authn/login",
    "body": {
        "username": "someUser",
        "password": "yourDecoderRing"
    }
}

I think the first method may be a tad easier to write but harder to code. Second method could be easier to code, but a tad harder to write. But what if we did yaml...

uri: /mgmt/shared/authn/login
body:
    username: bestestUser
    password: masterDecoderRing

yessss.... yaml it is!!! So, wouldn't have to do the login example above since the extension would already have the necessary credentials, but it was used as a simple example. So, a document, like a .md, could be saved in a repo with a bunch of testing APIs for a project that a user could execute through this extension on F5 products

[RFE] feedback when connections timeout

When first connecting with a device. if it not reachable it can take several second for the underlying network to timeout, and even then, so feedback is presented to the user.

Provide some sort of feedback to user about network timeouts.

[RFE] apply fast schema to fast template yaml files

Like other pieces of the ATC, validating the declaration during the authoring process can be extremely helpful.

Fast has a schema for yaml files. Looking to validate fast yaml templates with that schema to provide insight during the authoring process

I took a quick try to get this working but there seems to be some parsing differences. Will continue researching

Schema: https://github.com/f5devcentral/f5-fast-core/blob/master/schema/template.json

AS3 schema as referece: https://raw.githubusercontent.com/F5Networks/f5-appsvcs-extension/master/schema/latest/as3-schema.json

A schema validator: https://jsonschemalint.com/#!/version/draft-07/markup/json

Could also use this to add in a FAST snippet

[RFE] clear cached password for device

User would like to be able to clear, or reset password for a single device. Currently, only option is to run "Clear all passwords" command.

This could be a right-click option on the device in the Hosts view

[RFE] Remote log viewer of selected device

Visibility is important when it comes to many things. One of the struggles of some of the automated technology is being able to see what, why and when something went wrong. For declarations, api responses suffice, but when things go really wrong, system logs are needed.

The "Remote Command Execute" allows one to get the output of any log file, but it's a snapshot. Having a rolling log output would really round out the visibility for any network engineer/developer to see what's going on when developing for F5 automation services.

This might be accomplish-able via a reoccurring API call, but a dedicated channel for live output is ideal

https://unix.stackexchange.com/questions/159033/tail-log-file-on-multiple-machines-over-ssh/159040

[RFE] "?" view icon to provide dropdown of help options

inspired by the official docker extension, they have a very nice way of quickly providing help to users at each view bar.

This could certainly go a long way to helping users just exploring f5 automation and getting familiar with the extension

image

Update Bad Password

I cannot update a bad password for a BIG-IP. Can you add this as a right-click option? Deleting the BIG-IP did not clear the password from the config either.

[RFE] collect http connections stats

User would like to be able to see how long it took for an API call to complete. Furthermore, this could be aggregated back to the user for longer term visibility to show if a particular device and/or call is responding slower than it used to.

A simple single timer can be integrated with axios using
https://stackoverflow.com/questions/49874594/how-to-get-response-times-from-axios
https://medium.com/@sabljakovich/axios-response-time-capture-and-log-8ff54a02275d
https://stackoverflow.com/questions/62186171/measure-network-latency-in-react-native/62257712#62257712

Going back to the node native http client would allow for more detailed stats like dns, tcp connection, tls negotiation, and payload exchange:
https://blog.risingstack.com/measuring-http-timings-node-js/

[RFE] clean up as3 views

  • consolidate the as3 tenants view with the as3 tasks view into a single view like fast
  • setup context sensitive commands for each of the parent/child tree items
    • Delete tenant only shows up on a tenant item, not parent item or task item

should also include #39

[RFE] update 'examples' view

I think there is a ton of information that can be added to the "Examples" view, to include a ton of links, examples and documentation for everything related to the extension

I'd like it to look something like this below:
image

This is heavily influenced by the official Docker extension:
https://github.com/microsoft/vscode-docker/blob/master/src/tree/help/HelpsTreeItem.ts
https://github.com/microsoft/vscode-docker/blob/8f0a8293f7eaa48caf817f828936076c947d1809/src/tree/OpenUrlTreeItem.ts
https://github.com/microsoft/vscode-docker/blob/0ec9fcbe7b2248792b03e9d658012e7c232bf99c/src/tree/registerTrees.ts

Layout:
Title -> Help and FeedBack

  • VScode-F5-FAST Extension
    • Documentation
    • Demo Repo (f5-fasting)
    • Review Issues
    • Report Issue
  • FAST
    • Documentation (official f5 clouddocs)
    • Official repo
    • Repo Issues
  • AS3
    • Documentation (official f5 clouddocs)
    • Online Schema reference
    • examples declarations (when available)
  • DO
    • Documentation (official f5 clouddocs)
    • Online Schema reference
    • examples declarations
  • TS
    • Documentation (official f5 clouddocs)
    • Online Schema reference
    • examples declarations

[RFE] view as3 tenant as "base/full/expanded"

User would like to see the different options of a deployed as3 declaration under the GET method query parameter "show=".

Query Parameter Default Description/Notes
show=[base|full|expanded] base base means system returns the declaration as originally deployed (but with secrets like passphrases encrypted), full returns the declaration with all default schema properties populated, expanded includes all URLs, base64s, and other references expanded to their final static values.

https://clouddocs.f5.com/products/extensions/f5-appsvcs-extension/latest/refguide/as3-api.html

This could easily be implemented as a "right-click" option in the as3 deployed tenants tree.

[RFE] Better client side logging/troubleshooting/visibility

Currently, the only way to see what's going on ( or wrong) from a client perspective is to toggle the developer tools and check out the console.log statement outputs from the console view (aside from an overwhelming amount of information pop ups...). While this works in the early stages, it probably needs some attention and refinement at some point. I present some options below:

option 1: configure typical logging, to a file, which the user can set the level and can rotate on a daily basis

Option 2: outputChannel, which goes with a language server, which is a future consideration for autocomplete, syntax highlighting and validation (including other advanced language features)

Additional info:

[RFE] upload new template to FAST

As part of the template authoring process the user would like to upload finished template to a FAST service.

User would open an .mst file (FAST template), then select extension command to upload fast template. The function would capture entire editor text or selection, run validate it as a fast template with the f5-fast-core, then upload the zip file to the fast services and install zip/templates as needed.

The following issues/RFE's have been opened with f5-fast-core so see if this functionality could be handled by that module:

current thought on tackling this in the extension...

[RFE] add utility to convert json<->yaml

It would be handy to have a function that could convert yaml to json and json to yaml.

yml is easier to read/write and FAST seems to be able to utilize both also.

[RFE] support async declaration post

Currently sending declaration post in default "synchronous" mode, meaning, the service will wait till processing is complete before responding. For big declarations, the client may time out before getting the response, leading to misunderstanding and potential issues.

Making all declaration posts, asynchronous (/mgmt/shared/appsvcs/declare/?async=true), will tell the receiving service to respond with HTTP/202 and job details (mainly task id). Subsequent calls can be made to check status till completion.

As an interim, this should probably be default behavior for now. Visual cues and time to wait before checking for updates need to be discussed:

  • refresh entire editor page with latest details?
  • just append last response to page details, like a list of the calls?
  • custom details in new editor window with spinning status thing in tab?
  • add status bar "processing" notification along bottom of workspace?
    • this could support a less intrusive workflow, while the user waits for longer jobs to finish
    • this could also support additional actions with a click of the status bar item, like pulling up the current response, or canceling the waiting cycle
    • when complete an information window can pop up, or just bring up the editor with the final response
  • set try wait setting (default = 3 seconds? || 5 seconds?)

*** Detect if async is needed? ***
There may also be a way to count the lines of the declaration. If above 50 or 100 lines, or byte size, then automatically switch to async, or default to sync.

5.20.2020: So, the thought right now is:

AS3, detect declaration size, post as async when necessary
DO, default to async
TS just regular post

Utilize the following progress bar for user visibility of this long running operation
https://github.com/bd82/vscode-extension-samples/tree/master/progress-sample

[RFE] extract fast template params for app deployment

The user would like to select a fast template and get the information needed to deploy an application with that template, so template name and input params. This could return a rendered template, like and as3 declaration or just deploy the application

[RFE] provide a configurable list of common commands to execute over bash api

The idea was presented to have set of commands, like "POST declaration", from the command palette, that could be configurable and easily executable like "Remote Command Execute".

This could look something like the device list in settings, and get presented as a list after a command. When a list item is selected, the result would show in a new editor window.

[RFE] variables in declaration (dynamic+static)

User would like to be able to have dynamically generated timestamps/uuids inserted at post. These could be defined as variables and follow a similar format of "{{variable}}" within the declaration.

Furthermore, static variables could be of use for common items when developing declarations.

These global variables could be stored in the workspace config for the extension, or user settings, or even a memento. Passwords and other secure information will need to be reviewed by a wider audience.

6.8.2020

  • passwords are currently stored via keytar

[RFE] Support for declarative WAF

User would like to develop and deploy declarative WAF policy similar to other declarative services extension already supports (AS3/DO/TS).

  • Detect that dwaf is available, show version
  • get current dwaf policy
  • post dwaf policy
  • validate json schema

[RFE] base64 encode/decode functionality

User would like to be able to be able to encode and decode base64 strings during authoring.

Implementation:

  • select text in editor, right-click, encode or decode as needed (replace text with encoded/decoded string)

[RFE] Add AS3/DO examples to TS examples tree

User would like to see all available examples for AS3/DO/TS in the "TS Examples" view.

  • Rename it from "TS Examples" -> "Example Declarations"
  • Setup parent item for each type (AS3/DO/TS)
  • Each parent would expand to show all example declarations for that type

DO examples are available for this now, so this work is in progress.

Submitted the following AS3 issue to get a single folder for examples, will add once available:

[RFE] install/update ILX extension

Add a way to install a desired ILX extension on designated device.

Telling the F5 to install from external is probably not going to work for most environments

But we can probably select a file from local or have it install latest release from gitHub.

Depending on how each of those are structured, there may be possibility for providing a list of available versions to install.

Need to look into the f5-cli or f5-sdk-js for this functionality
https://github.com/f5devcentral/f5-sdk-js

[RFE] add warning when posting sync DO dec

Since there is no way to force async processing by default with a DO declaration (like as3), it must be done within the declaration parameters, adding a warning message to urge users to utilize async could be beneficial for newer users and provide necessary feedback of processing status with the progress bar.

[RFE] prevent users from removing fast app through as3

When a user deploys a fast app, it also shows up as an AS3 tenant.

The user can then delete that tenant through AS3 only leaving the FAST definition for that application

While you can delete that fast application definition, it would probably be best to provide the user some feedback or prevent them from removing an AS3 tenant/app that was deployed with FAST.

The only two things I can see that distinguish an AS3 tenant/app as being deployed by fast, is the following:

The following 'id' with in the tenant definition could be the easiest, but need to confirm with fast team how consistent that is

    "class": "ADC",
    "schemaVersion": "3.0.0",
    "id": "fast%create%fastTen1%app2_tcp%a678035f-9dce-429b-b360-dc9aee090906",
    "label": "Sample 1",
    "remark": "Simple HTTP application with RR pool",
    "updateMode": "selective",
    "controls": {
        "archiveTimestamp": "2020-07-27T22:18:24.993Z"
    }

The better and more difficult ( but not much difficult) path is probably gonna be to look at each app declaration and find the "fast" constants used to deploy the app.

        "app2_tcp": {
            "class": "Application",
            "template": "tcp",
            "serviceMain": {
                "class": "Service_TCP",
                "virtualAddresses": [
                    "10.90.0.20"
                ],
                "virtualPort": 80,
                "pool": "app2_tcp_svc_pool"
            },
            "app2_tcp_svc_pool": {
                "class": "Pool",
                "members": [
                    {
                        "servicePort": 0,
                        "serverAddresses": [
                            "10.90.0.21",
                            "10.90.0.22"
                        ]
                    }
                ]
            },
            "constants": {
                "class": "Constants",
                "fast": {
                    "template": "goodFastTemplates/app2",
                    "setHash": "062e8dd505ef95a32b47d61a85669a975c82ff9972238ee56b72c3ee6556d1e1",
                    "view": {
                        "tenant_name": "fastTen1",
                        "application_name": "app2_tcp",
                        "virtual_port": 80,
                        "virtual_address": "10.90.0.20",
                        "server_addresses": [
                            "10.90.0.21",
                            "10.90.0.22"
                        ]
                    },
                    "lastModified": "2020-07-27T22:18:20.226Z"
                }
            }
        }

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.