Exemplo n.º 1
0
                        $OS = new OS($Capone->get('osID'));
                        $StorageGroup = new StorageGroup($Image->get('storageGroupID'));
                        $StorageNode = $StorageGroup->getMasterStorageNode();
                        switch ($Image->get('imageTypeID')) {
                            case 1:
                                $imgType = 'n';
                                break;
                            case 2:
                                $imgType = 'mps';
                                break;
                            case 3:
                                $imgType = 'mpa';
                                break;
                            case 4:
                                $imgType = 'dd';
                                break;
                        }
                        $imgPartitionType = $Image->getImagePartitionType()->get('type');
                        $imgFormat = $Image->get('format');
                        $ret[] = base64_encode($Image->get('path') . '|' . $OS->get('id') . '|' . $imgType . '|' . $imgPartitionType . '|' . $imgFormat);
                    }
                }
                throw new Exception(count($ret) > 0 ? implode("\n", $ret) : base64_encode('null'));
            } else {
                throw new Exception(base64_encode('null'));
            }
        }
    }
} catch (Exception $e) {
    print $e->getMessage();
}