From 9afdac17dcc8956fd795797bfc5b6e1c09285342 Mon Sep 17 00:00:00 2001
From: Gabriele Contini <contini.mailing@gmail.com>
Date: 周日, 08 3月 2020 21:27:16 +0800
Subject: [PATCH] Issues #14 and #6

---
 src/library/os/execution_environment.hpp |   25 ++++++++++++++++++-------
 1 files changed, 18 insertions(+), 7 deletions(-)

diff --git a/src/library/os/execution_environment.hpp b/src/library/os/execution_environment.hpp
index ce3fb63..bc503fb 100644
--- a/src/library/os/execution_environment.hpp
+++ b/src/library/os/execution_environment.hpp
@@ -8,10 +8,15 @@
 #ifndef SRC_LIBRARY_OS_VIRTUALIZATION_HPP_
 #define SRC_LIBRARY_OS_VIRTUALIZATION_HPP_
 
+#include <string>
+
 namespace license {
+namespace os {
 
 typedef enum { NONE, CONTAINER, VM } VIRTUALIZATION;
+
 typedef enum {
+	PROV_UNKNOWN,
 	ON_PREMISE,
 	GOOGLE_CLOUD,
 	AZURE_CLOUD,
@@ -25,17 +30,23 @@
 	ALI_CLOUD
 } CLOUD_PROVIDER;
 
-
 class ExecutionEnvironment {
+private:
+	std::string sys_vendor;
+	std::string bios_vendor;
+	std::string bios_description;
+	//detect if it's a kind of container technology (docker or lxc)
+	bool is_container() const;
 public:
-	ExecutionEnvironment(){};
-	virtual ~ExecutionEnvironment(){};
-	VIRTUALIZATION getVirtualization();
-	bool is_cloud();
-	bool is_docker();
-	CLOUD_PROVIDER getCloudProvider();
+	ExecutionEnvironment();
+	~ExecutionEnvironment(){};
+	VIRTUALIZATION getVirtualization() const;
+	bool is_cloud() const;
+	bool is_docker() const;
+	CLOUD_PROVIDER getCloudProvider() const;
 };
 
+}  // namespace os
 }  // namespace license
 
 #endif /* SRC_LIBRARY_OS_VIRTUALIZATION_HPP_ */

--
Gitblit v1.9.1