Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
27087eb
Merge pull request #225 from Syncano/release-v5.3.0
opalczynski Jul 26, 2016
a03fd8c
Merge pull request #226 from Syncano/master
opalczynski Jul 26, 2016
90c4333
[LIB-821] add retry-after handling;
opalczynski Aug 9, 2016
3801a26
[LIB-821] correct isort issues;
opalczynski Aug 9, 2016
49fa010
Merge pull request #227 from Syncano/LIB-821
opalczynski Aug 9, 2016
12cda74
[LIB-837][WIP] working on custom sockets in LIB
opalczynski Aug 10, 2016
460006f
[LIB-837] Add missing docs about custom_sockets; move utils to anothe…
opalczynski Aug 11, 2016
5eca906
[LIB-837] add missing fields in doc string;
opalczynski Aug 11, 2016
cb5f0ab
[readme_changes] Some readme changes
23doors Aug 12, 2016
9a7c280
Merge pull request #229 from Syncano/readme_changes
23doors Aug 12, 2016
c0f75cb
[LIB-837] correct documentation; add possibility to read all endpoint…
opalczynski Aug 12, 2016
e108b5a
[LIB-837] Correct after tests;
opalczynski Aug 12, 2016
5eab464
[LIB-837] another portion of corrects;
opalczynski Aug 12, 2016
1afcd9f
[LIB-837] correct tests again;
opalczynski Aug 12, 2016
48eb08e
[LIB-837] change tests instead of doing a magic in ModelField;
opalczynski Aug 12, 2016
4e2ee33
Language updates
MariuszWisniewski Aug 12, 2016
fe52e7a
[ci skip] readme
MariuszWisniewski Aug 12, 2016
7bc974a
[ci skip] Endpoints readme update
MariuszWisniewski Aug 15, 2016
bc71ad1
[LIB-837] revert ModelField on script in script endpoint model;
opalczynski Aug 16, 2016
327a3fc
[LIB-837] correct data passing on run methods;
opalczynski Aug 16, 2016
d50344b
[LIB-837] correct custom socket behaviour;
opalczynski Aug 16, 2016
c2ffd3a
Merge branch 'LIB-837' of github.com:Syncano/syncano-python into LIB-837
opalczynski Aug 16, 2016
42e4373
[LIB-837] corrects after qa;
opalczynski Aug 16, 2016
04c5ef6
[LIB-837] corrects after qa;
opalczynski Aug 16, 2016
9f5adba
[LIB-837] correct docs examples, polish the tests;
opalczynski Aug 16, 2016
69f3a11
[LIB-837] remove default custom socket in setupclass;
opalczynski Aug 16, 2016
3d1f4dd
[LIB-837] remove default custom socket in setupclass;
opalczynski Aug 16, 2016
d982fd0
[LIB-837] final test correction;
opalczynski Aug 16, 2016
8662e42
Update language
devintyler Aug 16, 2016
2ff6c68
[LIB-819] - Add support for creating objects through DataEndpoint
ilu2112 Aug 18, 2016
0864163
[LIB-837] add possibility to directly point instance name when gettin…
opalczynski Aug 18, 2016
9246b98
[LIB-837] change interface: publish to install in custom socket context;
opalczynski Aug 19, 2016
31c51b9
Merge branch 'LIB-837' of github.com:Syncano/syncano-python into LIB-837
opalczynski Aug 19, 2016
14f6ff7
[LIB-837] add status badges to README
opalczynski Aug 19, 2016
2372986
[LIB-837] small changes after CORE change;
opalczynski Aug 22, 2016
515e50b
[LIB-837] correct SocketEndpoint behaviour (run mainly);
opalczynski Aug 22, 2016
16795dd
[LIB-837] correct run in CustomSocket;
opalczynski Aug 22, 2016
b8c252f
[LIB-837] add possiblity to install from url;
opalczynski Aug 23, 2016
3cf2465
[LIB-837] update documentation for installing socket from url;
opalczynski Aug 23, 2016
ef39be6
[LIB-837] fixes after qa;
opalczynski Aug 24, 2016
38e94ad
Merge pull request #230 from Syncano/LIB-819
opalczynski Aug 24, 2016
6ab2429
Merge pull request #228 from Syncano/LIB-837
opalczynski Aug 24, 2016
21ddeaf
[RELEASE v5.4] bump the version;
opalczynski Aug 24, 2016
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
Prev Previous commit
Next Next commit
[LIB-837] add possiblity to install from url;
  • Loading branch information
opalczynski committed Aug 23, 2016
commit b8c252f84fc903328349d2f2e8916335d7558214
11 changes: 11 additions & 0 deletions syncano/models/custom_sockets.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ class CustomSocket(EndpointMetadataMixin, DependencyMetadataMixin, Model):
"""

name = fields.StringField(max_length=64, primary_key=True)
description = fields.StringField(required=False)
endpoints = fields.JSONField()
dependencies = fields.JSONField()
metadata = fields.JSONField(required=False)
Expand Down Expand Up @@ -57,6 +58,16 @@ def _find_endpoint(self, endpoint_name):
return endpoint
raise SyncanoValueError('Endpoint {} not found.'.format(endpoint_name))

def install_from_url(self, url, instance_name=None):
instance_name = self.__class__.please.properties.get('instance_name') or instance_name
instance = Instance.please.get(name=instance_name)

install_path = instance.links.sockets_install
connection = self._get_connection()
response = connection.request('POST', install_path, data={'name': self.name, 'install_url': url})

return response

def install(self):
if not self.is_new():
raise SyncanoValueError('Can not install already defined custom socket.')
Expand Down