コード例 #1
0
StorageController::~StorageController() { }

using namespace psme::rest::resource;
using json::Pair;

static ResourceDefinitions::Register<StorageControllers> g_controllers(ResourceDef{
    PropertyVec{
        {Resource::ODATA_CONTEXT, json::Value::Type::STRING},
        {Resource::ODATA_ID, json::Value::Type::STRING},
        {Resource::ODATA_TYPE,
            "#RSAStorageController.1.0.0.RSAStorageControllersCollection"},
        {Resource::NAME, "StorageControllers Collection"},
        {Resource::MODIFIED, json::Value::Type::STRING},
        {Resource::LINKS,
        json::Value({
            Pair(Resource::MEMBERS_ODATA_COUNT, 0),
            Pair(Resource::MEMBERS, json::Value::Type::ARRAY)
        })}
    }});

static ResourceDefinitions::Register<StorageController> g_controller(ResourceDef{
    PropertyVec{
        {Resource::ODATA_CONTEXT, json::Value::Type::STRING},
        {Resource::ODATA_ID, json::Value::Type::STRING},
        {Resource::ODATA_TYPE,
            "#RSAStorageController.1.0.0.RSAStorageController"},
        {Resource::ID, json::Value::Type::STRING},
        {Resource::NAME, "StorageController"},
        {Resource::MODIFIED, json::Value::Type::STRING},
        {"Interface", json::Value::Type::STRING},
        {"DriveCount", json::Value::Type::NUMBER},
コード例 #2
0
    }
}

using namespace psme::rest::resource;
using json::Pair;

static ResourceDefinitions::Register<LogicalDrives> g_ldrives(ResourceDef{
    PropertyVec{
        {Resource::ODATA_CONTEXT, json::Value::Type::STRING},
        {Resource::ODATA_ID, json::Value::Type::STRING},
        {Resource::ODATA_TYPE, "#Drive.1.0.0.LogicalDrivesCollection"},
        {Resource::NAME, "Logical Drives Collection"},
        {Resource::MODIFIED, json::Value::Type::STRING},
        {Resource::LINKS,
            json::Value({
                Pair(Resource::MEMBERS_ODATA_COUNT, 0),
                Pair(Resource::MEMBERS, json::Value::Type::ARRAY)
            })}
    }});

static ResourceDefinitions::Register<LogicalDrive> g_ldrive(ResourceDef{
    PropertyVec{
        {Resource::ODATA_CONTEXT, json::Value::Type::STRING},
        {Resource::ODATA_ID, json::Value::Type::STRING},
        {Resource::ODATA_TYPE, "#LogicalDrive.1.0.0.LogicalDrive"},
        {Resource::ID, json::Value::Type::STRING},
        {Resource::NAME, "Logical Drive"},
        {Resource::MODIFIED, json::Value::Type::STRING},
        {PROTECTED, json::Value::Type::BOOLEAN},
        {MODE, json::Value::Type::STRING},
        {TYPE_FIELD, json::Value::Type::STRING},
コード例 #3
0
{ }

NetworkService::~NetworkService() {
}

using namespace psme::rest::resource;
using json::Pair;

static ResourceDefinitions::Register<NetworkService> g(ResourceDef{
    PropertyVec{
        {Resource::ODATA_CONTEXT, json::Value::Type::STRING},
        {Resource::ODATA_ID, json::Value::Type::STRING},
        {Resource::ODATA_TYPE,
                "#ManagerNetworkService.1.0.0.ManagerNetworkService"},
        {Resource::ID, json::Value::Type::STRING},
        {Resource::NAME, "Manager Network Service"},
        {Resource::MODIFIED, json::Value::Type::STRING},
        {Resource::DESCRIPTION, "Manager Network Service Status"},
        {Status::STATUS, json::Value::Type::OBJECT},
        {"HostName", json::Value::Type::STRING},
        {"FQDN", json::Value::Type::STRING},
        {"HTTP", json::Value({Pair("Enabled", false)})},
        {"HTTPS",json::Value({Pair("Enabled", false)})},
        {"IPMI", json::Value({Pair("Enabled", false)})},
        {"SSH", json::Value({Pair("Enabled", false)})},
        {"SNMP", json::Value({Pair("Enabled", false)})},
        {"VirtualMedia", json::Value({Pair("Enabled", false)})},
        {"SSDP", json::Value({Pair("Enabled", false)})},
        {"Telnet", json::Value({Pair("Enabled", false)})},
        {"KVMIP", json::Value({Pair("Enabled", false)})}}});
コード例 #4
0
using json::Pair;

static ResourceDefinitions::Register<StorageManager> g_manager(ResourceDef{
    PropertyVec{
        {Resource::ODATA_CONTEXT,
                "/rest/v1/$metadata#RSAStorageManagers/Links/members/$entity"},
        {Resource::ODATA_ID, json::Value::Type::STRING},
        {Resource::ODATA_TYPE, "#RSAStorageManager.1.0.0.RSAStorageManager"},
        {Resource::ID, json::Value::Type::STRING},
        {Resource::NAME, "RSA Storage Manager"},
        {Resource::MODIFIED, json::Value::Type::STRING},
        {"ManagerType", json::Value::Type::STRING},
        {Status::STATUS, json::Value::Type::OBJECT},
        {"Firmware", json::Value::Type::OBJECT},
        {"GraphicalConsole", json::Value::Type::OBJECT},
        {"SerialConsole", json::Value::Type::OBJECT},
        {"CommandShell", json::Value::Type::OBJECT},
        {Resource::OEM, json::Value::Type::OBJECT},
        {Resource::LINKS,
            json::Value({
                Pair(Services::TYPE, json::Value::Type::ARRAY),
                Pair(Targets::REMOTE_TARGETS, json::Value::Type::ARRAY),
                Pair(LogicalDrives::TYPE, json::Value::Type::ARRAY),
                Pair(NetworkService::TYPE, json::Value::Type::OBJECT),
                Pair(StorageManager::SIMPLE_NETWORK, json::Value::Type::OBJECT),
                Pair(Resource::OEM, json::Value::Type::OBJECT)
            })},
        {Resource::ACTIONS, json::Value::Type::OBJECT}
    }});