zhanghaoyu7 | 474d8c6 | 2015-08-26 14:53:28 +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/x/voMg>, |
| 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 | """ |
zhanghaoyu7 | 474d8c6 | 2015-08-26 14:53:28 +0800 | [diff] [blame] | 22 | This file provide the data |
| 23 | lanqinglong@huawei.com |
| 24 | """ |
| 25 | import json |
| 26 | |
Jon Hall | 8638b56 | 2017-05-24 16:39:59 -0700 | [diff] [blame] | 27 | |
zhanghaoyu7 | 474d8c6 | 2015-08-26 14:53:28 +0800 | [diff] [blame] | 28 | class NetworkData: |
| 29 | |
Jon Hall | 8638b56 | 2017-05-24 16:39:59 -0700 | [diff] [blame] | 30 | def __init__( self ): |
zhanghaoyu7 | 474d8c6 | 2015-08-26 14:53:28 +0800 | [diff] [blame] | 31 | self.id = '' |
| 32 | self.state = 'ACTIVE' |
| 33 | self.name = 'onosfw-1' |
| 34 | self.physicalNetwork = 'none' |
| 35 | self.admin_state_up = True |
| 36 | self.tenant_id = '' |
| 37 | self.routerExternal = False |
Jon Hall | 8638b56 | 2017-05-24 16:39:59 -0700 | [diff] [blame] | 38 | self.type = 'LOCAL' |
zhanghaoyu7 | 474d8c6 | 2015-08-26 14:53:28 +0800 | [diff] [blame] | 39 | self.segmentationID = '6' |
| 40 | self.shared = False |
| 41 | |
Jon Hall | 8638b56 | 2017-05-24 16:39:59 -0700 | [diff] [blame] | 42 | def DictoJson( self ): |
zhanghaoyu7 | 474d8c6 | 2015-08-26 14:53:28 +0800 | [diff] [blame] | 43 | |
Jon Hall | 8638b56 | 2017-05-24 16:39:59 -0700 | [diff] [blame] | 44 | if self.id == '' or self.tenant_id == '': |
zhanghaoyu7 | 474d8c6 | 2015-08-26 14:53:28 +0800 | [diff] [blame] | 45 | print 'Id and tenant id is necessary!' |
| 46 | |
| 47 | Dicdata = {} |
Jon Hall | 8638b56 | 2017-05-24 16:39:59 -0700 | [diff] [blame] | 48 | if self.id != '': |
| 49 | Dicdata[ 'id' ] = self.id |
zhanghaoyu7 | 474d8c6 | 2015-08-26 14:53:28 +0800 | [diff] [blame] | 50 | if self.state != '': |
Jon Hall | 8638b56 | 2017-05-24 16:39:59 -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 |
zhanghaoyu7 | 474d8c6 | 2015-08-26 14:53:28 +0800 | [diff] [blame] | 68 | |
Jon Hall | 8638b56 | 2017-05-24 16:39:59 -0700 | [diff] [blame] | 69 | Dicdata = { 'network': Dicdata } |
zhanghaoyu7 | 474d8c6 | 2015-08-26 14:53:28 +0800 | [diff] [blame] | 70 | |
Jon Hall | 8638b56 | 2017-05-24 16:39:59 -0700 | [diff] [blame] | 71 | return json.dumps( Dicdata, indent=4 ) |
zhanghaoyu7 | 474d8c6 | 2015-08-26 14:53:28 +0800 | [diff] [blame] | 72 | |
Jon Hall | 8638b56 | 2017-05-24 16:39:59 -0700 | [diff] [blame] | 73 | def Ordered( self, obj ): |
zhanghaoyu7 | 474d8c6 | 2015-08-26 14:53:28 +0800 | [diff] [blame] | 74 | |
Jon Hall | 8638b56 | 2017-05-24 16:39:59 -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 ) |
zhanghaoyu7 | 474d8c6 | 2015-08-26 14:53:28 +0800 | [diff] [blame] | 79 | else: |
| 80 | return obj |
| 81 | |
Jon Hall | 8638b56 | 2017-05-24 16:39:59 -0700 | [diff] [blame] | 82 | def JsonCompare( self, SourceData, DestiData, FirstPara, SecondPara ): |
zhanghaoyu7 | 474d8c6 | 2015-08-26 14:53:28 +0800 | [diff] [blame] | 83 | |
| 84 | try: |
Jon Hall | 8638b56 | 2017-05-24 16:39:59 -0700 | [diff] [blame] | 85 | SourceCompareDataDic = json.loads( SourceData ) |
| 86 | DestiCompareDataDic = json.loads( DestiData ) |
zhanghaoyu7 | 474d8c6 | 2015-08-26 14:53:28 +0800 | [diff] [blame] | 87 | except ValueError: |
| 88 | print "SourceData or DestData is not JSON Type!" |
| 89 | return False |
| 90 | |
| 91 | try: |
Jon Hall | 8638b56 | 2017-05-24 16:39:59 -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 |
zhanghaoyu7 | 474d8c6 | 2015-08-26 14:53:28 +0800 | [diff] [blame] | 96 | return False |
| 97 | |
Jon Hall | 8638b56 | 2017-05-24 16:39:59 -0700 | [diff] [blame] | 98 | if str( Socom ).lower() == str( Decom ).lower(): |
zhanghaoyu7 | 474d8c6 | 2015-08-26 14:53:28 +0800 | [diff] [blame] | 99 | return True |
| 100 | else: |
Jon Hall | 8638b56 | 2017-05-24 16:39:59 -0700 | [diff] [blame] | 101 | print "Source Compare data:" + FirstPara + "." + SecondPara + "=" + str( Socom ) |
| 102 | print "Dest Compare data: " + FirstPara + "." + SecondPara + "=" + str( Decom ) |
zhanghaoyu7 | 474d8c6 | 2015-08-26 14:53:28 +0800 | [diff] [blame] | 103 | return False |
| 104 | |
zhanghaoyu7 | 474d8c6 | 2015-08-26 14:53:28 +0800 | [diff] [blame] | 105 | |
Jon Hall | 8638b56 | 2017-05-24 16:39:59 -0700 | [diff] [blame] | 106 | class SubnetData( NetworkData ): |
| 107 | |
| 108 | def __init__( self ): |
zhanghaoyu7 | 474d8c6 | 2015-08-26 14:53:28 +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' |
| 119 | self.enable_dhcp = True |
| 120 | self.dns_nameservers = 'aaa' |
| 121 | self.gateway_ip = '192.168.2.1' |
| 122 | self.ip_version = '4' |
| 123 | self.shared = False |
| 124 | self.name = 'demo-subnet' |
| 125 | |
Jon Hall | 8638b56 | 2017-05-24 16:39:59 -0700 | [diff] [blame] | 126 | def DictoJson( self ): |
| 127 | if self.id == '' or self.tenant_id == '': |
zhanghaoyu7 | 474d8c6 | 2015-08-26 14:53:28 +0800 | [diff] [blame] | 128 | print 'Id and tenant id is necessary!' |
| 129 | |
| 130 | Dicdata = {} |
| 131 | host_routesdata = [] |
Jon Hall | 8638b56 | 2017-05-24 16:39:59 -0700 | [diff] [blame] | 132 | host_routesdata.append( { 'nexthop': self.nexthop, 'destination': self.destination } ) |
zhanghaoyu7 | 474d8c6 | 2015-08-26 14:53:28 +0800 | [diff] [blame] | 133 | allocation_pools = [] |
Jon Hall | 8638b56 | 2017-05-24 16:39:59 -0700 | [diff] [blame] | 134 | allocation_pools.append( { 'start': self.start, 'end': self.end } ) |
zhanghaoyu7 | 474d8c6 | 2015-08-26 14:53:28 +0800 | [diff] [blame] | 135 | |
| 136 | if self.id != '': |
Jon Hall | 8638b56 | 2017-05-24 16:39:59 -0700 | [diff] [blame] | 137 | Dicdata[ 'id' ] = self.id |
zhanghaoyu7 | 474d8c6 | 2015-08-26 14:53:28 +0800 | [diff] [blame] | 138 | if self.network_id != '': |
Jon Hall | 8638b56 | 2017-05-24 16:39:59 -0700 | [diff] [blame] | 139 | Dicdata[ 'network_id' ] = self.network_id |
zhanghaoyu7 | 474d8c6 | 2015-08-26 14:53:28 +0800 | [diff] [blame] | 140 | if self.name != '': |
Jon Hall | 8638b56 | 2017-05-24 16:39:59 -0700 | [diff] [blame] | 141 | Dicdata[ 'name' ] = self.name |
zhanghaoyu7 | 474d8c6 | 2015-08-26 14:53:28 +0800 | [diff] [blame] | 142 | if self.nexthop != '': |
Jon Hall | 8638b56 | 2017-05-24 16:39:59 -0700 | [diff] [blame] | 143 | Dicdata[ 'host_routes' ] = host_routesdata |
zhanghaoyu7 | 474d8c6 | 2015-08-26 14:53:28 +0800 | [diff] [blame] | 144 | if self.tenant_id != '': |
Jon Hall | 8638b56 | 2017-05-24 16:39:59 -0700 | [diff] [blame] | 145 | Dicdata[ 'tenant_id' ] = self.tenant_id |
zhanghaoyu7 | 474d8c6 | 2015-08-26 14:53:28 +0800 | [diff] [blame] | 146 | if self.start != '': |
Jon Hall | 8638b56 | 2017-05-24 16:39:59 -0700 | [diff] [blame] | 147 | Dicdata[ 'allocation_pools' ] = allocation_pools |
zhanghaoyu7 | 474d8c6 | 2015-08-26 14:53:28 +0800 | [diff] [blame] | 148 | if self.shared != '': |
Jon Hall | 8638b56 | 2017-05-24 16:39:59 -0700 | [diff] [blame] | 149 | Dicdata[ 'shared' ] = self.shared |
zhanghaoyu7 | 474d8c6 | 2015-08-26 14:53:28 +0800 | [diff] [blame] | 150 | if self.ipv6_address_mode != '': |
Jon Hall | 8638b56 | 2017-05-24 16:39:59 -0700 | [diff] [blame] | 151 | Dicdata[ 'ipv6_address_mode' ] = self.ipv6_address_mode |
zhanghaoyu7 | 474d8c6 | 2015-08-26 14:53:28 +0800 | [diff] [blame] | 152 | if self.ipv6_ra_mode != '': |
Jon Hall | 8638b56 | 2017-05-24 16:39:59 -0700 | [diff] [blame] | 153 | Dicdata[ 'ipv6_ra_mode' ] = self.ipv6_ra_mode |
zhanghaoyu7 | 474d8c6 | 2015-08-26 14:53:28 +0800 | [diff] [blame] | 154 | if self.cidr != '': |
Jon Hall | 8638b56 | 2017-05-24 16:39:59 -0700 | [diff] [blame] | 155 | Dicdata[ 'cidr' ] = self.cidr |
zhanghaoyu7 | 474d8c6 | 2015-08-26 14:53:28 +0800 | [diff] [blame] | 156 | if self.enable_dhcp != '': |
Jon Hall | 8638b56 | 2017-05-24 16:39:59 -0700 | [diff] [blame] | 157 | Dicdata[ 'enable_dhcp' ] = self.enable_dhcp |
zhanghaoyu7 | 474d8c6 | 2015-08-26 14:53:28 +0800 | [diff] [blame] | 158 | if self.dns_nameservers != '': |
Jon Hall | 8638b56 | 2017-05-24 16:39:59 -0700 | [diff] [blame] | 159 | Dicdata[ 'dns_nameservers' ] = self.dns_nameservers |
zhanghaoyu7 | 474d8c6 | 2015-08-26 14:53:28 +0800 | [diff] [blame] | 160 | if self.gateway_ip != '': |
Jon Hall | 8638b56 | 2017-05-24 16:39:59 -0700 | [diff] [blame] | 161 | Dicdata[ 'gateway_ip' ] = self.gateway_ip |
zhanghaoyu7 | 474d8c6 | 2015-08-26 14:53:28 +0800 | [diff] [blame] | 162 | if self.ip_version != '': |
Jon Hall | 8638b56 | 2017-05-24 16:39:59 -0700 | [diff] [blame] | 163 | Dicdata[ 'ip_version' ] = self.ip_version |
zhanghaoyu7 | 474d8c6 | 2015-08-26 14:53:28 +0800 | [diff] [blame] | 164 | |
Jon Hall | 8638b56 | 2017-05-24 16:39:59 -0700 | [diff] [blame] | 165 | Dicdata = { 'subnet': Dicdata } |
zhanghaoyu7 | 474d8c6 | 2015-08-26 14:53:28 +0800 | [diff] [blame] | 166 | |
Jon Hall | 8638b56 | 2017-05-24 16:39:59 -0700 | [diff] [blame] | 167 | return json.dumps( Dicdata, indent=4 ) |
zhanghaoyu7 | 474d8c6 | 2015-08-26 14:53:28 +0800 | [diff] [blame] | 168 | |
zhanghaoyu7 | 474d8c6 | 2015-08-26 14:53:28 +0800 | [diff] [blame] | 169 | |
Jon Hall | 8638b56 | 2017-05-24 16:39:59 -0700 | [diff] [blame] | 170 | class VirtualPortData( NetworkData ): |
| 171 | |
| 172 | def __init__( self ): |
zhanghaoyu7 | 474d8c6 | 2015-08-26 14:53:28 +0800 | [diff] [blame] | 173 | self.id = '' |
| 174 | self.state = 'ACTIVE' |
| 175 | self.bindingHostId = 'fa:16:3e:76:8e:88' |
Jon Hall | 8638b56 | 2017-05-24 16:39:59 -0700 | [diff] [blame] | 176 | self.allowedAddressPairs = [ { 'mac_address': 'fa:16:3e:76:8e:88', 'ip_address': '192.168.1.1' } ] |
zhanghaoyu7 | 474d8c6 | 2015-08-26 14:53:28 +0800 | [diff] [blame] | 177 | self.deviceOwner = 'none' |
| 178 | self.fixedIp = [] |
Jon Hall | 8638b56 | 2017-05-24 16:39:59 -0700 | [diff] [blame] | 179 | self.securityGroups = [ { 'securityGroup': 'asd' } ] |
zhanghaoyu7 | 474d8c6 | 2015-08-26 14:53:28 +0800 | [diff] [blame] | 180 | self.adminStateUp = True |
| 181 | self.network_id = '' |
| 182 | self.tenant_id = '' |
| 183 | self.subnet_id = '' |
| 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 | 8638b56 | 2017-05-24 16:39:59 -0700 | [diff] [blame] | 191 | def DictoJson( self ): |
zhanghaoyu7 | 474d8c6 | 2015-08-26 14:53:28 +0800 | [diff] [blame] | 192 | if self.id == '' or self.tenant_id == ' ' or \ |
| 193 | self.network_id == '' or self.subnet_id == '': |
| 194 | print 'Id/tenant id/networkid/subnetId is necessary!' |
| 195 | |
| 196 | Dicdata = {} |
Jon Hall | 8638b56 | 2017-05-24 16:39:59 -0700 | [diff] [blame] | 197 | fixedIp = [] |
| 198 | fixedIp.append( { 'subnet_id': self.subnet_id, 'ip_address': '192.168.1.4' } ) |
zhanghaoyu7 | 474d8c6 | 2015-08-26 14:53:28 +0800 | [diff] [blame] | 199 | allocation_pools = [] |
| 200 | |
| 201 | if self.id != '': |
Jon Hall | 8638b56 | 2017-05-24 16:39:59 -0700 | [diff] [blame] | 202 | Dicdata[ 'id' ] = self.id |
zhanghaoyu7 | 474d8c6 | 2015-08-26 14:53:28 +0800 | [diff] [blame] | 203 | if self.state != '': |
Jon Hall | 8638b56 | 2017-05-24 16:39:59 -0700 | [diff] [blame] | 204 | Dicdata[ 'status' ] = self.state |
zhanghaoyu7 | 474d8c6 | 2015-08-26 14:53:28 +0800 | [diff] [blame] | 205 | if self.bindingHostId != '': |
Jon Hall | 8638b56 | 2017-05-24 16:39:59 -0700 | [diff] [blame] | 206 | Dicdata[ 'binding:host_id' ] = self.bindingHostId |
zhanghaoyu7 | 474d8c6 | 2015-08-26 14:53:28 +0800 | [diff] [blame] | 207 | if self.allowedAddressPairs != '': |
Jon Hall | 8638b56 | 2017-05-24 16:39:59 -0700 | [diff] [blame] | 208 | Dicdata[ 'allowed_address_pairs' ] = self.allowedAddressPairs |
zhanghaoyu7 | 474d8c6 | 2015-08-26 14:53:28 +0800 | [diff] [blame] | 209 | if self.deviceOwner != '': |
Jon Hall | 8638b56 | 2017-05-24 16:39:59 -0700 | [diff] [blame] | 210 | Dicdata[ 'device_owner' ] = self.deviceOwner |
zhanghaoyu7 | 474d8c6 | 2015-08-26 14:53:28 +0800 | [diff] [blame] | 211 | if self.securityGroups != '': |
Jon Hall | 8638b56 | 2017-05-24 16:39:59 -0700 | [diff] [blame] | 212 | Dicdata[ 'security_groups' ] = self.securityGroups |
zhanghaoyu7 | 474d8c6 | 2015-08-26 14:53:28 +0800 | [diff] [blame] | 213 | if self.adminStateUp != '': |
Jon Hall | 8638b56 | 2017-05-24 16:39:59 -0700 | [diff] [blame] | 214 | Dicdata[ 'admin_state_up' ] = self.adminStateUp |
zhanghaoyu7 | 474d8c6 | 2015-08-26 14:53:28 +0800 | [diff] [blame] | 215 | if self.network_id != '': |
Jon Hall | 8638b56 | 2017-05-24 16:39:59 -0700 | [diff] [blame] | 216 | Dicdata[ 'network_id' ] = self.network_id |
zhanghaoyu7 | 474d8c6 | 2015-08-26 14:53:28 +0800 | [diff] [blame] | 217 | if self.tenant_id != '': |
Jon Hall | 8638b56 | 2017-05-24 16:39:59 -0700 | [diff] [blame] | 218 | Dicdata[ 'tenant_id' ] = self.tenant_id |
zhanghaoyu7 | 474d8c6 | 2015-08-26 14:53:28 +0800 | [diff] [blame] | 219 | if self.bindingvifDetails != '': |
Jon Hall | 8638b56 | 2017-05-24 16:39:59 -0700 | [diff] [blame] | 220 | Dicdata[ 'binding:vif_details' ] = self.bindingvifDetails |
zhanghaoyu7 | 474d8c6 | 2015-08-26 14:53:28 +0800 | [diff] [blame] | 221 | if self.bindingvnicType != '': |
Jon Hall | 8638b56 | 2017-05-24 16:39:59 -0700 | [diff] [blame] | 222 | Dicdata[ 'binding:vnic_type' ] = self.bindingvnicType |
zhanghaoyu7 | 474d8c6 | 2015-08-26 14:53:28 +0800 | [diff] [blame] | 223 | if self.bindingvifType != '': |
Jon Hall | 8638b56 | 2017-05-24 16:39:59 -0700 | [diff] [blame] | 224 | Dicdata[ 'binding:vif_type' ] = self.bindingvifType |
zhanghaoyu7 | 474d8c6 | 2015-08-26 14:53:28 +0800 | [diff] [blame] | 225 | if self.macAddress != '': |
Jon Hall | 8638b56 | 2017-05-24 16:39:59 -0700 | [diff] [blame] | 226 | Dicdata[ 'mac_address' ] = self.macAddress |
zhanghaoyu7 | 474d8c6 | 2015-08-26 14:53:28 +0800 | [diff] [blame] | 227 | if self.deviceId != '': |
Jon Hall | 8638b56 | 2017-05-24 16:39:59 -0700 | [diff] [blame] | 228 | Dicdata[ 'device_id' ] = self.deviceId |
zhanghaoyu7 | 474d8c6 | 2015-08-26 14:53:28 +0800 | [diff] [blame] | 229 | if self.name != '': |
Jon Hall | 8638b56 | 2017-05-24 16:39:59 -0700 | [diff] [blame] | 230 | Dicdata[ 'name' ] = self.name |
zhanghaoyu7 | 474d8c6 | 2015-08-26 14:53:28 +0800 | [diff] [blame] | 231 | |
Jon Hall | 8638b56 | 2017-05-24 16:39:59 -0700 | [diff] [blame] | 232 | Dicdata[ 'fixed_ips' ] = fixedIp |
| 233 | Dicdata = { 'port': Dicdata } |
zhanghaoyu7 | 474d8c6 | 2015-08-26 14:53:28 +0800 | [diff] [blame] | 234 | |
Jon Hall | 8638b56 | 2017-05-24 16:39:59 -0700 | [diff] [blame] | 235 | return json.dumps( Dicdata, indent=4 ) |