-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #41 from fabric-testbed/rel1.7
Rel1.7 - changes
- Loading branch information
Showing
5 changed files
with
119 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
__version__ = "1.6.2" | ||
__version__ = "1.7.0rc0" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,6 +24,7 @@ | |
# | ||
# Author: Komal Thareja ([email protected]) | ||
from typing import List | ||
from datetime import datetime, timezone | ||
|
||
from fabric_mb.message_bus.messages.abc_message_avro import AbcMessageAvro | ||
|
||
|
@@ -52,6 +53,10 @@ def __init__(self): | |
self.graph_format = None | ||
self.site = None | ||
self.states = None | ||
self.start = None | ||
self.end = None | ||
self.ip_subnet = None | ||
self.host = None | ||
|
||
def get_slice_id(self) -> str: | ||
""" | ||
|
@@ -148,3 +153,32 @@ def validate(self) -> bool: | |
ret_val = False | ||
|
||
return ret_val | ||
|
||
def set_end(self, end: datetime): | ||
if end is not None: | ||
self.end = int(end.timestamp()) | ||
|
||
def set_start(self, start: datetime): | ||
if start is not None: | ||
self.start = int(start.timestamp()) | ||
|
||
def get_end(self) -> datetime: | ||
if self.end is not None: | ||
return datetime.fromtimestamp(self.end, tz=timezone.utc) | ||
|
||
def get_start(self) -> datetime: | ||
if self.start is not None: | ||
return datetime.fromtimestamp(self.start, tz=timezone.utc) | ||
|
||
def set_ip_subnet(self, ip_subnet: str): | ||
self.ip_subnet = ip_subnet | ||
|
||
def get_ip_subnet(self) -> str: | ||
return self.ip_subnet | ||
|
||
def set_host(self, host: str): | ||
self.host = host | ||
|
||
def get_host(self) -> str: | ||
return self.host | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.