lanqinglong | 77124b0 | 2015-08-06 11:47:38 +0800 | [diff] [blame] | 1 | """ |
Jeremy Ronquillo | 23fb216 | 2017-09-15 14:59:57 -0700 | [diff] [blame] | 2 | Copyright 2015 Open Networking Foundation ( ONF ) |
Jeremy Ronquillo | b27ce4c | 2017-07-17 12:41:28 -0700 | [diff] [blame] | 3 | |
| 4 | Please refer questions to either the onos test mailing list at <onos-test@onosproject.org>, |
| 5 | the System Testing Plans and Results wiki page at <https://wiki.onosproject.org/xoMg>, |
| 6 | or the System Testing Guide page at <https://wiki.onosproject.org/x/WYQg> |
| 7 | |
| 8 | TestON is free software: you can redistribute it and/or modify |
| 9 | it under the terms of the GNU General Public License as published by |
| 10 | the Free Software Foundation, either version 2 of the License, or |
Jeremy Ronquillo | 23fb216 | 2017-09-15 14:59:57 -0700 | [diff] [blame] | 11 | ( at your option ) any later version. |
Jeremy Ronquillo | b27ce4c | 2017-07-17 12:41:28 -0700 | [diff] [blame] | 12 | |
| 13 | TestON is distributed in the hope that it will be useful, |
| 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 16 | GNU General Public License for more details. |
| 17 | |
| 18 | You should have received a copy of the GNU General Public License |
| 19 | along with TestON. If not, see <http://www.gnu.org/licenses/>. |
| 20 | """ |
Jeremy Ronquillo | b27ce4c | 2017-07-17 12:41:28 -0700 | [diff] [blame] | 21 | """ |
lanqinglong | 77124b0 | 2015-08-06 11:47:38 +0800 | [diff] [blame] | 22 | This file provide the data |
| 23 | lanqinglong@huawei.com |
| 24 | """ |
| 25 | import json |
| 26 | |
Jon Hall | f52840a | 2017-05-24 16:49:52 -0700 | [diff] [blame] | 27 | |
lanqinglong | 77124b0 | 2015-08-06 11:47:38 +0800 | [diff] [blame] | 28 | class NetworkData: |
| 29 | |
Jon Hall | f52840a | 2017-05-24 16:49:52 -0700 | [diff] [blame] | 30 | def __init__( self ): |
lanqinglong | 77124b0 | 2015-08-06 11:47:38 +0800 | [diff] [blame] | 31 | self.id = '' |
| 32 | self.state = 'ACTIVE' |
| 33 | self.name = 'onosfw-1' |
| 34 | self.physicalNetwork = 'none' |
lanqinglong | d0dda2e | 2015-08-25 11:02:48 +0800 | [diff] [blame] | 35 | self.admin_state_up = True |
lanqinglong | 77124b0 | 2015-08-06 11:47:38 +0800 | [diff] [blame] | 36 | self.tenant_id = '' |
lanqinglong | d0dda2e | 2015-08-25 11:02:48 +0800 | [diff] [blame] | 37 | self.routerExternal = False |
Jon Hall | f52840a | 2017-05-24 16:49:52 -0700 | [diff] [blame] | 38 | self.type = 'LOCAL' |
lanqinglong | 77124b0 | 2015-08-06 11:47:38 +0800 | [diff] [blame] | 39 | self.segmentationID = '6' |
lanqinglong | d0dda2e | 2015-08-25 11:02:48 +0800 | [diff] [blame] | 40 | self.shared = False |
lanqinglong | 77124b0 | 2015-08-06 11:47:38 +0800 | [diff] [blame] | 41 | |
Jon Hall | f52840a | 2017-05-24 16:49:52 -0700 | [diff] [blame] | 42 | def DictoJson( self ): |
lanqinglong | 77124b0 | 2015-08-06 11:47:38 +0800 | [diff] [blame] | 43 | |
Jon Hall | f52840a | 2017-05-24 16:49:52 -0700 | [diff] [blame] | 44 | if self.id == '' or self.tenant_id == '': |
lanqinglong | 77124b0 | 2015-08-06 11:47:38 +0800 | [diff] [blame] | 45 | print 'Id and tenant id is necessary!' |
| 46 | |
| 47 | Dicdata = {} |
Jon Hall | f52840a | 2017-05-24 16:49:52 -0700 | [diff] [blame] | 48 | if self.id != '': |
| 49 | Dicdata[ 'id' ] = self.id |
lanqinglong | 77124b0 | 2015-08-06 11:47:38 +0800 | [diff] [blame] | 50 | if self.state != '': |
Jon Hall | f52840a | 2017-05-24 16:49:52 -0700 | [diff] [blame] | 51 | Dicdata[ 'status' ] = self.state |
| 52 | if self.name != '': |
| 53 | Dicdata[ 'name' ] = self.name |
| 54 | if self.physicalNetwork != '': |
| 55 | Dicdata[ 'provider:physical_network' ] = self.physicalNetwork |
| 56 | if self.admin_state_up != '': |
| 57 | Dicdata[ 'admin_state_up' ] = self.admin_state_up |
| 58 | if self.tenant_id != '': |
| 59 | Dicdata[ 'tenant_id' ] = self.tenant_id |
| 60 | if self.routerExternal != '': |
| 61 | Dicdata[ 'router:external' ] = self.routerExternal |
| 62 | if self.type != '': |
| 63 | Dicdata[ 'provider:network_type' ] = self.type |
| 64 | if self.segmentationID != '': |
| 65 | Dicdata[ 'provider:segmentation_id' ] = self.segmentationID |
| 66 | if self.shared != '': |
| 67 | Dicdata[ 'shared' ] = self.shared |
lanqinglong | 77124b0 | 2015-08-06 11:47:38 +0800 | [diff] [blame] | 68 | |
Jon Hall | f52840a | 2017-05-24 16:49:52 -0700 | [diff] [blame] | 69 | Dicdata = { 'network': Dicdata } |
lanqinglong | 77124b0 | 2015-08-06 11:47:38 +0800 | [diff] [blame] | 70 | |
Jon Hall | f52840a | 2017-05-24 16:49:52 -0700 | [diff] [blame] | 71 | return json.dumps( Dicdata, indent=4 ) |
lanqinglong | 77124b0 | 2015-08-06 11:47:38 +0800 | [diff] [blame] | 72 | |
Jon Hall | f52840a | 2017-05-24 16:49:52 -0700 | [diff] [blame] | 73 | def Ordered( self, obj ): |
lanqinglong | 77124b0 | 2015-08-06 11:47:38 +0800 | [diff] [blame] | 74 | |
Jon Hall | f52840a | 2017-05-24 16:49:52 -0700 | [diff] [blame] | 75 | if isinstance( obj, dict ): |
| 76 | return sorted( ( k, self.Ordered( v ) ) for k, v in obj.items() ) |
| 77 | if isinstance( obj, list ): |
| 78 | return sorted( self.Ordered( x ) for x in obj ) |
lanqinglong | 77124b0 | 2015-08-06 11:47:38 +0800 | [diff] [blame] | 79 | else: |
| 80 | return obj |
| 81 | |
Jon Hall | f52840a | 2017-05-24 16:49:52 -0700 | [diff] [blame] | 82 | def JsonCompare( self, SourceData, DestiData, FirstPara, SecondPara ): |
lanqinglong | 77124b0 | 2015-08-06 11:47:38 +0800 | [diff] [blame] | 83 | |
| 84 | try: |
Jon Hall | f52840a | 2017-05-24 16:49:52 -0700 | [diff] [blame] | 85 | SourceCompareDataDic = json.loads( SourceData ) |
| 86 | DestiCompareDataDic = json.loads( DestiData ) |
lanqinglong | 77124b0 | 2015-08-06 11:47:38 +0800 | [diff] [blame] | 87 | except ValueError: |
| 88 | print "SourceData or DestData is not JSON Type!" |
| 89 | return False |
| 90 | |
lanqinglong | e675e92 | 2015-08-13 21:17:28 +0800 | [diff] [blame] | 91 | try: |
Jon Hall | f52840a | 2017-05-24 16:49:52 -0700 | [diff] [blame] | 92 | Socom = SourceCompareDataDic[ FirstPara ][ SecondPara ] |
| 93 | Decom = DestiCompareDataDic[ FirstPara ][ SecondPara ] |
| 94 | except KeyError as error: |
| 95 | print "Key error ,This key is not found:%s" % error |
lanqinglong | d0dda2e | 2015-08-25 11:02:48 +0800 | [diff] [blame] | 96 | return False |
lanqinglong | e675e92 | 2015-08-13 21:17:28 +0800 | [diff] [blame] | 97 | |
Jon Hall | f52840a | 2017-05-24 16:49:52 -0700 | [diff] [blame] | 98 | if str( Socom ).lower() == str( Decom ).lower(): |
lanqinglong | 77124b0 | 2015-08-06 11:47:38 +0800 | [diff] [blame] | 99 | return True |
| 100 | else: |
Jon Hall | f52840a | 2017-05-24 16:49:52 -0700 | [diff] [blame] | 101 | print "Source Compare data:" + FirstPara + "." + SecondPara + "=" + str( Socom ) |
| 102 | print "Dest Compare data: " + FirstPara + "." + SecondPara + "=" + str( Decom ) |
lanqinglong | 77124b0 | 2015-08-06 11:47:38 +0800 | [diff] [blame] | 103 | return False |
| 104 | |
lanqinglong | 77124b0 | 2015-08-06 11:47:38 +0800 | [diff] [blame] | 105 | |
Jon Hall | f52840a | 2017-05-24 16:49:52 -0700 | [diff] [blame] | 106 | class SubnetData( NetworkData ): |
| 107 | |
| 108 | def __init__( self ): |
lanqinglong | 77124b0 | 2015-08-06 11:47:38 +0800 | [diff] [blame] | 109 | self.id = '' |
| 110 | self.tenant_id = '' |
| 111 | self.network_id = '' |
| 112 | self.nexthop = '192.168.1.1' |
| 113 | self.destination = '192.168.1.1/24' |
| 114 | self.start = '192.168.2.2' |
| 115 | self.end = '192.168.2.254' |
| 116 | self.ipv6_address_mode = 'DHCPV6_STATELESS' |
| 117 | self.ipv6_ra_mode = 'DHCPV6_STATELESS' |
| 118 | self.cidr = '192.168.1.1/24' |
lanqinglong | d0dda2e | 2015-08-25 11:02:48 +0800 | [diff] [blame] | 119 | self.enable_dhcp = True |
lanqinglong | 77124b0 | 2015-08-06 11:47:38 +0800 | [diff] [blame] | 120 | self.dns_nameservers = 'aaa' |
| 121 | self.gateway_ip = '192.168.2.1' |
lanqinglong | d0dda2e | 2015-08-25 11:02:48 +0800 | [diff] [blame] | 122 | self.ip_version = '4' |
| 123 | self.shared = False |
lanqinglong | 77124b0 | 2015-08-06 11:47:38 +0800 | [diff] [blame] | 124 | self.name = 'demo-subnet' |
| 125 | |
Jon Hall | f52840a | 2017-05-24 16:49:52 -0700 | [diff] [blame] | 126 | def DictoJson( self ): |
| 127 | if self.id == '' or self.tenant_id == '': |
lanqinglong | 77124b0 | 2015-08-06 11:47:38 +0800 | [diff] [blame] | 128 | print 'Id and tenant id is necessary!' |
| 129 | |
| 130 | Dicdata = {} |
| 131 | host_routesdata = [] |
Jon Hall | f52840a | 2017-05-24 16:49:52 -0700 | [diff] [blame] | 132 | host_routesdata.append( { 'nexthop': self.nexthop, 'destination': self.destination } ) |
lanqinglong | 77124b0 | 2015-08-06 11:47:38 +0800 | [diff] [blame] | 133 | allocation_pools = [] |
Jon Hall | f52840a | 2017-05-24 16:49:52 -0700 | [diff] [blame] | 134 | allocation_pools.append( { 'start': self.start, 'end': self.end } ) |
lanqinglong | 77124b0 | 2015-08-06 11:47:38 +0800 | [diff] [blame] | 135 | |
| 136 | if self.id != '': |
Jon Hall | f52840a | 2017-05-24 16:49:52 -0700 | [diff] [blame] | 137 | Dicdata[ 'id' ] = self.id |
lanqinglong | 77124b0 | 2015-08-06 11:47:38 +0800 | [diff] [blame] | 138 | if self.network_id != '': |
Jon Hall | f52840a | 2017-05-24 16:49:52 -0700 | [diff] [blame] | 139 | Dicdata[ 'network_id' ] = self.network_id |
lanqinglong | 77124b0 | 2015-08-06 11:47:38 +0800 | [diff] [blame] | 140 | if self.name != '': |
Jon Hall | f52840a | 2017-05-24 16:49:52 -0700 | [diff] [blame] | 141 | Dicdata[ 'name' ] = self.name |
lanqinglong | 77124b0 | 2015-08-06 11:47:38 +0800 | [diff] [blame] | 142 | if self.nexthop != '': |
Jon Hall | f52840a | 2017-05-24 16:49:52 -0700 | [diff] [blame] | 143 | Dicdata[ 'host_routes' ] = host_routesdata |
lanqinglong | 77124b0 | 2015-08-06 11:47:38 +0800 | [diff] [blame] | 144 | if self.tenant_id != '': |
Jon Hall | f52840a | 2017-05-24 16:49:52 -0700 | [diff] [blame] | 145 | Dicdata[ 'tenant_id' ] = self.tenant_id |
lanqinglong | 77124b0 | 2015-08-06 11:47:38 +0800 | [diff] [blame] | 146 | if self.start != '': |
Jon Hall | f52840a | 2017-05-24 16:49:52 -0700 | [diff] [blame] | 147 | Dicdata[ 'allocation_pools' ] = allocation_pools |
lanqinglong | 77124b0 | 2015-08-06 11:47:38 +0800 | [diff] [blame] | 148 | if self.shared != '': |
Jon Hall | f52840a | 2017-05-24 16:49:52 -0700 | [diff] [blame] | 149 | Dicdata[ 'shared' ] = self.shared |
lanqinglong | 77124b0 | 2015-08-06 11:47:38 +0800 | [diff] [blame] | 150 | if self.ipv6_address_mode != '': |
Jon Hall | f52840a | 2017-05-24 16:49:52 -0700 | [diff] [blame] | 151 | Dicdata[ 'ipv6_address_mode' ] = self.ipv6_address_mode |
lanqinglong | 77124b0 | 2015-08-06 11:47:38 +0800 | [diff] [blame] | 152 | if self.ipv6_ra_mode != '': |
Jon Hall | f52840a | 2017-05-24 16:49:52 -0700 | [diff] [blame] | 153 | Dicdata[ 'ipv6_ra_mode' ] = self.ipv6_ra_mode |
lanqinglong | 77124b0 | 2015-08-06 11:47:38 +0800 | [diff] [blame] | 154 | if self.cidr != '': |
Jon Hall | f52840a | 2017-05-24 16:49:52 -0700 | [diff] [blame] | 155 | Dicdata[ 'cidr' ] = self.cidr |
lanqinglong | 77124b0 | 2015-08-06 11:47:38 +0800 | [diff] [blame] | 156 | if self.enable_dhcp != '': |
Jon Hall | f52840a | 2017-05-24 16:49:52 -0700 | [diff] [blame] | 157 | Dicdata[ 'enable_dhcp' ] = self.enable_dhcp |
lanqinglong | 77124b0 | 2015-08-06 11:47:38 +0800 | [diff] [blame] | 158 | if self.dns_nameservers != '': |
Jon Hall | f52840a | 2017-05-24 16:49:52 -0700 | [diff] [blame] | 159 | Dicdata[ 'dns_nameservers' ] = self.dns_nameservers |
lanqinglong | 77124b0 | 2015-08-06 11:47:38 +0800 | [diff] [blame] | 160 | if self.gateway_ip != '': |
Jon Hall | f52840a | 2017-05-24 16:49:52 -0700 | [diff] [blame] | 161 | Dicdata[ 'gateway_ip' ] = self.gateway_ip |
lanqinglong | 77124b0 | 2015-08-06 11:47:38 +0800 | [diff] [blame] | 162 | if self.ip_version != '': |
Jon Hall | f52840a | 2017-05-24 16:49:52 -0700 | [diff] [blame] | 163 | Dicdata[ 'ip_version' ] = self.ip_version |
lanqinglong | 77124b0 | 2015-08-06 11:47:38 +0800 | [diff] [blame] | 164 | |
Jon Hall | f52840a | 2017-05-24 16:49:52 -0700 | [diff] [blame] | 165 | Dicdata = { 'subnet': Dicdata } |
lanqinglong | 77124b0 | 2015-08-06 11:47:38 +0800 | [diff] [blame] | 166 | |
Jon Hall | f52840a | 2017-05-24 16:49:52 -0700 | [diff] [blame] | 167 | return json.dumps( Dicdata, indent=4 ) |
lanqinglong | 77124b0 | 2015-08-06 11:47:38 +0800 | [diff] [blame] | 168 | |
lanqinglong | 77124b0 | 2015-08-06 11:47:38 +0800 | [diff] [blame] | 169 | |
Jon Hall | f52840a | 2017-05-24 16:49:52 -0700 | [diff] [blame] | 170 | class VirtualPortData( NetworkData ): |
| 171 | |
| 172 | def __init__( self ): |
lanqinglong | 77124b0 | 2015-08-06 11:47:38 +0800 | [diff] [blame] | 173 | self.id = '' |
| 174 | self.state = 'ACTIVE' |
| 175 | self.bindingHostId = 'fa:16:3e:76:8e:88' |
Jon Hall | f52840a | 2017-05-24 16:49:52 -0700 | [diff] [blame] | 176 | self.allowedAddressPairs = [ { 'mac_address': 'fa:16:3e:76:8e:88', 'ip_address': '192.168.1.1' } ] |
lanqinglong | 77124b0 | 2015-08-06 11:47:38 +0800 | [diff] [blame] | 177 | self.deviceOwner = 'none' |
| 178 | self.fixedIp = [] |
Jon Hall | f52840a | 2017-05-24 16:49:52 -0700 | [diff] [blame] | 179 | self.securityGroups = [ { 'securityGroup': 'asd' } ] |
lanqinglong | d0dda2e | 2015-08-25 11:02:48 +0800 | [diff] [blame] | 180 | self.adminStateUp = True |
| 181 | self.network_id = '' |
| 182 | self.tenant_id = '' |
| 183 | self.subnet_id = '' |
lanqinglong | 77124b0 | 2015-08-06 11:47:38 +0800 | [diff] [blame] | 184 | self.bindingvifDetails = 'port_filter' |
| 185 | self.bindingvnicType = 'normal' |
| 186 | self.bindingvifType = 'ovs' |
| 187 | self.macAddress = 'fa:16:3e:76:8e:88' |
| 188 | self.deviceId = 'a08aa' |
| 189 | self.name = 'u' |
| 190 | |
Jon Hall | f52840a | 2017-05-24 16:49:52 -0700 | [diff] [blame] | 191 | def DictoJson( self ): |
lanqinglong | d0dda2e | 2015-08-25 11:02:48 +0800 | [diff] [blame] | 192 | if self.id == '' or self.tenant_id == ' ' or \ |
| 193 | self.network_id == '' or self.subnet_id == '': |
lanqinglong | 77124b0 | 2015-08-06 11:47:38 +0800 | [diff] [blame] | 194 | print 'Id/tenant id/networkid/subnetId is necessary!' |
| 195 | |
| 196 | Dicdata = {} |
Jon Hall | f52840a | 2017-05-24 16:49:52 -0700 | [diff] [blame] | 197 | fixedIp = [] |
| 198 | fixedIp.append( { 'subnet_id': self.subnet_id, 'ip_address': '192.168.1.4' } ) |
lanqinglong | 77124b0 | 2015-08-06 11:47:38 +0800 | [diff] [blame] | 199 | allocation_pools = [] |
| 200 | |
| 201 | if self.id != '': |
Jon Hall | f52840a | 2017-05-24 16:49:52 -0700 | [diff] [blame] | 202 | Dicdata[ 'id' ] = self.id |
lanqinglong | 77124b0 | 2015-08-06 11:47:38 +0800 | [diff] [blame] | 203 | if self.state != '': |
Jon Hall | f52840a | 2017-05-24 16:49:52 -0700 | [diff] [blame] | 204 | Dicdata[ 'status' ] = self.state |
lanqinglong | 77124b0 | 2015-08-06 11:47:38 +0800 | [diff] [blame] | 205 | if self.bindingHostId != '': |
Jon Hall | f52840a | 2017-05-24 16:49:52 -0700 | [diff] [blame] | 206 | Dicdata[ 'binding:host_id' ] = self.bindingHostId |
lanqinglong | 77124b0 | 2015-08-06 11:47:38 +0800 | [diff] [blame] | 207 | if self.allowedAddressPairs != '': |
Jon Hall | f52840a | 2017-05-24 16:49:52 -0700 | [diff] [blame] | 208 | Dicdata[ 'allowed_address_pairs' ] = self.allowedAddressPairs |
lanqinglong | 77124b0 | 2015-08-06 11:47:38 +0800 | [diff] [blame] | 209 | if self.deviceOwner != '': |
Jon Hall | f52840a | 2017-05-24 16:49:52 -0700 | [diff] [blame] | 210 | Dicdata[ 'device_owner' ] = self.deviceOwner |
lanqinglong | 77124b0 | 2015-08-06 11:47:38 +0800 | [diff] [blame] | 211 | if self.securityGroups != '': |
Jon Hall | f52840a | 2017-05-24 16:49:52 -0700 | [diff] [blame] | 212 | Dicdata[ 'security_groups' ] = self.securityGroups |
lanqinglong | 77124b0 | 2015-08-06 11:47:38 +0800 | [diff] [blame] | 213 | if self.adminStateUp != '': |
Jon Hall | f52840a | 2017-05-24 16:49:52 -0700 | [diff] [blame] | 214 | Dicdata[ 'admin_state_up' ] = self.adminStateUp |
lanqinglong | d0dda2e | 2015-08-25 11:02:48 +0800 | [diff] [blame] | 215 | if self.network_id != '': |
Jon Hall | f52840a | 2017-05-24 16:49:52 -0700 | [diff] [blame] | 216 | Dicdata[ 'network_id' ] = self.network_id |
lanqinglong | d0dda2e | 2015-08-25 11:02:48 +0800 | [diff] [blame] | 217 | if self.tenant_id != '': |
Jon Hall | f52840a | 2017-05-24 16:49:52 -0700 | [diff] [blame] | 218 | Dicdata[ 'tenant_id' ] = self.tenant_id |
lanqinglong | 77124b0 | 2015-08-06 11:47:38 +0800 | [diff] [blame] | 219 | if self.bindingvifDetails != '': |
Jon Hall | f52840a | 2017-05-24 16:49:52 -0700 | [diff] [blame] | 220 | Dicdata[ 'binding:vif_details' ] = self.bindingvifDetails |
lanqinglong | 77124b0 | 2015-08-06 11:47:38 +0800 | [diff] [blame] | 221 | if self.bindingvnicType != '': |
Jon Hall | f52840a | 2017-05-24 16:49:52 -0700 | [diff] [blame] | 222 | Dicdata[ 'binding:vnic_type' ] = self.bindingvnicType |
lanqinglong | 77124b0 | 2015-08-06 11:47:38 +0800 | [diff] [blame] | 223 | if self.bindingvifType != '': |
Jon Hall | f52840a | 2017-05-24 16:49:52 -0700 | [diff] [blame] | 224 | Dicdata[ 'binding:vif_type' ] = self.bindingvifType |
lanqinglong | 77124b0 | 2015-08-06 11:47:38 +0800 | [diff] [blame] | 225 | if self.macAddress != '': |
Jon Hall | f52840a | 2017-05-24 16:49:52 -0700 | [diff] [blame] | 226 | Dicdata[ 'mac_address' ] = self.macAddress |
lanqinglong | 77124b0 | 2015-08-06 11:47:38 +0800 | [diff] [blame] | 227 | if self.deviceId != '': |
Jon Hall | f52840a | 2017-05-24 16:49:52 -0700 | [diff] [blame] | 228 | Dicdata[ 'device_id' ] = self.deviceId |
lanqinglong | 77124b0 | 2015-08-06 11:47:38 +0800 | [diff] [blame] | 229 | if self.name != '': |
Jon Hall | f52840a | 2017-05-24 16:49:52 -0700 | [diff] [blame] | 230 | Dicdata[ 'name' ] = self.name |
lanqinglong | 77124b0 | 2015-08-06 11:47:38 +0800 | [diff] [blame] | 231 | |
Jon Hall | f52840a | 2017-05-24 16:49:52 -0700 | [diff] [blame] | 232 | Dicdata[ 'fixed_ips' ] = fixedIp |
| 233 | Dicdata = { 'port': Dicdata } |
lanqinglong | 77124b0 | 2015-08-06 11:47:38 +0800 | [diff] [blame] | 234 | |
Jon Hall | f52840a | 2017-05-24 16:49:52 -0700 | [diff] [blame] | 235 | return json.dumps( Dicdata, indent=4 ) |