Use ironic-lib to create configdrive

Shell script to create config drive being replaced with python
code in ironic-lib.

Closes-Bug: #1493328

Change-Id: I31108f1173db3fb585386b2949ec880a95305fb6
This commit is contained in:
Shivanand Tendulker
2016-03-23 07:26:32 -07:00
parent 7bda3408f5
commit 3665306dfb
5 changed files with 21 additions and 342 deletions
ironic_python_agent

@ -173,29 +173,6 @@ class ImageWriteError(RESTError):
super(ImageWriteError, self).__init__(details)
class ConfigDriveTooLargeError(RESTError):
"""Error raised when a configdrive is larger than the partition."""
message = 'Configdrive is too large for intended partition'
def __init__(self, filename, filesize):
details = ('Configdrive at {} has size {}, which is larger than '
'the intended partition.').format(filename, filesize)
super(ConfigDriveTooLargeError, self).__init__(details)
class ConfigDriveWriteError(RESTError):
"""Error raised when a configdrive cannot be written to a device."""
message = 'Error writing configdrive to device'
def __init__(self, device, exit_code, stdout, stderr):
details = ('Writing configdrive to device {} failed with exit code '
'{}. stdout: {}. stderr: {}.')
details = details.format(device, exit_code, stdout, stderr)
super(ConfigDriveWriteError, self).__init__(details)
class SystemRebootError(RESTError):
"""Error raised when a system cannot reboot."""