Skip to content

Commit

Permalink
Merge pull request #17 from Isilon/template_fix
Browse files Browse the repository at this point in the history
Fixed bug in setter for required params
  • Loading branch information
Alex Pecoraro authored Aug 18, 2016
2 parents 6614bd0 + 3f98496 commit 25d0c95
Show file tree
Hide file tree
Showing 6 changed files with 45 additions and 14 deletions.
2 changes: 1 addition & 1 deletion swagger-codegen-config.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"packageName": "isi_sdk",
"packageVersion": "1.0.1"
"packageVersion": "1.0.2"
}
2 changes: 1 addition & 1 deletion swagger_templates/python/model.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ class {{classname}}(object):
{{#hasValidation}}

{{#required}}
if not {{name}}:
if {{name}} is None:
raise ValueError("Invalid value for `{{name}}`, must not be `None`")
{{/required}}
{{#maxLength}}
Expand Down
9 changes: 5 additions & 4 deletions tests/test_cluster_config.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
import isi_sdk
import urllib3
import test_constants

urllib3.disable_warnings()

# configure username and password
isi_sdk.configuration.username = "root"
isi_sdk.configuration.password = "a"
isi_sdk.configuration.verify_ssl = False
isi_sdk.configuration.username = test_constants.USERNAME
isi_sdk.configuration.password = test_constants.PASSWORD
isi_sdk.configuration.verify_ssl = test_constants.VERIFY_SSL

# configure host
host = "https://VNODE2294.west.isilon.com:8080"
host = test_constants.HOST
apiClient = isi_sdk.ApiClient(host)
clusterApi = isi_sdk.ClusterApi(apiClient)

Expand Down
9 changes: 5 additions & 4 deletions tests/test_event_eventgroup_ocurrences.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
import isi_sdk
import urllib3
import test_constants

urllib3.disable_warnings()

# configure username and password
isi_sdk.configuration.username = "root"
isi_sdk.configuration.password = "a"
isi_sdk.configuration.verify_ssl = False
isi_sdk.configuration.username = test_constants.USERNAME
isi_sdk.configuration.password = test_constants.PASSWORD
isi_sdk.configuration.verify_ssl = test_constants.VERIFY_SSL

# configure host
host = "https://VNODE2294.west.isilon.com:8080"
host = test_constants.HOST
apiClient = isi_sdk.ApiClient(host)
eventApi = isi_sdk.EventApi(apiClient)

Expand Down
28 changes: 28 additions & 0 deletions tests/test_network_groupnets.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import isi_sdk as isi_sdk
from isi_sdk.rest import ApiException
import urllib3
import test_constants

from pprint import pprint

urllib3.disable_warnings()

# configure username and password
isi_sdk.configuration.username = test_constants.USERNAME
isi_sdk.configuration.password = test_constants.PASSWORD
isi_sdk.configuration.verify_ssl = test_constants.VERIFY_SSL

# configure host
host = test_constants.HOST
api_client = isi_sdk.ApiClient(host)
api_instance = isi_sdk.NetworkGroupnetsApi(api_client)

try:

api_response = \
api_instance.list_subnets_subnet_pools('groupnet0', 'subnet0')
pprint(api_response)

except ApiException as e:

print "Exception when calling list_subnets_subnet_pools: %s\n" % e
9 changes: 5 additions & 4 deletions tests/test_quotas.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
import isi_sdk
import urllib3
import test_constants

urllib3.disable_warnings()

# configure username and password
isi_sdk.configuration.username = "root"
isi_sdk.configuration.password = "a"
isi_sdk.configuration.verify_ssl = False
isi_sdk.configuration.username = test_constants.USERNAME
isi_sdk.configuration.password = test_constants.PASSWORD
isi_sdk.configuration.verify_ssl = test_constants.VERIFY_SSL

# configure host
host = "https://VNODE2294.west.isilon.com:8080"
host = test_constants.HOST
apiClient = isi_sdk.ApiClient(host)
quotaApi = isi_sdk.QuotaApi(apiClient)

Expand Down

0 comments on commit 25d0c95

Please sign in to comment.