On Tue, Jan 5, 2010 at 1:29 PM, Paul Querna <[email protected]> wrote:
> I noticed the rimuhosting driver requires that the name argument to be
> a FQDN, as the comment in the code says:
> "Must be a FQDN. e.g example.com."
>
> This is kinda annoying for driver consistentcy, as no other drivers
> require this.
>
> I guess it would be nice for some clarification from rimuhosting, is
> this just what is set in /etc/hostname, or is it used for other
> purpsoes? Does it really need to be a FQDN?
>
> (on the otherhand, should we encourage all of the other drivers to
> expect the name to be a 'dns name'?
>
> Thoughts?
>
> Thanks,
> Paul
>
Hi Paul,
It doesn't make as much sense from a cloud point of view I think. The
validation code is used in our normal manual ordering process as well.
By forcing something that looks like a domain name as a label, servers
names tend to reflect the name of the site running on the server
(although not always) which helps us identify servers when we get a
support requests like "Help! blah.com is down". Heres a simple patch
to satisfy the domain name requirement.
Index: libcloud/drivers/rimuhosting.py
===================================================================
--- libcloud/drivers/rimuhosting.py (revision 895840)
+++ libcloud/drivers/rimuhosting.py (working copy)
@@ -166,7 +166,7 @@
def create_node(self, **kwargs):
# Creates a RimuHosting instance
#
- # name Must be a FQDN. e.g example.com.
+ # name Label for the instance.
# image NodeImage from list_images
# size NodeSize from list_sizes
#
@@ -194,7 +194,7 @@
size = kwargs['size']
data = {
- 'instantiation_options':{'domain_name': name, 'distro': image.id},
+ 'instantiation_options':{'domain_name': "%s.libcloud" %
(name), 'distro': image.id},
'pricing_plan_code': size.id,
}
-Ivan
http://www.rimuhosting.com