Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
CIRCLE
/
libocci
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
2
Merge Requests
0
Pipelines
Wiki
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
b872ee23
authored
Mar 22, 2017
by
Fukász Rómeó Ervin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
implemented the link class
parent
cd9fd697
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
72 additions
and
3 deletions
+72
-3
Makefile
+1
-1
entity.cpp
+0
-1
link.cpp
+38
-0
link.h
+29
-1
occilib.h
+1
-0
occilib.i
+3
-0
No files found.
Makefile
View file @
b872ee23
...
...
@@ -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
...
...
entity.cpp
View file @
b872ee23
...
...
@@ -49,7 +49,6 @@ string Entity::getID(json& rendering) {
}
}
string
Entity
::
getId
(){
return
this
->
id
;
}
...
...
link.cpp
0 → 100644
View file @
b872ee23
// 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
;
}
link.h
View file @
b872ee23
...
...
@@ -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
class
Link
{
#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
();
};
}
#endif // OCCILIB_LINK_H
occilib.h
View file @
b872ee23
...
...
@@ -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"
...
...
occilib.i
View file @
b872ee23
...
...
@@ -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"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment