Merge lp://staging/~rvb/gwacl/add-network-config into lp://staging/gwacl
Status: | Merged |
---|---|
Approved by: | Raphaël Badin |
Approved revision: | 153 |
Merged at revision: | 154 |
Proposed branch: | lp://staging/~rvb/gwacl/add-network-config |
Merge into: | lp://staging/gwacl |
Diff against target: |
475 lines (+140/-101) 5 files modified
example/management/run.go (+19/-4) helpers_apiobjects_test.go (+4/-11) management_base_test.go (+3/-3) xmlobjects.go (+57/-42) xmlobjects_test.go (+57/-41) |
To merge this branch: | bzr merge lp://staging/~rvb/gwacl/add-network-config |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Jeroen T. Vermeulen (community) | Approve | ||
Review via email:
|
Commit message
Add support for configuring the network when creating a VM.
Description of the change
This branch's main goal is to allow the user to configure the network using a ConfigurationSet object. It can be used when creating the VM and (hopefully) later on when reconfiguring the VM to open/close ports.
The main trick is that the object we used to call LinuxProvisioni
I changed the DisableSSHPassw
I had to tweak the XML used in tests in xmlobjects_test.go because the examples (I /think/, not my doing) where taken straight out of the documentation and are not actually valid (for instance the value for the ports where not integers).
Drive-by fixes:
- display the host/username/
- add the GeoReplicated stuff as a parameter
Is it really worth adding GeoReplicationE nabled as a parameter to NewCreateStorag eServiceInputWi thLocation? Go puts you on this slippery slope from "I want optional and named parameters for my function" to "I'll use a Parameter Object" to "I need a constructor for my Parameter Object" to "I want another parameter added to the constructor" to "my constructor needs a Parameter Object."
So unless we need to set the GeoReplicationE nabled all the time, or there is something fundamentally dangerous that requires an explicit choice, I'd just make NewCreateStorag eServiceInputWi thLocation initialize GeoReplicationE nabled to either "false" or "true," whichever makes more sense. Or if you do make it a parameter, then IMO at least the constructor should take a boolean so that the caller can ignore the weirdness in the field's type!