mengesb / gglib Goto Github PK
View Code? Open in Web Editor NEWGoGrid Libraries
License: GNU General Public License v2.0
GoGrid Libraries
License: GNU General Public License v2.0
There are several methods with optional or required parameters that need to be validated against commonlookuplist().
Example:
def gridimageedit(self, params={}):
"""https://wiki.gogrid.com/index.php/API:grid.image.edit
RBAC: Super User, System User
Required (ONLY ONE of the following)
- id : The ID of the image to edit.
Valid values: regex(^[0-9]+$)
Type: string
- name : The name of the image to edit.
Valid values: regex(^GSI-[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{8}$)
Type: string
- image : The ID or name of the image to edit.
Type: string
Optional
- friendlyName : The edited friendly name of the image.
Type: string
- description : The edited descriptive text to describe this image.
Type: string
- isPublic : Will the image will be visible to the entire GoGrid community?
Type: boolean
- image.minram : Set the minimum ram value.
Valid values: commonlookuplist() with 'lookup' set to 'image.minram'
Type: string
- image.type : The ID or name of the server type.
Valid values: commonlookuplist() with 'lookup' set to 'image.type'
Type: string
"""
Above we see that image.minram
and image.type
have specific valid values that can be obtained from commonlookuplist(). We should fetch the valid values, and compare against the valid values fetched to ensure we're providing a valid parameter value for anything using commonlookuplist()
Items to be investigated:
datacenter
on global classimage.minram
on gridimageeditimage.type
on gridimageedit/gridimagelist/gridimagesaveimage.state
on gridimagelistip.state
on gridiplistip.type
on gridiplistjob.objecttype
on gridjoblistjob.state
on gridjoblistloadbalancer.type
on gridloadbalanceraddloadbalancer.persistence
on gridloadbalanceraddserver.ram
on gridserveradd/gridservereditserver.type
on gridserveredit/gridserverlistdatacenter
on gridloadbalancerlist - lookup loadbalancer.datacenterThere are some value constraints for some keys in various places, such as validating an IP (which could also be validated against lookup), or string limitations (must start with [a-zA-Z] and <= 20 [a-zA-Z0-9\ ] characters.
These constraints should be applied and warnings emitted where applicable.
Need to write tests against all methds
The whole code style, syntax, and style needs to be proof read through and through.
Ensure:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.