initial commit
This commit is contained in:
commit
811f80c92c
17 changed files with 549 additions and 0 deletions
53
source/gns3/GnsNode.hpp
Normal file
53
source/gns3/GnsNode.hpp
Normal file
|
@ -0,0 +1,53 @@
|
|||
#pragma once
|
||||
|
||||
#include "GnsPort.hpp"
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
|
||||
|
||||
namespace gns {
|
||||
|
||||
|
||||
class GnsProject;
|
||||
|
||||
|
||||
/**
|
||||
* Represent a GNS3 node
|
||||
*/
|
||||
class GnsNode {
|
||||
public:
|
||||
GnsNode(const GnsProject* project, std::string uuid, const std::vector<GnsPort>& ports);
|
||||
|
||||
/**
|
||||
* Get the base URL for the node API
|
||||
* @return the base URL for the node API
|
||||
*/
|
||||
[[nodiscard]] std::string getApiBase() const;
|
||||
|
||||
/**
|
||||
* Get the uuid of the node
|
||||
* @return the uuid of the node
|
||||
*/
|
||||
[[nodiscard]] std::string getUuid() const;
|
||||
|
||||
/**
|
||||
* Get the ports of the node
|
||||
* @return the ports of the node
|
||||
*/
|
||||
[[nodiscard]] std::vector<GnsPort> getPorts() const;
|
||||
|
||||
/**
|
||||
* Start the node
|
||||
*/
|
||||
void start() const;
|
||||
|
||||
private:
|
||||
const GnsProject* project;
|
||||
std::string uuid;
|
||||
std::vector<GnsPort> ports;
|
||||
};
|
||||
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue