[yast-devel] mail server rest API proposal
Mail server module proposal (fate #307142) --------------------------------------------- Tasks: - configure the SMTP server used for sending mails: - smtp server address - authentication fields Model singleton class MailServer attributes string smtp_server string login string password string tls access to the system: YaPI::MailServer YaPI::SERVICES Policies org.opensuse.yast.modules.yapi.mailserver.read org.opensuse.yast.modules.yapi.mailserver.write API URL: /mail REST service pseudo-code: # GET method def show read and return current settings # PUT method def update (params) save new settings: smtp server address and credentials if there was a change, reload of postfix service is needed -- Jiri Suchomel SUSE LINUX, s.r.o. e-mail: jsuchome@suse.cz Lihovarská 1060/12 tel: +420 284 028 960 190 00 Praha 9, Czech Republic http://www.suse.cz -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org For additional commands, e-mail: yast-devel+help@opensuse.org
* Jiří Suchomel
Mail server module proposal (fate #307142) ---------------------------------------------
Tasks: - configure the SMTP server used for sending mails: - smtp server address - authentication fields
Model
singleton class MailServer
I wonder if 'MailServer' is detailed enough. How would we name the class for configuring a local smtp server ?
attributes string smtp_server string login string password string tls
What is tls ?
access to the system: YaPI::MailServer YaPI::SERVICES
Policies
org.opensuse.yast.modules.yapi.mailserver.read org.opensuse.yast.modules.yapi.mailserver.write
API
URL: /mail
The URI should add more detail. Long term, WebYaST might need to support managing local mails, a local smtp server, procmail, etc.
REST service pseudo-code:
# GET method def show
read and return current settings
# PUT method def update (params)
save new settings: smtp server address and credentials if there was a change, reload of postfix service is needed
Klaus --- SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg) -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org For additional commands, e-mail: yast-devel+help@opensuse.org
On Thursday 08 of October 2009 13:17:49 Klaus Kaempf wrote:
singleton class MailServer
I wonder if 'MailServer' is detailed enough. How would we name the class for configuring a local smtp server ?
Well, that's why I originally chose Mail, not MailServer.
attributes string smtp_server string login string password string tls
What is tls ?
Security layer. Possible values are NONE, MAY, MUST.
API
URL: /mail
The URI should add more detail. Long term, WebYaST might need to support managing local mails, a local smtp server, procmail, etc.
I hope the URL should be the same as name of the model class... which means I am not sure what to choose. Jiri -- Jiri Suchomel SUSE LINUX, s.r.o. e-mail: jsuchome@suse.cz Lihovarská 1060/12 tel: +420 284 028 960 190 00 Praha 9, Czech Republic http://www.suse.cz -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org For additional commands, e-mail: yast-devel+help@opensuse.org
On Thursday 08 of October 2009 13:26:50 Jiří Suchomel wrote:
On Thursday 08 of October 2009 13:17:49 Klaus Kaempf wrote:
singleton class MailServer
I wonder if 'MailServer' is detailed enough. How would we name the class for configuring a local smtp server ?
Well, that's why I originally chose Mail, not MailServer.
What about MailSettings? -- Jiri Suchomel SUSE LINUX, s.r.o. e-mail: jsuchome@suse.cz Lihovarská 1060/12 tel: +420 284 028 960 190 00 Praha 9, Czech Republic http://www.suse.cz -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org For additional commands, e-mail: yast-devel+help@opensuse.org
* Jiří Suchomel
On Thursday 08 of October 2009 13:17:49 Klaus Kaempf wrote:
singleton class MailServer
I wonder if 'MailServer' is detailed enough. How would we name the class for configuring a local smtp server ?
Well, that's why I originally chose Mail, not MailServer.
Now 'Mail' would have even less detail. Ideally, the class name itself would contain enough information to know which kind of resource it represents.
attributes string smtp_server string login string password string tls
What is tls ?
Security layer. Possible values are NONE, MAY, MUST.
What's wrong with naming it transport_layer_security ?
API
URL: /mail
The URI should add more detail. Long term, WebYaST might need to support managing local mails, a local smtp server, procmail, etc.
I hope the URL should be the same as name of the model class... which means I am not sure what to choose.
In Rails, the Controller name determines the URL. Hth, Klaus --- SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg) -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org For additional commands, e-mail: yast-devel+help@opensuse.org
On Thursday 08 of October 2009 13:43:12 Klaus Kaempf wrote:
attributes string smtp_server string login string password string tls
What is tls ?
Security layer. Possible values are NONE, MAY, MUST.
What's wrong with naming it transport_layer_security ?
Nothing, of course.
API
URL: /mail
The URI should add more detail. Long term, WebYaST might need to support managing local mails, a local smtp server, procmail, etc.
I hope the URL should be the same as name of the model class... which means I am not sure what to choose.
In Rails, the Controller name determines the URL.
Well, sure. I mean, I don't see why controller's name should be different from model name when we are configuring singleton object. Jiri -- Jiri Suchomel SUSE LINUX, s.r.o. e-mail: jsuchome@suse.cz Lihovarská 1060/12 tel: +420 284 028 960 190 00 Praha 9, Czech Republic http://www.suse.cz -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org For additional commands, e-mail: yast-devel+help@opensuse.org
participants (2)
-
Jiří Suchomel
-
Klaus Kaempf