[Libvirt-cim] [PATCH 4 of 4] Add URI support to VSMigrationService
Kaitlin Rupert
kaitlin at linux.vnet.ibm.com
Fri Mar 7 15:22:28 UTC 2008
Dan Smith wrote:
> KR> + if (transport == CIM_MIGRATE_URI_TLS_STRICT)
> KR> + rc = asprintf(&uri, "%s://%s/system/?no_verify=1", tport, dest);
> KR> + else
> KR> + rc = asprintf(&uri, "%s://%s/system/", tport, dest);
> KR> +
> KR> + if (rc == -1)
> KR> uri = NULL;
> KR> +
> KR> + free(tport);
>
> This seems a tad ugly, since it's just a special case for one of the
> transport types. Can we change the function to just construct a whole
> URI for us, and pass in the class and the destination host?
Yeah, that'll be a lot cleaner. It might make the function a little
long, but definitely cleaner.
>
> KR> @@ -147,7 +186,7 @@ static CMPIStatus vs_migratable(const CM
> KR> uint32_t retcode = 1;
> KR> CMPIBoolean isMigratable = 0;
>
> KR> - uri = dest_uri(CLASSNAME(ref), destination);
> KR> + uri = dest_uri(CLASSNAME(ref), destination, CIM_MIGRATE_URI_SSH);
>
> Is this hardcoding the check function to SSH?
Ah, I meant to note this it the commit log.
Yes, currently because I haven't added the MSD support to the
vs_migratable() call (the migrate_do() equivalent for the Check()
functions).
This will be changed in a future patch. I'll grab the transport from
the MSD and use that.
Or, I can just add the MSD support for the Check() calls to this
patchset. I don't mind either way. =)
>
> Otherwise I'm really happy with this set, thanks!
>
>
--
Kaitlin Rupert
IBM Linux Technology Center
kaitlin at linux.vnet.ibm.com
More information about the Libvirt-cim
mailing list