techwisetv workshop: intercloud fabric
TRANSCRIPT
Building Hybrid Clouds with Cisco Intercloud
Fabric John McDonough
Intercloud Fabric Technical Marketing Engineer
TechWiseTV Workshop
Agenda
• Introduction
• Hands On
• Intercloud Fabric Architecture and Infrastructure
• Supported Operating Systems
• Building Intercloud Fabric Cloud Links
• Creating Virtual Data Centers
• Templates and Catalogs
• REST API
Agenda
Introduction
Introduction – Session Information • Session – Cisco Intercloud Fabric builds and manages hybrid clouds, securely
extending the enterprise data center to the cloud. The latest version of Intercloud Fabric is a feature-rich release that seamlessly joins multiple clouds from global cloud providers. We will review as many of these features and functions today as time allows.
• Who am I?
• John McDonough – Technical Marketing Engineer
• Cisco Employee since 2004
• Developer, Advanced Services, Technical Marketing Engineer
• Blogs – https://blogs.cisco.com/author/johnmcdonough
• Twitter – @johnamcdonough
Hands On
Hands On
• 60 Day License for 10 VMs (20 HCUs) included in Intercloud Fabric
• Install and run with your Amazon AWS or Microsoft Azure provider accounts
• Azure 30 day $200 credit works with Intercloud Fabric
• DevNet Sandbox
• Test out the ICF APIs in DevNet sandbox
• http://develper.cisco.com/cloud
• Cisco dCloud
• Self-Paced lab/demo covering all aspects of Intercloud Fabric
• Running the latest release, offering the greatest flexibility
• http://dcloud.cisco.com
Intercloud Fabric Architecture and Infrastructure
You
Choice Open
Securely Extend Your Data Center
to Cloud
Cisco Intercloud Fabric – Consistent Network and Security for Hybrid Cloud
Interclou
d Alliance
Public Clouds
INTERCLOUD
Intercloud Services
Intercloud Providers
Accelerate Cloud Adoption with Consistent
Operational Model
Accelerate Innovation with
Choice of Clouds
DISRUPTION SPEED EFFICIENCY
Intercloud
Alliance
Public Clouds
INTERCLOUD
Intercloud Services
Intercloud Providers
350 Data Centers
65 Partners
50 Countries
Infrastructure
Extension
Flexible bi-directional
Workload Placement
Cisco Hybrid Cloud Architecture Any Hypervisor, Any Cloud with Security and Data Sovereignty
Enterprise
Security
You Consistent
Operation
Model
Cisco Intercloud Fabric: Solution Overview
CISCO INTERCLOUD
FABRIC
End User Portal
Cloud VM catalogs and Templates
IT Admin
Cloud Configuration and Security
Rest APIs
vSphere
HyperV
OpenStack KVM
Private Data Center
Intercloud Ecosystem
Intercloud Fabric
Provider Platform
Intercloud Fabric
for Providers
Intercloud Fabric Secure Extender
(Secure Network Extension)
DC/Private Cloud
Provider Cloud
Cisco Intercloud Fabric Architectural Details
Intercloud
Switch
VM Manager
Intercloud
Fabric Services
Intercloud
Extender
Intercloud
Fabric Director
End User and IT Admin Portal Workload and Fabric Management IT Admins End Users
VM VM
VM VM Intercloud Fabric
for Business
Intercloud Fabric Structure
Cisco Intercloud Fabric Architecture is Modularized to Achieve the Elasticity
Needed to Support Evolving Cloud Environments
ICF Core Infrastructure ICFD PNSC ICFPP Secure
Communications
Private Cloud: Enterprise Public Cloud: Provider
ICF Core Services
Security Management and Visibility
Automation Networking VM Portability
ICF Extended Services + External Partners (storage, load balancing, etc.)
ICF Object Relationships – Taxonomy
Network Policy
Provider Acct
Enterprise
VDC
Virtual Data
Center
Private Cloud IcfCloud – connects enterprise network (ICX) to cloud network (ICS)
Provider Account – Stores the credentials and region for a provider. Many IcfClouds
can be under a single Provider Account
IcfCloud – connects enterprise network (ICX) to cloud network (ICS)
IcfCloud – connects enterprise network (ICX) to cloud network (ICS) Cloud VDC
Virtual Data
Center
NIC(s)
System Policy
Name Template
DNS domain
DNS Server
Compute Policy
Host Selection
Network Policy
NIC(s)
NIC
Name
Port
IP Source
NIC
Name
Port
IP Source
IP POOL DHCP
NIC
Name
Port
IP Source
NIC
Name
Port
IP Source
IP POOL DHCP
Public Cloud
ICF Object Relationships – Taxonomy
Network Policy
Provider Acct
Enterprise
VDC
Virtual Data
Center
Private Cloud IcfCloud – connects enterprise network (ICX) to cloud network (ICS)
Provider Account – Stores the credentials and region for a provider. Many IcfClouds
can be under a single Provider Account
IcfCloud – connects enterprise network (ICX) to cloud network (ICS)
IcfCloud – connects enterprise network (ICX) to cloud network (ICS) Cloud VDC
Virtual Data
Center
NIC(s)
System Policy
Name Template
DNS domain
DNS Server
Compute Policy
Host Selection
Network Policy
NIC(s)
NIC
Name
Port
IP Source
NIC
Name
Port
IP Source
IP POOL DHCP
NIC
Name
Port
IP Source
NIC
Name
Port
IP Source
IP POOL DHCP
Public Cloud
ICF Object Relationships – Taxonomy
Network Policy
Provider Acct
Enterprise
VDC
Virtual Data
Center
Private Cloud IcfCloud – connects enterprise network (ICX) to cloud network (ICS)
Provider Account – Stores the credentials and region for a provider. Many IcfClouds
can be under a single Provider Account
IcfCloud – connects enterprise network (ICX) to cloud network (ICS)
IcfCloud – connects enterprise network (ICX) to cloud network (ICS) Cloud VDC
Virtual Data
Center
NIC(s)
System Policy
Name Template
DNS domain
DNS Server
Compute Policy
Host Selection
Network Policy
NIC(s)
NIC
Name
Port
IP Source
NIC
Name
Port
IP Source
IP POOL DHCP
NIC
Name
Port
IP Source
NIC
Name
Port
IP Source
IP POOL DHCP
Public Cloud
Supported Operating Systems
Supported Operating Systems
Cisco Intercloud
Services*
Microsoft Azure
Amazon AWS
CentOS 6.2-6.5
RHEL 6.0-65
SUSE 11 SP2/SP3
Windows 2008R2/2012/2012R2
CentOS 6.2-6.5
RHEL 6.0-65
SUSE 11 SP2/SP3
Windows 2008R2/2012/2012R2
CentOS 6.2-6.5
RHEL 6.0-65,
SUSE 11 SP2/SP3
Windows 2008R2/2012/2012R2
*OS support on CIS is dependent upon the cloud provider
Building Intercloud Fabric Links
Intercloud Fabric Links
IcfCloud • Secure Tunnels
• Site-to-Site tunnel - Enterprise to Cloud Provider
• UDP, TCP, HTTPS
• Multiple encryption, hash, and rekey choices
• Access tunnel – intra VM communication in the provider Cloud
• UDP
• Multiple encryption, hash and rekey choices
• IP Group
• AWS Security Groups
• Azure Endpoints
• CIS – dependent upon provider support
Intercloud Fabric – Tunnel Profile
Intercloud Fabric – IP Groups
Intercloud Fabric – Providers
Platform • AWS – access to global regions*
• Azure – access to global regions**
• CIS – dependent upon the provider
• Intercloud Fabric Firewall
• Intercloud Fabric Router
• Inter-VLAN routing
• Default Gateway / Extended Gateway
• NAT
• VPN***
Services
*Generally available regions – Government regions are not yet supported
**Generally available regions – Australia only for Australians – Government regions are not yet supported
***Not available in Azure
Building Virtual Data Centers
Intercloud Fabric Building Virtual Data Centers
• Logical policy driven entities
• Group Association
• Multiple VDCs per IcfCloud
• Workload Instantiation Controls
• Template Modification Controls
• Private Cloud
• Compute Policy
• Network Policy
• Application Groups (Network + Compute)
• Provider Cloud
• Network Policy
• System Policy
• Application Groups (Network + System)
Intercloud Fabric Templates and Catalogs
Intercloud Fabric Templates
• Enterprise Workloads
• Enterprise templates
• Uploaded to Intercloud Fabric
• Uploaded to Cloud Provider Region
• 1 Template can be associated with multiple catalogs, networks, and system policies
Intercloud Fabric Templates and Catalogs
• Logical policy driven entities
• Group Association
• Catalog entry associated with specific IcfCloud and template
• Multiple entries per IcfCloud
• Adheres to VDC policies
• User Instantiation
• May or may not be allowed to modify deployed workload name
• May or may not be allowed to modify workload characteristics*
• Subject to workload limits in VDC and license availability
*ICF uses a cloud fit algorithm to select best possible provider offering, test deployment to determine workload type
REST APIs
Intercloud Fabric REST APIs
• Full VM lifecycle APIs
• Instantiation
• Migration (convert move convert) less vendor specific tools
• Power
• Termination
• Consistent APIs across Cloud Providers
• Many Clouds one API • E.g. Power cycle call is the same for Provider A … Provider Z
• Simplified scripts • E.g. No special cases per provider
• REST Architecture
Applications with Intercloud Fabric
Capacity Augmentation and E-Commerce Hosting
Problem
• Need to burst to cloud than building capacity for seasonal peaks or unanticipated demand
• Cloud workload break enterprise security and compliance rules
AD DNS
Enterprise DC
Public Cloud
Capacity Augmentation and E-Commerce Hosting
Problem
• Need to burst to cloud than building capacity for seasonal peaks or unanticipated demand
• Cloud workload break enterprise security and compliance rules ICF Shell
Continue to use existing
enterprise services
Extend Web and/or App Tier into
Public cloud to augment
on-prem capacity demands
AD DNS
Enterprise DC
Public Cloud
Business Outcomes
• Save cost and time to build additional capacity
• Use all existing enterprise services
Problem
• Developers using public cloud natively without enterprise security
• Developers cannot use or test against enterprise services and databases
Secure Application Development and Test
ICF Shell
Usergroup1 Portal
Usergroup2 Portal
1. Developers accessing
public cloud through
Enterprise portal
2. Extend multiple networks
from Private DC to cloud with
enterprise security policies
Enterprise Portal
Enterprise DC
Public Cloud
AD DNS
Diminish Shadow IT Over Time
Enterprise DC
Import existing cloud
workloads into ICF
Shell (Beta)
Problem
• Enterprise security and compliance at risk when public clouds accessed directly
Business Outcomes
• Meet Enterprise compliance policy mandates across private / public cloud resources
ICF Shell
Usergroup1 Portal
Usergroup2 Portal
Public Cloud
Enterprise Portal Enterprise Portal
Usergroup3 Portal
Cisco Enterprise Cloud Suite Hybrid-Ready Private Cloud
Virtual Network Services
Modern Self-Service Portal and Catalog
Out-of-box application templates
Stack Designer
Integrated Infrastructure
Management
UCS-based Integrated Infrastructure
Multi-Vendor Compute, Network, Storage, and Virtualization
Hybrid Cloud
Connectivity
In
fra
str
uctu
re a
ssura
nce
, 3
rd p
art
y
bill
ing
, re
sou
rce
ma
na
ge
me
nt
Cloud Services
Ecosystem of Service Providers
Compliance
Policy-based deployment/governance
in cloud
Choice
Freedom to place workloads across
heterogeneous clouds
Consistency
Security/Networking as an extension of
Private Cloud
Control
Unified workload management across clouds
Cisco Intercloud Fabric Customer Benefits
DC/Private Cloud
Public /Provider
Cloud
Q & A
Appendices
Intercloud Fabric REST API
X-Cloupia-Request-Key
ICF REST API X-Cloupia-Request-Key
• Need to create the Header “X-Cloupia-Request-Key”
• Get the key
https://icdf-ip-hostname/app/api/rest?"opName=getRESTKey&user=username&password=mypass • F43955535D6148ADB742799BB20874C0
• Create the Header • X-Cloupia-Request-Key:F43955535D6148ADB742799BB20874C0
• All other operations will use the header as the authentication token
Intercloud Fabric REST API Operations
ICF REST API Operations • User Operations
• getRESTKey – (admin/end user) See X-Cloupia-Request-Key earlier in this document
• userAPIAddUser – (admin) • userId, password, firstName, lastName, email, role, groupName
• role choices: ‘Regular = Service End-User’, GroupAdmin = Group Admin’, ‘Admin = Service Admin’
https://icfd-ip-addr/app/api/rest?opName=userAPIAddUser&opData={param0:’userId',param1:’password',param2:’firstName',param3:’lastName',param4:’email',param5:’role',param6:’group’} - users
https://icfd-ip-addr/app/api/rest?opName=userAPIAddUser&opData={param0:’userId',param1:’password',param2:’firstName',param3:’lastName',param4:’email',param5:’role',param6:null} – admins
*group is null unquoted for admins
• Intercloud:userAPIResetUserPassword – (admin/end user) • userId
• newPassword
• resetAPIKey – boolen – values: true|false https://icfd-ip-addr/app/api/rest?opName=Intercloud:userAPIResetUserPassword&opData={param0:’userId',param1:’newPassword',param2:false}
ICF REST API Operations • User Operations – continued
• userAPIResetMyPassword – (admin/end user) • newPassword https://icfd-ip-addr/app/api/rest?opName=userAPIResetMyPassword&opData={param0:’newPassword'}
• userAPIGetUserLoginProfile – (admin/end user) • userId https://icfd-ip-addr/app/api/rest?opName=userAPIGetUserLoginProfile&opData={param0:’userId'}
• userAPIDeleteUser – (admin) • userId opName=userAPIDeleteUser&opData={param0:’userId'}
• userAPIGetMyLoginProfile – (admin/end user) • No opData https://icfd-ip-addr/app/api/rest?opName=userAPIGetMyLoginProfile
ICF REST API Operations • Catalog Operations
• userAPIGetAllCatalogs – (admin) • No opData https://icfd-ip-addr/app/api/rest?opName=userAPIGetAllCatalogs
• userAPIGetCatalogsPerGroup – (admin/end user – for their group) • groupName https://icfd-ip-addr/app/api/rest?opName=userAPIGetCatalogsPerGroup&opData={param0:’groupName’}
ICF REST API Operations • Cloud Operations
• intercloud:userAPIGetAllVCenters – (admin/end user) • No opData https://icfd-ip-addr/app/api/rest?opName=intercloud:userAPIGetAllVCenters
• Intercloud:userAPIGetAllDataCenters – (admin/end user) • vmManager https://icfd-ip-addr/app/api/rest?opName=Intercloud:userAPIGetAllDataCenters&opData={param0:’vmManager’}
• Intercloud:userAPIGetAllEsxHosts – (admin/end user) • vmManager
• dataCenter https://icfd-ip-addr/app/api/rest?opName=Intercloud:userAPIGetAllEsxHosts&opData={param0:’vmManager',param1:’dataCenter’}
ICF REST API Operations • Cloud Operations – continued
• Intercloud:userAPIgetStaticListByName – (admin) • dataStoreList this actual word https://icfd-ip-addr/app/api/rest?opName=Intercloud:userAPIgetStaticListByName&opData={param0:’dataStoreList’}
• Intercloud:userAPIGetAllicfClouds – (admin/end user) • No opData https://icfd-ip-addr/app/api/rest?opName=Intercloud:userAPIGetAllicfClouds
• Intercloud:userAPIGetAllTunnelProfiles – (admin/end user) • No opData https://icfd-ip-addr/app/api/rest?opName=Intercloud:userAPIGetAllTunnelProfiles
• Intercloud:userAPIGeticfCloudSummary – (admin) • icfCloudId https://icfd-ip-addr/app/api/rest?opName=Intercloud:userAPIGeticfCloudSummary&opData={param0:’icfCloudId’}
ICF REST API Operations • Cloud Operations – continued
• Intercloud:userAPIGetAllDeviceProfiles – (admin/end user) • No opData https://icfd-ip-addr/app/api/rest?opName=Intercloud:userAPIGetAllDeviceProfiles
• Intercloud:userAPIGetAllPvtDataTrunkPortProfiles – (admin/end user) • vmManager
• dataCenter https://icfd-ip-addr/app/api/rest?opName=Intercloud:userAPIGetAllPvtDataTrunkPortProfiles&opData={param0:’vmManager',param1:’dataCenter'}
ICF REST API Operations • Network Operations
• Intercloud:userAPIcreateStaticIPPool – (admin) • policyName
• staticIpPool – as a range e.g. 192.168.250.50-192.168.250.100
• vlanId
• gatewayIp
• subnetMask https://icfd-ip-addr/app/api/rest?opName=Intercloud:userAPIcreateStaticIPPool&opData={param0:’policyName',param1:’staticIpPool',param2:’vlanId',param3:’gatewayIp',param4:’subnetMask’}
• Intercloud:userAPIcreateTunnelProfileWithDefaultValues – (admin) • tunnelProfileName https://icfd-ip-addr/app/api/rest?opName=Intercloud:userAPIcreateTunnelProfileWithDefaultValues&opData={param0:’tunnelProfileName’}
• Intercloud:userAPIGetAllPvtMgmtPortProfiles – (admin/end user) • vmManager
• dataCenter https://icfd-ip-addr/app/api/rest?opName=Intercloud:userAPIGetAllPvtMgmtPortProfiles&opData={param0:’vmManager',param1:’dataCenter'}
ICF REST API Operations • Network Operations - continued
• Intercloud:userAPIGetAllStaticIPPoolPolicy – (admin/end user) • No opData
https://icfd-ip-addr/app/api/rest?opName=Intercloud:userAPIGetAllStaticIPPoolPolicy
• Intercloud:userAPIGetAllStaticIPPools – (admin/end user) • policyId
https://icfd-ip-addr/app/api/rest?opName=Intercloud:userAPIGetAllStaticIPPools&opData={param0:’policyId’}
• Intercloud:userAPIGetIPAddressPool – (admin/end user) • No opData
https://icfd-ip-addr/app/api/rest?opName=Intercloud:userAPIGetIPAddressPool
ICF REST API Operations • Service Request Operations
• userAPIGetServiceRequests – (admin/end user – for their SRs) • No opData
https://icfd-ip-addr/app/api/rest?opName=userAPIGetServiceRequests
• userAPIGetServiceRequestDetails – (admin/end user – for their SRs) • requestId
https://icfd-ip-addr/app/api/rest?opName=userAPIGetServiceRequestDetails&opData={param0:’requestId’}
• userAPIGetVMsForServiceRequest– (admin/end user – for their SRs) • requestId
https://icfd-ip-addr/app/api/rest?opName=userAPIGetVMsForServiceRequest&opData={param0:’requestId’}
ICF REST API Operations • VDC Operations
• userAPIGetAllVDCs – (admin/end user) • No opData https://icfd-ip-addr/app/api/rest?opName=userAPIGetAllVDCs
ICF REST API Operations • VM Operations
• Note in all API calls vmId refers to the vmId number in ICF, except Intercloud:userAPIOnboardVM where vmId is the AWS ‘Instance ID’
• Intercloud:userAPIGetAllVms – (admin/end user) • No opData https://icfd-ip-addr/app/api/rest?opName=Intercloud:userAPIGetAllVms
• Intercloud:userAPIGetVMSummary – (admin/end user – for their VMs) • vmId https://icfd-ip-addr/app/api/rest?opName=Intercloud:userAPIGetVMSummary&opData={param0:’vmId’}
• Intercloud:userAPIGetVMVnics – (admin/end user – for their VMs) • vmId
https://icfd-ip-addr/app/api/rest?opName=Intercloud:userAPIGetVMVnics&opData={param0:’vmId’}
ICF REST API Operations • VM Operations – continued
• Intercloud:userAPIProvisionVM – (admin/end user) • catalogName
• targetVdc
• comment https://icfd-ip-addr/app/api/rest?opName=Intercloud:userAPIProvisionVM&opData={param0:’catalogName',param1:targetVdc',param2:’comment’}
• Intercloud:userAPIOnboardVM – (admin/end user) – AWS only • vmId - The identifier, in the format i-xxxx, of the VM instance running on the Amazon cloud
• vmName - The name of the VM
• targetVdc - The name of the target VDC
• AppCategory - The Application Category in the VDC to assign to the VM
• OS - The operating system in the form OS_version_architecture, such as CentOS_6.2_64bit https://icfd-ip-addr/app/api/rest?opName=Intercloud:userAPIOnboardVM&opData={param0:’vmId',param1:vmName',param2:’targetVdc’,param3:’ AppCategory’,param4:’OS’}
ICF REST API Operations • VM Operations – continued
• Intercloud:userAPIMoveVMToCloud – (admin/end user – for their VMs) • vmId
• vmName
• targetVdc
• comment
• removeSource – boolean – values: true|false
https://icfd-ip-addr/app/api/rest?opName=Intercloud:userAPIMoveVMToCloud&opData={param0:’vmId',param1:vmName',param2:’targetVdc’,param3:’comment’,param4:’removeSource’}
ICF REST API Operations • VM Operations – continued
• Intercloud:userAPIMoveVMToEnterprise – (admin/end user – for their VMs) • vmId
• vmName
• targetVdc
• ipAddress – IP address of destination Hypervisor host
• datastoreName – Private cloud datastore where VM will reside
• comment
• removeSource – boolean – values: true|false
https://icfd-ip-addr/app/api/rest?opName=Intercloud:userAPIMoveVMToEnterprise&opData={param0:’vmId',param1:vmName',param2:’targetVdc’,param3:’ ipAddress’,param4:’datastoreName’,param5:’comment’,param6:’removeSource’}
ICF REST API Operations • VM Operations – continued
• Intercloud:userAPIVmPowerOff – (admin/end user) • vmd https://icfd-ip-addr/app/api/rest?opName=Intercloud:userAPIVmPowerOff&opData={param0:’vmId’}
• Intercloud:userAPIVmPowerOn – (admin/end user) • vmId https://icfd-ip-addr/app/api/rest?opName=Intercloud:userAPIVmPowerOn&opData={param0:’vmId’}
• Intercloud:userAPIVmReboot – (admin/end user) • Vmd https://icfd-ip-addr/app/api/rest?opName=Intercloud:userAPIVmReboot&opData={param0:’vmId’}
• Intercloud:userAPIVmTerminate – (admin/end user) • vmId https://icfd-ip-addr/app/api/rest?opName=Intercloud:userAPIVmTerminate&opData={param0:’vmId’}
JSON & XML Reference
REST – What is it? • Representational State Transfer
• REST is an architectural style consisting of a coordinated set of architectural constraints applied to components, connectors, and data elements, within a distributed hypermedia system. REST ignores the details of component implementation and protocol syntax in order to focus on the roles of components, the constraints upon their interaction with other components, and their interpretation of significant data elements.
• Architectural Constraints
• Client-Server / Stateless / Cacheable / Layered / Code on Demand (optional) / Uniform Interface
• Identification of resources / Manipulation of resources / Self-descriptive / Hypermedia as the engine of application state
• HTTP Vocabulary reuse
• GET / POST / PUT / DELETE
• The PUT and DELETE methods are idempotent methods. The GET method is a safe method (or nullipotent), meaning that calling it produces no side-effects. POST is a create method.
JSON – What is it?
• JSON (JavaScript Object Notation) is a lightweight data-interchange format.
• It is easy for humans to read and write.
• It is easy for machines to parse and generate.
• It is based on a subset of the JavaScript Programming Language
• JSON is a text format that is completely language independent
• Uses conventions that are familiar to programmers (or just people)
JSON – Structures
• JSON is built on two structures:
• Object – A collection of name/value pairs.
• Programming language representations – record, struct, dictionary, hash table, keyed list, or associative array.
• Array – An ordered list of values.
• Programming language representations – array, vector, list, or sequence.
• These are universal data structures. Virtually all modern programming languages support them in one form or another.
JSON Structure Forms – Object
• Object
• An object is an unordered set of name/value pairs.
• An object begins with { (left brace) and ends with } (right brace).
• Each name is followed by : (colon)
• name/value pairs are separated by , (comma).
JSON Structure Forms – Array
• Array
• An array is an ordered collection of values.
• An array begins with [ (left bracket) and ends with ] (right bracket).
• Values are separated by , (comma).
JSON – Values
• A value can be a string in double quotes, or a number, or true or false or null, or an object or an array. These structures can be nested.
JSON – String • A string is a sequence of zero or more Unicode characters, wrapped in double
quotes, using backslash escapes.
• A character is represented as a single character string.
JSON – Number • A number is very much like a C or Java number, except that the octal and
hexadecimal formats are not used.
• object
• {} / {members}
• members
• pair / pair , members
• pair
• string : value
• array
• [] / [ elements ]
• elements
• value – or – value , elements
• value
• string
• number
• object
• array
• true
• false
• null
• string
• “”
• “ chars ”
• chars
• char
• char chars
• char
• any-Unicode-character- except-"-or- \ -or- control-character
• \“
• \\
• \/
• \b
• \f
• \n
• \r
• \t
• \u four-hex-digits
• number
• int / int frac / int exp / int frac exp
• int
• digit / digit1-9 digits
• - digit / - digit1-9 digits
• frac
• . digits
• exp
• e digits
• digits
• digit / digit digits
• e
• E
• e+
• e-
• E
• E+
• E-
JSON - Structures • Strings • Numbers
XML – What is it?
• XML stands for eXtensible Markup Language
• XML was designed to carry data, not to display data
• XML tags are not predefined. You must define your own tags!!!
• XML is designed to be self-descriptive
• XML is a W3C Recommendation
• XML is a markup language much like HTML
• XML is not a replacement for HTML.
• XML was designed to transport and store data, with focus on what data is
• HTML was designed to display data, with focus on how data looks
• HTML is about displaying information, while XML is about carrying information.
• XML does not do anything, sorry
XML – Basic Document Structure
• Element tags
• Elements can have associated attributes
• Attributes
• Attributes have values
• Text content (not in APIC)
• Miscellaneous
• Encoding, document type declarations
• Entity references
• Comments, processing instructions, etc…
XML – Basic Document Structure
• XML components
1 <?xml version=‘1.0’ encoding=‘UTF-8’?> XML Declaration 2 <!DOCTYPE order SYSTEM ‘order.dtd’> Document Type
Declaration 3 <?xml-stylesheet type=‘text/xsl’ href=‘style.xsl’?> Processing Instructions 4 <order> Element Tags
5 <item code=‘BK123’> Element Attributes
6 <name>Jonathan Strange and Mr. Norrell</name> Attribute Values
7 <price currency=‘USD’ student_discount=‘20%’>42.00</price> Text Content
8 </item>
9 </order>
XML – Proper Format
• Elements must be balanced, properly nested
• e.g. <br /> OK
• e.g. <b>bold <i> and italic </i> text</b> OK
• e.g. <b>bold <i> and italic </b> text</i> BAD!
• e.g. <ul> <li> list item </ul> BAD!
• Attributes must be specified, quoted
• e.g. <img src=‘images/banner.gif’/> OK
• e.g. <img src=images/banner.gif /> BAD!
• e.g. <ul compact> <li> list item </li> </ul> BAD!
Thank You for Attending
For TechWiseTV episodes, TechWiseTV Workshops, Fundamentals and
Networking 101’s visit http://www.TechWiseTV.com.
https://www.facebook.com/techwise
https://twitter.com/techwisetv