Omer Frenkel has posted comments on this change.
Change subject: restapi: cloud-init [6/6] - rest api for start vm
......................................................................
Patch Set 14:
(6 comments)
....................................................
File
backend/manager/modules/restapi/interface/definition/src/main/resources/api.xsd
Line 2255: </xs:complexType>
Line 2256:
Line 2257: <xs:element name="dns" type="dns"/>
Line 2258:
Line 2259: <xs:complexType name="dns">
Done
Line 2260: <xs:sequence>
Line 2261: <xs:element name="servers">
Line 2262: <xs:complexType>
Line 2263: <xs:sequence>
Line 2260: <xs:sequence>
Line 2261: <xs:element name="servers">
Line 2262: <xs:complexType>
Line 2263: <xs:sequence>
Line 2264: <xs:element name="dns_server" type="xs:string"
minOccurs="0" maxOccurs="unbounded"/>
Done
Line 2265: </xs:sequence>
Line 2266: </xs:complexType>
Line 2267: </xs:element>
Line 2268: <xs:element name="search_domains">
Line 2319: <xs:element name="content">
Line 2320: <xs:complexType>
Line 2321: <xs:simpleContent>
Line 2322: <xs:extension base="xs:string">
Line 2323: <xs:attribute name="encoding"
type="xs:string" use="required"/>
basically every files has path, encoding and content so extension to string was
used here, i will replace it to use the existing payload_file and added type to
it
Line 2324: </xs:extension>
Line 2325: </xs:simpleContent>
Line 2326: </xs:complexType>
Line 2327: </xs:element>
Line 2336:
Line 2337: <xs:element name="initialization" type="Initialization"/>
Line 2338:
Line 2339: <xs:complexType name="Initialization">
Line 2340: <xs:choice>
Done
Line 2341: <xs:element name="cloud_init" type="CloudInit" minOccurs="0"/>
Line 2342: </xs:choice>
Line 2343: </xs:complexType>
Line 2344:
....................................................
File
backend/manager/modules/restapi/types/src/main/java/org/ovirt/engine/api/restapi/types/VmMapper.java
Line 903: entity.setHostname(model.getHostName());
Line 904: }
Line 905:
Line 906: if (model.isSetAuthorizedKeys() &&
!model.getAuthorizedKeys().getAuthorizedKey().isEmpty()) {
Line 907: StringBuilder keys = new StringBuilder();
currently cloud init doesnt support other users, in the engine we are not
making generic api to support possible future values,
so we can leave it like this, or change it to be exactly as in the backend
(root_password only)
and if it will change in the future change it here as well.
what do you think?
Line 908: for (AuthorizedKey authKey :
model.getAuthorizedKeys().getAuthorizedKey()) {
Line 909: if ("root".equals(authKey.getUser().getName())) {
Line 910: if (keys.length() > 0) {
Line 911: keys.append("\n");
Line 927: VdsNetworkInterface vdsNetworkInterface = new
VdsNetworkInterface();
Line 928: NetworkBootProtocol protocol =
HostNicMapper.map(BootProtocol.fromValue(iface.getBootProtocol()), null);
Line 929: vdsNetworkInterface.setBootProtocol(protocol);
Line 930: if (protocol != NetworkBootProtocol.DHCP) {
Line 931:
vdsNetworkInterface.setAddress(iface.getNetwork().getIp().getAddress());
done, extra careful code
Line 932:
vdsNetworkInterface.setSubnet(iface.getNetwork().getIp().getNetmask());
Line 933:
vdsNetworkInterface.setGateway(iface.getNetwork().getIp().getGateway());
Line 934: }
Line 935: if (iface.isOnBoot()) {
--
To view, visit http://gerrit.ovirt.org/15537
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I6ad0bfeca23cf8d4b2887010081d63c258032611
Gerrit-PatchSet: 14
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Greg Padgett <[email protected]>
Gerrit-Reviewer: Michael Pasternak <[email protected]>
Gerrit-Reviewer: Michal Skrivanek <[email protected]>
Gerrit-Reviewer: Omer Frenkel <[email protected]>
Gerrit-Reviewer: Ori Liel <[email protected]>
Gerrit-Reviewer: Oved Ourfali <[email protected]>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches