Commit b872ee23 by Fukász Rómeó Ervin

implemented the link class

parent cd9fd697
......@@ -6,7 +6,7 @@ CPPFLAGS=-fPIC --std=c++11 -Ofast -Irestclient-cpp/include
LDFLAGS=--shared
LIBS=-lrestclient-cpp -lcurl
SONAME=_occi.so
SOURCES=compute.cpp entity.cpp network.cpp occisession.cpp resource.cpp storage.cpp template.cpp
SOURCES=compute.cpp entity.cpp network.cpp occisession.cpp resource.cpp storage.cpp template.cpp link.cpp
SWIG=swig
SWIG_INTERFACES=occilib.i
......
......@@ -49,7 +49,6 @@ string Entity::getID(json& rendering) {
}
}
string Entity::getId(){
return this->id;
}
......
// Copyright 2017 Budapest University of Technology and Economics (BME IK)
//
// This file is part of CIRCLE Cloud.
//
// CIRCLE is free software: you can redistribute it and/or modify it under
// the terms of the GNU General Public License as published by the Free
// Software Foundation, either version 3 of the License, or (at your option)
// any later version.
//
// CIRCLE is distributed in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
// FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
// details.
//
// You should have received a copy of the GNU General Public License along
// with CIRCLE. If not, see <http://www.gnu.org/licenses/>.
#include <string>
#include "json.hpp"
#include "occisession.h"
#include "entity.hpp"
#include "link.h"
using std::string;
using nlohmann::json;
using namespace OcciClient;
Link::Link(OcciSession* session, string kind, json instance)
: Entity(session, kind, instance){}
string Link::getTarget(){
return this->target;
}
string Link::getTargetKind(){
return this->targetKind;
}
......@@ -15,7 +15,35 @@
// You should have received a copy of the GNU General Public License along
// with CIRCLE. If not, see <http://www.gnu.org/licenses/>.
#ifndef OCCILIB_LINK_H
#define OCCILIB_LINK_H
#include <string>
#include "json.hpp"
#include "occisession.h"
#include "entity.hpp"
namespace OcciClient {
class Link : public Entity {
private:
std::string target;
std::string targetKind;
protected:
Link(OcciSession* session, std::string kind, nlohmann::json instance);
public:
std::string getTarget();
std::string getTargetKind();
};
class Link {
}
#endif // OCCILIB_LINK_H
......@@ -22,6 +22,7 @@
#include "occisession.h"
#include "entity.hpp"
#include "resource.h"
#include "link.h"
#include "compute.h"
#include "template.h"
#include "storage.h"
......
......@@ -3,6 +3,7 @@
/* Includes the header in the wrapper code */
#include "entity.hpp"
#include "resource.h"
#include "link.h"
#include "compute.h"
#include "template.h"
#include "storage.h"
......@@ -20,12 +21,14 @@
%shared_ptr(OcciClient::Entity)
%shared_ptr(OcciClient::Resource)
%shared_ptr(OcciClient::Link)
%shared_ptr(OcciClient::Compute)
%shared_ptr(OcciClient::Storage)
%shared_ptr(OcciClient::Network)
%include "entity.hpp"
%include "resource.h"
%include "link.h"
%include "compute.h"
%include "template.h"
%include "storage.h"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment