// Copyright 2015, EMC, Inc.

'use strict';

module.exports = {
    friendlyName: 'Install Ubuntu',
    injectableName: 'Task.Os.Install.Ubuntu',
    implementsTask: 'Task.Base.Os.Install',
    schemaRef: 'rackhd/schemas/v1/tasks/install-os-general',
    options: {
        osType: 'linux', //readonly options, should avoid change it
        profile: 'install-ubuntu.ipxe',
        installScript: 'ubuntu-preseed',
        installScriptUri: '{{api.templates}}/{{options.installScript}}',
        hostname: 'localhost',
        comport: 'ttyS0',
        completionUri: 'renasar-ansible.pub',
        version: 'trusty',
        repo: '{{api.server}}/ubuntu',
        netImage: '{{api.server}}/ubuntu/install/filesystem.squashfs',
        rootPassword: "RackHDRocks!",
        rootSshKey: null,
        interface: "auto",
        users: [],
        networkDevices: [],
        dnsServers: [],
        installDisk: null,
        kvm: false
    },
    properties: {
        os: {
            linux: {
                distribution: 'ubuntu'
            }
        }
    }
};

@@ -588,35 +588,8 @@
 b',%0A
-        version: 'trusty',%0A
     
@@ -635,68 +635,97 @@
     
-netImage: '%7B%7Bapi.server%7D%7D
+baseUrl: 'dists/trusty/main/installer-amd64/current/images/netboot
 /ubuntu
-/
+-
 install
-/filesystem.squashfs
+er/amd64
 ',%0A 
@@ -765,34 +765,8 @@
 !%22,%0A
-        rootSshKey: null,%0A
     
@@ -800,96 +800,51 @@
     
-users: %5B%5D,%0A        networkDevices: %5B%5D,%0A        dnsServers: %5B%5D,%0A        installDisk: null
+installDisk: %22/dev/sda%22,%0A        kvm: false
 ,%0A  
@@ -850,25 +850,23 @@
        k
-vm: false
+args:%7B%7D
 %0A    %7D,%0A

Allow Netimage option to be optional