Skip to content
This repository has been archived by the owner on Sep 12, 2022. It is now read-only.

Make linter significantly more strict #664

Merged
merged 466 commits into from
Sep 12, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
466 commits
Select commit Hold shift + click to select a range
1a802a9
Fix [F841(pyflakes), None] local variable 'user_allocation_source_eve…
cdosborn Sep 7, 2018
8754bf9
Fix [F841(pyflakes), None] local variable 'instance_allocation_event'…
cdosborn Sep 7, 2018
e555990
Fix [F841(pyflakes), None] local variable 'compute_used' is assigned …
cdosborn Sep 7, 2018
b298445
Fix [E501(pep8), None] line too long (165 > 159 characters)
cdosborn Sep 7, 2018
bb0496c
Fix [F401(pyflakes), None] 'behave.*' imported but unused
cdosborn Sep 7, 2018
6709792
Fix [F841(pyflakes), None] local variable 'response_main' is assigned…
cdosborn Sep 7, 2018
47c484a
Fix [F401(pyflakes), None] 'behave.*' imported but unused
cdosborn Sep 7, 2018
6752aa9
Fix [F401(pyflakes), None] 'behave.step' imported but unused
cdosborn Sep 7, 2018
d4070a6
Fix [F841(pyflakes), None] local variable 'source_id' is assigned to …
cdosborn Sep 7, 2018
090208f
Fix [F841(pyflakes), None] local variable 'admin_identity' is assigne…
cdosborn Sep 7, 2018
59d8c7e
Fix [F401(pyflakes), None] 'behave.*' imported but unused
cdosborn Sep 7, 2018
9ae5cce
Fix [F401(pyflakes), None] 'behave.given' imported but unused
cdosborn Sep 7, 2018
f25ac64
Fix [F401(pyflakes), None] 'core.models.Identity' imported but unused
cdosborn Sep 7, 2018
4265638
Fix [F401(pyflakes), None] 'behave.*' imported but unused
cdosborn Sep 7, 2018
b851fcf
Fix [F401(pyflakes), None] 'behave.step' imported but unused
cdosborn Sep 7, 2018
f0a0c9c
Fix [F841(pyflakes), None] local variable 'admin_identity' is assigne…
cdosborn Sep 7, 2018
9ac3491
Fix [F841(pyflakes), None] local variable 'driver' is assigned to but…
cdosborn Sep 7, 2018
5830fa0
Fix [F401(pyflakes), None] 'behaving.personas.steps.*' imported but u…
cdosborn Sep 7, 2018
3257d5a
Fix [F401(pyflakes), None] 'behave.*' imported but unused
cdosborn Sep 7, 2018
9f9facd
Fix [E501(pep8), None] line too long (160 > 159 characters)
cdosborn Sep 7, 2018
0199ccd
Fix [F841(pyflakes), None] local variable 'response_main' is assigned…
cdosborn Sep 7, 2018
65b2c97
Fix [F401(pyflakes), None] 'behave.then' imported but unused
cdosborn Sep 7, 2018
11f3299
Fix [F401(pyflakes), None] 'jetstream.allocation.TASAPIDriver' import…
cdosborn Sep 7, 2018
77f72ad
Fix [F841(pyflakes), None] local variable 'e' is assigned to but neve…
cdosborn Sep 7, 2018
1c1f135
Fix [F841(pyflakes), None] local variable 'exc' is assigned to but ne…
cdosborn Sep 7, 2018
b010293
Fix [F401(pyflakes), None] 'core.models.AllocationSource' imported bu…
cdosborn Sep 7, 2018
11e2668
Fix [F401(pyflakes), None] 'django.db.models.signals.post_save' impor…
cdosborn Sep 7, 2018
0c8ed69
Fix [F401(pyflakes), None] '.allocation.fill_user_allocation_source_f…
cdosborn Sep 7, 2018
c2f48d9
Fix [F401(pyflakes), None] 'django.shortcuts.render' imported but unused
cdosborn Sep 7, 2018
06725f7
Fix [F401(pyflakes), None] 'core.models' imported but unused
cdosborn Sep 7, 2018
f135541
Fix [F401(pyflakes), None] 'core.query.contains_credential' imported …
cdosborn Sep 7, 2018
1c85ff0
Fix [F401(pyflakes), None] 'core.plugins.ValidationPluginManager' imp…
cdosborn Sep 7, 2018
8f1e9ae
Fix [F401(pyflakes), None] 'threepio.logger' imported but unused
cdosborn Sep 7, 2018
720b4f6
Fix [F401(pyflakes), None] 'subprocess' imported but unused
cdosborn Sep 7, 2018
fa0e010
Fix [F841(pyflakes), None] local variable 'platform' is assigned to b…
cdosborn Sep 7, 2018
accc1f3
Fix [E501(pep8), None] line too long (169 > 159 characters)
cdosborn Sep 7, 2018
891e0c7
Fix [F401(pyflakes), None] 'service.tasks.driver.get_idempotent_deplo…
cdosborn Sep 7, 2018
e2983c9
Fix [F401(pyflakes), None] 'service.driver.get_esh_driver' imported b…
cdosborn Sep 7, 2018
3b407de
Fix [F401(pyflakes), None] 'core.models.InstanceStatusHistory' import…
cdosborn Sep 7, 2018
6a6cafe
Fix [F401(pyflakes), None] 'core.models.instance._convert_timestamp' …
cdosborn Sep 7, 2018
93faeca
Fix [F841(pyflakes), None] local variable 'status_name' is assigned t…
cdosborn Sep 7, 2018
fcfe30a
Fix [E501(pep8), None] line too long (185 > 159 characters)
cdosborn Sep 7, 2018
012495d
Remove unused script
cdosborn Sep 7, 2018
e451f5b
Fix [F841(pyflakes), None] local variable 'e' is assigned to but neve…
cdosborn Sep 7, 2018
9e897df
Fix [F401(pyflakes), None] 'core.plugins.ExpirationPluginManager' imp…
cdosborn Sep 7, 2018
319355c
Fix many pep line length errors by using yapf formatter
cdosborn Sep 7, 2018
d95d01a
Fix [F401(pyflakes), None] 'core.models.Identity' imported but unused
cdosborn Sep 7, 2018
fdde154
Fix [F401(pyflakes), None] 'core.models.instance._get_status_name_for…
cdosborn Sep 7, 2018
455a837
Fix [F841(pyflakes), None] local variable 'task' is assigned to but n…
cdosborn Sep 7, 2018
d9da437
Fix [F401(pyflakes), None] 'subprocess' imported but unused
cdosborn Sep 7, 2018
da0e3f3
Fix [F401(pyflakes), None] 'logging' imported but unused
cdosborn Sep 7, 2018
552626d
Fix [F401(pyflakes), None] 'core.models.Identity' imported but unused
cdosborn Sep 7, 2018
23b5702
Fix [F401(pyflakes), None] 'pprint' imported but unused
cdosborn Sep 7, 2018
2cedd96
Fix [F841(pyflakes), None] local variable 'dprov_aki_glance_image' is…
cdosborn Sep 7, 2018
bda9a6a
Fix [F841(pyflakes), None] local variable 'dprov_ari_glance_image' is…
cdosborn Sep 7, 2018
69f1046
Correct indent
cdosborn Sep 7, 2018
230f185
Fix [F841(pyflakes), None] local variable 'errors' is assigned to but…
cdosborn Sep 7, 2018
92092b7
Fix [F841(pyflakes), None] local variable 'bad_format' is assigned to…
cdosborn Sep 7, 2018
3cda778
Fix [F401(pyflakes), None] 'datetime.datetime' imported but unused
cdosborn Sep 7, 2018
147e735
Fix [F401(pyflakes), None] 'time.sleep' imported but unused
cdosborn Sep 7, 2018
76abf36
Fix several lint errors due to not defining __all__
cdosborn Sep 7, 2018
9abc078
Fix [F401(pyflakes), None] 'api.tests.factories.InstanceFactory' impo…
cdosborn Sep 7, 2018
d36214c
Fix [F401(pyflakes), None] '.instance_source_factory.InstanceSourceFa…
cdosborn Sep 7, 2018
3e4ae09
Fix [F401(pyflakes), None] 'core.models.ProviderMachine' imported but…
cdosborn Sep 7, 2018
017be23
Fix [F401(pyflakes), None] 'uuid' imported but unused
cdosborn Sep 7, 2018
9ad94dc
Fix [F401(pyflakes), None] 'core.models.InstanceSource' imported but …
cdosborn Sep 7, 2018
acfbfba
Fix [F401(pyflakes), None] '.provider_factory.ProviderFactory' import…
cdosborn Sep 7, 2018
6e3dc7e
Fix [F811(pyflakes), None] redefinition of unused 'ApplicationVersion…
cdosborn Sep 7, 2018
92b69ba
Fix [E501(pep8), None] line too long (163 > 159 characters)
cdosborn Sep 7, 2018
c40af7b
Fix [F841(pyflakes), None] local variable 'response' is assigned to b…
cdosborn Sep 7, 2018
ca63d80
Fix [F841(pyflakes), None] local variable 'response' is assigned to b…
cdosborn Sep 7, 2018
e188c7e
Fix [F401(pyflakes), None] 'requests' imported but unused
cdosborn Sep 7, 2018
da30a1b
Fix [F401(pyflakes), None] 'django.core.urlresolvers.reverse' importe…
cdosborn Sep 7, 2018
53a0ef4
Fix [F401(pyflakes), None] 'core.models.access_token.AccessToken' imp…
cdosborn Sep 7, 2018
72b0c8b
Fix [F841(pyflakes), None] local variable 'delete_response' is assign…
cdosborn Sep 7, 2018
dc86cce
Fix [F401(pyflakes), None] 'api.tests.factories.ApplicationVersionFac…
cdosborn Sep 7, 2018
e43be92
Fix [F401(pyflakes), None] 'rest_framework.test.APIRequestFactory' im…
cdosborn Sep 7, 2018
69eeef0
Fix [F401(pyflakes), None] 'api.tests.factories.SizeFactory' imported…
cdosborn Sep 7, 2018
60d5aed
Fix [F401(pyflakes), None] 'core.models.AtmosphereUser' imported but …
cdosborn Sep 7, 2018
d07ff46
Fix [F401(pyflakes), None] 'rest_framework.test.force_authenticate' i…
cdosborn Sep 7, 2018
780f208
Fix [F401(pyflakes), None] 'api.tests.factories.InstanceStatusFactory…
cdosborn Sep 7, 2018
fb22044
Fix [F401(pyflakes), None] 'core.models.AtmosphereUser' imported but …
cdosborn Sep 7, 2018
ba8606a
Fix [F401(pyflakes), None] 'api.tests.factories.InstanceFactory' impo…
cdosborn Sep 7, 2018
5ab3c22
Fix [F821(pyflakes), None] undefined name 'dict_eq_'
cdosborn Sep 7, 2018
8e35abd
Fix [F401(pyflakes), None] 'core.models.Size' imported but unused
cdosborn Sep 7, 2018
760dac4
Fix [F401(pyflakes), None] 'StringIO' imported but unused
cdosborn Sep 7, 2018
fed4dfe
Fix [F401(pyflakes), None] 'core.models.PatternMatch' imported but un…
cdosborn Sep 7, 2018
c4a8168
Fix [F821(pyflakes), None] undefined name 'StatusType'
cdosborn Sep 7, 2018
0435886
Fix [F401(pyflakes), None] 'django.utils.timezone.now' imported but u…
cdosborn Sep 7, 2018
0d9dd7e
Fix [F401(pyflakes), None] 'django.core.urlresolvers.reverse' importe…
cdosborn Sep 7, 2018
f8ef967
Fix [F401(pyflakes), None] 'django.test.TestCase' imported but unused
cdosborn Sep 7, 2018
78cff18
Fix [F841(pyflakes), None] local variable 'first_history' is assigned…
cdosborn Sep 7, 2018
b7af133
Fix [F841(pyflakes), None] local variable 'next_history' is assigned …
cdosborn Sep 7, 2018
6025ab6
Fix [F401(pyflakes), None] 'unittest' imported but unused
cdosborn Sep 7, 2018
d993aee
Fix [F401(pyflakes), None] 'django.utils.timezone' imported but unused
cdosborn Sep 7, 2018
92c007b
Fix [F401(pyflakes), None] 'uuid' imported but unused
cdosborn Sep 7, 2018
1fc4da1
Fix [E501(pep8), None] line too long (179 > 159 characters)
cdosborn Sep 7, 2018
be5eb0f
Fix [E501(pep8), None] line too long (215 > 159 characters)
cdosborn Sep 7, 2018
e5f819b
Fix [E501(pep8), None] line too long (169 > 159 characters)
cdosborn Sep 7, 2018
f4b7f66
Fix [F401(pyflakes), None] 'django.test.override_settings' imported b…
cdosborn Sep 7, 2018
8c53418
Fix [E501(pep8), None] line too long (227 > 159 characters)
cdosborn Sep 7, 2018
2719f5a
Fix [F401(pyflakes), None] 'django.core.exceptions.MultipleObjectsRet…
cdosborn Sep 7, 2018
0bc75a0
Fix [F401(pyflakes), None] 'core.models.InstanceStatusHistory' import…
cdosborn Sep 7, 2018
075ba74
Fix [F401(pyflakes), None] 'rest_framework.test.force_authenticate' i…
cdosborn Sep 10, 2018
7cefb52
Fix [F401(pyflakes), None] 'api.tests.factories.QuotaFactory' importe…
cdosborn Sep 10, 2018
3433831
Remove empty test class
cdosborn Sep 10, 2018
b9b653c
Remove broken tests
cdosborn Sep 10, 2018
e676c24
Fix [F401(pyflakes), None] 'core.models.MachineRequest' imported but …
cdosborn Sep 10, 2018
78b4fa7
Fix [F401(pyflakes), None] 'core.models.Provider' imported but unused
cdosborn Sep 10, 2018
bc44394
Fix [E712(pep8), None] comparison to False should be 'if cond is Fals…
cdosborn Sep 10, 2018
b6928c9
Fix [E712(pep8), None] comparison to False should be 'if cond is Fals…
cdosborn Sep 10, 2018
3659efe
Fix [E501(pep8), None] line too long (254 > 159 characters)
cdosborn Sep 10, 2018
4a45fc9
Fix [F401(pyflakes), None] 'datetime.timedelta' imported but unused
cdosborn Sep 10, 2018
355a656
Fix [F841(pyflakes), None] local variable 'dne' is assigned to but ne…
cdosborn Sep 10, 2018
610e4b8
Fix [F401(pyflakes), None] 'subprocess' imported but unused
cdosborn Sep 10, 2018
cdae371
Fix [F401(pyflakes), None] 'logging' imported but unused
cdosborn Sep 10, 2018
cf3d415
Fix [F401(pyflakes), None] 'django.utils.timezone.datetime' imported …
cdosborn Sep 10, 2018
1875f4a
Fix [F841(pyflakes), None] local variable 'is_now' is assigned to but…
cdosborn Sep 10, 2018
099ed5c
Fix [F401(pyflakes), None] 'core.models.Application' imported but unused
cdosborn Sep 10, 2018
8a8f976
Fix [F841(pyflakes), None] local variable 'args' is assigned to but n…
cdosborn Sep 10, 2018
40a9c6e
Fix [F401(pyflakes), None] 'core.models.AtmosphereUser as User' impor…
cdosborn Sep 10, 2018
0e769c6
Fix [F401(pyflakes), None] 'django.db.models.Max' imported but unused
cdosborn Sep 10, 2018
cc8da9c
Fix [F401(pyflakes), None] 'threepio.logger' imported but unused
cdosborn Sep 10, 2018
8d8e60f
Fix [F401(pyflakes), None] 'core.query.contains_credential' imported …
cdosborn Sep 10, 2018
7134a1e
Fix [F401(pyflakes), None] 'core.models.GroupMembership' imported but…
cdosborn Sep 10, 2018
e0341c6
Fix [F401(pyflakes), None] 'service.networking._get_unique_id' import…
cdosborn Sep 10, 2018
90e3ab4
Fix [F841(pyflakes), None] local variable 'exc' is assigned to but ne…
cdosborn Sep 10, 2018
2bda2f2
Fix [F841(pyflakes), None] local variable 'user' is assigned to but n…
cdosborn Sep 10, 2018
1e2842f
Fix [F841(pyflakes), None] local variable 'ce' is assigned to but nev…
cdosborn Sep 10, 2018
b208a99
Fix [F841(pyflakes), None] local variable 'project_name' is assigned …
cdosborn Sep 10, 2018
7279290
Fix [F841(pyflakes), None] local variable 'username' is assigned to b…
cdosborn Sep 10, 2018
c759bd0
Fix [F841(pyflakes), None] local variable 'neutron' is assigned to bu…
cdosborn Sep 10, 2018
c3bd085
Fix [F841(pyflakes), None] local variable 'dns_nameservers' is assign…
cdosborn Sep 10, 2018
90ce480
Fix [F841(pyflakes), None] local variable 'auth_version' is assigned …
cdosborn Sep 10, 2018
51ee948
Fix [E501(pep8), None] line too long (187 > 159 characters)
cdosborn Sep 10, 2018
c5985c1
Fix [F401(pyflakes), None] 'api.tests.factories.IdentityMembershipFac…
cdosborn Sep 10, 2018
9d8b804
Fix [F401(pyflakes), None] 'json' imported but unused
cdosborn Sep 10, 2018
a24d2a0
Fix [F841(pyflakes), None] local variable 'is_now' is assigned to but…
cdosborn Sep 10, 2018
efdca2c
Fix [F841(pyflakes), None] local variable 'identity_creds' is assigne…
cdosborn Sep 10, 2018
9bf3ad9
Fix [F841(pyflakes), None] local variable 'auth_version' is assigned …
cdosborn Sep 10, 2018
262fe2c
Fix [E501(pep8), None] line too long (165 > 159 characters)
cdosborn Sep 10, 2018
b3c1e0d
Fix [F401(pyflakes), None] 'django.conf.settings' imported but unused
cdosborn Sep 10, 2018
21c73d9
Fix [F401(pyflakes), None] 'django.utils.timezone' imported but unused
cdosborn Sep 10, 2018
e3ab855
Fix [F401(pyflakes), None] 'django.template.loader.render_to_string' …
cdosborn Sep 10, 2018
c848db6
Fix [F401(pyflakes), None] 'django.utils.text.slugify' imported but u…
cdosborn Sep 10, 2018
8175572
Fix [F401(pyflakes), None] 'django.utils.timezone.datetime' imported …
cdosborn Sep 10, 2018
fdb9ba9
Fix [F401(pyflakes), None] 'django_cyverse_auth.protocol.ldap' import…
cdosborn Sep 10, 2018
83d6e4d
Fix [F401(pyflakes), None] 'core.models.ssh_key.get_user_ssh_keys' im…
cdosborn Sep 10, 2018
bd57d69
Fix [F401(pyflakes), None] 'service.exceptions.NonZeroDeploymentExcep…
cdosborn Sep 10, 2018
0068427
Fix [F401(pyflakes), None] 'rtwo.models.instance.Instance' imported b…
cdosborn Sep 10, 2018
0bb58e1
Fix [F401(pyflakes), None] 'rtwo.driver.MockDriver' imported but unused
cdosborn Sep 10, 2018
7057c0a
Fix [F401(pyflakes), None] 'rtwo.drivers.common._connect_to_keystone_…
cdosborn Sep 10, 2018
ed92cc5
Fix [F401(pyflakes), None] 'service.mock.AtmosphereMockNetworkManager…
cdosborn Sep 10, 2018
5d1ef1b
Fix [F841(pyflakes), None] local variable 'user' is assigned to but n…
cdosborn Sep 10, 2018
648fa74
Fix [F401(pyflakes), None] 'socket.error as socket_error' imported bu…
cdosborn Sep 10, 2018
fdb6c25
Fix [F401(pyflakes), None] 'rtwo.exceptions.LibcloudBadResponseError'…
cdosborn Sep 10, 2018
ab4624d
Fix [F401(pyflakes), None] 'rtwo.models.provider.AWSUSEastProvider' i…
cdosborn Sep 10, 2018
73e85c1
Fix [F401(pyflakes), None] 'api.tests.factories.GroupFactory' importe…
cdosborn Sep 10, 2018
6a00833
Fix [E501(pep8), None] line too long (175 > 159 characters)
cdosborn Sep 10, 2018
c90bc02
Fix [F401(pyflakes), None] 'rtwo.exceptions.LibcloudInvalidCredsError…
cdosborn Sep 10, 2018
97f55dc
Fix [F401(pyflakes), None] 'rtwo.models.provider.AWSUSWestProvider' i…
cdosborn Sep 10, 2018
70eb93f
Fix [F401(pyflakes), None] 'core.models.pattern_match.PatternMatch' i…
cdosborn Sep 10, 2018
312bd1b
Fix [F401(pyflakes), None] 'core.models.identity.Identity' imported b…
cdosborn Sep 10, 2018
9f305ee
Fix [F841(pyflakes), None] local variable 'e' is assigned to but neve…
cdosborn Sep 10, 2018
68b4d4a
Fix [F401(pyflakes), None] 'core.models.AtmosphereUser as User' impor…
cdosborn Sep 10, 2018
a64fb19
Fix [F401(pyflakes), None] 'core.models.Identity' imported but unused
cdosborn Sep 10, 2018
cd9945e
Fix [F841(pyflakes), None] local variable 'admin_driver' is assigned …
cdosborn Sep 10, 2018
e555c48
Fix [F401(pyflakes), None] 'service.driver.get_esh_driver' imported b…
cdosborn Sep 10, 2018
18ef313
Fix [F841(pyflakes), None] local variable 'driver' is assigned to but…
cdosborn Sep 10, 2018
ff3023b
Fix [F401(pyflakes), None] 'core.models.machine.compare_core_machines…
cdosborn Sep 10, 2018
0a2669a
Fix [F401(pyflakes), None] 'service.exceptions.DeviceBusyException' i…
cdosborn Sep 10, 2018
9cda63b
Fix [F841(pyflakes), None] local variable 'e' is assigned to but neve…
cdosborn Sep 10, 2018
62b3d1b
Fix [F841(pyflakes), None] local variable 'e' is assigned to but neve…
cdosborn Sep 10, 2018
91b7ea4
Fix [F401(pyflakes), None] 'service.tasks.snapshot' imported but unused
cdosborn Sep 10, 2018
ff84f9c
Fix [F401(pyflakes), None] 'chromogenic.tasks' imported but unused
cdosborn Sep 10, 2018
3574a33
Fix [F401(pyflakes), None] 'celery.task.schedules.crontab' imported b…
cdosborn Sep 10, 2018
75d0cba
Fix [F401(pyflakes), None] 'core.models.AtmosphereUser as User' impor…
cdosborn Sep 10, 2018
0bdf2aa
Fix [E501(pep8), None] line too long (195 > 159 characters)
cdosborn Sep 10, 2018
ad26c7b
Fix [F401(pyflakes), None] 'sys' imported but unused
cdosborn Sep 10, 2018
5e4d2f8
Fix [F401(pyflakes), None] 're' imported but unused
cdosborn Sep 10, 2018
fe98b83
Fix [F841(pyflakes), None] local variable 'no_user' is assigned to bu…
cdosborn Sep 10, 2018
bf9b0cc
Fix [F841(pyflakes), None] local variable 'exc' is assigned to but ne…
cdosborn Sep 10, 2018
afae63f
Fix [F841(pyflakes), None] local variable 'num_ips_removed' is assign…
cdosborn Sep 10, 2018
4ae8374
Fix [F841(pyflakes), None] local variable 'playbook_results' is assig…
cdosborn Sep 10, 2018
75d7be7
Fix [F841(pyflakes), None] local variable 'image_members' is assigned…
cdosborn Sep 10, 2018
d9ddb83
Fix [F841(pyflakes), None] local variable 'e' is assigned to but neve…
cdosborn Sep 10, 2018
0bdfbf4
Fix [F841(pyflakes), None] local variable 'exc' is assigned to but ne…
cdosborn Sep 10, 2018
90bb6b5
Fix [F841(pyflakes), None] local variable 'exc' is assigned to but ne…
cdosborn Sep 10, 2018
d03f0ee
Fix [F401(pyflakes), None] 'core.models.instance.Instance' imported b…
cdosborn Sep 10, 2018
3b701d0
Fix [F401(pyflakes), None] 'core.models.machine.get_or_create_provide…
cdosborn Sep 10, 2018
eb229fd
Fix [F401(pyflakes), None] 'core.models.IdentityMembership' imported …
cdosborn Sep 10, 2018
9280e51
Fix [E501(pep8), None] line too long (175 > 159 characters)
cdosborn Sep 10, 2018
23e47d1
Fix [E501(pep8), None] line too long (168 > 159 characters)
cdosborn Sep 10, 2018
f4faade
Fix [F841(pyflakes), None] local variable 'provider' is assigned to b…
cdosborn Sep 10, 2018
23265da
Fix [E712(pep8), None] comparison to False should be 'if cond is Fals…
cdosborn Sep 10, 2018
881ada6
Fix [F841(pyflakes), None] local variable 'exc' is assigned to but ne…
cdosborn Sep 10, 2018
f013961
Fix [F841(pyflakes), None] local variable 'core_instances' is assigne…
cdosborn Sep 10, 2018
2e72d5d
Fix [F401(pyflakes), None] 're' imported but unused
cdosborn Sep 10, 2018
fd20037
Fix [F401(pyflakes), None] 'celery.current_app as app' imported but u…
cdosborn Sep 10, 2018
2fb4106
Fix [F401(pyflakes), None] 'celery.result.allow_join_result' imported…
cdosborn Sep 10, 2018
cc3a3be
Fix [F401(pyflakes), None] 'atmosphere.settings.local.ATMOSPHERE_PRIV…
cdosborn Sep 10, 2018
2a43c77
Fix [F401(pyflakes), None] 'core.models.quota.has_storage_quota' impo…
cdosborn Sep 10, 2018
40125ad
Fix [F841(pyflakes), None] local variable 'start_date' is assigned to…
cdosborn Sep 10, 2018
e1f0052
Fix [F401(pyflakes), None] 'api.tests.factories.InstanceSourceFactory…
cdosborn Sep 10, 2018
1c558aa
Fix [E501(pep8), None] line too long (266 > 159 characters)
cdosborn Sep 10, 2018
6fd8786
Fix [F401(pyflakes), None] 'rtwo.exceptions.ConnectionFailure' import…
cdosborn Sep 10, 2018
c6716db
Fix [F401(pyflakes), None] 'rtwo.drivers.openstack_network.NetworkMan…
cdosborn Sep 10, 2018
ab01ba3
Fix [F401(pyflakes), None] 'core.query.only_current' imported but unused
cdosborn Sep 10, 2018
4308642
Fix [F401(pyflakes), None] 'core.models.instance_action.InstanceActio…
cdosborn Sep 10, 2018
4dcb362
Fix [F401(pyflakes), None] 'service.networking._get_unique_id' import…
cdosborn Sep 10, 2018
33d3522
Fix [F841(pyflakes), None] local variable 'stopped' is assigned to bu…
cdosborn Sep 10, 2018
6d68711
Remove dead method
cdosborn Sep 10, 2018
2fd37ad
Fix [F841(pyflakes), None] local variable 'e' is assigned to but neve…
cdosborn Sep 10, 2018
faa83fa
Fix [F841(pyflakes), None] local variable 'size' is assigned to but n…
cdosborn Sep 10, 2018
9bc5889
Fix [F841(pyflakes), None] local variable 'core_instance' is assigned…
cdosborn Sep 10, 2018
7747e98
Fix [F401(pyflakes), None] 'api.tests.factories.ApplicationVersionFac…
cdosborn Sep 10, 2018
388137a
Fix [F401(pyflakes), None] 'service.networking.ExternalNetwork' impor…
cdosborn Sep 10, 2018
4d4da85
Fix [F841(pyflakes), None] local variable 'deploy' is assigned to but…
cdosborn Sep 10, 2018
cc25586
Fix [F841(pyflakes), None] local variable 'no_username' is assigned t…
cdosborn Sep 10, 2018
2a03903
Fix [F841(pyflakes), None] local variable 'username' is assigned to b…
cdosborn Sep 10, 2018
f0c69bc
Fix [F841(pyflakes), None] local variable 'exc' is assigned to but ne…
cdosborn Sep 10, 2018
555ef8b
Fix [F841(pyflakes), None] local variable 'driver' is assigned to but…
cdosborn Sep 10, 2018
9c377c7
Fix [F841(pyflakes), None] local variable 'application' is assigned t…
cdosborn Sep 10, 2018
6481d35
Fix [F841(pyflakes), None] local variable 'esh_driver' is assigned to…
cdosborn Sep 10, 2018
3d969de
Fix [F841(pyflakes), None] local variable 'security_group_name' is as…
cdosborn Sep 10, 2018
4015796
Fix [F841(pyflakes), None] local variable 'wait_time' is assigned to …
cdosborn Sep 10, 2018
1e25f43
Fix [F841(pyflakes), None] local variable 'instance_id' is assigned t…
cdosborn Sep 10, 2018
3b929bd
Fix [F401(pyflakes), None] 'core.models.pattern_match.MatchType' impo…
cdosborn Sep 10, 2018
2779cb3
Fix [F401(pyflakes), None] 'core.models.IdentityMembership' imported …
cdosborn Sep 10, 2018
867e267
Fix [F401(pyflakes), None] 'core.models.machine.filter_core_machine' …
cdosborn Sep 10, 2018
df314f6
Fix [F401(pyflakes), None] 'service.tasks.machine' imported but unused
cdosborn Sep 10, 2018
b8b9adf
Fix [E501(pep8), None] line too long (163 > 159 characters)
cdosborn Sep 10, 2018
fcf1d5a
Fix [F401(pyflakes), None] 'api.tests.factories.ImageFactory' importe…
cdosborn Sep 10, 2018
bf24a52
Fix [F401(pyflakes), None] 'core.models.application.Application' impo…
cdosborn Sep 10, 2018
4aaea6b
Fix [F401(pyflakes), None] 'service.networking.ExternalRouter' import…
cdosborn Sep 10, 2018
ce31c62
Fix [F841(pyflakes), None] local variable 'core_identity' is assigned…
cdosborn Sep 10, 2018
7dc3707
Fix [F401(pyflakes), None] 'service.tasks.volume' imported but unused
cdosborn Sep 10, 2018
f0c100b
Fix [E712(pep8), None] comparison to True should be 'if cond is True:…
cdosborn Sep 10, 2018
add2a22
Fix [F401(pyflakes), None] 'service.tasks.driver' imported but unused
cdosborn Sep 10, 2018
42055b3
Fix [F401(pyflakes), None] 'service.tasks.monitoring' imported but un…
cdosborn Sep 10, 2018
3ca0f25
Fix [F401(pyflakes), None] 'service.tasks.accounts' imported but unused
cdosborn Sep 10, 2018
5ad5a15
Fix [F401(pyflakes), None] 'rest_framework.test.APIClient' imported b…
cdosborn Sep 11, 2018
2295464
Fix [F401(pyflakes), None] 'core.models.size.convert_esh_size' import…
cdosborn Sep 11, 2018
1900cc1
Fix [F401(pyflakes), None] 'core.models.provider.Provider' imported b…
cdosborn Sep 11, 2018
aae8625
Fix [F401(pyflakes), None] 'core.models.application.Application' impo…
cdosborn Sep 11, 2018
34b0ccd
Fix [F401(pyflakes), None] 'celery.result.allow_join_result' imported…
cdosborn Sep 11, 2018
a561830
Fix [F841(pyflakes), None] local variable 'hostname' is assigned to b…
cdosborn Sep 12, 2018
859fd1f
Fix [F401(pyflakes), None] 'service.deploy.build_host_name' imported …
cdosborn Sep 12, 2018
8b6f5f0
Do not run prospector against local.py
cdosborn Sep 10, 2018
12fed6e
Update changelog
cdosborn Sep 10, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
- ./configure
- pip-sync dev_requirements.txt
- ./travis/check_for_dead_code_with_vulture.sh
- prospector --profile prospector_profile.yaml --messages-only
- prospector --profile prospector_profile.yaml --messages-only -- $(git ls-files | grep '\.py$')
- coverage run manage.py test --keepdb --noinput --settings=atmosphere.settings
- coverage run --append manage.py behave --keepdb --tags ~@skip-if-${DISTRIBUTION} --settings=atmosphere.settings --format rerun --outfile rerun_failing.features
- if [ -f "rerun_failing.features" ]; then python manage.py behave --logging-level DEBUG --capture-stderr --capture --verbosity 3 --keepdb @rerun_failing.features; fi
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
- Added timeout of 5 sec to tas api for user validation, and refactored to
make validation more explicit in the absence of the old selected_identity
notion ([#639](https://github.com/cyverse/atmosphere/pull/639))
- Linter runs more strict. Many changes were made to satisfy linter.
([#664](https://github.com/cyverse/atmosphere/pull/664))

### Removed
- Remove code/vars related to old allocation system
Expand Down
2 changes: 2 additions & 0 deletions api/base/views/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
from .version import VersionViewSet, DeployVersionViewSet

__all__ = ["VersionViewSet", "DeployVersionViewSet"]
calvinmclean marked this conversation as resolved.
Show resolved Hide resolved
7 changes: 3 additions & 4 deletions api/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,6 @@ def over_allocation(allocation_exception):


def member_action_forbidden(username, object_type, object_id):
message = "User %s does not have permission to act on %s %s. Make sure that you are a Leader of the Project that %s %s resides in." % (username, object_type, object_id, object_type, object_id)
return failure_response(
status.HTTP_403_FORBIDDEN,
message)
message = "User %s does not have permission to act on %s %s. Make sure that you are a Leader of the Project that %s %s resides in." % (
username, object_type, object_id, object_type, object_id)
return failure_response(status.HTTP_403_FORBIDDEN, message)
2 changes: 0 additions & 2 deletions api/tests/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@
Common functions used by all API test cases
"""
from urlparse import urljoin
from datetime import datetime
from rest_framework import status
from time import sleep


def verify_expected_output(test_client, api_out, expected_out):
Expand Down
11 changes: 11 additions & 0 deletions api/tests/factories/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,14 @@
from .allocation_source_factory import AllocationSourceFactory, UserAllocationSourceFactory
from .boot_script_factory import BootScriptRawTextFactory
from .instance_source_factory import InstanceSourceFactory

__all__ = [
"TagFactory", "UserFactory", "AnonymousUserFactory", "ProviderFactory",
"GroupFactory", "GroupMembershipFactory", "ProjectFactory",
"IdentityFactory", "IdentityMembershipFactory", "ImageFactory",
"InstanceFactory", "InstanceHistoryFactory", "InstanceStatusFactory",
"ApplicationVersionFactory", "QuotaFactory", "ProviderTypeFactory",
"ProviderMachineFactory", "PlatformTypeFactory", "SizeFactory",
"AllocationSourceFactory", "UserAllocationSourceFactory",
"BootScriptRawTextFactory", "BootScriptURLFactory", "InstanceSourceFactory"
]
2 changes: 1 addition & 1 deletion api/tests/factories/boot_script_factory.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import factory
from factory import fuzzy
from api.tests.factories import UserFactory, InstanceFactory
from api.tests.factories import UserFactory
from core.models import BootScript, ScriptType


Expand Down
1 change: 0 additions & 1 deletion api/tests/factories/instance_factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
from django.utils import timezone
from .user_factory import UserFactory
from .project_factory import ProjectFactory
from .instance_source_factory import InstanceSourceFactory
from .provider_machine_factory import ProviderMachineFactory
from .identity_factory import IdentityFactory

Expand Down
2 changes: 1 addition & 1 deletion api/tests/factories/instance_source_factory.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import factory
import uuid
from core.models import ProviderMachine, InstanceSource
from core.models import InstanceSource
from .provider_factory import ProviderFactory

class InstanceSourceFactory(factory.DjangoModelFactory):
Expand Down
5 changes: 1 addition & 4 deletions api/tests/factories/provider_machine_factory.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
import factory
import uuid
from core.models import ProviderMachine, InstanceSource
from core.models import ProviderMachine
from .version_factory import ApplicationVersionFactory
from .image_factory import ImageFactory
from .provider_factory import ProviderFactory
from .instance_source_factory import InstanceSourceFactory
from .version_factory import ApplicationVersionFactory


class ProviderMachineFactory(factory.DjangoModelFactory):
Expand Down
5 changes: 4 additions & 1 deletion api/tests/test_auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,10 @@ def test_valid_ldap_auth(self, patch_func):
response = self.client.post(self.auth_url, data)
resp_data = response.data
self.assertEquals(response.status_code, 201)
self.assertTrue(resp_data['username'] == self.username, "Response returned unexpected username <%s>, expected %s" % (resp_data['username'], self.username))
self.assertTrue(
resp_data['username'] == self.username,
"Response returned unexpected username <%s>, expected %s" %
(resp_data['username'], self.username))
self.assertTrue(resp_data['token'] is not None)

@override_settings(AUTHENTICATION_BACKENDS=('django_cyverse_auth.authBackends.LDAPLoginBackend',))
Expand Down
4 changes: 2 additions & 2 deletions api/tests/v1/test_profile.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def test_external_accounts_are_created(self):
force_authenticate(request, user=user)

with mock.patch("api.v1.views.profile.create_new_accounts") as mock_create_new_accounts:
response = view(request)
view(request)
mock_create_new_accounts.assert_called_once()

@override_settings(AUTO_CREATE_NEW_ACCOUNTS=True)
Expand All @@ -40,5 +40,5 @@ def test_external_accounts_are_not_created_for_invalid_user(self):
with mock.patch.object(AtmosphereUser, 'is_valid', return_value=False), \
mock.patch("api.v1.views.profile.create_new_accounts") \
as mock_create_new_accounts:
response = view(request)
view(request)
mock_create_new_accounts.assert_not_called()
8 changes: 2 additions & 6 deletions api/tests/v2/test_access_tokens.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
import requests

from rest_framework.test import APITestCase, APIRequestFactory, force_authenticate
from django.core.urlresolvers import reverse

from api.v2.views import AccessTokenViewSet
from api.tests.factories import UserFactory, AnonymousUserFactory
from core.models.access_token import AccessToken, create_access_token

from core.models.access_token import create_access_token
from .base import APISanityTestCase


Expand Down Expand Up @@ -98,7 +94,7 @@ def test_edit_not_public(self):

def test_delete(self):
force_authenticate(self.delete_request, user=self.user)
delete_response = self.delete_view(self.delete_request, pk=self.access_token.id)
self.delete_view(self.delete_request, pk=self.access_token.id)
force_authenticate(self.list_request, user=self.user)
list_response = self.list_view(self.list_request)
data = list_response.data.get('results')
Expand Down
8 changes: 3 additions & 5 deletions api/tests/v2/test_instance_actions.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,11 @@
from django.core.urlresolvers import reverse
from django.utils import timezone

from rest_framework.test import APIClient

from rest_framework.test import APITestCase, APIRequestFactory, force_authenticate
from api.tests.factories import (
UserFactory, AnonymousUserFactory, InstanceFactory, InstanceHistoryFactory, InstanceStatusFactory,
ApplicationVersionFactory, ProviderMachineFactory, IdentityFactory, ProviderFactory,
SizeFactory, AllocationSourceFactory)
UserFactory, AnonymousUserFactory, InstanceFactory,
InstanceHistoryFactory, InstanceStatusFactory, ProviderMachineFactory,
IdentityFactory, ProviderFactory, SizeFactory, AllocationSourceFactory)
from api.v2.views import InstanceViewSet
from core.models import (
InstanceAllocationSourceSnapshot,
Expand Down
9 changes: 4 additions & 5 deletions api/tests/v2/test_instances.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,13 @@

from rest_framework.test import APIClient

from rest_framework.test import APITestCase, APIRequestFactory, force_authenticate
from rest_framework.test import APITestCase
from api.tests.factories import (
GroupFactory, UserFactory, AnonymousUserFactory, InstanceFactory, InstanceHistoryFactory, InstanceStatusFactory, SizeFactory,
ImageFactory, ApplicationVersionFactory, InstanceSourceFactory, ProviderMachineFactory, IdentityFactory, ProviderFactory,
IdentityMembershipFactory, QuotaFactory)
UserFactory, AnonymousUserFactory, InstanceFactory,
InstanceHistoryFactory, InstanceStatusFactory, ProviderMachineFactory,
IdentityFactory, ProviderFactory)
from .base import APISanityTestCase
from api.v2.views import InstanceViewSet
from core.models import AtmosphereUser


class InstanceTests(APITestCase, APISanityTestCase):
Expand Down
38 changes: 0 additions & 38 deletions api/tests/v2/test_project_instances.py

This file was deleted.

71 changes: 1 addition & 70 deletions api/tests/v2/test_reporting.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
import json
from unittest import skip

from django.core.urlresolvers import reverse
from rest_framework.test import APITestCase, APIRequestFactory, force_authenticate

from api.tests.factories import UserFactory, AnonymousUserFactory, InstanceFactory
from api.tests.factories import UserFactory, AnonymousUserFactory
from api.v2.views import ReportingViewSet
from core.models import AtmosphereUser

Expand All @@ -26,74 +25,6 @@ def setUp(self):
self.user = UserFactory.create()
self.view = ReportingViewSet.as_view({'get': 'list'})

#def test_long_history_pull_excel_file(self):
# """Will only work with a correct database."""
# factory = APIRequestFactory()
# url = '/api/v2/reporting?format=xlsx&start_date=2015-01-01&end_date=2017-01-28&provider_id=4&provider_id=5&provider_id=6'
# request = factory.get(url)
# sanity_user = AtmosphereUser.objects.get_by_natural_key('sgregory')
# force_authenticate(request, user=sanity_user)
# response = self.view(request)
# self.assertEquals(response.status_code, 200)
# self.assertEquals(response.accepted_media_type, 'application/vnd.ms-excel')
# with open('/opt/dev/atmosphere/reporting.xlsx','wb') as reporting_file:
# for chunk in response.rendered_content:
# reporting_file.write(chunk)
# reporting_file.flush()
# return

#@skipUnless(contains_user('test-julianp'), 'The database does not contain the user test-julianp')
@skip('skip for now')
def test_a_sanity_check(self):
"""Will only work with a correct database.
TODO: Create providers and fixtures necessary to get working.
"""
factory = APIRequestFactory()
url = '/api/v2/reporting?start_date=2016-01-01&end_date=2016-10-25&provider_id=1&provider_id=2&provider_id=3&' \
'provider_id=4&provider_id=5&provider_id=6'
request = factory.get(url)
sanity_user = AtmosphereUser.objects.get_by_natural_key('test-julianp')
force_authenticate(request, user=sanity_user)
response = self.view(request)
self.assertEquals(response.status_code, 200)
self.assertEquals(len(response.data), 1)
received_data = json.loads(json.dumps(response.data, indent=2))
expected_data_json = '''[
{
"id": 29792,
"instance_id": "57259394-a1d2-4318-a0c0-5764f42db4be",
"username": "test-julianp",
"staff_user": "False",
"provider": "iPlant Workshop Cloud - Tucson",
"image_name": "Ubuntu 14.04.2 XFCE Base",
"version_name": "1.0",
"is_featured_image": true,
"hit_aborted": false,
"hit_active_or_aborted": 1,
"hit_active_or_aborted_or_error": 1,
"hit_active": true,
"hit_deploy_error": false,
"hit_error": false,
"size": {
"id": 105,
"uuid": "60fccf16-d0ba-488d-b8a5-46a9752dc2ca",
"url": "http://testserver/api/v2/sizes/60fccf16-d0ba-488d-b8a5-46a9752dc2ca",
"alias": "1",
"name": "tiny1",
"cpu": 1,
"disk": 0,
"mem": 4096,
"active": true,
"start_date": "2014-06-06T20:50:08.387646Z",
"end_date": null
},
"start_date": "09/20/16 17:36:57",
"end_date": null
}
]'''
expected_data = json.loads(expected_data_json)
dict_eq_(self, received_data, expected_data)

def test_is_not_public(self):
factory = APIRequestFactory()
url = reverse('api:v2:reporting-list')
Expand Down
1 change: 0 additions & 1 deletion api/tests/v2/test_sizes.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
force_authenticate

from django.core.urlresolvers import reverse
from core.models import Size
from api.v2.views import SizeViewSet
from api.tests.factories import ProviderFactory, UserFactory,\
AnonymousUserFactory, SizeFactory, IdentityFactory
Expand Down
2 changes: 0 additions & 2 deletions api/v1/serializers/profile_serializer.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
from core.models.profile import UserProfile
from core.models import Identity
from rest_framework import serializers
from .identity_related_field import IdentityRelatedField


class ProfileSerializer(serializers.ModelSerializer):
Expand Down
1 change: 0 additions & 1 deletion api/v1/views/identity.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

from threepio import logger

from core.models.group import Group
from core.models.identity import Identity as CoreIdentity
from core.models.provider import Provider

Expand Down
10 changes: 0 additions & 10 deletions api/v1/views/identity_membership.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

from core.models.group import Group, Identity
from core.models import IdentityMembership as CoreIdentityMembership
from core.query import only_current_provider

from api import failure_response
from api.v1.serializers import IdentitySerializer
Expand Down Expand Up @@ -49,16 +48,7 @@ def get(self, request, provider_uuid, identity_uuid, format=None):
"""
Return the identity membership matching this provider+identity
"""
# Sanity checks:
# User is authenticated
user = request.user
try:
# User is a member of a group ( TODO: loop through all instead)
group = user.group_set.get(name=user.username)
# Group has access to the identity on an active,
# currently-running provider
identity = group.current_identities.get(
uuid=identity_uuid)
# All other members of the identity are visible
id_members = CoreIdentityMembership.objects.filter(
identity__uuid=identity_uuid)
Expand Down
12 changes: 6 additions & 6 deletions api/v1/views/instance.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
from django.utils import timezone
from django.db.models import Q

from rtwo.exceptions import (
LibcloudInvalidCredsError, ConnectionFailure, LibcloudBadResponseError
)
from rest_framework import status
from rest_framework.response import Response

from socket import error as socket_error
from threepio import logger

from core.exceptions import ProviderNotActive
Expand All @@ -25,8 +27,6 @@
SizeNotAvailable, HypervisorCapacityError, SecurityGroupNotCreated,
VolumeAttachConflict, VolumeMountConflict, InstanceDoesNotExist,
UnderThresholdError, ActionNotAllowed, Unauthorized,
# Technically owned by another
socket_error, ConnectionFailure, LibcloudInvalidCredsError, LibcloudBadResponseError
)
from service.instance import (
run_instance_action,
Expand Down Expand Up @@ -491,7 +491,7 @@ def post(self, request, provider_uuid, identity_uuid, instance_id):
return connection_failure(provider_uuid, identity_uuid)
except ProviderNotActive as pna:
return inactive_provider(pna)
except InstanceDoesNotExist as dne:
except InstanceDoesNotExist:
return failure_response(
status.HTTP_404_NOT_FOUND,
'Instance %s no longer exists' % (instance_id,))
Expand Down Expand Up @@ -751,7 +751,7 @@ def delete(self, request, provider_uuid, identity_uuid, instance_id):
return connection_failure(provider_uuid, identity_uuid)
except LibcloudInvalidCredsError:
return invalid_creds(provider_uuid, identity_uuid)
except InstanceDoesNotExist as dne:
except InstanceDoesNotExist:
return failure_response(
status.HTTP_404_NOT_FOUND,
"Instance %s does not exist" % instance_id)
Expand Down
Loading