classlib all types implemented

This commit is contained in:
2022-12-05 14:08:59 +03:00
parent 09cd00dc66
commit affbd18de2
14 changed files with 282 additions and 154 deletions

View File

@@ -1,6 +1,7 @@
namespace PS.IPAM;
using System;
[Serializable]
public class Subnetwork {
public int Id { get; }
public string Subnet { get; }
@@ -55,41 +56,12 @@ public class Subnetwork {
this.ResolveDNS = resolveDNS;
}
public override string ToString()
{
public string GetCIDR() {
return $"{this.Subnet}/{this.Mask}";
}
}
id : 1
subnet : fd13:6d20:29dc:cf27::
mask : 64
sectionId : 2
description : Private subnet 1
linked_subnet :
firewallAddressObject :
vrfId : 0
masterSubnetId : 0
allowRequests : 1
vlanId : 1
showName : 1
device : 0
permissions : {"3":"1","2":"2"}
pingSubnet : 0
discoverSubnet : 0
resolveDNS : 0
DNSrecursive : 0
DNSrecords : 0
nameserverId : 0
scanAgent :
customer_id :
isFolder : 0
isFull : 0
isPool : 0
tag : 2
threshold : 0
location :
editDate :
lastScan :
lastDiscovery :
calculation : @{Type=IPv6; Host address=/; Host address (uncompressed)=/; Subnet prefix=fd13:6d20:29dc:cf27::/64; Prefix length=64; Subnet Reverse DNS=7.2.f.c.c.d.9.2.0.2.d.6.3.1.d.f.ip6.arpa; Min host IP=fd13:6d20:29dc:cf27::; Max host IP=fd13:6d20:29dc:cf27:ffff:ffff:ffff:ffff; Number of hosts=18446744073709551616; Address type=NET_IPV6}
public override string ToString()
{
return this.GetCIDR();
}
}